Skip to content

armgit / fx0

Public Imported from GitHub
0

A lightweight design agent built with libfx. Describe a page and an agent writes it as one HTML file.

TypeScript

Refresh screenshot capture for preview testing

Esteban Suarez90e31e913006
diff --git a/README.md b/README.md
index 96273e6..a23e32d 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@ Try it at [fx0.vercel.dev](https://fx0.vercel.dev), or clone it and make it your
- Every turn keeps its version of the design. You can reopen any of them and copy or download the HTML.
- Pick each chat's model, with its reasoning effort and fast mode. New chats start on fast Claude Opus 5.5, or on `FX0_MODEL` when it's set.
- The agent can search the web and fetch pages for reference.
+- Ask the agent to inspect its result: `screenshot_design` returns images of the published preview to the model, either the visible viewport or the full page in tiles.
- Start from one of ten `design.md` styles, or upload your own. The ten styles, and the one-line descriptions in the picker, come from VoltAgent's [awesome-design-md](https://github.com/VoltAgent/awesome-design-md), which you can browse at [getdesign.md](https://getdesign.md). Thanks to VoltAgent for publishing them.
- Type a message before you sign in. The draft, images included, waits in the tab for 15 minutes while you sign in.
- A turn stops after 64 model steps, its subagents' included, which keeps an agent stuck in a loop from running up a bill.
@@ -115,6 +116,7 @@ You can watch this happen. Open session diagnostics from the header to see the c
- Deleting a chat removes fx0's records and credential. libfx's session data expires with the World's retention.
- When no route follows a chat, its transcript catches up the next time someone opens it.
- Transcripts are never trimmed, so very long chats get slower to open.
+- Design screenshots need an fx0 tab open and visible. With no responding tab the tool reports that capture is unavailable. Full-page captures return at most eight tiles within a shared 600 KiB image budget.
## Where things are
diff --git a/lib/vendor/fast-html-to-image.ts b/lib/vendor/fast-html-to-image.ts
index 22b98e7..f242ff3 100644
--- a/lib/vendor/fast-html-to-image.ts
+++ b/lib/vendor/fast-html-to-image.ts
@@ -1,4 +1,4 @@
-// Generated by scripts/vendor-fast-html-to-image.mjs from fast-snap e896bbe. Do not edit.
+// Generated by scripts/vendor-fast-html-to-image.mjs from fast-snap 2e119bc. Do not edit.
// fast-html-to-image (patched fork), browser IIFE exposing the global FastHtmlToImage.
//
// MIT License
@@ -23,4 +23,4 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
-export const FAST_HTML_TO_IMAGE = "var FastHtmlToImage=(()=>{var Ke=Object.defineProperty;var rl=Object.getOwnPropertyDescriptor;var ll=Object.getOwnPropertyNames;var nl=Object.prototype.hasOwnProperty;var ol=(e,t)=>{for(var r in t)Ke(e,r,{get:t[r],enumerable:!0})},il=(e,t,r,l)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let n of ll(t))!nl.call(e,n)&&n!==r&&Ke(e,n,{get:()=>t[n],enumerable:!(l=rl(t,n))||l.enumerable});return e};var al=e=>il(Ke({},\"__esModule\",{value:!0}),e);var Ui={};ol(Ui,{captureNode:()=>ye,captureRegion:()=>Wi,enableIframeBridge:()=>Fi,lastCaptureTimings:()=>Y,prewarm:()=>Ii});var X=\"http://www.w3.org/2000/svg\",br=\"http://www.w3.org/1999/xhtml\",wr=\"http://www.w3.org/1999/xlink\",sl=new Set([\"matrix(0, 0, 0, 1, 0, 0)\",\"matrix(0, 0, 0, 0, 0, 0)\",\"scaleX(0)\",\"scale(0)\",\"scaleY(0)\"]),ul=new Set([\"absolute\",\"fixed\"]),cl=new Set([\"relative\",\"absolute\",\"fixed\",\"sticky\"]),xr=new Set([\"width\",\"height\",\"font-size\",\"inline-size\",\"block-size\",\"transform-origin\",\"perspective-origin\",\"box-sizing\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\"]),kr=new Set([\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\"]),$t=[\"width\",\"height\",\"inline-size\",\"block-size\"],dl=new Set([\"table\",\"thead\",\"tbody\",\"tfoot\",\"tr\",\"td\",\"th\",\"colgroup\",\"col\"]),Pt=new Set([\"table\",\"td\",\"th\"]),Ar=new Set([\"defs\",\"symbol\",\"pattern\",\"mask\",\"clipPath\",\"marker\",\"linearGradient\",\"radialGradient\",\"filter\"]),fl=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-opacity\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-dasharray\",\"stroke-dashoffset\",\"color\",\"opacity\"],ht=[\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-block-start-color\",\"border-block-end-color\",\"border-inline-start-color\",\"border-inline-end-color\",\"text-decoration-color\",\"text-emphasis-color\",\"outline-color\",\"column-rule-color\",\"-webkit-text-fill-color\",\"-webkit-text-stroke-color\"],pl=[\"fill\",\"stroke\",\"filter\",\"clip-path\",\"mask\",\"mask-image\",\"marker-start\",\"marker-mid\",\"marker-end\"],hl=new Set([\"color\",\"content\",\"direction\",\"unicode-bidi\",\"white-space\",\"text-combine-upright\"]),ml=[\"font\",\"color\",\"background\",\"margin\",\"padding\",\"border\",\"float\",\"vertical-align\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-transform\",\"text-decoration\",\"text-shadow\",\"box-shadow\",\"opacity\",\"-webkit-text\",\"initial-letter\"],vr=[\"-webkit-text-stroke-color\",\"-webkit-text-stroke-width\",\"-webkit-text-fill-color\"],gl=new Set([\"offset\",\"computedOffset\",\"easing\",\"composite\"]),yl=\"display.position.top.right.bottom.left.float.clear.box-sizing.width.height.inline-size.block-size.min-width.margin-top.margin-right.margin-bottom.margin-left.padding-top.padding-right.padding-bottom.padding-left.overflow-x.overflow-y.vertical-align.border-top-width.border-right-width.border-bottom-width.border-left-width.border-top-style.border-right-style.border-bottom-style.border-left-style.border-top-color.border-right-color.border-bottom-color.border-left-color.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.outline-color.outline-style.outline-width.outline-offset.color.background-color.transform.transform-origin.rotate.scale.perspective.perspective-origin.object-fit.object-position.appearance.color-scheme.content.font-family.font-size.font-weight.font-style.line-height.white-space.white-space-collapse.text-wrap-mode.text-align.text-transform.text-decoration-line.text-decoration-color.text-decoration-style.text-decoration-thickness.direction.unicode-bidi.writing-mode.text-orientation.list-style-type.border-spacing.table-layout.content-visibility\".split(\".\"),Nt=[\"width\",\"height\",\"inline-size\",\"block-size\",\"top\",\"right\",\"bottom\",\"left\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"transform\",\"transform-origin\",\"perspective-origin\",\"grid-template-columns\",\"grid-template-rows\"],et=[\"top\",\"right\",\"bottom\",\"left\"],Re=new Set([\"background-color\",\"background-image\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-attachment\",\"background-origin\",\"background-clip\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\"]),Ee=new Set([...et,\"transform\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\"]),bl=/%|calc\\(|var\\(|min\\(|max\\(|clamp\\(/,wl=/[\"'\\\\]|url\\(|var\\(|\\/\\*|[\\u0000-\\u0008\\u000b\\u000e-\\u001f]/i,Rt=/^(0|-?\\d*\\.?\\d+(px|em|rem|ch|ex|pt|pc|cm|mm|in|vw|vh|vmin|vmax))( (0|-?\\d*\\.?\\d+(px|em|rem|ch|ex|pt|pc|cm|mm|in|vw|vh|vmin|vmax)))*$/,Bt=new Set([\"input\",\"select\",\"textarea\",\"button\",\"option\",\"optgroup\",\"progress\",\"meter\",\"details\",\"summary\",\"dialog\",\"video\",\"audio\"]),xl=\"class.lang.dir.hidden.href.type.contenteditable.slot.part.width.height.align.valign.bgcolor.background.border.color.face.size.nowrap.cellspacing.cellpadding.hspace.vspace.char.charoff.frame.rules.start.value.reversed.colspan.rowspan.span.clear\".split(\".\"),kl=/\\[\\s*(?:[\\w-]+\\|)?([\\w-]+)/g,Al=new Set([\"cursor\",\"pointer-events\",\"touch-action\",\"user-select\",\"-webkit-user-select\",\"-webkit-user-drag\",\"-webkit-tap-highlight-color\",\"will-change\",\"caret-color\",\"-webkit-locale\",\"speak\",\"page\",\"app-region\",\"d\"]),vl=new Set([\"script\",\"style\",\"link\",\"meta\",\"noscript\",\"template\",\"title\",\"base\",\"head\",\"slot\"]),Sl=new Set([\"img\",\"video\",\"canvas\",\"iframe\",\"textarea\"]),El=new Set([\"img\",\"video\",\"canvas\",\"iframe\",\"embed\",\"object\",\"input\",\"select\",\"textarea\",\"audio\",\"progress\",\"meter\",\"svg\"]),Cl=new Set([\"serif\",\"sans-serif\",\"monospace\",\"cursive\",\"fantasy\",\"system-ui\",\"ui-serif\",\"ui-sans-serif\",\"ui-monospace\",\"ui-rounded\",\"emoji\",\"math\",\"fangsong\"]),Ml=new Set(\"color.-webkit-text-fill-color.-webkit-text-stroke-color.direction.visibility.line-height.letter-spacing.word-spacing.white-space.white-space-collapse.word-break.overflow-wrap.text-align.text-align-last.text-indent.text-transform.text-shadow.text-rendering.text-wrap.text-wrap-mode.text-wrap-style.tab-size.hyphens.quotes.border-collapse.border-spacing.caption-side.empty-cells.color-scheme.accent-color.writing-mode.text-orientation.paint-order.image-rendering.color-interpolation.fill.fill-opacity.fill-rule.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width\".split(\".\")),Be=(e,t)=>({a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d}),Tt={deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:2*Math.PI},$l=e=>{for(let t in Tt){if(!e.endsWith(t))continue;let r=Number.parseFloat(e.slice(0,-t.length));return Number.isFinite(r)?r*Tt[t]:null}return null},Pl=e=>{if(e.length===0)return[0,0,1];if(e.length===1)return e[0]===\"x\"?[1,0,0]:e[0]===\"y\"?[0,1,0]:e[0]===\"z\"?[0,0,1]:null;if(e.length!==3)return null;let t=e.map(r=>Number.parseFloat(r));return t.some(r=>!Number.isFinite(r))?null:[t[0],t[1],t[2]]},Nl=e=>{if(!e||e===\"none\")return null;let t=e.trim().split(/\\s+/),r=$l(t[t.length-1]);if(r===null)return null;let l=Pl(t.slice(0,-1));if(!l)return null;let n=Math.hypot(l[0],l[1],l[2]);if(n===0)return null;let[o,i,a]=l.map(d=>d/n),s=Math.cos(r),c=Math.sin(r),u=1-s;return{a:s+o*o*u,b:i*o*u+a*c,c:o*i*u-a*c,d:s+i*i*u}},Rl=e=>{if(!e||e===\"none\")return null;let t=e.trim().split(/\\s+/).map(r=>Number.parseFloat(r));return t.length<1||t.length>3||t.some(r=>!Number.isFinite(r))?null:{a:t[0],b:0,c:0,d:t.length>=2?t[1]:t[0]}},Bl=(e,t)=>e.slice(t+1,e.lastIndexOf(\")\")).split(\",\").map(r=>Number.parseFloat(r)),Tl=e=>{if(!e||e===\"none\")return null;let t=e.indexOf(\"(\");if(t===-1||!e.endsWith(\")\"))return null;let r=e.slice(0,t).trim(),l=Bl(e,t);if(l.some(n=>!Number.isFinite(n)))return null;if(r===\"matrix\"&&l.length===6){let[n,o,i,a]=l;return{a:n,b:o,c:i,d:a}}return r===\"matrix3d\"&&l.length===16?{a:l[0],b:l[1],c:l[4],d:l[5]}:null},Dl={a:1,b:0,c:0,d:1},tt=e=>{let t=Tl(e.transform)??Dl,r=Rl(e.scale);r&&(t=Be(r,t));let l=Nl(e.rotate);return l&&(t=Be(l,t)),t},R=e=>{if(e===void 0)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},Sr=e=>{let t=e.match(/-?\\d+(?:\\.\\d+)?px/g);return t?t.map(r=>Number.parseFloat(r)):[]},mt=e=>{if(!e||e===\"none\")return 0;let t=0,r=/([a-z-]+)\\(([^()]*(?:\\([^()]*\\)[^()]*)*)\\)/g,l=r.exec(e);for(;l;){let[,n,o]=l;if(n===\"blur\")t=Math.max(t,R(o)*3);else if(n===\"drop-shadow\"){let[i=0,a=0,s=0]=Sr(o);t=Math.max(t,Math.max(Math.abs(i),Math.abs(a))+s*1.5)}l=r.exec(e)}return t},Ll=e=>{let t=e.a*e.d-e.b*e.c;return t===0?null:{a:e.d/t,b:-e.b/t,c:-e.c/t,d:e.a/t}},Er=e=>Math.abs(e.a-1)<1e-4&&Math.abs(e.b)<1e-4&&Math.abs(e.c)<1e-4&&Math.abs(e.d-1)<1e-4,Vl=(e,t,r,l)=>{let n=1/0,o=1/0,i=-1/0,a=-1/0;e.forEach((f,m)=>{let b=t[m],p=r.get(f)?.styles[\"backdrop-filter\"]??\"\",y=Math.ceil(mt(p));n=Math.min(n,b.left-l.left-y),o=Math.min(o,b.top-l.top-y),i=Math.max(i,b.right-l.left+y),a=Math.max(a,b.bottom-l.top+y)});let s=Math.max(0,Math.floor(n)),c=Math.max(0,Math.floor(o)),u=Math.min(Math.ceil(l.width),Math.ceil(i)),d=Math.min(Math.ceil(l.height),Math.ceil(a));return{x:s,y:c,width:Math.max(1,u-s),height:Math.max(1,d-c)}},Wl=(e,t)=>{let r=[];for(let[l,n]of e){if(l===t)continue;let o=n.styles[\"backdrop-filter\"];o&&o!==\"none\"&&r.push(l)}return r},Il={a:1,b:0,c:0,d:1},Fl=(e,t,r)=>{let l=Il,n=e;for(;n;){let o=r.get(n);if(o&&(l=Be(tt({transform:o.styles.transform,rotate:o.styles.rotate,scale:o.styles.scale}),l)),n===t)break;n=n.parentElement}return l},Ul=(e,t,r,l,n,o,i)=>{let{underlayCanvas:a,ownerDocument:s,pixelRatio:c,backgroundColor:u,underlayOffsetLeftPx:d,underlayOffsetTopPx:f}=e,m=l+2*o,b=n+2*o,p=s.createElement(\"canvas\");p.width=Math.max(1,Math.round(m*c)),p.height=Math.max(1,Math.round(b*c));let y=p.getContext(\"2d\");if(!y)return null;u&&(y.fillStyle=u,y.fillRect(0,0,p.width,p.height)),y.drawImage(a,(t-d-o)*c,(r-f-o)*c,p.width,p.height,0,0,p.width,p.height);let k=s.createElement(\"canvas\");k.width=Math.max(1,Math.round(l*c)),k.height=Math.max(1,Math.round(n*c));let A=k.getContext(\"2d\");return A?(A.scale(c,c),A.filter=i,A.drawImage(p,-o,-o,m,b),k):null},Ol=(e,t,r,l,n,o,i)=>{let{ownerDocument:a,pixelRatio:s}=e,c=a.createElement(\"canvas\");c.width=Math.max(1,Math.round(n*s)),c.height=Math.max(1,Math.round(o*s));let u=c.getContext(\"2d\");return u?(u.scale(s,s),u.translate(n/2,o/2),u.transform(i.a,i.b,i.c,i.d,0,0),u.drawImage(t,-r/2,-l/2,r,l),c):null},zl=(e,t,r,l,n,o,i,a)=>{let s=e.underlayCanvas.getContext(\"2d\");s&&(s.save(),s.setTransform(e.pixelRatio,0,0,e.pixelRatio,0,0),s.translate(r-e.underlayOffsetLeftPx,l-e.underlayOffsetTopPx),s.transform(i.a,i.b,i.c,i.d,0,0),s.translate(-n/2,-o/2),s.drawImage(t,0,0,n,o),a&&a!==\"rgba(0, 0, 0, 0)\"&&a!==\"transparent\"&&(s.fillStyle=a,s.fillRect(0,0,n,o)),s.restore())},Kl=e=>{let t=new Map,r=e.rootElement.getBoundingClientRect();for(let l of e.backdropFilterElements){let n=e.snapshotByElement.get(l),o=n?.styles[\"backdrop-filter\"];if(!o||o===\"none\")continue;let i=l.getBoundingClientRect(),a=Math.round(i.width),s=Math.round(i.height);if(a<=0||s<=0)continue;let c=Fl(l,e.rootElement,e.snapshotByElement),u=Ul(e,i.left-r.left,i.top-r.top,a,s,Math.ceil(mt(o)),o);if(!u)continue;let d=u,f=a,m=s;if(!Er(c)){let b=Ll(c);if(!b)continue;let p=l instanceof HTMLElement?l.offsetWidth:0,y=l instanceof HTMLElement?l.offsetHeight:0;if(p<=0||y<=0)continue;let k=Ol(e,u,a,s,p,y,b);if(!k)continue;d=k,f=p,m=y}zl(e,d,i.left-r.left+i.width/2,i.top-r.top+i.height/2,f,m,c,n?.styles[\"background-color\"]);try{t.set(l,d.toDataURL())}catch{continue}}return t},be=e=>e.type===CSSRule.STYLE_RULE,rt=e=>\"cssRules\"in e,Cr=e=>e.type===CSSRule.IMPORT_RULE,we=(e,t)=>{try{return new URL(e,t??void 0).href}catch{return e}},oe=(e,t,r)=>{let l=(n,o)=>{for(let i of n){if(t(i,o))return!0;if(Cr(i))try{let a=i.styleSheet;if(a&&l(a.cssRules,a.href??o))return!0}catch{if(r(we(i.href,o)))return!0}else if(rt(i)&&l(i.cssRules,o))return!0}return!1};for(let n of[...e.styleSheets,...e.adoptedStyleSheets])try{if(l(n.cssRules,n.href??e.baseURI))return}catch{if(r(n.href??null))return}},Dt=new WeakMap,Ne=e=>{let t=e;for(;t!==null;){if(t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute(\"data-fhti-epoch-ignored\"))return!0;t=t.parentNode}return!1},je=e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e.localName;return t===\"style\"||t===\"link\"},jl=e=>{let t=e.target;for(;t!==null;){if(je(t))return!0;t=t.parentNode}if(e.type===\"childList\"){for(let r of e.addedNodes)if(je(r))return!0;for(let r of e.removedNodes)if(je(r))return!0}return!1},Hl=e=>{if(e.type===\"childList\"){for(let t of e.addedNodes)if(!Ne(t))return!0;for(let t of e.removedNodes)if(!Ne(t))return!0;return!1}return!Ne(e.target)},ql=e=>{let t={epoch:0,styleEpoch:0,attributeGeneration:0},r=new WeakMap,l=()=>{t.epoch++},n=c=>{c.target instanceof Node&&Ne(c.target)||t.epoch++},o=c=>{c.some(Hl)&&t.epoch++,c.some(jl)&&t.styleEpoch++;let u=!1;for(let d of c)d.type!==\"attributes\"||d.target.nodeType!==Node.ELEMENT_NODE||(u||=(t.attributeGeneration++,!0),r.set(d.target,t.attributeGeneration))},i=new MutationObserver(o);i.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0});let a={capture:!0,passive:!0};for(let c of[\"scroll\",\"input\",\"change\",\"load\",\"error\",\"toggle\"])e.addEventListener(c,n,a);let s=e.defaultView;if(s)for(let c of[\"resize\",\"hashchange\",\"popstate\"])s.addEventListener(c,l,a);return e.fonts.addEventListener(\"loadingdone\",l),{readEpochs:()=>(o(i.takeRecords()),t),attributeGenerationByElement:r}},Mr=e=>{let t=Dt.get(e);return t===void 0&&(t=ql(e),Dt.set(e,t)),t},gt=e=>Mr(e).readEpochs(),xe=e=>gt(e).epoch,Lt=e=>gt(e).styleEpoch,_l=e=>gt(e).attributeGeneration,Yl=e=>Mr(e).attributeGenerationByElement,$r=new WeakMap,me=new WeakMap,Gl=e=>{let t=me.get(e);if(!t)return!1;let r=xe(e.ownerDocument);return t.epoch===r&&t.captureCount>=1&&t.unpromotableEpoch!==r},Ql=e=>{let t=xe(e.ownerDocument),r=me.get(e);if(r&&r.epoch===t){r.captureCount++;return}me.set(e,{epoch:t,captureCount:1,unpromotableEpoch:r?.unpromotableEpoch??-1})},Xl=e=>{let t=xe(e.ownerDocument),r=me.get(e);if(r){r.unpromotableEpoch=t;return}me.set(e,{epoch:t,captureCount:0,unpromotableEpoch:t})},Zl=/:(?:hover|active|focus|target)/,Pr=e=>{if(e.filterNode||e.resolveIframeContent||e.prunedElements)return null;let t=e.clip;return`${e.scale}|${e.pixelRatio}|${e.backgroundColor??\"\"}|${e.embedFonts}|${e.bleed}|${e.timeoutMs}|`+(t?`${t.x},${t.y},${t.width},${t.height}`:\"\")},Te=e=>{let t=0;return oe(e,()=>(t++,!1),()=>!1),t},Jl=e=>{let t=!1;return oe(e,r=>be(r)&&Zl.test(r.selectorText)?(t=!0,!0):!1,()=>(t=!0,!0)),t},Nr=e=>typeof e.getAnimations!=\"function\"||e.getAnimations().length>0,en=e=>e.localName===\"input\"||e.localName===\"textarea\"||e.localName===\"select\",tn=(e,t,r,l)=>{let n=e.ownerDocument,o=n.defaultView;if(!o||n.fonts.status!==\"loaded\"||Nr(n)||e.querySelector(\"canvas,video,iframe,object,embed,animate,animateTransform,animateMotion,set\")||Jl(n))return;let i=[],a=[],s=[],c=[],u=[],d=[];for(let[f,m]of r){if(f.shadowRoot)return;i.push(f),a.push(m.scrollLeft),s.push(m.scrollTop),en(f)&&(c.push(f),u.push(f.value),d.push(f instanceof HTMLInputElement?f.checked||f.indeterminate:!1))}$r.set(e,{...l,optionsKey:t,documentEpoch:xe(n),cssRuleCount:Te(n),activeElement:n.activeElement,windowScrollX:o.scrollX,windowScrollY:o.scrollY,viewportWidthPx:o.innerWidth,viewportHeightPx:o.innerHeight,devicePixelRatio:o.devicePixelRatio,scrollElements:i,scrollLefts:a,scrollTops:s,formElements:c,formValues:u,formCheckedStates:d})},Rr=(e,t)=>{let r=$r.get(e);if(!r||r.optionsKey!==t)return null;let l=e.ownerDocument,n=l.defaultView;if(!n||xe(l)!==r.documentEpoch||l.activeElement!==r.activeElement||l.fonts.status!==\"loaded\"||n.scrollX!==r.windowScrollX||n.scrollY!==r.windowScrollY||n.innerWidth!==r.viewportWidthPx||n.innerHeight!==r.viewportHeightPx||n.devicePixelRatio!==r.devicePixelRatio||Nr(l)||Te(l)!==r.cssRuleCount)return null;let{scrollElements:o,scrollLefts:i,scrollTops:a}=r;for(let d=0;d<o.length;d++){let f=o[d];if(f.scrollLeft!==i[d]||f.scrollTop!==a[d])return null}let{formElements:s,formValues:c,formCheckedStates:u}=r;for(let d=0;d<s.length;d++){let f=s[d],m=f instanceof HTMLInputElement?f.checked||f.indeterminate:!1;if(f.value!==c[d]||m!==u[d])return null}return r},rn=(e,t,r)=>{let l=e*.2,n=t*(2/13),o=(t-n)/2,i=e-2*l,a=`<svg xmlns='${X}' width='${e}' height='${t}'><rect width='${e}' height='${t}' rx='2' fill='${r}'/><rect x='${l}' y='${o}' width='${i}' height='${n}' rx='${Math.min(2,n/2)}' fill='#ffffff'/></svg>`;return`appearance:none;-webkit-appearance:none;border:none;background-color:transparent;background-image:url(\"data:image/svg+xml,${encodeURIComponent(a)}\");background-repeat:no-repeat;background-position:center;background-size:100% 100%;`},H=e=>e.nodeType===Node.ELEMENT_NODE,W=(e,t)=>e.localName===t&&e.namespaceURI===\"http://www.w3.org/1999/xhtml\",ke=(e,t=!0)=>{let r=e.shadowRoot;if(r===null&&!t)return e.childNodes;let l=r?r.childNodes:e.childNodes,n=!1;for(let i=0;i<l.length;i+=1){let a=l[i];if(H(a)&&a.localName===\"slot\"){n=!0;break}}if(!n)return l;let o=[];for(let i of l)if(H(i)&&W(i,\"slot\")){if(i.ownerDocument.defaultView?.getComputedStyle(i)?.display===\"none\")continue;let a=i.assignedNodes({flatten:!0});a.length>0?o.push(...a):o.push(...i.childNodes)}else o.push(i);return o},ln=RegExp(\"[\\\\u0000-\\\\u0008\\\\u000B\\\\u000C\\\\u000E-\\\\u001F\\\\uFFFE\\\\uFFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?<![\\\\uD800-\\\\uDBFF])[\\\\uDC00-\\\\uDFFF]\",\"g\"),nn=/[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uFFFE\\uFFFF]/,on=/[\\uD800-\\uDFFF]/,Z=e=>!nn.test(e)&&e.isWellFormed()?e:e.replace(ln,t=>on.test(t)?\"\\uFFFD\":\"\"),He=/^[A-Za-z_][A-Za-z0-9_.-]*$/,an=e=>e.namespaceURI===null?e.name!==\"xmlns\"&&He.test(e.name):(e.prefix===null||He.test(e.prefix))&&He.test(e.localName),Vt=e=>{for(let t of[...e.attributes]){if(!an(t)){e.removeAttributeNode(t);continue}let r=Z(t.value);r!==t.value&&(t.value=r)}},Br=e=>{for(let t of e.querySelectorAll(\"script\"))t.remove();Vt(e);for(let t of e.querySelectorAll(\"*\"))Vt(t)},sn=(e,t,r)=>{let l=[];for(let n of e.split(\",\")){let[o,i]=n.trim().split(/\\s+/);if(!o)continue;let a=1;i?.endsWith(\"x\")?a=Number.parseFloat(i):i?.endsWith(\"w\")&&(a=t>0?Number.parseFloat(i)/t:1),!(!Number.isFinite(a)||a<=0)&&l.push({url:o,density:a})}return l.length===0?null:(l.sort((n,o)=>n.density-o.density),(l.find(n=>n.density>=r)??l[l.length-1]).url)},re=e=>e!==void 0&&e!==\"none\",un=e=>cl.has(e.position??\"\")||re(e.transform)||re(e.filter)||re(e[\"backdrop-filter\"])||re(e.perspective),Wt=e=>(e.scrollLeft!==0||e.scrollTop!==0)&&(e.styles[\"overflow-x\"]!==void 0&&e.styles[\"overflow-x\"]!==\"visible\"||e.styles[\"overflow-y\"]!==void 0&&e.styles[\"overflow-y\"]!==\"visible\"),cn=(e,t)=>{let r=t.snapshotByElement.get(e);if(r)for(let[l,n]of t.snapshotByElement){if(l===e||n.styles.position!==\"fixed\")continue;let o=t.cloneByElement.get(l);if(!o||!o.parentNode)continue;let i=l.getBoundingClientRect(),a=null,s=null,c=n.parentElement;for(;c&&c!==e;){let f=t.snapshotByElement.get(c);if(!f)break;if(Wt(f)||un(f.styles)){a=c,s=f;break}c=f.parentElement}let u,d;if(a&&s){let f=a.getBoundingClientRect(),m=s.styles;if(u=i.left-f.left-R(m[\"border-left-width\"]),d=i.top-f.top-R(m[\"border-top-width\"]),Wt(s)){let b=a.ownerDocument.defaultView?.getComputedStyle(a);u+=s.scrollLeft-R(b?.getPropertyValue(\"padding-left\")),d+=s.scrollTop-R(b?.getPropertyValue(\"padding-top\"))}}else{let f=e.getBoundingClientRect(),m=(r.styles.position??\"static\")!==\"static\";u=i.left-f.left-(m?R(r.styles[\"border-left-width\"]):0),d=i.top-f.top-(m?R(r.styles[\"border-top-width\"]):0)}o.setAttribute(\"style\",`${o.getAttribute(\"style\")??\"\"}position:absolute;top:${d}px;left:${u}px;right:auto;bottom:auto;margin:0;`)}},dn=(e,t)=>{let r=t.snapshotByElement.get(e);if(!r)return;let l=e.getBoundingClientRect(),n=r.styles,o=e.ownerDocument.defaultView?.getComputedStyle(e),i=l.left+R(n[\"border-left-width\"])+R(o?.getPropertyValue(\"padding-left\")),a=l.top+R(n[\"border-top-width\"])+R(o?.getPropertyValue(\"padding-top\")),s=(u,d)=>{let f=t.cloneByElement.get(u);if(!f||!f.parentNode)return;let m=u.getBoundingClientRect(),b=t.ownerDocument.createElement(\"div\"),p=[\"top\",\"right\",\"bottom\",\"left\"].map(M=>`border-${M}-width:${d.styles[`border-${M}-width`]??\"0px\"};border-${M}-style:${d.styles[`border-${M}-style`]??\"none\"};border-${M}-color:${d.styles[`border-${M}-color`]??\"currentcolor\"};`).join(\"\");b.setAttribute(\"style\",`visibility:hidden;box-sizing:border-box;display:${d.styles.display??\"block\"};${p}width:${m.width}px;height:${m.height}px;margin:${d.styles[\"margin-top\"]??\"0px\"} ${d.styles[\"margin-right\"]??\"0px\"} ${d.styles[\"margin-bottom\"]??\"0px\"} ${d.styles[\"margin-left\"]??\"0px\"};`),f.parentNode.insertBefore(b,f);let y=m.left-i+r.scrollLeft,k=m.top-a+r.scrollTop,A=u.closest(\"table\"),x=!!A&&u.ownerDocument.defaultView?.getComputedStyle(A).borderCollapse===\"collapse\",w=x?R(d.styles[\"border-top-width\"])/2:0,g=x?R(d.styles[\"border-bottom-width\"])/2:0,E=d.styles[\"box-sizing\"]===\"border-box\"?0:R(d.styles[\"padding-top\"])+R(d.styles[\"padding-bottom\"]),B=x?`height:${m.height-w-g-E}px;border-top-width:0px;border-bottom-width:0px;`:\"\";f.setAttribute(\"style\",`${f.getAttribute(\"style\")??\"\"}position:absolute;top:${k+w}px;left:${y}px;right:auto;bottom:auto;margin:0;${B}`)},c=u=>{for(let d of ke(u)){if(!H(d))continue;let f=t.snapshotByElement.get(d);if(f&&!(f.scrollLeft!==0||f.scrollTop!==0)){if(f.styles.position===\"sticky\"){s(d,f);continue}c(d)}}};c(e)},fn=(e,t,r,l)=>{let n=l.createElement(\"div\");for(n.setAttribute(\"style\",`all:unset;display:inherit;flex-direction:inherit;flex-wrap:inherit;row-gap:inherit;column-gap:inherit;align-items:inherit;align-content:inherit;justify-content:inherit;justify-items:inherit;grid-template-columns:inherit;grid-template-rows:inherit;grid-template-areas:inherit;grid-auto-flow:inherit;grid-auto-columns:inherit;grid-auto-rows:inherit;transform:translate(${-t}px,${-r}px);will-change:transform;contain:layout;`);e.firstChild;)n.appendChild(e.firstChild);e.appendChild(n)},It=e=>re(e[\"background-image\"])||e[\"background-color\"]!==void 0&&e[\"background-color\"]!==\"transparent\"&&e[\"background-color\"]!==\"rgba(0, 0, 0, 0)\",Ft=e=>e!==void 0&&e.endsWith(\"px\")&&Number.parseFloat(e)||0,pn=(e,t)=>{let r=t.styles[\"background-image\"],l=t.styles[\"background-attachment\"];if(!re(r)||l===void 0)return;let n=Ce(r),o=Ce(l);if(n.length!==o.length)return;let i=o.some((d,f)=>n[f]!==\"none\"&&d===\"local\"),a=o.some((d,f)=>n[f]!==\"none\"&&d!==\"local\");if(!i||a)return;let s=Ce(t.styles[\"background-position-x\"]??\"0%\"),c=Ce(t.styles[\"background-position-y\"]??\"0%\");if(s.length!==n.length||c.length!==n.length)return;let u=(d,f)=>d.map((m,b)=>n[b]===\"none\"?m:`calc(${m} - ${f}px)`).join(\", \");e.style.setProperty(\"background-position-x\",u(s,t.scrollLeft),\"important\"),e.style.setProperty(\"background-position-y\",u(c,t.scrollTop),\"important\")},hn=(e,t,r,l,n)=>{let o=t.ownerDocument,i=o.body,a=i?l.snapshotByElement.get(i):void 0;if(!a||It(r.styles)||!It(a.styles))return;let s=a.styles,c=s[\"background-image\"]??\"none\",u=t.getBoundingClientRect(),d=re(c)&&c.includes(\"gradient(\")&&!c.includes(\"url(\"),f=d?`${u.width}px ${u.height}px`:s[\"background-size\"]??\"auto\",m=o.createElement(\"div\");m.setAttribute(\"style\",`position:absolute;z-index:-1;left:0px;top:0px;width:${n.width}px;height:${n.height}px;pointer-events:none;background-color:${s[\"background-color\"]??\"transparent\"};background-image:${c};background-repeat:${s[\"background-repeat\"]??\"repeat\"};background-size:${f};background-position-x:${Ft(s[\"background-position-x\"])-n.x}px;background-position-y:${Ft(s[\"background-position-y\"])-n.y}px;`),e.insertBefore(m,e.firstChild);let b=l.cloneByElement.get(i);b&&b.style.setProperty(\"background\",\"none\",\"important\")},mn=(e,t)=>{let r=t.ownerDocument.createElement(\"div\"),l=e.ownerDocument.defaultView.getComputedStyle(e),n=\"display:inline-block;overflow:hidden;white-space:pre-wrap;box-sizing:content-box;\";for(let o of[\"top\",\"right\",\"bottom\",\"left\"])n+=`border-${o}-width:${l.getPropertyValue(`border-${o}-width`)};border-${o}-style:${l.getPropertyValue(`border-${o}-style`)};border-${o}-color:${l.getPropertyValue(`border-${o}-color`)};padding-${o}:${l.getPropertyValue(`padding-${o}`)};`;return r.setAttribute(\"style\",n),r},Ce=e=>{let t=[],r=0,l=\"\";for(let n of e)n===\"(\"?r++:n===\")\"&&r--,n===\",\"&&r===0?(t.push(l.trim()),l=\"\"):l+=n;return t.push(l.trim()),t},lt=/^[A-Za-z_][A-Za-z0-9_.-]*$/,Tr=new Set([\"class\",\"style\",\"srcset\",\"sizes\",\"loading\",\"slot\"]),gn=new Set([\"input\",\"select\",\"option\",\"textarea\"]),Me=new Map,yn=e=>{if(!e.hasAttributes())return!0;let t=e.attributes.length;if(t>2)return!1;let r=+!!e.hasAttribute(\"class\");return e.hasAttribute(\"style\")&&(r+=1),r===t},Ut=new Map,bn=e=>{let t=Ut.get(e);return t===void 0&&(t=lt.test(e),Ut.set(e,t)),t},Dr=e=>e.namespaceURI===null?e.name!==\"xmlns\"&&bn(e.name):(e.prefix===null||lt.test(e.prefix))&&lt.test(e.localName),wn=e=>{let t=e.attributes;for(let r=t.length-1;r>=0;r--){let l=t[r];if(Tr.has(l.name)||!Dr(l)){e.removeAttributeNode(l);continue}let n=Z(l.value);n!==l.value&&(l.value=n)}},Ot=(e,t)=>{let r=e.namespaceURI===\"http://www.w3.org/1999/xhtml\"&&e.prefix===null?t.createElement(e.localName):t.createElementNS(e.namespaceURI,e.prefix===null?e.localName:`${e.prefix}:${e.localName}`),l=e.attributes;for(let n=0;n<l.length;n++){let o=l[n];Tr.has(o.name)||!Dr(o)||r.setAttributeNS(o.namespaceURI,o.name,Z(o.value))}return r},xn=e=>e.namespaceURI===\"http://www.w3.org/2000/svg\"&&Ar.has(e.localName),kn=e=>{for(let t of fl)e.hasAttribute(t)&&e.removeAttribute(t)},An=e=>{let t=e.cloneNode(!1);if(!H(t))return null;let r=e.currentSrc||e.src;if(!r&&e.srcset){let l=sn(e.srcset,e.offsetWidth,e.ownerDocument.defaultView?.devicePixelRatio??1);l&&(r=we(l,e.baseURI))}return r&&t.setAttribute(\"src\",r),t},vn=(e,t)=>{let r=t.createElement(\"img\");r.setAttribute(\"width\",String(e.width)),r.setAttribute(\"height\",String(e.height));try{r.setAttribute(\"src\",e.toDataURL())}catch{r.setAttribute(\"src\",\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\")}return r},Sn=(e,t,r)=>{let l=t.createElement(\"img\"),n=\"\";if(e.videoWidth>0&&e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){let o=t.createElement(\"canvas\");o.width=e.videoWidth,o.height=e.videoHeight;let i=o.getContext(\"2d\");if(i)try{i.drawImage(e,0,0),n=o.toDataURL()}catch{n=\"\"}l.setAttribute(\"width\",String(e.videoWidth)),l.setAttribute(\"height\",String(e.videoHeight)),o.width=0,o.height=0}return n||=e.poster||\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\",l.setAttribute(\"src\",n),l.setAttribute(\"style\",`object-fit:${r[\"object-fit\"]??\"contain\"};object-position:${r[\"object-position\"]??\"50% 50%\"};`),l},En=(e,t,r)=>{if(W(e,\"input\")){if(t.setAttribute(\"value\",e.value),e.checked?t.setAttribute(\"checked\",\"\"):t.removeAttribute(\"checked\"),e.type===\"checkbox\"&&e.indeterminate){let l=r[\"accent-color\"];t.setAttribute(\"style\",rn(R(r.width),R(r.height),l&&l!==\"auto\"?l:\"rgb(0, 117, 255)\"))}}else W(e,\"option\")&&(e.selected?t.setAttribute(\"selected\",\"\"):t.removeAttribute(\"selected\"))},Cn=(e,t)=>(e===void 0||e===\"visible\")&&(t===void 0||t===\"visible\"),Mn=(e,t)=>{let r=t.ownerDocument.createElement(\"div\"),l=t.iframeContentByElement.get(e);if(l){let n=l.canvasBackgroundColor?`background:${l.canvasBackgroundColor};`:\"\";r.setAttribute(\"style\",`overflow:hidden;${n}`);let o=t.ownerDocument.createElement(\"img\");o.setAttribute(\"src\",l.pngDataUrl),o.setAttribute(\"style\",`display:block;width:${l.widthPx}px;height:${l.heightPx}px;`),r.appendChild(o)}else r.setAttribute(\"style\",\"background:#d9d9d9;\");return r},pe=(e,t,r,l)=>{if(H(t)){let n=Lr(t,r,l);n&&e.appendChild(n)}else t.nodeType===Node.TEXT_NODE&&e.appendChild(r.ownerDocument.createTextNode(Z(t.textContent??\"\")))},$n=(e,t)=>e.ownerDocument.compatMode===\"BackCompat\"&&[\"block\",\"list-item\",\"table-cell\",\"table-caption\",\"flow-root\",\"inline-block\"].includes(t.snapshotByElement.get(e)?.styles.display??\"\"),Pn=(e,t,r)=>{let l=[],n=!1,o=!1,i=()=>{if(l.length>0)if(n&&!o){let a=r.ownerDocument.createElement(\"span\");a.setAttribute(\"style\",\"display:block;line-height:0\"),e.appendChild(a);for(let s of l)pe(a,s,r,!1)}else for(let a of l)pe(e,a,r,!1);l=[],n=!1,o=!1};for(let a=t.firstChild;a!==null;a=a.nextSibling)if(H(a)){let s=r.snapshotByElement.get(a)?.styles.display;s===void 0||s===\"none\"?l.push(a):s.startsWith(\"inline\")?(n||=W(a,\"img\"),o||=!W(a,\"img\"),l.push(a)):(i(),pe(e,a,r,!1))}else a.nodeType===Node.TEXT_NODE&&(l.push(a),o||=!/^\\s*$/.test(a.textContent??\"\"));i()},Lr=(e,t,r=!1)=>{if(xn(e)){let p=e.cloneNode(!0);return H(p)?(Br(p),p):null}let l=t.snapshotByElement.get(e);if(!l)return null;let n=e.namespaceURI===\"http://www.w3.org/1999/xhtml\"&&e.prefix===null,o=n?e.localName:\"\",i,a=!0,s=!1;if(o===\"iframe\"&&W(e,\"iframe\"))i=Mn(e,t),a=!1;else if(o===\"canvas\"&&W(e,\"canvas\"))i=vn(e,t.ownerDocument),a=!1;else if(o===\"video\"&&W(e,\"video\"))i=Sn(e,t.ownerDocument,l.styles),a=!1;else if(o===\"img\"&&W(e,\"img\"))i=An(e),i&&wn(i),a=!1;else if(o===\"textarea\")i=l.scrollTop!==0||l.scrollLeft!==0?mn(e,t):Ot(e,t.ownerDocument),a=!1;else if(n&&!gn.has(o)&&yn(e)){let p=t.classNameByElement.get(e)??\"\",y=t.inlineCarryTextByElement.get(e)??\"\";if(p===\"\"&&y===\"\")i=t.ownerDocument.createElement(e.localName);else{let k=`${e.localName}|${p}|${y}`,A=Me.get(k);A===void 0&&(A=t.ownerDocument.createElement(e.localName),p!==\"\"&&A.setAttribute(\"class\",p),y!==\"\"&&A.setAttribute(\"style\",y),Me.size>=4096&&Me.clear(),Me.set(k,A));let x=A.cloneNode(!1);i=H(x)?x:null,s=!0}}else i=Ot(e,t.ownerDocument);if(!i)return null;t.prunedElements?.has(e)&&(a=!1),(o===\"input\"||o===\"option\")&&En(e,i,l.styles);let c=s?void 0:t.inlineCarryTextByElement.get(e);if(c!==void 0){let p=i.getAttribute(\"style\");i.setAttribute(\"style\",p?c+p:c)}let u=s?void 0:t.classNameByElement.get(e);if(u&&(n?i.className=u:(i.setAttribute(\"class\",u),e.namespaceURI===\"http://www.w3.org/2000/svg\"&&kn(i))),o===\"textarea\"&&W(e,\"textarea\")&&(i.textContent=Z(e.value)),t.cloneByElement.set(e,i),a){let p=r||!!e.shadowRoot,y=e.firstChild;if(!p&&y!==null&&y===e.lastChild&&y.nodeType===Node.TEXT_NODE)i.textContent=Z(y.textContent??\"\");else if(p)for(let k of ke(e,p))pe(i,k,t,p);else if($n(e,t))Pn(i,e,t);else for(let k=e.firstChild;k!==null;k=k.nextSibling)pe(i,k,t,!1)}let d=t.viewportScroll&&e===e.ownerDocument.documentElement?t.viewportScroll:null,f=d?d.x:l.scrollLeft,m=d?d.y:l.scrollTop,b=(f!==0||m!==0)&&(d!==null||!Cn(l.styles[\"overflow-x\"],l.styles[\"overflow-y\"]));return b&&(fn(i,f,m,t.ownerDocument),dn(e,t)),d?hn(i,e,l,t,d):b&&pn(i,l),i},Nn=(e,t)=>{let r=Lr(e,t);return r&&cn(e,t),r},se=e=>{let t=new Map;return{get:r=>t.get(r),set:(r,l)=>{if(!t.has(r)&&t.size>=e){let n=t.keys().next().value;n!==void 0&&t.delete(n)}t.set(r,l)},delete:r=>{t.delete(r)}}},zt=new Map,ge=e=>{let t=zt.get(e);if(t!==void 0)return t;let r=e.startsWith(\"--\")||e.includes(\"animation\")||e.includes(\"transition\")||e.startsWith(\"view-timeline\")||e.startsWith(\"scroll-timeline\")||Al.has(e);return zt.set(e,r),r},Rn=new Set([\"width\",\"height\",\"inline-size\",\"block-size\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"top\",\"right\",\"bottom\",\"left\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\"]),ae=(e,t)=>{if(!Rn.has(e)||t===void 0||!t.endsWith(\"px\"))return t;let r=Number.parseFloat(t);if(!Number.isFinite(r)||r===0)return t;let l=32*10**(Math.floor(Math.log10(Math.abs(r)))-5);if(!(l<.5))return t;let n=r*64,o=Math.round(n);return o!==n&&Math.abs(n-o)<=l?`${o/64}px`:t},qe=[],Q=(e,t,r=!1)=>{let l={};if(t)for(let n of t){let o=ae(n,e.getPropertyValue(n));o!==\"\"&&(l[n]=o)}else if(r){if(!qe.length)for(let n=0;n<e.length;n++){let o=e.item(n);ge(o)||qe.push(o)}for(let n of qe)l[n]=ae(n,e.getPropertyValue(n))}else for(let n=0;n<e.length;n++){let o=e.item(n);ge(o)||(l[o]=ae(o,e.getPropertyValue(o)))}for(let n of vr){if(l[n]!==void 0)continue;let o=ae(n,e.getPropertyValue(n));o&&(l[n]=o)}return l},Kt=new Map,Vr=(e,t)=>{let r=Kt.get(t);if(r===void 0){r=[];for(let n=0;n<e.length;n++){let o=e.item(n);ge(o)||t(o)&&r.push(o)}Kt.set(t,r)}let l={};for(let n of r)l[n]=e.getPropertyValue(n);for(let n of vr){if(l[n]!==void 0||!t(n))continue;let o=e.getPropertyValue(n);o&&(l[n]=o)}return l},jt=se(256),Bn=(e,t,r)=>{let l=e.namespaceURI===\"http://www.w3.org/2000/svg\"?\"svg|\":\"\",n=W(e,\"input\")?`|${e.type}`:\"\";return`${l}${e.localName}${n}|${t??\"\"}|${r??\"\"}`},Tn=e=>{let t=null,r=()=>{if(!t){let l=e.createElement(\"iframe\");l.setAttribute(\"style\",\"position:absolute;left:-9999px;top:0;visibility:hidden;width:64px;height:64px;border:0;\"),l.setAttribute(\"aria-hidden\",\"true\"),l.setAttribute(\"data-fhti-epoch-ignored\",\"\"),(e.body??e.documentElement).appendChild(l),t=l}return t.contentDocument};return{getBaseline:(l,n,o)=>{let i=o[\"font-size\"],a=o.appearance===\"auto\"?o[\"color-scheme\"]:void 0,s=a&&a!==\"normal\"?a:\"\",c=Bn(l,n,s?`${i??\"\"}|color-scheme:${s}`:i),u=jt.get(c);if(u)return u;let d=r(),f=d?.body,m=d?.defaultView;if(!d||!f||!m)return{};let b,p;if(l.namespaceURI===\"http://www.w3.org/2000/svg\"){let A=d.createElementNS(X,\"svg\");b=d.createElementNS(X,l.localName),A.appendChild(b),p=A}else b=d.createElement(l.localName),W(l,\"input\")&&b.setAttribute(\"type\",l.type),b.textContent=\" \",p=b;(i||s)&&b.setAttribute(\"style\",`${i?`font-size:${i};`:\"\"}${s?`color-scheme:${s};`:\"\"}`),f.appendChild(p);let y=[];for(let A in o)y.push(A);let k=Q(m.getComputedStyle(b,n??void 0),y);return s&&(k[\"color-scheme\"]=\"normal\"),p.remove(),jt.set(c,k),k},dispose:()=>{t?.remove(),t=null}}},yt=e=>Ml.has(e)||e.startsWith(\"font\")||e.startsWith(\"text-emphasis\")||e.startsWith(\"list-style\")||e.startsWith(\"-webkit-text\"),Ht=new Set(ht.filter(e=>e.includes(\"border\"))),bt=({styles:e,baseline:t,parentStyles:r,parentEmittedStyles:l})=>{let n={},o=e.appearance===\"auto\";for(let s in e){let c=e[s];if(c!==void 0){if(c!==t[s]){n[s]=c;continue}xr.has(s)&&!(o&&kr.has(s))&&(n[s]=c)}}let i=e.color,a=o&&e[\"color-scheme\"]!==t[\"color-scheme\"];for(let s of ht){let c=e[s];if(c===void 0)continue;let u=o&&Ht.has(s)&&c===t[s];(a&&Ht.has(s)?u:c===i||u)?delete n[s]:n[s]=c}if(l&&r)for(let s in l){if(s in n||!yt(s))continue;let c=e[s];c!==void 0&&c!==r[s]&&(n[s]=c)}return n},Wr=(e,t,r,l)=>{let n=t.appearance===\"auto\";for(let o of l){let i=t[o];if(i===void 0){delete e[o];continue}if(i!==r[o]){e[o]=i;continue}xr.has(o)&&!(n&&kr.has(o))?e[o]=i:delete e[o]}},Dn=e=>e.every(t=>!yt(t)&&!ht.includes(t)&&t!==\"appearance\"&&t!==\"color\"&&t!==\"font-size\"),Ie=(e,t)=>{e[\"transform-origin\"]!==void 0&&(t.transform??\"none\")===\"none\"&&(t.rotate??\"none\")===\"none\"&&(t.scale??\"none\")===\"none\"&&delete e[\"transform-origin\"],e[\"perspective-origin\"]!==void 0&&(t.perspective??\"none\")===\"none\"&&delete e[\"perspective-origin\"],t[\"writing-mode\"]===\"horizontal-tb\"&&(e[\"inline-size\"]!==void 0&&e[\"inline-size\"]===e.width&&delete e[\"inline-size\"],e[\"block-size\"]!==void 0&&e[\"block-size\"]===e.height&&delete e[\"block-size\"])},Ir=e=>e.startsWith(\"font\")||hl.has(e),Ln=e=>Ir(e)||e===\"line-height\",Vn=(e,t)=>{if(!e)return null;let r=null;for(let l in e){if(!Ir(l)&&l!==\"line-height\")continue;let n=e[l];n!==void 0&&n!==(l===\"content\"?\"normal\":t[l])&&(r??={},r[l]=n)}return r},Fe=(e,t,r,l,n)=>{if(!l&&t.display===\"inline\")for(let a of $t)delete e[a];if(n!==null&&dl.has(n)){let a=e.width??t.width,s=n===\"table\"&&(t.float??\"none\")!==\"none\",c=Pt.has(n)&&(t[\"writing-mode\"]??\"horizontal-tb\")!==\"horizontal-tb\"&&t.height!==void 0&&t.height!==\"auto\";for(let f of $t)s&&f===\"width\"||n===\"tr\"&&f===\"height\"||delete e[f];c&&(e.height=t.height);let u=t[\"min-width\"],d=u!==void 0&&u!==\"auto\"&&u!==\"0px\";Pt.has(n)&&a&&!d&&(e[\"min-width\"]=a)}if(((t[\"column-count\"]??\"auto\")!==\"auto\"||(t[\"column-width\"]??\"auto\")!==\"auto\")&&e.height!==void 0&&!(parseFloat(t[\"min-height\"])>0)){let a=e.height;e[\"min-height\"]=a,delete e.height,e[\"block-size\"]===a&&delete e[\"block-size\"]}let o=r!==null&&r.includes(\"flex\"),i=r!==null&&r.includes(\"grid\");o&&(e[\"flex-grow\"]=\"0\",e[\"flex-shrink\"]=\"0\",e[\"flex-basis\"]=\"auto\"),(o||i)&&t[\"min-width\"]===\"auto\"&&(e[\"min-width\"]=\"0px\")},Wn=(e,t)=>{if(e[\"margin-top\"]=\"0px\",e[\"margin-right\"]=\"0px\",e[\"margin-bottom\"]=\"0px\",e[\"margin-left\"]=\"0px\",e.right=\"auto\",e.bottom=\"auto\",delete e[\"margin-block-start\"],delete e[\"margin-block-end\"],delete e[\"margin-inline-start\"],delete e[\"margin-inline-end\"],delete e[\"inset-block-start\"],delete e[\"inset-block-end\"],delete e[\"inset-inline-start\"],delete e[\"inset-inline-end\"],t.contentOffsetLeftPx!==0||t.contentOffsetTopPx!==0)e.position=\"relative\",e.left=`${t.contentOffsetLeftPx}px`,e.top=`${t.contentOffsetTopPx}px`;else{e.top=\"auto\",e.left=\"auto\";let l=e.position;(l===\"fixed\"||l===\"absolute\"||l===\"sticky\")&&(e.position=\"relative\")}let r=t.rootLinearTransform;if(r){let{a:l,b:n,c:o,d:i}=r;e.transform=`matrix(${l}, ${n}, ${o}, ${i}, 0, 0)`,e[\"transform-origin\"]=\"0px 0px\"}else e.transform&&=\"none\";e.rotate&&=\"none\",e.scale&&=\"none\",e.translate&&=\"none\",e.float&&=\"none\",e.clear&&=\"none\",e[\"box-sizing\"]=\"border-box\",e.width=`${t.layoutWidthPx}px`,e.height=`${t.layoutHeightPx}px`,delete e[\"inline-size\"],delete e[\"block-size\"]},In=/\\/\\*[\\s\\S]*?\\*\\//g,Fn=e=>{let t=e.replace(In,\"\"),r=[],l=0;for(;l<t.length;){let n=t.indexOf(\"@font-face\",l);if(n===-1)break;let o=t.indexOf(\"{\",n);if(o===-1)break;let i=t.indexOf(\"}\",o);if(i===-1)break;r.push(`@font-face{${t.slice(o+1,i)}}`),l=i+1}return r},Fr=3e3,Ur=async(e,t)=>{let r=new AbortController,l=setTimeout(()=>r.abort(),t),n=setTimeout(()=>r.abort(),Math.min(t,Fr));try{let o=await fetch(e,{mode:\"cors\",cache:\"force-cache\",signal:r.signal});return clearTimeout(n),o.ok?await o.text():null}catch{return null}finally{clearTimeout(l),clearTimeout(n)}},Or=e=>e.type===CSSRule.FONT_FACE_RULE,wt=e=>e?e.split(\",\").map(t=>t.trim().replace(/^[\"']|[\"']$/g,\"\").toLowerCase()).filter(t=>t.length>0&&!Cl.has(t)):[],zr=e=>{let t=e.trim().toLowerCase();return t===\"\"||t===\"auto\"||t===\"normal\"?\"normal\":t===\"italic\"?\"italic\":t===\"oblique\"||t.startsWith(\"oblique \")?\"oblique\":null},Un={normal:400,bold:700},qt=e=>{let t=Un[e];if(t!==void 0)return t;let r=Number(e);return Number.isFinite(r)&&r>=1&&r<=1e3?r:null},Kr=e=>{let t=e.trim().toLowerCase();if(t===\"\"||t===\"auto\")return{minWeight:400,maxWeight:400};let r=t.split(/\\s+/);if(r.length>2)return null;let l=qt(r[0]);if(l===null)return null;if(r.length===1)return{minWeight:l,maxWeight:l};let n=qt(r[1]);return n===null?null:{minWeight:Math.min(l,n),maxWeight:Math.max(l,n)}},On=/url\\(\\s*(?:\"((?:\\\\.|[^\"\\\\])*)\"|'((?:\\\\.|[^'\\\\])*)'|([^'\"()\\s][^()]*?))\\s*\\)/g,zn=e=>e.replace(/\\\\(.)/g,\"$1\"),Kn=e=>e.replace(/([\"\\\\])/g,\"\\\\$1\"),jn=e=>{let t=e[3];return t===void 0?zn(e[1]??e[2]??\"\"):t},xt=async(e,t)=>{let r=[...e.matchAll(On)];if(r.length===0)return e;let l=await Promise.all(r.map(i=>t(jn(i)))),n=\"\",o=0;return r.forEach((i,a)=>{let s=i.index??0;n+=`${e.slice(o,s)}url(\"${Kn(l[a]??\"\")}\")`,o=s+i[0].length}),n+=e.slice(o),n},Hn={normal:[\"normal\",\"oblique\",\"italic\"],italic:[\"italic\",\"oblique\",\"normal\"],oblique:[\"oblique\",\"italic\",\"normal\"]},_e=(e,t)=>t>=e.minWeight&&t<=e.maxWeight?0:t<e.minWeight?e.minWeight-t:t-e.maxWeight,_t=(e,t)=>e.minWeight>t,qn=(e,t,r)=>{let l=e.filter(u=>_e(t[u],r)===0);if(l.length>0)return l;let n=e.filter(u=>!_t(t[u],r)),o=e.filter(u=>_t(t[u],r)),i=u=>{let d=1/0;for(let f of u)d=Math.min(d,_e(t[f],r));return u.filter(f=>_e(t[f],r)===d)},a=r>500,s=a?o:n,c=a?n:o;if(r>=400&&r<=500){let u=o.filter(d=>t[d].minWeight<=500);return u.length>0?i(u):n.length>0?i(n):i(o)}return s.length>0?i(s):i(c)},_n=(e,t)=>{let r=new Set,l=e.map((n,o)=>o);for(let n of t){let o=[];for(let i of Hn[n.styleKeyword])if(o=l.filter(a=>e[a].styleKeyword===i),o.length>0)break;if(o.length!==0)for(let i of qn(o,e,n.weight))r.add(i)}return r},Yn=e=>{if(typeof e.toBase64==\"function\")return e.toBase64();let t=\"\";for(let r=0;r<e.length;r+=32768)t+=String.fromCharCode(...e.subarray(r,r+32768));return btoa(t)},nt=async e=>{let t=new Uint8Array(await e.arrayBuffer());return`data:${e.type||\"application/octet-stream\"};base64,${Yn(t)}`},Gn=async(e,t)=>{let r=new AbortController,l=setTimeout(()=>r.abort(),t),n=setTimeout(()=>r.abort(),Math.min(t,Fr));try{let o=await fetch(e,{mode:\"cors\",cache:\"force-cache\",signal:r.signal});return clearTimeout(n),o.ok?await nt(await o.blob()):null}catch{return null}finally{clearTimeout(l),clearTimeout(n)}},Yt=se(150),Ye=new Map,jr=0,Qn=()=>jr,le=(e,t)=>{let r=Yt.get(e);if(r!==void 0)return Promise.resolve(r);let l=`${t}:${e}`,n=Ye.get(l);if(n)return n;let o=Gn(e,t).then(i=>(Ye.delete(l),i!==null&&(jr++,Yt.set(e,i)),i));return Ye.set(l,o),o},Xn=/font-family\\s*:\\s*([^;}]+)/i,Zn=/font-weight\\s*:\\s*([^;}]+)/i,Jn=/font-style\\s*:\\s*([^;}]+)/i,eo=/font-stretch\\s*:\\s*([^;}]+)/i,to=/unicode-range\\s*:\\s*([^;}]+)/i,ro=/font-variation-settings\\s*:/i,lo=e=>{let t=e.trim().toLowerCase();return t===\"\"||t===\"normal\"||t===\"auto\"},no=e=>{let t={ruleSources:[],inaccessibleSheetUrls:[]};return oe(e,(r,l)=>(Or(r)&&t.ruleSources.push({rule:r,baseUrl:l}),!1),r=>(r&&t.inaccessibleSheetUrls.push(r),!1)),t},oo=(e,t,r)=>xt(e,async l=>l.startsWith(\"data:\")?l:await le(we(l,t),r)??l),Hr=(e,t,r,l,n,o,i,a)=>{let s=Kr(l),c=zr(n);return{familyName:e,fontFaceCssText:t,baseUrl:r,weightRange:s,styleKeyword:c,unicodeRangeKey:i.trim().toLowerCase().replace(/\\s+/g,\"\"),isPrunable:s!==null&&c!==null&&lo(o)&&!a}},io=async(e,t,r)=>{let l=await Ur(e,r);if(!l)return[];let n=[];for(let o of Fn(l)){let[i]=wt(Xn.exec(o)?.[1]);!i||!t.has(i)||/url\\(|local\\(/.test(o)&&n.push(Hr(i,o,e,Zn.exec(o)?.[1]??\"\",Jn.exec(o)?.[1]??\"\",eo.exec(o)?.[1]??\"\",to.exec(o)?.[1]??\"\",ro.test(o)))}return n},ao=e=>{let t=new Set;for(let r of e)for(let l of[r.baseStyles,r.beforeStyles,r.afterStyles,r.firstLetterStyles,r.markerStyles])if(l)for(let n of wt(l[\"font-family\"]))t.add(n);return t},so=e=>{let t=new Set([400,700]),r=new Set([\"normal\",\"italic\"]);for(let n of e)for(let o of[n.baseStyles,n.beforeStyles,n.afterStyles,n.firstLetterStyles,n.markerStyles]){if(!o)continue;let i=o[\"font-weight\"];if(i!==void 0){let s=Kr(i);if(s===null||s.minWeight!==s.maxWeight)return null;t.add(s.minWeight)}let a=o[\"font-style\"];if(a!==void 0){let s=zr(a);if(s===null)return null;r.add(s)}}let l=[];for(let n of t)for(let o of r)l.push({weight:n,styleKeyword:o});return l},uo=(e,t)=>{if(t===null)return e;let r=new Set;for(let o of e)o.isPrunable||r.add(o.familyName);let l=new Map;e.forEach((o,i)=>{if(r.has(o.familyName))return;let a=`${o.familyName}\\0${o.unicodeRangeKey}`,s=l.get(a);s===void 0?l.set(a,[i]):s.push(i)});let n=new Set;for(let o of l.values()){let i=o.map(a=>{let s=e[a];return{minWeight:s.weightRange?.minWeight??400,maxWeight:s.weightRange?.maxWeight??400,styleKeyword:s.styleKeyword??\"normal\"}});for(let a of _n(i,t))n.add(o[a])}return e.filter((o,i)=>r.has(o.familyName)||n.has(i))},co=async(e,t,r,l=null)=>{if(e.size===0)return\"\";let{ruleSources:n,inaccessibleSheetUrls:o}=no(t),i=[];for(let{rule:c,baseUrl:u}of n){let[d]=wt(c.style.getPropertyValue(\"font-family\"));if(!d||!e.has(d))continue;let f=c.cssText;/url\\(|local\\(/.test(f)&&i.push(Hr(d,f,u,c.style.getPropertyValue(\"font-weight\"),c.style.getPropertyValue(\"font-style\"),c.style.getPropertyValue(\"font-stretch\"),c.style.getPropertyValue(\"unicode-range\"),c.style.getPropertyValue(\"font-variation-settings\")!==\"\"))}let a=await Promise.all(o.map(c=>io(c,e,r))),s=uo(i.concat(...a),l);return(await Promise.all(s.map(c=>oo(c.fontFaceCssText,c.baseUrl,r)))).filter(c=>c.length>0).join(`\n`)},kt=e=>{let t=e.defaultView,r=e.documentElement;return!t||!r?null:[t.getComputedStyle(r).backgroundColor,e.body?t.getComputedStyle(e.body).backgroundColor:\"\"].find(l=>l&&l!==\"rgba(0, 0, 0, 0)\")??null},qr=e=>typeof e==\"object\"&&!!e,fo=e=>{if(!qr(e))return null;let{type:t,requestId:r,pixelRatio:l}=e;return t!==\"fast-html-to-image:iframe-capture-request\"||typeof r!=\"string\"||r.length===0||typeof l!=\"number\"||!Number.isFinite(l)||l<=0?null:{type:t,requestId:r,pixelRatio:l}},po=e=>{if(!qr(e))return null;let{type:t,requestId:r,pngDataUrl:l,widthPx:n,heightPx:o,backgroundColor:i}=e;return t!==\"fast-html-to-image:iframe-capture-response\"||typeof r!=\"string\"||r.length===0||typeof l!=\"string\"||!l.startsWith(\"data:image/\")||typeof n!=\"number\"||!Number.isFinite(n)||n<=0||typeof o!=\"number\"||!Number.isFinite(o)||o<=0||i!==null&&typeof i!=\"string\"?null:{type:t,requestId:r,pngDataUrl:l,widthPx:n,heightPx:o,backgroundColor:i}},ho=(e,t)=>{let r=e.contentWindow;if(!r)return Promise.resolve(null);let l=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;return new Promise(n=>{let o=c=>{window.clearTimeout(a),window.removeEventListener(\"message\",i),n(c)},i=c=>{if(c.source!==r)return;let u=po(c.data);!u||u.requestId!==l||o({pngDataUrl:u.pngDataUrl,widthPx:u.widthPx,heightPx:u.heightPx,canvasBackgroundColor:u.backgroundColor})},a=window.setTimeout(()=>o(null),2e3);window.addEventListener(\"message\",i);let s={type:\"fast-html-to-image:iframe-capture-request\",requestId:l,pixelRatio:t};r.postMessage(s,\"*\")})},mo=e=>{let t=!1,r=l=>{let n=fo(l.data),o=l.source;!n||!o||t||(t=!0,e(n.pixelRatio).then(i=>{o.postMessage({type:\"fast-html-to-image:iframe-capture-response\",requestId:n.requestId,pngDataUrl:i.pngDataUrl,widthPx:i.widthPx,heightPx:i.heightPx,backgroundColor:kt(document)},{targetOrigin:\"*\"})}).catch(()=>{}).finally(()=>{t=!1}))};return window.addEventListener(\"message\",r),()=>window.removeEventListener(\"message\",r)},Ge=e=>e.length>0&&!e.startsWith(\"data:\")&&!e.startsWith(\"#\")&&!e.startsWith(\"about:\"),ot=(e,t)=>{let r=e.matches(t)?[e]:[];return r.push(...e.querySelectorAll(t)),r},go=e=>{let t=new Map;for(let n of ot(e,\"img\")){let o=n.getAttribute(\"src\");o&&o.length>=1024&&o.startsWith(\"data:\")&&(t.get(o)??t.set(o,[]).get(o)).push(n)}let r=\"\",l=0;for(let[n,o]of t){if(o.length<2)continue;let i=`fhti-img-${++l}`;r+=`img.${i}{content:url(\"${n.replace(/[\\\\\"]/g,a=>`\\\\${a}`)}\")}\n`;for(let a of o)a.classList.add(i),a.setAttribute(\"src\",\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\")}return r},yo=async(e,t,r)=>{let l=[];for(let n of ot(e,\"img\")){let o=n.getAttribute(\"src\");!o||!Ge(o)||l.push(le(o,r).then(i=>{n.setAttribute(\"src\",i??\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\")}))}for(let n of ot(e,\"image\")){let o=n.getAttribute(\"href\")??n.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\");!o||!Ge(o)||l.push(le(o,r).then(i=>{let a=i??\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\";n.setAttribute(\"href\",a),n.hasAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\")&&n.setAttributeNS(wr,\"xlink:href\",a)}))}for(let n of t)for(let o of[n.baseStyles,n.beforeStyles,n.afterStyles,n.firstLetterStyles,n.markerStyles])if(o)for(let i in o){let a=o[i];a===void 0||!a.includes(\"url(\")||(n.cachedBlocks=null,l.push(xt(a,async s=>Ge(s)?await le(s,r)??\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\":s).then(s=>{o[i]=s})))}await Promise.allSettled(l)},Gt=/url\\(\\s*[\"']?#([^\"')\\s]+)[\"']?\\s*\\)/g,bo=e=>e.getAttribute(\"href\")??e.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\"),Qt=(e,t)=>{e.id&&t.add(e.id);for(let r of e.querySelectorAll(\"[id]\"))t.add(r.id)},wo=(e,t)=>{let r=e.matches(t)?[e]:[];return r.push(...e.querySelectorAll(t)),r},xo=async({clone:e,rules:t,sourceDocument:r,timeoutMs:l})=>{let n=new Set;Qt(e,n);let o=new Set,i=[],a=new Map,s=(p,y)=>{n.has(p)||o.has(p)||(o.add(p),i.push({fragmentId:p,lookupDocuments:y}))},c=(p,y,k)=>{for(let x of wo(p,\"use\")){let w=bo(x);if(w){if(w.startsWith(\"#\"))s(w.slice(1),y);else if(k&&w.includes(\"#\")){let[g,E]=w.split(\"#\");if(!E)continue;let B=we(g,r.baseURI),M=a.get(B)??[];M.push({fragmentId:E,useElement:x}),a.set(B,M)}}}let A=x=>{if(x.namespaceURI===\"http://www.w3.org/2000/svg\"){for(let w of x.attributes)if(w.value.includes(\"url(\"))for(let g of w.value.matchAll(Gt))s(g[1],y)}};A(p);for(let x of p.querySelectorAll(\"*\"))A(x)},u=null,d=()=>{if(u)return u;let p=e.ownerDocument,y=p.createElementNS(X,\"svg\");return y.setAttribute(\"aria-hidden\",\"true\"),y.setAttribute(\"style\",\"position:absolute;width:0;height:0;overflow:hidden;\"),u=p.createElementNS(X,\"defs\"),y.appendChild(u),e.appendChild(y),u},f=()=>{for(;i.length>0;){let p=i.pop();if(!p)break;if(n.has(p.fragmentId))continue;let y=null;for(let A of p.lookupDocuments){let x=A.getElementById(p.fragmentId);if(x&&x.namespaceURI===\"http://www.w3.org/2000/svg\"){y=x;break}}if(!y)continue;let k=y.cloneNode(!0);H(k)&&(Br(k),d().appendChild(k),Qt(k,n),c(k,p.lookupDocuments,!1))}};c(e,[r],!0);for(let p of t){let y=[p.baseStyles,p.beforeStyles,p.afterStyles,p.firstLetterStyles];for(let k of y)if(k)for(let A of pl){let x=k[A];if(!(x===void 0||!x.includes(\"url(\")))for(let w of x.matchAll(Gt))s(w[1],[r])}}f();let m=[...a],b=await Promise.all(m.map(([p])=>Ur(p,l)));for(let p=0;p<m.length;p++){let y=m[p][1],k=b[p];if(k===null)continue;let A=new DOMParser().parseFromString(k,\"image/svg+xml\");if(!A.querySelector(\"parsererror\")){for(let{fragmentId:x,useElement:w}of y)s(x,[A,r]),w.setAttribute(\"href\",`#${x}`),w.hasAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\")&&w.setAttributeNS(wr,\"xlink:href\",`#${x}`);f()}}},ne=e=>e.namespaceURI===br,ko=new Set([\"block\",\"list-item\",\"flex\",\"grid\",\"table\"]),At=e=>{let t=e.position;return t!==\"absolute\"&&t!==\"fixed\"&&(e.float===void 0||e.float===\"none\")},Ao=(e,t)=>{if(ne(e)&&e.style.paddingBottom!==\"\"){let r=e.ownerDocument.defaultView?.getComputedStyle(e);return R(r?.getPropertyValue(\"padding-bottom\"))}return R(t[\"padding-bottom\"])},vo=(e,t)=>{let r=t.display;return r!==\"block\"&&r!==\"list-item\"||!At(t)||t[\"overflow-x\"]!==\"visible\"||t[\"overflow-y\"]!==\"visible\"||R(t[\"border-bottom-width\"])!==0?!1:Ao(e,t)===0},So=e=>At(e)&&e.display!==void 0&&ko.has(e.display),Eo=(e,t,r)=>{let l=new Map,n=new Set,o=a=>{let s=ke(a);for(let c=s.length-1;c>=0;c--){let u=s[c];if(u.nodeType===Node.COMMENT_NODE)continue;if(u.nodeType===Node.TEXT_NODE){if(/\\S/.test(u.textContent??\"\"))return null;continue}if(!H(u))continue;let d=t.get(u);if(d&&d.styles.display!==\"none\"&&At(d.styles))return u}return null},i=a=>{let s=l.get(a);if(s!==void 0)return s;l.set(a,0);let c=t.get(a);if(!c||!vo(a,c.styles)||c.scrollTop!==0||c.scrollLeft!==0)return 0;let u=o(a);if(!u)return 0;let d=t.get(u);if(!d||!So(d.styles))return 0;let f=Math.max(R(d.styles[\"margin-bottom\"]),i(u));if(f<=0)return 0;let m=a.getBoundingClientRect().bottom,b=u.getBoundingClientRect().bottom;return Math.abs(m-b)>.6?0:(l.set(a,f),f)};for(let[a,s]of t){if(a===e)continue;let c=s.styles.display;if(c!==\"block\"&&c!==\"list-item\"||a.firstElementChild===null&&!a.shadowRoot)continue;let u=i(a);if(u<=0||u<=R(s.styles[\"margin-bottom\"]))continue;let d=r.get(a);d&&(r.set(a,{...d,\"margin-bottom\":`${u}px`}),n.add(a))}return n},De=e=>{if(e.parentElement)return e.parentElement;let t=e.parentNode;return t instanceof ShadowRoot?t.host:null},Xt=(e,t,r)=>({layoutWidthPx:e,layoutHeightPx:t,outputWidthPx:e+2*r,outputHeightPx:t+2*r,contentOffsetLeftPx:r,contentOffsetTopPx:r,rootLinearTransform:null}),Co=({rootElement:e,rootStyles:t,defaultView:r,layoutWidthPx:l,layoutHeightPx:n,bleedPx:o})=>{if(!ne(e))return Xt(l,n,o);let i=tt({transform:t.transform,rotate:t.rotate,scale:t.scale}),a=De(e);for(;a;){let A=r.getComputedStyle(a);i=Be(tt({transform:A.getPropertyValue(\"transform\"),rotate:A.getPropertyValue(\"rotate\"),scale:A.getPropertyValue(\"scale\")}),i),a=De(a)}if(Er(i))return Xt(l,n,o);let{a:s,b:c,c:u,d}=i,f=[0,s*l,u*n,s*l+u*n],m=[0,c*l,d*n,c*l+d*n],b=Math.floor(Math.min(...f)),p=Math.floor(Math.min(...m)),y=Math.ceil(Math.max(...f)),k=Math.ceil(Math.max(...m));return{layoutWidthPx:l,layoutHeightPx:n,outputWidthPx:Math.max(1,y-b)+2*o,outputHeightPx:Math.max(1,k-p)+2*o,contentOffsetLeftPx:-b+o,contentOffsetTopPx:-p+o,rootLinearTransform:i}},Mo=[137,80,78,71,13,10,26,10],fe=null,$o=()=>{if(fe!==null)return fe;fe=new Uint32Array(256);for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;fe[e]=t}return fe},Po=(e,t,r)=>{let l=$o(),n=4294967295;for(let o=t;o<r;o++)n=l[(n^e[o])&255]^n>>>8;return(n^4294967295)>>>0},Qe=(e,t)=>{let r=new Uint8Array(12+t.length),l=new DataView(r.buffer);l.setUint32(0,t.length);for(let n=0;n<4;n++)r[4+n]=e.charCodeAt(n);return r.set(t,8),l.setUint32(8+t.length,Po(r,4,8+t.length)),r},No=(e,t,r)=>{let l=t*4,n=new Uint8Array((l+1)*r),o=0;for(let i=0;i<r;i++)o++,n.set(e.subarray(i*l,(i+1)*l),o),o+=l;return n},Ro=(e,t,r)=>{let l=new Uint8Array((t*3+1)*r),n=0,o=0;for(let i=0;i<r;i++){l[o++]=0;for(let a=0;a<t;a++){if(e[n+3]!==255)return null;l[o]=e[n],l[o+1]=e[n+1],l[o+2]=e[n+2],n+=4,o+=3}}return l},Bo=async e=>{let t=new CompressionStream(\"deflate\"),r=new Response(new Blob([e]).stream().pipeThrough(t));return new Uint8Array(await r.arrayBuffer())},To=async e=>{let t=e.getContext(\"2d\");if(t===null)throw Error(\"Could not acquire a 2d canvas context\");let{width:r,height:l}=e,n=t.getImageData(0,0,r,l),o=Ro(n.data,r,l),i=await Bo(o??No(n.data,r,l)),a=new Uint8Array(13),s=new DataView(a.buffer);return s.setUint32(0,r),s.setUint32(4,l),a[8]=8,a[9]=o===null?6:2,new Blob([new Uint8Array(Mo),Qe(\"IHDR\",a),Qe(\"IDAT\",i),Qe(\"IEND\",new Uint8Array)],{type:\"image/png\"})},Le=()=>typeof CSS<\"u\"&&CSS.supports(\"-webkit-hyphenate-limit-after\",\"1\"),_r=(e,t,r)=>{let l=e.toDataURL(t,r);if(!l.startsWith(`data:${t};base64,`))throw Error(`canvas could not encode ${t}`);let n=atob(l.slice(l.indexOf(\",\")+1)),o=new Uint8Array(n.length);for(let i=0;i<n.length;i++)o[i]=n.charCodeAt(i);return new Blob([o],{type:t})},Zt=async e=>_r(e,\"image/png\"),Do=e=>Le()&&typeof CompressionStream<\"u\"?To(e).catch(()=>Zt(e)):Zt(e),Lo=async(e,t)=>_r(e,\"image/jpeg\",t),Vo={\"%\":\"%25\",\"#\":\"%23\",\"\\r\":\"%0D\",\"\\n\":\"%0A\",\"\t\":\"%09\"},Wo=e=>`data:image/svg+xml;charset=utf-8,${e.replace(/[%#\\r\\n\\t]/g,t=>Vo[t])}`,Io=()=>typeof CSS<\"u\"&&CSS.supports(\"-webkit-app-region\",\"none\"),it=async(e,t)=>{if(!t)return e;t.throwIfAborted();let r,l=new Promise((n,o)=>{let i=()=>o(t.reason);t.addEventListener(\"abort\",i,{once:!0}),r=()=>t.removeEventListener(\"abort\",i)});try{return await Promise.race([e,l])}finally{r?.()}},Fo=async e=>{for(let t=0;t<e;t++)await new Promise(r=>{let l,n=requestAnimationFrame(()=>{clearTimeout(l),r()});l=setTimeout(()=>{cancelAnimationFrame(n),r()},100)})},Y={snapshotMs:0,iframesMs:0,backdropMs:0,buildMs:0,inlineMs:0,serializeMs:0,decodeMs:0,rasterMs:0,encodeMs:0},Jt=se(2),Xe=se(2),er=null,at=!1,tr=()=>at?null:(er??=document.createElement(\"canvas\"),at=!0,er),rr=()=>{at=!1},st=(e,t,r,l,n=null)=>{let o=Wo(e),i=e.includes(\"data:image\")||e.includes(\"background-clip:text\"),a=()=>{let b=Xe.get(o);if(b)return b;let p=(async()=>{let y=performance.now(),k=new Image;return k.decoding=\"sync\",k.src=o,await k.decode(),!Io()&&i&&await Fo(2),Y.decodeMs=performance.now()-y,k})();return Xe.set(o,p),p.catch(()=>{Xe.delete(o)}),p},s=n?Math.max(1,Math.ceil(n.width)):t,c=n?Math.max(1,Math.ceil(n.height)):r,u=async(b,p)=>{let y=await it(a(),l.abortSignal),k=performance.now(),A=l.scale*l.pixelRatio,x=Math.ceil(s*A),w=Math.ceil(c*A),g=Math.min(1,16384/Math.max(1,x),16384/Math.max(1,w)),E=Math.max(1,Math.floor(x*g)),B=Math.max(1,Math.floor(w*g)),M=b.getContext(\"2d\",Le()?{willReadFrequently:!0}:void 0);if(!M)throw Error(\"Could not acquire a 2d canvas context\");b.width!==E||b.height!==B?(b.width=E,b.height=B):(M.setTransform(1,0,0,1,0,0),M.clearRect(0,0,E,B));let P=l.backgroundColor??p;return P&&(M.fillStyle=P,M.fillRect(0,0,E,B)),M.scale(A*g,A*g),n&&M.translate(-n.x,-n.y),M.drawImage(y,0,0,t,r),Y.rasterMs=performance.now()-k,b},d=()=>u(document.createElement(\"canvas\")),f=()=>{let b=n?`${n.x},${n.y},${n.width},${n.height}`:\"\",p=`${l.scale}|${l.pixelRatio}|${l.backgroundColor??\"\"}|${t}|${r}|${b}`,y=Jt.get(e),k=y?.get(p);if(k)return k;let A=tr(),x=u(A??document.createElement(\"canvas\")).then(async g=>{let E=performance.now(),B=await Do(g);return Y.encodeMs=performance.now()-E,B}).finally(()=>{A!==null&&rr()});y===void 0&&(y=new Map,Jt.set(e,y));let w=y;return w.set(p,x),x.catch(()=>{w.delete(p)}),x},m=async(b=.92)=>{let p=tr();try{let y=await u(p??document.createElement(\"canvas\"),\"#ffffff\"),k=performance.now(),A=await Lo(y,b);return Y.encodeMs=performance.now()-k,A}finally{p!==null&&rr()}};return{width:s,height:c,toSvgDataUrl:()=>Promise.resolve(o),toCanvas:d,toBlob:f,toJpegBlob:m,toPngDataUrl:async()=>nt(await f()),toJpegDataUrl:async b=>nt(await m(b))}},Uo=({clone:e,cssText:t,width:r,height:l,clip:n,ownerDocument:o})=>{let i=o.createElementNS(X,\"svg\");i.setAttribute(\"width\",String(n?n.width:r)),i.setAttribute(\"height\",String(n?n.height:l)),i.setAttribute(\"viewBox\",n?`${n.x} ${n.y} ${n.width} ${n.height}`:`0 0 ${r} ${l}`);let a=o.createElementNS(X,\"style\");a.textContent=`*{scrollbar-width:none}\n*::-webkit-scrollbar{display:none}\nforeignObject>div{-webkit-text-size-adjust:100%!important}\n${t}`;let s=o.createElementNS(X,\"foreignObject\");s.setAttribute(\"width\",String(r)),s.setAttribute(\"height\",String(l));let c=o.createElementNS(br,\"div\");return c.setAttribute(\"style\",`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${r}px;height:${l}px;`),c.appendChild(e),s.appendChild(c),i.appendChild(a),i.appendChild(s),Z(new XMLSerializer().serializeToString(i))},ut=e=>e.length>0&&!e.startsWith(\"data:\")&&!e.startsWith(\"#\")&&!e.startsWith(\"about:\"),lr=(e,t,r)=>{e.includes(\"url(\")&&xt(e,l=>{if(!l.startsWith(\"data:\")){let n=we(l,t);ut(n)&&le(n,r)}return Promise.resolve(l)})},Oo=(e,t)=>{for(let r of e.querySelectorAll(\"img\")){let l=r.getAttribute(\"src\");l&&ut(l)&&le(l,t)}for(let r of e.querySelectorAll(\"image\")){let l=r.getAttribute(\"href\")??r.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\");l&&ut(l)&&le(l,t)}for(let r of e.querySelectorAll('[style*=\"url(\"]'))lr(r.getAttribute(\"style\")??\"\",null,t);oe(e.ownerDocument,(r,l)=>((Or(r)||be(r))&&lr(r.cssText,l,t),!1),()=>!1)},zo=(e,t,r)=>Re.has(e)&&t!==\"\"&&r===\"\"&&!t.includes(\"url(\")&&!t.includes(\"var(\"),Ko=(e,t,r)=>{let l=e.getPropertyValue(\"backdrop-filter\")!==\"\"||e.getPropertyValue(\"-webkit-backdrop-filter\")!==\"\",n=\"\",o=\"\",i=\"\";for(let a=0;a<e.length;a++){let s=e.item(a);if(t.has(s))continue;let c=e.getPropertyValue(s),u=e.getPropertyPriority(s),d=`|${s}:${c}!${u}`;i+=d,!l&&zo(s,c,u)?(n+=`${s}:${c};`,o+=`|~${s}`):o+=d}return r?.includes(\"var(\")&&(o+=`|style=${r}`,i+=`|style=${r}`),{carryText:Z(n),descriptorWithCarry:o,descriptorPlain:i,registryFeed:null}},Yr=[\"margin-top\",\"margin-left\"],nr=new WeakMap;function jo(e){let t=[],r=l=>{for(let n of l)if(n.selectorText!==void 0){let o=n.style;[\"margin\",\"margin-top\",\"margin-left\",\"margin-block-start\",\"margin-inline-start\"].some(i=>/\\bauto\\b/.test(o.getPropertyValue(i)))&&t.push(n.selectorText)}else n.cssRules&&r(n.cssRules)};for(let l of e.styleSheets)try{r(l.cssRules)}catch{}return t}function Ho(e,t,r){let l=nr.get(r);if(l===void 0&&(l=jo(e.ownerDocument),nr.set(r,l)),!l.some(o=>{try{return e.matches(o)}catch{return!1}}))return[];let n=[];for(let o of Yr){if(t.getPropertyValue(o)!==\"0px\")continue;let i=e.getBoundingClientRect(),a=e.getAttribute(\"style\");e.style.setProperty(o,\"0px\",\"important\");let s=e.getBoundingClientRect();a===null?e.removeAttribute(\"style\"):e.setAttribute(\"style\",a),(Math.abs(s.top-i.top)>.5||Math.abs(s.left-i.left)>.5)&&n.push(o)}return n}function qo(e,t,r){if(typeof e.computedStyleMap!=\"function\")return Ho(e,t,r);let l=e.computedStyleMap();return Yr.filter(n=>t.getPropertyValue(n)===\"0px\"&&String(l.get(n))===\"auto\")}function _o(e,t,r,l){let n=l.getComputedStyle(e);if(n.display===\"none\")return null;let o=null;if(t!==null&&(r.get(t)?.styles.display??\"\").includes(\"grid\")&&(n.getPropertyValue(\"margin-top\")===\"0px\"||n.getPropertyValue(\"margin-left\")===\"0px\")&&e.getClientRects().length>0)for(let i of qo(e,n,r))(o??={})[i]=\"auto\";if(/flex/.test(n.display)&&n.flexWrap.startsWith(\"wrap\")&&n.flexDirection.startsWith(\"row\")){let i=[...e.children].filter(a=>{let s=l.getComputedStyle(a),c=a.getBoundingClientRect();return s.display!==\"none\"&&s.position!==\"absolute\"&&s.position!==\"fixed\"&&c.width>0&&c.height>0});if(i.length>1){let a=i[0].getBoundingClientRect().top;i.every(s=>Math.abs(s.getBoundingClientRect().top-a)<.5)&&((o??={})[\"flex-wrap\"]=\"nowrap\")}}return o}var Yo=null,or=new Map,ct=e=>{let t=or.get(e);if(t!==void 0)return t;let r=Yo??=document.createElement(\"span\").style;r.setProperty(e,\"initial\");let l=r.length>1?Array.from({length:r.length},(n,o)=>r.item(o)):[e];return r.cssText=\"\",or.set(e,l),l},Go=null,$e=new Map,Qo=e=>{let t=`${e.propertyName}:${e.propertyValue}`,r=$e.get(t);if(r!==void 0)return r.length===0||r[0].isImportant===e.isImportant?r:r.map(o=>({...o,isImportant:e.isImportant}));let l=Go??=document.createElement(\"span\").style;l.cssText=t;let n=[];for(let o=0;o<l.length;o++){let i=l.item(o);n.push({propertyName:i,propertyValue:l.getPropertyValue(i),isImportant:e.isImportant})}return l.cssText=\"\",$e.size>=4096&&$e.clear(),$e.set(t,n),n},Xo=(e,t)=>{let r=!1,l=[];for(let s of e){let c=s.propertyName;(c===\"backdrop-filter\"||c===\"-webkit-backdrop-filter\")&&(r=!0);for(let u of ct(c))l.push([u,s.propertyValue])}let n=\"\",o=\"\",i=\"\",a=(s,c)=>{let u=s.isImportant?\"important\":\"\",d=`|${s.propertyName}:${s.propertyValue}!${u}`;i+=d,c?(n+=`${s.propertyName}:${s.propertyValue};`,o+=`|~${s.propertyName}`):o+=d};for(let s of e){let c=ct(s.propertyName),u=!0,d=!0;for(let m of c)t.has(m)||(u=!1),Re.has(m)||(d=!1);if(u)continue;let f=!s.isImportant&&!r;if(c.length>1&&!d){for(let m of Qo(s))t.has(m.propertyName)||a(m,f&&Re.has(m.propertyName));continue}a(s,f&&d)}return{carryText:n,descriptorWithCarry:o,descriptorPlain:i,registryFeed:l}},Gr=e=>{if(wl.test(e))return null;let t=[],r=e.length,l=0;for(;l<=r;){let n=e.indexOf(\";\",l);n===-1&&(n=r);let o=e.slice(l,n);l=n+1;let i=o.indexOf(\":\");if(i===-1){if(o.trim()!==\"\")return null;continue}let a=o.slice(0,i).trim().toLowerCase();if(a===\"\"||a.startsWith(\"--\"))return null;let s=o.slice(i+1).trim(),c=!1;s.includes(\"!\")&&/!\\s*important$/i.test(s)&&(c=!0,s=s.slice(0,s.lastIndexOf(\"!\")).trim()),s!==\"\"&&t.push({propertyName:a,propertyValue:s,isImportant:c})}return t},Zo=(e,t,r)=>{let l=e.localName,n=e.attributes,o=t===null||e.shadowRoot!==null;for(let i=0;i<n.length;i++){let a=n[i],s=a.name;s!==\"style\"&&(!o&&!t.has(s)||(l+=`|${s}=${a.value}`))}return l+r},Jo=e=>\"style\"in e&&e.style instanceof CSSStyleDeclaration,ei=e=>{let t=new Set,r=[],l=(i,a)=>{let s=`${i}|${a}`;t.has(s)||(t.add(s),r.push([i,a]))},n=new Set,o=i=>{let a=i.getAttribute(\"style\");if(a===null||n.has(a))return;n.add(a);let s=Gr(a);if(s!==null){for(let u of s)for(let d of ct(u.propertyName))l(d,u.propertyValue);return}if(!Jo(i))return;let c=i.style;for(let u=0;u<c.length;u++){let d=c.item(u);l(d,c.getPropertyValue(d))}};o(e);for(let i of e.querySelectorAll(\"[style]\"))o(i);return r},Qr=e=>El.has(e.localName),ti=e=>sl.has(e.transform??\"\")&&ul.has(e.position??\"\"),ri=new Set([\"top\",\"right\",\"bottom\",\"left\"]),li=new Set([\"width\",\"height\"]),ni=e=>{let t=e.includes(\"display\"),r=e.includes(\"position\");return e.map(l=>l===\"inline-size\"?1:l===\"block-size\"?2:l===\"transform-origin\"?3:l===\"perspective-origin\"?4:!t&&(l===\"grid-template-columns\"||l===\"grid-template-rows\")?5:!r&&ri.has(l)?6:!t&&li.has(l)?7:0)},vt=(e,t,r,l,n=null,o=!1)=>{for(let i=0;i<r.length;i++){if(n!==null&&n[i])continue;let a=l[i];if(a!==0){if(a===1){if(e[\"writing-mode\"]===\"horizontal-tb\"){e[\"inline-size\"]=e.width;continue}}else if(a===2){if(e[\"writing-mode\"]===\"horizontal-tb\"){e[\"block-size\"]=e.height;continue}}else if(a===3){if(e.transform===\"none\")continue}else if(a===4){if((e.perspective??\"none\")===\"none\")continue}else if(a===6){if((e.position??\"static\")===\"static\")continue}else if(a===7){if(o&&e.display===\"inline\")continue;let d=r[i],f=d===\"width\"?t.width:t.height,m=f===\"\"?void 0:ae(d,f);e[d]!==m&&(e[d]=m);continue}else if(!(e.display??\"\").includes(\"grid\"))continue}let s=r[i],c=ae(s,t.getPropertyValue(s)),u=c===\"\"?void 0:c;e[s]!==u&&(e[s]=u)}},oi=e=>{let t=0,r={definesBeforeAfter:!1,definesFirstLetter:!1,definesMarker:!1},l=()=>(r.definesBeforeAfter=!0,r.definesFirstLetter=!0,r.definesMarker=!0,!0);return oe(e,n=>{if(t++,t>1e3)return l();if(be(n)){let o=n.selectorText;(o.includes(\":before\")||o.includes(\":after\"))&&(r.definesBeforeAfter=!0),o.includes(\":first-letter\")&&(r.definesFirstLetter=!0),o.includes(\":marker\")&&(r.definesMarker=!0)}return r.definesBeforeAfter&&r.definesFirstLetter&&r.definesMarker},l),r},ir=(e,t,r,l)=>{let n=r.getComputedStyle(e,t),o=n.getPropertyValue(\"content\");if(o===\"\"||o===\"none\"||o===\"normal\")return null;let i=Q(n,l);return i.content=o,i},ar=(e,t,r,l,n,o,i)=>{if(!o)return null;let a=r.getComputedStyle(e,t),s=Object.create(o);return vt(s,a,l,n,i,!0),s},sr=(e,t,r,l,n,o,i,a)=>{let s=r.getComputedStyle(e,t),c=s.getPropertyValue(\"content\");if(c===\"\"||c===\"none\"||c===\"normal\")return null;if(!i){let d=Q(s,l);return d.content=c,d}let u=Object.create(i);return vt(u,s,n,o,a,!0),u.content=c,u},ii=(e,t)=>e.firstChild?Vr(t.getComputedStyle(e,\"::first-letter\"),Zr):null,ai=(e,t)=>{let r=t.getComputedStyle(e,\"::marker\"),l=Vr(r,Ln),n=r.getPropertyValue(\"content\");return n&&(l.content=n),l},si=e=>e instanceof CSSKeyframesRule,ui=e=>\"containerName\"in e||\"start\"in e,ci=/::?(?:before|after|first-letter|first-line|marker|selection|placeholder|backdrop|root|-webkit-[a-z-]+)\\b/g,di=/[[+~:]/,fi=e=>!di.test(e.replace(ci,\"\")),Xr=e=>{let t=[],r={counterCss:\"\",placeholder:!1,fileButton:!1,firstLine:!1,sliderThumb:!1,thumbRules:[]};return oe(e,l=>{if(l.type===CSSRule.COUNTER_STYLE_RULE||l.type===CSSRule.FONT_FEATURE_VALUES_RULE)return t.push(l.cssText),!1;if(be(l)){let n=l.selectorText;if(n.includes(\"::placeholder\")&&(r.placeholder=!0),n.includes(\"::file-selector-button\")&&(r.fileButton=!0),n.includes(\"::first-line\")&&(r.firstLine=!0),n.includes(\"::-webkit-slider-thumb\")){r.sliderThumb=!0;let o=[];for(let i of Ve(n)){let a=i.indexOf(\"::-webkit-slider-thumb\");a!==-1&&o.push(i.slice(0,a).trim())}o.length>0&&r.thumbRules.push({bases:o,style:l.style})}}return!1},()=>!1),r.counterCss=t.join(`\n`),r},pi=[\"font-family\",\"font-size\",\"font-style\",\"font-variant\",\"font-variant-caps\",\"font-weight\",\"font-stretch\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-synthesis\",\"line-height\",\"color\",\"background-color\",\"background-image\",\"letter-spacing\",\"word-spacing\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-transform\",\"text-shadow\",\"text-emphasis-color\",\"-webkit-text-fill-color\",\"-webkit-text-stroke-color\",\"-webkit-text-stroke-width\"],hi=(e,t,r)=>{let l=null,n=(o,i)=>(l??={})[o]=i;if(r.placeholder&&(W(e,\"input\")||W(e,\"textarea\"))&&n(\"::placeholder\",Q(t.getComputedStyle(e,\"::placeholder\"),null)),r.fileButton&&W(e,\"input\")&&e.type===\"file\"&&n(\"::file-selector-button\",Q(t.getComputedStyle(e,\"::file-selector-button\"),null)),r.firstLine&&n(\"::first-line\",Q(t.getComputedStyle(e,\"::first-line\"),pi)),r.sliderThumb&&W(e,\"input\")&&e.type===\"range\"){let o=null;for(let i of r.thumbRules)i.bases.some(a=>{try{return e.matches(a===\"\"?\"*\":a)}catch{return!1}})&&(o=Object.assign(o??{},Q(i.style,null)));o!==null&&n(\"::-webkit-slider-thumb\",o)}return l},mi=(e,t,r,l)=>{let n=bt({styles:r,baseline:e.getBaseline(t,l,r),parentStyles:null,parentEmittedStyles:null});return Fe(n,r,null,!1,null),Ie(n,r),n},gi=(e,t,r,l)=>{if(!r)return null;let n=null;for(let o in r){let i=r[o],a;if(o===\"::-webkit-slider-thumb\")a=i;else if(o===\"::first-line\"){a={};for(let s in i)i[s]!==l[s]&&(a[s]=i[s])}else a=mi(e,t,i,o);Object.keys(a).length>0&&((n??={})[o]=a)}return n},ur=(e,t)=>{let r=\"\";for(let l in t){let n=G(t[l]);n&&(r+=`\n.${e}${l}{${n}}`)}return r},Pe=null,cr=new Map,yi=e=>{let t=cr.get(e);if(t!==void 0)return t;Pe??=document.createElement(\"span\").style,Pe.setProperty(e,\"initial\");let r=Pe.length>1;return Pe.cssText=\"\",cr.set(e,r),r},bi=e=>e===\"cssFloat\"?\"float\":e===\"cssOffset\"?\"offset\":e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),wi=(e,t)=>{let r=new Set,l=new Set(xl),n=h=>{if(h.includes(\"#\")&&l.add(\"id\"),h.includes(\"[\"))for(let S of h.matchAll(kl))l.add(S[1].toLowerCase())},o=[],i=!0,a=!0,s=!0,c=!1,u=new Set,d=new Set,f=new Map,m=(h,S)=>{let C=S!==void 0&&!S.includes(\":\")?S:null;if(!d.has(h)){d.add(h),c&&(i=!1),f.set(h,C===null?null:[C]);return}let $=f.get(h);if($==null){f.set(h,null);return}C===null?f.set(h,null):$.push(C)},b=h=>d.has(h)&&f.get(h)===null,p=(h,S,C)=>{if(h===\"position\"){if(S!==\"static\")for(let T of et)m(T,C);return}if(h===\"transition-property\"){for(let T of Ee)(S.includes(\"all\")||S.includes(T))&&m(T,C);return}if(h===\"transform\"){if(b(\"transform\"))return;bl.test(S)&&m(\"transform\",C);return}if(Ee.has(h)){if(b(h))return;Rt.test(S)||m(h,C);return}let $=[\"margin-\",\"padding-\",\"inset\"].find(T=>h.startsWith(T));if($!==void 0&&!Rt.test(S)){let T=$===\"inset\"?\"\":$;for(let q of Ee)(T===\"\"?et.includes(q):q.startsWith(T))&&m(q,C)}},y=h=>{r.has(h)||(r.add(h),!ge(h)&&o.push(h))},k=h=>{if(ge(h)){h.startsWith(\"--\")&&(i=!1);return}yt(h)||yi(h)?i=!1:u.has(h)||(c&&(i=!1),u.add(h),d.add(h),f.set(h,null)),y(h)},A=(h,S)=>{a&&h===\"content\"&&(S.includes(\"attr(\")||S.includes(\"counter\"))&&(a=!1),p(h,S),s&&(h===\"backdrop-filter\"||h===\"-webkit-backdrop-filter\")&&(s=!1),y(h)},x=(h,S)=>{for(let C=0;C<h.length;C++){let $=h.item(C);if(a&&$===\"content\"){let T=h.getPropertyValue(\"content\");(T.includes(\"attr(\")||T.includes(\"counter\"))&&(a=!1)}p($,h.getPropertyValue($),S),s&&($===\"backdrop-filter\"||$===\"-webkit-backdrop-filter\"||S!==void 0&&Re.has($)&&h.getPropertyPriority($)===\"important\")&&(s=!1),y($)}},w=h=>{if(be(h))i&&!fi(h.selectorText)&&(i=!1),n(h.selectorText),x(h.style,h.selectorText);else if(si(h))for(let S of h.cssRules){if(!(S instanceof CSSKeyframeRule))continue;let C=S.style;for(let $=0;$<C.length;$++)k(C.item($))}else rt(h)&&ui(h)&&(i=!1)},g=()=>{if(typeof e.getAnimations==\"function\")for(let h of e.getAnimations()){let S=h.effect;if(!(S instanceof KeyframeEffect)){i=!1;continue}for(let C of S.getKeyframes())for(let $ in C)gl.has($)||k(bi($))}};for(let h of yl)y(h);let E=!1;if(oe(e,h=>(w(h),!1),()=>(E=!0,!0)),E)return null;if(g(),t!==null)for(let[h,S]of t)A(h,S);c=!0;let B=[...Nt.filter(h=>r.has(h)&&(!Ee.has(h)||d.has(h))),...[...u].filter(h=>!Nt.includes(h))],M=h=>{x(h)},P=h=>{for(let S of h)if(w(S),Cr(S)){let C=S.styleSheet;C&&P(C.cssRules)}else rt(S)&&P(S.cssRules)};return{propertyNames:o,styleRelevantAttributeNames:l,perElementPropertyNames:B,getUnstableSelectorList:h=>f.get(h)??null,isStyleMemoSafe:()=>i,isPseudoContentMemoSafe:()=>a,addInlineStyleProps:M,addParsedInlineDeclaration:A,addShadowRootStyleProps:h=>{for(let S of[...h.styleSheets,...h.adoptedStyleSheets])try{P(S.cssRules)}catch{return!1}return!0},isInlineCarrySafe:()=>s}},xi=e=>e.namespaceURI===\"http://www.w3.org/2000/svg\"&&Ar.has(e.localName),Ze=new WeakMap,Je=new WeakMap,ki=e=>typeof e.getAnimations!=\"function\"||e.getAnimations().length>0,Ai=(e,t,r,l)=>{let n=new Map,o=new Map,i=oi(e.ownerDocument),a=Xr(e.ownerDocument),s=`${Te(e.ownerDocument)}|${Lt(e.ownerDocument)}`,c=Je.get(e.ownerDocument),u=c!==void 0&&c.sheetSignature===s,d=u?c.dedupedFeed:ei(e),f=wi(e.ownerDocument,d);if(f)for(let v=e.parentElement;v!==null;v=v.parentElement)ne(v)&&v.style.length>0&&f.addInlineStyleProps(v.style);let m=f?.perElementPropertyNames??[],b=new Set(m),p=m.join(\",\"),y=u&&c.laneSignature===p?c.scanByText:new Map,k=new Map,A=ni(m),x=m.map(v=>{let D=f?.getUnstableSelectorList(v)??null;return D!==null&&D.length>0?D.join(\",\"):null}),w=x.some(v=>v!==null),g=v=>{if(!w)return null;let D=null;for(let L=0;L<x.length;L++){let V=x[L];if(V===null)continue;let K=!0;try{K=v.matches(V)}catch{K=!0}K||(D??=Array(x.length).fill(!1),D[L]=!0)}return D},E=e.ownerDocument.activeElement,B=f?.propertyNames.length??0,M=f!==null&&f.isStyleMemoSafe()&&!ki(e.ownerDocument)?`${Te(e.ownerDocument)}|${Lt(e.ownerDocument)}|${t.innerWidth}x${t.innerHeight}x${t.devicePixelRatio}|${B}|${m.join(\",\")}`:null,P=M===null?void 0:Ze.get(e.ownerDocument),h=P!==void 0&&P.signature===M,S=h?P.memoKeysByParentKey:new Map,C=h?P.memoizedStylesByKey:new Map,$=h?P.variantEmittedStyles:new Map,T=h?P.memoKeyByElement:new WeakMap,q=h?P.attributeGeneration:-1,ue=h?Yl(e.ownerDocument):null,N=M===null?-1:_l(e.ownerDocument),I=h?P.nextMemoKey:0,O=(v,D,L,V)=>{if(vl.has(v.localName)||xi(v)||r&&!r(v))return;f&&v.shadowRoot&&(f.addShadowRootStyleProps(v.shadowRoot)||(f=null));let K=ne(v)&&!L&&!Bt.has(v.localName),U=null,ee=v.getAttribute(\"style\");if(ee!==null&&ne(v)&&(U=y.get(ee)??k.get(ee)??null,U===null)){let F=Gr(ee);if(F!==null){if(U=Xo(F,b),f&&U.registryFeed!==null)for(let[Se,te]of U.registryFeed)f.addParsedInlineDeclaration(Se,te);y.set(ee,U)}else f&&f.addInlineStyleProps(v.style),U=Ko(v.style,b,ee),k.set(ee,U)}let Ae=_o(v,D,n,t),ie=f&&v.namespaceURI!==\"http://www.w3.org/2000/svg\"&&!Bt.has(v.localName)?f.propertyNames:null,j=-1,ve=\"\";if(ie&&f?.isStyleMemoSafe()&&K&&V!==-1&&Ae===null){U!==null&&f.isInlineCarrySafe()&&(ve=U.carryText,ve!==\"\"&&o.set(v,ve));let F=ue!==null&&(ue.get(v)??0)<=q?T.get(v):void 0;if(F!==void 0&&F.parentMemoKey===V)j=F.memoKey;else{let Se=Zo(v,f?.styleRelevantAttributeNames??null,U===null?\"\":ve===\"\"?U.descriptorPlain:U.descriptorWithCarry),te=S.get(V);te===void 0&&(te=new Map,S.set(V,te));let Mt=te.get(Se);Mt===void 0?(j=I++,te.set(Se,j)):j=Mt,T.set(v,{memoKey:j,parentMemoKey:V})}}let Ue=v===E,z=j!==-1&&!Ue?C.get(j):void 0,Oe=t.getComputedStyle(v),_;if(z)_=Object.create(z.styles),vt(_,Oe,m,A,z.laneSkipMask,!Qr(v));else{if(D!==null&&Oe.getPropertyValue(\"display\")===\"none\")return;_=Q(Oe,ie,!0)}if((_.display===\"none\"||ti(_))&&D!==null)return;if(Ae!==null)for(let F in Ae)_[F]=Ae[F];let el=i.definesBeforeAfter||L,tl=(i.definesMarker||L)&&(_.display??\"\").includes(\"list-item\"),ce=null,de=null;el&&(z&&f?.isPseudoContentMemoSafe()?(ce=ar(v,\"::before\",t,m,A,z.beforeStyles,z.laneSkipMask),de=ar(v,\"::after\",t,m,A,z.afterStyles,z.laneSkipMask)):z?(ce=sr(v,\"::before\",t,ie,m,A,z.beforeStyles,z.laneSkipMask),de=sr(v,\"::after\",t,ie,m,A,z.afterStyles,z.laneSkipMask)):(ce=ir(v,\"::before\",t,ie),de=ir(v,\"::after\",t,ie))),j!==-1&&!z&&!Ue&&C.set(j,{styles:_,beforeStyles:ce,afterStyles:de,laneSkipMask:g(v)});let St=_[\"overflow-x\"],Et=_[\"overflow-y\"],Ct=v.localName===\"html\"||v.localName===\"body\"||St!==void 0&&St!==\"visible\"||Et!==void 0&&Et!==\"visible\";if(n.set(v,{styles:_,beforeStyles:ce,afterStyles:de,firstLetterStyles:i.definesFirstLetter?ii(v,t):null,markerStyles:tl?ai(v,t):null,pseudoStyles:hi(v,t,a),parentElement:D,scrollLeft:Ct?v.scrollLeft:0,scrollTop:Ct?v.scrollTop:0,memoKey:Ue?-1:j}),Sl.has(v.localName)||l?.has(v))return;let ze=L||!!v.shadowRoot;if(!ze){for(let F=v.firstElementChild;F!==null;F=F.nextElementSibling)O(F,v,!1,j);return}for(let F of ke(v,ze))H(F)&&O(F,v,ze,j)};O(e,null,!1,0);let J=M!==null&&f!==null&&f.isStyleMemoSafe()&&f.propertyNames.length===B&&C.size<=8192;if(J?Ze.set(e.ownerDocument,{signature:M,memoKeysByParentKey:S,memoizedStylesByKey:C,variantEmittedStyles:$,memoKeyByElement:T,attributeGeneration:N,nextMemoKey:I}):Ze.delete(e.ownerDocument),f!==null&&y.size<=8192){let v=u&&c.scanByText===y&&c.feedScanCount===y.size?c.dedupedFeed:null;if(v===null){let D=new Set,L=[];for(let V of y.values())if(V.registryFeed!==null)for(let K of V.registryFeed){let U=`${K[0]}|${K[1]}`;D.has(U)||(D.add(U),L.push(K))}v=L}Je.set(e.ownerDocument,{sheetSignature:s,laneSignature:p,scanByText:y,dedupedFeed:v,feedScanCount:y.size})}else Je.delete(e.ownerDocument);return{snapshotByElement:n,perElementPropertyNames:m,persistedVariantEmittedStyles:J?$:null,inlineCarryTextByElement:o}},dr=se(8),G=e=>{let t=\"\";for(let r in e)t+=`${r}:${e[r]};`;return t},vi=()=>{let e=new Map,t=[];return{rules:t,register:(r,l,n,o,i,a)=>{let s={base:G(r),before:l?G(l):\"\",after:n?G(n):\"\",firstLetter:o?G(o):\"\",marker:i?G(i):\"\"},c=a?ur(\"\",a):\"\",u=`${s.base}|before:${s.before}|after:${s.after}|first-letter:${s.firstLetter}|marker:${s.marker}|extra:${c}`,d=e.get(u);if(d)return d;let f=`rgs-${t.length+1}`;return e.set(u,f),t.push({className:f,signature:u,baseStyles:r,beforeStyles:l,afterStyles:n,firstLetterStyles:o,markerStyles:i,extraStyles:a??null,cachedBlocks:s}),f},toCssText:()=>{let r=`${Qn()}`;for(let u of t)r+=`\\0${u.signature}`;let l=dr.get(r);if(l!==void 0)return l;let n=new Map;for(let u of t){let d=u.baseStyles;for(let f in d){let m=`${f}:${d[f]};`,b=n.get(m);b===void 0?n.set(m,[u.className]):b.push(u.className)}}let o=new Map;for(let[u,d]of n){if(d.length<2)continue;let f=d.join(\",.\");o.set(f,(o.get(f)??\"\")+u)}let i=new Map,a=new Map,s=\"\";for(let[u,d]of o)s+=`.${u}{${d}}\n`;for(let u of t){let d=u.baseStyles,f=\"\";for(let x in d){let w=`${x}:${d[x]};`,g=n.get(w);g!==void 0&&g.length>=2||(f+=w)}let m=`.${u.className}{${f}}`,b=u.cachedBlocks,p=b?.before??(u.beforeStyles?G(u.beforeStyles):\"\"),y=b?.after??(u.afterStyles?G(u.afterStyles):\"\"),k=b?.firstLetter??(u.firstLetterStyles?G(u.firstLetterStyles):\"\"),A=b?.marker??(u.markerStyles?G(u.markerStyles):\"\");if(p){let x=i.get(p);x===void 0?i.set(p,[u.className]):x.push(u.className)}if(y){let x=a.get(y);x===void 0?a.set(y,[u.className]):x.push(u.className)}k&&(m+=`\n.${u.className}::first-letter{${k}}`),A&&(m+=`\n.${u.className}::marker{${A}}`),u.extraStyles&&(m+=ur(u.className,u.extraStyles)),s+=`${m}\n`}for(let[u,d]of i)s+=`.${d.join(\"::before,.\")}::before{${u}}\n`;for(let[u,d]of a)s+=`.${d.join(\"::after,.\")}::after{${u}}\n`;let c=s.slice(0,-1);return dr.set(r,c),c}}},Ve=e=>{let t=[],r=0,l=0;for(let n=0;n<e.length;n+=1){let o=e[n];o===\"(\"?r+=1:o===\")\"?--r:o===\",\"&&r===0&&(t.push(e.slice(l,n)),l=n+1)}return t.push(e.slice(l)),t},fr={\"background-size\":\"100% 100%\",\"background-position\":\"0% 0%\",\"background-repeat\":\"no-repeat\",\"background-origin\":\"border-box\",\"background-clip\":\"border-box\",\"background-attachment\":\"scroll\",\"background-blend-mode\":\"normal\"},pr={\"background-size\":\"auto\",\"background-position\":\"0% 0%\",\"background-repeat\":\"repeat\",\"background-origin\":\"padding-box\",\"background-clip\":\"border-box\",\"background-attachment\":\"scroll\",\"background-blend-mode\":\"normal\"},Si=(e,t,r)=>{delete e[\"backdrop-filter\"];let l=t[\"background-image\"]??\"none\",n=l===\"none\"?[]:Ve(l).map(s=>s.trim()),o=t[\"background-color\"],i=!!o&&o!==\"rgba(0, 0, 0, 0)\"&&o!==\"transparent\",a=[...n];i&&a.push(`linear-gradient(${o}, ${o})`),a.push(`url(\"${r}\")`),e[\"background-image\"]=a.join(\", \"),e[\"background-color\"]=\"transparent\";for(let s in pr){let c=pr[s],u=t[s],d=u?Ve(u).map(m=>m.trim()):[c],f=n.map((m,b)=>d[b%d.length]??c);i&&f.push(s===\"background-clip\"?d[d.length-1]??c:fr[s]),f.push(fr[s]),e[s]=f.join(\", \")}},Ei=e=>{if(e.includes(\"inset\"))return 0;let[t=0,r=0,l=0,n=0]=Sr(e),o=l*1.5;return Math.max(0,o+n-t,o+n+t,o+n-r,o+n+r)},Ci=e=>{if(!e||e===\"none\")return 0;let t=0;for(let r of Ve(e))t=Math.max(t,Ei(r));return t},Mi=e=>{let t=e[\"outline-style\"];if(!t||t===\"none\")return 0;let r=R(e[\"outline-width\"]);return r<=0?0:Math.max(0,r+R(e[\"outline-offset\"]))},dt=e=>Math.ceil(Math.max(Ci(e[\"box-shadow\"]),Mi(e),mt(e.filter))),$i=e=>e!==\"inline\"&&e!==\"contents\"&&!e.startsWith(\"table\")&&!e.startsWith(\"ruby\")&&!e.startsWith(\"inline-table\"),Pi=(e,t)=>{let r=t.getComputedStyle(e),l=dt({\"box-shadow\":r.getPropertyValue(\"box-shadow\"),filter:r.getPropertyValue(\"filter\"),\"outline-style\":r.getPropertyValue(\"outline-style\"),\"outline-width\":r.getPropertyValue(\"outline-width\"),\"outline-offset\":r.getPropertyValue(\"outline-offset\")}),n=dt({\"box-shadow\":r.getPropertyValue(\"text-shadow\")});return Math.max(l,n)},Ni=(e,t,r)=>{let l=new Set,n=e.ownerDocument.defaultView;if(!n)return l;let o=t.x-32,i=t.y-32,a=t.x+t.width+32,s=t.y+t.height+32,c=t.x-r,u=t.y-r,d=t.x+t.width+r,f=t.y+t.height+r,m=b=>{let p=b.getBoundingClientRect(),y=p.left<a&&p.right>o&&p.top<s&&p.bottom>i,k=p.left<d&&p.right>c&&p.top<f&&p.bottom>u,A=!y&&k?Pi(b,n):0,x={left:p.left-A,top:p.top-A,right:p.right+A,bottom:p.bottom+A},w=!1;for(let g of ke(b))if(H(g)){w=!0;let E=m(g);E.left<x.left&&(x.left=E.left),E.top<x.top&&(x.top=E.top),E.right>x.right&&(x.right=E.right),E.bottom>x.bottom&&(x.bottom=E.bottom)}else g.nodeType===Node.TEXT_NODE&&g.textContent!==\"\"&&(w=!0);return w&&!(x.left<a&&x.right>o&&x.top<s&&x.bottom>i)&&b!==e&&$i(n.getComputedStyle(b).getPropertyValue(\"display\"))&&l.add(b),x};return m(e),l},Ri=e=>{let t=e.ownerDocument.defaultView;if(!t)return\"\";let r=De(e);for(;r;){let l=t.getComputedStyle(r).backgroundColor;if(l&&l!==\"rgba(0, 0, 0, 0)\"&&l!==\"transparent\")return l;r=De(r)}return\"\"},Bi=e=>{let t=new Image;return t.src=e,t.decode().then(()=>({widthPx:t.naturalWidth,heightPx:t.naturalHeight})).catch(()=>null)},Zr=e=>ml.some(t=>e.startsWith(t)),Ti=e=>{if(!e.firstLetterStyles)return null;let t=null;for(let r in e.firstLetterStyles){if(!Zr(r))continue;let l=e.firstLetterStyles[r];l===void 0||l===e.styles[r]||(t??={},t[r]=l)}return t},ft=(e,t,r,l)=>{if(!r)return null;let n=bt({styles:r,baseline:e.getBaseline(t,l,r),parentStyles:null,parentEmittedStyles:null});return Fe(n,r,null,!1,null),Ie(n,r),n.content=r.content??\"none\",n},hr=se(2),Jr=(e,t,r)=>{let l=Object.getPrototypeOf(t);for(let n=0;n<r.length;n++){let o=r[n];if(!Object.hasOwn(t,o))continue;let i=t[o];l!==null&&l[o]===i||(e+=`\u001f${n}:${i??\"\"}`)}return e},mr=(e,t,r)=>t===null?`${e}\u001f\\0`:(e+=`\u001f${t.content??\"\"}`,Jr(e,t,r)),gr=(e,t,r)=>{let l=t??\"\";return l=Jr(l,e.styles,r),l=mr(l,e.beforeStyles,r),mr(l,e.afterStyles,r)},yr=(e,t,r,l,n,o)=>{if(!l)return null;if(!e||e.content!==(l.content??\"none\"))return ft(t,r,l,n);let i={...e};return Wr(i,l,t.getBaseline(r,n,l),o),Fe(i,l,null,!1,null),Ie(i,l),i.content=l.content??\"none\",i},Di=(e,t,r,l,n,o,i,a,s)=>{let c=new Map,u=new Map,d=Dn(t),f=new Map,m=new Map,b=(w,g)=>{if(g.memoKey===-1)return r.getBaseline(w,null,g.styles);let E=m.get(g.memoKey);return E===void 0&&(E=r.getBaseline(w,null,g.styles),m.set(g.memoKey,E)),E},p=new Map,y=s??new Map;for(let[w,g]of e){let E=g.parentElement?e.get(g.parentElement):void 0,B=d&&g.memoKey!==-1&&w!==n&&!i?.has(w)&&!a.has(w)&&!g.pseudoStyles,M;if(B){let C=gr(g,E?.styles.display??null,t);if(p.set(w,C),M=y.get(g.memoKey),M===void 0)M=new Map,y.set(g.memoKey,M);else{let $=M.get(C);if($!==void 0){u.set(w,$);continue}}}let P=d&&g.memoKey!==-1?f.get(g.memoKey):void 0,h;if(P?(h={...P},Wr(h,g.styles,b(w,g),t)):(h=bt({styles:g.styles,baseline:b(w,g),parentStyles:E?.styles??null,parentEmittedStyles:g.parentElement?u.get(g.parentElement)??null:null}),d&&g.memoKey!==-1&&f.set(g.memoKey,{...h})),Fe(h,g.styles,E?.styles.display??null,Qr(w),w.localName),Ie(h,g.styles),W(w,\"iframe\")){let C=g.styles.display??\"inline\";h.display=C===\"inline\"?\"inline-block\":C}h[\"content-visibility\"]===\"auto\"&&(h[\"content-visibility\"]=\"visible\"),w===n&&Wn(h,o),i?.has(w)&&(h.visibility=\"hidden\",delete h[\"backdrop-filter\"]);let S=a.get(w);S&&Si(h,g.styles,S),u.set(w,h),M&&M.set(p.get(w)??\"\",h)}let k=Eo(n,e,u),A=new Map,x=new Map;for(let[w,g]of e){let E=u.get(w);if(!E)continue;let B=d&&g.memoKey!==-1&&w!==n&&g.firstLetterStyles===null&&g.markerStyles===null&&!g.pseudoStyles&&!k.has(w)&&!i?.has(w)&&!a.has(w),M=(g.parentElement?e.get(g.parentElement):void 0)?.styles.display??null,P,h=\"\";if(B)if(h=p.get(w)??gr(g,M,t),P=x.get(g.memoKey),P===void 0)P=new Map,x.set(g.memoKey,P);else{let q=P.get(h);if(q!==void 0){c.set(w,q);continue}}let S=d&&g.memoKey!==-1?A.get(g.memoKey):void 0,C,$;S?(C=yr(S.beforeDiff,r,w,g.beforeStyles,\"::before\",t),$=yr(S.afterDiff,r,w,g.afterStyles,\"::after\",t)):(C=ft(r,w,g.beforeStyles,\"::before\"),$=ft(r,w,g.afterStyles,\"::after\"),d&&g.memoKey!==-1&&A.set(g.memoKey,{beforeDiff:C?{...C}:null,afterDiff:$?{...$}:null}));let T=l.register(E,C,$,Ti(g),Vn(g.markerStyles,g.styles),gi(r,w,g.pseudoStyles,g.styles));c.set(w,T),P&&P.set(h,T)}return c},pt=new Set,he=new WeakMap,Li=async(e,t)=>{if(t.resolveIframeContent)try{let r=await t.resolveIframeContent(e);if(r){let l=await Bi(r);if(l)return{pngDataUrl:r,widthPx:l.widthPx,heightPx:l.heightPx,canvasBackgroundColor:null}}}catch{}return ho(e,t.pixelRatio)},Vi=async(e,t)=>{let r=new Map,l=[];for(let o of e.keys()){if(!W(o,\"iframe\"))continue;let i=o.contentDocument,a=i?.documentElement;if(!i||!a||!i.defaultView){l.push(o);continue}if(!pt.has(i))try{let s=i.defaultView,c={x:s.scrollX,y:s.scrollY,width:a.clientWidth,height:a.clientHeight},u;he.set(a,c);try{u=await ye(a,{scale:1,pixelRatio:t.pixelRatio,embedFonts:t.embedFonts,timeoutMs:t.timeoutMs,abortSignal:t.abortSignal,clip:c.width>0&&c.height>0?{x:0,y:0,width:c.width,height:c.height}:void 0})}finally{he.delete(a)}r.set(o,{pngDataUrl:await u.toPngDataUrl(),widthPx:u.width,heightPx:u.height,canvasBackgroundColor:kt(i)})}catch(s){if(t.abortSignal?.aborted)throw s}}let n=await Promise.all(l.map(o=>Li(o,t)));for(let o=0;o<l.length;o+=1){let i=n[o];i&&r.set(l[o],i)}return r},We=async(e,t,r)=>{let l=e.ownerDocument,n=l.defaultView;if(!n)throw Error(\"captureNode requires an element attached to a window\");if(!e.isConnected)throw Error(\"captureNode requires an element attached to a document\");t.abortSignal?.throwIfAborted(),pt.add(l);try{l.fonts.status!==\"loaded\"&&await it(l.fonts.ready,t.abortSignal);let o=!r.skipBackdropFilterBaking&&r.suppressedBackdropElements===null?Pr(t):null;if(o!==null){let N=Rr(e,o);if(N)return t.backgroundColor=N.resolvedBackgroundColor,st(N.svgMarkup,N.widthPx,N.heightPx,t,N.clipRect)}let i=e.getBoundingClientRect(),a=e===l.documentElement?Math.max(i.height,e.scrollHeight):i.height,s=Math.ceil(i.right)-Math.floor(i.left),c=Math.ceil(i.top+a)-Math.floor(i.top),u=ne(e)?e.offsetWidth:0,d=ne(e)?Math.max(e.offsetHeight,Math.round(a)):0,f=Math.max(1,u>0?u:s),m=Math.max(1,d>0?d:c);Oo(e,t.timeoutMs);let b=performance.now(),{snapshotByElement:p,perElementPropertyNames:y,persistedVariantEmittedStyles:k,inlineCarryTextByElement:A}=r.presnapshottedTree??Ai(e,n,t.filterNode,t.prunedElements);Y.snapshotMs=performance.now()-b;let x=p.get(e);if(!x)throw Error(\"captureNode target was excluded by filterNode or is not capturable\");let w=t.bleed===\"auto\"?dt(x.styles):Math.max(0,Math.ceil(t.bleed)),g=Co({rootElement:e,rootStyles:x.styles,defaultView:n,layoutWidthPx:f,layoutHeightPx:m,bleedPx:w});if(!g.rootLinearTransform){let N=i.left-Math.floor(i.left),I=i.top-Math.floor(i.top);g={...g,layoutWidthPx:i.width>0?i.width:g.layoutWidthPx,layoutHeightPx:a>0?a:g.layoutHeightPx,outputWidthPx:Math.max(1,s)+2*w,outputHeightPx:Math.max(1,c)+2*w,contentOffsetLeftPx:w+N,contentOffsetTopPx:w+I}}let E=t.clip?{x:t.clip.x+g.contentOffsetLeftPx,y:t.clip.y+g.contentOffsetTopPx,width:t.clip.width,height:t.clip.height}:null;if(t.backgroundColor===void 0){let N=x.styles[\"background-color\"];(!N||N===\"rgba(0, 0, 0, 0)\"||N===\"transparent\"||g.rootLinearTransform||w>0)&&(t.backgroundColor=Ri(e)||void 0)}let B=performance.now(),M=await Vi(p,t);Y.iframesMs=performance.now()-B,t.abortSignal?.throwIfAborted();let P=new Map,h=performance.now();if(!r.skipBackdropFilterBaking){let N=Wl(p,e);if(N.length>0){let I=N.map(L=>L.getBoundingClientRect()),O=g.rootLinearTransform?void 0:Vl(N,I,p,i),J=await We(e,{...t,scale:1,bleed:0,clip:O},{suppressedBackdropElements:new Set(N),skipBackdropFilterBaking:!0,presnapshottedTree:{snapshotByElement:p,perElementPropertyNames:y,persistedVariantEmittedStyles:k,inlineCarryTextByElement:A}}),v=`${t.pixelRatio}|${t.backgroundColor??\"\"}|${O?.x??0},${O?.y??0}|`+N.map((L,V)=>`${I[V].x},${I[V].y},${I[V].width},${I[V].height},${p.get(L)?.styles[\"backdrop-filter\"]??\"\"}`).join(\";\")+`|${await J.toSvgDataUrl()}`,D=hr.get(v);D&&D.length===N.length?N.forEach((L,V)=>{let K=D[V];K&&P.set(L,K)}):(P=Kl({underlayCanvas:await J.toCanvas(),ownerDocument:l,rootElement:e,backdropFilterElements:N,snapshotByElement:p,pixelRatio:t.pixelRatio,backgroundColor:t.backgroundColor,underlayOffsetLeftPx:O?.x??0,underlayOffsetTopPx:O?.y??0}),hr.set(v,N.map(L=>P.get(L)??\"\")))}}Y.backdropMs=performance.now()-h,t.abortSignal?.throwIfAborted();let S=Tn(l),C;try{let N=performance.now(),I=vi(),O=Nn(e,{ownerDocument:l,classNameByElement:Di(p,y,S,I,e,g,r.suppressedBackdropElements,P,k),snapshotByElement:p,cloneByElement:new Map,iframeContentByElement:M,viewportScroll:he.get(e)??null,prunedElements:t.prunedElements,inlineCarryTextByElement:A});if(!O)throw Error(\"captureNode could not clone the target element\");Y.buildMs=performance.now()-N;let J=performance.now(),[,v]=await it(Promise.all([(async()=>{await xo({clone:O,rules:I.rules,sourceDocument:l,timeoutMs:t.timeoutMs}),await yo(O,I.rules,t.timeoutMs)})(),t.embedFonts?co(ao(I.rules),l,t.timeoutMs,so(I.rules)):Promise.resolve(\"\")]),t.abortSignal);Y.inlineMs=performance.now()-J;let D=performance.now();C=Uo({clone:O,cssText:`${v}\n${Xr(l).counterCss}\n${I.toCssText()}\n${go(O)}`,width:Math.max(g.outputWidthPx,he.get(e)?.width??0),height:Math.max(g.outputHeightPx,he.get(e)?.height??0),clip:Le()?null:E,ownerDocument:l}),Y.serializeMs=performance.now()-D}finally{S.dispose()}let $=!!E&&Le(),T=E&&!$?E.width:g.outputWidthPx,q=E&&!$?E.height:g.outputHeightPx,ue=E&&!$?null:E;return o!==null&&tn(e,o,p,{svgMarkup:C,widthPx:T,heightPx:q,clipRect:ue,resolvedBackgroundColor:t.backgroundColor,contentOffsetLeftPx:g.contentOffsetLeftPx,contentOffsetTopPx:g.contentOffsetTopPx}),st(C,T,q,t,ue)}finally{pt.delete(l)}},ye=async(e,t={})=>{let r=e.ownerDocument.defaultView;if(!r)throw Error(\"captureNode requires an element attached to a window\");return We(e,{scale:t.scale??1,pixelRatio:t.pixelRatio??r.devicePixelRatio,backgroundColor:t.backgroundColor,embedFonts:t.embedFonts??!0,bleed:t.bleed??0,clip:t.clip,prunedElements:void 0,filterNode:t.filterNode,resolveIframeContent:t.resolveIframeContent,timeoutMs:t.timeoutMs??8e3,abortSignal:t.abortSignal},{suppressedBackdropElements:null,skipBackdropFilterBaking:!1})},Wi=async(e,t={})=>{let r=t.root??document.documentElement,l=r.ownerDocument.defaultView;if(!l)throw Error(\"captureRegion requires an element attached to a window\");let n=r.getBoundingClientRect(),o=t.cullMarginPx??256,i=o>=0?Ni(r,e,o):void 0,a={scale:t.scale??1,pixelRatio:t.pixelRatio??l.devicePixelRatio,backgroundColor:t.backgroundColor??kt(r.ownerDocument)??void 0,embedFonts:t.embedFonts??!0,bleed:0,clip:{x:e.x-n.left,y:e.y-n.top,width:e.width,height:e.height},prunedElements:i,filterNode:t.filterNode,resolveIframeContent:t.resolveIframeContent,timeoutMs:t.timeoutMs??8e3,abortSignal:t.abortSignal},s={...a,clip:void 0,prunedElements:void 0},c=Pr(s);if(c!==null&&a.clip){let u=a.clip,d=()=>{let m=Rr(r,c);return!m||m.clipRect!==null?null:st(m.svgMarkup,m.widthPx,m.heightPx,{...s,backgroundColor:m.resolvedBackgroundColor},{x:u.x+m.contentOffsetLeftPx,y:u.y+m.contentOffsetTopPx,width:u.width,height:u.height})},f=d();if(f)return f;if(Gl(r)){await We(r,s,{suppressedBackdropElements:null,skipBackdropFilterBaking:!1});let m=d();if(m)return m;Xl(r)}}return Ql(r),We(r,a,{suppressedBackdropElements:null,skipBackdropFilterBaking:!1})},Ii=async(e=document)=>{if(e instanceof Element){try{await(await ye(e)).toBlob()}catch{}return}let t=e.body??e.documentElement;if(!t)return;let r=e.createElement(\"div\");r.style.cssText=\"position:absolute;left:-99999px;top:0;width:16px;height:16px;background:#fff;\",r.textContent=\"prewarm\",t.appendChild(r);try{await(await ye(r)).toBlob()}catch{return}finally{r.remove()}},Fi=()=>mo(async e=>{let t=await ye(document.documentElement,{scale:1,pixelRatio:e});return{pngDataUrl:await t.toPngDataUrl(),widthPx:t.width,heightPx:t.height}});return al(Ui);})();"
+export const FAST_HTML_TO_IMAGE = "var FastHtmlToImage=(()=>{var ft=Object.defineProperty;var Do=Object.getOwnPropertyDescriptor;var $o=Object.getOwnPropertyNames;var Uo=Object.prototype.hasOwnProperty;var Vo=(e,t)=>{for(var r in t)ft(e,r,{get:t[r],enumerable:!0})},Wo=(e,t,r,n)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let o of $o(t))!Uo.call(e,o)&&o!==r&&ft(e,o,{get:()=>t[o],enumerable:!(n=Do(t,o))||n.enumerable});return e};var Ko=e=>Wo(ft({},\"__esModule\",{value:!0}),e);var na={};Vo(na,{captureNode:()=>st,captureRegion:()=>Io,enableIframeBridge:()=>Lo,lastCaptureTimings:()=>Y,prewarm:()=>_o});var X=\"http://www.w3.org/2000/svg\",We=\"http://www.w3.org/1999/xhtml\",pt=\"http://www.w3.org/1999/xlink\",sr=new Set([\"matrix(0, 0, 0, 1, 0, 0)\",\"matrix(0, 0, 0, 0, 0, 0)\",\"scaleX(0)\",\"scale(0)\",\"scaleY(0)\"]),cr=new Set([\"absolute\",\"fixed\"]),ur=new Set([\"relative\",\"absolute\",\"fixed\",\"sticky\"]),mt=new Set([\"width\",\"height\",\"font-size\",\"inline-size\",\"block-size\",\"transform-origin\",\"perspective-origin\",\"box-sizing\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\"]),ht=new Set([\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\"]),gt=[\"width\",\"height\",\"inline-size\",\"block-size\"],dr=new Set([\"table\",\"thead\",\"tbody\",\"tfoot\",\"tr\",\"td\",\"th\",\"colgroup\",\"col\"]),bt=new Set([\"table\",\"td\",\"th\"]),Ke=new Set([\"defs\",\"symbol\",\"pattern\",\"mask\",\"clipPath\",\"marker\",\"linearGradient\",\"radialGradient\",\"filter\"]),fr=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-opacity\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-dasharray\",\"stroke-dashoffset\",\"color\",\"opacity\"],ze=[\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-block-start-color\",\"border-block-end-color\",\"border-inline-start-color\",\"border-inline-end-color\",\"text-decoration-color\",\"text-emphasis-color\",\"outline-color\",\"column-rule-color\",\"-webkit-text-fill-color\",\"-webkit-text-stroke-color\"],pr=[\"fill\",\"stroke\",\"filter\",\"clip-path\",\"mask\",\"mask-image\",\"marker-start\",\"marker-mid\",\"marker-end\"],mr=new Set([\"color\",\"content\",\"direction\",\"unicode-bidi\",\"white-space\",\"text-combine-upright\"]),hr=[\"font\",\"color\",\"background\",\"margin\",\"padding\",\"border\",\"float\",\"vertical-align\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-transform\",\"text-decoration\",\"text-shadow\",\"box-shadow\",\"opacity\",\"-webkit-text\",\"initial-letter\"],yt=[\"-webkit-text-stroke-color\",\"-webkit-text-stroke-width\",\"-webkit-text-fill-color\"],gr=new Set([\"offset\",\"computedOffset\",\"easing\",\"composite\"]),br=\"display.position.top.right.bottom.left.float.clear.box-sizing.width.height.inline-size.block-size.min-width.margin-top.margin-right.margin-bottom.margin-left.padding-top.padding-right.padding-bottom.padding-left.overflow-x.overflow-y.vertical-align.border-top-width.border-right-width.border-bottom-width.border-left-width.border-top-style.border-right-style.border-bottom-style.border-left-style.border-top-color.border-right-color.border-bottom-color.border-left-color.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.outline-color.outline-style.outline-width.outline-offset.color.background-color.transform.transform-origin.rotate.scale.perspective.perspective-origin.object-fit.object-position.appearance.color-scheme.content.font-family.font-size.font-weight.font-style.line-height.white-space.white-space-collapse.text-wrap-mode.text-align.text-transform.text-decoration-line.text-decoration-color.text-decoration-style.text-decoration-thickness.direction.unicode-bidi.writing-mode.text-orientation.list-style-type.border-spacing.table-layout.content-visibility\".split(\".\"),St=[\"width\",\"height\",\"inline-size\",\"block-size\",\"top\",\"right\",\"bottom\",\"left\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"transform\",\"transform-origin\",\"perspective-origin\",\"grid-template-columns\",\"grid-template-rows\"],He=[\"top\",\"right\",\"bottom\",\"left\"],pe=new Set([\"background-color\",\"background-image\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-attachment\",\"background-origin\",\"background-clip\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\"]),Ce=new Set([...He,\"transform\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\"]),yr=/%|calc\\(|var\\(|min\\(|max\\(|clamp\\(/,Sr=/[\"'\\\\]|url\\(|var\\(|\\/\\*|[\\u0000-\\u0008\\u000b\\u000e-\\u001f]/i,wt=/^(0|-?\\d*\\.?\\d+(px|em|rem|ch|ex|pt|pc|cm|mm|in|vw|vh|vmin|vmax))( (0|-?\\d*\\.?\\d+(px|em|rem|ch|ex|pt|pc|cm|mm|in|vw|vh|vmin|vmax)))*$/,xt=new Set([\"input\",\"select\",\"textarea\",\"button\",\"option\",\"optgroup\",\"progress\",\"meter\",\"details\",\"summary\",\"dialog\",\"video\",\"audio\"]),wr=\"class.lang.dir.hidden.href.type.contenteditable.slot.part.width.height.align.valign.bgcolor.background.border.color.face.size.nowrap.cellspacing.cellpadding.hspace.vspace.char.charoff.frame.rules.start.value.reversed.colspan.rowspan.span.clear\".split(\".\"),xr=/\\[\\s*(?:[\\w-]+\\|)?([\\w-]+)/g,Er=new Set([\"cursor\",\"pointer-events\",\"touch-action\",\"user-select\",\"-webkit-user-select\",\"-webkit-user-drag\",\"-webkit-tap-highlight-color\",\"will-change\",\"caret-color\",\"-webkit-locale\",\"speak\",\"page\",\"app-region\",\"d\"]),Ar=new Set([\"script\",\"style\",\"link\",\"meta\",\"noscript\",\"template\",\"title\",\"base\",\"head\",\"slot\"]),Cr=new Set([\"img\",\"video\",\"canvas\",\"iframe\",\"textarea\"]),Rr=new Set([\"img\",\"video\",\"canvas\",\"iframe\",\"embed\",\"object\",\"input\",\"select\",\"textarea\",\"audio\",\"progress\",\"meter\",\"svg\"]),kr=new Set([\"serif\",\"sans-serif\",\"monospace\",\"cursive\",\"fantasy\",\"system-ui\",\"ui-serif\",\"ui-sans-serif\",\"ui-monospace\",\"ui-rounded\",\"emoji\",\"math\",\"fangsong\"]),Tr=new Set(\"color.-webkit-text-fill-color.-webkit-text-stroke-color.direction.visibility.line-height.letter-spacing.word-spacing.white-space.white-space-collapse.word-break.overflow-wrap.text-align.text-align-last.text-indent.text-transform.text-shadow.text-rendering.text-wrap.text-wrap-mode.text-wrap-style.tab-size.hyphens.quotes.border-collapse.border-spacing.caption-side.empty-cells.color-scheme.accent-color.writing-mode.text-orientation.paint-order.image-rendering.color-interpolation.fill.fill-opacity.fill-rule.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width\".split(\".\"));var me=(e,t)=>({a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d}),Pr={deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:2*Math.PI},zo=e=>{for(let t in Pr){if(!e.endsWith(t))continue;let r=Number.parseFloat(e.slice(0,-t.length));return Number.isFinite(r)?r*Pr[t]:null}return null},Ho=e=>{if(e.length===0)return[0,0,1];if(e.length===1)return e[0]===\"x\"?[1,0,0]:e[0]===\"y\"?[0,1,0]:e[0]===\"z\"?[0,0,1]:null;if(e.length!==3)return null;let t=e.map(r=>Number.parseFloat(r));return t.some(r=>!Number.isFinite(r))?null:[t[0],t[1],t[2]]},Go=e=>{if(!e||e===\"none\")return null;let t=e.trim().split(/\\s+/),r=zo(t[t.length-1]);if(r===null)return null;let n=Ho(t.slice(0,-1));if(!n)return null;let o=Math.hypot(n[0],n[1],n[2]);if(o===0)return null;let[l,i,a]=n.map(u=>u/o),s=Math.cos(r),d=Math.sin(r),c=1-s;return{a:s+l*l*c,b:i*l*c+a*d,c:l*i*c-a*d,d:s+i*i*c}},Yo=e=>{if(!e||e===\"none\")return null;let t=e.trim().split(/\\s+/).map(r=>Number.parseFloat(r));return t.length<1||t.length>3||t.some(r=>!Number.isFinite(r))?null:{a:t[0],b:0,c:0,d:t.length>=2?t[1]:t[0]}},qo=(e,t)=>e.slice(t+1,e.lastIndexOf(\")\")).split(\",\").map(r=>Number.parseFloat(r)),Xo=e=>{if(!e||e===\"none\")return null;let t=e.indexOf(\"(\");if(t===-1||!e.endsWith(\")\"))return null;let r=e.slice(0,t).trim(),n=qo(e,t);if(n.some(o=>!Number.isFinite(o)))return null;if(r===\"matrix\"&&n.length===6){let[o,l,i,a]=n;return{a:o,b:l,c:i,d:a}}return r===\"matrix3d\"&&n.length===16?{a:n[0],b:n[1],c:n[4],d:n[5]}:null},jo={a:1,b:0,c:0,d:1},Re=e=>{let t=Xo(e.transform)??jo,r=Yo(e.scale);r&&(t=me(r,t));let n=Go(e.rotate);return n&&(t=me(n,t)),t},v=e=>{if(e===void 0)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},At=e=>{let t=e.match(/-?\\d+(?:\\.\\d+)?px/g);return t?t.map(r=>Number.parseFloat(r)):[]},ke=e=>{if(!e||e===\"none\")return 0;let t=0,r=/([a-z-]+)\\(([^()]*(?:\\([^()]*\\)[^()]*)*)\\)/g,n=r.exec(e);for(;n;){let[,o,l]=n;if(o===\"blur\")t=Math.max(t,v(l)*3);else if(o===\"drop-shadow\"){let[i=0,a=0,s=0]=At(l);t=Math.max(t,Math.max(Math.abs(i),Math.abs(a))+s*1.5)}n=r.exec(e)}return t},Nr=e=>{let t=e.a*e.d-e.b*e.c;return t===0?null:{a:e.d/t,b:-e.b/t,c:-e.c/t,d:e.a/t}},Ge=e=>Math.abs(e.a-1)<1e-4&&Math.abs(e.b)<1e-4&&Math.abs(e.c)<1e-4&&Math.abs(e.d-1)<1e-4;var vr=(e,t,r,n)=>{let o=1/0,l=1/0,i=-1/0,a=-1/0;e.forEach((f,p)=>{let b=t[p],m=r.get(f)?.styles[\"backdrop-filter\"]??\"\",g=Math.ceil(ke(m));o=Math.min(o,b.left-n.left-g),l=Math.min(l,b.top-n.top-g),i=Math.max(i,b.right-n.left+g),a=Math.max(a,b.bottom-n.top+g)});let s=Math.max(0,Math.floor(o)),d=Math.max(0,Math.floor(l)),c=Math.min(Math.ceil(n.width),Math.ceil(i)),u=Math.min(Math.ceil(n.height),Math.ceil(a));return{x:s,y:d,width:Math.max(1,c-s),height:Math.max(1,u-d)}},Ir=(e,t)=>{let r=[];for(let[n,o]of e){if(n===t)continue;let l=o.styles[\"backdrop-filter\"];l&&l!==\"none\"&&r.push(n)}return r},Zo={a:1,b:0,c:0,d:1},Qo=(e,t,r)=>{let n=Zo,o=e;for(;o;){let l=r.get(o);if(l&&(n=me(Re({transform:l.styles.transform,rotate:l.styles.rotate,scale:l.styles.scale}),n)),o===t)break;o=o.parentElement}return n},Jo=(e,t,r,n,o,l,i)=>{let{underlayCanvas:a,ownerDocument:s,pixelRatio:d,backgroundColor:c,underlayOffsetLeftPx:u,underlayOffsetTopPx:f}=e,p=n+2*l,b=o+2*l,m=s.createElement(\"canvas\");m.width=Math.max(1,Math.round(p*d)),m.height=Math.max(1,Math.round(b*d));let g=m.getContext(\"2d\");if(!g)return null;c&&(g.fillStyle=c,g.fillRect(0,0,m.width,m.height)),g.drawImage(a,(t-u-l)*d,(r-f-l)*d,m.width,m.height,0,0,m.width,m.height);let x=s.createElement(\"canvas\");x.width=Math.max(1,Math.round(n*d)),x.height=Math.max(1,Math.round(o*d));let A=x.getContext(\"2d\");return A?(A.scale(d,d),A.filter=i,A.drawImage(m,-l,-l,p,b),x):null},el=(e,t,r,n,o,l,i)=>{let{ownerDocument:a,pixelRatio:s}=e,d=a.createElement(\"canvas\");d.width=Math.max(1,Math.round(o*s)),d.height=Math.max(1,Math.round(l*s));let c=d.getContext(\"2d\");return c?(c.scale(s,s),c.translate(o/2,l/2),c.transform(i.a,i.b,i.c,i.d,0,0),c.drawImage(t,-r/2,-n/2,r,n),d):null},tl=(e,t,r,n,o,l,i,a)=>{let s=e.underlayCanvas.getContext(\"2d\");s&&(s.save(),s.setTransform(e.pixelRatio,0,0,e.pixelRatio,0,0),s.translate(r-e.underlayOffsetLeftPx,n-e.underlayOffsetTopPx),s.transform(i.a,i.b,i.c,i.d,0,0),s.translate(-o/2,-l/2),s.drawImage(t,0,0,o,l),a&&a!==\"rgba(0, 0, 0, 0)\"&&a!==\"transparent\"&&(s.fillStyle=a,s.fillRect(0,0,o,l)),s.restore())},_r=e=>{let t=new Map,r=e.rootElement.getBoundingClientRect();for(let n of e.backdropFilterElements){let o=e.snapshotByElement.get(n),l=o?.styles[\"backdrop-filter\"];if(!l||l===\"none\")continue;let i=n.getBoundingClientRect(),a=Math.round(i.width),s=Math.round(i.height);if(a<=0||s<=0)continue;let d=Qo(n,e.rootElement,e.snapshotByElement),c=Jo(e,i.left-r.left,i.top-r.top,a,s,Math.ceil(ke(l)),l);if(!c)continue;let u=c,f=a,p=s;if(!Ge(d)){let b=Nr(d);if(!b)continue;let m=n instanceof HTMLElement?n.offsetWidth:0,g=n instanceof HTMLElement?n.offsetHeight:0;if(m<=0||g<=0)continue;let x=el(e,c,a,s,m,g,b);if(!x)continue;u=x,f=m,p=g}tl(e,u,i.left-r.left+i.width/2,i.top-r.top+i.height/2,f,p,d,o?.styles[\"background-color\"]);try{t.set(n,u.toDataURL())}catch{continue}}return t},ie=e=>{let t=[],r=0,n=0;for(let o=0;o<e.length;o+=1){let l=e[o];l===\"(\"?r+=1:l===\")\"?--r:l===\",\"&&r===0&&(t.push(e.slice(n,o)),n=o+1)}return t.push(e.slice(n)),t},Mr={\"background-size\":\"100% 100%\",\"background-position\":\"0% 0%\",\"background-repeat\":\"no-repeat\",\"background-origin\":\"border-box\",\"background-clip\":\"border-box\",\"background-attachment\":\"scroll\",\"background-blend-mode\":\"normal\"},Br={\"background-size\":\"auto\",\"background-position\":\"0% 0%\",\"background-repeat\":\"repeat\",\"background-origin\":\"padding-box\",\"background-clip\":\"border-box\",\"background-attachment\":\"scroll\",\"background-blend-mode\":\"normal\"},Lr=(e,t,r)=>{delete e[\"backdrop-filter\"];let n=t[\"background-image\"]??\"none\",o=n===\"none\"?[]:ie(n).map(s=>s.trim()),l=t[\"background-color\"],i=!!l&&l!==\"rgba(0, 0, 0, 0)\"&&l!==\"transparent\",a=[...o];i&&a.push(`linear-gradient(${l}, ${l})`),a.push(`url(\"${r}\")`),e[\"background-image\"]=a.join(\", \"),e[\"background-color\"]=\"transparent\";for(let s in Br){let d=Br[s],c=t[s],u=c?ie(c).map(p=>p.trim()):[d],f=o.map((p,b)=>u[b%u.length]??d);i&&f.push(s===\"background-clip\"?u[u.length-1]??d:Mr[s]),f.push(Mr[s]),e[s]=f.join(\", \")}};var ee=e=>e.type===CSSRule.STYLE_RULE,Ye=e=>\"cssRules\"in e,Te=e=>e.type===CSSRule.IMPORT_RULE,te=(e,t)=>{try{return new URL(e,t??void 0).href}catch{return e}},G=(e,t,r)=>{let n=(o,l)=>{for(let i of o){if(t(i,l))return!0;if(Te(i))try{let a=i.styleSheet;if(a&&n(a.cssRules,a.href??l))return!0}catch{if(r(te(i.href,l)))return!0}else if(Ye(i)&&n(i.cssRules,l))return!0}return!1};for(let o of[...e.styleSheets,...e.adoptedStyleSheets])try{if(n(o.cssRules,o.href??e.baseURI))return}catch{if(r(o.href??null))return}};var Fr=new WeakMap,rl=\"(prefers-color-scheme: dark)\",nl=e=>{let t=new Map;return()=>{let r=new Set([rl]),n=0;for(let a of[...e.styleSheets,...e.adoptedStyleSheets])r.add(a.media.mediaText);G(e,a=>(n++,(a.type===CSSRule.MEDIA_RULE||Te(a))&&r.add(a.media.mediaText),!1),()=>!1);let o=e.defaultView;if(!o)return{mediaSignature:\"\",cssRuleCount:n};let l=new Map,i=[];for(let a of r){let s=t.get(a)??o.matchMedia(a);l.set(a,s),i.push([a,s.matches])}return t=l,{mediaSignature:JSON.stringify(i),cssRuleCount:n}}},qe=e=>{let t=e;for(;t!==null;){if(t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute(\"data-fhti-epoch-ignored\"))return!0;t=t.parentNode}return!1},Ct=e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e.localName;return t===\"style\"||t===\"link\"},ol=e=>{let t=e.target;for(;t!==null;){if(Ct(t))return!0;t=t.parentNode}if(e.type===\"childList\"){for(let r of e.addedNodes)if(Ct(r))return!0;for(let r of e.removedNodes)if(Ct(r))return!0}return!1},ll=e=>{if(e.type===\"childList\"){for(let t of e.addedNodes)if(!qe(t))return!0;for(let t of e.removedNodes)if(!qe(t))return!0;return!1}return!qe(e.target)},il=e=>{let t=nl(e),r={epoch:0,styleEpoch:0,attributeGeneration:0,...t()},n=new WeakMap,o=()=>{r.epoch++},l=c=>{c.target instanceof Node&&qe(c.target)||r.epoch++},i=c=>{c.some(ll)&&r.epoch++,c.some(ol)&&r.styleEpoch++;let u=!1;for(let f of c)f.type!==\"attributes\"||f.target.nodeType!==Node.ELEMENT_NODE||(u||=(r.attributeGeneration++,!0),n.set(f.target,r.attributeGeneration))},a=new MutationObserver(i);a.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0});let s={capture:!0,passive:!0};for(let c of[\"scroll\",\"input\",\"change\",\"load\",\"error\",\"toggle\"])e.addEventListener(c,l,s);let d=e.defaultView;if(d)for(let c of[\"resize\",\"hashchange\",\"popstate\"])d.addEventListener(c,o,s);return e.fonts.addEventListener(\"loadingdone\",o),{readState:()=>{i(a.takeRecords());let c=t();return c.mediaSignature!==r.mediaSignature&&(r.mediaSignature=c.mediaSignature,r.epoch++,r.styleEpoch++),r.cssRuleCount=c.cssRuleCount,{...r}},attributeGenerationByElement:n}},Or=e=>{let t=Fr.get(e);return t===void 0&&(t=il(e),Fr.set(e,t)),t},he=e=>Or(e).readState(),Xe=e=>he(e).epoch,Dr=e=>Or(e).attributeGenerationByElement;var $r=new WeakMap,Pe=new WeakMap,Ur=e=>{let t=Pe.get(e);if(!t)return!1;let r=Xe(e.ownerDocument);return t.epoch===r&&t.captureCount>=1&&t.unpromotableEpoch!==r},Vr=e=>{let t=Xe(e.ownerDocument),r=Pe.get(e);if(r&&r.epoch===t){r.captureCount++;return}Pe.set(e,{epoch:t,captureCount:1,unpromotableEpoch:r?.unpromotableEpoch??-1})},Wr=e=>{let t=Xe(e.ownerDocument),r=Pe.get(e);if(r){r.unpromotableEpoch=t;return}Pe.set(e,{epoch:t,captureCount:0,unpromotableEpoch:t})},al=/:(?:hover|active|focus|target)/,Rt=e=>{if(e.filterNode||e.resolveIframeContent||e.prunedElements)return null;let t=e.clip;return`${e.scale}|${e.pixelRatio}|${e.backgroundColor??\"\"}|${e.embedFonts}|${e.bleed}|${e.timeoutMs}|`+(t?`${t.x},${t.y},${t.width},${t.height}`:\"\")},sl=e=>{let t=!1;return G(e,r=>ee(r)&&al.test(r.selectorText)?(t=!0,!0):!1,()=>(t=!0,!0)),t},Kr=e=>typeof e.getAnimations!=\"function\"||e.getAnimations().length>0,cl=e=>e.localName===\"input\"||e.localName===\"textarea\"||e.localName===\"select\",zr=(e,t)=>{let r=e.ownerDocument,n=r.defaultView;if(!n||r.fonts.status!==\"loaded\"||Kr(r)||e.querySelector(\"canvas,video,iframe,object,embed,animate,animateTransform,animateMotion,set\")||sl(r))return null;let o=[],l=[],i=[],a=[],s=[],d=[];for(let[u,f]of t){if(u.shadowRoot)return null;o.push(u),l.push(f.scrollLeft),i.push(f.scrollTop),cl(u)&&(a.push(u),s.push(u.value),d.push(u instanceof HTMLInputElement?u.checked||u.indeterminate:!1))}let c=he(r);return{documentEpoch:c.epoch,cssRuleCount:c.cssRuleCount,activeElement:r.activeElement,windowScrollX:n.scrollX,windowScrollY:n.scrollY,viewportWidthPx:n.innerWidth,viewportHeightPx:n.innerHeight,devicePixelRatio:n.devicePixelRatio,scrollElements:o,scrollLefts:l,scrollTops:i,formElements:a,formValues:s,formCheckedStates:d}},Hr=(e,t)=>{let r=e.ownerDocument,n=r.defaultView;if(!n)return!1;let o=he(r);if(o.epoch!==t.documentEpoch||r.activeElement!==t.activeElement||r.fonts.status!==\"loaded\"||n.scrollX!==t.windowScrollX||n.scrollY!==t.windowScrollY||n.innerWidth!==t.viewportWidthPx||n.innerHeight!==t.viewportHeightPx||n.devicePixelRatio!==t.devicePixelRatio||Kr(r)||o.cssRuleCount!==t.cssRuleCount)return!1;let{scrollElements:l,scrollLefts:i,scrollTops:a}=t;for(let u=0;u<l.length;u++){let f=l[u];if(f.scrollLeft!==i[u]||f.scrollTop!==a[u])return!1}let{formElements:s,formValues:d,formCheckedStates:c}=t;for(let u=0;u<s.length;u++){let f=s[u],p=f instanceof HTMLInputElement?f.checked||f.indeterminate:!1;if(f.value!==d[u]||p!==c[u])return!1}return!0},Gr=(e,t,r,n)=>{r===null||!Hr(e,r)||$r.set(e,{...n,optionsKey:t,stamp:r})},kt=(e,t)=>{let r=$r.get(e);return!r||r.optionsKey!==t||!Hr(e,r.stamp)?null:r};var Yr=(e,t,r)=>{let n=e*.2,o=t*(2/13),l=(t-o)/2,i=e-2*n,a=`<svg xmlns='${X}' width='${e}' height='${t}'><rect width='${e}' height='${t}' rx='2' fill='${r}'/><rect x='${n}' y='${l}' width='${i}' height='${o}' rx='${Math.min(2,o/2)}' fill='#ffffff'/></svg>`;return`appearance:none;-webkit-appearance:none;border:none;background-color:transparent;background-image:url(\"data:image/svg+xml,${encodeURIComponent(a)}\");background-repeat:no-repeat;background-position:center;background-size:100% 100%;`},V=e=>e.nodeType===Node.ELEMENT_NODE,I=(e,t)=>e.localName===t&&e.namespaceURI===\"http://www.w3.org/1999/xhtml\",re=(e,t=!0)=>{let r=e.shadowRoot;if(r===null&&!t)return e.childNodes;let n=r?r.childNodes:e.childNodes,o=!1;for(let i=0;i<n.length;i+=1){let a=n[i];if(V(a)&&a.localName===\"slot\"){o=!0;break}}if(!o)return n;let l=[];for(let i of n)if(V(i)&&I(i,\"slot\")){if(i.ownerDocument.defaultView?.getComputedStyle(i)?.display===\"none\")continue;let a=i.assignedNodes({flatten:!0});a.length>0?l.push(...a):l.push(...i.childNodes)}else l.push(i);return l};var ul=RegExp(\"[\\\\u0000-\\\\u0008\\\\u000B\\\\u000C\\\\u000E-\\\\u001F\\\\uFFFE\\\\uFFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?<![\\\\uD800-\\\\uDBFF])[\\\\uDC00-\\\\uDFFF]\",\"g\"),dl=/[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uFFFE\\uFFFF]/,fl=/[\\uD800-\\uDFFF]/,Z=e=>!dl.test(e)&&e.isWellFormed()?e:e.replace(ul,t=>fl.test(t)?\"\\uFFFD\":\"\"),Tt=/^[A-Za-z_][A-Za-z0-9_.-]*$/,pl=e=>e.namespaceURI===null?e.name!==\"xmlns\"&&Tt.test(e.name):(e.prefix===null||Tt.test(e.prefix))&&Tt.test(e.localName),qr=e=>{for(let t of[...e.attributes]){if(!pl(t)){e.removeAttributeNode(t);continue}let r=Z(t.value);r!==t.value&&(t.value=r)}},je=e=>{for(let t of e.querySelectorAll(\"script\"))t.remove();qr(e);for(let t of e.querySelectorAll(\"*\"))qr(t)};var ml=(e,t,r)=>{let n=[];for(let o of e.split(\",\")){let[l,i]=o.trim().split(/\\s+/);if(!l)continue;let a=1;i?.endsWith(\"x\")?a=Number.parseFloat(i):i?.endsWith(\"w\")&&(a=t>0?Number.parseFloat(i)/t:1),!Number.isFinite(a)||a<=0||n.push({url:l,density:a})}return n.length===0?null:(n.sort((o,l)=>o.density-l.density),(n.find(o=>o.density>=r)??n[n.length-1]).url)},ue=e=>e!==void 0&&e!==\"none\",hl=e=>ur.has(e.position??\"\")||ue(e.transform)||ue(e.filter)||ue(e[\"backdrop-filter\"])||ue(e.perspective),Xr=e=>(e.scrollLeft!==0||e.scrollTop!==0)&&(e.styles[\"overflow-x\"]!==void 0&&e.styles[\"overflow-x\"]!==\"visible\"||e.styles[\"overflow-y\"]!==void 0&&e.styles[\"overflow-y\"]!==\"visible\"),gl=(e,t)=>{let r=t.snapshotByElement.get(e);if(r)for(let[n,o]of t.snapshotByElement){if(n===e||o.styles.position!==\"fixed\")continue;let l=t.cloneByElement.get(n);if(!l||!l.parentNode)continue;let i=n.getBoundingClientRect(),a=null,s=null,d=o.parentElement;for(;d&&d!==e;){let f=t.snapshotByElement.get(d);if(!f)break;if(Xr(f)||hl(f.styles)){a=d,s=f;break}d=f.parentElement}let c,u;if(a&&s){let f=a.getBoundingClientRect(),p=s.styles;if(c=i.left-f.left-v(p[\"border-left-width\"]),u=i.top-f.top-v(p[\"border-top-width\"]),Xr(s)){let b=a.ownerDocument.defaultView?.getComputedStyle(a);c+=s.scrollLeft-v(b?.getPropertyValue(\"padding-left\")),u+=s.scrollTop-v(b?.getPropertyValue(\"padding-top\"))}}else{let f=e.getBoundingClientRect(),p=(r.styles.position??\"static\")!==\"static\";c=i.left-f.left-(p?v(r.styles[\"border-left-width\"]):0),u=i.top-f.top-(p?v(r.styles[\"border-top-width\"]):0)}l.setAttribute(\"style\",`${l.getAttribute(\"style\")??\"\"}position:absolute;top:${u}px;left:${c}px;right:auto;bottom:auto;margin:0;`)}},bl=(e,t)=>{let r=t.snapshotByElement.get(e);if(!r)return;let n=e.getBoundingClientRect(),o=r.styles,l=e.ownerDocument.defaultView?.getComputedStyle(e),i=n.left+v(o[\"border-left-width\"])+v(l?.getPropertyValue(\"padding-left\")),a=n.top+v(o[\"border-top-width\"])+v(l?.getPropertyValue(\"padding-top\")),s=(c,u)=>{let f=t.cloneByElement.get(c);if(!f||!f.parentNode)return;let p=c.getBoundingClientRect(),b=t.ownerDocument.createElement(\"div\"),m=[\"top\",\"right\",\"bottom\",\"left\"].map(k=>`border-${k}-width:${u.styles[`border-${k}-width`]??\"0px\"};border-${k}-style:${u.styles[`border-${k}-style`]??\"none\"};border-${k}-color:${u.styles[`border-${k}-color`]??\"currentcolor\"};`).join(\"\");b.setAttribute(\"style\",`visibility:hidden;box-sizing:border-box;display:${u.styles.display??\"block\"};${m}width:${p.width}px;height:${p.height}px;margin:${u.styles[\"margin-top\"]??\"0px\"} ${u.styles[\"margin-right\"]??\"0px\"} ${u.styles[\"margin-bottom\"]??\"0px\"} ${u.styles[\"margin-left\"]??\"0px\"};`),f.parentNode.insertBefore(b,f);let g=p.left-i+r.scrollLeft,x=p.top-a+r.scrollTop,A=c.closest(\"table\"),S=!!A&&c.ownerDocument.defaultView?.getComputedStyle(A).borderCollapse===\"collapse\",w=S?v(u.styles[\"border-top-width\"])/2:0,y=S?v(u.styles[\"border-bottom-width\"])/2:0,R=u.styles[\"box-sizing\"]===\"border-box\"?0:v(u.styles[\"padding-top\"])+v(u.styles[\"padding-bottom\"]),N=S?`height:${p.height-w-y-R}px;border-top-width:0px;border-bottom-width:0px;`:\"\";f.setAttribute(\"style\",`${f.getAttribute(\"style\")??\"\"}position:absolute;top:${x+w}px;left:${g}px;right:auto;bottom:auto;margin:0;${N}`)},d=c=>{for(let u of re(c)){if(!V(u))continue;let f=t.snapshotByElement.get(u);if(f&&!(f.scrollLeft!==0||f.scrollTop!==0)){if(f.styles.position===\"sticky\"){s(u,f);continue}d(u)}}};d(e)},yl=(e,t,r,n)=>{let o=n.createElement(\"div\");for(o.setAttribute(\"style\",`all:unset;display:inherit;flex-direction:inherit;flex-wrap:inherit;row-gap:inherit;column-gap:inherit;align-items:inherit;align-content:inherit;justify-content:inherit;justify-items:inherit;grid-template-columns:inherit;grid-template-rows:inherit;grid-template-areas:inherit;grid-auto-flow:inherit;grid-auto-columns:inherit;grid-auto-rows:inherit;transform:translate(${-t}px,${-r}px);will-change:transform;contain:layout;`);e.firstChild;)o.appendChild(e.firstChild);e.appendChild(o)},jr=e=>ue(e[\"background-image\"])||e[\"background-color\"]!==void 0&&e[\"background-color\"]!==\"transparent\"&&e[\"background-color\"]!==\"rgba(0, 0, 0, 0)\",Zr=e=>e!==void 0&&e.endsWith(\"px\")&&Number.parseFloat(e)||0,Sl=(e,t)=>{let r=t.styles[\"background-image\"],n=t.styles[\"background-attachment\"];if(!ue(r)||n===void 0)return;let o=Ze(r),l=Ze(n);if(o.length!==l.length)return;let i=l.some((u,f)=>o[f]!==\"none\"&&u===\"local\"),a=l.some((u,f)=>o[f]!==\"none\"&&u!==\"local\");if(!i||a)return;let s=Ze(t.styles[\"background-position-x\"]??\"0%\"),d=Ze(t.styles[\"background-position-y\"]??\"0%\");if(s.length!==o.length||d.length!==o.length)return;let c=(u,f)=>u.map((p,b)=>o[b]===\"none\"?p:`calc(${p} - ${f}px)`).join(\", \");e.style.setProperty(\"background-position-x\",c(s,t.scrollLeft),\"important\"),e.style.setProperty(\"background-position-y\",c(d,t.scrollTop),\"important\")},wl=(e,t,r,n,o)=>{let l=t.ownerDocument,i=l.body,a=i?n.snapshotByElement.get(i):void 0;if(!a||jr(r.styles)||!jr(a.styles))return;let s=a.styles,d=s[\"background-image\"]??\"none\",c=t.getBoundingClientRect(),u=ue(d)&&d.includes(\"gradient(\")&&!d.includes(\"url(\"),f=u?`${c.width}px ${c.height}px`:s[\"background-size\"]??\"auto\",p=l.createElement(\"div\");p.setAttribute(\"style\",`position:absolute;z-index:-1;left:0px;top:0px;width:${o.width}px;height:${o.height}px;pointer-events:none;background-color:${s[\"background-color\"]??\"transparent\"};background-image:${d};background-repeat:${s[\"background-repeat\"]??\"repeat\"};background-size:${f};background-position-x:${Zr(s[\"background-position-x\"])-o.x}px;background-position-y:${Zr(s[\"background-position-y\"])-o.y}px;`),e.insertBefore(p,e.firstChild);let b=n.cloneByElement.get(i);b&&b.style.setProperty(\"background\",\"none\",\"important\")},xl=(e,t)=>{let r=t.ownerDocument.createElement(\"div\"),n=e.ownerDocument.defaultView.getComputedStyle(e),o=\"display:inline-block;overflow:hidden;white-space:pre-wrap;box-sizing:content-box;\";for(let l of[\"top\",\"right\",\"bottom\",\"left\"])o+=`border-${l}-width:${n.getPropertyValue(`border-${l}-width`)};border-${l}-style:${n.getPropertyValue(`border-${l}-style`)};border-${l}-color:${n.getPropertyValue(`border-${l}-color`)};padding-${l}:${n.getPropertyValue(`padding-${l}`)};`;return r.setAttribute(\"style\",o),r},Ze=e=>ie(e).map(t=>t.trim()),Pt=/^[A-Za-z_][A-Za-z0-9_.-]*$/,en=new Set([\"class\",\"style\",\"srcset\",\"sizes\",\"loading\",\"slot\"]),El=new Set([\"input\",\"select\",\"option\",\"textarea\"]),Qe=new Map,Al=e=>{if(!e.hasAttributes())return!0;let t=e.attributes.length;if(t>2)return!1;let r=+!!e.hasAttribute(\"class\");return e.hasAttribute(\"style\")&&(r+=1),r===t},Qr=new Map,Cl=e=>{let t=Qr.get(e);return t===void 0&&(t=Pt.test(e),Qr.set(e,t)),t},tn=e=>e.namespaceURI===null?e.name!==\"xmlns\"&&Cl(e.name):(e.prefix===null||Pt.test(e.prefix))&&Pt.test(e.localName),Rl=e=>{let t=e.attributes;for(let r=t.length-1;r>=0;r--){let n=t[r];if(en.has(n.name)||!tn(n)){e.removeAttributeNode(n);continue}let o=Z(n.value);o!==n.value&&(n.value=o)}},Jr=(e,t)=>{let r=e.namespaceURI===\"http://www.w3.org/1999/xhtml\"&&e.prefix===null?t.createElement(e.localName):t.createElementNS(e.namespaceURI,e.prefix===null?e.localName:`${e.prefix}:${e.localName}`),n=e.attributes;for(let o=0;o<n.length;o++){let l=n[o];en.has(l.name)||!tn(l)||r.setAttributeNS(l.namespaceURI,l.name,Z(l.value))}return r},kl=e=>e.namespaceURI===\"http://www.w3.org/2000/svg\"&&Ke.has(e.localName),Tl=e=>{for(let t of fr)e.hasAttribute(t)&&e.removeAttribute(t)},Pl=e=>{let t=e.cloneNode(!1);if(!V(t))return null;let r=e.currentSrc||e.src;if(!r&&e.srcset){let n=ml(e.srcset,e.offsetWidth,e.ownerDocument.defaultView?.devicePixelRatio??1);n&&(r=te(n,e.baseURI))}return r&&t.setAttribute(\"src\",r),t},Nl=(e,t)=>{let r=t.createElement(\"img\");r.setAttribute(\"width\",String(e.width)),r.setAttribute(\"height\",String(e.height));try{r.setAttribute(\"src\",e.toDataURL())}catch{r.setAttribute(\"src\",\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\")}return r},Ml=(e,t,r)=>{let n=t.createElement(\"img\"),o=\"\";if(e.videoWidth>0&&e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){let l=t.createElement(\"canvas\");l.width=e.videoWidth,l.height=e.videoHeight;let i=l.getContext(\"2d\");if(i)try{i.drawImage(e,0,0),o=l.toDataURL()}catch{o=\"\"}n.setAttribute(\"width\",String(e.videoWidth)),n.setAttribute(\"height\",String(e.videoHeight)),l.width=0,l.height=0}return o||=e.poster||\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\",n.setAttribute(\"src\",o),n.setAttribute(\"style\",`object-fit:${r[\"object-fit\"]??\"contain\"};object-position:${r[\"object-position\"]??\"50% 50%\"};`),n},Bl=(e,t,r)=>{if(I(e,\"input\")){if(t.setAttribute(\"value\",e.value),e.checked?t.setAttribute(\"checked\",\"\"):t.removeAttribute(\"checked\"),e.type===\"checkbox\"&&e.indeterminate){let n=r[\"accent-color\"];t.setAttribute(\"style\",Yr(v(r.width),v(r.height),n&&n!==\"auto\"?n:\"rgb(0, 117, 255)\"))}}else I(e,\"option\")&&(e.selected?t.setAttribute(\"selected\",\"\"):t.removeAttribute(\"selected\"))},vl=(e,t)=>(e===void 0||e===\"visible\")&&(t===void 0||t===\"visible\"),Il=(e,t)=>{let r=t.ownerDocument.createElement(\"div\"),n=t.iframeContentByElement.get(e);if(n){r.style.overflow=\"hidden\",n.canvasBackgroundColor&&(r.style.backgroundColor=n.canvasBackgroundColor);let o=t.ownerDocument.createElement(\"img\");o.setAttribute(\"src\",n.pngDataUrl),o.setAttribute(\"style\",`display:block;width:${n.widthPx}px;height:${n.heightPx}px;`),r.appendChild(o)}else r.setAttribute(\"style\",\"background:#d9d9d9;\");return r},Ne=(e,t,r,n)=>{if(V(t)){let o=rn(t,r,n);o&&e.appendChild(o)}else t.nodeType===Node.TEXT_NODE&&e.appendChild(r.ownerDocument.createTextNode(Z(t.textContent??\"\")))},_l=(e,t)=>e.ownerDocument.compatMode===\"BackCompat\"&&[\"block\",\"list-item\",\"table-cell\",\"table-caption\",\"flow-root\",\"inline-block\"].includes(t.snapshotByElement.get(e)?.styles.display??\"\"),Ll=(e,t,r)=>{let n=[],o=!1,l=!1,i=()=>{if(n.length>0)if(o&&!l){let a=r.ownerDocument.createElement(\"span\");a.setAttribute(\"style\",\"display:block;line-height:0\"),e.appendChild(a);for(let s of n)Ne(a,s,r,!1)}else for(let a of n)Ne(e,a,r,!1);n=[],o=!1,l=!1};for(let a=t.firstChild;a!==null;a=a.nextSibling)if(V(a)){let s=r.snapshotByElement.get(a)?.styles.display;s===void 0||s===\"none\"?n.push(a):s.startsWith(\"inline\")?(o||=I(a,\"img\"),l||=!I(a,\"img\"),n.push(a)):(i(),Ne(e,a,r,!1))}else a.nodeType===Node.TEXT_NODE&&(n.push(a),l||=!/^\\s*$/.test(a.textContent??\"\"));i()},rn=(e,t,r=!1)=>{if(kl(e)){let m=e.cloneNode(!0);return V(m)?(je(m),m):null}let n=t.snapshotByElement.get(e);if(!n)return null;let o=e.namespaceURI===\"http://www.w3.org/1999/xhtml\"&&e.prefix===null,l=o?e.localName:\"\",i,a=!0,s=!1;if(l===\"iframe\"&&I(e,\"iframe\"))i=Il(e,t),a=!1;else if(l===\"canvas\"&&I(e,\"canvas\"))i=Nl(e,t.ownerDocument),a=!1;else if(l===\"video\"&&I(e,\"video\"))i=Ml(e,t.ownerDocument,n.styles),a=!1;else if(l===\"img\"&&I(e,\"img\"))i=Pl(e),i&&Rl(i),a=!1;else if(l===\"textarea\")i=n.scrollTop!==0||n.scrollLeft!==0?xl(e,t):Jr(e,t.ownerDocument),a=!1;else if(o&&!El.has(l)&&Al(e)){let m=t.classNameByElement.get(e)??\"\",g=t.inlineCarryTextByElement.get(e)??\"\";if(m===\"\"&&g===\"\")i=t.ownerDocument.createElement(e.localName);else{let x=`${e.localName}|${m}|${g}`,A=Qe.get(x);A===void 0&&(A=t.ownerDocument.createElement(e.localName),m!==\"\"&&A.setAttribute(\"class\",m),g!==\"\"&&A.setAttribute(\"style\",g),Qe.size>=4096&&Qe.clear(),Qe.set(x,A));let S=A.cloneNode(!1);i=V(S)?S:null,s=!0}}else i=Jr(e,t.ownerDocument);if(!i)return null;t.prunedElements?.has(e)&&(a=!1),(l===\"input\"||l===\"option\")&&Bl(e,i,n.styles);let d=s?void 0:t.inlineCarryTextByElement.get(e);if(d!==void 0){let m=i.getAttribute(\"style\");i.setAttribute(\"style\",m?d+m:d)}let c=s?void 0:t.classNameByElement.get(e);if(c&&(o?i.className=c:(i.setAttribute(\"class\",c),e.namespaceURI===\"http://www.w3.org/2000/svg\"&&Tl(i))),l===\"textarea\"&&I(e,\"textarea\")&&(i.textContent=Z(e.value)),t.cloneByElement.set(e,i),a){let m=r||!!e.shadowRoot,g=e.firstChild;if(!m&&g!==null&&g===e.lastChild&&g.nodeType===Node.TEXT_NODE)i.textContent=Z(g.textContent??\"\");else if(m)for(let x of re(e,m))Ne(i,x,t,m);else if(_l(e,t))Ll(i,e,t);else for(let x=e.firstChild;x!==null;x=x.nextSibling)Ne(i,x,t,!1)}let u=t.viewportScroll&&e===e.ownerDocument.documentElement?t.viewportScroll:null,f=u?u.x:n.scrollLeft,p=u?u.y:n.scrollTop,b=(f!==0||p!==0)&&(u!==null||!vl(n.styles[\"overflow-x\"],n.styles[\"overflow-y\"]));return b&&(yl(i,f,p,t.ownerDocument),bl(e,t)),u?wl(i,e,n,t,u):b&&Sl(i,n),i},nn=(e,t)=>{let r=rn(e,t);return r&&gl(e,t),r};var ne=e=>{let t=new Map;return{get:r=>t.get(r),set:(r,n)=>{if(!t.has(r)&&t.size>=e){let o=t.keys().next().value;o!==void 0&&t.delete(o)}t.set(r,n)},delete:r=>{t.delete(r)}}},on=new Map,ge=e=>{let t=on.get(e);if(t!==void 0)return t;let r=e.startsWith(\"--\")||e.includes(\"animation\")||e.includes(\"transition\")||e.startsWith(\"view-timeline\")||e.startsWith(\"scroll-timeline\")||Er.has(e);return on.set(e,r),r},Fl=new Set([\"width\",\"height\",\"inline-size\",\"block-size\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"top\",\"right\",\"bottom\",\"left\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\"]),de=(e,t)=>{if(!Fl.has(e)||t===void 0||!t.endsWith(\"px\"))return t;let r=Number.parseFloat(t);if(!Number.isFinite(r)||r===0)return t;let n=32*10**(Math.floor(Math.log10(Math.abs(r)))-5);if(!(n<.5))return t;let o=r*64,l=Math.round(o);return l!==o&&Math.abs(o-l)<=n?`${l/64}px`:t},Nt=[],J=(e,t,r=!1)=>{let n={};if(t)for(let o of t){let l=de(o,e.getPropertyValue(o));l!==\"\"&&(n[o]=l)}else if(r){if(!Nt.length)for(let o=0;o<e.length;o++){let l=e.item(o);ge(l)||Nt.push(l)}for(let o of Nt)n[o]=de(o,e.getPropertyValue(o))}else for(let o=0;o<e.length;o++){let l=e.item(o);ge(l)||(n[l]=de(l,e.getPropertyValue(l)))}for(let o of yt){if(n[o]!==void 0)continue;let l=de(o,e.getPropertyValue(o));l&&(n[o]=l)}return n},ln=new Map,Mt=(e,t)=>{let r=ln.get(t);if(r===void 0){r=[];for(let o=0;o<e.length;o++){let l=e.item(o);ge(l)||t(l)&&r.push(l)}ln.set(t,r)}let n={};for(let o of r)n[o]=e.getPropertyValue(o);for(let o of yt){if(n[o]!==void 0||!t(o))continue;let l=e.getPropertyValue(o);l&&(n[o]=l)}return n},an=ne(256),Ol=(e,t,r)=>{let n=e.namespaceURI===\"http://www.w3.org/2000/svg\"?\"svg|\":\"\",o=I(e,\"input\")?`|${e.type}`:\"\";return`${n}${e.localName}${o}|${t??\"\"}|${r??\"\"}`},cn=e=>{let t=null,r=()=>{if(!t){let n=e.createElement(\"iframe\");n.setAttribute(\"style\",\"position:absolute;left:-9999px;top:0;visibility:hidden;width:64px;height:64px;border:0;\"),n.setAttribute(\"aria-hidden\",\"true\"),n.setAttribute(\"data-fhti-epoch-ignored\",\"\"),(e.body??e.documentElement).appendChild(n),t=n}return t.contentDocument};return{getBaseline:(n,o,l)=>{let i=l[\"font-size\"],a=l.appearance===\"auto\"?l[\"color-scheme\"]:void 0,s=a&&a!==\"normal\"?a:\"\",d=Ol(n,o,s?`${i??\"\"}|color-scheme:${s}`:i),c=an.get(d);if(c)return c;let u=r(),f=u?.body,p=u?.defaultView;if(!u||!f||!p)return{};let b,m;if(n.namespaceURI===\"http://www.w3.org/2000/svg\"){let A=u.createElementNS(X,\"svg\");b=u.createElementNS(X,n.localName),A.appendChild(b),m=A}else b=u.createElement(n.localName),I(n,\"input\")&&b.setAttribute(\"type\",n.type),b.textContent=\" \",m=b;(i||s)&&b.setAttribute(\"style\",`${i?`font-size:${i};`:\"\"}${s?`color-scheme:${s};`:\"\"}`),f.appendChild(m);let g=[];for(let A in l)g.push(A);let x=J(p.getComputedStyle(b,o??void 0),g);return s&&(x[\"color-scheme\"]=\"normal\"),m.remove(),an.set(d,x),x},dispose:()=>{t?.remove(),t=null}}},Je=e=>Tr.has(e)||e.startsWith(\"font\")||e.startsWith(\"text-emphasis\")||e.startsWith(\"list-style\")||e.startsWith(\"-webkit-text\"),sn=new Set(ze.filter(e=>e.includes(\"border\"))),Me=({styles:e,baseline:t,parentStyles:r,parentEmittedStyles:n})=>{let o={},l=e.appearance===\"auto\";for(let s in e){let d=e[s];if(d!==void 0){if(d!==t[s]){o[s]=d;continue}mt.has(s)&&!(l&&ht.has(s))&&(o[s]=d)}}let i=e.color,a=l&&e[\"color-scheme\"]!==t[\"color-scheme\"];for(let s of ze){let d=e[s];if(d===void 0)continue;let c=l&&sn.has(s)&&d===t[s];(a&&sn.has(s)?c:d===i||c)?delete o[s]:o[s]=d}if(n&&r)for(let s in n){if(s in o||!Je(s))continue;let d=e[s];d!==void 0&&d!==r[s]&&(o[s]=d)}return o},Bt=(e,t,r,n)=>{let o=t.appearance===\"auto\";for(let l of n){let i=t[l];if(i===void 0){delete e[l];continue}if(i!==r[l]){e[l]=i;continue}mt.has(l)&&!(o&&ht.has(l))?e[l]=i:delete e[l]}},un=e=>e.every(t=>!Je(t)&&!ze.includes(t)&&t!==\"appearance\"&&t!==\"color\"&&t!==\"font-size\"),be=(e,t)=>{e[\"transform-origin\"]!==void 0&&(t.transform??\"none\")===\"none\"&&(t.rotate??\"none\")===\"none\"&&(t.scale??\"none\")===\"none\"&&delete e[\"transform-origin\"],e[\"perspective-origin\"]!==void 0&&(t.perspective??\"none\")===\"none\"&&delete e[\"perspective-origin\"],t[\"writing-mode\"]===\"horizontal-tb\"&&(e[\"inline-size\"]!==void 0&&e[\"inline-size\"]===e.width&&delete e[\"inline-size\"],e[\"block-size\"]!==void 0&&e[\"block-size\"]===e.height&&delete e[\"block-size\"])},dn=e=>e.startsWith(\"font\")||mr.has(e),fn=e=>dn(e)||e===\"line-height\",pn=(e,t)=>{if(!e)return null;let r=null;for(let n in e){if(!dn(n)&&n!==\"line-height\")continue;let o=e[n];o!==void 0&&o!==(n===\"content\"?\"normal\":t[n])&&(r??={},r[n]=o)}return r},ye=(e,t,r,n,o)=>{if(!n&&t.display===\"inline\")for(let a of gt)delete e[a];if(o!==null&&dr.has(o)){let a=e.width??t.width,s=o===\"table\"&&(t.float??\"none\")!==\"none\",d=bt.has(o)&&(t[\"writing-mode\"]??\"horizontal-tb\")!==\"horizontal-tb\"&&t.height!==void 0&&t.height!==\"auto\";for(let f of gt)s&&f===\"width\"||o===\"tr\"&&f===\"height\"||delete e[f];d&&(e.height=t.height);let c=t[\"min-width\"],u=c!==void 0&&c!==\"auto\"&&c!==\"0px\";bt.has(o)&&a&&!u&&(e[\"min-width\"]=a)}if(((t[\"column-count\"]??\"auto\")!==\"auto\"||(t[\"column-width\"]??\"auto\")!==\"auto\")&&e.height!==void 0&&!(parseFloat(t[\"min-height\"])>0)){let a=e.height;e[\"min-height\"]=a,delete e.height,e[\"block-size\"]===a&&delete e[\"block-size\"]}let l=r!==null&&r.includes(\"flex\"),i=r!==null&&r.includes(\"grid\");l&&(e[\"flex-grow\"]=\"0\",e[\"flex-shrink\"]=\"0\",e[\"flex-basis\"]=\"auto\"),(l||i)&&t[\"min-width\"]===\"auto\"&&(e[\"min-width\"]=\"0px\")},mn=(e,t)=>{if(e[\"margin-top\"]=\"0px\",e[\"margin-right\"]=\"0px\",e[\"margin-bottom\"]=\"0px\",e[\"margin-left\"]=\"0px\",e.right=\"auto\",e.bottom=\"auto\",delete e[\"margin-block-start\"],delete e[\"margin-block-end\"],delete e[\"margin-inline-start\"],delete e[\"margin-inline-end\"],delete e[\"inset-block-start\"],delete e[\"inset-block-end\"],delete e[\"inset-inline-start\"],delete e[\"inset-inline-end\"],t.contentOffsetLeftPx!==0||t.contentOffsetTopPx!==0)e.position=\"relative\",e.left=`${t.contentOffsetLeftPx}px`,e.top=`${t.contentOffsetTopPx}px`;else{e.top=\"auto\",e.left=\"auto\";let n=e.position;(n===\"fixed\"||n===\"absolute\"||n===\"sticky\")&&(e.position=\"relative\")}let r=t.rootLinearTransform;if(r){let{a:n,b:o,c:l,d:i}=r;e.transform=`matrix(${n}, ${o}, ${l}, ${i}, 0, 0)`,e[\"transform-origin\"]=\"0px 0px\"}else e.transform&&=\"none\";e.rotate&&=\"none\",e.scale&&=\"none\",e.translate&&=\"none\",e.float&&=\"none\",e.clear&&=\"none\",e[\"box-sizing\"]=\"border-box\",e.width=`${t.layoutWidthPx}px`,e.height=`${t.layoutHeightPx}px`,delete e[\"inline-size\"],delete e[\"block-size\"]};var Dl=e=>{if(typeof e.toBase64==\"function\")return e.toBase64();let t=\"\";for(let r=0;r<e.length;r+=32768)t+=String.fromCharCode(...e.subarray(r,r+32768));return btoa(t)},et=async e=>{let t=new Uint8Array(await e.arrayBuffer());return`data:${e.type||\"application/octet-stream\"};base64,${Dl(t)}`},$l=async(e,t)=>{let r=new AbortController,n=setTimeout(()=>r.abort(),t),o=setTimeout(()=>r.abort(),Math.min(t,Lt));try{let l=await fetch(e,{mode:\"cors\",cache:\"force-cache\",signal:r.signal});return clearTimeout(o),l.ok?await et(await l.blob()):null}catch{return null}finally{clearTimeout(n),clearTimeout(o)}},gn=ne(150),vt=new Map,Sn=0,wn=()=>Sn,oe=(e,t)=>{let r=gn.get(e);if(r!==void 0)return Promise.resolve(r);let n=`${t}:${e}`,o=vt.get(n);if(o)return o;let l=$l(e,t).then(i=>(vt.delete(n),i!==null&&(Sn++,gn.set(e,i)),i));return vt.set(n,l),l},It=e=>e.length>0&&!e.startsWith(\"data:\")&&!e.startsWith(\"#\")&&!e.startsWith(\"about:\"),_t=(e,t)=>{let r=e.matches(t)?[e]:[];return r.push(...e.querySelectorAll(t)),r},xn=e=>{let t=new Map;for(let o of _t(e,\"img\")){let l=o.getAttribute(\"src\");l&&l.length>=1024&&l.startsWith(\"data:\")&&(t.get(l)??t.set(l,[]).get(l)).push(o)}let r=\"\",n=0;for(let[o,l]of t){if(l.length<2)continue;let i=`fhti-img-${++n}`;r+=`img.${i}{content:url(\"${o.replace(/[\\\\\"]/g,a=>`\\\\${a}`)}\")}\n`;for(let a of l)a.classList.add(i),a.setAttribute(\"src\",\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\")}return r},En=async(e,t,r)=>{let n=[];for(let o of _t(e,\"img\")){let l=o.getAttribute(\"src\");!l||!It(l)||n.push(oe(l,r).then(i=>{o.setAttribute(\"src\",i??\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\")}))}for(let o of _t(e,\"image\")){let l=o.getAttribute(\"href\")??o.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\");!l||!It(l)||n.push(oe(l,r).then(i=>{let a=i??\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\";o.setAttribute(\"href\",a),o.hasAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\")&&o.setAttributeNS(pt,\"xlink:href\",a)}))}for(let o of t)for(let l of[o.baseStyles,o.beforeStyles,o.afterStyles,o.firstLetterStyles,o.markerStyles])if(l)for(let i in l){let a=l[i];a===void 0||!a.includes(\"url(\")||(o.cachedBlocks=null,n.push(Be(a,async s=>It(s)?await oe(s,r)??\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\":s).then(s=>{l[i]=s})))}await Promise.allSettled(n)},bn=/url\\(\\s*[\"']?#([^\"')\\s]+)[\"']?\\s*\\)/g,Ul=e=>e.getAttribute(\"href\")??e.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\"),yn=(e,t)=>{e.id&&t.add(e.id);for(let r of e.querySelectorAll(\"[id]\"))t.add(r.id)},Vl=(e,t)=>{let r=e.matches(t)?[e]:[];return r.push(...e.querySelectorAll(t)),r},An=async({clone:e,rules:t,sourceDocument:r,timeoutMs:n})=>{let o=new Set;yn(e,o);let l=new Set,i=[],a=new Map,s=(m,g)=>{o.has(m)||l.has(m)||(l.add(m),i.push({fragmentId:m,lookupDocuments:g}))},d=(m,g,x)=>{for(let S of Vl(m,\"use\")){let w=Ul(S);if(w){if(w.startsWith(\"#\"))s(w.slice(1),g);else if(x&&w.includes(\"#\")){let[y,R]=w.split(\"#\");if(!R)continue;let N=te(y,r.baseURI),k=a.get(N)??[];k.push({fragmentId:R,useElement:S}),a.set(N,k)}}}let A=S=>{if(S.namespaceURI===\"http://www.w3.org/2000/svg\"){for(let w of S.attributes)if(w.value.includes(\"url(\"))for(let y of w.value.matchAll(bn))s(y[1],g)}};A(m);for(let S of m.querySelectorAll(\"*\"))A(S)},c=null,u=()=>{if(c)return c;let m=e.ownerDocument,g=m.createElementNS(X,\"svg\");return g.setAttribute(\"aria-hidden\",\"true\"),g.setAttribute(\"style\",\"position:absolute;width:0;height:0;overflow:hidden;\"),c=m.createElementNS(X,\"defs\"),g.appendChild(c),e.appendChild(g),c},f=()=>{for(;i.length>0;){let m=i.pop();if(!m)break;if(o.has(m.fragmentId))continue;let g=null;for(let A of m.lookupDocuments){let S=A.getElementById(m.fragmentId);if(S&&S.namespaceURI===\"http://www.w3.org/2000/svg\"){g=S;break}}if(!g)continue;let x=g.cloneNode(!0);V(x)&&(je(x),u().appendChild(x),yn(x,o),d(x,m.lookupDocuments,!1))}};d(e,[r],!0);for(let m of t){let g=[m.baseStyles,m.beforeStyles,m.afterStyles,m.firstLetterStyles];for(let x of g)if(x)for(let A of pr){let S=x[A];if(!(S===void 0||!S.includes(\"url(\")))for(let w of S.matchAll(bn))s(w[1],[r])}}f();let p=[...a],b=await Promise.all(p.map(([m])=>Ft(m,n)));for(let m=0;m<p.length;m++){let g=p[m][1],x=b[m];if(x===null)continue;let A=new DOMParser().parseFromString(x,\"image/svg+xml\");if(!A.querySelector(\"parsererror\")){for(let{fragmentId:S,useElement:w}of g)s(S,[A,r]),w.setAttribute(\"href\",`#${S}`),w.hasAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\")&&w.setAttributeNS(pt,\"xlink:href\",`#${S}`);f()}}},Cn=e=>{let t=new Image;return t.src=e,t.decode().then(()=>({widthPx:t.naturalWidth,heightPx:t.naturalHeight})).catch(()=>null)};var Wl=/\\/\\*[\\s\\S]*?\\*\\//g,Kl=e=>{let t=e.replace(Wl,\"\"),r=[],n=0;for(;n<t.length;){let o=t.indexOf(\"@font-face\",n);if(o===-1)break;let l=t.indexOf(\"{\",o);if(l===-1)break;let i=t.indexOf(\"}\",l);if(i===-1)break;r.push(`@font-face{${t.slice(l+1,i)}}`),n=i+1}return r},Lt=3e3,Ft=async(e,t)=>{let r=new AbortController,n=setTimeout(()=>r.abort(),t),o=setTimeout(()=>r.abort(),Math.min(t,Lt));try{let l=await fetch(e,{mode:\"cors\",cache:\"force-cache\",signal:r.signal});return clearTimeout(o),l.ok?await l.text():null}catch{return null}finally{clearTimeout(n),clearTimeout(o)}},Dt=e=>e.type===CSSRule.FONT_FACE_RULE,$t=e=>e?e.split(\",\").map(t=>t.trim().replace(/^[\"']|[\"']$/g,\"\").toLowerCase()).filter(t=>t.length>0&&!kr.has(t)):[],Tn=e=>{let t=e.trim().toLowerCase();return t===\"\"||t===\"auto\"||t===\"normal\"?\"normal\":t===\"italic\"?\"italic\":t===\"oblique\"||t.startsWith(\"oblique \")?\"oblique\":null},zl={normal:400,bold:700},Rn=e=>{let t=zl[e];if(t!==void 0)return t;let r=Number(e);return Number.isFinite(r)&&r>=1&&r<=1e3?r:null},Pn=e=>{let t=e.trim().toLowerCase();if(t===\"\"||t===\"auto\")return{minWeight:400,maxWeight:400};let r=t.split(/\\s+/);if(r.length>2)return null;let n=Rn(r[0]);if(n===null)return null;if(r.length===1)return{minWeight:n,maxWeight:n};let o=Rn(r[1]);return o===null?null:{minWeight:Math.min(n,o),maxWeight:Math.max(n,o)}},Hl=/url\\(\\s*(?:\"((?:\\\\.|[^\"\\\\])*)\"|'((?:\\\\.|[^'\\\\])*)'|([^'\"()\\s][^()]*?))\\s*\\)/g,Gl=e=>e.replace(/\\\\(.)/g,\"$1\"),Yl=e=>e.replace(/([\"\\\\])/g,\"\\\\$1\"),ql=e=>{let t=e[3];return t===void 0?Gl(e[1]??e[2]??\"\"):t},Be=async(e,t)=>{let r=[...e.matchAll(Hl)];if(r.length===0)return e;let n=await Promise.all(r.map(i=>t(ql(i)))),o=\"\",l=0;return r.forEach((i,a)=>{let s=i.index??0;o+=`${e.slice(l,s)}url(\"${Yl(n[a]??\"\")}\")`,l=s+i[0].length}),o+=e.slice(l),o},Xl={normal:[\"normal\",\"oblique\",\"italic\"],italic:[\"italic\",\"oblique\",\"normal\"],oblique:[\"oblique\",\"italic\",\"normal\"]},Ot=(e,t)=>t>=e.minWeight&&t<=e.maxWeight?0:t<e.minWeight?e.minWeight-t:t-e.maxWeight,kn=(e,t)=>e.minWeight>t,jl=(e,t,r)=>{let n=e.filter(c=>Ot(t[c],r)===0);if(n.length>0)return n;let o=e.filter(c=>!kn(t[c],r)),l=e.filter(c=>kn(t[c],r)),i=c=>{let u=1/0;for(let f of c)u=Math.min(u,Ot(t[f],r));return c.filter(f=>Ot(t[f],r)===u)},a=r>500,s=a?l:o,d=a?o:l;if(r>=400&&r<=500){let c=l.filter(u=>t[u].minWeight<=500);return c.length>0?i(c):o.length>0?i(o):i(l)}return s.length>0?i(s):i(d)},Zl=(e,t)=>{let r=new Set,n=e.map((o,l)=>l);for(let o of t){let l=[];for(let i of Xl[o.styleKeyword])if(l=n.filter(a=>e[a].styleKeyword===i),l.length>0)break;if(l.length!==0)for(let i of jl(l,e,o.weight))r.add(i)}return r},Ql=/font-family\\s*:\\s*([^;}]+)/i,Jl=/font-weight\\s*:\\s*([^;}]+)/i,ei=/font-style\\s*:\\s*([^;}]+)/i,ti=/font-stretch\\s*:\\s*([^;}]+)/i,ri=/unicode-range\\s*:\\s*([^;}]+)/i,ni=/font-variation-settings\\s*:/i,oi=e=>{let t=e.trim().toLowerCase();return t===\"\"||t===\"normal\"||t===\"auto\"},li=e=>{let t={ruleSources:[],inaccessibleSheetUrls:[]};return G(e,(r,n)=>(Dt(r)&&t.ruleSources.push({rule:r,baseUrl:n}),!1),r=>(r&&t.inaccessibleSheetUrls.push(r),!1)),t},ii=(e,t,r)=>Be(e,async n=>n.startsWith(\"data:\")?n:await oe(te(n,t),r)??n),Nn=(e,t,r,n,o,l,i,a)=>{let s=Pn(n),d=Tn(o);return{familyName:e,fontFaceCssText:t,baseUrl:r,weightRange:s,styleKeyword:d,unicodeRangeKey:i.trim().toLowerCase().replace(/\\s+/g,\"\"),isPrunable:s!==null&&d!==null&&oi(l)&&!a}},ai=async(e,t,r)=>{let n=await Ft(e,r);if(!n)return[];let o=[];for(let l of Kl(n)){let[i]=$t(Ql.exec(l)?.[1]);!i||!t.has(i)||/url\\(|local\\(/.test(l)&&o.push(Nn(i,l,e,Jl.exec(l)?.[1]??\"\",ei.exec(l)?.[1]??\"\",ti.exec(l)?.[1]??\"\",ri.exec(l)?.[1]??\"\",ni.test(l)))}return o},Mn=e=>{let t=new Set;for(let r of e)for(let n of[r.baseStyles,r.beforeStyles,r.afterStyles,r.firstLetterStyles,r.markerStyles])if(n)for(let o of $t(n[\"font-family\"]))t.add(o);return t},Bn=e=>{let t=new Set([400,700]),r=new Set([\"normal\",\"italic\"]);for(let o of e)for(let l of[o.baseStyles,o.beforeStyles,o.afterStyles,o.firstLetterStyles,o.markerStyles]){if(!l)continue;let i=l[\"font-weight\"];if(i!==void 0){let s=Pn(i);if(s===null||s.minWeight!==s.maxWeight)return null;t.add(s.minWeight)}let a=l[\"font-style\"];if(a!==void 0){let s=Tn(a);if(s===null)return null;r.add(s)}}let n=[];for(let o of t)for(let l of r)n.push({weight:o,styleKeyword:l});return n},si=(e,t)=>{if(t===null)return e;let r=new Set;for(let l of e)l.isPrunable||r.add(l.familyName);let n=new Map;e.forEach((l,i)=>{if(r.has(l.familyName))return;let a=`${l.familyName}\\0${l.unicodeRangeKey}`,s=n.get(a);s===void 0?n.set(a,[i]):s.push(i)});let o=new Set;for(let l of n.values()){let i=l.map(a=>{let s=e[a];return{minWeight:s.weightRange?.minWeight??400,maxWeight:s.weightRange?.maxWeight??400,styleKeyword:s.styleKeyword??\"normal\"}});for(let a of Zl(i,t))o.add(l[a])}return e.filter((l,i)=>r.has(l.familyName)||o.has(i))},vn=(e,t)=>{let r=e.textContent??\"\";for(let o of e.querySelectorAll(\"input, textarea\"))r+=(o.getAttribute(\"value\")??\"\")+(o.getAttribute(\"placeholder\")??\"\")+(o.value??\"\");for(let o of t)for(let l of[o.beforeStyles,o.afterStyles,o.markerStyles])l?.content&&(r+=l.content);let n=new Set;for(let o=32;o<127;o++)n.add(o);for(let o of[r,r.toUpperCase(),r.toLowerCase()])for(let l of o)n.add(l.codePointAt(0));return n},ci=e=>{let t=[];for(let r of e.split(\",\")){let n=/^\\s*u\\+([0-9a-f?]+)(?:-([0-9a-f]+))?\\s*$/i.exec(r);if(!n)continue;let o=parseInt(n[1].replace(/\\?/g,\"0\"),16),l=n[2]?parseInt(n[2],16):parseInt(n[1].replace(/\\?/g,\"f\"),16);t.push([o,l])}return t.length?t:null},ui=(e,t)=>{let r=ci(e);if(r===null)return!0;for(let n of t)for(let[o,l]of r)if(n>=o&&n<=l)return!0;return!1},In=async(e,t,r,n=null,o=null)=>{if(e.size===0)return\"\";let{ruleSources:l,inaccessibleSheetUrls:i}=li(t),a=[];for(let{rule:u,baseUrl:f}of l){let[p]=$t(u.style.getPropertyValue(\"font-family\"));if(!p||!e.has(p))continue;let b=u.cssText;/url\\(|local\\(/.test(b)&&a.push(Nn(p,b,f,u.style.getPropertyValue(\"font-weight\"),u.style.getPropertyValue(\"font-style\"),u.style.getPropertyValue(\"font-stretch\"),u.style.getPropertyValue(\"unicode-range\"),u.style.getPropertyValue(\"font-variation-settings\")!==\"\"))}let s=await Promise.all(i.map(u=>ai(u,e,r))),d=a.concat(...s),c=si(o===null?d:d.filter(u=>ui(u.unicodeRangeKey,o)),n);return(await Promise.all(c.map(u=>ii(u.fontFaceCssText,u.baseUrl,r)))).filter(u=>u.length>0).join(`\n`)};var tt=e=>{let t=e.defaultView,r=e.documentElement;return!t||!r?null:[t.getComputedStyle(r).backgroundColor,e.body?t.getComputedStyle(e.body).backgroundColor:\"\"].find(n=>n&&n!==\"rgba(0, 0, 0, 0)\")??null},_n=e=>typeof e==\"object\"&&!!e,di=e=>{if(!_n(e))return null;let{type:t,requestId:r,pixelRatio:n}=e;return t!==\"fast-html-to-image:iframe-capture-request\"||typeof r!=\"string\"||r.length===0||typeof n!=\"number\"||!Number.isFinite(n)||n<=0?null:{type:t,requestId:r,pixelRatio:n}},fi=e=>{if(!_n(e))return null;let{type:t,requestId:r,pngDataUrl:n,widthPx:o,heightPx:l,backgroundColor:i}=e;return t!==\"fast-html-to-image:iframe-capture-response\"||typeof r!=\"string\"||r.length===0||typeof n!=\"string\"||!n.startsWith(\"data:image/\")||typeof o!=\"number\"||!Number.isFinite(o)||o<=0||typeof l!=\"number\"||!Number.isFinite(l)||l<=0||i!==null&&typeof i!=\"string\"?null:{type:t,requestId:r,pngDataUrl:n,widthPx:o,heightPx:l,backgroundColor:i}},Ln=(e,t,r)=>{let n=e.contentWindow;if(!n)return Promise.resolve(null);let o=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;return new Promise((l,i)=>{let a=(f,p)=>{window.clearTimeout(c),window.removeEventListener(\"message\",d),r?.removeEventListener(\"abort\",s),f(p)},s=()=>a(i,r.reason),d=f=>{if(f.source!==n)return;let p=fi(f.data);!p||p.requestId!==o||a(l,{pngDataUrl:p.pngDataUrl,widthPx:p.widthPx,heightPx:p.heightPx,canvasBackgroundColor:p.backgroundColor})},c=window.setTimeout(()=>a(l,null),2e3);if(r?.aborted)return a(i,r.reason);r?.addEventListener(\"abort\",s,{once:!0}),window.addEventListener(\"message\",d);let u={type:\"fast-html-to-image:iframe-capture-request\",requestId:o,pixelRatio:t};n.postMessage(u,\"*\")})},Fn=e=>{let t=!1,r=n=>{let o=di(n.data),l=n.source;!o||!l||t||(t=!0,e(o.pixelRatio).then(i=>{l.postMessage({type:\"fast-html-to-image:iframe-capture-response\",requestId:o.requestId,pngDataUrl:i.pngDataUrl,widthPx:i.widthPx,heightPx:i.heightPx,backgroundColor:tt(document)},{targetOrigin:\"*\"})}).catch(()=>{}).finally(()=>{t=!1}))};return window.addEventListener(\"message\",r),()=>window.removeEventListener(\"message\",r)};var le=e=>e.namespaceURI===We,pi=new Set([\"block\",\"list-item\",\"flex\",\"grid\",\"table\"]),Ut=e=>{let t=e.position;return t!==\"absolute\"&&t!==\"fixed\"&&(e.float===void 0||e.float===\"none\")},mi=(e,t)=>{if(le(e)&&e.style.paddingBottom!==\"\"){let r=e.ownerDocument.defaultView?.getComputedStyle(e);return v(r?.getPropertyValue(\"padding-bottom\"))}return v(t[\"padding-bottom\"])},hi=(e,t)=>{let r=t.display;return r!==\"block\"&&r!==\"list-item\"||!Ut(t)||t[\"overflow-x\"]!==\"visible\"||t[\"overflow-y\"]!==\"visible\"||v(t[\"border-bottom-width\"])!==0?!1:mi(e,t)===0},gi=e=>Ut(e)&&e.display!==void 0&&pi.has(e.display),Dn=(e,t,r)=>{let n=new Map,o=new Set,l=a=>{let s=re(a);for(let d=s.length-1;d>=0;d--){let c=s[d];if(c.nodeType===Node.COMMENT_NODE)continue;if(c.nodeType===Node.TEXT_NODE){if(/\\S/.test(c.textContent??\"\"))return null;continue}if(!V(c))continue;let u=t.get(c);if(u&&u.styles.display!==\"none\"&&Ut(u.styles))return c}return null},i=a=>{let s=n.get(a);if(s!==void 0)return s;n.set(a,0);let d=t.get(a);if(!d||!hi(a,d.styles)||d.scrollTop!==0||d.scrollLeft!==0)return 0;let c=l(a);if(!c)return 0;let u=t.get(c);if(!u||!gi(u.styles))return 0;let f=Math.max(v(u.styles[\"margin-bottom\"]),i(c));if(f<=0)return 0;let p=a.getBoundingClientRect().bottom,b=c.getBoundingClientRect().bottom;return Math.abs(p-b)>.6?0:(n.set(a,f),f)};for(let[a,s]of t){if(a===e)continue;let d=s.styles.display;if(d!==\"block\"&&d!==\"list-item\"||a.firstElementChild===null&&!a.shadowRoot)continue;let c=i(a);if(c<=0||c<=v(s.styles[\"margin-bottom\"]))continue;let u=r.get(a);u&&(r.set(a,{...u,\"margin-bottom\":`${c}px`}),o.add(a))}return o},ve=e=>{if(e.parentElement)return e.parentElement;let t=e.parentNode;return t instanceof ShadowRoot?t.host:null},On=(e,t,r)=>({layoutWidthPx:e,layoutHeightPx:t,outputWidthPx:e+2*r,outputHeightPx:t+2*r,contentOffsetLeftPx:r,contentOffsetTopPx:r,rootLinearTransform:null}),$n=({rootElement:e,rootStyles:t,defaultView:r,layoutWidthPx:n,layoutHeightPx:o,bleedPx:l})=>{if(!le(e))return On(n,o,l);let i=Re({transform:t.transform,rotate:t.rotate,scale:t.scale}),a=ve(e);for(;a;){let A=r.getComputedStyle(a);i=me(Re({transform:A.getPropertyValue(\"transform\"),rotate:A.getPropertyValue(\"rotate\"),scale:A.getPropertyValue(\"scale\")}),i),a=ve(a)}if(Ge(i))return On(n,o,l);let{a:s,b:d,c,d:u}=i,f=[0,s*n,c*o,s*n+c*o],p=[0,d*n,u*o,d*n+u*o],b=Math.floor(Math.min(...f)),m=Math.floor(Math.min(...p)),g=Math.ceil(Math.max(...f)),x=Math.ceil(Math.max(...p));return{layoutWidthPx:n,layoutHeightPx:o,outputWidthPx:Math.max(1,g-b)+2*l,outputHeightPx:Math.max(1,x-m)+2*l,contentOffsetLeftPx:-b+l,contentOffsetTopPx:-m+l,rootLinearTransform:i}};var bi=[137,80,78,71,13,10,26,10],Ie=null,yi=()=>{if(Ie!==null)return Ie;Ie=new Uint32Array(256);for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;Ie[e]=t}return Ie},Si=(e,t,r)=>{let n=yi(),o=4294967295;for(let l=t;l<r;l++)o=n[(o^e[l])&255]^o>>>8;return(o^4294967295)>>>0},Vt=(e,t)=>{let r=new Uint8Array(12+t.length),n=new DataView(r.buffer);n.setUint32(0,t.length);for(let o=0;o<4;o++)r[4+o]=e.charCodeAt(o);return r.set(t,8),n.setUint32(8+t.length,Si(r,4,8+t.length)),r},wi=(e,t,r)=>{let n=t*4,o=new Uint8Array((n+1)*r),l=0;for(let i=0;i<r;i++)l++,o.set(e.subarray(i*n,(i+1)*n),l),l+=n;return o},xi=(e,t,r)=>{let n=new Uint8Array((t*3+1)*r),o=0,l=0;for(let i=0;i<r;i++){n[l++]=0;for(let a=0;a<t;a++){if(e[o+3]!==255)return null;n[l]=e[o],n[l+1]=e[o+1],n[l+2]=e[o+2],o+=4,l+=3}}return n},Ei=async e=>{let t=new CompressionStream(\"deflate\"),r=new Response(new Blob([e]).stream().pipeThrough(t));return new Uint8Array(await r.arrayBuffer())},Ai=async e=>{let t=e.getContext(\"2d\");if(t===null)throw Error(\"Could not acquire a 2d canvas context\");let{width:r,height:n}=e,o=t.getImageData(0,0,r,n),l=xi(o.data,r,n),i=await Ei(l??wi(o.data,r,n)),a=new Uint8Array(13),s=new DataView(a.buffer);return s.setUint32(0,r),s.setUint32(4,n),a[8]=8,a[9]=l===null?6:2,new Blob([new Uint8Array(bi),Vt(\"IHDR\",a),Vt(\"IDAT\",i),Vt(\"IEND\",new Uint8Array)],{type:\"image/png\"})},Se=()=>typeof CSS<\"u\"&&CSS.supports(\"-webkit-hyphenate-limit-after\",\"1\"),Vn=(e,t,r)=>{let n=e.toDataURL(t,r);if(!n.startsWith(`data:${t};base64,`))throw Error(`canvas could not encode ${t}`);let o=atob(n.slice(n.indexOf(\",\")+1)),l=new Uint8Array(o.length);for(let i=0;i<o.length;i++)l[i]=o.charCodeAt(i);return new Blob([l],{type:t})},Un=async e=>Vn(e,\"image/png\"),Wn=e=>Se()&&typeof CompressionStream<\"u\"?Ai(e).catch(()=>Un(e)):Un(e),Kn=async(e,t)=>Vn(e,\"image/jpeg\",t),Ci={\"%\":\"%25\",\"#\":\"%23\",\"\\r\":\"%0D\",\"\\n\":\"%0A\",\"\t\":\"%09\"},zn=e=>`data:image/svg+xml;charset=utf-8,${e.replace(/[%#\\r\\n\\t]/g,t=>Ci[t])}`;var Ri=()=>typeof CSS<\"u\"&&CSS.supports(\"-webkit-app-region\",\"none\"),ae=async(e,t)=>{if(!t)return e;let r=()=>{},n=new Promise((o,l)=>{let i=()=>l(t.reason);t.aborted?i():(t.addEventListener(\"abort\",i,{once:!0}),r=()=>t.removeEventListener(\"abort\",i))});try{return await Promise.race([n,e])}finally{r()}},jn=(e,t)=>{if(typeof e!=\"number\"||!Number.isFinite(e)||e<0)throw new RangeError(`timeoutMs must be a finite number of milliseconds, 0 or more; got ${String(e)}`);let r=new AbortController,n,o=performance.now()+e,l=()=>r.abort(new DOMException(`Capture timed out after ${e}ms`,\"TimeoutError\")),i=()=>r.abort(t.reason);return t?.aborted?i():(t?.addEventListener(\"abort\",i,{once:!0}),n=setTimeout(l,e)),{signal:r.signal,check:()=>{performance.now()>=o&&l(),r.signal.throwIfAborted()},dispose:()=>{clearTimeout(n),t?.removeEventListener(\"abort\",i),r.signal.aborted||r.abort(new DOMException(\"Capture settled\",\"AbortError\"))}}},ki=async e=>{for(let t=0;t<e;t++)await new Promise(r=>{let n,o=requestAnimationFrame(()=>{clearTimeout(n),r()});n=setTimeout(()=>{cancelAnimationFrame(o),r()},100)})},Y={snapshotMs:0,iframesMs:0,backdropMs:0,buildMs:0,inlineMs:0,serializeMs:0,decodeMs:0,rasterMs:0,encodeMs:0},Gn=ne(2),Wt=ne(2),Yn=null,Kt=!1,qn=()=>Kt?null:(Yn??=document.createElement(\"canvas\"),Kt=!0,Yn),Xn=()=>{Kt=!1},rt=(e,t,r,n,o=null)=>{let l=zn(e),i=e.includes(\"data:image\")||e.includes(\"background-clip:text\"),a=()=>{let m=Wt.get(l);if(m)return m;let g=(async()=>{let x=performance.now(),A=new Image;return A.decoding=\"sync\",A.src=l,await A.decode(),!Ri()&&i&&await ki(2),Y.decodeMs=performance.now()-x,A})();return Wt.set(l,g),g.catch(()=>{Wt.delete(l)}),g},s=o?Math.max(1,Math.ceil(o.width)):t,d=o?Math.max(1,Math.ceil(o.height)):r,c=async(m,g)=>{let x=await a(),A=performance.now(),S=n.scale*n.pixelRatio,w=Math.ceil(s*S),y=Math.ceil(d*S),R=Math.min(1,16384/Math.max(1,w),16384/Math.max(1,y)),N=Math.max(1,Math.floor(w*R)),k=Math.max(1,Math.floor(y*R)),M=m.getContext(\"2d\",Se()?{willReadFrequently:!0}:void 0);if(!M)throw Error(\"Could not acquire a 2d canvas context\");m.width!==N||m.height!==k?(m.width=N,m.height=k):(M.setTransform(1,0,0,1,0,0),M.clearRect(0,0,N,k));let h=n.backgroundColor??g;return h&&(M.fillStyle=h,M.fillRect(0,0,N,k)),M.scale(S*R,S*R),o&&M.translate(-o.x,-o.y),M.drawImage(x,0,0,t,r),Y.rasterMs=performance.now()-A,m},u=()=>c(document.createElement(\"canvas\")),f=()=>{let m=o?`${o.x},${o.y},${o.width},${o.height}`:\"\",g=`${n.scale}|${n.pixelRatio}|${n.backgroundColor??\"\"}|${t}|${r}|${m}`,x=Gn.get(e),A=x?.get(g);if(A)return A;let S=qn(),w=c(S??document.createElement(\"canvas\")).then(async R=>{let N=performance.now(),k=await Wn(R);return Y.encodeMs=performance.now()-N,k}).finally(()=>{S!==null&&Xn()});x===void 0&&(x=new Map,Gn.set(e,x));let y=x;return y.set(g,w),w.catch(()=>{y.delete(g)}),w},p=async(m=.92)=>{let g=qn();try{let x=await c(g??document.createElement(\"canvas\"),\"#ffffff\"),A=performance.now(),S=await Kn(x,m);return Y.encodeMs=performance.now()-A,S}finally{g!==null&&Xn()}},b=m=>async(...g)=>(n.abortSignal?.throwIfAborted(),ae(m(...g),n.abortSignal));return{width:s,height:d,toSvgDataUrl:b(()=>Promise.resolve(l)),toCanvas:b(u),toBlob:b(f),toJpegBlob:b(p),toPngDataUrl:b(async()=>et(await f())),toJpegDataUrl:b(async m=>et(await p(m)))}},Zn=({clone:e,cssText:t,width:r,height:n,clip:o,ownerDocument:l})=>{let i=l.createElementNS(X,\"svg\");i.setAttribute(\"width\",String(o?o.width:r)),i.setAttribute(\"height\",String(o?o.height:n)),i.setAttribute(\"viewBox\",o?`${o.x} ${o.y} ${o.width} ${o.height}`:`0 0 ${r} ${n}`);let a=l.createElementNS(X,\"style\");a.textContent=`*{scrollbar-width:none}\n*::-webkit-scrollbar{display:none}\nforeignObject>div{-webkit-text-size-adjust:100%!important}\n${t}`;let s=l.createElementNS(X,\"foreignObject\");s.setAttribute(\"width\",String(r)),s.setAttribute(\"height\",String(n));let d=l.createElementNS(We,\"div\");return d.setAttribute(\"style\",`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${r}px;height:${n}px;`),d.appendChild(e),s.appendChild(d),i.appendChild(a),i.appendChild(s),Z(new XMLSerializer().serializeToString(i))};var zt=e=>e.length>0&&!e.startsWith(\"data:\")&&!e.startsWith(\"#\")&&!e.startsWith(\"about:\"),Qn=(e,t,r)=>{e.includes(\"url(\")&&Be(e,n=>{if(!n.startsWith(\"data:\")){let o=te(n,t);zt(o)&&oe(o,r)}return Promise.resolve(n)})},Jn=(e,t)=>`${e.replace(/[\"']/g,\"\").trim().toLowerCase()}|${(t||\"u+0-10ffff\").replace(/\\s+/g,\"\").toLowerCase()}`,Ti=e=>{if(!e.fonts||typeof e.fonts.forEach!=\"function\")return null;let t=new Set;return e.fonts.forEach(r=>{(r.status===\"loaded\"||r.status===\"loading\")&&t.add(Jn(r.family,r.unicodeRange))}),t},eo=(e,t)=>{for(let n of e.querySelectorAll(\"img\")){let o=n.getAttribute(\"src\");o&&zt(o)&&oe(o,t)}for(let n of e.querySelectorAll(\"image\")){let o=n.getAttribute(\"href\")??n.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\");o&&zt(o)&&oe(o,t)}for(let n of e.querySelectorAll('[style*=\"url(\"]'))Qn(n.getAttribute(\"style\")??\"\",null,t);let r=Ti(e.ownerDocument);G(e.ownerDocument,(n,o)=>((ee(n)||Dt(n)&&(r===null||r.has(Jn(n.style.getPropertyValue(\"font-family\"),n.style.getPropertyValue(\"unicode-range\")))))&&Qn(n.cssText,o,t),!1),()=>!1)};var Pi=(e,t,r)=>pe.has(e)&&t!==\"\"&&r===\"\"&&!t.includes(\"url(\")&&!t.includes(\"var(\"),no=(e,t,r)=>{let n=e.getPropertyValue(\"backdrop-filter\")!==\"\"||e.getPropertyValue(\"-webkit-backdrop-filter\")!==\"\",o=\"\",l=\"\",i=\"\";for(let a=0;a<e.length;a++){let s=e.item(a);if(t.has(s))continue;let d=e.getPropertyValue(s),c=e.getPropertyPriority(s),u=`|${s}:${d}!${c}`;i+=u,!n&&Pi(s,d,c)?(o+=`${s}:${d};`,l+=`|~${s}`):l+=u}return r?.includes(\"var(\")&&(l+=`|style=${r}`,i+=`|style=${r}`),{carryText:Z(o),descriptorWithCarry:l,descriptorPlain:i,registryFeed:null}},oo=[\"margin-top\",\"margin-left\"],to=new WeakMap;function Ni(e){let t=[],r=n=>{for(let o of n)if(o.selectorText!==void 0){let l=o.style;[\"margin\",\"margin-top\",\"margin-left\",\"margin-block-start\",\"margin-inline-start\"].some(i=>/\\bauto\\b/.test(l.getPropertyValue(i)))&&t.push(o.selectorText)}else o.cssRules&&r(o.cssRules)};for(let n of e.styleSheets)try{r(n.cssRules)}catch{}return t}function Mi(e,t,r){let n=to.get(r);if(n===void 0&&(n=Ni(e.ownerDocument),to.set(r,n)),!n.some(l=>{try{return e.matches(l)}catch{return!1}}))return[];let o=[];for(let l of oo){if(t.getPropertyValue(l)!==\"0px\")continue;let i=e.getBoundingClientRect(),a=e.getAttribute(\"style\");e.style.setProperty(l,\"0px\",\"important\");let s=e.getBoundingClientRect();a===null?e.removeAttribute(\"style\"):e.setAttribute(\"style\",a),(Math.abs(s.top-i.top)>.5||Math.abs(s.left-i.left)>.5)&&o.push(l)}return o}function Bi(e,t,r){if(typeof e.computedStyleMap!=\"function\")return Mi(e,t,r);let n=e.computedStyleMap();return oo.filter(o=>t.getPropertyValue(o)===\"0px\"&&String(n.get(o))===\"auto\")}function lo(e,t,r,n){let o=n.getComputedStyle(e);if(o.display===\"none\")return null;let l=null;if(t!==null&&(r.get(t)?.styles.display??\"\").includes(\"grid\")&&(o.getPropertyValue(\"margin-top\")===\"0px\"||o.getPropertyValue(\"margin-left\")===\"0px\")&&e.getClientRects().length>0)for(let i of Bi(e,o,r))(l??={})[i]=\"auto\";if(/flex/.test(o.display)&&o.flexWrap.startsWith(\"wrap\")&&o.flexDirection.startsWith(\"row\")){let i=[...e.children].filter(a=>{let s=n.getComputedStyle(a),d=a.getBoundingClientRect();return s.display!==\"none\"&&s.position!==\"absolute\"&&s.position!==\"fixed\"&&d.width>0&&d.height>0});if(i.length>1){let a=i[0].getBoundingClientRect().top;i.every(s=>Math.abs(s.getBoundingClientRect().top-a)<.5)&&((l??={})[\"flex-wrap\"]=\"nowrap\")}}return l}var vi=null,ro=new Map,Ht=e=>{let t=ro.get(e);if(t!==void 0)return t;let r=vi??=document.createElement(\"span\").style;r.setProperty(e,\"initial\");let n=r.length>1?Array.from({length:r.length},(o,l)=>r.item(l)):[e];return r.cssText=\"\",ro.set(e,n),n},Ii=null,nt=new Map,_i=e=>{let t=`${e.propertyName}:${e.propertyValue}`,r=nt.get(t);if(r!==void 0)return r.length===0||r[0].isImportant===e.isImportant?r:r.map(l=>({...l,isImportant:e.isImportant}));let n=Ii??=document.createElement(\"span\").style;n.cssText=t;let o=[];for(let l=0;l<n.length;l++){let i=n.item(l);o.push({propertyName:i,propertyValue:n.getPropertyValue(i),isImportant:e.isImportant})}return n.cssText=\"\",nt.size>=4096&&nt.clear(),nt.set(t,o),o},io=(e,t)=>{let r=!1,n=[];for(let s of e){let d=s.propertyName;(d===\"backdrop-filter\"||d===\"-webkit-backdrop-filter\")&&(r=!0);for(let c of Ht(d))n.push([c,s.propertyValue])}let o=\"\",l=\"\",i=\"\",a=(s,d)=>{let c=s.isImportant?\"important\":\"\",u=`|${s.propertyName}:${s.propertyValue}!${c}`;i+=u,d?(o+=`${s.propertyName}:${s.propertyValue};`,l+=`|~${s.propertyName}`):l+=u};for(let s of e){let d=Ht(s.propertyName),c=!0,u=!0;for(let p of d)t.has(p)||(c=!1),pe.has(p)||(u=!1);if(c)continue;let f=!s.isImportant&&!r;if(d.length>1&&!u){for(let p of _i(s))t.has(p.propertyName)||a(p,f&&pe.has(p.propertyName));continue}a(s,f&&u)}return{carryText:o,descriptorWithCarry:l,descriptorPlain:i,registryFeed:n}},Gt=e=>{if(Sr.test(e))return null;let t=[],r=e.length,n=0;for(;n<=r;){let o=e.indexOf(\";\",n);o===-1&&(o=r);let l=e.slice(n,o);n=o+1;let i=l.indexOf(\":\");if(i===-1){if(l.trim()!==\"\")return null;continue}let a=l.slice(0,i).trim().toLowerCase();if(a===\"\"||a.startsWith(\"--\"))return null;let s=l.slice(i+1).trim(),d=!1;s.includes(\"!\")&&/!\\s*important$/i.test(s)&&(d=!0,s=s.slice(0,s.lastIndexOf(\"!\")).trim()),s!==\"\"&&t.push({propertyName:a,propertyValue:s,isImportant:d})}return t},ao=(e,t,r)=>{let n=e.localName,o=e.attributes,l=t===null||e.shadowRoot!==null;for(let i=0;i<o.length;i++){let a=o[i],s=a.name;s!==\"style\"&&(!l&&!t.has(s)||(n+=`|${s}=${a.value}`))}return n+r},Li=e=>\"style\"in e&&e.style instanceof CSSStyleDeclaration,so=e=>{let t=new Set,r=[],n=(i,a)=>{let s=`${i}|${a}`;t.has(s)||(t.add(s),r.push([i,a]))},o=new Set,l=i=>{let a=i.getAttribute(\"style\");if(a===null||o.has(a))return;o.add(a);let s=Gt(a);if(s!==null){for(let c of s)for(let u of Ht(c.propertyName))n(u,c.propertyValue);return}if(!Li(i))return;let d=i.style;for(let c=0;c<d.length;c++){let u=d.item(c);n(u,d.getPropertyValue(u))}};l(e);for(let i of e.querySelectorAll(\"[style]\"))l(i);return r},ot=e=>Rr.has(e.localName),co=e=>sr.has(e.transform??\"\")&&cr.has(e.position??\"\"),Fi=new Set([\"top\",\"right\",\"bottom\",\"left\"]),Oi=new Set([\"width\",\"height\"]),uo=e=>{let t=e.includes(\"display\"),r=e.includes(\"position\");return e.map(n=>n===\"inline-size\"?1:n===\"block-size\"?2:n===\"transform-origin\"?3:n===\"perspective-origin\"?4:!t&&(n===\"grid-template-columns\"||n===\"grid-template-rows\")?5:!r&&Fi.has(n)?6:!t&&Oi.has(n)?7:0)},_e=(e,t,r,n,o=null,l=!1)=>{for(let i=0;i<r.length;i++){if(o!==null&&o[i])continue;let a=n[i];if(a!==0){if(a===1){if(e[\"writing-mode\"]===\"horizontal-tb\"){e[\"inline-size\"]=e.width;continue}}else if(a===2){if(e[\"writing-mode\"]===\"horizontal-tb\"){e[\"block-size\"]=e.height;continue}}else if(a===3){if(e.transform===\"none\")continue}else if(a===4){if((e.perspective??\"none\")===\"none\")continue}else if(a===6){if((e.position??\"static\")===\"static\")continue}else if(a===7){if(l&&e.display===\"inline\")continue;let u=r[i],f=u===\"width\"?t.width:t.height,p=f===\"\"?void 0:de(u,f);e[u]!==p&&(e[u]=p);continue}else if(!(e.display??\"\").includes(\"grid\"))continue}let s=r[i],d=de(s,t.getPropertyValue(s)),c=d===\"\"?void 0:d;e[s]!==c&&(e[s]=c)}};var fo=ne(8),Q=e=>{let t=\"\";for(let r in e)t+=`${r}:${e[r]};`;return t},go=()=>{let e=new Map,t=[];return{rules:t,register:(r,n,o,l,i,a)=>{let s={base:Q(r),before:n?Q(n):\"\",after:o?Q(o):\"\",firstLetter:l?Q(l):\"\",marker:i?Q(i):\"\"},d=a?qt(\"\",a):\"\",c=`${s.base}|before:${s.before}|after:${s.after}|first-letter:${s.firstLetter}|marker:${s.marker}|extra:${d}`,u=e.get(c);if(u)return u;let f=`rgs-${t.length+1}`;return e.set(c,f),t.push({className:f,signature:c,baseStyles:r,beforeStyles:n,afterStyles:o,firstLetterStyles:l,markerStyles:i,extraStyles:a??null,cachedBlocks:s}),f},toCssText:()=>{let r=`${wn()}`;for(let c of t)r+=`\\0${c.signature}`;let n=fo.get(r);if(n!==void 0)return n;let o=new Map;for(let c of t){let u=c.baseStyles;for(let f in u){let p=`${f}:${u[f]};`,b=o.get(p);b===void 0?o.set(p,[c.className]):b.push(c.className)}}let l=new Map;for(let[c,u]of o){if(u.length<2)continue;let f=u.join(\",.\");l.set(f,(l.get(f)??\"\")+c)}let i=new Map,a=new Map,s=\"\";for(let[c,u]of l)s+=`.${c}{${u}}\n`;for(let c of t){let u=c.baseStyles,f=\"\";for(let S in u){let w=`${S}:${u[S]};`,y=o.get(w);y!==void 0&&y.length>=2||(f+=w)}let p=`.${c.className}{${f}}`,b=c.cachedBlocks,m=b?.before??(c.beforeStyles?Q(c.beforeStyles):\"\"),g=b?.after??(c.afterStyles?Q(c.afterStyles):\"\"),x=b?.firstLetter??(c.firstLetterStyles?Q(c.firstLetterStyles):\"\"),A=b?.marker??(c.markerStyles?Q(c.markerStyles):\"\");if(m){let S=i.get(m);S===void 0?i.set(m,[c.className]):S.push(c.className)}if(g){let S=a.get(g);S===void 0?a.set(g,[c.className]):S.push(c.className)}x&&(p+=`\n.${c.className}::first-letter{${x}}`),A&&(p+=`\n.${c.className}::marker{${A}}`),c.extraStyles&&(p+=qt(c.className,c.extraStyles)),s+=`${p}\n`}for(let[c,u]of i)s+=`.${u.join(\"::before,.\")}::before{${c}}\n`;for(let[c,u]of a)s+=`.${u.join(\"::after,.\")}::after{${c}}\n`;let d=s.slice(0,-1);return fo.set(r,d),d}}},Xt=e=>hr.some(t=>e.startsWith(t)),Di=e=>{if(!e.firstLetterStyles)return null;let t=null;for(let r in e.firstLetterStyles){if(!Xt(r))continue;let n=e.firstLetterStyles[r];n===void 0||n===e.styles[r]||(t??={},t[r]=n)}return t},Yt=(e,t,r,n)=>{if(!r)return null;let o=Me({styles:r,baseline:e.getBaseline(t,n,r),parentStyles:null,parentEmittedStyles:null});return ye(o,r,null,!1,null),be(o,r),o.content=r.content??\"none\",o},jt=ne(2),bo=(e,t,r)=>{let n=Object.getPrototypeOf(t);for(let o=0;o<r.length;o++){let l=r[o];if(!Object.hasOwn(t,l))continue;let i=t[l];n!==null&&n[l]===i||(e+=`\u001f${o}:${i??\"\"}`)}return e},po=(e,t,r)=>t===null?`${e}\u001f\\0`:(e+=`\u001f${t.content??\"\"}`,bo(e,t,r)),mo=(e,t,r)=>{let n=t??\"\";return n=bo(n,e.styles,r),n=po(n,e.beforeStyles,r),po(n,e.afterStyles,r)},ho=(e,t,r,n,o,l)=>{if(!n)return null;if(!e||e.content!==(n.content??\"none\"))return Yt(t,r,n,o);let i={...e};return Bt(i,n,t.getBaseline(r,o,n),l),ye(i,n,null,!1,null),be(i,n),i.content=n.content??\"none\",i},yo=(e,t,r,n,o,l,i,a,s)=>{let d=new Map,c=new Map,u=un(t),f=new Map,p=new Map,b=(w,y)=>{if(y.memoKey===-1)return r.getBaseline(w,null,y.styles);let R=p.get(y.memoKey);return R===void 0&&(R=r.getBaseline(w,null,y.styles),p.set(y.memoKey,R)),R},m=new Map,g=s??new Map;for(let[w,y]of e){let R=y.parentElement?e.get(y.parentElement):void 0,N=u&&y.memoKey!==-1&&w!==o&&!i?.has(w)&&!a.has(w)&&!y.pseudoStyles,k;if(N){let T=mo(y,R?.styles.display??null,t);if(m.set(w,T),k=g.get(y.memoKey),k===void 0)k=new Map,g.set(y.memoKey,k);else{let P=k.get(T);if(P!==void 0){c.set(w,P);continue}}}let M=u&&y.memoKey!==-1?f.get(y.memoKey):void 0,h;if(M?(h={...M},Bt(h,y.styles,b(w,y),t)):(h=Me({styles:y.styles,baseline:b(w,y),parentStyles:R?.styles??null,parentEmittedStyles:y.parentElement?c.get(y.parentElement)??null:null}),u&&y.memoKey!==-1&&f.set(y.memoKey,{...h})),ye(h,y.styles,R?.styles.display??null,ot(w),w.localName),be(h,y.styles),I(w,\"iframe\")){let T=y.styles.display??\"inline\";h.display=T===\"inline\"?\"inline-block\":T}h[\"content-visibility\"]===\"auto\"&&(h[\"content-visibility\"]=\"visible\"),w===o&&mn(h,l),i?.has(w)&&(h.visibility=\"hidden\",delete h[\"backdrop-filter\"]);let C=a.get(w);C&&Lr(h,y.styles,C),c.set(w,h),k&&k.set(m.get(w)??\"\",h)}let x=Dn(o,e,c),A=new Map,S=new Map;for(let[w,y]of e){let R=c.get(w);if(!R)continue;let N=u&&y.memoKey!==-1&&w!==o&&y.firstLetterStyles===null&&y.markerStyles===null&&!y.pseudoStyles&&!x.has(w)&&!i?.has(w)&&!a.has(w),k=(y.parentElement?e.get(y.parentElement):void 0)?.styles.display??null,M,h=\"\";if(N)if(h=m.get(w)??mo(y,k,t),M=S.get(y.memoKey),M===void 0)M=new Map,S.set(y.memoKey,M);else{let z=M.get(h);if(z!==void 0){d.set(w,z);continue}}let C=u&&y.memoKey!==-1?A.get(y.memoKey):void 0,T,P;C?(T=ho(C.beforeDiff,r,w,y.beforeStyles,\"::before\",t),P=ho(C.afterDiff,r,w,y.afterStyles,\"::after\",t)):(T=Yt(r,w,y.beforeStyles,\"::before\"),P=Yt(r,w,y.afterStyles,\"::after\"),u&&y.memoKey!==-1&&A.set(y.memoKey,{beforeDiff:T?{...T}:null,afterDiff:P?{...P}:null}));let _=n.register(R,T,P,Di(y),pn(y.markerStyles,y.styles),So(r,w,y.pseudoStyles,y.styles));d.set(w,_),M&&M.set(h,_)}return d};var wo=e=>{let t=0,r={definesBeforeAfter:!1,definesFirstLetter:!1,definesMarker:!1},n=()=>(r.definesBeforeAfter=!0,r.definesFirstLetter=!0,r.definesMarker=!0,!0);return G(e,o=>{if(t++,t>1e3)return n();if(ee(o)){let l=o.selectorText;(l.includes(\":before\")||l.includes(\":after\"))&&(r.definesBeforeAfter=!0),l.includes(\":first-letter\")&&(r.definesFirstLetter=!0),l.includes(\":marker\")&&(r.definesMarker=!0)}return r.definesBeforeAfter&&r.definesFirstLetter&&r.definesMarker},n),r},Zt=(e,t,r,n)=>{let o=r.getComputedStyle(e,t),l=o.getPropertyValue(\"content\");if(l===\"\"||l===\"none\"||l===\"normal\")return null;let i=J(o,n);return i.content=l,i},Qt=(e,t,r,n,o,l,i)=>{if(!l)return null;let a=r.getComputedStyle(e,t),s=Object.create(l);return _e(s,a,n,o,i,!0),s},Jt=(e,t,r,n,o,l,i,a)=>{let s=r.getComputedStyle(e,t),d=s.getPropertyValue(\"content\");if(d===\"\"||d===\"none\"||d===\"normal\")return null;if(!i){let u=J(s,n);return u.content=d,u}let c=Object.create(i);return _e(c,s,o,l,a,!0),c.content=d,c},xo=(e,t)=>e.firstChild?Mt(t.getComputedStyle(e,\"::first-letter\"),Xt):null,Eo=(e,t)=>{let r=t.getComputedStyle(e,\"::marker\"),n=Mt(r,fn),o=r.getPropertyValue(\"content\");return o&&(n.content=o),n},Ao=e=>e instanceof CSSKeyframesRule,Co=e=>\"containerName\"in e||\"start\"in e,$i=/::?(?:before|after|first-letter|first-line|marker|selection|placeholder|backdrop|root|-webkit-[a-z-]+)\\b/g,Ui=/[[+~:]/,Ro=e=>!Ui.test(e.replace($i,\"\")),lt=e=>{let t=[],r={counterCss:\"\",placeholder:!1,fileButton:!1,firstLine:!1,sliderThumb:!1,thumbRules:[]};return G(e,n=>{if(n.type===CSSRule.COUNTER_STYLE_RULE||n.type===CSSRule.FONT_FEATURE_VALUES_RULE)return t.push(n.cssText),!1;if(ee(n)){let o=n.selectorText;if(o.includes(\"::placeholder\")&&(r.placeholder=!0),o.includes(\"::file-selector-button\")&&(r.fileButton=!0),o.includes(\"::first-line\")&&(r.firstLine=!0),o.includes(\"::-webkit-slider-thumb\")){r.sliderThumb=!0;let l=[];for(let i of ie(o)){let a=i.indexOf(\"::-webkit-slider-thumb\");a!==-1&&l.push(i.slice(0,a).trim())}l.length>0&&r.thumbRules.push({bases:l,style:n.style})}}return!1},()=>!1),r.counterCss=t.join(`\n`),r},Vi=[\"font-family\",\"font-size\",\"font-style\",\"font-variant\",\"font-variant-caps\",\"font-weight\",\"font-stretch\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-synthesis\",\"line-height\",\"color\",\"background-color\",\"background-image\",\"letter-spacing\",\"word-spacing\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-transform\",\"text-shadow\",\"text-emphasis-color\",\"-webkit-text-fill-color\",\"-webkit-text-stroke-color\",\"-webkit-text-stroke-width\"],ko=(e,t,r)=>{let n=null,o=(l,i)=>(n??={})[l]=i;if(r.placeholder&&(I(e,\"input\")||I(e,\"textarea\"))&&o(\"::placeholder\",J(t.getComputedStyle(e,\"::placeholder\"),null)),r.fileButton&&I(e,\"input\")&&e.type===\"file\"&&o(\"::file-selector-button\",J(t.getComputedStyle(e,\"::file-selector-button\"),null)),r.firstLine&&o(\"::first-line\",J(t.getComputedStyle(e,\"::first-line\"),Vi)),r.sliderThumb&&I(e,\"input\")&&e.type===\"range\"){let l=null;for(let i of r.thumbRules)i.bases.some(a=>{try{return e.matches(a===\"\"?\"*\":a)}catch{return!1}})&&(l=Object.assign(l??{},J(i.style,null)));l!==null&&o(\"::-webkit-slider-thumb\",l)}return n},Wi=(e,t,r,n)=>{let o=Me({styles:r,baseline:e.getBaseline(t,n,r),parentStyles:null,parentEmittedStyles:null});return ye(o,r,null,!1,null),be(o,r),o},So=(e,t,r,n)=>{if(!r)return null;let o=null;for(let l in r){let i=r[l],a;if(l===\"::-webkit-slider-thumb\")a=i;else if(l===\"::first-line\"){a={};for(let s in i)i[s]!==n[s]&&(a[s]=i[s])}else a=Wi(e,t,i,l);Object.keys(a).length>0&&((o??={})[l]=a)}return o},qt=(e,t)=>{let r=\"\";for(let n in t){let o=Q(t[n]);o&&(r+=`\n.${e}${n}{${o}}`)}return r};var it=null,To=new Map,Ki=e=>{let t=To.get(e);if(t!==void 0)return t;it??=document.createElement(\"span\").style,it.setProperty(e,\"initial\");let r=it.length>1;return it.cssText=\"\",To.set(e,r),r},zi=e=>e===\"cssFloat\"?\"float\":e===\"cssOffset\"?\"offset\":e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Po=(e,t)=>{let r=new Set,n=new Set(wr),o=h=>{if(h.includes(\"#\")&&n.add(\"id\"),h.includes(\"[\"))for(let C of h.matchAll(xr))n.add(C[1].toLowerCase())},l=[],i=!0,a=!0,s=!0,d=!1,c=new Set,u=new Set,f=new Map,p=(h,C)=>{let T=C!==void 0&&!C.includes(\":\")?C:null;if(!u.has(h)){u.add(h),d&&(i=!1),f.set(h,T===null?null:[T]);return}let P=f.get(h);if(P==null){f.set(h,null);return}T===null?f.set(h,null):P.push(T)},b=h=>u.has(h)&&f.get(h)===null,m=(h,C,T)=>{if(h===\"position\"){if(C!==\"static\")for(let _ of He)p(_,T);return}if(h===\"transition-property\"){for(let _ of Ce)(C.includes(\"all\")||C.includes(_))&&p(_,T);return}if(h===\"transform\"){if(b(\"transform\"))return;yr.test(C)&&p(\"transform\",T);return}if(Ce.has(h)){if(b(h))return;wt.test(C)||p(h,T);return}let P=[\"margin-\",\"padding-\",\"inset\"].find(_=>h.startsWith(_));if(P!==void 0&&!wt.test(C)){let _=P===\"inset\"?\"\":P;for(let z of Ce)(_===\"\"?He.includes(z):z.startsWith(_))&&p(z,T)}},g=h=>{r.has(h)||(r.add(h),ge(h)||l.push(h))},x=h=>{if(ge(h)){h.startsWith(\"--\")&&(i=!1);return}Je(h)||Ki(h)?i=!1:c.has(h)||(d&&(i=!1),c.add(h),u.add(h),f.set(h,null)),g(h)},A=(h,C)=>{a&&h===\"content\"&&(C.includes(\"attr(\")||C.includes(\"counter\"))&&(a=!1),m(h,C),s&&(h===\"backdrop-filter\"||h===\"-webkit-backdrop-filter\")&&(s=!1),g(h)},S=(h,C)=>{for(let T=0;T<h.length;T++){let P=h.item(T);if(a&&P===\"content\"){let _=h.getPropertyValue(\"content\");(_.includes(\"attr(\")||_.includes(\"counter\"))&&(a=!1)}m(P,h.getPropertyValue(P),C),s&&(P===\"backdrop-filter\"||P===\"-webkit-backdrop-filter\"||C!==void 0&&pe.has(P)&&h.getPropertyPriority(P)===\"important\")&&(s=!1),g(P)}},w=h=>{if(ee(h))i&&!Ro(h.selectorText)&&(i=!1),o(h.selectorText),S(h.style,h.selectorText);else if(Ao(h))for(let C of h.cssRules){if(!(C instanceof CSSKeyframeRule))continue;let T=C.style;for(let P=0;P<T.length;P++)x(T.item(P))}else Ye(h)&&Co(h)&&(i=!1)},y=()=>{if(typeof e.getAnimations==\"function\")for(let h of e.getAnimations()){let C=h.effect;if(!(C instanceof KeyframeEffect)){i=!1;continue}for(let T of C.getKeyframes())for(let P in T)gr.has(P)||x(zi(P))}};for(let h of br)g(h);let R=!1;if(G(e,h=>(w(h),!1),()=>(R=!0,!0)),R)return null;if(y(),t!==null)for(let[h,C]of t)A(h,C);d=!0;let N=[...St.filter(h=>r.has(h)&&(!Ce.has(h)||u.has(h))),...[...c].filter(h=>!St.includes(h))],k=h=>{S(h)},M=h=>{for(let C of h)if(w(C),Te(C)){let T=C.styleSheet;T&&M(T.cssRules)}else Ye(C)&&M(C.cssRules)};return{propertyNames:l,styleRelevantAttributeNames:n,perElementPropertyNames:N,getUnstableSelectorList:h=>f.get(h)??null,isStyleMemoSafe:()=>i,isPseudoContentMemoSafe:()=>a,addInlineStyleProps:k,addParsedInlineDeclaration:A,addShadowRootStyleProps:h=>{for(let C of[...h.styleSheets,...h.adoptedStyleSheets])try{M(C.cssRules)}catch{return!1}return!0},isInlineCarrySafe:()=>s}};var Hi=e=>e.namespaceURI===\"http://www.w3.org/2000/svg\"&&Ke.has(e.localName),er=new WeakMap,tr=new WeakMap,Gi=e=>typeof e.getAnimations!=\"function\"||e.getAnimations().length>0,No=(e,t,r,n)=>{let o=new Map,l=new Map,i=wo(e.ownerDocument),a=lt(e.ownerDocument),s=he(e.ownerDocument),d=`${s.cssRuleCount}|${s.styleEpoch}`,c=tr.get(e.ownerDocument),u=c!==void 0&&c.sheetSignature===d,f=u?c.dedupedFeed:so(e),p=Po(e.ownerDocument,f);if(p)for(let E=e.parentElement;E!==null;E=E.parentElement)le(E)&&E.style.length>0&&p.addInlineStyleProps(E.style);let b=p?.perElementPropertyNames??[],m=new Set(b),g=b.join(\",\"),x=u&&c.laneSignature===g?c.scanByText:new Map,A=new Map,S=uo(b),w=b.map(E=>{let L=p?.getUnstableSelectorList(E)??null;return L!==null&&L.length>0?L.join(\",\"):null}),y=w.some(E=>E!==null),R=E=>{if(!y)return null;let L=null;for(let $=0;$<w.length;$++){let O=w[$];if(O===null)continue;let W=!0;try{W=E.matches(O)}catch{W=!0}W||(L??=Array(w.length).fill(!1),L[$]=!0)}return L},N=e.ownerDocument.activeElement,k=p?.propertyNames.length??0,M=p!==null&&p.isStyleMemoSafe()&&!Gi(e.ownerDocument)?`${s.cssRuleCount}|${s.styleEpoch}|${t.innerWidth}x${t.innerHeight}x${t.devicePixelRatio}|${k}|${b.join(\",\")}`:null,h=M===null?void 0:er.get(e.ownerDocument),C=h!==void 0&&h.signature===M,T=C?h.memoKeysByParentKey:new Map,P=C?h.memoizedStylesByKey:new Map,_=C?h.variantEmittedStyles:new Map,z=C?h.memoKeyByElement:new WeakMap,Oe=C?h.attributeGeneration:-1,xe=C?Dr(e.ownerDocument):null,De=M===null?-1:s.attributeGeneration,B=C?h.nextMemoKey:0,F=(E,L,$,O)=>{if(Ar.has(E.localName)||Hi(E)||r&&!r(E))return;p&&E.shadowRoot&&(p.addShadowRootStyleProps(E.shadowRoot)||(p=null));let W=le(E)&&!$&&!xt.has(E.localName),D=null,se=E.getAttribute(\"style\");if(se!==null&&le(E)&&(D=x.get(se)??A.get(se)??null,D===null)){let U=Gt(se);if(U!==null){if(D=io(U,m),p&&D.registryFeed!==null)for(let[Ve,ce]of D.registryFeed)p.addParsedInlineDeclaration(Ve,ce);x.set(se,D)}else p&&p.addInlineStyleProps(E.style),D=no(E.style,m,se),A.set(se,D)}let $e=lo(E,L,o,t),fe=p&&E.namespaceURI!==\"http://www.w3.org/2000/svg\"&&!xt.has(E.localName)?p.propertyNames:null,q=-1,Ue=\"\";if(fe&&p?.isStyleMemoSafe()&&W&&O!==-1&&$e===null){D!==null&&p.isInlineCarrySafe()&&(Ue=D.carryText,Ue!==\"\"&&l.set(E,Ue));let U=xe!==null&&(xe.get(E)??0)<=Oe?z.get(E):void 0;if(U!==void 0&&U.parentMemoKey===O)q=U.memoKey;else{let Ve=ao(E,p?.styleRelevantAttributeNames??null,D===null?\"\":Ue===\"\"?D.descriptorPlain:D.descriptorWithCarry),ce=T.get(O);ce===void 0&&(ce=new Map,T.set(O,ce));let ar=ce.get(Ve);ar===void 0?(q=B++,ce.set(Ve,q)):q=ar,z.set(E,{memoKey:q,parentMemoKey:O})}}let ct=E===N,H=q!==-1&&!ct?P.get(q):void 0,ut=t.getComputedStyle(E),j;if(H)j=Object.create(H.styles),_e(j,ut,b,S,H.laneSkipMask,!ot(E));else{if(L!==null&&ut.getPropertyValue(\"display\")===\"none\")return;j=J(ut,fe,!0)}if((j.display===\"none\"||co(j))&&L!==null)return;if($e!==null)for(let U in $e)j[U]=$e[U];let Fo=i.definesBeforeAfter||$,Oo=(i.definesMarker||$)&&(j.display??\"\").includes(\"list-item\"),Ee=null,Ae=null;Fo&&(H&&p?.isPseudoContentMemoSafe()?(Ee=Qt(E,\"::before\",t,b,S,H.beforeStyles,H.laneSkipMask),Ae=Qt(E,\"::after\",t,b,S,H.afterStyles,H.laneSkipMask)):H?(Ee=Jt(E,\"::before\",t,fe,b,S,H.beforeStyles,H.laneSkipMask),Ae=Jt(E,\"::after\",t,fe,b,S,H.afterStyles,H.laneSkipMask)):(Ee=Zt(E,\"::before\",t,fe),Ae=Zt(E,\"::after\",t,fe))),q!==-1&&!H&&!ct&&P.set(q,{styles:j,beforeStyles:Ee,afterStyles:Ae,laneSkipMask:R(E)});let or=j[\"overflow-x\"],lr=j[\"overflow-y\"],ir=E.localName===\"html\"||E.localName===\"body\"||or!==void 0&&or!==\"visible\"||lr!==void 0&&lr!==\"visible\";if(o.set(E,{styles:j,beforeStyles:Ee,afterStyles:Ae,firstLetterStyles:i.definesFirstLetter?xo(E,t):null,markerStyles:Oo?Eo(E,t):null,pseudoStyles:ko(E,t,a),parentElement:L,scrollLeft:ir?E.scrollLeft:0,scrollTop:ir?E.scrollTop:0,memoKey:ct?-1:q}),Cr.has(E.localName)||n?.has(E))return;let dt=$||!!E.shadowRoot;if(!dt){for(let U=E.firstElementChild;U!==null;U=U.nextElementSibling)F(U,E,!1,q);return}for(let U of re(E,dt))V(U)&&F(U,E,dt,q)};F(e,null,!1,0);let K=M!==null&&p!==null&&p.isStyleMemoSafe()&&p.propertyNames.length===k&&P.size<=8192;if(K?er.set(e.ownerDocument,{signature:M,memoKeysByParentKey:T,memoizedStylesByKey:P,variantEmittedStyles:_,memoKeyByElement:z,attributeGeneration:De,nextMemoKey:B}):er.delete(e.ownerDocument),p!==null&&x.size<=8192){let E=u&&c.scanByText===x&&c.feedScanCount===x.size?c.dedupedFeed:null;if(E===null){let L=new Set,$=[];for(let O of x.values())if(O.registryFeed!==null)for(let W of O.registryFeed){let D=`${W[0]}|${W[1]}`;L.has(D)||(L.add(D),$.push(W))}E=$}tr.set(e.ownerDocument,{sheetSignature:d,laneSignature:g,scanByText:x,dedupedFeed:E,feedScanCount:x.size})}else tr.delete(e.ownerDocument);return{snapshotByElement:o,perElementPropertyNames:b,persistedVariantEmittedStyles:K?_:null,inlineCarryTextByElement:l}};var Yi=e=>{if(e.includes(\"inset\"))return 0;let[t=0,r=0,n=0,o=0]=At(e),l=n*1.5;return Math.max(0,l+o-t,l+o+t,l+o-r,l+o+r)},qi=e=>{if(!e||e===\"none\")return 0;let t=0;for(let r of ie(e))t=Math.max(t,Yi(r));return t},Xi=e=>{let t=e[\"outline-style\"];if(!t||t===\"none\")return 0;let r=v(e[\"outline-width\"]);return r<=0?0:Math.max(0,r+v(e[\"outline-offset\"]))},at=e=>Math.ceil(Math.max(qi(e[\"box-shadow\"]),Xi(e),ke(e.filter))),ji=e=>e!==\"inline\"&&e!==\"contents\"&&!e.startsWith(\"table\")&&!e.startsWith(\"ruby\")&&!e.startsWith(\"inline-table\"),Zi=(e,t)=>{let r=t.getComputedStyle(e),n=at({\"box-shadow\":r.getPropertyValue(\"box-shadow\"),filter:r.getPropertyValue(\"filter\"),\"outline-style\":r.getPropertyValue(\"outline-style\"),\"outline-width\":r.getPropertyValue(\"outline-width\"),\"outline-offset\":r.getPropertyValue(\"outline-offset\")}),o=at({\"box-shadow\":r.getPropertyValue(\"text-shadow\")});return Math.max(n,o)},Mo=(e,t,r)=>{let n=new Set,o=e.ownerDocument.defaultView;if(!o)return n;let l=t.x-32,i=t.y-32,a=t.x+t.width+32,s=t.y+t.height+32,d=t.x-r,c=t.y-r,u=t.x+t.width+r,f=t.y+t.height+r,p=b=>{let m=b.getBoundingClientRect(),g=m.left<a&&m.right>l&&m.top<s&&m.bottom>i,x=m.left<u&&m.right>d&&m.top<f&&m.bottom>c,A=!g&&x?Zi(b,o):0,S={left:m.left-A,top:m.top-A,right:m.right+A,bottom:m.bottom+A},w=!1;for(let y of re(b))if(V(y)){w=!0;let R=p(y);R.left<S.left&&(S.left=R.left),R.top<S.top&&(S.top=R.top),R.right>S.right&&(S.right=R.right),R.bottom>S.bottom&&(S.bottom=R.bottom)}else y.nodeType===Node.TEXT_NODE&&y.textContent!==\"\"&&(w=!0);return w&&!(S.left<a&&S.right>l&&S.top<s&&S.bottom>i)&&b!==e&&ji(o.getComputedStyle(b).getPropertyValue(\"display\"))&&n.add(b),S};return p(e),n},Bo=e=>{let t=e.ownerDocument.defaultView;if(!t)return\"\";let r=ve(e);for(;r;){let n=t.getComputedStyle(r).backgroundColor;if(n&&n!==\"rgba(0, 0, 0, 0)\"&&n!==\"transparent\")return n;r=ve(r)}return\"\"};var Le=8e3,we=new Map,Qi=e=>we.set(e,(we.get(e)??0)+1),Ji=e=>{let t=we.get(e)-1;t>0?we.set(e,t):we.delete(e)},rr=e=>({...e,abortSignal:e.resultAbortSignal}),nr=async(e,t)=>{let r=jn(e.timeoutMs??Le,e.abortSignal);try{r.check();let n=await ae(t(r),r.signal);return r.check(),n}finally{r.dispose()}},vo=(e,t)=>{let r=e.ownerDocument.defaultView,n={x:r.scrollX,y:r.scrollY,width:e.clientWidth,height:e.clientHeight};return Fe(e,{scale:1,pixelRatio:t.pixelRatio,backgroundColor:void 0,embedFonts:t.embedFonts,bleed:0,clip:n.width>0&&n.height>0?{x:0,y:0,width:n.width,height:n.height}:void 0,prunedElements:void 0,filterNode:void 0,resolveIframeContent:void 0,timeoutMs:t.timeoutMs,abortSignal:t.abortSignal,budget:t.budget,resultAbortSignal:t.abortSignal},{suppressedBackdropElements:null,skipBackdropFilterBaking:!1,viewport:n})},ea=async(e,t)=>{if(t.resolveIframeContent)try{let r=await ae(t.resolveIframeContent(e),t.abortSignal);if(r){let n=await ae(Cn(r),t.abortSignal);if(n)return{pngDataUrl:r,widthPx:n.widthPx,heightPx:n.heightPx,canvasBackgroundColor:null}}}catch(r){if(t.abortSignal?.aborted)throw r}return Ln(e,t.pixelRatio,t.abortSignal)},ta=async(e,t)=>{let r=new Map,n=[];for(let l of e.keys()){if(!I(l,\"iframe\"))continue;let i=l.contentDocument,a=i?.documentElement;if(!i||!a||!i.defaultView){n.push(l);continue}if(!we.has(i))try{let s=await vo(a,t);r.set(l,{pngDataUrl:await s.toPngDataUrl(),widthPx:s.width,heightPx:s.height,canvasBackgroundColor:tt(i)})}catch(s){if(t.abortSignal?.aborted)throw s}}let o=await Promise.all(n.map(l=>ea(l,t)));for(let l=0;l<n.length;l+=1){let i=o[l];i&&r.set(n[l],i)}return r},Fe=async(e,t,r)=>{let n=e.ownerDocument,o=n.defaultView;if(!o)throw Error(\"captureNode requires an element attached to a window\");if(!e.isConnected)throw Error(\"captureNode requires an element attached to a document\");t.abortSignal?.throwIfAborted(),Qi(n);try{n.fonts.status!==\"loaded\"&&await ae(n.fonts.ready,t.abortSignal);let l=r.viewport??null,i=!r.skipBackdropFilterBaking&&r.suppressedBackdropElements===null?Rt(t):null;if(i!==null&&l&&(i+=`|viewport:${l.x},${l.y},${l.width},${l.height}`),i!==null){let B=kt(e,i);if(B)return t.backgroundColor=B.resolvedBackgroundColor,rt(B.svgMarkup,B.widthPx,B.heightPx,rr(t),B.clipRect)}let a=e.getBoundingClientRect(),s=e===n.documentElement?Math.max(a.height,e.scrollHeight):a.height,d=Math.ceil(a.right)-Math.floor(a.left),c=Math.ceil(a.top+s)-Math.floor(a.top),u=le(e)?e.offsetWidth:0,f=le(e)?Math.max(e.offsetHeight,Math.round(s)):0,p=Math.max(1,u>0?u:d),b=Math.max(1,f>0?f:c);eo(e,t.timeoutMs);let m=performance.now(),{snapshotByElement:g,perElementPropertyNames:x,persistedVariantEmittedStyles:A,inlineCarryTextByElement:S}=r.presnapshottedTree??No(e,o,t.filterNode,t.prunedElements);Y.snapshotMs=performance.now()-m;let w=i!==null?zr(e,g):null,y=g.get(e);if(!y)throw Error(\"captureNode target was excluded by filterNode or is not capturable\");let R=t.bleed===\"auto\"?at(y.styles):Math.max(0,Math.ceil(t.bleed)),N=$n({rootElement:e,rootStyles:y.styles,defaultView:o,layoutWidthPx:p,layoutHeightPx:b,bleedPx:R});if(!N.rootLinearTransform){let B=a.left-Math.floor(a.left),F=a.top-Math.floor(a.top);N={...N,layoutWidthPx:a.width>0?a.width:N.layoutWidthPx,layoutHeightPx:s>0?s:N.layoutHeightPx,outputWidthPx:Math.max(1,d)+2*R,outputHeightPx:Math.max(1,c)+2*R,contentOffsetLeftPx:R+B,contentOffsetTopPx:R+F}}let k=t.clip?{x:t.clip.x+N.contentOffsetLeftPx,y:t.clip.y+N.contentOffsetTopPx,width:t.clip.width,height:t.clip.height}:null;if(t.backgroundColor===void 0){let B=y.styles[\"background-color\"];(!B||B===\"rgba(0, 0, 0, 0)\"||B===\"transparent\"||N.rootLinearTransform||R>0)&&(t.backgroundColor=Bo(e)||void 0)}let M=performance.now(),h=await ae(ta(g,t),t.abortSignal);Y.iframesMs=performance.now()-M,t.abortSignal?.throwIfAborted();let C=new Map,T=performance.now();if(!r.skipBackdropFilterBaking){let B=Ir(g,e);if(B.length>0){let F=B.map(O=>O.getBoundingClientRect()),K=N.rootLinearTransform?void 0:vr(B,F,g,a),E=await Fe(e,{...t,scale:1,bleed:0,clip:K,resultAbortSignal:t.abortSignal},{suppressedBackdropElements:new Set(B),skipBackdropFilterBaking:!0,viewport:l,presnapshottedTree:{snapshotByElement:g,perElementPropertyNames:x,persistedVariantEmittedStyles:A,inlineCarryTextByElement:S}}),L=`${t.pixelRatio}|${t.backgroundColor??\"\"}|${K?.x??0},${K?.y??0}|`+B.map((O,W)=>`${F[W].x},${F[W].y},${F[W].width},${F[W].height},${g.get(O)?.styles[\"backdrop-filter\"]??\"\"}`).join(\";\")+`|${await E.toSvgDataUrl()}`,$=jt.get(L);$&&$.length===B.length?B.forEach((O,W)=>{let D=$[W];D&&C.set(O,D)}):(C=_r({underlayCanvas:await E.toCanvas(),ownerDocument:n,rootElement:e,backdropFilterElements:B,snapshotByElement:g,pixelRatio:t.pixelRatio,backgroundColor:t.backgroundColor,underlayOffsetLeftPx:K?.x??0,underlayOffsetTopPx:K?.y??0}),t.budget.check(),jt.set(L,B.map(O=>C.get(O)??\"\")))}}Y.backdropMs=performance.now()-T,t.abortSignal?.throwIfAborted();let P=cn(n),_;try{let B=performance.now(),F=go(),K=nn(e,{ownerDocument:n,classNameByElement:yo(g,x,P,F,e,N,r.suppressedBackdropElements,C,A),snapshotByElement:g,cloneByElement:new Map,iframeContentByElement:h,viewportScroll:l,prunedElements:t.prunedElements,inlineCarryTextByElement:S});if(!K)throw Error(\"captureNode could not clone the target element\");Y.buildMs=performance.now()-B;let E=performance.now(),[,L]=await ae(Promise.all([(async()=>{await An({clone:K,rules:F.rules,sourceDocument:n,timeoutMs:t.timeoutMs}),await En(K,F.rules,t.timeoutMs)})(),t.embedFonts?In(Mn(F.rules),n,t.timeoutMs,Bn(F.rules),vn(K,F.rules)):Promise.resolve(\"\")]),t.abortSignal);Y.inlineMs=performance.now()-E;let $=performance.now();_=Zn({clone:K,cssText:`${L}\n${lt(n).counterCss}\n${F.toCssText()}\n${xn(K)}`,width:Math.max(N.outputWidthPx,l?.width??0),height:Math.max(N.outputHeightPx,l?.height??0),clip:Se()?null:k,ownerDocument:n}),Y.serializeMs=performance.now()-$}finally{P.dispose()}let z=!!k&&Se(),Oe=k&&!z?k.width:N.outputWidthPx,xe=k&&!z?k.height:N.outputHeightPx,De=k&&!z?null:k;return t.budget.check(),i!==null&&Gr(e,i,w,{svgMarkup:_,widthPx:Oe,heightPx:xe,clipRect:De,resolvedBackgroundColor:t.backgroundColor,contentOffsetLeftPx:N.contentOffsetLeftPx,contentOffsetTopPx:N.contentOffsetTopPx}),rt(_,Oe,xe,rr(t),De)}finally{Ji(n)}},st=async(e,t={})=>{let r=e.ownerDocument.defaultView;if(!r)throw Error(\"captureNode requires an element attached to a window\");return nr(t,n=>Fe(e,{scale:t.scale??1,pixelRatio:t.pixelRatio??r.devicePixelRatio,backgroundColor:t.backgroundColor,embedFonts:t.embedFonts??!0,bleed:t.bleed??0,clip:t.clip,prunedElements:void 0,filterNode:t.filterNode,resolveIframeContent:t.resolveIframeContent,timeoutMs:t.timeoutMs??Le,abortSignal:n.signal,budget:n,resultAbortSignal:t.abortSignal},{suppressedBackdropElements:null,skipBackdropFilterBaking:!1}))},Io=async(e,t={})=>nr(t,r=>ra(e,{...t,abortSignal:r.signal,budget:r,resultAbortSignal:t.abortSignal})),ra=async(e,t)=>{let r=t.root??document.documentElement,n=r.ownerDocument.defaultView;if(!n)throw Error(\"captureRegion requires an element attached to a window\");let o=r.getBoundingClientRect(),l=t.cullMarginPx??256,i=l>=0?Mo(r,e,l):void 0,a={scale:t.scale??1,pixelRatio:t.pixelRatio??n.devicePixelRatio,backgroundColor:t.backgroundColor??tt(r.ownerDocument)??void 0,embedFonts:t.embedFonts??!0,bleed:0,clip:{x:e.x-o.left,y:e.y-o.top,width:e.width,height:e.height},prunedElements:i,filterNode:t.filterNode,resolveIframeContent:t.resolveIframeContent,timeoutMs:t.timeoutMs??Le,abortSignal:t.abortSignal,budget:t.budget,resultAbortSignal:t.resultAbortSignal},s={...a,clip:void 0,prunedElements:void 0},d=Rt(s);if(d!==null&&a.clip){let c=a.clip,u=()=>{let p=kt(r,d);return!p||p.clipRect!==null?null:rt(p.svgMarkup,p.widthPx,p.heightPx,rr({...s,backgroundColor:p.resolvedBackgroundColor}),{x:c.x+p.contentOffsetLeftPx,y:c.y+p.contentOffsetTopPx,width:c.width,height:c.height})},f=u();if(f)return f;if(Ur(r)){await Fe(r,s,{suppressedBackdropElements:null,skipBackdropFilterBaking:!1});let p=u();if(p)return p;Wr(r)}}return Vr(r),Fe(r,a,{suppressedBackdropElements:null,skipBackdropFilterBaking:!1})},_o=async(e=document)=>{if(e instanceof Element){try{await(await st(e)).toBlob()}catch{}return}let t=e.body??e.documentElement;if(!t)return;let r=e.createElement(\"div\");r.style.cssText=\"position:absolute;left:-99999px;top:0;width:16px;height:16px;background:#fff;\",r.textContent=\"prewarm\",t.appendChild(r);try{await(await st(r)).toBlob()}catch{return}finally{r.remove()}},Lo=()=>Fn(e=>nr({timeoutMs:Le},async t=>{let r=await vo(document.documentElement,{pixelRatio:e,embedFonts:!0,timeoutMs:Le,abortSignal:t.signal,budget:t});return{pngDataUrl:await r.toPngDataUrl(),widthPx:r.width,heightPx:r.height}}));return Ko(na);})();"
diff --git a/tests/core.test.mjs b/tests/core.test.mjs
index 888daed..b73653f 100644
--- a/tests/core.test.mjs
+++ b/tests/core.test.mjs
@@ -745,7 +745,7 @@ test('a design that does not start with its doctype is rejected with what it sta
})
// Run the served wrapper itself with a controlled clock and browser scheduling.
-async function frameWatchdog() {
+async function frameWatchdog(relay = '') {
let now = 0
let check
let loads = 0
@@ -763,7 +763,7 @@ async function frameWatchdog() {
querySelector: () => ({ append() {} }),
addEventListener: (type, listener) => documentListeners.set(type, listener),
}
- const html = designFrameHtml(SAFE_DESIGN, 'watchdog-test')
+ const html = designFrameHtml(SAFE_DESIGN, 'watchdog-test', [], relay)
runInNewContext(html.match(/<script>([\s\S]*?)<\/script>/)[1], {
document,
Date: { now: () => now },
@@ -816,6 +816,14 @@ test('the preview watchdog tolerates suspended timers before the visibility even
assert.equal(frame.loads, 1)
})
+test('the preview watchdog holds a silent design during capture, then resumes recovery', async () => {
+ const frame = await frameWatchdog('holdUntil=5000;')
+ for (let i = 0; i < 10; i++) frame.tick()
+ assert.equal(frame.loads, 1, 'capturing must not reload the document being photographed')
+ frame.tick()
+ assert.equal(frame.loads, 2, 'a silent design is recoverable again once the capture hold expires')
+})
+
test('the preview watchdog still restores a design that stays silent while visible', async () => {
const frame = await frameWatchdog()
for (let i = 0; i < 7; i++) frame.tick()