An error
a&&v<=s||ps,T=m>=o&&m=t+n.width)i+=n.width,c++,o++;else if(e.x>t)i+=n.width,b?a+=t-e.x:c++,o++;else if(e.x+e.width>t)i+=n.width,o++;else break}let u=0,d=0,p=0;if(typeof r==`number`)x?(d=Math.floor(e.y/r),u=d*r-e.y):d=Math.ceil(e.y/r),p=Math.ceil(e.height/r)+d,u<0&&p++;else{let t=0;for(let i=0;i`);for(let n of e){t.push(`
`),t.join(``)}function oc(e,t){let n=$s(e,t);return{textPlain:tc(n),textHtml:ac(n)}}function sc(e){let t=document.createElement(`html`);t.innerHTML=e.replace(/ /g,` `);let n=t.querySelector(`table`);if(n===null)return;let r=[n],i=[],a;for(;r.length>0;){let e=r.pop();if(e===void 0)break;if(e instanceof HTMLTableElement||e.nodeName===`TBODY`)r.push(...[...e.children].reverse());else if(e instanceof HTMLTableRowElement)a!==void 0&&i.push(a),a=[],r.push(...[...e.children].reverse());else if(e instanceof HTMLTableCellElement){let t=e.cloneNode(!0),n=t.children.length===1&&t.children[0].nodeName===`P`?t.children[0]:null,r=n?.children.length===1&&n.children[0].nodeName===`FONT`,i=t.querySelectorAll(`br`);for(let e of i)e.replaceWith(`
-`);let o=t.getAttribute(`gdg-raw-value`),s=t.getAttribute(`gdg-format`)??`string`;if(t.querySelector(`a`)!==null)a?.push({rawValue:t.querySelector(`a`)?.getAttribute(`href`)??``,formatted:t.textContent??``,format:s});else if(t.querySelector(`ol`)!==null){let e=t.querySelectorAll(`li`);a?.push({rawValue:[...e].map(e=>e.getAttribute(`gdg-raw-value`)??``),formatted:[...e].map(e=>e.textContent??``),format:`string-array`})}else if(o!==null)a?.push({rawValue:ic(o),formatted:t.textContent??``,format:s});else{let e=t.textContent??``;r&&(e=e.replace(/\n(?!\n)/g,``)),a?.push({rawValue:e??``,formatted:e??``,format:s})}}}return a!==void 0&&i.push(a),i}function cc(e,t,n,r,i){let a=e;if(r===`allowPartial`||e.current===void 0||t===void 0)return e;let o=!1;do{if(e?.current===void 0)break;let r=e.current?.range,s=[];if(r.width>2){let e=t({x:r.x,y:r.y,width:1,height:r.height},i.signal);if(typeof e==`function`)return a;s.push(...e);let n=t({x:r.x+r.width-1,y:r.y,width:1,height:r.height},i.signal);if(typeof n==`function`)return a;s.push(...n)}else{let e=t({x:r.x,y:r.y,width:r.width,height:r.height},i.signal);if(typeof e==`function`)return a;s.push(...e)}let c=r.x-n,l=r.x+r.width-1-n;for(let e of s)for(let t of e)t.span!==void 0&&(c=Math.min(t.span[0],c),l=Math.max(t.span[1],l));c===r.x-n&&l===r.x+r.width-1-n?o=!0:e={current:{cell:e.current.cell??[0,0],range:{x:c+n,y:r.y,width:l-c+1,height:r.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!o);return e}function lc(e){return e.startsWith(`"`)&&e.endsWith(`"`)&&(e=e.slice(1,-1).replace(/""/g,`"`)),e}function uc(e){let t;(function(e){e[e.None=0]=`None`,e[e.inString=1]=`inString`,e[e.inStringPostQuote=2]=`inStringPostQuote`})(t||={});let n=[],r=[],i=0,a=t.None;e=e.replace(/\r\n/g,`
+`}};function fa(e,t){return e===`normal`?[t.bgIconHeader,t.fgIconHeader]:e===`selected`?[`white`,t.accentColor]:[t.accentColor,t.bgHeader]}var pa=class{onSettled;spriteMap=new Map;headerIcons;inFlight=0;constructor(e,t){this.onSettled=t,this.headerIcons=e??{}}drawSprite(e,t,n,r,i,a,o,s=1){let[c,l]=fa(t,o),u=a*Math.ceil(window.devicePixelRatio),d=`${c}_${l}_${u}_${e}`,f=this.spriteMap.get(d);if(f===void 0){let t=this.headerIcons[e];if(t===void 0)return;f=document.createElement(`canvas`);let n=f.getContext(`2d`);if(n===null)return;let r=new Image;r.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t({fgColor:l,bgColor:c}))}`,this.spriteMap.set(d,f);let i=r.decode();if(i===void 0)return;this.inFlight++,i.then(()=>{n.drawImage(r,0,0,u,u)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else s<1&&(n.globalAlpha=s),n.drawImage(f,0,0,u,u,r,i,a,a),s<1&&(n.globalAlpha=1)}};function ma(e){if(e.length===0)return;let t;for(let n of e)t=Math.min(t??n.y,n.y)}function ha(e,t,n,r,i,a,o,s,c){s??=t;let l=t,u=e,d=r-a,f=!1;for(;l`);for(let e of n){let n=`gdg-format="${e.format}"`;e.format===`url`?t.push(` `)}return t.push(`${nc(e.formatted)} `):e.format===`string-array`?t.push(` `):t.push(`${e.formatted.map((t,n)=>`
${nc(e.formatted)} `)}t.push(`a&&v<=s||ps,T=m>=o&&m=t+n.width)i+=n.width,c++,o++;else if(e.x>t)i+=n.width,b?a+=t-e.x:c++,o++;else if(e.x+e.width>t)i+=n.width,o++;else break}let u=0,d=0,p=0;if(typeof r==`number`)x?(d=Math.floor(e.y/r),u=d*r-e.y):d=Math.ceil(e.y/r),p=Math.ceil(e.height/r)+d,u<0&&p++;else{let t=0;for(let i=0;i`);for(let n of e){t.push(`
`),t.join(``)}function cc(e,t){let n=tc(e,t);return{textPlain:rc(n),textHtml:sc(n)}}function lc(e){let t=document.createElement(`html`);t.innerHTML=e.replace(/ /g,` `);let n=t.querySelector(`table`);if(n===null)return;let r=[n],i=[],a;for(;r.length>0;){let e=r.pop();if(e===void 0)break;if(e instanceof HTMLTableElement||e.nodeName===`TBODY`)r.push(...[...e.children].reverse());else if(e instanceof HTMLTableRowElement)a!==void 0&&i.push(a),a=[],r.push(...[...e.children].reverse());else if(e instanceof HTMLTableCellElement){let t=e.cloneNode(!0),n=t.children.length===1&&t.children[0].nodeName===`P`?t.children[0]:null,r=n?.children.length===1&&n.children[0].nodeName===`FONT`,i=t.querySelectorAll(`br`);for(let e of i)e.replaceWith(`
+`);let o=t.getAttribute(`gdg-raw-value`),s=t.getAttribute(`gdg-format`)??`string`;if(t.querySelector(`a`)!==null)a?.push({rawValue:t.querySelector(`a`)?.getAttribute(`href`)??``,formatted:t.textContent??``,format:s});else if(t.querySelector(`ol`)!==null){let e=t.querySelectorAll(`li`);a?.push({rawValue:[...e].map(e=>e.getAttribute(`gdg-raw-value`)??``),formatted:[...e].map(e=>e.textContent??``),format:`string-array`})}else if(o!==null)a?.push({rawValue:oc(o),formatted:t.textContent??``,format:s});else{let e=t.textContent??``;r&&(e=e.replace(/\n(?!\n)/g,``)),a?.push({rawValue:e??``,formatted:e??``,format:s})}}}return a!==void 0&&i.push(a),i}function uc(e,t,n,r,i){let a=e;if(r===`allowPartial`||e.current===void 0||t===void 0)return e;let o=!1;do{if(e?.current===void 0)break;let r=e.current?.range,s=[];if(r.width>2){let e=t({x:r.x,y:r.y,width:1,height:r.height},i.signal);if(typeof e==`function`)return a;s.push(...e);let n=t({x:r.x+r.width-1,y:r.y,width:1,height:r.height},i.signal);if(typeof n==`function`)return a;s.push(...n)}else{let e=t({x:r.x,y:r.y,width:r.width,height:r.height},i.signal);if(typeof e==`function`)return a;s.push(...e)}let c=r.x-n,l=r.x+r.width-1-n;for(let e of s)for(let t of e)t.span!==void 0&&(c=Math.min(t.span[0],c),l=Math.max(t.span[1],l));c===r.x-n&&l===r.x+r.width-1-n?o=!0:e={current:{cell:e.current.cell??[0,0],range:{x:c+n,y:r.y,width:l-c+1,height:r.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!o);return e}function dc(e){return e.startsWith(`"`)&&e.endsWith(`"`)&&(e=e.slice(1,-1).replace(/""/g,`"`)),e}function fc(e){let t;(function(e){e[e.None=0]=`None`,e[e.inString=1]=`inString`,e[e.inStringPostQuote=2]=`inStringPostQuote`})(t||={});let n=[],r=[],i=0,a=t.None;e=e.replace(/\r\n/g,`
`);let o=0;for(let s of e){switch(a){case t.None:s===` `||s===`
`?(r.push(e.slice(i,o)),i=o+1,s===`
`&&(n.push(r),r=[])):s===`"`&&(a=t.inString);break;case t.inString:s===`"`&&(a=t.inStringPostQuote);break;case t.inStringPostQuote:s===`"`?a=t.inString:s===` `||s===`
-`?(r.push(lc(e.slice(i,o))),i=o+1,s===`
-`&&(n.push(r),r=[]),a=t.None):a=t.None;break}o++}return i`);for(let e of n){let n=`gdg-format="${e.format}"`;e.format===`url`?t.push(` `)}return t.push(`${ic(e.formatted)} `):e.format===`string-array`?t.push(` `):t.push(`${e.formatted.map((t,n)=>`
${ic(e.formatted)} `)}t.push(`=s){o=c=s;break}if(r===n)return[-1,-1];for(i=a=r;++r