Skip to content

feat(Dom2Image): update SnapDOM to v3.4.0 - #1248

Merged
ArgoZhang merged 2 commits into
masterfrom
dev-dom2image
Oct 25, 2026
Merged

ArgoZhang merged 2 commits into
masterfrom
dev-dom2image

Conversation

@ArgoZhang

@ArgoZhang ArgoZhang commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Link issues

fixes #1247

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Update SnapDOM to version 3.4.0 in the Dom2Image component.

Bug Fixes:

  • Update the Dom2Image SnapDOM dependency to version 3.4.0.

Build:

  • Update the Dom2Image project package reference for SnapDOM 3.4.0.

# Conflicts:
#	src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs
@sourcery-ai

sourcery-ai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Upgrades the Dom2Image integration and its checked-in client-side bundle from SnapDOM to v3.4.0, with the project metadata and generated module kept in sync.

File-Level Changes

Change Details Files
Updates the Dom2Image component to use SnapDOM v3.4.0.
  • Adjusts the project dependency/version reference.
  • Regenerates the bundled SnapDOM module with the v3.4.0 distribution.
src/components/BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj
src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bb-auto bb-auto Bot added this to the v10.0.0 milestone Oct 25, 2026
@bb-auto bb-auto Bot added the enhancement New feature or request label Oct 25, 2026

@bb-auto bb-auto Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved by bb-auto

@ArgoZhang
ArgoZhang merged commit 28b27e7 into master Oct 25, 2026
2 of 3 checks passed
@ArgoZhang
ArgoZhang deleted the dev-dom2image branch October 25, 2026 12:51

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 security issues

Security issues:

  • User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities (link)
  • User controlled data in a g.innerHTML is an anti-pattern that can lead to XSS vulnerabilities (link)
Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs" line_range="16" />
<code_context>
`?"":o})}function rd(t){if(!t)return"";let e=[],n=/"((?:\\[\s\S]|[^"\\])*)"|'((?:\\[\s\S]|[^'\\])*)'/g,o=0,i;for(;i=n.exec(t);){let s=t.slice(o,i.index).trim();s&&e.push(s),e.push(od(i[1]!==void 0?i[1]:i[2])),o=n.lastIndex}let r=t.slice(o).trim();return r&&e.push(r),e.join("")}function Cr(t,e,n){let o=t.parentElement,i=o&&n?n.get(o):null;return i?{get(r,s){let a=e.get(r,s),l=i.get(s);return typeof l=="number"?Math.max(a,l):a},getStack(r,s){let a=e.getStack(r,s);if(!a.length)return a;let l=i.get(s);if(typeof l=="number"){let u=a.slice();return u[u.length-1]=Math.max(u[u.length-1],l),u}return a}}:e}function kr(t,e,n){let o=new Map,i=(u,c)=>Cn(u,c).map(([f,d])=>({name:f,num:d})),r=i(e?.counterReset,0),s=i(e?.counterSet,0),a=i(e?.counterIncrement,1);function l(u){if(o.has(u))return o.get(u).slice();let c=n.getStack(t,u);c=c.length?c.slice():[];let f=r.find(m=>m.name===u);if(f){let m=Number.isFinite(f.num)?f.num:0;c=c.length?[...c,m]:[m]}let d=s.find(m=>m.name===u);if(d){let m=Number.isFinite(d.num)?d.num:0;c.length===0&&(c=[0]),c[c.length-1]=m}let h=a.find(m=>m.name===u);if(h){let m=Number.isFinite(h.num)?h.num:1;c.length===0&&(c=[0]),c[c.length-1]+=m}return o.set(u,c.slice()),c}return{get(u,c){let f=l(c);return f.length?f[f.length-1]:0},getStack(u,c){return l(c)},__incs:a}}var id=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","letter-spacing","line-height"],sd=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","font-variant","letter-spacing","word-spacing","text-transform","text-decoration-line","text-decoration-color","text-decoration-style","line-height","background-color","vertical-align"];function Ca(t,e,n,o,i,r){try{if(o===null){if(t.getRootNode()!==(t.ownerDocument||document))return;let f=D(t).display||"";if(i==="::marker"?!f.includes("list-item"):!(f==="block"||f==="flow-root"||f==="list-item"||f==="inline-block"||f==="table-cell"||f==="table-caption"))return}else if(!t.matches(o))return;if(i==="::marker"&&!(D(t).display||"").includes("list-item"))return;let s=D(t,i),a=D(t);if(!s)return;let l="";for(let f of r){let d=s.getPropertyValue(f);d&&d!==a.getPropertyValue(f)&&!(f==="background-color"&&d==="rgba(0, 0, 0, 0)")&&!(f==="vertical-align"&&d==="baseline")&&(l+=`${f}:${d};`)}if(i==="::marker"){let f=s.getPropertyValue("content");f&&f!=="normal"&&f!=="none"&&(l+=`content:${f};`)}if(!l)return;let c=`data-sd-p${n.__pseudoRuleSeq=(n.__pseudoRuleSeq||0)+1}`;e.setAttribute(c,""),n.__pseudoCSS=(n.__pseudoCSS||"")+`[${c}]${i}{${l}}`}catch{}}function ad(t,e){if(!/\b(?:no-)?(?:open|close)-quote\b/.test(t))return t;let n="\u201C",o="\u201D";try{let i=D(e).quotes;if(i==="none")n="",o="";else if(i&&i!=="auto"){let r=i.match(/"[^"]*"|'[^']*'/g);r&&r.length>=2&&(n=r[0].slice(1,-1),o=r[1].slice(1,-1))}}catch{}return n=n.replace(/"/g,""),o=o.replace(/"/g,""),t.replace(/"[^"]*"|\b(no-open-quote|no-close-quote|open-quote|close-quote)\b/g,(i,r)=>r?r==="open-quote"?`"${n}"`:r==="close-quote"?`"${o}"`:'""':i)}function ld(t,e,n,o){let i;try{i=D(t,e)}catch{}let r=i?.content;if(!r||r==="none"||r==="normal")return{text:"",incs:[]};r=nd(r),r=ad(r,t);let s=Cr(t,n,o),a=kr(t,i,s),l=ya(r)?wa(r,t,a):r;return{text:rd(l),incs:a.__incs||[]}}function cd(t,e){if(e.__shadowPseudo)return!1;let n=se(t),o=[];for(let r of["before","after","firstLetter","marker","firstLine"]){let s=n[r];if(s===null)return!1;s&&o.push(s)}if(!o.length)return!0;let i=o.join(",");try{return!t.matches(i)&&t.querySelector(i)===null}catch{return!1}}async function qe(t,e,n,o,i=!1){if(t?.nodeType!==1||e?.nodeType!==1||(n.slicer?.due()&&await n.slicer.pause(),t.tagName==="TEXTAREA"))return;let r=t.ownerDocument||document;if(!i&&!td(r,n)&&!n.__shadowPseudo||!i&&cd(t,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=ed(t.ownerDocument||document,n));let s=n.__counterCtx,a=se(t);a.marker!==""&&Ca(t,e,n,a.marker,"::marker",id),a.firstLine!==""&&Ca(t,e,n,a.firstLine,"::first-line",sd);for(let u of["::before","::after","::first-letter"]){let c=a[u==="::before"?"before":u==="::after"?"after":"firstLetter"];if(c!==null){if(c==="")continue;try{if(!t.matches(c))continue}catch{}}try{let f=D(t,u);if(!f||f.content==="none"&&f.backgroundImage==="none"&&(f.backgroundColor==="transparent"||f.backgroundColor==="rgba(0, 0, 0, 0)")&&!va(f)&&(!f.transform||f.transform==="none")&&f.display==="inline")continue;if(f.display==="none"||u!=="::first-letter"&&(f.content==="none"||f.content==="normal")){u==="::before"&&(e.dataset.snapdomHasBefore="1"),u==="::after"&&(e.dataset.snapdomHasAfter="1");continue}if(u==="::first-letter"){let G=D(t),X=(G?.display||"").toLowerCase();if(X.includes("flex")||X.includes("grid"))continue;let V=Jt=>f[Jt]!==G[Jt]&&(parseFloat(f[Jt])||0)!==0;if(!(f.color!==G.color||f.fontSize!==G.fontSize||f.fontWeight!==G.fontWeight||f.fontFamily!==G.fontFamily||f.fontStyle!==G.fontStyle||f.textTransform!==G.textTransform||f.float!==G.float&&f.float!=="none"||V("paddingTop")||V("paddingRight")||V("paddingBottom")||V("paddingLeft")||V("marginTop")||V("marginRight")||V("marginBottom")||V("marginLeft")))continue;let K=Array.from(e.childNodes).find(Jt=>Jt.nodeType===Node.TEXT_NODE&&Jt.textContent?.trim().length>0);if(!K)continue;let de=K.textContent,Re=/^\s*/.exec(de)[0],sn=de.slice(Re.length),bt=sn.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],Pt=sn.slice(bt?.length||0);if(!bt||/[\uD800-\uDFFF]/.test(bt))continue;let Kt=document.createElement("span");Kt.textContent=bt,Kt.dataset.snapdomPseudo="::first-letter";let Wo=Ne(f,On(t)),Fe=Pe(Wo,"span");n.styleMap.set(Kt,Fe);let Oo=document.createTextNode(Pt);e.replaceChild(Oo,K),e.insertBefore(Kt,Oo),Re&&e.insertBefore(document.createTextNode(Re),Kt);continue}let m=f.content??"",p=m===""||m==="none"||m==="normal",{text:g,incs:y}=ld(t,u,s,n.__siblingCounters),b=f.backgroundImage,w=f.backgroundColor,S=f.fontFamily,k=parseInt(f.fontSize)||32,C=parseInt(f.fontWeight)||!1,x=f.fontStyle||"normal",A=f.color||"#000",M=f.transform,v=Ut(S,o?.__iconMatchers),_=!p&&g!=="",E=b&&b!=="none",T=w&&w!=="transparent"&&w!=="rgba(0, 0, 0, 0)",N=va(f),$=M&&M!=="none",O=m!=="none"&&m!=="normal",R=/^inline-/.test(f.display||""),L=O&&((parseFloat(f.width)||0)>0||(parseFloat(f.height)||0)>0||R),I=O&&f.boxShadow&&f.boxShadow!=="none",F=O&&f.outlineStyle&&f.outlineStyle!=="none"&&(parseFloat(f.outlineWidth)||0)>0;if(!(_||E||T||N||$||L||I||F)){if(y&&y.length&&t.parentElement){let G=n.__siblingCounters.get(t.parentElement)||new Map;for(let{name:X}of y){if(!X)continue;let V=Cr(t,s,n.__siblingCounters),K=kr(t,D(t,u),V).get(t,X);G.set(X,K)}n.__siblingCounters.set(t.parentElement,G)}continue}let z=g.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(g),B=f.display==="inline"&&f.cssFloat==="none"&&f.position!=="absolute"&&f.position!=="fixed",q=!1;if(_&&!v&&g.length>1&&!z&&B){let G=D(t),X=parseFloat(G.fontSize)||16,V=parseFloat(G.lineHeight);Number.isFinite(V)||(V=X*1.5),t.getBoundingClientRect().height<V*1.6&&(e.style.whiteSpace="nowrap",q=!0)}let j=document.createElement("span");j.dataset.snapdomPseudo=u,j.style.pointerEvents="none",q&&(j.style.whiteSpace="nowrap");let ft=gs(t,u,f,n,o),ut=(D(t).display||"").toLowerCase(),dt=ut.includes("flex")||ut.includes("grid");if(dt){let G=ft["min-width"];(!G||G==="auto"||G==="0px")&&(ft["min-width"]="0px")}let vt=_;vt&&!B&&parseFloat(f.height)>=1.5*(parseFloat(f.lineHeight)||(parseFloat(f.fontSize)||16)*1.2)&&(vt=!1,j.style.whiteSpace=f.whiteSpace);let ue=Pe(ft,"span",vt,dt);if(n.styleMap.set(j,ue),v&&g&&g.length===1){let{dataUrl:G,height:X,advance:V,descent:pt}=await aa(g,S,C,k,A,x),K=document.createElement("img");K.src=G,K.style=`height:${k}px;width:${V/X*k}px;object-fit:contain;vertical-align:${-pt}px;`,j.appendChild(K)}else if(g&&z){let G=ln(g,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??he(g);if(G?.trim())try{let X=await lt(te(G),{as:"dataURL",useProxy:o.useProxy,debug:o.debug});if(X?.ok&&typeof X.data=="string"){let V=document.createElement("img");V.src=X.data,V.style=`width:${k}px;height:auto;object-fit:contain;`,j.appendChild(V)}}catch(X){W(o,`Couldn't draw the ${u} icon of`,[t,X])}}else!v&&_&&(j.textContent=g);j.style.backgroundImage="none","maskImage"in j.style&&(j.style.maskImage="none"),"webkitMaskImage"in j.style&&(j.style.webkitMaskImage="none");try{j.style.backgroundRepeat=f.backgroundRepeat,j.style.backgroundSize=f.backgroundSize,f.backgroundPositionX&&f.backgroundPositionY?(j.style.backgroundPositionX=f.backgroundPositionX,j.style.backgroundPositionY=f.backgroundPositionY):j.style.backgroundPosition=f.backgroundPosition,j.style.backgroundOrigin=f.backgroundOrigin,j.style.backgroundClip=f.backgroundClip,j.style.backgroundAttachment=f.backgroundAttachment,j.style.backgroundBlendMode=f.backgroundBlendMode}catch{}if(E)try{let G=ne(b),X=await Promise.all(G.map(V=>Te(V,o)));j.style.backgroundImage=X.join(", ")}catch(G){W(o,`Couldn't load the ${u} background image.`,G)}T&&(j.style.backgroundColor=w);let it=f.maskImage||f.webkitMaskImage;if(it&&it!=="none")try{let X=(await Promise.all(ne(it).map(V=>Te(V,o)))).join(", ");j.style.maskImage=X,j.style.webkitMaskImage=X;for(let V of["maskSize","maskRepeat","maskPosition","maskMode","maskComposite","maskOrigin","maskClip"])f[V]&&(j.style[V]=f[V])}catch(G){W(o,`Couldn't load the ${u} mask image.`,G)}let Ee=j.childNodes.length>0||j.textContent?.trim()!==""||E||T||N||$||L||I||F;if(y&&y.length&&t.parentElement){let G=n.__siblingCounters.get(t.parentElement)||new Map,X=Cr(t,s,n.__siblingCounters),V=kr(t,D(t,u),X);for(let{name:pt}of y){if(!pt)continue;let K=V.get(t,pt);G.set(pt,K)}n.__siblingCounters.set(t.parentElement,G)}if(!Ee)continue;u==="::before"?(e.dataset.snapdomHasBefore="1",e.insertBefore(j,e.firstChild)):(e.dataset.snapdomHasAfter="1",e.appendChild(j))}catch(f){nt(o.__session,"pseudo-failed",`${u} could not be copied`,t),W(o,`Couldn't copy the ${u} of`,[t,f])}}let l=Array.from(e.children).filter(u=>!u.dataset.snapdomPseudo);if(n.nodeMap)for(let u of l){let c=n.nodeMap.get(u);c?.nodeType===1&&await qe(c,u,n,o,!0)}else{let u=Array.from(t.children);for(let c=0;c<Math.min(u.length,l.length);c++)await qe(u[c],l[c],n,o,!0)}}var Ma="http://www.w3.org/2000/svg",fd=["background-image","background-size","background-position","background-repeat","background-origin"];function Aa(t){for(let[e,n]of t)try{ud(e,n)}catch{}}function ud(t,e){let n=t.ownerDocument.defaultView,o=n.getComputedStyle(t),i=[...t.getClientRects()];if(!i.length)return;let r=i[0].left+parseFloat(o.borderLeftWidth),s=i[0].top+parseFloat(o.borderTopWidth),a;if(o.display==="inline"){let y=i.reduce((w,S)=>w+S.width,0),b=0;a=i.map(w=>{let S={x:w.left-r-b,y:w.top-s,w:y,h:w.height,top:w.top,bottom:w.bottom};return b+=w.width,S})}else{let y=t.clientWidth||i[0].width,b=t.clientHeight||i[0].height;a=[{x:0,y:0,w:y,h:b,top:-1/0,bottom:1/0}]}let l=e.ownerDocument,u=`sd-bct-${Math.random().toString(36).slice(2,9)}`,c=fd.map(y=>`${y}:${o.getPropertyValue(y)}`).join(";").replace(/"/g,"'"),f="";a.forEach((y,b)=>{let w=`<svg xmlns="${Ma}" width="${y.w}" height="${y.h}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${y.w}px;height:${y.h}px;${c}"></div></foreignObject></svg>`;f+=`<pattern id="${u}-${b}" patternUnits="userSpaceOnUse" x="${y.x}" y="${y.y}" width="${y.w}" height="${y.h}"><image width="${y.w}" height="${y.h}" preserveAspectRatio="none" href="data:image/svg+xml;charset=utf-8,${encodeURIComponent(w)}"/></pattern>`});let d="",h=l.createElement("canvas").getContext("2d"),m=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT),p=t.ownerDocument.createRange();for(let y=m.nextNode();y;y=m.nextNode()){let b=n.getComputedStyle(y.parentElement);h.font=b.font;let w=h.measureText("X").fontBoundingBoxAscent;if(!Number.isFinite(w))return;let S=b.font.replace(/"/g,"'"),k=a.map(()=>({xs:[],ys:[],chars:""})),C=y.data;for(let x=0;x<C.length;x++){let A=C.charCodeAt(x)>=55296&&C.charCodeAt(x)<=56319?2:1;p.setStart(y,x),p.setEnd(y,x+A);let M=p.getClientRects()[0],v=C.slice(x,x+A);if(x+=A-1,!M||!v.trim())continue;let _=(M.top+M.bottom)/2,E=a.findIndex(T=>_>=T.top&&_<=T.bottom);E<0&&(E=0),k[E].xs.push(+(M.left-r).toFixed(2)),k[E].ys.push(+(M.top-s+w).toFixed(2)),k[E].chars+=v}k.forEach((x,A)=>{if(!x.chars)return;let M=x.chars.replace(/&/g,"&amp;").replace(/</g,"&lt;");d+=`<text x="${x.xs.join(" ")}" y="${x.ys.join(" ")}" fill="url(#${u}-${A})" style="font:${S};font-kerning:none;letter-spacing:0;white-space:pre">${M}</text>`})}if(!d)return;let g=l.createElementNS(Ma,"svg");g.setAttribute("style","position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none"),g.innerHTML=`<defs>${f}</defs>${d}`,o.position==="static"&&e.style.setProperty("position","relative","important"),e.style.setProperty("color","transparent","important"),e.style.setProperty("-webkit-text-fill-color","transparent","important"),e.insertBefore(g,e.firstChild)}Rt();function _a(t,e,n){if(!t||t?.nodeType!==1)return;let o=t.ownerDocument||document,i=e||o,r=It(t)&&t.localName==="svg"?[t]:Array.from(t.querySelectorAll("svg")),s=/url\(\s*["']?\s*#([^)"']+)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],l=C=>window.CSS&&CSS.escape?CSS.escape(C):C.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),u="http://www.w3.org/1999/xlink",c=C=>{if(!C||!C.getAttribute)return null;let x=C.getAttribute("href")||C.getAttribute("xlink:href")||(typeof C.getAttributeNS=="function"?C.getAttributeNS(u,"href"):null);if(x)return x;let A=C.attributes;if(!A)return null;for(let M=0;M<A.length;M++){let v=A[M];if(!v||!v.name)continue;if(v.name==="href")return v.value;let _=v.name.indexOf(":");if(_!==-1&&v.name.slice(_+1)==="href")return v.value}return null},f=new Set(Array.from(t.querySelectorAll("[id]")).map(C=>C.id)),d=new Set,h=!1,m=(C,x=null)=>{if(!C)return;s.lastIndex=0;let A;for(;A=s.exec(C);){h=!0;let M=(A[1]||"").trim();M&&(f.has(M)||(d.add(M),x&&!x.has(M)&&x.add(M)))}},p=C=>{let x=C.querySelectorAll("use");for(let v of x){let _=c(v);if(!_||!_.startsWith("#"))continue;h=!0;let E=_.slice(1).trim();E&&!f.has(E)&&d.add(E)}let A='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(C.getAttribute("style")||"");for(let v of a)m(C.getAttribute(v));let M=C.querySelectorAll(A);for(let v of M){m(v.getAttribute("style")||"");for(let _ of a)m(v.getAttribute(_))}},g=C=>{if(!C||C.nodeType!==1||!C.querySelectorAll)return;let x="filter[id],clipPath[id],mask[id],linearGradient[id],radialGradient[id],pattern[id]",A=!1;try{A=!!(i.querySelector&&i.querySelector(x))}catch{return}if(!A)return;let M=["filter","clipPath","mask","maskImage","webkitMaskImage"],v=_=>{if(It(_))return;let E;try{E=getComputedStyle(_)}catch{return}for(let T of M){let N=E[T];N&&N.includes("url(")&&m(N)}};v(C);for(let _ of C.querySelectorAll("*"))v(_)};for(let C of r)p(C);if(g(n),!h)return;let y=t.querySelector("svg.inline-defs-container");y||(y=o.createElementNS("http://www.w3.org/2000/svg","svg"),y.classList.add("inline-defs-container"),y.setAttribute("aria-hidden","true"),y.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(y,t.firstChild||null));let b=y.querySelector("defs")||null,w=C=>{if(!C||f.has(C))return null;let x=l(C),A=M=>{let v=i.querySelector(M);return v&&!t.contains(v)?v:null};return A(`svg defs > *#${x}`)||A(`svg > symbol#${x}`)||A(`*#${x}`)};if(!d.size)return;let S=new Set(d),k=new Set;for(;S.size;){let C=S.values().next().value;if(S.delete(C),!C||f.has(C)||k.has(C))continue;let x=w(C);if(!x){k.add(C);continue}b||(b=o.createElementNS("http://www.w3.org/2000/svg","defs"),y.appendChild(b));let A=x.cloneNode(!0);A.id||A.setAttribute("id",C),b.appendChild(A),k.add(C),f.add(C);let M=[A,...A.querySelectorAll("*")];for(let v of M){let _=c(v);if(_&&_.startsWith("#")){let T=_.slice(1).trim();T&&!f.has(T)&&!k.has(T)&&S.add(T)}let E=v.getAttribute?.("style")||"";E&&m(E,S);for(let T of a){let N=v.getAttribute?.(T);N&&m(N,S)}}}}Rt();var Mr=new WeakMap,Ar=new WeakMap;function ro(t,e,n){let o=n.get(t),i=t.style;if(!o){let s=i.cssText,a=t.hasAttribute("style");o={users:0,saved:e.map(([u,c])=>{let f={property:u,value:i.getPropertyValue(u),priority:i.getPropertyPriority(u)};return i.setProperty(u,c,"important"),f.forcedValue=i.getPropertyValue(u),f}),originalCSS:s,forcedCSS:i.cssText,hadStyle:a},n.set(t,o)}o.users++;let r=!1;return()=>{if(!r&&(r=!0,!--o.users)){if(n.delete(t),i.cssText===o.forcedCSS)i.cssText=o.originalCSS;else for(let s of o.saved)i.getPropertyValue(s.property)!==s.forcedValue||i.getPropertyPriority(s.property)!=="important"||(s.value?i.setProperty(s.property,s.value,s.priority):i.removeProperty(s.property));!o.hadStyle&&!i.length&&(t.getAttribute("style"),t.removeAttribute("style"))}}}function Ea(t){if(Mr.has(t))return ro(t,[],Mr);let e=getComputedStyle(t),n=e.outlineStyle,o=e.outlineWidth,i=n!=="none"&&parseFloat(o)>0,r=parseFloat(e.borderTopWidth)===0&&parseFloat(e.borderRightWidth)===0&&parseFloat(e.borderBottomWidth)===0&&parseFloat(e.borderLeftWidth)===0;if(i&&r){let s=[];for(let a of["top","right","bottom","left"])s.push([`border-${a}-width`,o],[`border-${a}-style`,"solid"],[`border-${a}-color`,"transparent"]);return ro(t,s,Mr)}return()=>{}}function io(t,e=null){let n=[],o=i=>{if(!Et(i))return;if(Ar.has(i)){n.push(ro(i,[],Ar));return}let r=getComputedStyle(i);(r.contentVisibility||r.getPropertyValue("content-visibility")||"")==="auto"&&n.push(ro(i,[["content-visibility","visible"]],Ar))};try{if(e){let r=s=>{let a;try{a=s.getBoundingClientRect()}catch{return}if(!((a.width>0||a.height>0)&&(a.right<e.left-200||a.left>e.right+200||a.bottom<e.top-200||a.top>e.bottom+200))){o(s);for(let l=s.firstElementChild;l;l=l.nextElementSibling)r(l)}};r(t)}else{for(let i of t.querySelectorAll("*"))o(i);o(t)}}catch{}return()=>{for(let i of n)try{i()}catch{}}}At();kt();Ft();Le();Ft();function Er(t){return Fa(t.boxShadow)}function Rr(t){return Fa(t.textShadow)}function Fa(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",o=0;for(let l=0;l<t.length;l++){let u=t[l];u==="("?o++:u===")"&&(o=Math.max(0,o-1)),u===","&&o===0?(e.push(n),n=""):n+=u}n.trim()&&e.push(n);let i=0,r=0,s=0,a=0;for(let l of e){if(/\binset\b/i.test(l))continue;let u=l.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(u.length<2)continue;let[c,f,d=0,h=0]=u,m=Math.abs(c)+d+h,p=Math.abs(f)+d+h;r=Math.max(r,m+Math.max(c,0)),a=Math.max(a,m+Math.max(-c,0)),s=Math.max(s,p+Math.max(f,0)),i=Math.max(i,p+Math.max(-f,0))}return{top:Math.ceil(i),right:Math.ceil(r),bottom:Math.ceil(s),left:Math.ceil(a)}}function Fr(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,o=0,i;for(;i=n.exec(e);)o+=parseFloat(i[1])||0;let r=Math.ceil(o*2);return{top:r,right:r,bottom:r,left:r}}function Tr(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0),n=parseFloat(t.outlineOffset||"0")||0,o=e+Math.max(0,Math.ceil(n));return{top:o,right:o,bottom:o,left:o}}function $r(t){let e=`${t.filter||""} ${t.webkitFilter||""}`.trim();if(!e||e==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=e.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],o=0,i=0,r=0,s=0,a=!1;for(let l of n){a=!0;let u=l.match(/-?\d+(?:\.\d+)?px/gi)?.map(p=>parseFloat(p))||[],[c=0,f=0,d=0]=u,h=Math.abs(c)+d,m=Math.abs(f)+d;i=Math.max(i,h+Math.max(c,0)),s=Math.max(s,h+Math.max(-c,0)),r=Math.max(r,m+Math.max(f,0)),o=Math.max(o,m+Math.max(-f,0))}return{bleed:{top:U(o),right:U(i),bottom:U(r),left:U(s)},has:a}}function dd(t){let e=Er(t),n=Rr(t),o=Fr(t),i=Tr(t),r=$r(t);return{top:Math.max(e.top,n.top)+o.top+i.top+r.bleed.top,right:Math.max(e.right,n.right)+o.right+i.right+r.bleed.right,bottom:Math.max(e.bottom,n.bottom)+o.bottom+i.bottom+r.bleed.bottom,left:Math.max(e.left,n.left)+o.left+i.left+r.bleed.left}}function pd(t){return t.boxShadow&&t.boxShadow!=="none"||t.textShadow&&t.textShadow!=="none"||(t.outlineStyle||"none")!=="none"||t.filter&&t.filter!=="none"?!0:!!t.webkitFilter&&t.webkitFilter!=="none"}function Ra(t){let e=t.overflowX||t.overflow||"visible",n=t.overflowY||t.overflow||"visible",o=!!t.contain&&/\b(paint|content|strict)\b/.test(t.contain)||!!t.clipPath&&t.clipPath!=="none";return{x:o||e!=="visible",y:o||n!=="visible"}}function Pr(t,e,n,o=1,i=1){let r=0,s=0,a=0,l=0,u=Ra(n.get(t)||D(t));if(u.x&&u.y)return{top:0,right:0,bottom:0,left:0};let c=t.getBoundingClientRect();for(let f of e.values()){if(f===t||f.nodeType!==1||f.ownerDocument!==t.ownerDocument)continue;let d=n.get(f);if(!d||!pd(d))continue;let h=dd(d);if(!(h.top||h.right||h.bottom||h.left))continue;let m=f.getBoundingClientRect(),p={left:m.left-h.left/o,top:m.top-h.top/i,right:m.right+h.right/o,bottom:m.bottom+h.bottom/i};for(let g=f.parentElement;g;g=g.parentElement){let y=Ra(n.get(g)||D(g));if(y.x||y.y){let b=g.getBoundingClientRect();y.x&&(p.left=Math.max(p.left,b.left),p.right=Math.min(p.right,b.right)),y.y&&(p.top=Math.max(p.top,b.top),p.bottom=Math.min(p.bottom,b.bottom))}if(g===t)break}u.x||(l=Math.max(l,(c.left-p.left)*o),s=Math.max(s,(p.right-c.right)*o)),u.y||(r=Math.max(r,(c.top-p.top)*i),a=Math.max(a,(p.bottom-c.bottom)*i))}return{top:Math.max(0,Math.ceil(r)),right:Math.max(0,Math.ceil(s)),bottom:Math.max(0,Math.ceil(a)),left:Math.max(0,Math.ceil(l))}}function Ta(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch{}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch{}let o=n.transform||"none";if(!o||o==="none"){let l=null;try{l=ve(t).scale}catch{}try{e.style.transform="none"}catch{}if(!l)return{a:1,b:0,c:0,d:1};let u=le({scale:l});return{a:u.a,b:u.b,c:u.c,d:u.d}}function i(l,u,c,f){let d=Math.sqrt(l*l+u*u)||0,h=0,m=0;if(d>0){let p=l/d,g=u/d;h=p*c+g*f;let y=c-p*h,b=f-g*h;m=Math.sqrt(y*y+b*b)||0,m>0?h=h/m:h=0}return{a:d,b:0,c:h*m,d:m}}let r=l=>{let u=ve(t).scale;if(!u)return l;let c=le({scale:u,baseTransform:`matrix(${l.a},${l.b},${l.c},${l.d},0,0)`});return{a:c.a,b:c.b,c:c.c,d:c.d}},s=o.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let l=s[1].split(",").map(u=>parseFloat(u.trim()));if(l.length===6&&l.every(Number.isFinite)){let[u,c,f,d]=l,h=i(u,c,f,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return r(h)}}let a=o.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let l=a[1].split(",").map(u=>parseFloat(u.trim()));if(l.length===16&&l.every(Number.isFinite)){let u=l[0],c=l[1],f=l[4],d=l[5],h=i(u,c,f,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return r(h)}}try{let l=new DOMMatrix(o),u=i(l.a,l.b,l.c,l.d);try{e.style.transform=`matrix(${u.a}, ${u.b}, ${u.c}, ${u.d}, 0, 0)`}catch{}return r(u)}catch{return null}}function Xe(t,e,n,o,i){let r=n.a,s=n.b,a=n.c,l=n.d,u=n.e||0,c=n.f||0;function f(y,b){let w=y-o,S=b-i,k=r*w+a*S,C=s*w+l*S;return k+=o+u,C+=i+c,[k,C]}let d=[f(0,0),f(t,0),f(0,e),f(t,e)],h=1/0,m=1/0,p=-1/0,g=-1/0;for(let[y,b]of d)y<h&&(h=y),b<m&&(m=b),y>p&&(p=y),b>g&&(g=b);return{minX:h,minY:m,maxX:p,maxY:g,width:p-h,height:g-m}}function kn(t,e,n){let o=(t.transformOrigin||"0 0").trim().split(/\s+/),[i,r]=[o[0]||"0",o[1]||"0"],s=(a,l)=>{let u=a.toLowerCase();return u==="left"||u==="top"?0:u==="center"?l/2:u==="right"||u==="bottom"?l:u.endsWith("px")?parseFloat(u)||0:u.endsWith("%")?(parseFloat(u)||0)*l/100:/^-?\d+(\.\d+)?$/.test(u)&&parseFloat(u)||0};return{ox:s(i,e),oy:s(r,n)}}function ve(t){let e={rotate:"0deg",scale:null,translate:null},n=null;try{n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null}catch{}if(n){let i=l=>{try{return typeof n.has=="function"&&!n.has(l)||typeof n.get!="function"?null:n.get(l)}catch{return null}},r=i("rotate");if(r)if(r.angle){let l=r.angle;e.rotate=l.unit==="rad"?l.value*180/Math.PI+"deg":l.value+l.unit,r.is2D===!1&&r.x&&r.y&&r.z&&(e.rotate=`${r.x.value} ${r.y.value} ${r.z.value} ${e.rotate}`)}else r.unit?e.rotate=r.unit==="rad"?r.value*180/Math.PI+"deg":r.value+r.unit:e.rotate=String(r);else{let l=getComputedStyle(t);e.rotate=l.rotate&&l.rotate!=="none"?l.rotate:"0deg"}let s=i("scale");if(s){let l=u=>u&&u.value!=null?`${u.value}${u.unit==="percent"?"%":""}`:null;"x"in s&&s.x?.value!=null?e.scale=[l(s.x),l(s.y)??l(s.x),...s.is2D===!1?[l(s.z)??"1"]:[]].join(" "):Array.isArray(s)?e.scale=s.map(l).join(" "):e.scale=String(s)}else{let l=getComputedStyle(t);e.scale=l.scale&&l.scale!=="none"?l.scale:null}let a=i("translate");if(a){let l=u=>u&&u.value!=null?`${u.value}${u.unit==="percent"?"%":u.unit||"px"}`:null;"x"in a&&a.x?.value!=null?e.translate=[l(a.x),l(a.y)??"0px",...a.is2D===!1?[l(a.z)??"0px"]:[]].join(" "):Array.isArray(a)?e.translate=a.map(l).join(" "):e.translate=String(a)}else{let l=getComputedStyle(t);e.translate=l.translate&&l.translate!=="none"?l.translate:null}return(!e.rotate||e.rotate==="none")&&(e.rotate="0deg"),(!e.scale||e.scale==="none")&&(e.scale=null),(!e.translate||e.translate==="none")&&(e.translate=null),e}let o=getComputedStyle(t);return e.rotate=o.rotate&&o.rotate!=="none"?o.rotate:"0deg",e.scale=o.scale&&o.scale!=="none"?o.scale:null,e.translate=o.translate&&o.translate!=="none"?o.translate:null,e}var _r=null;function hd(){if(_r?.isConnected)return _r;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),tt(t),Object.assign(t.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(t),_r=t,t}function le(t){let e=r=>{let s=[],a=0,l=0,u=String(r).trim();for(let c=0;c<u.length;c++)u[c]==="("?a++:u[c]===")"?a--:/\s/.test(u[c])&&!a&&(c>l&&s.push(u.slice(l,c)),l=c+1);return l<u.length&&s.push(u.slice(l)),s},n=r=>r&&r!=="none",o=[];if(n(t.translate)){let r=e(t.translate);for(let s=0;s<2&&s<r.length;s++){let a=s===0?t.width:t.height;/^[+-]?(?:\d*\.)?\d+%$/.test(r[s])&&Number.isFinite(a)&&(r[s]=`${parseFloat(r[s])*a/100}px`)}o.push(r.length>2?`translate3d(${r.join(",")})`:`translate(${r.join(",")})`)}if(n(t.rotate)&&t.rotate!=="0deg"){let r=e(t.rotate);r.length===4?o.push(`rotate3d(${r.join(",")})`):r.length===2&&/^[xyz]$/i.test(r[0])?o.push(`rotate${r[0].toUpperCase()}(${r[1]})`):o.push(`rotate(${r.join(" ")})`)}if(n(t.scale)){let r=e(t.scale).map(s=>/%$/.test(s)?String(parseFloat(s)/100):s);o.push(r.length>2?`scale3d(${r.join(",")})`:`scale(${r.join(",")})`)}if(n(t.baseTransform)&&o.push(t.baseTransform),!o.length)return new DOMMatrix;let i=o.join(" ");try{if(i.includes("%"))throw new Error("Transform needs a reference box");return new DOMMatrix(i)}catch{let r=hd(),s=document.createElement("div");if(s.style.cssText="all:initial!important;display:block!important;transform-origin:0 0!important",s.style.setProperty("width",`${Number.isFinite(t.width)?t.width:0}px`,"important"),s.style.setProperty("height",`${Number.isFinite(t.height)?t.height:0}px`,"important"),s.style.setProperty("transform",i,"important"),!s.style.transform)throw new Error("[SnapDOM] Couldn't read the transform of an element.");r.appendChild(s);try{return md(s)}finally{s.remove()}}}function $a(t){let e=D(t),n=e.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let i=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",r=e.scale&&e.scale!=="none"&&e.scale!=="1",s=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(i||r||s)}function md(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}var Ir=new WeakSet;function so(t,e){if(!e)return null;let n=t.ownerDocument||document,o=n.defaultView||window,i,r,s,a;if(e==="viewport")i=0,r=0,s=n.documentElement?.clientWidth||o.innerWidth,a=n.documentElement?.clientHeight||o.innerHeight;else if(typeof e=="object")i=(Number(e.x)||0)-(o.scrollX||0),r=(Number(e.y)||0)-(o.scrollY||0),s=Number(e.width),a=Number(e.height);else return null;return s>0&&a>0?{left:i,top:r,width:s,height:a,right:i+s,bottom:r+a}:null}function Mn(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return Gt(e)?e.host:null}function gd(t,e){for(let n=e;n;n=Mn(n))if(n===t)return!0;return!1}function yd(t,e){for(let n=Mn(t);n&&n!==e&&n?.nodeType===1;n=Mn(n)){let o=D(n);if(o.position!=="static"||Nr(o))return n}return null}function Nr(t){return t.transform&&t.transform!=="none"||t.filter&&t.filter!=="none"||t.backdropFilter&&t.backdropFilter!=="none"||t.perspective&&t.perspective!=="none"||/transform|perspective|filter/.test(t.willChange||"")||/layout|paint|strict|content/.test(t.contain||"")}var bd=/(?:^|;)position:(absolute|fixed)(?:;|$)/;function Ia(t,e,n,o,i,r){if(t.scrollTop||t.scrollLeft)return;let s=o.get(t)||D(t);if(Nr(s))return;let a=s.position!=="static",l=new Map;for(let[u,c]of e){let f=n.get(u);if(!f)continue;let d=l.get(f);if(d===void 0&&l.set(f,d=bd.exec(f)?.[1]||""),!d||d==="absolute"&&a||Ir.has(u))continue;let h=!1;for(let y=Mn(c);y&&y!==t&&y.nodeType===1;y=Mn(y)){let b=o.get(y)||D(y);if(d==="absolute"&&b.position!=="static"||Nr(b)){h=!0;break}}if(h)continue;let m=o.get(c)||D(c),p=parseFloat(m.left),g=parseFloat(m.top);i&&Number.isFinite(p)&&(u.style.left=`${p+i}px`),r&&Number.isFinite(g)&&(u.style.top=`${g+r}px`)}}function Wr(t,e){try{return le({baseTransform:t,rotate:e?.rotate,scale:e?.scale})}catch{return null}}function Wa(t,e,n,o,i){let r=t.getBoundingClientRect();Et(e)&&D(t).position==="static"&&(e.style.position="relative");let s=[];for(let[a,l]of n){if(l?.nodeType!==1)continue;let u=a.localName==="svg"&&It(a)&&!It(l.parentNode);if(!Et(a)&&!u||l===t||!gd(t,l))continue;let c=o.get(l)||D(l),f=c.position;if(f!=="fixed"&&f!=="sticky"&&f!=="-webkit-sticky"||a.style.position==="absolute")continue;let d=l.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;Ir.add(a);let h=c.transform&&c.transform!=="none"?c.transform:"",m=ve(l),p=!!(h||m.rotate!=="0deg"||m.scale||m.translate),g=p?Wr(h,m):null,y=!g||!g.is2D||g.a===1&&g.b===0&&g.c===0&&g.d===1,b=d.width,w=d.height;y||(b=l.offsetWidth||d.width,w=l.offsetHeight||d.height);let S=l.getRootNode&&Gt(l.getRootNode()),k=r,C=t.clientLeft||0,x=t.clientTop||0;if(S){let E=yd(l,t);E&&(k=E.getBoundingClientRect(),C=E.clientLeft||0,x=E.clientTop||0)}let A=d.left-k.left-C,M=d.top-k.top-x;if(p)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",y)a.style.transform="none";else{a.style.transform=`matrix(${g.a},${g.b},${g.c},${g.d},0,0)`;let{ox:E,oy:T}=kn(c,b,w),N=Xe(b,w,{a:g.a,b:g.b,c:g.c,d:g.d,e:0,f:0},E,T);A-=N.minX,M-=N.minY}if(f!=="fixed"){let E=a.cloneNode(!1);E.setAttribute("data-snap-ph","1"),E.style.position="static",E.style.visibility="hidden",E.style.width=`${b}px`,E.style.height=`${w}px`,E.style.boxSizing="border-box",a.parentElement?.insertBefore(E,a)}let v=u?b:b+2,_=w;i&&(Math.abs(M-i.y)<.5&&(M-=1,_+=1),Math.abs(A-i.x)<.5&&(A-=1,v+=1)),a.style.position="absolute",a.style.left=`${A}px`,a.style.top=`${M}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${v}px`,a.style.height=`${_}px`,a.style.boxSizing="border-box",S||s.push(a)}for(let a of s)e.appendChild(a)}function Oa(t,e,n={}){if(!t||!e||!e.style)return;let o=getComputedStyle(t);try{e.style.boxShadow="none"}catch(s){W(n,"Couldn't remove the root box-shadow.",s)}try{e.style.textShadow="none"}catch(s){W(n,"Couldn't remove the root text-shadow.",s)}try{e.style.outline="none"}catch(s){W(n,"Couldn't remove the root outline.",s)}let r=(o.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=r.length?r:"none"}catch(s){W(n,"Couldn't remove the root drop-shadow filter.",s)}}function Da(t,e){if(!t||!e||!e.style)return;let n=1;try{n=parseFloat(getComputedStyle(t).zoom)}catch{return}if(!(!e.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{e.style.setProperty("zoom","1","important")}catch{}}function Pa(t){let e=t.display||"";if(e.includes("flex")||e.includes("grid")||e.startsWith("table")||e==="inline-block"||e==="flow-root"||t.position==="absolute"||t.position==="fixed"||t.float&&t.float!=="none")return!0;let n=t.overflowX||t.overflow||"visible",o=t.overflowY||t.overflow||"visible";return!!(n!=="visible"||o!=="visible"||t.contain&&/\b(layout|content|paint|strict)\b/.test(t.contain))}function wd(t,e){let n=Array.from(t.childNodes),o=e==="top"?n:n.reverse();for(let i of o){if(i.nodeType===Node.TEXT_NODE){if(/\S/.test(i.textContent||""))return null;continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let r=getComputedStyle(i),s=String(r.display||"");if(!(s==="none"||s==="contents")&&!(r.position==="absolute"||r.position==="fixed"))return r.float&&r.float!=="none"||s.startsWith("inline")?null:i}return null}function Ba(t,e,n){if(!t||!e||!e.style)return;let o=getComputedStyle(t);if(!Pa(o))for(let i of["top","bottom"]){let r=i==="top"?"Top":"Bottom";if((parseFloat(o[`border${r}Width`])||0)>0||(parseFloat(o[`padding${r}`])||0)>0)continue;let s=t,a=e;for(;s&&a;){let l=wd(s,i);if(!l)break;let u=n?Array.from(a.children).find(d=>n.get(d)===l)||null:a.children[Array.from(s.children).indexOf(l)]||null,c=getComputedStyle(l),f=parseFloat(c[`margin${r}`])||0;if(u&&u.style&&f>0&&(u.style[`margin${r}`]="0px"),Pa(c)||(parseFloat(c[`border${r}Width`])||0)>0||(parseFloat(c[`padding${r}`])||0)>0)break;s=l,a=u}}}var xd=new Set(["xml","xlink"]);function Sd(t,e){if(t.startsWith("*")||t==="xmlns"||t.includes("@"))return!0;if(t.includes(":")){let n=t.split(":",1)[0];if(!xd.has(n))return!0}return e?t.startsWith("x-")||t.startsWith("v-")||t.startsWith(":")||t.startsWith("on:")||t.startsWith("bind:")||t.startsWith("let:")||t.startsWith("class:"):!1}var vd=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/g,Na=t=>t.replace(vd,e=>e.length===2?e:""),Cd=/^data:[^,]{0,120};base64,/;function ao(t,e={}){if(!t)return;let{stripFrameworkDirectives:n=!0}=e,o=a=>{for(let l of Array.from(a.attributes)){if(Sd(l.name,n)){a.removeAttribute(l.name);continue}if(Cd.test(l.value))continue;let u=Na(l.value);if(u!==l.value)try{a.setAttribute(l.name,u)}catch{}}};t.nodeType===Node.ELEMENT_NODE&&o(t);let i=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),s;for(;s=r.nextNode();)if(s.nodeType===Node.ELEMENT_NODE)o(s);else if(s.nodeType===Node.COMMENT_NODE)i.push(s);else{let a=Na(s.data);a!==s.data&&(s.data=a)}for(let a of i)a.remove()}function kd(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}var Md=new Set(["img","canvas","video","iframe","object","embed"]);function Ad(t){return It(t)||Md.has(t?.localName)}function _d(t,e){if(t?.nodeType!==1||kd(t)||Ad(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let o=e.display||"";return!(o.includes("flex")||o.includes("grid")||o.startsWith("table")||e.transform&&e.transform!=="none")}function Ua(t,e,n=new Map,o=null){function i(r,s){if(r?.nodeType!==1||s?.nodeType!==1)return;let a=r.childElementCount>s.childElementCount,l=n.get(r)||getComputedStyle(r);if(n.has(r)||n.set(r,l),a&&_d(r,l)){s.style.height||(s.style.height="auto"),s.style.width||(s.style.width="auto"),s.style.removeProperty("block-size"),s.style.removeProperty("inline-size"),s.style.minHeight||(s.style.minHeight="0"),s.style.minWidth||(s.style.minWidth="0"),s.style.maxHeight||(s.style.maxHeight="none"),s.style.maxWidth||(s.style.maxWidth="none");let c=l.overflowY||l.overflowBlock||"visible",f=l.overflowX||l.overflowInline||"visible";(c!=="visible"||f!=="visible")&&(s.style.overflow="visible")}let u=Array.from(s.children);if(o)for(let c of u){let f=o.get(c);f&&f.nodeType===1&&i(f,c)}else{let c=Array.from(r.children);for(let f=0;f<Math.min(c.length,u.length);f++)i(c[f],u[f])}}i(t,e)}function Ed(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function Rd(t,e){if(t?.nodeType!==1)return!1;if(t.getAttribute("data-capture")==="exclude")return e?.excludeMode==="remove";if(Array.isArray(e?.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(o){W(e,"Invalid exclude selector; ignored.",o)}if(Array.isArray(e?.excludePredicates))for(let n of e.excludePredicates)try{if(n(t))return e.excludeMode==="remove"}catch(o){W(e,"Your exclude function threw; ignored.",o)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){W(e,"Your filter function threw; ignored.",n)}return!1}function Or(t,e){let n=getComputedStyle(t),o=t.getBoundingClientRect(),i=1/0,r=-1/0,s=!1,a=Array.from(t.children);for(let h of a){if(Rd(h,e)||!Ed(h))continue;let m=h.getBoundingClientRect(),p=m.top-o.top,g=m.bottom-o.top;g<=p||(p<i&&(i=p),g>r&&(r=g),s=!0)}let l=s?Math.max(0,r-i):0,u=parseFloat(n.borderTopWidth)||0,c=parseFloat(n.borderBottomWidth)||0,f=parseFloat(n.paddingTop)||0,d=parseFloat(n.paddingBottom)||0;return u+c+f+d+l}var U=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t;function Dr(t){let e=document.implementation.createHTMLDocument(""),n=e.importNode(t,!0);for(let o of[n,...n.querySelectorAll("*")]){let i=o.localName.includes("-");if(!Et(o)||!(i||o.hasAttribute("is")))continue;let r=e.createElement(i?"span":o.localName);for(let s of o.attributes)s.name!=="is"&&r.setAttribute(s.name,s.value);r.append(...o.childNodes),o===n?n=r:o.replaceWith(r)}return n}function Br(t,e){try{let n=new t.ownerDocument.defaultView.CSSStyleSheet;n.replaceSync(e),t.adoptedStyleSheets=[n]}catch{let n=t.ownerDocument.createElement("style");n.textContent=e,t.appendChild(n)}}var Ye=.75;function za(t,e,n,o,i,r){let s=t.ownerDocument||document,a=t.getBoundingClientRect(),l=i>0&&a.width>0?a.width/i:1,u=r>0&&a.height>0?a.height/r:1;if(Math.abs(l-u)>.02)return 0;let c=s.createElement("div");tt(c),c.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let f=c.attachShadow({mode:"open"});Br(f,n);let d=Dr(e);f.appendChild(d),s.body.appendChild(c);let h=0,m=["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],p=["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],g=(y,b,w)=>{let S=D(y),k=S.boxSizing==="border-box",C=(x,A,M)=>{let v=parseFloat(x);if(!Number.isFinite(v))return A;let _=0;if(!k)for(let T of M)_+=parseFloat(S[T])||0;let E=v+_;return Math.abs(E-A)<=.51?E:A};return{width:C(S.width,b,m),height:C(S.height,w,p)}};try{let y=d.getBoundingClientRect(),b=d.offsetWidth||i,w=d.offsetHeight||r,S=b>0&&y.width>0?y.width/b:1,k=w>0&&y.height>0?y.height/w:1,C=(x,A,M=!1)=>{let v=x.children,_=A.children,E=Math.min(v.length,_.length);for(let T=0;T<E;T++){let N=v[T],$=_[T],O=o.get(N),R=M||Ir.has(N);if(O?.nodeType===1&&Et(N)&&N.style&&O.isConnected){let L=O.getBoundingClientRect();if(L.width>0&&L.height>0){let I=$.getBoundingClientRect(),F=L.width/l,P=L.height/u,z=I.width,B=I.height,q=O.offsetWidth||F,j=O.offsetHeight||P,ft=$.offsetWidth||z,ut=$.offsetHeight||B,dt=Math.abs(F-q)>Ye||Math.abs(P-j)>Ye||Math.abs(z-ft)>Ye||Math.abs(B-ut)>Ye;if(R){let it=g($,ft,ut);F=z>0?F*S*it.width/z:F,P=B>0?P*k*it.height/B:P,z=it.width,B=it.height}else if(dt){let it=g(O,q,j),Vt=g($,ft,ut);F=it.width,P=it.height,z=Vt.width,B=Vt.height}let vt=z-F,ue=B-P;(Math.abs(vt)>Ye||Math.abs(ue)>Ye)&&(N.style.boxSizing="border-box",N.style.width=`${U(F)}px`,N.style.height=`${U(P)}px`,h++)}}C(N,$,R)}};C(e,d)}finally{c.remove()}return h}var Fd=/::-(?:webkit-(?:scrollbar|meter|progress|slider)|moz-(?:meter|progress))/i;function Lr(t,e=new Set){let n="";if(!t)return n;for(let o=0;o<t.length;o++){let i=t[o];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){n+=Lr(i.styleSheet.cssRules,e);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let r=Lr(i.cssRules,e);r&&(n+=`@media ${i.conditionText}{${r}}`);continue}if(i.type===CSSRule.STYLE_RULE){let r=i.selectorText||"";if(Fd.test(r)){let s=i.cssText;s&&!e.has(s)&&(e.add(s),n+=s)}}}catch{}}return n}var La=new WeakMap;function Td(t){let e="";for(let n of t.styleSheets){let o=-1;try{o=n.cssRules?n.cssRules.length:-1}catch{}e+=(n.href||"inline")+":"+o+"|"}return e}function $d(t){if(!t||!t.styleSheets)return"";let e=Td(t),n=La.get(t);if(n&&n.fp===e)return n.css;let o=new Set,i="";for(let r of Array.from(t.styleSheets))try{let s=r.cssRules;s&&(i+=Lr(s,o))}catch{}return La.set(t,{fp:e,css:i}),i}function Ha(t,e){let n=Zo(t.clone).sort(),o=n.join(","),i=bn(t.element),r=H.baseStyle.get(o),s;r&&r.universe===i?s=r.css:(s=tr(n,i),H.baseStyle.set(o,{universe:i,css:s}));let a=$d(t.element?.ownerDocument||document);return t.fontsCSS=e,t.baseCSS=s,t.scrollbarCSS=a,{baseCSS:s,scrollbarCSS:a,fontsCSS:e}}var Pd=[["max-width","x"],["min-width","x"],["max-height","y"],["min-height","y"]];function ja(t,e,n){let o=null;for(let[i,r]of Pd){let s=n.getPropertyValue(i);if(!s.includes("%"))continue;if(n.writingMode!=="horizontal-tb")return;o||=Nd(t,n);let a=r==="x"?o.w:o.h,l=s.replace(/(-?\d*\.?\d+(?:e[+-]?\d+)?)%/gi,(c,f)=>`${a*f/100}px`),u=parseFloat(r==="x"?n.width:n.height);e.style.setProperty(i,Number.isFinite(u)?`${i.slice(0,3)}(${l}, ${u}px)`:l)}}function Nd(t,e){let n=t.ownerDocument,o=n.documentElement,i={w:o.clientWidth,h:o.clientHeight};if(e.position==="fixed")return i;if(e.position==="absolute"){let l=t.offsetParent;return!l||(l===n.body||l===o)&&getComputedStyle(l).position==="static"?i:{w:l.clientWidth,h:l.clientHeight}}let r=t.parentElement;if(!r)return i;let s=getComputedStyle(r),a=l=>parseFloat(s.getPropertyValue(l))||0;return{w:r.clientWidth-a("padding-left")-a("padding-right"),h:r.clientHeight-a("padding-top")-a("padding-bottom")}}gt();var lo=new Set,Ld=/^(?:IMG|VIDEO|CANVAS|IFRAME|EMBED|OBJECT|SVG|svg|INPUT|SELECT|TEXTAREA|BUTTON)$/,Id="[data-sd-ph]::placeholder{color:var(--sd-ph)!important;opacity:var(--sd-ph-o)!important;-webkit-text-fill-color:var(--sd-ph)!important}";async function Va(t,e={}){Dt(),Un(t.ownerDocument||document);let n=e.__session||{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},o={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:e,slicer:e.__slicer||null},i=null,r=null;if(e.clip&&(r=so(t,e.clip),r&&(o.clip={rect:r,root:t})),e.captureSelection)try{o.selection=Hs(t)}catch(p){W(o,"Couldn't read the text selection.",p)}let s,a="",l="";if(lo.size){let p=(g,y)=>{for(let b=y;b;b=b.assignedSlot||b.parentElement||Wt(b))if(b===g)return!0;return!1};for(;;){let g=[...lo].filter(({root:y})=>p(y,t)||p(t,y)).map(({promise:y})=>y.catch(()=>{}));if(!g.length)break;await Promise.all(g)}}if(!o.clip&&t.isConnected&&t.ownerDocument?.visibilityState!=="hidden")try{let p=t.getBoundingClientRect(),g=t.ownerDocument?.defaultView||window,y=p.right<=0||p.bottom<=0||p.left>=g.innerWidth||p.top>=g.innerHeight,b=[];if(y&&(()=>{let S=[];t.shadowRoot&&S.push(t.shadowRoot);for(let k of t.querySelectorAll("*"))k.shadowRoot&&S.push(k.shadowRoot);for(;S.length;){let k=S.pop(),C=k.host?.localName==="calcite-icon";for(let x of k.querySelectorAll("*")){if(x.shadowRoot&&S.push(x.shadowRoot),!C||x.localName!=="svg")continue;let A=x.querySelectorAll("path");if(!A.length||[...A].some(v=>v.getAttribute("d")?.trim()))continue;let M=x.getBoundingClientRect();M.width&&M.height&&b.push(x)}}})(),b.length){let S=(async()=>{let C=t.style,x=t.hasAttribute("style"),A=new Map,M=(v,_)=>{A.has(v)||A.set(v,{value:C.getPropertyValue(v),priority:C.getPropertyPriority(v)}),C.setProperty(v,_,"important");let E=A.get(v);E.forcedValue=C.getPropertyValue(v),E.forcedPriority=C.getPropertyPriority(v)};try{M("left","0"),M("top","0"),M("right","auto"),M("bottom","auto"),M("margin-top","0"),M("margin-right","0"),M("margin-bottom","0"),M("margin-left","0"),M("transform","none"),M("translate","none"),M("opacity","0"),M("pointer-events","none");let v=t.getBoundingClientRect();if(v.right<=0||v.bottom<=0||v.left>=g.innerWidth||v.top>=g.innerHeight){let T=t.parentElement?.getBoundingClientRect(),N=T&&T.right>0&&T.left<g.innerWidth?Math.max(0,T.left):0,$=T&&T.bottom>0&&T.top<g.innerHeight?Math.max(0,T.top):0;M("position","fixed"),M("left",`${N}px`),M("top",`${$}px`)}await wt(100);let _=Date.now()+1500,E=()=>b.some(T=>{if([...T.querySelectorAll("path")].some($=>$.getAttribute("d")?.trim()))return!1;let N=T.getBoundingClientRect();return N.width&&N.height&&N.right>0&&N.bottom>0&&N.left<g.innerWidth&&N.top<g.innerHeight});for(;Date.now()<_&&E();)await new Promise(T=>setTimeout(T,25));await wt(100)}finally{for(let[v,_]of A)C.getPropertyValue(v)!==_.forcedValue||C.getPropertyPriority(v)!==_.forcedPriority||(_.value?C.setProperty(v,_.value,_.priority):C.removeProperty(v));!x&&!C.length&&t.removeAttribute("style"),await wt(100)}})(),k={root:t,promise:S};lo.add(k);try{await S}finally{lo.delete(k)}}}catch{}let u=Ea(t),c=io(t,r);if(r){let p=t.getBoundingClientRect(),g=t.offsetWidth||p.width,y=t.offsetHeight||p.height,b=p.width&&Math.abs(g-p.width)>=1?g/p.width:1,w=p.height&&Math.abs(y-p.height)>=1?y/p.height:1;i={x:(r.left-p.left)*b,y:(r.top-p.top)*w,width:r.width*b,height:r.height*w}}try{s=await ae(t,o,e)}catch(p){throw W(o,"Capture failed while copying the element.",p),p}finally{c(),u()}Us(o.nodeMap,t.ownerDocument||document),o.slicer?.due()&&await o.slicer.pause();try{_a(s,void 0,t)}catch(p){nt(n,"svg-defs-failed","external <use> references failed to inline",p),W(o,"Couldn't copy external SVG icons; some may be missing.",p)}try{await qe(t,s,o,e)}catch(p){nt(n,"pseudo-failed","::before/::after pass failed",p),W(o,"Couldn't copy ::before/::after content; some decorations may be missing.",p)}o.bgClipText&&Aa(o.bgClipText),await Vn(s,o);for(let[p,g]of o.nodeMap.entries())if(g?.tagName==="STYLE"&&p?.tagName==="STYLE"&&!p.hasAttribute("data-sd"))try{let y=g.sheet&&g.sheet.cssRules;y&&/@media/i.test(p.textContent||"")&&(p.textContent=Se(y))}catch{}try{let p=s.querySelectorAll("style[data-sd]");for(let g of p)l+=g.textContent||"",g.remove()}catch(p){W(o,"Couldn't copy shadow DOM styles.",p)}o.slicer?.due()&&await o.slicer.pause();let f=un(o.styleMap);a=Array.from(f.entries()).map(([p,g])=>`.${g}{${p}}`).join("");let h=l+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+(o.__usesPlaceholder?Id:"")+(o.__pseudoCSS||"");a=h+a;for(let[p,g]of o.styleMap.entries())Ur(p,g,f);try{Wd(t,s,o.nodeMap)}catch(p){W(o,"Couldn't bring an open dialog or popover into the capture.",p)}if((o.clip||t.scrollTop||t.scrollLeft)&&s?.nodeType===1)try{let p=o.clip&&i?{x:i.x,y:i.y}:{x:0,y:0};Wa(t,s,o.nodeMap,o.styleCache,p)}catch(p){W(o,"Couldn't keep fixed-position elements in place.",p)}for(let[p,g]of o.nodeMap.entries())o.clip&&g===t&&t===t.ownerDocument.scrollingElement||zr(p,g,o.nodeMap,o.styleCache);let m=t.ownerDocument;if((t===m.body||t===m.documentElement)&&m.documentElement.localName==="html"){let p=o.styleCache.get(m.documentElement)||D(m.documentElement);t===m.documentElement&&(s.style.overflow="visible");let g=t===m.body?s:s.querySelector("body");if(g&&p.overflowX==="visible"&&p.overflowY==="visible"&&p.contain==="none"&&!p.containerType?.includes("size")&&p.contentVisibility!=="auto"&&p.contentVisibility!=="hidden"){let y=o.styleCache.get(m.body)||D(m.body);y.contain==="none"&&!y.containerType?.includes("size")&&y.contentVisibility!=="auto"&&y.contentVisibility!=="hidden"&&y.display!=="none"&&(g.style.overflow="visible")}}if(t===o.nodeMap.get(s)){let p=o.styleCache.get(t)||D(t);o.styleCache.set(t,p);let g=zo(p.transform);if(s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=g||"",s.style.translate="none",(/^inline-/.test(p.display)||p.display==="inline"&&Ld.test(t.tagName))&&(s.style.verticalAlign="top"),ja(t,s,p),!s.hasAttribute("lang")){let y=t.closest?.("[lang]")?.getAttribute("lang")??t.ownerDocument?.documentElement?.getAttribute("lang");y&&s.setAttribute("lang",y)}}for(let[p,g]of o.nodeMap.entries())g.tagName==="PRE"&&(p.style.marginTop="0",p.style.marginBlockStart="0");return{clone:s,classCSS:a,classPrefixCSS:h,styleCache:o.styleCache,nodeMap:o.nodeMap,reconcileRisk:o.reconcileRisk||0,clipWindow:i}}function Wd(t,e,n){let o=[];for(let s of[":modal",":popover-open"])try{o.push(...t.querySelectorAll(s))}catch{}if(!o.length)return;let i=new Map;for(let[s,a]of n.entries())i.set(a,s);let r=214748e4;for(let s of o){let a=i.get(s);if(!(!a||a===e||a.parentNode==null)){try{let l=getComputedStyle(s,"::backdrop"),u=l.backgroundColor,c=l.backgroundImage;if(u&&u!=="rgba(0, 0, 0, 0)"&&u!=="transparent"||c&&c!=="none"){let d=document.createElement("div");d.setAttribute("data-sd-backdrop",""),d.style.cssText=`position:fixed;inset:0;z-index:${r};background-color:${u};`+(c&&c!=="none"&&c.includes("data:")?`background-image:${c};`:""),e.appendChild(d)}}catch{}r+=1,a.style.zIndex=String(r),e.appendChild(a),r+=1}}}function Ur(t,e,n){if(t.tagName==="STYLE")return;if(t.getRootNode&&Gt(t.getRootNode())){t.setAttribute("style",e.replace(/;/g,"; "));return}let o=n.get(e);o&&t.classList.add(o);let i=t.style?.backgroundImage;i&&i!=="none"&&(t.style.backgroundImage=i)}function zr(t,e,n,o){let i=e.scrollLeft,r=e.scrollTop;if(!(i||r)||t?.nodeType!==1||t.namespaceURI!=="http://www.w3.org/1999/xhtml")return;t.style.overflow="hidden",t.style.scrollbarWidth="none",t.style.msOverflowStyle="none";try{let l=t.querySelectorAll("*");for(let u of l){if(u.nodeType!==1||u.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let c=n?.get(u),f=c&&(o?.get(c)||D(c)),d=u.style.position||f?.position;if(d!=="fixed"&&d!=="absolute")continue;let h=f&&f.position!=="absolute"&&d==="absolute",m=null;if(c&&!h)for(let y=c.parentElement||Wt(c);y;y=y.parentElement||Wt(y)){let b=o?.get(y)||D(y);if(d==="absolute"&&b.position!=="static"||b.transform&&b.transform!=="none"||b.translate&&b.translate!=="none"||b.rotate&&b.rotate!=="none"||b.scale&&b.scale!=="none"||b.filter&&b.filter!=="none"||b.backdropFilter&&b.backdropFilter!=="none"||b.perspective&&b.perspective!=="none"||/transform|perspective|filter/.test(b.willChange||"")||/layout|paint|strict|content/.test(b.contain||"")){m=y;break}if(y===e)break}if(m){m===e&&(u.style.top=f.top,u.style.left=f.left,u.style.right=f.right,u.style.bottom=f.bottom);continue}let p=parseFloat(u.style.top||f?.top)||0,g=parseFloat(u.style.left||f?.left)||0;u.style.top=`${p+r}px`,u.style.left=`${g+i}px`,d==="fixed"&&(u.style.position="absolute")}}catch{}let a=document.createElement("div");for(a.style.all="unset",a.style.direction="inherit",a.style.transform=`translate(${-i}px, ${-r}px)`,a.style.willChange="transform",a.style.display="inline-block",a.style.width="100%";t.firstChild;)a.appendChild(t.firstChild);t.appendChild(a)}me();xt();kt();var Ga="http://www.w3.org/1999/xlink";function Od(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(Ga,"href"):null)}function Dd(t){let e=parseFloat(t.dataset?.snapdomWidth||"")||0,n=parseFloat(t.dataset?.snapdomHeight||"")||0,o=parseInt(t.getAttribute("width")||"",10)||0,i=parseInt(t.getAttribute("height")||"",10)||0,r=parseFloat(t.style?.width||"")||0,s=parseFloat(t.style?.height||"")||0,a=e||r||o||t.width||t.naturalWidth||100,l=n||s||i||t.height||t.naturalHeight||100;return{width:a,height:l}}async function co(t,e={}){let n=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&n.unshift(t);let o=async a=>{if(!a.getAttribute("src")){let m=a.currentSrc||a.src||ze(a.getAttribute("srcset"),a)||"";m&&a.setAttribute("src",m)}if(a.removeAttribute("srcset"),a.removeAttribute("sizes"),(a.getAttribute("src")||"").startsWith("data:")){a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let l=a.src||"";if(!l)return;let u=H.image?.get(l);if(u){a.src=u,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let c=await lt(l,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});if(c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")){H.image?.set(l,c.data),a.src=c.data,c.blob&&(a.__snapdomBlob=c.blob),a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:f,height:d}=Dd(a),{fallbackURL:h}=e||{};if(h)try{let m=typeof h=="function"?await h({width:f,height:d,src:l,element:a}):h;if(m){let p=await lt(m,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});if(p?.ok&&typeof p.data=="string"){a.src=p.data,a.width||(a.width=f),a.height||(a.height=d);return}}}catch{}if(e.placeholders!==!1){nt(e.__session,"image-fallback",`image failed to inline, using placeholder: ${l}`);let m=document.createElement("div");m.style.cssText=[`width:${f}px`,`height:${d}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${d}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),m.textContent="img",a.replaceWith(m)}else{let m=document.createElement("div");m.style.cssText=`display:inline-block;width:${f}px;height:${d}px;visibility:hidden;`,a.replaceWith(m)}},i=6;for(let a=0;a<n.length;a+=i){let l=n.slice(a,a+i).map(o);await Promise.allSettled(l)}let r=Array.from(t.querySelectorAll("image"));t.localName==="image"&&r.unshift(t);let s=async a=>{let l=Od(a);if(!l||l.startsWith("data:")||l.startsWith("blob:"))return;let u=await lt(l,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});u.ok&&typeof u.data=="string"&&u.data.startsWith("data:")&&(a.setAttribute("href",u.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(Ga,"href"))};for(let a=0;a<r.length;a+=i){let l=r.slice(a,a+i).map(s);await Promise.allSettled(l)}}gt();At();var Bd=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],Ud=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],zd=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],Hd=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function jd(t,e,n,o){let i=n.get(t)||D(t);n.has(t)||n.set(t,i);let r=ls(t),s=r?m=>m in r?r[m]:"":m=>i.getPropertyValue(m),a=s("border-image"),l=s("border-image-source"),u=a&&a!=="none"||l&&l!=="none",c=i.getPropertyValue("background-image"),f=s("background-color"),d=c&&c!=="none"||f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"||/url\s*\(|gradient\s*\(/i.test(i.getPropertyValue("background")||""),h=Mt()&&(s("background-clip")||s("-webkit-background-clip")||"").includes("text");if(d&&!h)for(let m of zd){let p=s(m);p&&e.style.setProperty(m,p)}for(let m of Bd){if(h&&m==="background-image")continue;let p=i.getPropertyValue(m);if(m==="background-image"&&(!p||p==="none")){let b=i.getPropertyValue("background");b&&/url\s*\(/.test(b)&&(p=ne(b).filter(w=>/url\s*\(/.test(w)).join(", ")||p)}if(!p||p==="none")continue;let g=ne(p),y=await Promise.all(g.map(b=>Te(b,o)));y.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&e.style.setProperty(m,y.join(", "))}for(let m of Ud){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(u)for(let m of Hd){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(d&&/fixed/.test(s("background-attachment")||""))try{await Gd(t,e,i)}catch{}}function Vd(t,e,n,o,i){let r=(t||"auto").trim();if(r==="cover"||r==="contain"){if(!e||!n)return{w:o,h:i};let d=r==="cover"?Math.max(o/e,i/n):Math.min(o/e,i/n);return{w:e*d,h:n*d}}let s=r.split(/\s+/),a=(d,h)=>{if(d==="auto"||d===void 0)return null;if(d.endsWith("px"))return parseFloat(d);if(d.endsWith("%"))return h*parseFloat(d)/100},l=a(s[0],o),u=a(s[1],i);if(l===void 0||u===void 0)return null;let c=l,f=u;return c==null&&f==null?(c=e||o,f=n||i):c==null?c=e&&n?f*(e/n):o:f==null&&(f=e&&n?c*(n/e):i),!c||!f?null:{w:c,h:f}}async function Gd(t,e,n){let o=(n.getPropertyValue("background-attachment")||"").split(",").map(m=>m.trim()),i=dn();if(!i)for(let m=t.parentElement;m&&!i;m=m.parentElement){let p=D(m);(p.transform&&p.transform!=="none"||p.filter&&p.filter!=="none")&&(i=!0)}if(i){e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "));return}let r=t.getBoundingClientRect(),s=t.ownerDocument?.defaultView||window,a=s.innerWidth,l=s.innerHeight,u=ne(e.style.backgroundImage||n.getPropertyValue("background-image")||""),c=(e.style.backgroundSize||n.getPropertyValue("background-size")||"auto").split(",").map(m=>m.trim()),f=(e.style.backgroundPosition||n.getPropertyValue("background-position")||"0% 0%").split(",").map(m=>m.trim()),d=[],h=[];for(let m=0;m<u.length;m++){let p=o[m%o.length]||"scroll",g=c[m%c.length],y=f[m%f.length];if(p!=="fixed"){d.push(g),h.push(y);continue}let b=0,w=0,S=u[m]&&u[m].match(/url\(["']?([^"')]+)["']?\)/);if(S)try{let v=new Image;v.src=S[1],await v.decode(),b=v.naturalWidth,w=v.naturalHeight}catch{d.push(g),h.push(y);continue}let k=Vd(g,b,w,a,l);if(!k){d.push(g),h.push(y);continue}let C=y.split(/\s+/),x=(v,_,E)=>{if(!v)return 0;if(v.endsWith("px"))return parseFloat(v);if(v.endsWith("%"))return(_-E)*parseFloat(v)/100},A=x(C[0]||"0%",a,k.w),M=x(C[1]||C[0]||"0%",l,k.h);if(A===void 0||M===void 0){d.push(g),h.push(y);continue}d.push(`${fo(k.w)}px ${fo(k.h)}px`),h.push(`${fo(A-r.left)}px ${fo(M-r.top)}px`)}e.style.setProperty("background-size",d.join(", ")),e.style.setProperty("background-position",h.join(", ")),e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "))}var fo=t=>Math.round(t*100)/100;async function uo(t,e,n,o={},i=new Map){if(!e)return;let r=[];t&&ur(t)&&r.push([t,e]);let s=[e];for(;s.length;){let l=s.pop();if(l.children)for(let u of l.children){if(u.tagName==="STYLE")continue;let c=i.get(u);c&&ur(c)&&r.push([c,u]),s.push(u)}}let a=6;for(let l=0;l<r.length;l+=a)await Promise.allSettled(r.slice(l,l+a).map(([u,c])=>jd(u,c,n,o)))}At();function Xa(t,e,n=new Map){let o=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let a=i.currentNode;a;a=i.nextNode()){let l=n.get(a);if(l?.nodeType!==1)continue;let u=D(l),c=u.getPropertyValue("backdrop-filter")||u.getPropertyValue("-webkit-backdrop-filter");c&&c!=="none"&&a!==e&&o.push({cloneEl:a,orig:l,bf:c,path:Kd(e,a)})}if(!o.length)return;let r=t.getBoundingClientRect(),s=o.map((a,l)=>{let u=e.cloneNode(!0);Yd(u,e,a.orig.getBoundingClientRect(),n),Jd(qa(u,a.path));for(let c=0;c<l;c++){let f=qa(u,o[c].path);f&&(f.style.setProperty("backdrop-filter","none","important"),f.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...a,copy:u}});for(let{cloneEl:a,orig:l,bf:u,copy:c}of s)qd.has(a.tagName)||Xd(a,l,u,c,r)}var qd=new Set(["IMG","INPUT","TEXTAREA","SELECT","CANVAS","VIDEO","AUDIO","IFRAME","EMBED","OBJECT","PROGRESS","METER","HR","BR"]);function Xd(t,e,n,o,i){let r=e.getBoundingClientRect();if(!r.width||!r.height)return;let s=D(e),a=e.offsetWidth?r.width/e.offsetWidth:1,l=Math.abs(a-1)>.001?1/a:1;o.style.position="absolute",o.style.left=`${(i.left-r.left)*l}px`,o.style.top=`${(i.top-r.top)*l}px`,o.style.width=`${i.width}px`,o.style.height=`${i.height}px`,o.style.margin="0",o.style.filter=n,l!==1&&(o.style.transform=`scale(${l})`,o.style.transformOrigin="top left");let u=document.createElement("div");u.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",u.appendChild(o);let c=document.createElement("div");c.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",c.style.backgroundColor=s.backgroundColor,c.style.backgroundImage=t.style.backgroundImage||s.backgroundImage;for(let f of["background-size","background-position","background-repeat","background-origin","background-clip"])c.style.setProperty(f,s.getPropertyValue(f));t.style.setProperty("background-color","transparent","important"),t.style.setProperty("background-image","none","important"),t.style.setProperty("backdrop-filter","none","important"),t.style.setProperty("-webkit-backdrop-filter","none","important"),s.position==="static"&&(t.style.position="relative"),t.style.isolation="isolate",t.prepend(c),t.prepend(u)}var po=128;function Yd(t,e,n,o){let i=[[t,e]];for(;i.length;){let[r,s]=i.pop(),a=o.get(s);if(a?.nodeType===1){let c=a.getBoundingClientRect();(c.left>n.right+po||c.right<n.left-po||c.top>n.bottom+po||c.bottom<n.top-po)&&(r.tagName==="IMG"&&r.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),r.style&&(r.style.backgroundImage="none"))}let l=r.children,u=s.children;for(let c=0;c<l.length;c++)i.push([l[c],u[c]])}}function Kd(t,e){let n=[];for(let o=e;o!==t;o=o.parentElement){if(!o?.parentElement)return null;n.push([...o.parentElement.children].indexOf(o))}return n.reverse()}function qa(t,e){if(!e)return null;let n=t;for(let o of e)if(n=n.children[o],!n)return null;return n}function Jd(t){if(t)for(let e=t;e&&e.parentNode;){let n=e.parentNode;for(;e.nextSibling;)e.nextSibling.remove();e===t&&e.remove(),e=n}}At();gt();kt();kt();function Hr(t){return _i(t),{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map,warnings:[]}}xt();gt();function ho(t,e){if(!t)return()=>{};let n=[],o=200;function i(r){if(e){let u=r.getBoundingClientRect();if(u.width>0||u.height>0){let c=Math.max(u.right,u.left+(r.scrollWidth||0)),f=Math.max(u.bottom,u.top+(r.scrollHeight||0));if(c<e.left-o||u.left>e.right+o||f<e.top-o||u.top>e.bottom+o)return}}let s=getComputedStyle(r),a=Qd(r,s);a&&n.push(a);let l=Zd(r,s);l&&n.push(l);for(let u of r.children||[])i(u)}return i(t),()=>n.forEach(r=>r())}function Qd(t,e){if(!t)return()=>{};e=e||getComputedStyle(t);let n=np(e);if(n<=0)return()=>{};if(!Za(t))return()=>{};let o=Qa(t),i=o.text,r=rp(e);o.write("X");let s=t.scrollHeight-r;o.restore();let a=s>0?s:op(e),l=Math.round(a*n+r),u=.5*(n+1);if(t.scrollHeight<=l+u)return()=>{};let c=0,f=i.length,d=-1;for(;c<=f;){let m=c+f>>1;o.write(i.slice(0,jr(i,m))+"\u2026"),t.scrollHeight<=l+u?(d=m,c=m+1):f=m-1}let h=(d>=0?i.slice(0,jr(i,d)):"")+"\u2026";return o.write(h),Ja(t,h,o)}function Zd(t,e){if(!t)return()=>{};if(e=e||getComputedStyle(t),e.textOverflow!=="ellipsis")return()=>{};if(e.whiteSpace!=="nowrap"&&e.whiteSpace!=="pre")return()=>{};if(e.overflowX!=="hidden"&&e.overflowX!=="clip")return()=>{};if(!Za(t))return()=>{};if(t.scrollWidth<=t.clientWidth+.5)return()=>{};let n=Qa(t),o=n.text,i=ep(t,e,n.nodes),r=c=>{if(!i){let d=jr(o,c);return o.slice(0,d)+Ka(o,d)+"\u2026"}let f=tp(o,o.length-c);return Ka(o,f)+o.slice(f)+"\u2026"},s=0,a=o.length,l=-1;for(;s<=a;){let c=s+a>>1;n.write(r(c)),t.scrollWidth<=t.clientWidth+.5?(l=c,s=c+1):a=c-1}let u=l>=0?r(l):"\u2026";return n.write(u),Ja(t,u,n)}function Ja(t,e,n){return()=>{t.textContent===e&&n.restore()}}function Qa(t){let e=[];for(let o=t.firstChild;o;o=o.nextSibling)o.nodeType===Node.TEXT_NODE&&e.push(o);let n=e.map(o=>o.data);return{nodes:e,text:n.join(""),write(o){e[0].data=o;for(let i=1;i<e.length;i++)e[i].data=""},restore(){for(let o=0;o<e.length;o++)e[o].data=n[o]}}}function jr(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e-1);return n>=55296&&n<=56319?e-1:e}function tp(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e);return n>=56320&&n<=57343?e-1:e}var Ya=/[\u0600-\u08FF\u1800-\u18AF\uFB50-\uFDFF\uFE70-\uFEFF]/;function Ka(t,e){return e>0&&e<t.length&&Ya.test(t[e-1])&&Ya.test(t[e])&&!Y()?"\u200D":""}function ep(t,e,n){let o=null,i=null;for(let g of n){let y=g.data.search(/\S/);y<0||(o||(o=[g,y]),i=[g,g.data.length-g.data.trimEnd().length])}if(!o)return!1;let r=t.ownerDocument.createRange(),s=(g,y,b)=>(r.setStart(g,y),r.setEnd(g,b),r.getBoundingClientRect()),[a,l]=o,[u,c]=i,f=u.data.length-c,d=s(a,l,Math.min(a.data.length,l+1)),h=s(u,Math.max(0,f-1),f),m=t.getBoundingClientRect();if(e.direction==="rtl"){let g=m.right-(parseFloat(e.borderRightWidth)||0)-(parseFloat(e.paddingRight)||0);return Math.abs(h.right-g)<Math.abs(d.right-g)}let p=m.left+(parseFloat(e.borderLeftWidth)||0)+(parseFloat(e.paddingLeft)||0);return Math.abs(h.left-p)<Math.abs(d.left-p)}function np(t){let e=t.getPropertyValue("-webkit-line-clamp")||t.getPropertyValue("line-clamp");e=(e||"").trim();let n=parseInt(e,1

`?"":o})}function bu(t){if(!t)return"";let e=[],n=/"((?:\\[\s\S]|[^"\\])*)"|'((?:\\[\s\S]|[^'\\])*)'/g,o=0,i;for(;i=n.exec(t);){let s=t.slice(o,i.index).trim();s&&e.push(s),e.push(yu(i[1]!==void 0?i[1]:i[2])),o=n.lastIndex}let r=t.slice(o).trim();return r&&e.push(r),e.join("")}function dr(t,e,n){let o=t.parentElement,i=o&&n?n.get(o):null;return i?{get(r,s){let a=e.get(r,s),c=i.get(s);return typeof c=="number"?Math.max(a,c):a},getStack(r,s){let a=e.getStack(r,s);if(!a.length)return a;let c=i.get(s);if(typeof c=="number"){let f=a.slice();return f[f.length-1]=Math.max(f[f.length-1],c),f}return a}}:e}function pr(t,e,n){let o=new Map,i=(f,l)=>pn(f,l).map(([u,d])=>({name:u,num:d})),r=i(e?.counterReset,0),s=i(e?.counterSet,0),a=i(e?.counterIncrement,1);function c(f){if(o.has(f))return o.get(f).slice();let l=n.getStack(t,f);l=l.length?l.slice():[];let u=r.find(m=>m.name===f);if(u){let m=Number.isFinite(u.num)?u.num:0;l=l.length?[...l,m]:[m]}let d=s.find(m=>m.name===f);if(d){let m=Number.isFinite(d.num)?d.num:0;l.length===0&&(l=[0]),l[l.length-1]=m}let h=a.find(m=>m.name===f);if(h){let m=Number.isFinite(h.num)?h.num:1;l.length===0&&(l=[0]),l[l.length-1]+=m}return o.set(f,l.slice()),l}return{get(f,l){let u=c(l);return u.length?u[u.length-1]:0},getStack(f,l){return c(l)},__incs:a}}var wu=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","letter-spacing","line-height"],xu=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","font-variant","letter-spacing","word-spacing","text-transform","text-decoration-line","text-decoration-color","text-decoration-style","line-height","background-color","vertical-align"];function na(t,e,n,o,i,r){try{if(o===null){if(t.getRootNode()!==(t.ownerDocument||document))return;let u=I(t).display||"";if(i==="::marker"?!u.includes("list-item"):!(u==="block"||u==="flow-root"||u==="list-item"||u==="inline-block"||u==="table-cell"||u==="table-caption"))return}else if(!t.matches(o))return;if(i==="::marker"&&!(I(t).display||"").includes("list-item"))return;let s=I(t,i),a=I(t);if(!s)return;let c="";for(let u of r){let d=s.getPropertyValue(u);d&&d!==a.getPropertyValue(u)&&!(u==="background-color"&&d==="rgba(0, 0, 0, 0)")&&!(u==="vertical-align"&&d==="baseline")&&(c+=`${u}:${d};`)}if(i==="::marker"){let u=s.getPropertyValue("content");u&&u!=="normal"&&u!=="none"&&(c+=`content:${u};`)}if(!c)return;let l=`data-sd-p${n.__pseudoRuleSeq=(n.__pseudoRuleSeq||0)+1}`;e.setAttribute(l,""),n.__pseudoCSS=(n.__pseudoCSS||"")+`[${l}]${i}{${c}}`}catch{}}function Su(t,e){if(!/\b(?:no-)?(?:open|close)-quote\b/.test(t))return t;let n="\u201C",o="\u201D";try{let i=I(e).quotes;if(i==="none")n="",o="";else if(i&&i!=="auto"){let r=i.match(/"[^"]*"|'[^']*'/g);r&&r.length>=2&&(n=r[0].slice(1,-1),o=r[1].slice(1,-1))}}catch{}return n=n.replace(/"/g,""),o=o.replace(/"/g,""),t.replace(/"[^"]*"|\b(no-open-quote|no-close-quote|open-quote|close-quote)\b/g,(i,r)=>r?r==="open-quote"?`"${n}"`:r==="close-quote"?`"${o}"`:'""':i)}function vu(t,e,n,o){let i;try{i=I(t,e)}catch{}let r=i?.content;if(!r||r==="none"||r==="normal")return{text:"",incs:[]};r=gu(r),r=Su(r,t);let s=dr(t,n,o),a=pr(t,i,s),c=Ks(r)?Zs(r,t,a):r;return{text:bu(c),incs:a.__incs||[]}}function Cu(t,e){if(e.__shadowPseudo)return!1;let n=Jt(t),o=[];for(let r of["before","after","firstLetter","marker","firstLine"]){let s=n[r];if(s===null)return!1;s&&o.push(s)}if(!o.length)return!0;let i=o.join(",");try{return!t.matches(i)&&t.querySelector(i)===null}catch{return!1}}async function Oe(t,e,n,o,i=!1){if(t?.nodeType!==1||e?.nodeType!==1||(n.slicer?.due()&&await n.slicer.pause(),t.tagName==="TEXTAREA"))return;let r=t.ownerDocument||document;if(!i&&!hu(r,n)&&!n.__shadowPseudo||!i&&Cu(t,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=mu(t.ownerDocument||document,n));let s=n.__counterCtx,a=Jt(t);a.marker!==""&&na(t,e,n,a.marker,"::marker",wu),a.firstLine!==""&&na(t,e,n,a.firstLine,"::first-line",xu);for(let f of["::before","::after","::first-letter"]){let l=a[f==="::before"?"before":f==="::after"?"after":"firstLetter"];if(l!==null){if(l==="")continue;try{if(!t.matches(l))continue}catch{}}try{let u=I(t,f);if(!u||u.content==="none"&&u.backgroundImage==="none"&&(u.backgroundColor==="transparent"||u.backgroundColor==="rgba(0, 0, 0, 0)")&&!ea(u)&&(!u.transform||u.transform==="none")&&u.display==="inline")continue;if(u.display==="none"||f!=="::first-letter"&&(u.content==="none"||u.content==="normal")){f==="::before"&&(e.dataset.snapdomHasBefore="1"),f==="::after"&&(e.dataset.snapdomHasAfter="1");continue}if(f==="::first-letter"){let V=I(t),q=(V?.display||"").toLowerCase();if(q.includes("flex")||q.includes("grid"))continue;let H=Vt=>u[Vt]!==V[Vt]&&(parseFloat(u[Vt])||0)!==0;if(!(u.color!==V.color||u.fontSize!==V.fontSize||u.fontWeight!==V.fontWeight||u.fontFamily!==V.fontFamily||u.fontStyle!==V.fontStyle||u.textTransform!==V.textTransform||u.float!==V.float&&u.float!=="none"||H("paddingTop")||H("paddingRight")||H("paddingBottom")||H("paddingLeft")||H("marginTop")||H("marginRight")||H("marginBottom")||H("marginLeft")))continue;let K=Array.from(e.childNodes).find(Vt=>Vt.nodeType===Node.TEXT_NODE&&Vt.textContent?.trim().length>0);if(!K)continue;let kt=K.textContent,xe=/^\s*/.exec(kt)[0],xn=kt.slice(xe.length),Ye=xn.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],_o=xn.slice(Ye?.length||0);if(!Ye||/[\uD800-\uDFFF]/.test(Ye))continue;let jt=document.createElement("span");jt.textContent=Ye,jt.dataset.snapdomPseudo="::first-letter";let Eo=Me(u,En(t)),Ro=ke(Eo,"span");n.styleMap.set(jt,Ro);let Sn=document.createTextNode(_o);e.replaceChild(Sn,K),e.insertBefore(jt,Sn),xe&&e.insertBefore(document.createTextNode(xe),jt);continue}let m=u.content??"",p=m===""||m==="none"||m==="normal",{text:g,incs:y}=vu(t,f,s,n.__siblingCounters),b=u.backgroundImage,w=u.backgroundColor,S=u.fontFamily,C=parseInt(u.fontSize)||32,x=parseInt(u.fontWeight)||!1,k=u.fontStyle||"normal",A=u.color||"#000",M=u.transform,v=Ot(S,o?.__iconMatchers),_=!p&&g!=="",E=b&&b!=="none",T=w&&w!=="transparent"&&w!=="rgba(0, 0, 0, 0)",P=ea(u),L=M&&M!=="none",W=m!=="none"&&m!=="normal",R=/^inline-/.test(u.display||""),F=W&&((parseFloat(u.width)||0)>0||(parseFloat(u.height)||0)>0||R),N=W&&u.boxShadow&&u.boxShadow!=="none",$=W&&u.outlineStyle&&u.outlineStyle!=="none"&&(parseFloat(u.outlineWidth)||0)>0;if(!(_||E||T||P||L||F||N||$)){if(y&&y.length&&t.parentElement){let V=n.__siblingCounters.get(t.parentElement)||new Map;for(let{name:q}of y){if(!q)continue;let H=dr(t,s,n.__siblingCounters),K=pr(t,I(t,f),H).get(t,q);V.set(q,K)}n.__siblingCounters.set(t.parentElement,V)}continue}let G=g.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(g),U=u.display==="inline"&&u.cssFloat==="none"&&u.position!=="absolute"&&u.position!=="fixed",Y=!1;if(_&&!v&&g.length>1&&!G&&U){let V=I(t),q=parseFloat(V.fontSize)||16,H=parseFloat(V.lineHeight);Number.isFinite(H)||(H=q*1.5),t.getBoundingClientRect().height<H*1.6&&(e.style.whiteSpace="nowrap",Y=!0)}let B=document.createElement("span");B.dataset.snapdomPseudo=f,B.style.pointerEvents="none",Y&&(B.style.whiteSpace="nowrap");let dt=Qi(t,f,u,n,o),pt=(I(t).display||"").toLowerCase(),nt=pt.includes("flex")||pt.includes("grid");if(nt){let V=dt["min-width"];(!V||V==="auto"||V==="0px")&&(dt["min-width"]="0px")}let st=_;st&&!U&&parseFloat(u.height)>=1.5*(parseFloat(u.lineHeight)||(parseFloat(u.fontSize)||16)*1.2)&&(st=!1,B.style.whiteSpace=u.whiteSpace);let yt=ke(dt,"span",st,nt);if(n.styleMap.set(B,yt),v&&g&&g.length===1){let{dataUrl:V,width:q,height:H}=await Bs(g,S,x,C,A,k),ht=document.createElement("img");ht.src=V,ht.style=`height:${C}px;width:${q/H*C}px;object-fit:contain;`,B.appendChild(ht),e.dataset.snapdomHasIcon="true"}else if(g&&G){let V=Qe(g,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??se(g);if(V?.trim())try{let q=await at(qt(V),{as:"dataURL",useProxy:o.useProxy});if(q?.ok&&typeof q.data=="string"){let H=document.createElement("img");H.src=q.data,H.style=`width:${C}px;height:auto;object-fit:contain;`,B.appendChild(H)}}catch(q){console.warn(`[SnapDOM] Couldn't draw the ${f} icon of`,t,q)}}else!v&&_&&(B.textContent=g);B.style.backgroundImage="none","maskImage"in B.style&&(B.style.maskImage="none"),"webkitMaskImage"in B.style&&(B.style.webkitMaskImage="none");try{B.style.backgroundRepeat=u.backgroundRepeat,B.style.backgroundSize=u.backgroundSize,u.backgroundPositionX&&u.backgroundPositionY?(B.style.backgroundPositionX=u.backgroundPositionX,B.style.backgroundPositionY=u.backgroundPositionY):B.style.backgroundPosition=u.backgroundPosition,B.style.backgroundOrigin=u.backgroundOrigin,B.style.backgroundClip=u.backgroundClip,B.style.backgroundAttachment=u.backgroundAttachment,B.style.backgroundBlendMode=u.backgroundBlendMode}catch{}if(E)try{let V=Yt(b),q=await Promise.all(V.map(H=>ve(H,o)));B.style.backgroundImage=q.join(", ")}catch(V){console.warn(`[SnapDOM] Couldn't load the ${f} background image.`,V)}T&&(B.style.backgroundColor=w);let bt=u.maskImage||u.webkitMaskImage;if(bt&&bt!=="none")try{let q=(await Promise.all(Yt(bt).map(H=>ve(H,o)))).join(", ");B.style.maskImage=q,B.style.webkitMaskImage=q;for(let H of["maskSize","maskRepeat","maskPosition","maskMode","maskComposite","maskOrigin","maskClip"])u[H]&&(B.style[H]=u[H])}catch(V){console.warn(`[SnapDOM] Couldn't load the ${f} mask image.`,V)}let Wt=B.childNodes.length>0||B.textContent?.trim()!==""||E||T||P||L||F||N||$;if(y&&y.length&&t.parentElement){let V=n.__siblingCounters.get(t.parentElement)||new Map,q=dr(t,s,n.__siblingCounters),H=pr(t,I(t,f),q);for(let{name:ht}of y){if(!ht)continue;let K=H.get(t,ht);V.set(ht,K)}n.__siblingCounters.set(t.parentElement,V)}if(!Wt)continue;f==="::before"?(e.dataset.snapdomHasBefore="1",e.insertBefore(B,e.firstChild)):(e.dataset.snapdomHasAfter="1",e.appendChild(B))}catch(u){console.warn(`[SnapDOM] Couldn't copy the ${f} of`,t,u)}}let c=Array.from(e.children).filter(f=>!f.dataset.snapdomPseudo);if(n.nodeMap)for(let f of c){let l=n.nodeMap.get(f);l?.nodeType===1&&await Oe(l,f,n,o,!0)}else{let f=Array.from(t.children);for(let l=0;l<Math.min(f.length,c.length);l++)await Oe(f[l],c[l],n,o,!0)}}var ra="http://www.w3.org/2000/svg",ku=["background-image","background-size","background-position","background-repeat","background-origin"];function ia(t){for(let[e,n]of t)try{Mu(e,n)}catch{}}function Mu(t,e){let n=t.ownerDocument.defaultView,o=n.getComputedStyle(t),i=[...t.getClientRects()];if(!i.length)return;let r=i[0].left+parseFloat(o.borderLeftWidth),s=i[0].top+parseFloat(o.borderTopWidth),a;if(o.display==="inline"){let y=i.reduce((w,S)=>w+S.width,0),b=0;a=i.map(w=>{let S={x:w.left-r-b,y:w.top-s,w:y,h:w.height,top:w.top,bottom:w.bottom};return b+=w.width,S})}else{let y=t.clientWidth||i[0].width,b=t.clientHeight||i[0].height;a=[{x:0,y:0,w:y,h:b,top:-1/0,bottom:1/0}]}let c=e.ownerDocument,f=`sd-bct-${Math.random().toString(36).slice(2,9)}`,l=ku.map(y=>`${y}:${o.getPropertyValue(y)}`).join(";").replace(/"/g,"'"),u="";a.forEach((y,b)=>{let w=`<svg xmlns="${ra}" width="${y.w}" height="${y.h}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${y.w}px;height:${y.h}px;${l}"></div></foreignObject></svg>`;u+=`<pattern id="${f}-${b}" patternUnits="userSpaceOnUse" x="${y.x}" y="${y.y}" width="${y.w}" height="${y.h}"><image width="${y.w}" height="${y.h}" preserveAspectRatio="none" href="data:image/svg+xml;charset=utf-8,${encodeURIComponent(w)}"/></pattern>`});let d="",h=c.createElement("canvas").getContext("2d"),m=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT),p=t.ownerDocument.createRange();for(let y=m.nextNode();y;y=m.nextNode()){let b=n.getComputedStyle(y.parentElement);h.font=b.font;let w=h.measureText("X").fontBoundingBoxAscent;if(!Number.isFinite(w))return;let S=b.font.replace(/"/g,"'"),C=a.map(()=>({xs:[],ys:[],chars:""})),x=y.data;for(let k=0;k<x.length;k++){let A=x.charCodeAt(k)>=55296&&x.charCodeAt(k)<=56319?2:1;p.setStart(y,k),p.setEnd(y,k+A);let M=p.getClientRects()[0],v=x.slice(k,k+A);if(k+=A-1,!M||!v.trim())continue;let _=(M.top+M.bottom)/2,E=a.findIndex(T=>_>=T.top&&_<=T.bottom);E<0&&(E=0),C[E].xs.push(+(M.left-r).toFixed(2)),C[E].ys.push(+(M.top-s+w).toFixed(2)),C[E].chars+=v}C.forEach((k,A)=>{if(!k.chars)return;let M=k.chars.replace(/&/g,"&amp;").replace(/</g,"&lt;");d+=`<text x="${k.xs.join(" ")}" y="${k.ys.join(" ")}" fill="url(#${f}-${A})" style="font:${S};font-kerning:none;letter-spacing:0;white-space:pre">${M}</text>`})}if(!d)return;let g=c.createElementNS(ra,"svg");g.setAttribute("style","position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none"),g.innerHTML=`<defs>${u}</defs>${d}`,o.position==="static"&&e.style.setProperty("position","relative","important"),e.style.setProperty("color","transparent","important"),e.style.setProperty("-webkit-text-fill-color","transparent","important"),e.insertBefore(g,e.firstChild)}At();function sa(t,e,n){if(!t||t?.nodeType!==1)return;let o=t.ownerDocument||document,i=e||o,r=Tt(t)&&t.localName==="svg"?[t]:Array.from(t.querySelectorAll("svg")),s=/url\(\s*["']?\s*#([^)"']+)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],c=x=>window.CSS&&CSS.escape?CSS.escape(x):x.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),f="http://www.w3.org/1999/xlink",l=x=>{if(!x||!x.getAttribute)return null;let k=x.getAttribute("href")||x.getAttribute("xlink:href")||(typeof x.getAttributeNS=="function"?x.getAttributeNS(f,"href"):null);if(k)return k;let A=x.attributes;if(!A)return null;for(let M=0;M<A.length;M++){let v=A[M];if(!v||!v.name)continue;if(v.name==="href")return v.value;let _=v.name.indexOf(":");if(_!==-1&&v.name.slice(_+1)==="href")return v.value}return null},u=new Set(Array.from(t.querySelectorAll("[id]")).map(x=>x.id)),d=new Set,h=!1,m=(x,k=null)=>{if(!x)return;s.lastIndex=0;let A;for(;A=s.exec(x);){h=!0;let M=(A[1]||"").trim();M&&(u.has(M)||(d.add(M),k&&!k.has(M)&&k.add(M)))}},p=x=>{let k=x.querySelectorAll("use");for(let v of k){let _=l(v);if(!_||!_.startsWith("#"))continue;h=!0;let E=_.slice(1).trim();E&&!u.has(E)&&d.add(E)}let A='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(x.getAttribute("style")||"");for(let v of a)m(x.getAttribute(v));let M=x.querySelectorAll(A);for(let v of M){m(v.getAttribute("style")||"");for(let _ of a)m(v.getAttribute(_))}},g=x=>{if(!x||x.nodeType!==1||!x.querySelectorAll)return;let k="filter[id],clipPath[id],mask[id],linearGradient[id],radialGradient[id],pattern[id]",A=!1;try{A=!!(i.querySelector&&i.querySelector(k))}catch{return}if(!A)return;let M=["filter","clipPath","mask","maskImage","webkitMaskImage"],v=_=>{if(Tt(_))return;let E;try{E=getComputedStyle(_)}catch{return}for(let T of M){let P=E[T];P&&P.includes("url(")&&m(P)}};v(x);for(let _ of x.querySelectorAll("*"))v(_)};for(let x of r)p(x);if(g(n),!h)return;let y=t.querySelector("svg.inline-defs-container");y||(y=o.createElementNS("http://www.w3.org/2000/svg","svg"),y.classList.add("inline-defs-container"),y.setAttribute("aria-hidden","true"),y.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(y,t.firstChild||null));let b=y.querySelector("defs")||null,w=x=>{if(!x||u.has(x))return null;let k=c(x),A=M=>{let v=i.querySelector(M);return v&&!t.contains(v)?v:null};return A(`svg defs > *#${k}`)||A(`svg > symbol#${k}`)||A(`*#${k}`)};if(!d.size)return;let S=new Set(d),C=new Set;for(;S.size;){let x=S.values().next().value;if(S.delete(x),!x||u.has(x)||C.has(x))continue;let k=w(x);if(!k){C.add(x);continue}b||(b=o.createElementNS("http://www.w3.org/2000/svg","defs"),y.appendChild(b));let A=k.cloneNode(!0);A.id||A.setAttribute("id",x),b.appendChild(A),C.add(x),u.add(x);let M=[A,...A.querySelectorAll("*")];for(let v of M){let _=l(v);if(_&&_.startsWith("#")){let T=_.slice(1).trim();T&&!u.has(T)&&!C.has(T)&&S.add(T)}let E=v.getAttribute?.("style")||"";E&&m(E,S);for(let T of a){let P=v.getAttribute?.(T);P&&m(P,S)}}}}At();var hr=new WeakMap,mr=new WeakMap;function qn(t,e,n){let o=n.get(t),i=t.style;if(!o){let s=i.cssText,a=t.hasAttribute("style");o={users:0,saved:e.map(([f,l])=>{let u={property:f,value:i.getPropertyValue(f),priority:i.getPropertyPriority(f)};return i.setProperty(f,l,"important"),u.forcedValue=i.getPropertyValue(f),u}),originalCSS:s,forcedCSS:i.cssText,hadStyle:a},n.set(t,o)}o.users++;let r=!1;return()=>{if(!r&&(r=!0,!--o.users)){if(n.delete(t),i.cssText===o.forcedCSS)i.cssText=o.originalCSS;else for(let s of o.saved)i.getPropertyValue(s.property)!==s.forcedValue||i.getPropertyPriority(s.property)!=="important"||(s.value?i.setProperty(s.property,s.value,s.priority):i.removeProperty(s.property));!o.hadStyle&&!i.length&&(t.getAttribute("style"),t.removeAttribute("style"))}}}function aa(t){if(hr.has(t))return qn(t,[],hr);let e=getComputedStyle(t),n=e.outlineStyle,o=e.outlineWidth,i=n!=="none"&&parseFloat(o)>0,r=parseFloat(e.borderTopWidth)===0&&parseFloat(e.borderRightWidth)===0&&parseFloat(e.borderBottomWidth)===0&&parseFloat(e.borderLeftWidth)===0;if(i&&r){let s=[];for(let a of["top","right","bottom","left"])s.push([`border-${a}-width`,o],[`border-${a}-style`,"solid"],[`border-${a}-color`,"transparent"]);return qn(t,s,hr)}return()=>{}}function Xn(t,e=null){let n=[],o=i=>{if(!Mt(i))return;if(mr.has(i)){n.push(qn(i,[],mr));return}let r=getComputedStyle(i);(r.contentVisibility||r.getPropertyValue("content-visibility")||"")==="auto"&&n.push(qn(i,[["content-visibility","visible"]],mr))};try{if(e){let r=s=>{let a;try{a=s.getBoundingClientRect()}catch{return}if(!((a.width>0||a.height>0)&&(a.right<e.left-200||a.left>e.right+200||a.bottom<e.top-200||a.top>e.bottom+200))){o(s);for(let c=s.firstElementChild;c;c=c.nextElementSibling)r(c)}};r(t)}else{for(let i of t.querySelectorAll("*"))o(i);o(t)}}catch{}return()=>{for(let i of n)try{i()}catch{}}}vt();wt();_t();Ae();_t();function yr(t){return la(t.boxShadow)}function br(t){return la(t.textShadow)}function la(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",o=0;for(let c=0;c<t.length;c++){let f=t[c];f==="("?o++:f===")"&&(o=Math.max(0,o-1)),f===","&&o===0?(e.push(n),n=""):n+=f}n.trim()&&e.push(n);let i=0,r=0,s=0,a=0;for(let c of e){if(/\binset\b/i.test(c))continue;let f=c.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(f.length<2)continue;let[l,u,d=0,h=0]=f,m=Math.abs(l)+d+h,p=Math.abs(u)+d+h;r=Math.max(r,m+Math.max(l,0)),a=Math.max(a,m+Math.max(-l,0)),s=Math.max(s,p+Math.max(u,0)),i=Math.max(i,p+Math.max(-u,0))}return{top:Math.ceil(i),right:Math.ceil(r),bottom:Math.ceil(s),left:Math.ceil(a)}}function wr(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,o=0,i;for(;i=n.exec(e);)o+=parseFloat(i[1])||0;let r=Math.ceil(o*2);return{top:r,right:r,bottom:r,left:r}}function xr(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0),n=parseFloat(t.outlineOffset||"0")||0,o=e+Math.max(0,Math.ceil(n));return{top:o,right:o,bottom:o,left:o}}function Sr(t){let e=`${t.filter||""} ${t.webkitFilter||""}`.trim();if(!e||e==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=e.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],o=0,i=0,r=0,s=0,a=!1;for(let c of n){a=!0;let f=c.match(/-?\d+(?:\.\d+)?px/gi)?.map(p=>parseFloat(p))||[],[l=0,u=0,d=0]=f,h=Math.abs(l)+d,m=Math.abs(u)+d;i=Math.max(i,h+Math.max(l,0)),s=Math.max(s,h+Math.max(-l,0)),r=Math.max(r,m+Math.max(u,0)),o=Math.max(o,m+Math.max(-u,0))}return{bleed:{top:D(o),right:D(i),bottom:D(r),left:D(s)},has:a}}function Au(t){let e=yr(t),n=br(t),o=wr(t),i=xr(t),r=Sr(t);return{top:Math.max(e.top,n.top)+o.top+i.top+r.bleed.top,right:Math.max(e.right,n.right)+o.right+i.right+r.bleed.right,bottom:Math.max(e.bottom,n.bottom)+o.bottom+i.bottom+r.bleed.bottom,left:Math.max(e.left,n.left)+o.left+i.left+r.bleed.left}}function _u(t){return t.boxShadow&&t.boxShadow!=="none"||t.textShadow&&t.textShadow!=="none"||(t.outlineStyle||"none")!=="none"||t.filter&&t.filter!=="none"?!0:!!t.webkitFilter&&t.webkitFilter!=="none"}function ca(t){let e=t.overflowX||t.overflow||"visible",n=t.overflowY||t.overflow||"visible",o=!!t.contain&&/\b(paint|content|strict)\b/.test(t.contain)||!!t.clipPath&&t.clipPath!=="none";return{x:o||e!=="visible",y:o||n!=="visible"}}function fa(t,e,n,o=1,i=1){let r=0,s=0,a=0,c=0,f=ca(n.get(t)||I(t));if(f.x&&f.y)return{top:0,right:0,bottom:0,left:0};let l=t.getBoundingClientRect();for(let u of e.values()){if(u===t||u.nodeType!==1||u.ownerDocument!==t.ownerDocument)continue;let d=n.get(u);if(!d||!_u(d))continue;let h=Au(d);if(!(h.top||h.right||h.bottom||h.left))continue;let m=u.getBoundingClientRect(),p={left:m.left-h.left/o,top:m.top-h.top/i,right:m.right+h.right/o,bottom:m.bottom+h.bottom/i};for(let g=u.parentElement;g;g=g.parentElement){let y=ca(n.get(g)||I(g));if(y.x||y.y){let b=g.getBoundingClientRect();y.x&&(p.left=Math.max(p.left,b.left),p.right=Math.min(p.right,b.right)),y.y&&(p.top=Math.max(p.top,b.top),p.bottom=Math.min(p.bottom,b.bottom))}if(g===t)break}f.x||(c=Math.max(c,(l.left-p.left)*o),s=Math.max(s,(p.right-l.right)*o)),f.y||(r=Math.max(r,(l.top-p.top)*i),a=Math.max(a,(p.bottom-l.bottom)*i))}return{top:Math.max(0,Math.ceil(r)),right:Math.max(0,Math.ceil(s)),bottom:Math.max(0,Math.ceil(a)),left:Math.max(0,Math.ceil(c))}}function ua(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch{}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch{}let o=n.transform||"none";if(!o||o==="none"){let c=null;try{c=he(t).scale}catch{}try{e.style.transform="none"}catch{}if(!c)return{a:1,b:0,c:0,d:1};let f=ee({scale:c});return{a:f.a,b:f.b,c:f.c,d:f.d}}function i(c,f,l,u){let d=Math.sqrt(c*c+f*f)||0,h=0,m=0;if(d>0){let p=c/d,g=f/d;h=p*l+g*u;let y=l-p*h,b=u-g*h;m=Math.sqrt(y*y+b*b)||0,m>0?h=h/m:h=0}return{a:d,b:0,c:h*m,d:m}}let r=c=>{let f=he(t).scale;if(!f)return c;let l=ee({scale:f,baseTransform:`matrix(${c.a},${c.b},${c.c},${c.d},0,0)`});return{a:l.a,b:l.b,c:l.c,d:l.d}},s=o.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let c=s[1].split(",").map(f=>parseFloat(f.trim()));if(c.length===6&&c.every(Number.isFinite)){let[f,l,u,d]=c,h=i(f,l,u,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return r(h)}}let a=o.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let c=a[1].split(",").map(f=>parseFloat(f.trim()));if(c.length===16&&c.every(Number.isFinite)){let f=c[0],l=c[1],u=c[4],d=c[5],h=i(f,l,u,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return r(h)}}try{let c=new DOMMatrix(o),f=i(c.a,c.b,c.c,c.d);try{e.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return r(f)}catch{return null}}function De(t,e,n,o,i){let r=n.a,s=n.b,a=n.c,c=n.d,f=n.e||0,l=n.f||0;function u(y,b){let w=y-o,S=b-i,C=r*w+a*S,x=s*w+c*S;return C+=o+f,x+=i+l,[C,x]}let d=[u(0,0),u(t,0),u(0,e),u(t,e)],h=1/0,m=1/0,p=-1/0,g=-1/0;for(let[y,b]of d)y<h&&(h=y),b<m&&(m=b),y>p&&(p=y),b>g&&(g=b);return{minX:h,minY:m,maxX:p,maxY:g,width:p-h,height:g-m}}function hn(t,e,n){let o=(t.transformOrigin||"0 0").trim().split(/\s+/),[i,r]=[o[0]||"0",o[1]||"0"],s=(a,c)=>{let f=a.toLowerCase();return f==="left"||f==="top"?0:f==="center"?c/2:f==="right"||f==="bottom"?c:f.endsWith("px")?parseFloat(f)||0:f.endsWith("%")?(parseFloat(f)||0)*c/100:/^-?\d+(\.\d+)?$/.test(f)&&parseFloat(f)||0};return{ox:s(i,e),oy:s(r,n)}}function he(t){let e={rotate:"0deg",scale:null,translate:null},n=null;try{n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null}catch{}if(n){let i=c=>{try{return typeof n.has=="function"&&!n.has(c)||typeof n.get!="function"?null:n.get(c)}catch{return null}},r=i("rotate");if(r)if(r.angle){let c=r.angle;e.rotate=c.unit==="rad"?c.value*180/Math.PI+"deg":c.value+c.unit,r.is2D===!1&&r.x&&r.y&&r.z&&(e.rotate=`${r.x.value} ${r.y.value} ${r.z.value} ${e.rotate}`)}else r.unit?e.rotate=r.unit==="rad"?r.value*180/Math.PI+"deg":r.value+r.unit:e.rotate=String(r);else{let c=getComputedStyle(t);e.rotate=c.rotate&&c.rotate!=="none"?c.rotate:"0deg"}let s=i("scale");if(s){let c=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":""}`:null;"x"in s&&s.x?.value!=null?e.scale=[c(s.x),c(s.y)??c(s.x),...s.is2D===!1?[c(s.z)??"1"]:[]].join(" "):Array.isArray(s)?e.scale=s.map(c).join(" "):e.scale=String(s)}else{let c=getComputedStyle(t);e.scale=c.scale&&c.scale!=="none"?c.scale:null}let a=i("translate");if(a){let c=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":f.unit||"px"}`:null;"x"in a&&a.x?.value!=null?e.translate=[c(a.x),c(a.y)??"0px",...a.is2D===!1?[c(a.z)??"0px"]:[]].join(" "):Array.isArray(a)?e.translate=a.map(c).join(" "):e.translate=String(a)}else{let c=getComputedStyle(t);e.translate=c.translate&&c.translate!=="none"?c.translate:null}return(!e.rotate||e.rotate==="none")&&(e.rotate="0deg"),(!e.scale||e.scale==="none")&&(e.scale=null),(!e.translate||e.translate==="none")&&(e.translate=null),e}let o=getComputedStyle(t);return e.rotate=o.rotate&&o.rotate!=="none"?o.rotate:"0deg",e.scale=o.scale&&o.scale!=="none"?o.scale:null,e.translate=o.translate&&o.translate!=="none"?o.translate:null,e}var gr=null;function Eu(){if(gr?.isConnected)return gr;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),J(t),Object.assign(t.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(t),gr=t,t}function ee(t){let e=r=>{let s=[],a=0,c=0,f=String(r).trim();for(let l=0;l<f.length;l++)f[l]==="("?a++:f[l]===")"?a--:/\s/.test(f[l])&&!a&&(l>c&&s.push(f.slice(c,l)),c=l+1);return c<f.length&&s.push(f.slice(c)),s},n=r=>r&&r!=="none",o=[];if(n(t.translate)){let r=e(t.translate);for(let s=0;s<2&&s<r.length;s++){let a=s===0?t.width:t.height;/^[+-]?(?:\d*\.)?\d+%$/.test(r[s])&&Number.isFinite(a)&&(r[s]=`${parseFloat(r[s])*a/100}px`)}o.push(r.length>2?`translate3d(${r.join(",")})`:`translate(${r.join(",")})`)}if(n(t.rotate)&&t.rotate!=="0deg"){let r=e(t.rotate);r.length===4?o.push(`rotate3d(${r.join(",")})`):r.length===2&&/^[xyz]$/i.test(r[0])?o.push(`rotate${r[0].toUpperCase()}(${r[1]})`):o.push(`rotate(${r.join(" ")})`)}if(n(t.scale)){let r=e(t.scale).map(s=>/%$/.test(s)?String(parseFloat(s)/100):s);o.push(r.length>2?`scale3d(${r.join(",")})`:`scale(${r.join(",")})`)}if(n(t.baseTransform)&&o.push(t.baseTransform),!o.length)return new DOMMatrix;let i=o.join(" ");try{if(i.includes("%"))throw new Error("Transform needs a reference box");return new DOMMatrix(i)}catch{let r=Eu(),s=document.createElement("div");if(s.style.cssText="all:initial!important;display:block!important;transform-origin:0 0!important",s.style.setProperty("width",`${Number.isFinite(t.width)?t.width:0}px`,"important"),s.style.setProperty("height",`${Number.isFinite(t.height)?t.height:0}px`,"important"),s.style.setProperty("transform",i,"important"),!s.style.transform)throw new Error("[SnapDOM] Couldn't read the transform of an element.");r.appendChild(s);try{return Ru(s)}finally{s.remove()}}}function da(t){let e=I(t),n=e.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let i=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",r=e.scale&&e.scale!=="none"&&e.scale!=="1",s=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(i||r||s)}function Ru(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}var ga=new WeakSet;function Yn(t,e){if(!e)return null;let n=t.ownerDocument||document,o=n.defaultView||window,i,r,s,a;if(e==="viewport")i=0,r=0,s=n.documentElement?.clientWidth||o.innerWidth,a=n.documentElement?.clientHeight||o.innerHeight;else if(typeof e=="object")i=(Number(e.x)||0)-(o.scrollX||0),r=(Number(e.y)||0)-(o.scrollY||0),s=Number(e.width),a=Number(e.height);else return null;return s>0&&a>0?{left:i,top:r,width:s,height:a,right:i+s,bottom:r+a}:null}function vr(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return Bt(e)?e.host:null}function Fu(t,e){for(let n=e;n;n=vr(n))if(n===t)return!0;return!1}function Tu(t,e){for(let n=vr(t);n&&n!==e&&n?.nodeType===1;n=vr(n)){let o=I(n);if(o.position!=="static"||o.transform&&o.transform!=="none"||o.filter&&o.filter!=="none"||o.backdropFilter&&o.backdropFilter!=="none"||o.perspective&&o.perspective!=="none"||/transform|perspective|filter/.test(o.willChange||"")||/layout|paint|strict|content/.test(o.contain||""))return n}return null}function kr(t,e){try{return ee({baseTransform:t,rotate:e?.rotate,scale:e?.scale})}catch{return null}}function ya(t,e,n,o,i){let r=t.getBoundingClientRect();Mt(e)&&I(t).position==="static"&&(e.style.position="relative");let s=[];for(let[a,c]of n){if(c?.nodeType!==1)continue;let f=a.localName==="svg"&&Tt(a)&&!Tt(c.parentNode);if(!Mt(a)&&!f||c===t||!Fu(t,c))continue;let l=o.get(c)||I(c),u=l.position;if(u!=="fixed"&&u!=="sticky"&&u!=="-webkit-sticky"||a.style.position==="absolute")continue;let d=c.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;ga.add(a);let h=l.transform&&l.transform!=="none"?l.transform:"",m=he(c),p=!!(h||m.rotate!=="0deg"||m.scale||m.translate),g=p?kr(h,m):null,y=!g||!g.is2D||g.a===1&&g.b===0&&g.c===0&&g.d===1,b=d.width,w=d.height;y||(b=c.offsetWidth||d.width,w=c.offsetHeight||d.height);let S=c.getRootNode&&Bt(c.getRootNode()),C=r,x=t.clientLeft||0,k=t.clientTop||0;if(S){let E=Tu(c,t);E&&(C=E.getBoundingClientRect(),x=E.clientLeft||0,k=E.clientTop||0)}let A=d.left-C.left-x,M=d.top-C.top-k;if(p)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",y)a.style.transform="none";else{a.style.transform=`matrix(${g.a},${g.b},${g.c},${g.d},0,0)`;let{ox:E,oy:T}=hn(l,b,w),P=De(b,w,{a:g.a,b:g.b,c:g.c,d:g.d,e:0,f:0},E,T);A-=P.minX,M-=P.minY}if(u!=="fixed"){let E=a.cloneNode(!1);E.setAttribute("data-snap-ph","1"),E.style.position="static",E.style.visibility="hidden",E.style.width=`${b}px`,E.style.height=`${w}px`,E.style.boxSizing="border-box",a.parentElement?.insertBefore(E,a)}let v=f?b:b+2,_=w;i&&(Math.abs(M-i.y)<.5&&(M-=1,_+=1),Math.abs(A-i.x)<.5&&(A-=1,v+=1)),a.style.position="absolute",a.style.left=`${A}px`,a.style.top=`${M}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${v}px`,a.style.height=`${_}px`,a.style.boxSizing="border-box",S||s.push(a)}for(let a of s)e.appendChild(a)}function ba(t,e,n={}){if(!t||!e||!e.style)return;let o=getComputedStyle(t);try{e.style.boxShadow="none"}catch(s){j(n,"Couldn't remove the root box-shadow.",s)}try{e.style.textShadow="none"}catch(s){j(n,"Couldn't remove the root text-shadow.",s)}try{e.style.outline="none"}catch(s){j(n,"Couldn't remove the root outline.",s)}let r=(o.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=r.length?r:"none"}catch(s){j(n,"Couldn't remove the root drop-shadow filter.",s)}}function wa(t,e){if(!t||!e||!e.style)return;let n=1;try{n=parseFloat(getComputedStyle(t).zoom)}catch{return}if(!(!e.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{e.style.setProperty("zoom","1","important")}catch{}}function pa(t){let e=t.display||"";if(e.includes("flex")||e.includes("grid")||e.startsWith("table")||e==="inline-block"||e==="flow-root"||t.position==="absolute"||t.position==="fixed"||t.float&&t.float!=="none")return!0;let n=t.overflowX||t.overflow||"visible",o=t.overflowY||t.overflow||"visible";return!!(n!=="visible"||o!=="visible"||t.contain&&/\b(layout|content|paint|strict)\b/.test(t.contain))}function Pu(t,e){let n=Array.from(t.childNodes),o=e==="top"?n:n.reverse();for(let i of o){if(i.nodeType===Node.TEXT_NODE){if(/\S/.test(i.textContent||""))return null;continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let r=getComputedStyle(i),s=String(r.display||"");if(!(s==="none"||s==="contents")&&!(r.position==="absolute"||r.position==="fixed"))return r.float&&r.float!=="none"||s.startsWith("inline")?null:i}return null}function xa(t,e,n){if(!t||!e||!e.style)return;let o=getComputedStyle(t);if(!pa(o))for(let i of["top","bottom"]){let r=i==="top"?"Top":"Bottom";if((parseFloat(o[`border${r}Width`])||0)>0||(parseFloat(o[`padding${r}`])||0)>0)continue;let s=t,a=e;for(;s&&a;){let c=Pu(s,i);if(!c)break;let f=n?Array.from(a.children).find(d=>n.get(d)===c)||null:a.children[Array.from(s.children).indexOf(c)]||null,l=getComputedStyle(c),u=parseFloat(l[`margin${r}`])||0;if(f&&f.style&&u>0&&(f.style[`margin${r}`]="0px"),pa(l)||(parseFloat(l[`border${r}Width`])||0)>0||(parseFloat(l[`padding${r}`])||0)>0)break;s=c,a=f}}}var $u=new Set(["xml","xlink"]);function Nu(t,e){if(t.startsWith("*")||t==="xmlns"||t.includes("@"))return!0;if(t.includes(":")){let n=t.split(":",1)[0];if(!$u.has(n))return!0}return e?t.startsWith("x-")||t.startsWith("v-")||t.startsWith(":")||t.startsWith("on:")||t.startsWith("bind:")||t.startsWith("let:")||t.startsWith("class:"):!1}var Lu=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/g,ha=t=>t.replace(Lu,e=>e.length===2?e:""),Iu=/^data:[^,]{0,120};base64,/;function Kn(t,e={}){if(!t)return;let{stripFrameworkDirectives:n=!0}=e,o=a=>{for(let c of Array.from(a.attributes)){if(Nu(c.name,n)){a.removeAttribute(c.name);continue}if(Iu.test(c.value))continue;let f=ha(c.value);if(f!==c.value)try{a.setAttribute(c.name,f)}catch{}}};t.nodeType===Node.ELEMENT_NODE&&o(t);let i=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),s;for(;s=r.nextNode();)if(s.nodeType===Node.ELEMENT_NODE)o(s);else if(s.nodeType===Node.COMMENT_NODE)i.push(s);else{let a=ha(s.data);a!==s.data&&(s.data=a)}for(let a of i)a.remove()}function Ou(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}var Du=new Set(["img","canvas","video","iframe","object","embed"]);function Wu(t){return Tt(t)||Du.has(t?.localName)}function Bu(t,e){if(t?.nodeType!==1||Ou(t)||Wu(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let o=e.display||"";return!(o.includes("flex")||o.includes("grid")||o.startsWith("table")||e.transform&&e.transform!=="none")}function Sa(t,e,n=new Map,o=null){function i(r,s){if(r?.nodeType!==1||s?.nodeType!==1)return;let a=r.childElementCount>s.childElementCount,c=n.get(r)||getComputedStyle(r);if(n.has(r)||n.set(r,c),a&&Bu(r,c)){s.style.height||(s.style.height="auto"),s.style.width||(s.style.width="auto"),s.style.removeProperty("block-size"),s.style.removeProperty("inline-size"),s.style.minHeight||(s.style.minHeight="0"),s.style.minWidth||(s.style.minWidth="0"),s.style.maxHeight||(s.style.maxHeight="none"),s.style.maxWidth||(s.style.maxWidth="none");let l=c.overflowY||c.overflowBlock||"visible",u=c.overflowX||c.overflowInline||"visible";(l!=="visible"||u!=="visible")&&(s.style.overflow="visible")}let f=Array.from(s.children);if(o)for(let l of f){let u=o.get(l);u&&u.nodeType===1&&i(u,l)}else{let l=Array.from(r.children);for(let u=0;u<Math.min(l.length,f.length);u++)i(l[u],f[u])}}i(t,e)}function Uu(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function zu(t,e){if(t?.nodeType!==1)return!1;if(t.getAttribute("data-capture")==="exclude")return e?.excludeMode==="remove";if(Array.isArray(e?.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(o){j(e,"Invalid exclude selector; ignored.",o)}if(Array.isArray(e?.excludePredicates))for(let n of e.excludePredicates)try{if(n(t))return e.excludeMode==="remove"}catch(o){j(e,"Your exclude function threw; ignored.",o)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){j(e,"Your filter function threw; ignored.",n)}return!1}function Mr(t,e){let n=getComputedStyle(t),o=t.getBoundingClientRect(),i=1/0,r=-1/0,s=!1,a=Array.from(t.children);for(let h of a){if(zu(h,e)||!Uu(h))continue;let m=h.getBoundingClientRect(),p=m.top-o.top,g=m.bottom-o.top;g<=p||(p<i&&(i=p),g>r&&(r=g),s=!0)}let c=s?Math.max(0,r-i):0,f=parseFloat(n.borderTopWidth)||0,l=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,d=parseFloat(n.paddingBottom)||0;return f+l+u+d+c}var D=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t;function Ar(t){let e=document.implementation.createHTMLDocument(""),n=e.importNode(t,!0);for(let o of[n,...n.querySelectorAll("*")]){let i=o.localName.includes("-");if(!Mt(o)||!(i||o.hasAttribute("is")))continue;let r=e.createElement(i?"span":o.localName);for(let s of o.attributes)s.name!=="is"&&r.setAttribute(s.name,s.value);r.append(...o.childNodes),o===n?n=r:o.replaceWith(r)}return n}var We=.75;function va(t,e,n,o,i,r){let s=t.ownerDocument||document,a=t.getBoundingClientRect(),c=i>0&&a.width>0?a.width/i:1,f=r>0&&a.height>0?a.height/r:1;if(Math.abs(c-f)>.02)return 0;let l=s.createElement("div");J(l),l.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let u=l.attachShadow({mode:"open"}),d=s.createElement("style");d.textContent=n,u.appendChild(d);let h=Ar(e);u.appendChild(h),s.body.appendChild(l);let m=0,p=["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],g=["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],y=(b,w,S)=>{let C=I(b),x=C.boxSizing==="border-box",k=(A,M,v)=>{let _=parseFloat(A);if(!Number.isFinite(_))return M;let E=0;if(!x)for(let P of v)E+=parseFloat(C[P])||0;let T=_+E;return Math.abs(T-M)<=.51?T:M};return{width:k(C.width,w,p),height:k(C.height,S,g)}};try{let b=h.getBoundingClientRect(),w=h.offsetWidth||i,S=h.offsetHeight||r,C=w>0&&b.width>0?b.width/w:1,x=S>0&&b.height>0?b.height/S:1,k=(A,M,v=!1)=>{let _=A.children,E=M.children,T=Math.min(_.length,E.length);for(let P=0;P<T;P++){let L=_[P],W=E[P],R=o.get(L),F=v||ga.has(L);if(R?.nodeType===1&&Mt(L)&&L.style&&R.isConnected){let N=R.getBoundingClientRect();if(N.width>0&&N.height>0){let $=W.getBoundingClientRect(),z=N.width/c,G=N.height/f,U=$.width,Y=$.height,B=R.offsetWidth||z,dt=R.offsetHeight||G,pt=W.offsetWidth||U,nt=W.offsetHeight||Y,st=Math.abs(z-B)>We||Math.abs(G-dt)>We||Math.abs(U-pt)>We||Math.abs(Y-nt)>We;if(F){let lt=y(W,pt,nt);z=U>0?z*C*lt.width/U:z,G=Y>0?G*x*lt.height/Y:G,U=lt.width,Y=lt.height}else if(st){let lt=y(R,B,dt),Wt=y(W,pt,nt);z=lt.width,G=lt.height,U=Wt.width,Y=Wt.height}let yt=U-z,bt=Y-G;(Math.abs(yt)>We||Math.abs(bt)>We)&&(L.style.boxSizing="border-box",L.style.width=`${D(z)}px`,L.style.height=`${D(G)}px`,m++)}}k(L,W,F)}};k(e,h)}finally{l.remove()}return m}var Hu=/::-(?:webkit-(?:scrollbar|meter|progress|slider)|moz-(?:meter|progress))/i;function Cr(t,e=new Set){let n="";if(!t)return n;for(let o=0;o<t.length;o++){let i=t[o];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){n+=Cr(i.styleSheet.cssRules,e);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let r=Cr(i.cssRules,e);r&&(n+=`@media ${i.conditionText}{${r}}`);continue}if(i.type===CSSRule.STYLE_RULE){let r=i.selectorText||"";if(Hu.test(r)){let s=i.cssText;s&&!e.has(s)&&(e.add(s),n+=s)}}}catch{}}return n}var ma=new WeakMap;function ju(t){let e="";for(let n of t.styleSheets){let o=-1;try{o=n.cssRules?n.cssRules.length:-1}catch{}e+=(n.href||"inline")+":"+o+"|"}return e}function Vu(t){if(!t||!t.styleSheets)return"";let e=ju(t),n=ma.get(t);if(n&&n.fp===e)return n.css;let o=new Set,i="";for(let r of Array.from(t.styleSheets))try{let s=r.cssRules;s&&(i+=Cr(s,o))}catch{}return ma.set(t,{fp:e,css:i}),i}function Ca(t,e){let n=Ho(t.clone).sort(),o=n.join(","),i=cn(t.element),r=O.baseStyle.get(o),s;r&&r.universe===i?s=r.css:(s=jo(n,i),O.baseStyle.set(o,{universe:i,css:s}));let a=Vu(t.element?.ownerDocument||document);return t.fontsCSS=e,t.baseCSS=s,t.scrollbarCSS=a,{baseCSS:s,scrollbarCSS:a,fontsCSS:e}}var Gu=[["max-width","x"],["min-width","x"],["max-height","y"],["min-height","y"]];function ka(t,e,n){let o=null;for(let[i,r]of Gu){let s=n.getPropertyValue(i);if(!s.includes("%"))continue;if(n.writingMode!=="horizontal-tb")return;o||=qu(t,n);let a=r==="x"?o.w:o.h,c=s.replace(/(-?\d*\.?\d+(?:e[+-]?\d+)?)%/gi,(l,u)=>`${a*u/100}px`),f=parseFloat(r==="x"?n.width:n.height);e.style.setProperty(i,Number.isFinite(f)?`${i.slice(0,3)}(${c}, ${f}px)`:c)}}function qu(t,e){let n=t.ownerDocument,o=n.documentElement,i={w:o.clientWidth,h:o.clientHeight};if(e.position==="fixed")return i;if(e.position==="absolute"){let c=t.offsetParent;return!c||(c===n.body||c===o)&&getComputedStyle(c).position==="static"?i:{w:c.clientWidth,h:c.clientHeight}}let r=t.parentElement;if(!r)return i;let s=getComputedStyle(r),a=c=>parseFloat(s.getPropertyValue(c))||0;return{w:r.clientWidth-a("padding-left")-a("padding-right"),h:r.clientHeight-a("padding-top")-a("padding-bottom")}}mt();var Qn=new Set,Xu="[data-sd-ph]::placeholder{color:var(--sd-ph)!important;opacity:var(--sd-ph-o)!important;-webkit-text-fill-color:var(--sd-ph)!important}";async function Ma(t,e={}){Nt(),Tn(t.ownerDocument||document);let n=e.__session||{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},o={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:e,slicer:e.__slicer||null},i=null,r=null;if(e.clip&&(r=Yn(t,e.clip),r&&(o.clip={rect:r,root:t})),e.captureSelection)try{o.selection=Cs(t)}catch(p){j(o,"Couldn't read the text selection.",p)}let s,a="",c="";if(Qn.size){let p=(g,y)=>{for(let b=y;b;b=b.assignedSlot||b.parentElement||Pt(b))if(b===g)return!0;return!1};for(;;){let g=[...Qn].filter(({root:y})=>p(y,t)||p(t,y)).map(({promise:y})=>y.catch(()=>{}));if(!g.length)break;await Promise.all(g)}}if(!o.clip&&t.isConnected&&t.ownerDocument?.visibilityState!=="hidden")try{let p=t.getBoundingClientRect(),g=t.ownerDocument?.defaultView||window,y=p.right<=0||p.bottom<=0||p.left>=g.innerWidth||p.top>=g.innerHeight,b=[];if(y&&(()=>{let S=[];t.shadowRoot&&S.push(t.shadowRoot);for(let C of t.querySelectorAll("*"))C.shadowRoot&&S.push(C.shadowRoot);for(;S.length;){let C=S.pop(),x=C.host?.localName==="calcite-icon";for(let k of C.querySelectorAll("*")){if(k.shadowRoot&&S.push(k.shadowRoot),!x||k.localName!=="svg")continue;let A=k.querySelectorAll("path");if(!A.length||[...A].some(v=>v.getAttribute("d")?.trim()))continue;let M=k.getBoundingClientRect();M.width&&M.height&&b.push(k)}}})(),b.length){let S=(async()=>{let x=t.style,k=t.hasAttribute("style"),A=new Map,M=(v,_)=>{A.has(v)||A.set(v,{value:x.getPropertyValue(v),priority:x.getPropertyPriority(v)}),x.setProperty(v,_,"important");let E=A.get(v);E.forcedValue=x.getPropertyValue(v),E.forcedPriority=x.getPropertyPriority(v)};try{M("left","0"),M("top","0"),M("right","auto"),M("bottom","auto"),M("margin-top","0"),M("margin-right","0"),M("margin-bottom","0"),M("margin-left","0"),M("transform","none"),M("translate","none"),M("opacity","0"),M("pointer-events","none");let v=t.getBoundingClientRect();if(v.right<=0||v.bottom<=0||v.left>=g.innerWidth||v.top>=g.innerHeight){let T=t.parentElement?.getBoundingClientRect(),P=T&&T.right>0&&T.left<g.innerWidth?Math.max(0,T.left):0,L=T&&T.bottom>0&&T.top<g.innerHeight?Math.max(0,T.top):0;M("position","fixed"),M("left",`${P}px`),M("top",`${L}px`)}await xt(100);let _=Date.now()+1500,E=()=>b.some(T=>{if([...T.querySelectorAll("path")].some(L=>L.getAttribute("d")?.trim()))return!1;let P=T.getBoundingClientRect();return P.width&&P.height&&P.right>0&&P.bottom>0&&P.left<g.innerWidth&&P.top<g.innerHeight});for(;Date.now()<_&&E();)await new Promise(T=>setTimeout(T,25));await xt(100)}finally{for(let[v,_]of A)x.getPropertyValue(v)!==_.forcedValue||x.getPropertyPriority(v)!==_.forcedPriority||(_.value?x.setProperty(v,_.value,_.priority):x.removeProperty(v));!k&&!x.length&&t.removeAttribute("style"),await xt(100)}})(),C={root:t,promise:S};Qn.add(C);try{await S}finally{Qn.delete(C)}}}catch{}let f=aa(t),l=Xn(t,r);if(r){let p=t.getBoundingClientRect(),g=t.offsetWidth||p.width,y=t.offsetHeight||p.height,b=p.width&&Math.abs(g-p.width)>=1?g/p.width:1,w=p.height&&Math.abs(y-p.height)>=1?y/p.height:1;i={x:(r.left-p.left)*b,y:(r.top-p.top)*w,width:r.width*b,height:r.height*w}}try{s=await te(t,o,e)}catch(p){throw console.warn("[SnapDOM] Capture failed while copying the element.",p),p}finally{l(),f()}Ss(o.nodeMap,t.ownerDocument||document),o.slicer?.due()&&await o.slicer.pause();try{sa(s,void 0,t)}catch(p){console.warn("[SnapDOM] Couldn't copy external SVG icons; some may be missing.",p)}try{await Oe(t,s,o,e)}catch(p){console.warn("[SnapDOM] Couldn't copy ::before/::after content; some decorations may be missing.",p)}o.bgClipText&&ia(o.bgClipText),await Ln(s,o);for(let[p,g]of o.nodeMap.entries())if(g?.tagName==="STYLE"&&p?.tagName==="STYLE"&&!p.hasAttribute("data-sd"))try{let y=g.sheet&&g.sheet.cssRules;y&&/@media/i.test(p.textContent||"")&&(p.textContent=pe(y))}catch{}try{let p=s.querySelectorAll("style[data-sd]");for(let g of p)c+=g.textContent||"",g.remove()}catch(p){j(o,"Couldn't copy shadow DOM styles.",p)}o.slicer?.due()&&await o.slicer.pause();let u=tn(o.styleMap);a=Array.from(u.entries()).map(([p,g])=>`.${g}{${p}}`).join("");let h=c+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+(o.__usesPlaceholder?Xu:"")+(o.__pseudoCSS||"");a=h+a;for(let[p,g]of o.styleMap.entries())_r(p,g,u);try{Yu(t,s,o.nodeMap)}catch(p){j(o,"Couldn't bring an open dialog or popover into the capture.",p)}if((o.clip||t.scrollTop||t.scrollLeft)&&s?.nodeType===1)try{let p=o.clip&&i?{x:i.x,y:i.y}:{x:0,y:0};ya(t,s,o.nodeMap,o.styleCache,p)}catch(p){j(o,"Couldn't keep fixed-position elements in place.",p)}for(let[p,g]of o.nodeMap.entries())o.clip&&g===t&&t===t.ownerDocument.scrollingElement||Er(p,g,o.nodeMap,o.styleCache);let m=t.ownerDocument;if((t===m.body||t===m.documentElement)&&m.documentElement.localName==="html"){let p=o.styleCache.get(m.documentElement)||I(m.documentElement);t===m.documentElement&&(s.style.overflow="visible");let g=t===m.body?s:s.querySelector("body");if(g&&p.overflowX==="visible"&&p.overflowY==="visible"&&p.contain==="none"&&!p.containerType?.includes("size")&&p.contentVisibility!=="auto"&&p.contentVisibility!=="hidden"){let y=o.styleCache.get(m.body)||I(m.body);y.contain==="none"&&!y.containerType?.includes("size")&&y.contentVisibility!=="auto"&&y.contentVisibility!=="hidden"&&y.display!=="none"&&(g.style.overflow="visible")}}if(t===o.nodeMap.get(s)){let p=o.styleCache.get(t)||I(t);o.styleCache.set(t,p);let g=Po(p.transform);s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=g||"",s.style.translate="none",ka(t,s,p)}for(let[p,g]of o.nodeMap.entries())g.tagName==="PRE"&&(p.style.marginTop="0",p.style.marginBlockStart="0");return{clone:s,classCSS:a,classPrefixCSS:h,styleCache:o.styleCache,nodeMap:o.nodeMap,reconcileRisk:o.reconcileRisk||0,clipWindow:i}}function Yu(t,e,n){let o=[];for(let s of[":modal",":popover-open"])try{o.push(...t.querySelectorAll(s))}catch{}if(!o.length)return;let i=new Map;for(let[s,a]of n.entries())i.set(a,s);let r=214748e4;for(let s of o){let a=i.get(s);if(!(!a||a===e||a.parentNode==null)){try{let c=getComputedStyle(s,"::backdrop"),f=c.backgroundColor,l=c.backgroundImage;if(f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"||l&&l!=="none"){let d=document.createElement("div");d.setAttribute("data-sd-backdrop",""),d.style.cssText=`position:fixed;inset:0;z-index:${r};background-color:${f};`+(l&&l!=="none"&&l.includes("data:")?`background-image:${l};`:""),e.appendChild(d)}}catch{}r+=1,a.style.zIndex=String(r),e.appendChild(a),r+=1}}}function _r(t,e,n){if(t.tagName==="STYLE")return;if(t.getRootNode&&Bt(t.getRootNode())){t.setAttribute("style",e.replace(/;/g,"; "));return}let o=n.get(e);o&&t.classList.add(o);let i=t.style?.backgroundImage,r=t.dataset?.snapdomHasIcon;i&&i!=="none"&&(t.style.backgroundImage=i),r&&(t.style.verticalAlign="middle",t.style.display="inline")}function Er(t,e,n,o){let i=e.scrollLeft,r=e.scrollTop;if(!(i||r)||t?.nodeType!==1||t.namespaceURI!=="http://www.w3.org/1999/xhtml")return;t.style.overflow="hidden",t.style.scrollbarWidth="none",t.style.msOverflowStyle="none";try{let c=t.querySelectorAll("*");for(let f of c){if(f.nodeType!==1||f.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let l=n?.get(f),u=l&&(o?.get(l)||I(l)),d=f.style.position||u?.position;if(d!=="fixed"&&d!=="absolute")continue;let h=u&&u.position!=="absolute"&&d==="absolute",m=null;if(l&&!h)for(let y=l.parentElement||Pt(l);y;y=y.parentElement||Pt(y)){let b=o?.get(y)||I(y);if(d==="absolute"&&b.position!=="static"||b.transform&&b.transform!=="none"||b.translate&&b.translate!=="none"||b.rotate&&b.rotate!=="none"||b.scale&&b.scale!=="none"||b.filter&&b.filter!=="none"||b.backdropFilter&&b.backdropFilter!=="none"||b.perspective&&b.perspective!=="none"||/transform|perspective|filter/.test(b.willChange||"")||/layout|paint|strict|content/.test(b.contain||"")){m=y;break}if(y===e)break}if(m){m===e&&(f.style.top=u.top,f.style.left=u.left,f.style.right=u.right,f.style.bottom=u.bottom);continue}let p=parseFloat(f.style.top||u?.top)||0,g=parseFloat(f.style.left||u?.left)||0;f.style.top=`${p+r}px`,f.style.left=`${g+i}px`,d==="fixed"&&(f.style.position="absolute")}}catch{}let a=document.createElement("div");for(a.style.all="unset",a.style.transform=`translate(${-i}px, ${-r}px)`,a.style.willChange="transform",a.style.display="inline-block",a.style.width="100%";t.firstChild;)a.appendChild(t.firstChild);t.appendChild(a)}ae();ce();wt();var Aa="http://www.w3.org/1999/xlink";function Ku(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(Aa,"href"):null)}function Qu(t){let e=parseFloat(t.dataset?.snapdomWidth||"")||0,n=parseFloat(t.dataset?.snapdomHeight||"")||0,o=parseInt(t.getAttribute("width")||"",10)||0,i=parseInt(t.getAttribute("height")||"",10)||0,r=parseFloat(t.style?.width||"")||0,s=parseFloat(t.style?.height||"")||0,a=e||r||o||t.width||t.naturalWidth||100,c=n||s||i||t.height||t.naturalHeight||100;return{width:a,height:c}}async function Zn(t,e={}){let n=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&n.unshift(t);let o=async a=>{if(!a.getAttribute("src")){let m=a.currentSrc||a.src||$e(a.getAttribute("srcset"),a)||"";m&&a.setAttribute("src",m)}if(a.removeAttribute("srcset"),a.removeAttribute("sizes"),(a.getAttribute("src")||"").startsWith("data:")){a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let c=a.src||"";if(!c)return;let f=O.image?.get(c);if(f){a.src=f,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let l=await at(c,{as:"dataURL",useProxy:e.useProxy});if(l.ok&&typeof l.data=="string"&&l.data.startsWith("data:")){O.image?.set(c,l.data),a.src=l.data,l.blob&&(a.__snapdomBlob=l.blob),a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:u,height:d}=Qu(a),{fallbackURL:h}=e||{};if(h)try{let m=typeof h=="function"?await h({width:u,height:d,src:c,element:a}):h;if(m){let p=await at(m,{as:"dataURL",useProxy:e.useProxy});if(p?.ok&&typeof p.data=="string"){a.src=p.data,a.width||(a.width=u),a.height||(a.height=d);return}}}catch{}if(e.placeholders!==!1){Et(e.__session,"image-fallback",`image failed to inline, using placeholder: ${c}`);let m=document.createElement("div");m.style.cssText=[`width:${u}px`,`height:${d}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${d}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),m.textContent="img",a.replaceWith(m)}else{let m=document.createElement("div");m.style.cssText=`display:inline-block;width:${u}px;height:${d}px;visibility:hidden;`,a.replaceWith(m)}},i=6;for(let a=0;a<n.length;a+=i){let c=n.slice(a,a+i).map(o);await Promise.allSettled(c)}let r=Array.from(t.querySelectorAll("image"));t.localName==="image"&&r.unshift(t);let s=async a=>{let c=Ku(a);if(!c||c.startsWith("data:")||c.startsWith("blob:"))return;let f=await at(c,{as:"dataURL",useProxy:e.useProxy});f.ok&&typeof f.data=="string"&&f.data.startsWith("data:")&&(a.setAttribute("href",f.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(Aa,"href"))};for(let a=0;a<r.length;a+=i){let c=r.slice(a,a+i).map(s);await Promise.allSettled(c)}}mt();vt();var Zu=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],Ju=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],td=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],ed=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function nd(t,e,n,o){let i=n.get(t)||I(t);n.has(t)||n.set(t,i);let r=ji(t),s=r?m=>m in r?r[m]:"":m=>i.getPropertyValue(m),a=s("border-image"),c=s("border-image-source"),f=a&&a!=="none"||c&&c!=="none",l=i.getPropertyValue("background-image"),u=s("background-color"),d=l&&l!=="none"||u&&u!=="rgba(0, 0, 0, 0)"&&u!=="transparent"||/url\s*\(|gradient\s*\(/i.test(i.getPropertyValue("background")||""),h=St()&&(s("background-clip")||s("-webkit-background-clip")||"").includes("text");if(d&&!h)for(let m of td){let p=s(m);p&&e.style.setProperty(m,p)}for(let m of Zu){if(h&&m==="background-image")continue;let p=i.getPropertyValue(m);if(m==="background-image"&&(!p||p==="none")){let b=i.getPropertyValue("background");b&&/url\s*\(/.test(b)&&(p=Yt(b).filter(w=>/url\s*\(/.test(w)).join(", ")||p)}if(!p||p==="none")continue;let g=Yt(p),y=await Promise.all(g.map(b=>ve(b,o)));y.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&e.style.setProperty(m,y.join(", "))}for(let m of Ju){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(f)for(let m of ed){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(d&&/fixed/.test(s("background-attachment")||""))try{await rd(t,e,i)}catch{}}function od(t,e,n,o,i){let r=(t||"auto").trim();if(r==="cover"||r==="contain"){if(!e||!n)return{w:o,h:i};let d=r==="cover"?Math.max(o/e,i/n):Math.min(o/e,i/n);return{w:e*d,h:n*d}}let s=r.split(/\s+/),a=(d,h)=>{if(d==="auto"||d===void 0)return null;if(d.endsWith("px"))return parseFloat(d);if(d.endsWith("%"))return h*parseFloat(d)/100},c=a(s[0],o),f=a(s[1],i);if(c===void 0||f===void 0)return null;let l=c,u=f;return l==null&&u==null?(l=e||o,u=n||i):l==null?l=e&&n?u*(e/n):o:u==null&&(u=e&&n?l*(n/e):i),!l||!u?null:{w:l,h:u}}async function rd(t,e,n){let o=(n.getPropertyValue("background-attachment")||"").split(",").map(m=>m.trim()),i=en();if(!i)for(let m=t.parentElement;m&&!i;m=m.parentElement){let p=I(m);(p.transform&&p.transform!=="none"||p.filter&&p.filter!=="none")&&(i=!0)}if(i){e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "));return}let r=t.getBoundingClientRect(),s=t.ownerDocument?.defaultView||window,a=s.innerWidth,c=s.innerHeight,f=Yt(e.style.backgroundImage||n.getPropertyValue("background-image")||""),l=(e.style.backgroundSize||n.getPropertyValue("background-size")||"auto").split(",").map(m=>m.trim()),u=(e.style.backgroundPosition||n.getPropertyValue("background-position")||"0% 0%").split(",").map(m=>m.trim()),d=[],h=[];for(let m=0;m<f.length;m++){let p=o[m%o.length]||"scroll",g=l[m%l.length],y=u[m%u.length];if(p!=="fixed"){d.push(g),h.push(y);continue}let b=0,w=0,S=f[m]&&f[m].match(/url\(["']?([^"')]+)["']?\)/);if(S)try{let v=new Image;v.src=S[1],await v.decode(),b=v.naturalWidth,w=v.naturalHeight}catch{d.push(g),h.push(y);continue}let C=od(g,b,w,a,c);if(!C){d.push(g),h.push(y);continue}let x=y.split(/\s+/),k=(v,_,E)=>{if(!v)return 0;if(v.endsWith("px"))return parseFloat(v);if(v.endsWith("%"))return(_-E)*parseFloat(v)/100},A=k(x[0]||"0%",a,C.w),M=k(x[1]||x[0]||"0%",c,C.h);if(A===void 0||M===void 0){d.push(g),h.push(y);continue}d.push(`${Jn(C.w)}px ${Jn(C.h)}px`),h.push(`${Jn(A-r.left)}px ${Jn(M-r.top)}px`)}e.style.setProperty("background-size",d.join(", ")),e.style.setProperty("background-position",h.join(", ")),e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "))}var Jn=t=>Math.round(t*100)/100;async function to(t,e,n,o={},i=new Map){if(!e)return;let r=[];t&&er(t)&&r.push([t,e]);let s=[e];for(;s.length;){let c=s.pop();if(c.children)for(let f of c.children){if(f.tagName==="STYLE")continue;let l=i.get(f);l&&er(l)&&r.push([l,f]),s.push(f)}}let a=6;for(let c=0;c<r.length;c+=a)await Promise.allSettled(r.slice(c,c+a).map(([f,l])=>nd(f,l,n,o)))}vt();function Ea(t,e,n=new Map){let o=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let a=i.currentNode;a;a=i.nextNode()){let c=n.get(a);if(c?.nodeType!==1)continue;let f=I(c),l=f.getPropertyValue("backdrop-filter")||f.getPropertyValue("-webkit-backdrop-filter");l&&l!=="none"&&a!==e&&o.push({cloneEl:a,orig:c,bf:l,path:cd(e,a)})}if(!o.length)return;let r=t.getBoundingClientRect(),s=o.map((a,c)=>{let f=e.cloneNode(!0);ad(f,e,a.orig.getBoundingClientRect(),n),ld(_a(f,a.path));for(let l=0;l<c;l++){let u=_a(f,o[l].path);u&&(u.style.setProperty("backdrop-filter","none","important"),u.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...a,copy:f}});for(let{cloneEl:a,orig:c,bf:f,copy:l}of s)id.has(a.tagName)||sd(a,c,f,l,r)}var id=new Set(["IMG","INPUT","TEXTAREA","SELECT","CANVAS","VIDEO","AUDIO","IFRAME","EMBED","OBJECT","PROGRESS","METER","HR","BR"]);function sd(t,e,n,o,i){let r=e.getBoundingClientRect();if(!r.width||!r.height)return;let s=I(e),a=e.offsetWidth?r.width/e.offsetWidth:1,c=Math.abs(a-1)>.001?1/a:1;o.style.position="absolute",o.style.left=`${(i.left-r.left)*c}px`,o.style.top=`${(i.top-r.top)*c}px`,o.style.width=`${i.width}px`,o.style.height=`${i.height}px`,o.style.margin="0",o.style.filter=n,c!==1&&(o.style.transform=`scale(${c})`,o.style.transformOrigin="top left");let f=document.createElement("div");f.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",f.appendChild(o);let l=document.createElement("div");l.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",l.style.backgroundColor=s.backgroundColor,l.style.backgroundImage=t.style.backgroundImage||s.backgroundImage;for(let u of["background-size","background-position","background-repeat","background-origin","background-clip"])l.style.setProperty(u,s.getPropertyValue(u));t.style.setProperty("background-color","transparent","important"),t.style.setProperty("background-image","none","important"),t.style.setProperty("backdrop-filter","none","important"),t.style.setProperty("-webkit-backdrop-filter","none","important"),s.position==="static"&&(t.style.position="relative"),t.style.isolation="isolate",t.prepend(l),t.prepend(f)}var eo=128;function ad(t,e,n,o){let i=[[t,e]];for(;i.length;){let[r,s]=i.pop(),a=o.get(s);if(a?.nodeType===1){let l=a.getBoundingClientRect();(l.left>n.right+eo||l.right<n.left-eo||l.top>n.bottom+eo||l.bottom<n.top-eo)&&(r.tagName==="IMG"&&r.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),r.style&&(r.style.backgroundImage="none"))}let c=r.children,f=s.children;for(let l=0;l<c.length;l++)i.push([c[l],f[l]])}}function cd(t,e){let n=[];for(let o=e;o!==t;o=o.parentElement){if(!o?.parentElement)return null;n.push([...o.parentElement.children].indexOf(o))}return n.reverse()}function _a(t,e){if(!e)return null;let n=t;for(let o of e)if(n=n.children[o],!n)return null;return n}function ld(t){if(t)for(let e=t;e&&e.parentNode;){let n=e.parentNode;for(;e.nextSibling;)e.nextSibling.remove();e===t&&e.remove(),e=n}}vt();mt();wt();wt();function Rr(t){return fi(t),{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map,warnings:[]}}ce();function oo(t,e){if(!t)return()=>{};let n=[],o=200;function i(r){if(e){let f=r.getBoundingClientRect();if(f.width>0||f.height>0){let l=Math.max(f.right,f.left+(r.scrollWidth||0)),u=Math.max(f.bottom,f.top+(r.scrollHeight||0));if(l<e.left-o||f.left>e.right+o||u<e.top-o||f.top>e.bottom+o)return}}let s=getComputedStyle(r),a=fd(r,s);a&&n.push(a);let c=ud(r,s);c&&n.push(c);for(let f of r.children||[])i(f)}return i(t),()=>n.forEach(r=>r())}function fd(t,e){if(!t)return()=>{};e=e||getComputedStyle(t);let n=dd(e);if(n<=0)return()=>{};if(!Ta(t))return()=>{};let o=Fa(t),i=o.text,r=hd(e);o.write("X");let s=t.scrollHeight-r;o.restore();let a=s>0?s:pd(e),c=Math.round(a*n+r),f=.5*(n+1);if(t.scrollHeight<=c+f)return()=>{};let l=0,u=i.length,d=-1;for(;l<=u;){let m=l+u>>1;o.write(i.slice(0,no(i,m))+"\u2026"),t.scrollHeight<=c+f?(d=m,l=m+1):u=m-1}let h=(d>=0?i.slice(0,no(i,d)):"")+"\u2026";return o.write(h),Ra(t,h,o)}function ud(t,e){if(!t)return()=>{};if(e=e||getComputedStyle(t),e.textOverflow!=="ellipsis")return()=>{};if(e.whiteSpace!=="nowrap"&&e.whiteSpace!=="pre")return()=>{};if(e.overflowX!=="hidden"&&e.overflowX!=="clip")return()=>{};if(!Ta(t))return()=>{};if(t.scrollWidth<=t.clientWidth+.5)return()=>{};let n=Fa(t),o=n.text,i=0,r=o.length,s=-1;for(;i<=r;){let c=i+r>>1;n.write(o.slice(0,no(o,c))+"\u2026"),t.scrollWidth<=t.clientWidth+.5?(s=c,i=c+1):r=c-1}let a=(s>=0?o.slice(0,no(o,s)):"")+"\u2026";return n.write(a),Ra(t,a,n)}function Ra(t,e,n){return()=>{t.textContent===e&&n.restore()}}function Fa(t){let e=[];for(let o=t.firstChild;o;o=o.nextSibling)o.nodeType===Node.TEXT_NODE&&e.push(o);let n=e.map(o=>o.data);return{text:n.join(""),write(o){e[0].data=o;for(let i=1;i<e.length;i++)e[i].data=""},restore(){for(let o=0;o<e.length;o++)e[o].data=n[o]}}}function no(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e-1);return n>=55296&&n<=56319?e-1:e}function dd(t){let e=t.getPropertyValue("-webkit-line-clamp")||t.getPropertyValue("line-clamp");e=(e||"").trim();let n=parseInt(e,10);return Number.isFinite(n)&&n>0?n:0}function pd(t){let e=(t.lineHeight||"").trim(),n=parseFloat(t.fontSize)||16;return!e||e==="normal"?Math.round(n*1.2):e.endsWith("px")?parseFloat(e):/^\d+(\.\d+)?$/.test(e)?Math.round(parseFloat(e)*n):e.endsWith("%")?Math.round(parseFloat(e)/100*n):Math.round(n*1.2)}function hd(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function Ta(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var Be=["clone","render"],mn={clone:0,render:1},gt="render";function Pa(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];if(!e.length)return{stage:gt,loweredBy:[]};let n=-1,o=[];for(let r of e){if(!r||typeof r!="object")continue;let s=r.needs===void 0?gt:r.needs;if(!Object.prototype.hasOwnProperty.call(mn,s))throw new Error(`[SnapDOM] Plugin '${r.name||"(unnamed)"}' declares needs: ${JSON.stringify(s)}, expected one of ${Be.join(", ")}.`);o.push({name:r.name||"(unnamed)",needs:s}),n=Math.max(n,mn[s])}if(n<0)return{stage:gt,loweredBy:[]};let i=Be[n];return{loweredBy:i===gt?[]:o.filter(r=>r.needs===i).map(r=>r.name),stage:i}}function Ue(t,e){return mn[t]>=mn[e]}function $a(t,e,n=Be){let o=n[n.length-1];if(e==null)return o;if(!Object.prototype.hasOwnProperty.call(mn,e))throw new Error(`[SnapDOM] ${t}: needs must be one of ${Be.join(", ")}, got ${JSON.stringify(e)}.`);if(!n.includes(e))throw new Error(`[SnapDOM] ${t} cannot run at stage '${e}'; it supports ${n.join(", ")}.`);return e}function Na(t,e,n){let o=e.length?e.map(i=>`'${i}'`).join(", "):"the attached plugins";return new Error(`[SnapDOM] No ${n}: this capture stopped at '${t}' because ${o} asked for needs: '${t}'. It is not re-captured, since that would be a different instant. Ask the plugin for needs: 'render', or capture without it.`)}var ze=[];function He(t){if(!t)return null;if(Array.isArray(t)){let[e,n]=t;return typeof e=="function"?e(n):e}if(typeof t=="object"&&"plugin"in t){let{plugin:e,options:n}=t;return typeof e=="function"?e(n):e}return typeof t=="function"?t():t}function Fr(...t){let e=t.flat();for(let n of e){let o=He(n);if(o){if(o.needs!==void 0&&o.needs!==gt)throw new Error(`[SnapDOM] '${o.name||"(unnamed)"}' declares needs: ${JSON.stringify(o.needs)}, so it can't be a global plugin (it would stop every capture before '${gt}'). Pass it per capture: snapdom(el, { plugins: [...] }).`);ze.some(i=>i&&i.name&&o.name&&i.name===o.name)||ze.push(o)}}}function La(t){return t&&Array.isArray(t.plugins)?t.plugins:ze}async function zt(t,e,n){let o=n,i=La(e);for(let r of i){let s=r&&typeof r[t]=="function"?r[t]:null;if(!s)continue;let a=await s(e,o);typeof a<"u"&&(o=a)}return o}async function ro(t,e,n){let o=[],i=La(e);for(let r of i){let s=r&&typeof r[t]=="function"?r[t]:null;if(!s)continue;let a=await s(e,n);typeof a<"u"&&o.push(a)}return o}function md(){ze.length=0}var gd=0;function yd(t){let e=[];if(Array.isArray(t))for(let n of t){let o=He(n);if(!o)continue;o.name||(o.name=`anonymous-${++gd}`);let i=e.findIndex(r=>r&&r.name===o.name);i>=0&&e.splice(i,1),e.push(o)}for(let n of ze)n&&n.name&&!e.some(o=>o.name===n.name)&&e.push(n);return Object.freeze(e)}function Ia(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=yd(e)),t}function Tr(){return ze.slice()}var bd=["resolveNode","beforeSnap","beforeClone","afterClone","beforeRender","afterRender"];function io(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];for(let n of e){let o=He(n);if(!(!o||o.pure===!0)){for(let i of bd)if(typeof o[i]=="function")return!0}}return!1}wt();Ae();var ge="data-snapdom-asset",Ba="http://www.w3.org/1999/xlink",wd=0;function ao(t,e,n,o,i,r){let s=r.__compressedAssets||=new WeakMap,a=s.get(t);a||(a={token:String(++wd),properties:[]},s.set(t,a),t.setAttribute(ge,a.token));let c=a.properties.find(f=>f.kind===e&&f.name===n);c?(c.compressed!==o&&(c.original=o),c.compressed=i):a.properties.push({kind:e,name:n,original:o,compressed:i})}var Ua=(t,e)=>e.kind==="style"?t.style?.getPropertyValue(e.name):t.getAttribute(e.name);function co(t,e){let n=new Map;if(!t||!e)return n;let o=[t,...t.querySelectorAll(`[${ge}]`)];for(let i of o){let r=e.get(i);if(!r||i.getAttribute(ge)!==r.token)continue;let s=r.properties.filter(a=>Ua(i,a)===a.compressed).map(a=>Object.freeze({...a}));s.length&&n.set(r.token,Object.freeze(s))}return n}function lo(t,e){if(!t||!e)return;let n=0;for(let o of[t,...t.querySelectorAll(`[${ge}]`)]){let i=e.get(o);i&&(i.token=String(++n),o.setAttribute(ge,i.token))}}function za(t,e){if(!e?.size||typeof t!="string"||!t.startsWith("data:image/svg+xml"))return t;let n=t.indexOf(","),o=new DOMParser().parseFromString(decodeURIComponent(t.slice(n+1)),"image/svg+xml");if(o.querySelector("parsererror"))return t;let i=!1;for(let r of o.querySelectorAll(`[${ge}]`))for(let s of e.get(r.getAttribute(ge))||[])Ua(r,s)===s.compressed&&(s.kind==="style"?r.style.setProperty(s.name,s.original,r.style.getPropertyPriority(s.name)):s.name==="xlink:href"?r.setAttributeNS(Ba,s.name,s.original):r.setAttribute(s.name,s.original),i=!0);return i?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(o))}`:t}function Oa(t){if(t.is2D===!1)return 1/0;let e=t.a*t.a+t.b*t.b+t.c*t.c+t.d*t.d,n=t.a*t.d-t.b*t.c;return Math.sqrt((e+Math.sqrt(Math.max(0,e*e-4*n*n)))/2)}function Pr(t,e){let n=e.element||t,o=n.isConnected?I(n):n.style,i=e.__compressionClip,r=(h,m)=>{try{return h[m]?.baseVal?.value||0}catch{return 0}},s=i?.width||n.offsetWidth||parseFloat(o?.width)||r(n,"width"),a=i?.height||n.offsetHeight||parseFloat(o?.height)||r(n,"height"),c=Number.isFinite(e.width),f=Number.isFinite(e.height);if(!i&&(c||f)&&s&&a)try{let h=e.outerTransforms===!1&&e.__compressionRootTransform?e.__compressionRootTransform:ee({baseTransform:o?.transform,rotate:o?.rotate,scale:o?.scale,width:s,height:a});if(h.is2D===!1)s=0,a=0;else{let m=Math.abs(h.a)*s+Math.abs(h.c)*a,p=Math.abs(h.b)*s+Math.abs(h.d)*a;s=Math.min(s,m),a=Math.min(a,p)}}catch{s=0,a=0}let l=(c||f?Math.max(c?s?e.width/s:1/0:0,f?a?e.height/a:1/0:0):e.scale||1)*(e.dpr||1);e.__compressionDensity=l;let u=new WeakMap,d=h=>{if(!h||h.nodeType!==1)return 1;if(u.has(h))return u.get(h);let m=h.isConnected?I(h):h.style,p=1;try{m?.perspective&&m.perspective!=="none"&&(p=1/0);let g=m?.transform;if(g&&g!=="none")p*=Oa(new DOMMatrix(g));else if(h.transform?.baseVal?.numberOfItems){let y=new DOMMatrix;for(let b=0;b<h.transform.baseVal.numberOfItems;b++){let w=h.transform.baseVal.getItem(b).matrix;y=y.multiply(new DOMMatrix([w.a,w.b,w.c,w.d,w.e,w.f]))}p*=Oa(y)}if(m?.scale&&m.scale!=="none"){let y=m.scale.trim().split(/\s+/).map(b=>parseFloat(b)/(b.endsWith("%")?100:1));p*=Math.max(...y.map(Math.abs))}if(h!==n&&m?.zoom&&m.zoom!=="normal"&&(p*=parseFloat(m.zoom)||1),h.localName==="svg"&&h.viewBox?.baseVal?.width>0&&h.viewBox.baseVal.height>0){let y=h.viewBox.baseVal,b=C=>/^\d+(?:\.\d+)?px$/.test(m?.[C]||"")?parseFloat(m[C]):r(h,C),w=b("width"),S=b("height");p*=w>0&&S>0?Math.max(w/y.width,S/y.height):1/0}}catch{p=1/0}return Number.isFinite(p)||(p=1/0),h!==n&&(p*=d(h.parentElement||h.getRootNode?.().host)),u.set(h,p),p};return{density:l,stretch:d}}var Ha=.92,ja=1;async function xd(t){let e=new Image;return e.decoding="sync",e.src=t,typeof e.decode=="function"?(await e.decode(),e):(await new Promise((n,o)=>{e.onload=()=>n(),e.onerror=o}),e)}function Sd(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}var vd=64*1024,Da=32*1024*1024,so=new Map;function Cd(t,e,n,o){if(n.length+(o?.length||0)>Da)return;t.set(e,{source:n,result:o});let i=0;for(let r of t.values())i+=r.source.length+(r.result?.length||0);for(;i>Da;){let r=t.keys().next().value,s=t.get(r);i-=s.source.length+(s.result?.length||0),t.delete(r)}}function kd(t,e){let n=t.indexOf(",");if(n<0||!/;base64/i.test(t.slice(0,n)))return null;let o=Math.ceil(e/3)*4,i=t.length-n-1,r=Math.min(i,o);try{let s=atob(t.slice(n+1,n+1+r-r%4)),a=new Uint8Array(s.length);for(let c=0;c<s.length;c++)a[c]=s.charCodeAt(c);return a}catch{return null}}function Md(t){let e=kd(t,4096);if(!e||e.length<16)return null;let n=o=>e[o]<<8|e[o+1];if(e[0]===137&&e[1]===80&&e.length>=24)return{w:(e[16]<<24|e[17]<<16|e[18]<<8|e[19])>>>0,h:(e[20]<<24|e[21]<<16|e[22]<<8|e[23])>>>0};if(e[0]===71&&e[1]===73&&e[2]===70)return{w:e[6]|e[7]<<8,h:e[8]|e[9]<<8};if(e[0]===82&&e[1]===73&&e[8]===87&&e.length>=30){let o=e[15];if(o===32&&e[23]===157)return{w:(e[26]|e[27]<<8)&16383,h:(e[28]|e[29]<<8)&16383};if(o===76)return{w:(e[21]|(e[22]&63)<<8)+1,h:((e[22]>>6|e[23]<<2|(e[24]&15)<<10)&16383)+1};if(o===88)return{w:(e[24]|e[25]<<8|e[26]<<16)+1,h:(e[27]|e[28]<<8|e[29]<<16)+1}}if(e[0]===255&&e[1]===216){let o=2;for(;o+9<e.length;){if(e[o]!==255){o++;continue}let i=e[o+1];if(i===216||i===1||i>=208&&i<=215){o+=2;continue}if(i>=192&&i<=207&&i!==196&&i!==200&&i!==204)return{h:n(o+5),w:n(o+7)};let r=n(o+2);if(r<2)break;o+=2+r}}return null}function Wa(t,e,n,o){let i=Math.min(1,Math.max(n/t,o/e));return!(i>0)||i>=.95?0:i}var Ad=`self.onmessage = async (e) => {
var yc=Object.defineProperty;var at=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(o){throw n=[o],o}};var pe=(t,e)=>{for(var n in e)yc(t,n,{get:e[n],enumerable:!0})};function Ai(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function _i(t="soft"){t==="disabled"&&(H.computedStyle=new WeakMap,H.measureHints=new WeakMap,H.baseStyle=new ct(50),H.defaultStyle=new ct(64),H.image=new ct(100),H.background=new ct(100),H.resource=new ct(150),H.compress=new ct(50))}var ct,H,kt=at(()=>{"use strict";ct=class extends Map{constructor(e=100,...n){super(...n),this._maxSize=e}set(e,n){if(this.size>=this._maxSize&&!this.has(e)){let o=this.keys().next().value;o!==void 0&&this.delete(o)}return super.set(e,n)}},H={image:new ct(100),background:new ct(100),resource:new ct(150),defaultStyle:new ct(64),baseStyle:new ct(50),compress:new ct(50),computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function he(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function wc(t){let e=[],n=0,o=0,i="";for(let r=0;r<t.length;r++){let s=t[r];if(s==="\\"){r++;continue}i?s===i&&(i=""):s==='"'||s==="'"?i=s:s==="("?o++:s===")"?o--:s===","&&o===0&&(e.push(t.slice(n,r)),n=r+1)}return e.push(t.slice(n)),e}function ln(t,e=1){let n=t.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let o=[];for(let r of wc(n[1])){let s=r.match(/url\((['"]?)(.*?)(\1)\)/);if(!s)continue;let a=r.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(a&&!bc.test(a[1].trim()))continue;let l=r.replace(/url\((['"]?)[\s\S]*?\1\)/," ").match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)\b/i),u=1;if(l){let c=parseFloat(l[1]);u=/dpi/i.test(l[2])?c/96:c}o.push({url:s[2].trim(),dppx:u})}return o.length?(o.sort((r,s)=>r.dppx-s.dppx),(o.find(r=>r.dppx>=e)||o[o.length-1]).url):null}function zo(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,o)=>{let i=o.split(",").map(r=>r.trim());return i.length!==6?`matrix(${o})`:(i[4]="0",i[5]="0",`matrix(${i.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,o)=>{let i=o.split(",").map(r=>r.trim());return i.length!==16?`matrix3d(${o})`:(i[12]="0",i[13]="0",`matrix3d(${i.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function te(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function Ho(t,e){if(!t||/^(data|blob|about|#)/i.test(t.trim()))return t;try{let n=e||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(t,n).href}catch{return t}}function cn(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function jo(t){return"\u2022".repeat(String(t??"").length)}function st(t,e){return t?.nodeType===1&&t.localName===e}function Et(t){return t?.nodeType===1&&t.namespaceURI===xc}function It(t){return t?.nodeType===1&&t.namespaceURI===Sc}function Gt(t){return t?.nodeType===11&&!!t.host}function Wt(t){let e=t?.parentNode;return e?.nodeType===11?e.host:null}function Vo(t){return t?.nodeType===9}var Uo,bc,xc,Sc,Rt=at(()=>{"use strict";Uo=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,bc=Uo;xc="http://www.w3.org/1999/xhtml",Sc="http://www.w3.org/2000/svg"});function vc(t="[SnapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let o=new Map,i=0;function r(s,a,l){if(i>=n)return;let u=Date.now();(o.get(a)||0)>u||(o.set(a,u+e),i++,s==="warn"&&console&&console.warn?console.warn(`${t} ${l}`):console&&console.error&&console.error(`${t} ${l}`))}return{warnOnce(s,a){r("warn",s,a)},errorOnce(s,a){r("error",s,a)},reset(){o.clear(),i=0}}}function Fi(t,e,n){if(qt.size>=Ri){let o=Date.now();for(let[i,r]of qt)r.until<=o&&qt.delete(i);for(;qt.size>=Ri;)qt.delete(qt.keys().next().value)}qt.set(t,{until:Date.now()+n,result:e})}function Cc(t){return/^data:|^blob:|^about:blank$/i.test(t)}function kc(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=e.split(/\{url(?:Raw)?\}/)[0],i=new URL(o||".",n);if(new URL(t,n).origin===i.origin)return!0}catch{}return!1}function Mc(t,e){if(!e||Cc(t)||kc(t,e))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=new URL(t,n);return typeof location<"u"?o.origin!==location.origin:!0}catch{return!!e}}function Ac(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>te(t)).replace("{url}",()=>encodeURIComponent(t));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(t)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(t)}`;if(e.endsWith("/"))return`${e}${te(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function Ti(t){return new Promise((e,n)=>{let o=new FileReader;o.onload=()=>e(String(o.result||"").replace(/^data:[^,]*/,i=>i.replace(/\s+/g,""))),o.onerror=()=>n(new Error("read_failed")),o.readAsDataURL(t)})}function _c(t,e){return new Headers(e.headers||{}).keys().next().done?JSON.stringify([e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,e.credentials||"",t]):null}function $i(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function qo(t,e){try{t.onError?.(e)}catch{}}async function lt(t,e={}){let n=e.as??"blob",o=e.timeout??3e3,i=e.useProxy||"",r=e.errorTTL??8e3,s=e.headers||{},a=!!e.debug;if(/^data:/i.test(t))try{if(n==="text")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1,mime:String(t).slice(5).split(";")[0]||""};let[,g="",y=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(g)?atob(y):decodeURIComponent(y),S=new Uint8Array([...w].map(C=>C.charCodeAt(0))),k=new Blob([S],{type:(g||"").split(";")[0]||""});return{ok:!0,data:k,status:200,url:t,fromCache:!1,mime:k.type||""}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let g=await fetch(t);if(!g.ok)return{ok:!1,data:null,status:g.status,url:t,fromCache:!1,reason:"http_error"};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ti(y),blob:y,status:g.status,url:t,fromCache:!1,mime:b}:n==="text"?{ok:!0,data:await y.text(),status:g.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:t,fromCache:!1,mime:b}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let l;try{l=_c(t,{as:n,timeout:o,useProxy:i,errorTTL:r,credentials:e.credentials,headers:s})}catch{let g={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return qo(e,g),g}let u=qt.get(l);if(u&&u.until>Date.now())return{...u.result,fromCache:!0};u&&qt.delete(l);let c=Go.get(l);if(c)return c;let f=Mc(t,i)?Ac(t,i):t,d=e.credentials;if(!d)try{let g=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(t,g);d=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{d="omit"}let h=new AbortController,m=setTimeout(()=>h.abort("timeout"),o),p=(async()=>{try{let g=await fetch(f,{signal:h.signal,credentials:d,headers:s});if(!g.ok){let w={ok:!1,data:null,status:g.status,url:f,fromCache:!1,reason:"http_error"};if(l!==null&&r>0&&Fi(l,w,r),a){let S=`${g.status} ${g.statusText||""}`.trim();Ei.warnOnce(`http:${g.status}:${n}:${$i(t)}`,`Couldn't load ${t} (HTTP ${S}).`)}return qo(e,w),w}if(n==="text")return{ok:!0,data:await g.text(),status:g.status,url:f,fromCache:!1};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ti(y),blob:y,status:g.status,url:f,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:f,fromCache:!1,mime:b}}catch(g){let y=h.signal.aborted?h.signal.reason==="timeout"?"timeout":"abort":g&&typeof g=="object"&&g.name==="AbortError"?"abort":"network",b={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:y};if(l!==null&&!/^blob:/i.test(t)&&r>0&&Fi(l,b,r),a){let w=`${y}:${n}:${$i(t)}`,S=y==="timeout"?`Timed out loading ${t} after ${o}ms. Raise the timeout option or set useProxy.`:y==="abort"?`Loading ${t} was cancelled.`:`Couldn't load ${t} (network or CORS). Try the useProxy option.`;Ei.errorOnce(w,S)}return qo(e,b),b}finally{clearTimeout(m),Go.delete(l)}})();return l!==null&&Go.set(l,p),p}var Ei,Go,Ri,qt,me=at(()=>{"use strict";Rt();Ei=vc("[SnapDOM]",{ttlMs:3*6e4,maxEntries:10}),Go=new Map,Ri=50,qt=new Map});async function Te(t,e={}){if(/^\s*url\(\s*['"]?data:/i.test(t)||/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let o=ln(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??he(t);if(!o)return t;let i=Ho(o),r=te(i),s=(e.useProxy||"")+"|"+r;if(H.background.has(s)){let a=H.background.get(s);return a?`url("${a}")`:"none"}try{let a=await lt(r,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});return a.ok?(H.background.set(s,a.data),`url("${a.data}")`):(H.background.set(s,null),"none")}catch{return H.background.set(s,null),"none"}}var Pi=at(()=>{"use strict";kt();Rt();me()});function Ii(t,e){if(Ec.has(e))t.add(e);else if(e.startsWith("transform-origin-"))t.add("transform-origin");else return!1;return!0}function Di(t){let e=t.replace(Pc,"").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function Bi(t,e,n,o){for(let i=0;i<t.length;i++){if(--o.budget<0)return!1;let r=t[i],s=r.style,a=!1,l=!1;if(s){let c=!!r.selectorText&&Wi.test(r.selectorText);for(let f=0;f<s.length;f++){let d=s[f];if(e.add(d),o.svgGeometry&&(Ii(o.svgGeometry,d)?a=!0:Rc.test(d)&&(l=!0)),c&&o.pseudoProps.add(d),s.getPropertyPriority(d)&&o.importantProps.add(d),d.length>5&&(d[0]==="m"||d[0]==="p")){let h=d.startsWith("margin")?"marginUnstable":d.startsWith("padding")?"paddingUnstable":null;h&&!o[h]&&$c.test(s.getPropertyValue(d))&&(o[h]=!0)}}}let u=r.selectorText;if(u&&u.includes(":has(")&&(o.usesHas=!0),u&&/[+~]|:has\(|:nth-(?:last-)?child\([^)]*\bof\b/i.test(u)&&(o.leaksAcrossSubtrees=!0),s&&(s.counterReset||s.counterIncrement||s.counterSet||s.content&&s.content.includes("counter"))&&(o.leaksAcrossSubtrees=!0),u&&u.includes("&"))for(let c=r.parentRule;c&&u.includes("&");c=c.parentRule)c.selectorText&&(u=u.replace(/&/g,`:is(${c.selectorText})`));if(u&&(o.inContainer||Li.test(u)||u.includes("+")||u.includes("~")))for(let c of Pn(u,",")){let f=c.trim();f&&(o.inContainer||Li.test(f)||f.includes("+")||f.includes("~"))&&o.shareUnsafeSels.add(f)}if((a||l)&&Nc(r,u,a,o),u&&u.includes(":"))for(let c in Ni)Ni[c].test(u)&&n[c].push(Di(u));if(r.styleSheet){if(!$n(r.styleSheet,e,n,o))return!1}else if(r.cssRules&&r.cssRules.length){let c=r.constructor?.name==="CSSContainerRule",f=r.constructor?.name==="CSSScopeRule";c&&o.inContainer++,f&&(o.inScope=(o.inScope||0)+1);let d=Bi(r.cssRules,e,n,o);if(c&&o.inContainer--,f&&o.inScope--,!d)return!1}}return!0}function Nc(t,e,n,o){if(n&&t.constructor?.name==="CSSKeyframeRule"){o.svgKeyframes=!0;return}if(!e||o.inScope){n&&(o.svgGeometryAll=!0);return}let i=n?o.svgGeometrySels:o.svgAnimSels;for(let r of Pn(e,",")){let s=r.trim();s&&i.add(Wi.test(s)?Di(s):s)}}function $n(t,e,n,o){let i;try{i=t.cssRules}catch{i=o.crossOriginRules?.(t)}return i?Bi(i,e,n,o):!1}function Yo(t,e){for(let n of t){let o=n.effect?.getKeyframes?.()||[];for(let i of o)for(let r of Object.keys(i))r==="offset"||r==="easing"||r==="composite"||r==="computedOffset"||e.add(r.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function Ui(t){let e=new Set;return $n(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:Oi,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function Pn(t,e){if(!t.includes(e))return[t];let n=[],o=0,i=null,r=0;for(let s=0;s<t.length;s++){let a=t[s];if(a==="\\"){s++;continue}if(i){a===i&&(i=null);continue}a==='"'||a==="'"?i=a:a==="("||a==="["?o++:a===")"||a==="]"?o--:o===0&&a===e&&(n.push(t.slice(r,s)),r=s+1)}return n.push(t.slice(r)),n}function Lc(t){let e=0,n=null,o=0;for(let c=0;c<t.length;c++){let f=t[c];if(n){f===n&&t[c-1]!=="\\"&&(n=null);continue}f==='"'||f==="'"?n=f:f==="("||f==="["?e++:f===")"||f==="]"?e--:e===0&&(f===" "||f===">"||f==="+"||f==="~")&&(o=c+1)}let i="",r=0;for(let c of t.slice(o))c==="("||c==="["?r++:c===")"||c==="]"?r--:r===0&&(i+=c);let s=c=>!c||/\\[0-9a-fA-F]/.test(c)?null:c.replace(/\\(.)/g,"$1"),a=s((i.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let l=s((i.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(l)return"i"+l;let u=(i.match(/^([a-zA-Z][\w-]*)/)||[])[1];return u?"t"+u.toLowerCase():null}function zi(t,e){if(!e.length)return"";if(e.some(o=>o.includes("&")))return null;let n=e.join(",");try{return t.matches(n),n}catch{return null}}function Ic(t,e){let n=t.createElement("div"),o={};for(let i in e){let r=e[i];(i==="before"||i==="after")&&r.push("q"),o[i]=zi(n,r)}return o}function Hi(t,e){let n={universe:null,pseudoUniverse:null,svgGeometry:null,svgGeometrySel:null,usesHas:!0,leaksAcrossSubtrees:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let o=new Set(Xo),i={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},r={budget:Oi,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set,svgGeometry:new Set,svgGeometrySels:new Set,svgAnimSels:new Set,svgKeyframes:!1,svgGeometryAll:!1,inScope:0,crossOriginRules:e};for(let f of t.styleSheets)if(!$n(f,o,i,r))return n;let s=t.adoptedStyleSheets;if(Array.isArray(s)){for(let f of s)if(!$n(f,o,i,r))return n}if(typeof t.getAnimations=="function"){let f=new Set;Yo(t.getAnimations(),f);for(let d of f)o.add(d),Ii(r.svgGeometry,d)&&(r.svgGeometryAll=!0)}if(r.svgKeyframes)for(let f of r.svgAnimSels)r.svgGeometrySels.add(f);let a=r.svgGeometryAll?null:Array.from(r.svgGeometrySels).join(","),l=Array.from(r.shareUnsafeSels),u=zi(t.createElement("div"),l)===null?null:l.map(f=>({sel:f,key:Lc(f)})),c=new Set(Tc);for(let f of Fc)o.has(f)&&c.add(f);for(let f of r.pseudoProps)c.add(f);return(r.pseudoProps.has("transform")||r.pseudoProps.has("rotate")||r.pseudoProps.has("scale"))&&c.add("transform-origin"),r.pseudoProps.has("perspective")&&c.add("perspective-origin"),{universe:o,pseudoUniverse:c,svgGeometry:r.svgGeometry,svgGeometrySel:a,pseudoGates:Ic(t,i),usesHas:r.usesHas,leaksAcrossSubtrees:r.leaksAcrossSubtrees,shareGate:u,marginUnstable:r.marginUnstable,paddingUnstable:r.paddingUnstable,importantProps:r.importantProps}}catch{return n}}var Ec,Rc,Xo,Fc,Tc,Wi,Oi,$c,Ni,Pc,Li,Nn=at(()=>{"use strict";Ec=new Set(["r","cx","cy","rx","ry","x","y","width","height","d","transform","translate","rotate","scale","transform-origin","transform-box","vector-effect"]);Rc=/^(?:animation|transition)/,Xo=["display","position","top","right","bottom","left","float","clear","z-index","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","visibility","opacity","content-visibility","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","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","order","align-items","align-self","align-content","justify-content","justify-items","justify-self","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-auto-flow","grid-auto-columns","grid-auto-rows","grid-column-start","grid-column-end","grid-row-start","grid-row-end","color","font-family","font-size","font-weight","font-style","font-stretch","line-height","letter-spacing","word-spacing","white-space","text-align","text-transform","text-indent","text-overflow","text-shadow","direction","unicode-bidi","writing-mode","text-orientation","word-break","overflow-wrap","tab-size","list-style-type","list-style-position","list-style-image","counter-reset","counter-increment","counter-set","background-color","background-image","background-size","background-position","background-repeat","background-clip","background-origin","background-attachment","box-shadow","outline-width","outline-style","outline-color","outline-offset","transform","transform-origin","rotate","scale","translate","filter","mix-blend-mode","clip-path","object-fit","object-position","border-collapse","border-spacing","table-layout","caption-side","empty-cells"],Fc=["color","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-kerning","font-feature-settings","font-variation-settings","line-height","letter-spacing","word-spacing","white-space","text-align","text-align-last","text-indent","text-transform","text-shadow","text-rendering","direction","unicode-bidi","word-break","overflow-wrap","writing-mode","text-orientation","hyphens","tab-size","visibility","list-style-type","list-style-position","list-style-image","border-collapse","border-spacing","caption-side","empty-cells","quotes","color-scheme","-webkit-text-fill-color","-webkit-font-smoothing","image-rendering"],Tc=["display","width","height","min-width","min-height"],Wi=/::?(?:before|after|first-letter|first-line|marker)/,Oi=2e4,$c=/%|\bauto\b|calc\(|var\(/i,Ni={before:/::?before\b/,after:/::?after\b/,firstLetter:/::?first-letter\b/,marker:/::marker\b/,firstLine:/::?first-line\b/},Pc=/::?(?:before|after|first-letter|first-line|marker)\b/g;Li=/:(nth-|first-child|last-child|only-|first-of-type|last-of-type|empty|hover|focus|active|target|checked|indeterminate|disabled|enabled|read-only|read-write|placeholder-shown|autofill|valid|invalid|user-valid|user-invalid|in-range|out-of-range|required|optional|default|link|any-link|scope|defined|modal|fullscreen|picture-in-picture|playing|paused|dir\(|lang\(|has\()/});function tt(t){return ji.add(t),t.setAttribute("data-snapdom-internal",""),t}function ee(t){return ji.has(t)}var ji,Ft=at(()=>{"use strict";ji=new WeakSet});function Jo(t){if(t=String(t).toLowerCase(),fn.has(t)){let r={};return H.defaultStyle.set(t,r),r}if(H.defaultStyle.has(t))return H.defaultStyle.get(t);let e=[...document.querySelectorAll("#snapdom-sandbox")].find(ee);e||(e=document.createElement("div"),tt(e),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t.includes("-")?"span":t);n.style.all="initial",e.appendChild(n);let o=getComputedStyle(n),i={};for(let r of o){if($e(r))continue;let s=o.getPropertyValue(r);i[r]=s}for(let r of Xo)!(r in i)&&!$e(r)&&(i[r]=o.getPropertyValue(r));return e.removeChild(n),H.defaultStyle.set(t,i),i}function $e(t){let e=Vi.get(t);if(e===void 0){let n=String(t).toLowerCase();e=Dc.has(n)||Oc.test(n)||Wc.test(n),Vi.set(t,e)}return e}function Xi(t,e){let n=jc.get(t);if(n===void 0||e[n]!==e[t])return!1;let o=e["writing-mode"];if(o&&o!=="horizontal-tb")return!1;let i=e.direction;return!(i&&i!=="ltr")}function Ln(t,e){return!Uc.has(t)&&(e==="inline"||Bc.has(t)||qi.has(t))}function Qo(t,e,n){let o=(e.display||"").toLowerCase();if(o==="inline"||qi.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let r=(e.position||"static").toLowerCase();return r==="absolute"||r==="fixed"?!1:!Gc.has(o)}function Pe(t,e,n=!0,o=!1){if(e=String(e||"").toLowerCase(),fn.has(e))return"";let i=[],r=Jo(e),s=(t.display||"").toLowerCase(),a=s==="inline",l=Ln(e,s),u=t["text-wrap-mode"]||t["white-space"]||"",c=u==="nowrap"||u==="pre",d=l&&n&&!(l&&n&&!a&&c),h=!1;for(let m in t){if($e(m)||Xi(m,t))continue;let p=t[m];if(!(Gi.has(m)&&zc.has(e))){if(d){if(Gi.has(m))continue;if(Hc.has(m)){p&&p!==r[m]&&(i.push(`${m}:${p}`),p!=="auto"&&(h=!0));continue}}if(p&&p!==r[m]){if((m==="height"||m==="block-size"||!c&&(m==="width"||m==="inline-size"))&&p.endsWith("px")&&p.includes(".")){let y=parseFloat(p);if(Number.isFinite(y)){i.push(`${m}:${(y+Vc).toFixed(3)}px`);continue}}i.push(`${m}:${p}`)}}}if(d&&!a&&!o&&!h){let m=t.width;m&&m!=="auto"&&m!==r.width&&i.push(`min-width:${m}`)}return i.sort(),i.join(";")}function Zo(t){let e=new Set;return t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(t.tagName&&e.add(t.tagName.toLowerCase()),typeof t.querySelectorAll=="function"&&t.querySelectorAll("*").forEach(n=>e.add(n.tagName.toLowerCase())),Array.from(e))}function tr(t,e=null){let n=new Map;for(let s of t){let a=Jo(s);if(!a)continue;let c=(e?Object.entries(a).filter(([d])=>e.has(d)):Object.entries(a)).filter(([d])=>!Xi(d,a)).map(([d,h])=>`${d}:${h};`).sort(),f=c.join("");f&&(n.has(f)||n.set(f,{tagList:[],declarations:c}),n.get(f).tagList.push(s))}let o=[...n.values()],i=null;for(let{declarations:s}of o){let a=new Set(s);if(!i){i=a;continue}for(let l of i)a.has(l)||i.delete(l)}i??=new Set;let r="";if(i.size&&o.length>1){let s=o.flatMap(a=>a.tagList);r+=`${s.join(",")} { ${[...i].join("")} }
`}for(let{tagList:s,declarations:a}of o){let l=o.length>1?a.filter(c=>!i.has(c)):a;if(!l.length)continue;let u=l.join("");r+=`${s.join(",")} { ${u} }
`}return r}function un(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,o=1;for(let i of e)n.set(i,`c${o++}`);return n}function qc(t){try{let e=t?.ownerDocument;if(!e)return typeof window<"u"?window:null;let n=e.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let o=0;o<window.frames.length;o++)try{if(window.frames[o]?.document===e)return window.frames[o]}catch{}}catch{}return typeof window<"u"?window:null}function D(t,e=null){let n=()=>{let r={length:0,getPropertyValue:()=>"",item:()=>""};return r[Symbol.iterator]=function*(){},r};if(t?.nodeType!==1){let r=typeof window<"u"?window:null;if(r&&typeof r.getComputedStyle=="function")try{return r.getComputedStyle(t,e)||n()}catch{return n()}return n()}let o=H.computedStyle.get(t);o||(o=new Map,H.computedStyle.set(t,o));let i=o.get(e);if(!i){let r=qc(t),s=null;try{s=r&&typeof r.getComputedStyle=="function"?r.getComputedStyle(t,e):null}catch{}if(!s&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(s=window.getComputedStyle(t,e))}catch{}i=s||n(),o.set(e,i)}return i}function Ne(t,e=null){let n={};for(let o of e||t){let i=t.getPropertyValue(o);i&&(n[o]=i)}for(let o of Xc){let i=n[`border-${o}-style`],r=n[`border-${o}-width`];(i==="none"||i==="hidden"||r==="0px")&&(delete n[`border-${o}-style`],delete n[`border-${o}-width`],delete n[`border-${o}-color`])}return n}function ne(t){let e=[],n=0,o=0;for(let i=0;i<t.length;i++){let r=t[i];r==="("&&n++,r===")"&&n--,r===","&&n===0&&(e.push(t.slice(o,i).trim()),o=i+1)}return e.push(t.slice(o).trim()),e}var Ko,fn,Wc,Oc,Dc,Vi,Bc,qi,Uc,Gi,zc,Hc,jc,Vc,Gc,Xc,Le=at(()=>{"use strict";kt();Nn();Ft();Ko=new Set(["meta","script","noscript","title","link","template"]),fn=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]);Wc=/(?:^|-)(animation|transition)(?:-|$)/i,Oc=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Dc=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),Vi=new Map;Bc=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),qi=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Uc=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Gi=new Set(["width","max-width","inline-size","max-inline-size"]),zc=new Set(["mi","mn","mo","ms","mtext"]),Hc=new Set(["min-width","min-inline-size"]),jc=new Map(Object.entries({"block-size":"height","inline-size":"width","min-block-size":"min-height","min-inline-size":"min-width","max-block-size":"max-height","max-inline-size":"max-width","margin-block-start":"margin-top","margin-block-end":"margin-bottom","margin-inline-start":"margin-left","margin-inline-end":"margin-right","padding-block-start":"padding-top","padding-block-end":"padding-bottom","padding-inline-start":"padding-left","padding-inline-end":"padding-right","inset-block-start":"top","inset-block-end":"bottom","inset-inline-start":"left","inset-inline-end":"right","border-block-start-width":"border-top-width","border-block-start-style":"border-top-style","border-block-start-color":"border-top-color","border-block-end-width":"border-bottom-width","border-block-end-style":"border-bottom-style","border-block-end-color":"border-bottom-color","border-inline-start-width":"border-left-width","border-inline-start-style":"border-left-style","border-inline-start-color":"border-left-color","border-inline-end-width":"border-right-width","border-inline-end-style":"border-right-style","border-inline-end-color":"border-right-color","border-start-start-radius":"border-top-left-radius","border-start-end-radius":"border-top-right-radius","border-end-start-radius":"border-bottom-left-radius","border-end-end-radius":"border-bottom-right-radius","overflow-block":"overflow-y","overflow-inline":"overflow-x","overscroll-behavior-block":"overscroll-behavior-y","overscroll-behavior-inline":"overscroll-behavior-x","contain-intrinsic-block-size":"contain-intrinsic-height","contain-intrinsic-inline-size":"contain-intrinsic-width"}));Vc=.001;Gc=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]);Xc=["top","right","bottom","left"]});function wt(t=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(e=>{let n=!1,o=()=>{n||(n=!0,e())};try{requestAnimationFrame(o)}catch{o();return}setTimeout(o,t)})}function Ki(t){if(t!==!1&&t!=="auto")return null;let e=performance.now()+(t==="auto"?Yc:Yi),n=null,o={yielded:!1,due:()=>performance.now()>=e,pause:()=>n||(n=new Promise(i=>{let r=()=>{n=null,o.yielded=!0,e=performance.now()+Yi,i()},s=new MessageChannel;s.port1.onmessage=r,s.port2.postMessage(0)}))};return o}function dn(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let t=navigator.userAgent||"",e=/iPhone|iPad|iPod/.test(t),n=navigator.maxTouchPoints>2&&/Macintosh/.test(t);return e||n}function Y(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"",e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),o=/applewebkit/i.test(t),i=/mobile/i.test(t),r=!/safari/i.test(t),s=o&&i&&r,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),u=/ipad|iphone|ipod/.test(e)&&o;return n||s||a||l||u}function Mt(){return typeof navigator>"u"?!1:(navigator.userAgent||"").toLowerCase().includes("firefox")}var Yi,Yc,gt=at(()=>{"use strict";Yi=16,Yc=40});function W(t,e,n){let o=t&&typeof t=="object"&&(t.options||t);o&&o.debug&&(n!==void 0?console.warn("[SnapDOM]",e,n):console.warn("[SnapDOM]",e))}function nt(t,e,n,o){let i=t&&t.warnings;i&&i.length<Kc&&i.push(o===void 0?{code:e,message:n}:{code:e,message:n,detail:o})}var Kc,xt=at(()=>{"use strict";Kc=50});var At=at(()=>{"use strict";Pi();Le();gt();Rt();xt()});var Gl={};pe(Gl,{MAX_RASTER_AREA:()=>fe,MAX_RASTER_SIDE:()=>zt,WEBP_MAX_SIDE:()=>pi,__setDecodeFrameIdleMs:()=>mh,cropSvgText:()=>$o,decodeSvgFromDataURL:()=>Me,encodeSvgToDataURL:()=>Ae,fixSafariShadows:()=>No,peekSvgHeader:()=>Po,toCanvas:()=>Yt});function rh(t,e){let n=e.__session;try{let o=t.match(/<svg\b[^>]*>/i);if(!o)return t;let i=o[0],r=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),s=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(s)||r<=0||s<=0)return t;let a=Math.min(1,zt/r,zt/s,Math.sqrt(fe/(r*s)));if(a>=1)return t;let l=Math.max(1,Math.floor(r*a)),u=Math.max(1,Math.floor(s*a));return nt(n,"raster-clamp",`capture ${Math.round(r)}x${Math.round(s)}px exceeds decode limits; downscaled to ${l}x${u}px`),W(e,`${Math.round(r)}\xD7${Math.round(s)}px is too large for the browser to draw; scaled down to ${l}\xD7${u}px. For full size, export ${typeof CompressionStream=="function"?"a PNG or JPEG":"a JPEG"} blob, an SVG, or crop.`),t.replace(i,i.replace(/(\bwidth=")[\d.]+/i,`$1${l}`).replace(/(\bheight=")[\d.]+/i,`$1${u}`))}catch{return t}}function $o(t,e,{shiftContent:n=Y()}={}){let o=["x","y","width","height"].map(M=>Number(e?.[M]));if(!o.every(Number.isFinite)||o[2]<=0||o[3]<=0)throw new RangeError("[SnapDOM] crop needs finite x/y and a positive width/height.");let i=t.match(/<svg\b[^>]*>/i);if(!i)throw new Error("[SnapDOM] Only SVG captures can be cropped.");let r=i[0],s=(r.match(/\bviewBox="([^"]+)"/i)||[])[1],a=String(s||"").trim().split(/[\s,]+/).map(Number);if(a.length!==4||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("[SnapDOM] Can't crop: the SVG has no valid viewBox.");let[l,u,c,f]=a,d=Math.max(l,o[0]),h=Math.max(u,o[1]),m=Math.min(l+c,o[0]+o[2]),p=Math.min(u+f,o[1]+o[3]);if(!(m>d)||!(p>h))throw new RangeError("[SnapDOM] The crop area does not intersect the capture.");let g=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),y=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]),b=Number.isFinite(g)&&g>0?g/c:1,w=Number.isFinite(y)&&y>0?y/f:1,S=Math.max(1,(m-d)*b),k=Math.max(1,(p-h)*w),C=r.replace(/(\bwidth=")[^"]*/i,`$1${S}`).replace(/(\bheight=")[^"]*/i,`$1${k}`),x=n?ih(t,r,d,h):null;if(x)return C.replace(/(\bviewBox=")[^"]*/i,(v,_)=>`${_}0 0 ${m-d} ${p-h}`)+x.slice(r.length);let A=C.replace(/(\bviewBox=")[^"]*/i,`$1${d} ${h} ${m-d} ${p-h}`);return t.replace(r,A)}function ih(t,e,n,o){if(!t.startsWith(e))return null;let i=/^\s*<foreignObject\b[^>]*>/i.exec(t.slice(e.length,e.length+2048));if(!i)return null;let r=i[0],s=(u,c,f)=>{let d=new RegExp(`(\\s${c}=")([^"]*)`),h=u.match(d),m=h?parseFloat(h[2]):0;return Number.isFinite(m)?h?u.replace(d,(p,g)=>`${g}${m-f}`):u.replace(/^(\s*<foreignObject\b)/i,(p,g)=>`${g} ${c}="${-f}"`):null},a=s(r,"x",n),l=a&&s(a,"y",o);return l?e+l+t.slice(e.length+r.length):null}function ci(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function Me(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function Po(t){let e=t.indexOf(",");if(e<0)return"";let n=t.slice(e+1,e+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}function Ae(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function zl(t){let e=[],n="",o=0;for(let i=0;i<t.length;i++){let r=t[i];r==="("&&o++,r===")"&&(o=Math.max(0,o-1)),r===";"&&o===0?(e.push(n),n=""):n+=r}return n.trim()&&e.push(n),e.map(i=>i.trim()).filter(Boolean)}function sh(t){let e=[],n="",o=0;for(let r=0;r<t.length;r++){let s=t[r];s==="("&&o++,s===")"&&(o=Math.max(0,o-1)),s===","&&o===0?(e.push(n.trim()),n=""):n+=s}n.trim()&&e.push(n.trim());let i=[];for(let r of e){if(/\binset\b/i.test(r))continue;let s=r.match(/-?\d+(?:\.\d+)?px/gi)||[],[a="0px",l="0px",u="0px"]=s;u=`${parseFloat(u)/2}px`;let c=r.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),f=!!c&&c!==",";i.push(`drop-shadow(${a} ${l} ${u}${f?` ${c}`:""})`)}return i.join(" ")}function Hl(t){let e=zl(t),n=null,o=null,i=null,r=[];for(let a of e){let l=a.indexOf(":");if(l<0)continue;let u=a.slice(0,l).trim().toLowerCase(),c=a.slice(l+1).trim();u==="box-shadow"?i=c:u==="filter"?n=c:u==="-webkit-filter"?o=c:r.push([u,c])}if(i){let a=sh(i);a&&(n=n?`${n} ${a}`:a,o=o?`${o} ${a}`:a)}let s=[...r];return n&&s.push(["filter",n]),o&&s.push(["-webkit-filter",o]),s.map(([a,l])=>`${a}:${l}`).join(";")}function ah(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,o)=>`${n}{${Hl(o)}}`)}function lh(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,ah(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,o)=>`style=${n}${Hl(o)}${n}`),t}function ch(){return Eo||(Eo=(async()=>{try{let t='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',e=new Image;e.decoding="sync",e.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await e.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let o=n.getContext("2d",{willReadFrequently:!0});o.drawImage(e,0,0);let i=o.getImageData(2,18,1,1).data[3]>128,r=o.getImageData(2,2,1,1).data[3]>128;return{native:i||r,flippedY:r&&!i}}catch{return{native:!1,flippedY:!1}}})(),Eo)}function fh(t){let e=[],n=0,o=0;for(let i=0;i<t.length;i++){let r=t[i];r==="("?n++:r===")"?n=Math.max(0,n-1):r===","&&n===0&&(e.push(t.slice(o,i)),o=i+1)}return e.push(t.slice(o)),e.map(i=>{let r=0,s=0,a="",l=0;for(;l<i.length;){let u=i[l];if(u==="("?r++:u===")"&&(r=Math.max(0,r-1)),r===0&&(l===0||i[l-1]===" ")){let c=/^-?\d*\.?\d+px/.exec(i.slice(l));if(c){s++,a+=s===2?`${-parseFloat(c[0])}px`:c[0],l+=c[0].length;continue}}a+=u,l++}return a}).join(",")}function uh(t,e){let n=o=>zl(o).map(i=>{let r=i.indexOf(":");if(r<0)return i;let s=i.slice(0,r).trim().toLowerCase();return s==="text-shadow"||e&&s==="box-shadow"?`${s}:${fh(i.slice(r+1))}`:i}).join(";");return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(o,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities

Source: opengrep

`?"":o})}function bu(t){if(!t)return"";let e=[],n=/"((?:\\[\s\S]|[^"\\])*)"|'((?:\\[\s\S]|[^'\\])*)'/g,o=0,i;for(;i=n.exec(t);){let s=t.slice(o,i.index).trim();s&&e.push(s),e.push(yu(i[1]!==void 0?i[1]:i[2])),o=n.lastIndex}let r=t.slice(o).trim();return r&&e.push(r),e.join("")}function dr(t,e,n){let o=t.parentElement,i=o&&n?n.get(o):null;return i?{get(r,s){let a=e.get(r,s),c=i.get(s);return typeof c=="number"?Math.max(a,c):a},getStack(r,s){let a=e.getStack(r,s);if(!a.length)return a;let c=i.get(s);if(typeof c=="number"){let f=a.slice();return f[f.length-1]=Math.max(f[f.length-1],c),f}return a}}:e}function pr(t,e,n){let o=new Map,i=(f,l)=>pn(f,l).map(([u,d])=>({name:u,num:d})),r=i(e?.counterReset,0),s=i(e?.counterSet,0),a=i(e?.counterIncrement,1);function c(f){if(o.has(f))return o.get(f).slice();let l=n.getStack(t,f);l=l.length?l.slice():[];let u=r.find(m=>m.name===f);if(u){let m=Number.isFinite(u.num)?u.num:0;l=l.length?[...l,m]:[m]}let d=s.find(m=>m.name===f);if(d){let m=Number.isFinite(d.num)?d.num:0;l.length===0&&(l=[0]),l[l.length-1]=m}let h=a.find(m=>m.name===f);if(h){let m=Number.isFinite(h.num)?h.num:1;l.length===0&&(l=[0]),l[l.length-1]+=m}return o.set(f,l.slice()),l}return{get(f,l){let u=c(l);return u.length?u[u.length-1]:0},getStack(f,l){return c(l)},__incs:a}}var wu=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","letter-spacing","line-height"],xu=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","font-variant","letter-spacing","word-spacing","text-transform","text-decoration-line","text-decoration-color","text-decoration-style","line-height","background-color","vertical-align"];function na(t,e,n,o,i,r){try{if(o===null){if(t.getRootNode()!==(t.ownerDocument||document))return;let u=I(t).display||"";if(i==="::marker"?!u.includes("list-item"):!(u==="block"||u==="flow-root"||u==="list-item"||u==="inline-block"||u==="table-cell"||u==="table-caption"))return}else if(!t.matches(o))return;if(i==="::marker"&&!(I(t).display||"").includes("list-item"))return;let s=I(t,i),a=I(t);if(!s)return;let c="";for(let u of r){let d=s.getPropertyValue(u);d&&d!==a.getPropertyValue(u)&&!(u==="background-color"&&d==="rgba(0, 0, 0, 0)")&&!(u==="vertical-align"&&d==="baseline")&&(c+=`${u}:${d};`)}if(i==="::marker"){let u=s.getPropertyValue("content");u&&u!=="normal"&&u!=="none"&&(c+=`content:${u};`)}if(!c)return;let l=`data-sd-p${n.__pseudoRuleSeq=(n.__pseudoRuleSeq||0)+1}`;e.setAttribute(l,""),n.__pseudoCSS=(n.__pseudoCSS||"")+`[${l}]${i}{${c}}`}catch{}}function Su(t,e){if(!/\b(?:no-)?(?:open|close)-quote\b/.test(t))return t;let n="\u201C",o="\u201D";try{let i=I(e).quotes;if(i==="none")n="",o="";else if(i&&i!=="auto"){let r=i.match(/"[^"]*"|'[^']*'/g);r&&r.length>=2&&(n=r[0].slice(1,-1),o=r[1].slice(1,-1))}}catch{}return n=n.replace(/"/g,""),o=o.replace(/"/g,""),t.replace(/"[^"]*"|\b(no-open-quote|no-close-quote|open-quote|close-quote)\b/g,(i,r)=>r?r==="open-quote"?`"${n}"`:r==="close-quote"?`"${o}"`:'""':i)}function vu(t,e,n,o){let i;try{i=I(t,e)}catch{}let r=i?.content;if(!r||r==="none"||r==="normal")return{text:"",incs:[]};r=gu(r),r=Su(r,t);let s=dr(t,n,o),a=pr(t,i,s),c=Ks(r)?Zs(r,t,a):r;return{text:bu(c),incs:a.__incs||[]}}function Cu(t,e){if(e.__shadowPseudo)return!1;let n=Jt(t),o=[];for(let r of["before","after","firstLetter","marker","firstLine"]){let s=n[r];if(s===null)return!1;s&&o.push(s)}if(!o.length)return!0;let i=o.join(",");try{return!t.matches(i)&&t.querySelector(i)===null}catch{return!1}}async function Oe(t,e,n,o,i=!1){if(t?.nodeType!==1||e?.nodeType!==1||(n.slicer?.due()&&await n.slicer.pause(),t.tagName==="TEXTAREA"))return;let r=t.ownerDocument||document;if(!i&&!hu(r,n)&&!n.__shadowPseudo||!i&&Cu(t,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=mu(t.ownerDocument||document,n));let s=n.__counterCtx,a=Jt(t);a.marker!==""&&na(t,e,n,a.marker,"::marker",wu),a.firstLine!==""&&na(t,e,n,a.firstLine,"::first-line",xu);for(let f of["::before","::after","::first-letter"]){let l=a[f==="::before"?"before":f==="::after"?"after":"firstLetter"];if(l!==null){if(l==="")continue;try{if(!t.matches(l))continue}catch{}}try{let u=I(t,f);if(!u||u.content==="none"&&u.backgroundImage==="none"&&(u.backgroundColor==="transparent"||u.backgroundColor==="rgba(0, 0, 0, 0)")&&!ea(u)&&(!u.transform||u.transform==="none")&&u.display==="inline")continue;if(u.display==="none"||f!=="::first-letter"&&(u.content==="none"||u.content==="normal")){f==="::before"&&(e.dataset.snapdomHasBefore="1"),f==="::after"&&(e.dataset.snapdomHasAfter="1");continue}if(f==="::first-letter"){let V=I(t),q=(V?.display||"").toLowerCase();if(q.includes("flex")||q.includes("grid"))continue;let H=Vt=>u[Vt]!==V[Vt]&&(parseFloat(u[Vt])||0)!==0;if(!(u.color!==V.color||u.fontSize!==V.fontSize||u.fontWeight!==V.fontWeight||u.fontFamily!==V.fontFamily||u.fontStyle!==V.fontStyle||u.textTransform!==V.textTransform||u.float!==V.float&&u.float!=="none"||H("paddingTop")||H("paddingRight")||H("paddingBottom")||H("paddingLeft")||H("marginTop")||H("marginRight")||H("marginBottom")||H("marginLeft")))continue;let K=Array.from(e.childNodes).find(Vt=>Vt.nodeType===Node.TEXT_NODE&&Vt.textContent?.trim().length>0);if(!K)continue;let kt=K.textContent,xe=/^\s*/.exec(kt)[0],xn=kt.slice(xe.length),Ye=xn.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],_o=xn.slice(Ye?.length||0);if(!Ye||/[\uD800-\uDFFF]/.test(Ye))continue;let jt=document.createElement("span");jt.textContent=Ye,jt.dataset.snapdomPseudo="::first-letter";let Eo=Me(u,En(t)),Ro=ke(Eo,"span");n.styleMap.set(jt,Ro);let Sn=document.createTextNode(_o);e.replaceChild(Sn,K),e.insertBefore(jt,Sn),xe&&e.insertBefore(document.createTextNode(xe),jt);continue}let m=u.content??"",p=m===""||m==="none"||m==="normal",{text:g,incs:y}=vu(t,f,s,n.__siblingCounters),b=u.backgroundImage,w=u.backgroundColor,S=u.fontFamily,C=parseInt(u.fontSize)||32,x=parseInt(u.fontWeight)||!1,k=u.fontStyle||"normal",A=u.color||"#000",M=u.transform,v=Ot(S,o?.__iconMatchers),_=!p&&g!=="",E=b&&b!=="none",T=w&&w!=="transparent"&&w!=="rgba(0, 0, 0, 0)",P=ea(u),L=M&&M!=="none",W=m!=="none"&&m!=="normal",R=/^inline-/.test(u.display||""),F=W&&((parseFloat(u.width)||0)>0||(parseFloat(u.height)||0)>0||R),N=W&&u.boxShadow&&u.boxShadow!=="none",$=W&&u.outlineStyle&&u.outlineStyle!=="none"&&(parseFloat(u.outlineWidth)||0)>0;if(!(_||E||T||P||L||F||N||$)){if(y&&y.length&&t.parentElement){let V=n.__siblingCounters.get(t.parentElement)||new Map;for(let{name:q}of y){if(!q)continue;let H=dr(t,s,n.__siblingCounters),K=pr(t,I(t,f),H).get(t,q);V.set(q,K)}n.__siblingCounters.set(t.parentElement,V)}continue}let G=g.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(g),U=u.display==="inline"&&u.cssFloat==="none"&&u.position!=="absolute"&&u.position!=="fixed",Y=!1;if(_&&!v&&g.length>1&&!G&&U){let V=I(t),q=parseFloat(V.fontSize)||16,H=parseFloat(V.lineHeight);Number.isFinite(H)||(H=q*1.5),t.getBoundingClientRect().height<H*1.6&&(e.style.whiteSpace="nowrap",Y=!0)}let B=document.createElement("span");B.dataset.snapdomPseudo=f,B.style.pointerEvents="none",Y&&(B.style.whiteSpace="nowrap");let dt=Qi(t,f,u,n,o),pt=(I(t).display||"").toLowerCase(),nt=pt.includes("flex")||pt.includes("grid");if(nt){let V=dt["min-width"];(!V||V==="auto"||V==="0px")&&(dt["min-width"]="0px")}let st=_;st&&!U&&parseFloat(u.height)>=1.5*(parseFloat(u.lineHeight)||(parseFloat(u.fontSize)||16)*1.2)&&(st=!1,B.style.whiteSpace=u.whiteSpace);let yt=ke(dt,"span",st,nt);if(n.styleMap.set(B,yt),v&&g&&g.length===1){let{dataUrl:V,width:q,height:H}=await Bs(g,S,x,C,A,k),ht=document.createElement("img");ht.src=V,ht.style=`height:${C}px;width:${q/H*C}px;object-fit:contain;`,B.appendChild(ht),e.dataset.snapdomHasIcon="true"}else if(g&&G){let V=Qe(g,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??se(g);if(V?.trim())try{let q=await at(qt(V),{as:"dataURL",useProxy:o.useProxy});if(q?.ok&&typeof q.data=="string"){let H=document.createElement("img");H.src=q.data,H.style=`width:${C}px;height:auto;object-fit:contain;`,B.appendChild(H)}}catch(q){console.warn(`[SnapDOM] Couldn't draw the ${f} icon of`,t,q)}}else!v&&_&&(B.textContent=g);B.style.backgroundImage="none","maskImage"in B.style&&(B.style.maskImage="none"),"webkitMaskImage"in B.style&&(B.style.webkitMaskImage="none");try{B.style.backgroundRepeat=u.backgroundRepeat,B.style.backgroundSize=u.backgroundSize,u.backgroundPositionX&&u.backgroundPositionY?(B.style.backgroundPositionX=u.backgroundPositionX,B.style.backgroundPositionY=u.backgroundPositionY):B.style.backgroundPosition=u.backgroundPosition,B.style.backgroundOrigin=u.backgroundOrigin,B.style.backgroundClip=u.backgroundClip,B.style.backgroundAttachment=u.backgroundAttachment,B.style.backgroundBlendMode=u.backgroundBlendMode}catch{}if(E)try{let V=Yt(b),q=await Promise.all(V.map(H=>ve(H,o)));B.style.backgroundImage=q.join(", ")}catch(V){console.warn(`[SnapDOM] Couldn't load the ${f} background image.`,V)}T&&(B.style.backgroundColor=w);let bt=u.maskImage||u.webkitMaskImage;if(bt&&bt!=="none")try{let q=(await Promise.all(Yt(bt).map(H=>ve(H,o)))).join(", ");B.style.maskImage=q,B.style.webkitMaskImage=q;for(let H of["maskSize","maskRepeat","maskPosition","maskMode","maskComposite","maskOrigin","maskClip"])u[H]&&(B.style[H]=u[H])}catch(V){console.warn(`[SnapDOM] Couldn't load the ${f} mask image.`,V)}let Wt=B.childNodes.length>0||B.textContent?.trim()!==""||E||T||P||L||F||N||$;if(y&&y.length&&t.parentElement){let V=n.__siblingCounters.get(t.parentElement)||new Map,q=dr(t,s,n.__siblingCounters),H=pr(t,I(t,f),q);for(let{name:ht}of y){if(!ht)continue;let K=H.get(t,ht);V.set(ht,K)}n.__siblingCounters.set(t.parentElement,V)}if(!Wt)continue;f==="::before"?(e.dataset.snapdomHasBefore="1",e.insertBefore(B,e.firstChild)):(e.dataset.snapdomHasAfter="1",e.appendChild(B))}catch(u){console.warn(`[SnapDOM] Couldn't copy the ${f} of`,t,u)}}let c=Array.from(e.children).filter(f=>!f.dataset.snapdomPseudo);if(n.nodeMap)for(let f of c){let l=n.nodeMap.get(f);l?.nodeType===1&&await Oe(l,f,n,o,!0)}else{let f=Array.from(t.children);for(let l=0;l<Math.min(f.length,c.length);l++)await Oe(f[l],c[l],n,o,!0)}}var ra="http://www.w3.org/2000/svg",ku=["background-image","background-size","background-position","background-repeat","background-origin"];function ia(t){for(let[e,n]of t)try{Mu(e,n)}catch{}}function Mu(t,e){let n=t.ownerDocument.defaultView,o=n.getComputedStyle(t),i=[...t.getClientRects()];if(!i.length)return;let r=i[0].left+parseFloat(o.borderLeftWidth),s=i[0].top+parseFloat(o.borderTopWidth),a;if(o.display==="inline"){let y=i.reduce((w,S)=>w+S.width,0),b=0;a=i.map(w=>{let S={x:w.left-r-b,y:w.top-s,w:y,h:w.height,top:w.top,bottom:w.bottom};return b+=w.width,S})}else{let y=t.clientWidth||i[0].width,b=t.clientHeight||i[0].height;a=[{x:0,y:0,w:y,h:b,top:-1/0,bottom:1/0}]}let c=e.ownerDocument,f=`sd-bct-${Math.random().toString(36).slice(2,9)}`,l=ku.map(y=>`${y}:${o.getPropertyValue(y)}`).join(";").replace(/"/g,"'"),u="";a.forEach((y,b)=>{let w=`<svg xmlns="${ra}" width="${y.w}" height="${y.h}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${y.w}px;height:${y.h}px;${l}"></div></foreignObject></svg>`;u+=`<pattern id="${f}-${b}" patternUnits="userSpaceOnUse" x="${y.x}" y="${y.y}" width="${y.w}" height="${y.h}"><image width="${y.w}" height="${y.h}" preserveAspectRatio="none" href="data:image/svg+xml;charset=utf-8,${encodeURIComponent(w)}"/></pattern>`});let d="",h=c.createElement("canvas").getContext("2d"),m=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT),p=t.ownerDocument.createRange();for(let y=m.nextNode();y;y=m.nextNode()){let b=n.getComputedStyle(y.parentElement);h.font=b.font;let w=h.measureText("X").fontBoundingBoxAscent;if(!Number.isFinite(w))return;let S=b.font.replace(/"/g,"'"),C=a.map(()=>({xs:[],ys:[],chars:""})),x=y.data;for(let k=0;k<x.length;k++){let A=x.charCodeAt(k)>=55296&&x.charCodeAt(k)<=56319?2:1;p.setStart(y,k),p.setEnd(y,k+A);let M=p.getClientRects()[0],v=x.slice(k,k+A);if(k+=A-1,!M||!v.trim())continue;let _=(M.top+M.bottom)/2,E=a.findIndex(T=>_>=T.top&&_<=T.bottom);E<0&&(E=0),C[E].xs.push(+(M.left-r).toFixed(2)),C[E].ys.push(+(M.top-s+w).toFixed(2)),C[E].chars+=v}C.forEach((k,A)=>{if(!k.chars)return;let M=k.chars.replace(/&/g,"&amp;").replace(/</g,"&lt;");d+=`<text x="${k.xs.join(" ")}" y="${k.ys.join(" ")}" fill="url(#${f}-${A})" style="font:${S};font-kerning:none;letter-spacing:0;white-space:pre">${M}</text>`})}if(!d)return;let g=c.createElementNS(ra,"svg");g.setAttribute("style","position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none"),g.innerHTML=`<defs>${u}</defs>${d}`,o.position==="static"&&e.style.setProperty("position","relative","important"),e.style.setProperty("color","transparent","important"),e.style.setProperty("-webkit-text-fill-color","transparent","important"),e.insertBefore(g,e.firstChild)}At();function sa(t,e,n){if(!t||t?.nodeType!==1)return;let o=t.ownerDocument||document,i=e||o,r=Tt(t)&&t.localName==="svg"?[t]:Array.from(t.querySelectorAll("svg")),s=/url\(\s*["']?\s*#([^)"']+)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],c=x=>window.CSS&&CSS.escape?CSS.escape(x):x.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),f="http://www.w3.org/1999/xlink",l=x=>{if(!x||!x.getAttribute)return null;let k=x.getAttribute("href")||x.getAttribute("xlink:href")||(typeof x.getAttributeNS=="function"?x.getAttributeNS(f,"href"):null);if(k)return k;let A=x.attributes;if(!A)return null;for(let M=0;M<A.length;M++){let v=A[M];if(!v||!v.name)continue;if(v.name==="href")return v.value;let _=v.name.indexOf(":");if(_!==-1&&v.name.slice(_+1)==="href")return v.value}return null},u=new Set(Array.from(t.querySelectorAll("[id]")).map(x=>x.id)),d=new Set,h=!1,m=(x,k=null)=>{if(!x)return;s.lastIndex=0;let A;for(;A=s.exec(x);){h=!0;let M=(A[1]||"").trim();M&&(u.has(M)||(d.add(M),k&&!k.has(M)&&k.add(M)))}},p=x=>{let k=x.querySelectorAll("use");for(let v of k){let _=l(v);if(!_||!_.startsWith("#"))continue;h=!0;let E=_.slice(1).trim();E&&!u.has(E)&&d.add(E)}let A='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(x.getAttribute("style")||"");for(let v of a)m(x.getAttribute(v));let M=x.querySelectorAll(A);for(let v of M){m(v.getAttribute("style")||"");for(let _ of a)m(v.getAttribute(_))}},g=x=>{if(!x||x.nodeType!==1||!x.querySelectorAll)return;let k="filter[id],clipPath[id],mask[id],linearGradient[id],radialGradient[id],pattern[id]",A=!1;try{A=!!(i.querySelector&&i.querySelector(k))}catch{return}if(!A)return;let M=["filter","clipPath","mask","maskImage","webkitMaskImage"],v=_=>{if(Tt(_))return;let E;try{E=getComputedStyle(_)}catch{return}for(let T of M){let P=E[T];P&&P.includes("url(")&&m(P)}};v(x);for(let _ of x.querySelectorAll("*"))v(_)};for(let x of r)p(x);if(g(n),!h)return;let y=t.querySelector("svg.inline-defs-container");y||(y=o.createElementNS("http://www.w3.org/2000/svg","svg"),y.classList.add("inline-defs-container"),y.setAttribute("aria-hidden","true"),y.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(y,t.firstChild||null));let b=y.querySelector("defs")||null,w=x=>{if(!x||u.has(x))return null;let k=c(x),A=M=>{let v=i.querySelector(M);return v&&!t.contains(v)?v:null};return A(`svg defs > *#${k}`)||A(`svg > symbol#${k}`)||A(`*#${k}`)};if(!d.size)return;let S=new Set(d),C=new Set;for(;S.size;){let x=S.values().next().value;if(S.delete(x),!x||u.has(x)||C.has(x))continue;let k=w(x);if(!k){C.add(x);continue}b||(b=o.createElementNS("http://www.w3.org/2000/svg","defs"),y.appendChild(b));let A=k.cloneNode(!0);A.id||A.setAttribute("id",x),b.appendChild(A),C.add(x),u.add(x);let M=[A,...A.querySelectorAll("*")];for(let v of M){let _=l(v);if(_&&_.startsWith("#")){let T=_.slice(1).trim();T&&!u.has(T)&&!C.has(T)&&S.add(T)}let E=v.getAttribute?.("style")||"";E&&m(E,S);for(let T of a){let P=v.getAttribute?.(T);P&&m(P,S)}}}}At();var hr=new WeakMap,mr=new WeakMap;function qn(t,e,n){let o=n.get(t),i=t.style;if(!o){let s=i.cssText,a=t.hasAttribute("style");o={users:0,saved:e.map(([f,l])=>{let u={property:f,value:i.getPropertyValue(f),priority:i.getPropertyPriority(f)};return i.setProperty(f,l,"important"),u.forcedValue=i.getPropertyValue(f),u}),originalCSS:s,forcedCSS:i.cssText,hadStyle:a},n.set(t,o)}o.users++;let r=!1;return()=>{if(!r&&(r=!0,!--o.users)){if(n.delete(t),i.cssText===o.forcedCSS)i.cssText=o.originalCSS;else for(let s of o.saved)i.getPropertyValue(s.property)!==s.forcedValue||i.getPropertyPriority(s.property)!=="important"||(s.value?i.setProperty(s.property,s.value,s.priority):i.removeProperty(s.property));!o.hadStyle&&!i.length&&(t.getAttribute("style"),t.removeAttribute("style"))}}}function aa(t){if(hr.has(t))return qn(t,[],hr);let e=getComputedStyle(t),n=e.outlineStyle,o=e.outlineWidth,i=n!=="none"&&parseFloat(o)>0,r=parseFloat(e.borderTopWidth)===0&&parseFloat(e.borderRightWidth)===0&&parseFloat(e.borderBottomWidth)===0&&parseFloat(e.borderLeftWidth)===0;if(i&&r){let s=[];for(let a of["top","right","bottom","left"])s.push([`border-${a}-width`,o],[`border-${a}-style`,"solid"],[`border-${a}-color`,"transparent"]);return qn(t,s,hr)}return()=>{}}function Xn(t,e=null){let n=[],o=i=>{if(!Mt(i))return;if(mr.has(i)){n.push(qn(i,[],mr));return}let r=getComputedStyle(i);(r.contentVisibility||r.getPropertyValue("content-visibility")||"")==="auto"&&n.push(qn(i,[["content-visibility","visible"]],mr))};try{if(e){let r=s=>{let a;try{a=s.getBoundingClientRect()}catch{return}if(!((a.width>0||a.height>0)&&(a.right<e.left-200||a.left>e.right+200||a.bottom<e.top-200||a.top>e.bottom+200))){o(s);for(let c=s.firstElementChild;c;c=c.nextElementSibling)r(c)}};r(t)}else{for(let i of t.querySelectorAll("*"))o(i);o(t)}}catch{}return()=>{for(let i of n)try{i()}catch{}}}vt();wt();_t();Ae();_t();function yr(t){return la(t.boxShadow)}function br(t){return la(t.textShadow)}function la(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",o=0;for(let c=0;c<t.length;c++){let f=t[c];f==="("?o++:f===")"&&(o=Math.max(0,o-1)),f===","&&o===0?(e.push(n),n=""):n+=f}n.trim()&&e.push(n);let i=0,r=0,s=0,a=0;for(let c of e){if(/\binset\b/i.test(c))continue;let f=c.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(f.length<2)continue;let[l,u,d=0,h=0]=f,m=Math.abs(l)+d+h,p=Math.abs(u)+d+h;r=Math.max(r,m+Math.max(l,0)),a=Math.max(a,m+Math.max(-l,0)),s=Math.max(s,p+Math.max(u,0)),i=Math.max(i,p+Math.max(-u,0))}return{top:Math.ceil(i),right:Math.ceil(r),bottom:Math.ceil(s),left:Math.ceil(a)}}function wr(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,o=0,i;for(;i=n.exec(e);)o+=parseFloat(i[1])||0;let r=Math.ceil(o*2);return{top:r,right:r,bottom:r,left:r}}function xr(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0),n=parseFloat(t.outlineOffset||"0")||0,o=e+Math.max(0,Math.ceil(n));return{top:o,right:o,bottom:o,left:o}}function Sr(t){let e=`${t.filter||""} ${t.webkitFilter||""}`.trim();if(!e||e==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=e.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],o=0,i=0,r=0,s=0,a=!1;for(let c of n){a=!0;let f=c.match(/-?\d+(?:\.\d+)?px/gi)?.map(p=>parseFloat(p))||[],[l=0,u=0,d=0]=f,h=Math.abs(l)+d,m=Math.abs(u)+d;i=Math.max(i,h+Math.max(l,0)),s=Math.max(s,h+Math.max(-l,0)),r=Math.max(r,m+Math.max(u,0)),o=Math.max(o,m+Math.max(-u,0))}return{bleed:{top:D(o),right:D(i),bottom:D(r),left:D(s)},has:a}}function Au(t){let e=yr(t),n=br(t),o=wr(t),i=xr(t),r=Sr(t);return{top:Math.max(e.top,n.top)+o.top+i.top+r.bleed.top,right:Math.max(e.right,n.right)+o.right+i.right+r.bleed.right,bottom:Math.max(e.bottom,n.bottom)+o.bottom+i.bottom+r.bleed.bottom,left:Math.max(e.left,n.left)+o.left+i.left+r.bleed.left}}function _u(t){return t.boxShadow&&t.boxShadow!=="none"||t.textShadow&&t.textShadow!=="none"||(t.outlineStyle||"none")!=="none"||t.filter&&t.filter!=="none"?!0:!!t.webkitFilter&&t.webkitFilter!=="none"}function ca(t){let e=t.overflowX||t.overflow||"visible",n=t.overflowY||t.overflow||"visible",o=!!t.contain&&/\b(paint|content|strict)\b/.test(t.contain)||!!t.clipPath&&t.clipPath!=="none";return{x:o||e!=="visible",y:o||n!=="visible"}}function fa(t,e,n,o=1,i=1){let r=0,s=0,a=0,c=0,f=ca(n.get(t)||I(t));if(f.x&&f.y)return{top:0,right:0,bottom:0,left:0};let l=t.getBoundingClientRect();for(let u of e.values()){if(u===t||u.nodeType!==1||u.ownerDocument!==t.ownerDocument)continue;let d=n.get(u);if(!d||!_u(d))continue;let h=Au(d);if(!(h.top||h.right||h.bottom||h.left))continue;let m=u.getBoundingClientRect(),p={left:m.left-h.left/o,top:m.top-h.top/i,right:m.right+h.right/o,bottom:m.bottom+h.bottom/i};for(let g=u.parentElement;g;g=g.parentElement){let y=ca(n.get(g)||I(g));if(y.x||y.y){let b=g.getBoundingClientRect();y.x&&(p.left=Math.max(p.left,b.left),p.right=Math.min(p.right,b.right)),y.y&&(p.top=Math.max(p.top,b.top),p.bottom=Math.min(p.bottom,b.bottom))}if(g===t)break}f.x||(c=Math.max(c,(l.left-p.left)*o),s=Math.max(s,(p.right-l.right)*o)),f.y||(r=Math.max(r,(l.top-p.top)*i),a=Math.max(a,(p.bottom-l.bottom)*i))}return{top:Math.max(0,Math.ceil(r)),right:Math.max(0,Math.ceil(s)),bottom:Math.max(0,Math.ceil(a)),left:Math.max(0,Math.ceil(c))}}function ua(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch{}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch{}let o=n.transform||"none";if(!o||o==="none"){let c=null;try{c=he(t).scale}catch{}try{e.style.transform="none"}catch{}if(!c)return{a:1,b:0,c:0,d:1};let f=ee({scale:c});return{a:f.a,b:f.b,c:f.c,d:f.d}}function i(c,f,l,u){let d=Math.sqrt(c*c+f*f)||0,h=0,m=0;if(d>0){let p=c/d,g=f/d;h=p*l+g*u;let y=l-p*h,b=u-g*h;m=Math.sqrt(y*y+b*b)||0,m>0?h=h/m:h=0}return{a:d,b:0,c:h*m,d:m}}let r=c=>{let f=he(t).scale;if(!f)return c;let l=ee({scale:f,baseTransform:`matrix(${c.a},${c.b},${c.c},${c.d},0,0)`});return{a:l.a,b:l.b,c:l.c,d:l.d}},s=o.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let c=s[1].split(",").map(f=>parseFloat(f.trim()));if(c.length===6&&c.every(Number.isFinite)){let[f,l,u,d]=c,h=i(f,l,u,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return r(h)}}let a=o.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let c=a[1].split(",").map(f=>parseFloat(f.trim()));if(c.length===16&&c.every(Number.isFinite)){let f=c[0],l=c[1],u=c[4],d=c[5],h=i(f,l,u,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return r(h)}}try{let c=new DOMMatrix(o),f=i(c.a,c.b,c.c,c.d);try{e.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return r(f)}catch{return null}}function De(t,e,n,o,i){let r=n.a,s=n.b,a=n.c,c=n.d,f=n.e||0,l=n.f||0;function u(y,b){let w=y-o,S=b-i,C=r*w+a*S,x=s*w+c*S;return C+=o+f,x+=i+l,[C,x]}let d=[u(0,0),u(t,0),u(0,e),u(t,e)],h=1/0,m=1/0,p=-1/0,g=-1/0;for(let[y,b]of d)y<h&&(h=y),b<m&&(m=b),y>p&&(p=y),b>g&&(g=b);return{minX:h,minY:m,maxX:p,maxY:g,width:p-h,height:g-m}}function hn(t,e,n){let o=(t.transformOrigin||"0 0").trim().split(/\s+/),[i,r]=[o[0]||"0",o[1]||"0"],s=(a,c)=>{let f=a.toLowerCase();return f==="left"||f==="top"?0:f==="center"?c/2:f==="right"||f==="bottom"?c:f.endsWith("px")?parseFloat(f)||0:f.endsWith("%")?(parseFloat(f)||0)*c/100:/^-?\d+(\.\d+)?$/.test(f)&&parseFloat(f)||0};return{ox:s(i,e),oy:s(r,n)}}function he(t){let e={rotate:"0deg",scale:null,translate:null},n=null;try{n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null}catch{}if(n){let i=c=>{try{return typeof n.has=="function"&&!n.has(c)||typeof n.get!="function"?null:n.get(c)}catch{return null}},r=i("rotate");if(r)if(r.angle){let c=r.angle;e.rotate=c.unit==="rad"?c.value*180/Math.PI+"deg":c.value+c.unit,r.is2D===!1&&r.x&&r.y&&r.z&&(e.rotate=`${r.x.value} ${r.y.value} ${r.z.value} ${e.rotate}`)}else r.unit?e.rotate=r.unit==="rad"?r.value*180/Math.PI+"deg":r.value+r.unit:e.rotate=String(r);else{let c=getComputedStyle(t);e.rotate=c.rotate&&c.rotate!=="none"?c.rotate:"0deg"}let s=i("scale");if(s){let c=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":""}`:null;"x"in s&&s.x?.value!=null?e.scale=[c(s.x),c(s.y)??c(s.x),...s.is2D===!1?[c(s.z)??"1"]:[]].join(" "):Array.isArray(s)?e.scale=s.map(c).join(" "):e.scale=String(s)}else{let c=getComputedStyle(t);e.scale=c.scale&&c.scale!=="none"?c.scale:null}let a=i("translate");if(a){let c=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":f.unit||"px"}`:null;"x"in a&&a.x?.value!=null?e.translate=[c(a.x),c(a.y)??"0px",...a.is2D===!1?[c(a.z)??"0px"]:[]].join(" "):Array.isArray(a)?e.translate=a.map(c).join(" "):e.translate=String(a)}else{let c=getComputedStyle(t);e.translate=c.translate&&c.translate!=="none"?c.translate:null}return(!e.rotate||e.rotate==="none")&&(e.rotate="0deg"),(!e.scale||e.scale==="none")&&(e.scale=null),(!e.translate||e.translate==="none")&&(e.translate=null),e}let o=getComputedStyle(t);return e.rotate=o.rotate&&o.rotate!=="none"?o.rotate:"0deg",e.scale=o.scale&&o.scale!=="none"?o.scale:null,e.translate=o.translate&&o.translate!=="none"?o.translate:null,e}var gr=null;function Eu(){if(gr?.isConnected)return gr;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),J(t),Object.assign(t.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(t),gr=t,t}function ee(t){let e=r=>{let s=[],a=0,c=0,f=String(r).trim();for(let l=0;l<f.length;l++)f[l]==="("?a++:f[l]===")"?a--:/\s/.test(f[l])&&!a&&(l>c&&s.push(f.slice(c,l)),c=l+1);return c<f.length&&s.push(f.slice(c)),s},n=r=>r&&r!=="none",o=[];if(n(t.translate)){let r=e(t.translate);for(let s=0;s<2&&s<r.length;s++){let a=s===0?t.width:t.height;/^[+-]?(?:\d*\.)?\d+%$/.test(r[s])&&Number.isFinite(a)&&(r[s]=`${parseFloat(r[s])*a/100}px`)}o.push(r.length>2?`translate3d(${r.join(",")})`:`translate(${r.join(",")})`)}if(n(t.rotate)&&t.rotate!=="0deg"){let r=e(t.rotate);r.length===4?o.push(`rotate3d(${r.join(",")})`):r.length===2&&/^[xyz]$/i.test(r[0])?o.push(`rotate${r[0].toUpperCase()}(${r[1]})`):o.push(`rotate(${r.join(" ")})`)}if(n(t.scale)){let r=e(t.scale).map(s=>/%$/.test(s)?String(parseFloat(s)/100):s);o.push(r.length>2?`scale3d(${r.join(",")})`:`scale(${r.join(",")})`)}if(n(t.baseTransform)&&o.push(t.baseTransform),!o.length)return new DOMMatrix;let i=o.join(" ");try{if(i.includes("%"))throw new Error("Transform needs a reference box");return new DOMMatrix(i)}catch{let r=Eu(),s=document.createElement("div");if(s.style.cssText="all:initial!important;display:block!important;transform-origin:0 0!important",s.style.setProperty("width",`${Number.isFinite(t.width)?t.width:0}px`,"important"),s.style.setProperty("height",`${Number.isFinite(t.height)?t.height:0}px`,"important"),s.style.setProperty("transform",i,"important"),!s.style.transform)throw new Error("[SnapDOM] Couldn't read the transform of an element.");r.appendChild(s);try{return Ru(s)}finally{s.remove()}}}function da(t){let e=I(t),n=e.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let i=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",r=e.scale&&e.scale!=="none"&&e.scale!=="1",s=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(i||r||s)}function Ru(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}var ga=new WeakSet;function Yn(t,e){if(!e)return null;let n=t.ownerDocument||document,o=n.defaultView||window,i,r,s,a;if(e==="viewport")i=0,r=0,s=n.documentElement?.clientWidth||o.innerWidth,a=n.documentElement?.clientHeight||o.innerHeight;else if(typeof e=="object")i=(Number(e.x)||0)-(o.scrollX||0),r=(Number(e.y)||0)-(o.scrollY||0),s=Number(e.width),a=Number(e.height);else return null;return s>0&&a>0?{left:i,top:r,width:s,height:a,right:i+s,bottom:r+a}:null}function vr(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return Bt(e)?e.host:null}function Fu(t,e){for(let n=e;n;n=vr(n))if(n===t)return!0;return!1}function Tu(t,e){for(let n=vr(t);n&&n!==e&&n?.nodeType===1;n=vr(n)){let o=I(n);if(o.position!=="static"||o.transform&&o.transform!=="none"||o.filter&&o.filter!=="none"||o.backdropFilter&&o.backdropFilter!=="none"||o.perspective&&o.perspective!=="none"||/transform|perspective|filter/.test(o.willChange||"")||/layout|paint|strict|content/.test(o.contain||""))return n}return null}function kr(t,e){try{return ee({baseTransform:t,rotate:e?.rotate,scale:e?.scale})}catch{return null}}function ya(t,e,n,o,i){let r=t.getBoundingClientRect();Mt(e)&&I(t).position==="static"&&(e.style.position="relative");let s=[];for(let[a,c]of n){if(c?.nodeType!==1)continue;let f=a.localName==="svg"&&Tt(a)&&!Tt(c.parentNode);if(!Mt(a)&&!f||c===t||!Fu(t,c))continue;let l=o.get(c)||I(c),u=l.position;if(u!=="fixed"&&u!=="sticky"&&u!=="-webkit-sticky"||a.style.position==="absolute")continue;let d=c.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;ga.add(a);let h=l.transform&&l.transform!=="none"?l.transform:"",m=he(c),p=!!(h||m.rotate!=="0deg"||m.scale||m.translate),g=p?kr(h,m):null,y=!g||!g.is2D||g.a===1&&g.b===0&&g.c===0&&g.d===1,b=d.width,w=d.height;y||(b=c.offsetWidth||d.width,w=c.offsetHeight||d.height);let S=c.getRootNode&&Bt(c.getRootNode()),C=r,x=t.clientLeft||0,k=t.clientTop||0;if(S){let E=Tu(c,t);E&&(C=E.getBoundingClientRect(),x=E.clientLeft||0,k=E.clientTop||0)}let A=d.left-C.left-x,M=d.top-C.top-k;if(p)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",y)a.style.transform="none";else{a.style.transform=`matrix(${g.a},${g.b},${g.c},${g.d},0,0)`;let{ox:E,oy:T}=hn(l,b,w),P=De(b,w,{a:g.a,b:g.b,c:g.c,d:g.d,e:0,f:0},E,T);A-=P.minX,M-=P.minY}if(u!=="fixed"){let E=a.cloneNode(!1);E.setAttribute("data-snap-ph","1"),E.style.position="static",E.style.visibility="hidden",E.style.width=`${b}px`,E.style.height=`${w}px`,E.style.boxSizing="border-box",a.parentElement?.insertBefore(E,a)}let v=f?b:b+2,_=w;i&&(Math.abs(M-i.y)<.5&&(M-=1,_+=1),Math.abs(A-i.x)<.5&&(A-=1,v+=1)),a.style.position="absolute",a.style.left=`${A}px`,a.style.top=`${M}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${v}px`,a.style.height=`${_}px`,a.style.boxSizing="border-box",S||s.push(a)}for(let a of s)e.appendChild(a)}function ba(t,e,n={}){if(!t||!e||!e.style)return;let o=getComputedStyle(t);try{e.style.boxShadow="none"}catch(s){j(n,"Couldn't remove the root box-shadow.",s)}try{e.style.textShadow="none"}catch(s){j(n,"Couldn't remove the root text-shadow.",s)}try{e.style.outline="none"}catch(s){j(n,"Couldn't remove the root outline.",s)}let r=(o.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=r.length?r:"none"}catch(s){j(n,"Couldn't remove the root drop-shadow filter.",s)}}function wa(t,e){if(!t||!e||!e.style)return;let n=1;try{n=parseFloat(getComputedStyle(t).zoom)}catch{return}if(!(!e.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{e.style.setProperty("zoom","1","important")}catch{}}function pa(t){let e=t.display||"";if(e.includes("flex")||e.includes("grid")||e.startsWith("table")||e==="inline-block"||e==="flow-root"||t.position==="absolute"||t.position==="fixed"||t.float&&t.float!=="none")return!0;let n=t.overflowX||t.overflow||"visible",o=t.overflowY||t.overflow||"visible";return!!(n!=="visible"||o!=="visible"||t.contain&&/\b(layout|content|paint|strict)\b/.test(t.contain))}function Pu(t,e){let n=Array.from(t.childNodes),o=e==="top"?n:n.reverse();for(let i of o){if(i.nodeType===Node.TEXT_NODE){if(/\S/.test(i.textContent||""))return null;continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let r=getComputedStyle(i),s=String(r.display||"");if(!(s==="none"||s==="contents")&&!(r.position==="absolute"||r.position==="fixed"))return r.float&&r.float!=="none"||s.startsWith("inline")?null:i}return null}function xa(t,e,n){if(!t||!e||!e.style)return;let o=getComputedStyle(t);if(!pa(o))for(let i of["top","bottom"]){let r=i==="top"?"Top":"Bottom";if((parseFloat(o[`border${r}Width`])||0)>0||(parseFloat(o[`padding${r}`])||0)>0)continue;let s=t,a=e;for(;s&&a;){let c=Pu(s,i);if(!c)break;let f=n?Array.from(a.children).find(d=>n.get(d)===c)||null:a.children[Array.from(s.children).indexOf(c)]||null,l=getComputedStyle(c),u=parseFloat(l[`margin${r}`])||0;if(f&&f.style&&u>0&&(f.style[`margin${r}`]="0px"),pa(l)||(parseFloat(l[`border${r}Width`])||0)>0||(parseFloat(l[`padding${r}`])||0)>0)break;s=c,a=f}}}var $u=new Set(["xml","xlink"]);function Nu(t,e){if(t.startsWith("*")||t==="xmlns"||t.includes("@"))return!0;if(t.includes(":")){let n=t.split(":",1)[0];if(!$u.has(n))return!0}return e?t.startsWith("x-")||t.startsWith("v-")||t.startsWith(":")||t.startsWith("on:")||t.startsWith("bind:")||t.startsWith("let:")||t.startsWith("class:"):!1}var Lu=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/g,ha=t=>t.replace(Lu,e=>e.length===2?e:""),Iu=/^data:[^,]{0,120};base64,/;function Kn(t,e={}){if(!t)return;let{stripFrameworkDirectives:n=!0}=e,o=a=>{for(let c of Array.from(a.attributes)){if(Nu(c.name,n)){a.removeAttribute(c.name);continue}if(Iu.test(c.value))continue;let f=ha(c.value);if(f!==c.value)try{a.setAttribute(c.name,f)}catch{}}};t.nodeType===Node.ELEMENT_NODE&&o(t);let i=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),s;for(;s=r.nextNode();)if(s.nodeType===Node.ELEMENT_NODE)o(s);else if(s.nodeType===Node.COMMENT_NODE)i.push(s);else{let a=ha(s.data);a!==s.data&&(s.data=a)}for(let a of i)a.remove()}function Ou(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}var Du=new Set(["img","canvas","video","iframe","object","embed"]);function Wu(t){return Tt(t)||Du.has(t?.localName)}function Bu(t,e){if(t?.nodeType!==1||Ou(t)||Wu(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let o=e.display||"";return!(o.includes("flex")||o.includes("grid")||o.startsWith("table")||e.transform&&e.transform!=="none")}function Sa(t,e,n=new Map,o=null){function i(r,s){if(r?.nodeType!==1||s?.nodeType!==1)return;let a=r.childElementCount>s.childElementCount,c=n.get(r)||getComputedStyle(r);if(n.has(r)||n.set(r,c),a&&Bu(r,c)){s.style.height||(s.style.height="auto"),s.style.width||(s.style.width="auto"),s.style.removeProperty("block-size"),s.style.removeProperty("inline-size"),s.style.minHeight||(s.style.minHeight="0"),s.style.minWidth||(s.style.minWidth="0"),s.style.maxHeight||(s.style.maxHeight="none"),s.style.maxWidth||(s.style.maxWidth="none");let l=c.overflowY||c.overflowBlock||"visible",u=c.overflowX||c.overflowInline||"visible";(l!=="visible"||u!=="visible")&&(s.style.overflow="visible")}let f=Array.from(s.children);if(o)for(let l of f){let u=o.get(l);u&&u.nodeType===1&&i(u,l)}else{let l=Array.from(r.children);for(let u=0;u<Math.min(l.length,f.length);u++)i(l[u],f[u])}}i(t,e)}function Uu(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function zu(t,e){if(t?.nodeType!==1)return!1;if(t.getAttribute("data-capture")==="exclude")return e?.excludeMode==="remove";if(Array.isArray(e?.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(o){j(e,"Invalid exclude selector; ignored.",o)}if(Array.isArray(e?.excludePredicates))for(let n of e.excludePredicates)try{if(n(t))return e.excludeMode==="remove"}catch(o){j(e,"Your exclude function threw; ignored.",o)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){j(e,"Your filter function threw; ignored.",n)}return!1}function Mr(t,e){let n=getComputedStyle(t),o=t.getBoundingClientRect(),i=1/0,r=-1/0,s=!1,a=Array.from(t.children);for(let h of a){if(zu(h,e)||!Uu(h))continue;let m=h.getBoundingClientRect(),p=m.top-o.top,g=m.bottom-o.top;g<=p||(p<i&&(i=p),g>r&&(r=g),s=!0)}let c=s?Math.max(0,r-i):0,f=parseFloat(n.borderTopWidth)||0,l=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,d=parseFloat(n.paddingBottom)||0;return f+l+u+d+c}var D=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t;function Ar(t){let e=document.implementation.createHTMLDocument(""),n=e.importNode(t,!0);for(let o of[n,...n.querySelectorAll("*")]){let i=o.localName.includes("-");if(!Mt(o)||!(i||o.hasAttribute("is")))continue;let r=e.createElement(i?"span":o.localName);for(let s of o.attributes)s.name!=="is"&&r.setAttribute(s.name,s.value);r.append(...o.childNodes),o===n?n=r:o.replaceWith(r)}return n}var We=.75;function va(t,e,n,o,i,r){let s=t.ownerDocument||document,a=t.getBoundingClientRect(),c=i>0&&a.width>0?a.width/i:1,f=r>0&&a.height>0?a.height/r:1;if(Math.abs(c-f)>.02)return 0;let l=s.createElement("div");J(l),l.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let u=l.attachShadow({mode:"open"}),d=s.createElement("style");d.textContent=n,u.appendChild(d);let h=Ar(e);u.appendChild(h),s.body.appendChild(l);let m=0,p=["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],g=["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],y=(b,w,S)=>{let C=I(b),x=C.boxSizing==="border-box",k=(A,M,v)=>{let _=parseFloat(A);if(!Number.isFinite(_))return M;let E=0;if(!x)for(let P of v)E+=parseFloat(C[P])||0;let T=_+E;return Math.abs(T-M)<=.51?T:M};return{width:k(C.width,w,p),height:k(C.height,S,g)}};try{let b=h.getBoundingClientRect(),w=h.offsetWidth||i,S=h.offsetHeight||r,C=w>0&&b.width>0?b.width/w:1,x=S>0&&b.height>0?b.height/S:1,k=(A,M,v=!1)=>{let _=A.children,E=M.children,T=Math.min(_.length,E.length);for(let P=0;P<T;P++){let L=_[P],W=E[P],R=o.get(L),F=v||ga.has(L);if(R?.nodeType===1&&Mt(L)&&L.style&&R.isConnected){let N=R.getBoundingClientRect();if(N.width>0&&N.height>0){let $=W.getBoundingClientRect(),z=N.width/c,G=N.height/f,U=$.width,Y=$.height,B=R.offsetWidth||z,dt=R.offsetHeight||G,pt=W.offsetWidth||U,nt=W.offsetHeight||Y,st=Math.abs(z-B)>We||Math.abs(G-dt)>We||Math.abs(U-pt)>We||Math.abs(Y-nt)>We;if(F){let lt=y(W,pt,nt);z=U>0?z*C*lt.width/U:z,G=Y>0?G*x*lt.height/Y:G,U=lt.width,Y=lt.height}else if(st){let lt=y(R,B,dt),Wt=y(W,pt,nt);z=lt.width,G=lt.height,U=Wt.width,Y=Wt.height}let yt=U-z,bt=Y-G;(Math.abs(yt)>We||Math.abs(bt)>We)&&(L.style.boxSizing="border-box",L.style.width=`${D(z)}px`,L.style.height=`${D(G)}px`,m++)}}k(L,W,F)}};k(e,h)}finally{l.remove()}return m}var Hu=/::-(?:webkit-(?:scrollbar|meter|progress|slider)|moz-(?:meter|progress))/i;function Cr(t,e=new Set){let n="";if(!t)return n;for(let o=0;o<t.length;o++){let i=t[o];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){n+=Cr(i.styleSheet.cssRules,e);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let r=Cr(i.cssRules,e);r&&(n+=`@media ${i.conditionText}{${r}}`);continue}if(i.type===CSSRule.STYLE_RULE){let r=i.selectorText||"";if(Hu.test(r)){let s=i.cssText;s&&!e.has(s)&&(e.add(s),n+=s)}}}catch{}}return n}var ma=new WeakMap;function ju(t){let e="";for(let n of t.styleSheets){let o=-1;try{o=n.cssRules?n.cssRules.length:-1}catch{}e+=(n.href||"inline")+":"+o+"|"}return e}function Vu(t){if(!t||!t.styleSheets)return"";let e=ju(t),n=ma.get(t);if(n&&n.fp===e)return n.css;let o=new Set,i="";for(let r of Array.from(t.styleSheets))try{let s=r.cssRules;s&&(i+=Cr(s,o))}catch{}return ma.set(t,{fp:e,css:i}),i}function Ca(t,e){let n=Ho(t.clone).sort(),o=n.join(","),i=cn(t.element),r=O.baseStyle.get(o),s;r&&r.universe===i?s=r.css:(s=jo(n,i),O.baseStyle.set(o,{universe:i,css:s}));let a=Vu(t.element?.ownerDocument||document);return t.fontsCSS=e,t.baseCSS=s,t.scrollbarCSS=a,{baseCSS:s,scrollbarCSS:a,fontsCSS:e}}var Gu=[["max-width","x"],["min-width","x"],["max-height","y"],["min-height","y"]];function ka(t,e,n){let o=null;for(let[i,r]of Gu){let s=n.getPropertyValue(i);if(!s.includes("%"))continue;if(n.writingMode!=="horizontal-tb")return;o||=qu(t,n);let a=r==="x"?o.w:o.h,c=s.replace(/(-?\d*\.?\d+(?:e[+-]?\d+)?)%/gi,(l,u)=>`${a*u/100}px`),f=parseFloat(r==="x"?n.width:n.height);e.style.setProperty(i,Number.isFinite(f)?`${i.slice(0,3)}(${c}, ${f}px)`:c)}}function qu(t,e){let n=t.ownerDocument,o=n.documentElement,i={w:o.clientWidth,h:o.clientHeight};if(e.position==="fixed")return i;if(e.position==="absolute"){let c=t.offsetParent;return!c||(c===n.body||c===o)&&getComputedStyle(c).position==="static"?i:{w:c.clientWidth,h:c.clientHeight}}let r=t.parentElement;if(!r)return i;let s=getComputedStyle(r),a=c=>parseFloat(s.getPropertyValue(c))||0;return{w:r.clientWidth-a("padding-left")-a("padding-right"),h:r.clientHeight-a("padding-top")-a("padding-bottom")}}mt();var Qn=new Set,Xu="[data-sd-ph]::placeholder{color:var(--sd-ph)!important;opacity:var(--sd-ph-o)!important;-webkit-text-fill-color:var(--sd-ph)!important}";async function Ma(t,e={}){Nt(),Tn(t.ownerDocument||document);let n=e.__session||{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},o={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:e,slicer:e.__slicer||null},i=null,r=null;if(e.clip&&(r=Yn(t,e.clip),r&&(o.clip={rect:r,root:t})),e.captureSelection)try{o.selection=Cs(t)}catch(p){j(o,"Couldn't read the text selection.",p)}let s,a="",c="";if(Qn.size){let p=(g,y)=>{for(let b=y;b;b=b.assignedSlot||b.parentElement||Pt(b))if(b===g)return!0;return!1};for(;;){let g=[...Qn].filter(({root:y})=>p(y,t)||p(t,y)).map(({promise:y})=>y.catch(()=>{}));if(!g.length)break;await Promise.all(g)}}if(!o.clip&&t.isConnected&&t.ownerDocument?.visibilityState!=="hidden")try{let p=t.getBoundingClientRect(),g=t.ownerDocument?.defaultView||window,y=p.right<=0||p.bottom<=0||p.left>=g.innerWidth||p.top>=g.innerHeight,b=[];if(y&&(()=>{let S=[];t.shadowRoot&&S.push(t.shadowRoot);for(let C of t.querySelectorAll("*"))C.shadowRoot&&S.push(C.shadowRoot);for(;S.length;){let C=S.pop(),x=C.host?.localName==="calcite-icon";for(let k of C.querySelectorAll("*")){if(k.shadowRoot&&S.push(k.shadowRoot),!x||k.localName!=="svg")continue;let A=k.querySelectorAll("path");if(!A.length||[...A].some(v=>v.getAttribute("d")?.trim()))continue;let M=k.getBoundingClientRect();M.width&&M.height&&b.push(k)}}})(),b.length){let S=(async()=>{let x=t.style,k=t.hasAttribute("style"),A=new Map,M=(v,_)=>{A.has(v)||A.set(v,{value:x.getPropertyValue(v),priority:x.getPropertyPriority(v)}),x.setProperty(v,_,"important");let E=A.get(v);E.forcedValue=x.getPropertyValue(v),E.forcedPriority=x.getPropertyPriority(v)};try{M("left","0"),M("top","0"),M("right","auto"),M("bottom","auto"),M("margin-top","0"),M("margin-right","0"),M("margin-bottom","0"),M("margin-left","0"),M("transform","none"),M("translate","none"),M("opacity","0"),M("pointer-events","none");let v=t.getBoundingClientRect();if(v.right<=0||v.bottom<=0||v.left>=g.innerWidth||v.top>=g.innerHeight){let T=t.parentElement?.getBoundingClientRect(),P=T&&T.right>0&&T.left<g.innerWidth?Math.max(0,T.left):0,L=T&&T.bottom>0&&T.top<g.innerHeight?Math.max(0,T.top):0;M("position","fixed"),M("left",`${P}px`),M("top",`${L}px`)}await xt(100);let _=Date.now()+1500,E=()=>b.some(T=>{if([...T.querySelectorAll("path")].some(L=>L.getAttribute("d")?.trim()))return!1;let P=T.getBoundingClientRect();return P.width&&P.height&&P.right>0&&P.bottom>0&&P.left<g.innerWidth&&P.top<g.innerHeight});for(;Date.now()<_&&E();)await new Promise(T=>setTimeout(T,25));await xt(100)}finally{for(let[v,_]of A)x.getPropertyValue(v)!==_.forcedValue||x.getPropertyPriority(v)!==_.forcedPriority||(_.value?x.setProperty(v,_.value,_.priority):x.removeProperty(v));!k&&!x.length&&t.removeAttribute("style"),await xt(100)}})(),C={root:t,promise:S};Qn.add(C);try{await S}finally{Qn.delete(C)}}}catch{}let f=aa(t),l=Xn(t,r);if(r){let p=t.getBoundingClientRect(),g=t.offsetWidth||p.width,y=t.offsetHeight||p.height,b=p.width&&Math.abs(g-p.width)>=1?g/p.width:1,w=p.height&&Math.abs(y-p.height)>=1?y/p.height:1;i={x:(r.left-p.left)*b,y:(r.top-p.top)*w,width:r.width*b,height:r.height*w}}try{s=await te(t,o,e)}catch(p){throw console.warn("[SnapDOM] Capture failed while copying the element.",p),p}finally{l(),f()}Ss(o.nodeMap,t.ownerDocument||document),o.slicer?.due()&&await o.slicer.pause();try{sa(s,void 0,t)}catch(p){console.warn("[SnapDOM] Couldn't copy external SVG icons; some may be missing.",p)}try{await Oe(t,s,o,e)}catch(p){console.warn("[SnapDOM] Couldn't copy ::before/::after content; some decorations may be missing.",p)}o.bgClipText&&ia(o.bgClipText),await Ln(s,o);for(let[p,g]of o.nodeMap.entries())if(g?.tagName==="STYLE"&&p?.tagName==="STYLE"&&!p.hasAttribute("data-sd"))try{let y=g.sheet&&g.sheet.cssRules;y&&/@media/i.test(p.textContent||"")&&(p.textContent=pe(y))}catch{}try{let p=s.querySelectorAll("style[data-sd]");for(let g of p)c+=g.textContent||"",g.remove()}catch(p){j(o,"Couldn't copy shadow DOM styles.",p)}o.slicer?.due()&&await o.slicer.pause();let u=tn(o.styleMap);a=Array.from(u.entries()).map(([p,g])=>`.${g}{${p}}`).join("");let h=c+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+(o.__usesPlaceholder?Xu:"")+(o.__pseudoCSS||"");a=h+a;for(let[p,g]of o.styleMap.entries())_r(p,g,u);try{Yu(t,s,o.nodeMap)}catch(p){j(o,"Couldn't bring an open dialog or popover into the capture.",p)}if((o.clip||t.scrollTop||t.scrollLeft)&&s?.nodeType===1)try{let p=o.clip&&i?{x:i.x,y:i.y}:{x:0,y:0};ya(t,s,o.nodeMap,o.styleCache,p)}catch(p){j(o,"Couldn't keep fixed-position elements in place.",p)}for(let[p,g]of o.nodeMap.entries())o.clip&&g===t&&t===t.ownerDocument.scrollingElement||Er(p,g,o.nodeMap,o.styleCache);let m=t.ownerDocument;if((t===m.body||t===m.documentElement)&&m.documentElement.localName==="html"){let p=o.styleCache.get(m.documentElement)||I(m.documentElement);t===m.documentElement&&(s.style.overflow="visible");let g=t===m.body?s:s.querySelector("body");if(g&&p.overflowX==="visible"&&p.overflowY==="visible"&&p.contain==="none"&&!p.containerType?.includes("size")&&p.contentVisibility!=="auto"&&p.contentVisibility!=="hidden"){let y=o.styleCache.get(m.body)||I(m.body);y.contain==="none"&&!y.containerType?.includes("size")&&y.contentVisibility!=="auto"&&y.contentVisibility!=="hidden"&&y.display!=="none"&&(g.style.overflow="visible")}}if(t===o.nodeMap.get(s)){let p=o.styleCache.get(t)||I(t);o.styleCache.set(t,p);let g=Po(p.transform);s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=g||"",s.style.translate="none",ka(t,s,p)}for(let[p,g]of o.nodeMap.entries())g.tagName==="PRE"&&(p.style.marginTop="0",p.style.marginBlockStart="0");return{clone:s,classCSS:a,classPrefixCSS:h,styleCache:o.styleCache,nodeMap:o.nodeMap,reconcileRisk:o.reconcileRisk||0,clipWindow:i}}function Yu(t,e,n){let o=[];for(let s of[":modal",":popover-open"])try{o.push(...t.querySelectorAll(s))}catch{}if(!o.length)return;let i=new Map;for(let[s,a]of n.entries())i.set(a,s);let r=214748e4;for(let s of o){let a=i.get(s);if(!(!a||a===e||a.parentNode==null)){try{let c=getComputedStyle(s,"::backdrop"),f=c.backgroundColor,l=c.backgroundImage;if(f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"||l&&l!=="none"){let d=document.createElement("div");d.setAttribute("data-sd-backdrop",""),d.style.cssText=`position:fixed;inset:0;z-index:${r};background-color:${f};`+(l&&l!=="none"&&l.includes("data:")?`background-image:${l};`:""),e.appendChild(d)}}catch{}r+=1,a.style.zIndex=String(r),e.appendChild(a),r+=1}}}function _r(t,e,n){if(t.tagName==="STYLE")return;if(t.getRootNode&&Bt(t.getRootNode())){t.setAttribute("style",e.replace(/;/g,"; "));return}let o=n.get(e);o&&t.classList.add(o);let i=t.style?.backgroundImage,r=t.dataset?.snapdomHasIcon;i&&i!=="none"&&(t.style.backgroundImage=i),r&&(t.style.verticalAlign="middle",t.style.display="inline")}function Er(t,e,n,o){let i=e.scrollLeft,r=e.scrollTop;if(!(i||r)||t?.nodeType!==1||t.namespaceURI!=="http://www.w3.org/1999/xhtml")return;t.style.overflow="hidden",t.style.scrollbarWidth="none",t.style.msOverflowStyle="none";try{let c=t.querySelectorAll("*");for(let f of c){if(f.nodeType!==1||f.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let l=n?.get(f),u=l&&(o?.get(l)||I(l)),d=f.style.position||u?.position;if(d!=="fixed"&&d!=="absolute")continue;let h=u&&u.position!=="absolute"&&d==="absolute",m=null;if(l&&!h)for(let y=l.parentElement||Pt(l);y;y=y.parentElement||Pt(y)){let b=o?.get(y)||I(y);if(d==="absolute"&&b.position!=="static"||b.transform&&b.transform!=="none"||b.translate&&b.translate!=="none"||b.rotate&&b.rotate!=="none"||b.scale&&b.scale!=="none"||b.filter&&b.filter!=="none"||b.backdropFilter&&b.backdropFilter!=="none"||b.perspective&&b.perspective!=="none"||/transform|perspective|filter/.test(b.willChange||"")||/layout|paint|strict|content/.test(b.contain||"")){m=y;break}if(y===e)break}if(m){m===e&&(f.style.top=u.top,f.style.left=u.left,f.style.right=u.right,f.style.bottom=u.bottom);continue}let p=parseFloat(f.style.top||u?.top)||0,g=parseFloat(f.style.left||u?.left)||0;f.style.top=`${p+r}px`,f.style.left=`${g+i}px`,d==="fixed"&&(f.style.position="absolute")}}catch{}let a=document.createElement("div");for(a.style.all="unset",a.style.transform=`translate(${-i}px, ${-r}px)`,a.style.willChange="transform",a.style.display="inline-block",a.style.width="100%";t.firstChild;)a.appendChild(t.firstChild);t.appendChild(a)}ae();ce();wt();var Aa="http://www.w3.org/1999/xlink";function Ku(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(Aa,"href"):null)}function Qu(t){let e=parseFloat(t.dataset?.snapdomWidth||"")||0,n=parseFloat(t.dataset?.snapdomHeight||"")||0,o=parseInt(t.getAttribute("width")||"",10)||0,i=parseInt(t.getAttribute("height")||"",10)||0,r=parseFloat(t.style?.width||"")||0,s=parseFloat(t.style?.height||"")||0,a=e||r||o||t.width||t.naturalWidth||100,c=n||s||i||t.height||t.naturalHeight||100;return{width:a,height:c}}async function Zn(t,e={}){let n=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&n.unshift(t);let o=async a=>{if(!a.getAttribute("src")){let m=a.currentSrc||a.src||$e(a.getAttribute("srcset"),a)||"";m&&a.setAttribute("src",m)}if(a.removeAttribute("srcset"),a.removeAttribute("sizes"),(a.getAttribute("src")||"").startsWith("data:")){a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let c=a.src||"";if(!c)return;let f=O.image?.get(c);if(f){a.src=f,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let l=await at(c,{as:"dataURL",useProxy:e.useProxy});if(l.ok&&typeof l.data=="string"&&l.data.startsWith("data:")){O.image?.set(c,l.data),a.src=l.data,l.blob&&(a.__snapdomBlob=l.blob),a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:u,height:d}=Qu(a),{fallbackURL:h}=e||{};if(h)try{let m=typeof h=="function"?await h({width:u,height:d,src:c,element:a}):h;if(m){let p=await at(m,{as:"dataURL",useProxy:e.useProxy});if(p?.ok&&typeof p.data=="string"){a.src=p.data,a.width||(a.width=u),a.height||(a.height=d);return}}}catch{}if(e.placeholders!==!1){Et(e.__session,"image-fallback",`image failed to inline, using placeholder: ${c}`);let m=document.createElement("div");m.style.cssText=[`width:${u}px`,`height:${d}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${d}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),m.textContent="img",a.replaceWith(m)}else{let m=document.createElement("div");m.style.cssText=`display:inline-block;width:${u}px;height:${d}px;visibility:hidden;`,a.replaceWith(m)}},i=6;for(let a=0;a<n.length;a+=i){let c=n.slice(a,a+i).map(o);await Promise.allSettled(c)}let r=Array.from(t.querySelectorAll("image"));t.localName==="image"&&r.unshift(t);let s=async a=>{let c=Ku(a);if(!c||c.startsWith("data:")||c.startsWith("blob:"))return;let f=await at(c,{as:"dataURL",useProxy:e.useProxy});f.ok&&typeof f.data=="string"&&f.data.startsWith("data:")&&(a.setAttribute("href",f.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(Aa,"href"))};for(let a=0;a<r.length;a+=i){let c=r.slice(a,a+i).map(s);await Promise.allSettled(c)}}mt();vt();var Zu=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],Ju=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],td=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],ed=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function nd(t,e,n,o){let i=n.get(t)||I(t);n.has(t)||n.set(t,i);let r=ji(t),s=r?m=>m in r?r[m]:"":m=>i.getPropertyValue(m),a=s("border-image"),c=s("border-image-source"),f=a&&a!=="none"||c&&c!=="none",l=i.getPropertyValue("background-image"),u=s("background-color"),d=l&&l!=="none"||u&&u!=="rgba(0, 0, 0, 0)"&&u!=="transparent"||/url\s*\(|gradient\s*\(/i.test(i.getPropertyValue("background")||""),h=St()&&(s("background-clip")||s("-webkit-background-clip")||"").includes("text");if(d&&!h)for(let m of td){let p=s(m);p&&e.style.setProperty(m,p)}for(let m of Zu){if(h&&m==="background-image")continue;let p=i.getPropertyValue(m);if(m==="background-image"&&(!p||p==="none")){let b=i.getPropertyValue("background");b&&/url\s*\(/.test(b)&&(p=Yt(b).filter(w=>/url\s*\(/.test(w)).join(", ")||p)}if(!p||p==="none")continue;let g=Yt(p),y=await Promise.all(g.map(b=>ve(b,o)));y.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&e.style.setProperty(m,y.join(", "))}for(let m of Ju){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(f)for(let m of ed){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(d&&/fixed/.test(s("background-attachment")||""))try{await rd(t,e,i)}catch{}}function od(t,e,n,o,i){let r=(t||"auto").trim();if(r==="cover"||r==="contain"){if(!e||!n)return{w:o,h:i};let d=r==="cover"?Math.max(o/e,i/n):Math.min(o/e,i/n);return{w:e*d,h:n*d}}let s=r.split(/\s+/),a=(d,h)=>{if(d==="auto"||d===void 0)return null;if(d.endsWith("px"))return parseFloat(d);if(d.endsWith("%"))return h*parseFloat(d)/100},c=a(s[0],o),f=a(s[1],i);if(c===void 0||f===void 0)return null;let l=c,u=f;return l==null&&u==null?(l=e||o,u=n||i):l==null?l=e&&n?u*(e/n):o:u==null&&(u=e&&n?l*(n/e):i),!l||!u?null:{w:l,h:u}}async function rd(t,e,n){let o=(n.getPropertyValue("background-attachment")||"").split(",").map(m=>m.trim()),i=en();if(!i)for(let m=t.parentElement;m&&!i;m=m.parentElement){let p=I(m);(p.transform&&p.transform!=="none"||p.filter&&p.filter!=="none")&&(i=!0)}if(i){e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "));return}let r=t.getBoundingClientRect(),s=t.ownerDocument?.defaultView||window,a=s.innerWidth,c=s.innerHeight,f=Yt(e.style.backgroundImage||n.getPropertyValue("background-image")||""),l=(e.style.backgroundSize||n.getPropertyValue("background-size")||"auto").split(",").map(m=>m.trim()),u=(e.style.backgroundPosition||n.getPropertyValue("background-position")||"0% 0%").split(",").map(m=>m.trim()),d=[],h=[];for(let m=0;m<f.length;m++){let p=o[m%o.length]||"scroll",g=l[m%l.length],y=u[m%u.length];if(p!=="fixed"){d.push(g),h.push(y);continue}let b=0,w=0,S=f[m]&&f[m].match(/url\(["']?([^"')]+)["']?\)/);if(S)try{let v=new Image;v.src=S[1],await v.decode(),b=v.naturalWidth,w=v.naturalHeight}catch{d.push(g),h.push(y);continue}let C=od(g,b,w,a,c);if(!C){d.push(g),h.push(y);continue}let x=y.split(/\s+/),k=(v,_,E)=>{if(!v)return 0;if(v.endsWith("px"))return parseFloat(v);if(v.endsWith("%"))return(_-E)*parseFloat(v)/100},A=k(x[0]||"0%",a,C.w),M=k(x[1]||x[0]||"0%",c,C.h);if(A===void 0||M===void 0){d.push(g),h.push(y);continue}d.push(`${Jn(C.w)}px ${Jn(C.h)}px`),h.push(`${Jn(A-r.left)}px ${Jn(M-r.top)}px`)}e.style.setProperty("background-size",d.join(", ")),e.style.setProperty("background-position",h.join(", ")),e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "))}var Jn=t=>Math.round(t*100)/100;async function to(t,e,n,o={},i=new Map){if(!e)return;let r=[];t&&er(t)&&r.push([t,e]);let s=[e];for(;s.length;){let c=s.pop();if(c.children)for(let f of c.children){if(f.tagName==="STYLE")continue;let l=i.get(f);l&&er(l)&&r.push([l,f]),s.push(f)}}let a=6;for(let c=0;c<r.length;c+=a)await Promise.allSettled(r.slice(c,c+a).map(([f,l])=>nd(f,l,n,o)))}vt();function Ea(t,e,n=new Map){let o=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let a=i.currentNode;a;a=i.nextNode()){let c=n.get(a);if(c?.nodeType!==1)continue;let f=I(c),l=f.getPropertyValue("backdrop-filter")||f.getPropertyValue("-webkit-backdrop-filter");l&&l!=="none"&&a!==e&&o.push({cloneEl:a,orig:c,bf:l,path:cd(e,a)})}if(!o.length)return;let r=t.getBoundingClientRect(),s=o.map((a,c)=>{let f=e.cloneNode(!0);ad(f,e,a.orig.getBoundingClientRect(),n),ld(_a(f,a.path));for(let l=0;l<c;l++){let u=_a(f,o[l].path);u&&(u.style.setProperty("backdrop-filter","none","important"),u.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...a,copy:f}});for(let{cloneEl:a,orig:c,bf:f,copy:l}of s)id.has(a.tagName)||sd(a,c,f,l,r)}var id=new Set(["IMG","INPUT","TEXTAREA","SELECT","CANVAS","VIDEO","AUDIO","IFRAME","EMBED","OBJECT","PROGRESS","METER","HR","BR"]);function sd(t,e,n,o,i){let r=e.getBoundingClientRect();if(!r.width||!r.height)return;let s=I(e),a=e.offsetWidth?r.width/e.offsetWidth:1,c=Math.abs(a-1)>.001?1/a:1;o.style.position="absolute",o.style.left=`${(i.left-r.left)*c}px`,o.style.top=`${(i.top-r.top)*c}px`,o.style.width=`${i.width}px`,o.style.height=`${i.height}px`,o.style.margin="0",o.style.filter=n,c!==1&&(o.style.transform=`scale(${c})`,o.style.transformOrigin="top left");let f=document.createElement("div");f.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",f.appendChild(o);let l=document.createElement("div");l.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",l.style.backgroundColor=s.backgroundColor,l.style.backgroundImage=t.style.backgroundImage||s.backgroundImage;for(let u of["background-size","background-position","background-repeat","background-origin","background-clip"])l.style.setProperty(u,s.getPropertyValue(u));t.style.setProperty("background-color","transparent","important"),t.style.setProperty("background-image","none","important"),t.style.setProperty("backdrop-filter","none","important"),t.style.setProperty("-webkit-backdrop-filter","none","important"),s.position==="static"&&(t.style.position="relative"),t.style.isolation="isolate",t.prepend(l),t.prepend(f)}var eo=128;function ad(t,e,n,o){let i=[[t,e]];for(;i.length;){let[r,s]=i.pop(),a=o.get(s);if(a?.nodeType===1){let l=a.getBoundingClientRect();(l.left>n.right+eo||l.right<n.left-eo||l.top>n.bottom+eo||l.bottom<n.top-eo)&&(r.tagName==="IMG"&&r.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),r.style&&(r.style.backgroundImage="none"))}let c=r.children,f=s.children;for(let l=0;l<c.length;l++)i.push([c[l],f[l]])}}function cd(t,e){let n=[];for(let o=e;o!==t;o=o.parentElement){if(!o?.parentElement)return null;n.push([...o.parentElement.children].indexOf(o))}return n.reverse()}function _a(t,e){if(!e)return null;let n=t;for(let o of e)if(n=n.children[o],!n)return null;return n}function ld(t){if(t)for(let e=t;e&&e.parentNode;){let n=e.parentNode;for(;e.nextSibling;)e.nextSibling.remove();e===t&&e.remove(),e=n}}vt();mt();wt();wt();function Rr(t){return fi(t),{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map,warnings:[]}}ce();function oo(t,e){if(!t)return()=>{};let n=[],o=200;function i(r){if(e){let f=r.getBoundingClientRect();if(f.width>0||f.height>0){let l=Math.max(f.right,f.left+(r.scrollWidth||0)),u=Math.max(f.bottom,f.top+(r.scrollHeight||0));if(l<e.left-o||f.left>e.right+o||u<e.top-o||f.top>e.bottom+o)return}}let s=getComputedStyle(r),a=fd(r,s);a&&n.push(a);let c=ud(r,s);c&&n.push(c);for(let f of r.children||[])i(f)}return i(t),()=>n.forEach(r=>r())}function fd(t,e){if(!t)return()=>{};e=e||getComputedStyle(t);let n=dd(e);if(n<=0)return()=>{};if(!Ta(t))return()=>{};let o=Fa(t),i=o.text,r=hd(e);o.write("X");let s=t.scrollHeight-r;o.restore();let a=s>0?s:pd(e),c=Math.round(a*n+r),f=.5*(n+1);if(t.scrollHeight<=c+f)return()=>{};let l=0,u=i.length,d=-1;for(;l<=u;){let m=l+u>>1;o.write(i.slice(0,no(i,m))+"\u2026"),t.scrollHeight<=c+f?(d=m,l=m+1):u=m-1}let h=(d>=0?i.slice(0,no(i,d)):"")+"\u2026";return o.write(h),Ra(t,h,o)}function ud(t,e){if(!t)return()=>{};if(e=e||getComputedStyle(t),e.textOverflow!=="ellipsis")return()=>{};if(e.whiteSpace!=="nowrap"&&e.whiteSpace!=="pre")return()=>{};if(e.overflowX!=="hidden"&&e.overflowX!=="clip")return()=>{};if(!Ta(t))return()=>{};if(t.scrollWidth<=t.clientWidth+.5)return()=>{};let n=Fa(t),o=n.text,i=0,r=o.length,s=-1;for(;i<=r;){let c=i+r>>1;n.write(o.slice(0,no(o,c))+"\u2026"),t.scrollWidth<=t.clientWidth+.5?(s=c,i=c+1):r=c-1}let a=(s>=0?o.slice(0,no(o,s)):"")+"\u2026";return n.write(a),Ra(t,a,n)}function Ra(t,e,n){return()=>{t.textContent===e&&n.restore()}}function Fa(t){let e=[];for(let o=t.firstChild;o;o=o.nextSibling)o.nodeType===Node.TEXT_NODE&&e.push(o);let n=e.map(o=>o.data);return{text:n.join(""),write(o){e[0].data=o;for(let i=1;i<e.length;i++)e[i].data=""},restore(){for(let o=0;o<e.length;o++)e[o].data=n[o]}}}function no(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e-1);return n>=55296&&n<=56319?e-1:e}function dd(t){let e=t.getPropertyValue("-webkit-line-clamp")||t.getPropertyValue("line-clamp");e=(e||"").trim();let n=parseInt(e,10);return Number.isFinite(n)&&n>0?n:0}function pd(t){let e=(t.lineHeight||"").trim(),n=parseFloat(t.fontSize)||16;return!e||e==="normal"?Math.round(n*1.2):e.endsWith("px")?parseFloat(e):/^\d+(\.\d+)?$/.test(e)?Math.round(parseFloat(e)*n):e.endsWith("%")?Math.round(parseFloat(e)/100*n):Math.round(n*1.2)}function hd(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function Ta(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var Be=["clone","render"],mn={clone:0,render:1},gt="render";function Pa(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];if(!e.length)return{stage:gt,loweredBy:[]};let n=-1,o=[];for(let r of e){if(!r||typeof r!="object")continue;let s=r.needs===void 0?gt:r.needs;if(!Object.prototype.hasOwnProperty.call(mn,s))throw new Error(`[SnapDOM] Plugin '${r.name||"(unnamed)"}' declares needs: ${JSON.stringify(s)}, expected one of ${Be.join(", ")}.`);o.push({name:r.name||"(unnamed)",needs:s}),n=Math.max(n,mn[s])}if(n<0)return{stage:gt,loweredBy:[]};let i=Be[n];return{loweredBy:i===gt?[]:o.filter(r=>r.needs===i).map(r=>r.name),stage:i}}function Ue(t,e){return mn[t]>=mn[e]}function $a(t,e,n=Be){let o=n[n.length-1];if(e==null)return o;if(!Object.prototype.hasOwnProperty.call(mn,e))throw new Error(`[SnapDOM] ${t}: needs must be one of ${Be.join(", ")}, got ${JSON.stringify(e)}.`);if(!n.includes(e))throw new Error(`[SnapDOM] ${t} cannot run at stage '${e}'; it supports ${n.join(", ")}.`);return e}function Na(t,e,n){let o=e.length?e.map(i=>`'${i}'`).join(", "):"the attached plugins";return new Error(`[SnapDOM] No ${n}: this capture stopped at '${t}' because ${o} asked for needs: '${t}'. It is not re-captured, since that would be a different instant. Ask the plugin for needs: 'render', or capture without it.`)}var ze=[];function He(t){if(!t)return null;if(Array.isArray(t)){let[e,n]=t;return typeof e=="function"?e(n):e}if(typeof t=="object"&&"plugin"in t){let{plugin:e,options:n}=t;return typeof e=="function"?e(n):e}return typeof t=="function"?t():t}function Fr(...t){let e=t.flat();for(let n of e){let o=He(n);if(o){if(o.needs!==void 0&&o.needs!==gt)throw new Error(`[SnapDOM] '${o.name||"(unnamed)"}' declares needs: ${JSON.stringify(o.needs)}, so it can't be a global plugin (it would stop every capture before '${gt}'). Pass it per capture: snapdom(el, { plugins: [...] }).`);ze.some(i=>i&&i.name&&o.name&&i.name===o.name)||ze.push(o)}}}function La(t){return t&&Array.isArray(t.plugins)?t.plugins:ze}async function zt(t,e,n){let o=n,i=La(e);for(let r of i){let s=r&&typeof r[t]=="function"?r[t]:null;if(!s)continue;let a=await s(e,o);typeof a<"u"&&(o=a)}return o}async function ro(t,e,n){let o=[],i=La(e);for(let r of i){let s=r&&typeof r[t]=="function"?r[t]:null;if(!s)continue;let a=await s(e,n);typeof a<"u"&&o.push(a)}return o}function md(){ze.length=0}var gd=0;function yd(t){let e=[];if(Array.isArray(t))for(let n of t){let o=He(n);if(!o)continue;o.name||(o.name=`anonymous-${++gd}`);let i=e.findIndex(r=>r&&r.name===o.name);i>=0&&e.splice(i,1),e.push(o)}for(let n of ze)n&&n.name&&!e.some(o=>o.name===n.name)&&e.push(n);return Object.freeze(e)}function Ia(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=yd(e)),t}function Tr(){return ze.slice()}var bd=["resolveNode","beforeSnap","beforeClone","afterClone","beforeRender","afterRender"];function io(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];for(let n of e){let o=He(n);if(!(!o||o.pure===!0)){for(let i of bd)if(typeof o[i]=="function")return!0}}return!1}wt();Ae();var ge="data-snapdom-asset",Ba="http://www.w3.org/1999/xlink",wd=0;function ao(t,e,n,o,i,r){let s=r.__compressedAssets||=new WeakMap,a=s.get(t);a||(a={token:String(++wd),properties:[]},s.set(t,a),t.setAttribute(ge,a.token));let c=a.properties.find(f=>f.kind===e&&f.name===n);c?(c.compressed!==o&&(c.original=o),c.compressed=i):a.properties.push({kind:e,name:n,original:o,compressed:i})}var Ua=(t,e)=>e.kind==="style"?t.style?.getPropertyValue(e.name):t.getAttribute(e.name);function co(t,e){let n=new Map;if(!t||!e)return n;let o=[t,...t.querySelectorAll(`[${ge}]`)];for(let i of o){let r=e.get(i);if(!r||i.getAttribute(ge)!==r.token)continue;let s=r.properties.filter(a=>Ua(i,a)===a.compressed).map(a=>Object.freeze({...a}));s.length&&n.set(r.token,Object.freeze(s))}return n}function lo(t,e){if(!t||!e)return;let n=0;for(let o of[t,...t.querySelectorAll(`[${ge}]`)]){let i=e.get(o);i&&(i.token=String(++n),o.setAttribute(ge,i.token))}}function za(t,e){if(!e?.size||typeof t!="string"||!t.startsWith("data:image/svg+xml"))return t;let n=t.indexOf(","),o=new DOMParser().parseFromString(decodeURIComponent(t.slice(n+1)),"image/svg+xml");if(o.querySelector("parsererror"))return t;let i=!1;for(let r of o.querySelectorAll(`[${ge}]`))for(let s of e.get(r.getAttribute(ge))||[])Ua(r,s)===s.compressed&&(s.kind==="style"?r.style.setProperty(s.name,s.original,r.style.getPropertyPriority(s.name)):s.name==="xlink:href"?r.setAttributeNS(Ba,s.name,s.original):r.setAttribute(s.name,s.original),i=!0);return i?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(o))}`:t}function Oa(t){if(t.is2D===!1)return 1/0;let e=t.a*t.a+t.b*t.b+t.c*t.c+t.d*t.d,n=t.a*t.d-t.b*t.c;return Math.sqrt((e+Math.sqrt(Math.max(0,e*e-4*n*n)))/2)}function Pr(t,e){let n=e.element||t,o=n.isConnected?I(n):n.style,i=e.__compressionClip,r=(h,m)=>{try{return h[m]?.baseVal?.value||0}catch{return 0}},s=i?.width||n.offsetWidth||parseFloat(o?.width)||r(n,"width"),a=i?.height||n.offsetHeight||parseFloat(o?.height)||r(n,"height"),c=Number.isFinite(e.width),f=Number.isFinite(e.height);if(!i&&(c||f)&&s&&a)try{let h=e.outerTransforms===!1&&e.__compressionRootTransform?e.__compressionRootTransform:ee({baseTransform:o?.transform,rotate:o?.rotate,scale:o?.scale,width:s,height:a});if(h.is2D===!1)s=0,a=0;else{let m=Math.abs(h.a)*s+Math.abs(h.c)*a,p=Math.abs(h.b)*s+Math.abs(h.d)*a;s=Math.min(s,m),a=Math.min(a,p)}}catch{s=0,a=0}let l=(c||f?Math.max(c?s?e.width/s:1/0:0,f?a?e.height/a:1/0:0):e.scale||1)*(e.dpr||1);e.__compressionDensity=l;let u=new WeakMap,d=h=>{if(!h||h.nodeType!==1)return 1;if(u.has(h))return u.get(h);let m=h.isConnected?I(h):h.style,p=1;try{m?.perspective&&m.perspective!=="none"&&(p=1/0);let g=m?.transform;if(g&&g!=="none")p*=Oa(new DOMMatrix(g));else if(h.transform?.baseVal?.numberOfItems){let y=new DOMMatrix;for(let b=0;b<h.transform.baseVal.numberOfItems;b++){let w=h.transform.baseVal.getItem(b).matrix;y=y.multiply(new DOMMatrix([w.a,w.b,w.c,w.d,w.e,w.f]))}p*=Oa(y)}if(m?.scale&&m.scale!=="none"){let y=m.scale.trim().split(/\s+/).map(b=>parseFloat(b)/(b.endsWith("%")?100:1));p*=Math.max(...y.map(Math.abs))}if(h!==n&&m?.zoom&&m.zoom!=="normal"&&(p*=parseFloat(m.zoom)||1),h.localName==="svg"&&h.viewBox?.baseVal?.width>0&&h.viewBox.baseVal.height>0){let y=h.viewBox.baseVal,b=C=>/^\d+(?:\.\d+)?px$/.test(m?.[C]||"")?parseFloat(m[C]):r(h,C),w=b("width"),S=b("height");p*=w>0&&S>0?Math.max(w/y.width,S/y.height):1/0}}catch{p=1/0}return Number.isFinite(p)||(p=1/0),h!==n&&(p*=d(h.parentElement||h.getRootNode?.().host)),u.set(h,p),p};return{density:l,stretch:d}}var Ha=.92,ja=1;async function xd(t){let e=new Image;return e.decoding="sync",e.src=t,typeof e.decode=="function"?(await e.decode(),e):(await new Promise((n,o)=>{e.onload=()=>n(),e.onerror=o}),e)}function Sd(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}var vd=64*1024,Da=32*1024*1024,so=new Map;function Cd(t,e,n,o){if(n.length+(o?.length||0)>Da)return;t.set(e,{source:n,result:o});let i=0;for(let r of t.values())i+=r.source.length+(r.result?.length||0);for(;i>Da;){let r=t.keys().next().value,s=t.get(r);i-=s.source.length+(s.result?.length||0),t.delete(r)}}function kd(t,e){let n=t.indexOf(",");if(n<0||!/;base64/i.test(t.slice(0,n)))return null;let o=Math.ceil(e/3)*4,i=t.length-n-1,r=Math.min(i,o);try{let s=atob(t.slice(n+1,n+1+r-r%4)),a=new Uint8Array(s.length);for(let c=0;c<s.length;c++)a[c]=s.charCodeAt(c);return a}catch{return null}}function Md(t){let e=kd(t,4096);if(!e||e.length<16)return null;let n=o=>e[o]<<8|e[o+1];if(e[0]===137&&e[1]===80&&e.length>=24)return{w:(e[16]<<24|e[17]<<16|e[18]<<8|e[19])>>>0,h:(e[20]<<24|e[21]<<16|e[22]<<8|e[23])>>>0};if(e[0]===71&&e[1]===73&&e[2]===70)return{w:e[6]|e[7]<<8,h:e[8]|e[9]<<8};if(e[0]===82&&e[1]===73&&e[8]===87&&e.length>=30){let o=e[15];if(o===32&&e[23]===157)return{w:(e[26]|e[27]<<8)&16383,h:(e[28]|e[29]<<8)&16383};if(o===76)return{w:(e[21]|(e[22]&63)<<8)+1,h:((e[22]>>6|e[23]<<2|(e[24]&15)<<10)&16383)+1};if(o===88)return{w:(e[24]|e[25]<<8|e[26]<<16)+1,h:(e[27]|e[28]<<8|e[29]<<16)+1}}if(e[0]===255&&e[1]===216){let o=2;for(;o+9<e.length;){if(e[o]!==255){o++;continue}let i=e[o+1];if(i===216||i===1||i>=208&&i<=215){o+=2;continue}if(i>=192&&i<=207&&i!==196&&i!==200&&i!==204)return{h:n(o+5),w:n(o+7)};let r=n(o+2);if(r<2)break;o+=2+r}}return null}function Wa(t,e,n,o){let i=Math.min(1,Math.max(n/t,o/e));return!(i>0)||i>=.95?0:i}var Ad=`self.onmessage = async (e) => {
var yc=Object.defineProperty;var at=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(o){throw n=[o],o}};var pe=(t,e)=>{for(var n in e)yc(t,n,{get:e[n],enumerable:!0})};function Ai(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function _i(t="soft"){t==="disabled"&&(H.computedStyle=new WeakMap,H.measureHints=new WeakMap,H.baseStyle=new ct(50),H.defaultStyle=new ct(64),H.image=new ct(100),H.background=new ct(100),H.resource=new ct(150),H.compress=new ct(50))}var ct,H,kt=at(()=>{"use strict";ct=class extends Map{constructor(e=100,...n){super(...n),this._maxSize=e}set(e,n){if(this.size>=this._maxSize&&!this.has(e)){let o=this.keys().next().value;o!==void 0&&this.delete(o)}return super.set(e,n)}},H={image:new ct(100),background:new ct(100),resource:new ct(150),defaultStyle:new ct(64),baseStyle:new ct(50),compress:new ct(50),computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function he(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function wc(t){let e=[],n=0,o=0,i="";for(let r=0;r<t.length;r++){let s=t[r];if(s==="\\"){r++;continue}i?s===i&&(i=""):s==='"'||s==="'"?i=s:s==="("?o++:s===")"?o--:s===","&&o===0&&(e.push(t.slice(n,r)),n=r+1)}return e.push(t.slice(n)),e}function ln(t,e=1){let n=t.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let o=[];for(let r of wc(n[1])){let s=r.match(/url\((['"]?)(.*?)(\1)\)/);if(!s)continue;let a=r.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(a&&!bc.test(a[1].trim()))continue;let l=r.replace(/url\((['"]?)[\s\S]*?\1\)/," ").match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)\b/i),u=1;if(l){let c=parseFloat(l[1]);u=/dpi/i.test(l[2])?c/96:c}o.push({url:s[2].trim(),dppx:u})}return o.length?(o.sort((r,s)=>r.dppx-s.dppx),(o.find(r=>r.dppx>=e)||o[o.length-1]).url):null}function zo(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,o)=>{let i=o.split(",").map(r=>r.trim());return i.length!==6?`matrix(${o})`:(i[4]="0",i[5]="0",`matrix(${i.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,o)=>{let i=o.split(",").map(r=>r.trim());return i.length!==16?`matrix3d(${o})`:(i[12]="0",i[13]="0",`matrix3d(${i.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function te(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function Ho(t,e){if(!t||/^(data|blob|about|#)/i.test(t.trim()))return t;try{let n=e||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(t,n).href}catch{return t}}function cn(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function jo(t){return"\u2022".repeat(String(t??"").length)}function st(t,e){return t?.nodeType===1&&t.localName===e}function Et(t){return t?.nodeType===1&&t.namespaceURI===xc}function It(t){return t?.nodeType===1&&t.namespaceURI===Sc}function Gt(t){return t?.nodeType===11&&!!t.host}function Wt(t){let e=t?.parentNode;return e?.nodeType===11?e.host:null}function Vo(t){return t?.nodeType===9}var Uo,bc,xc,Sc,Rt=at(()=>{"use strict";Uo=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,bc=Uo;xc="http://www.w3.org/1999/xhtml",Sc="http://www.w3.org/2000/svg"});function vc(t="[SnapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let o=new Map,i=0;function r(s,a,l){if(i>=n)return;let u=Date.now();(o.get(a)||0)>u||(o.set(a,u+e),i++,s==="warn"&&console&&console.warn?console.warn(`${t} ${l}`):console&&console.error&&console.error(`${t} ${l}`))}return{warnOnce(s,a){r("warn",s,a)},errorOnce(s,a){r("error",s,a)},reset(){o.clear(),i=0}}}function Fi(t,e,n){if(qt.size>=Ri){let o=Date.now();for(let[i,r]of qt)r.until<=o&&qt.delete(i);for(;qt.size>=Ri;)qt.delete(qt.keys().next().value)}qt.set(t,{until:Date.now()+n,result:e})}function Cc(t){return/^data:|^blob:|^about:blank$/i.test(t)}function kc(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=e.split(/\{url(?:Raw)?\}/)[0],i=new URL(o||".",n);if(new URL(t,n).origin===i.origin)return!0}catch{}return!1}function Mc(t,e){if(!e||Cc(t)||kc(t,e))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=new URL(t,n);return typeof location<"u"?o.origin!==location.origin:!0}catch{return!!e}}function Ac(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>te(t)).replace("{url}",()=>encodeURIComponent(t));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(t)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(t)}`;if(e.endsWith("/"))return`${e}${te(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function Ti(t){return new Promise((e,n)=>{let o=new FileReader;o.onload=()=>e(String(o.result||"").replace(/^data:[^,]*/,i=>i.replace(/\s+/g,""))),o.onerror=()=>n(new Error("read_failed")),o.readAsDataURL(t)})}function _c(t,e){return new Headers(e.headers||{}).keys().next().done?JSON.stringify([e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,e.credentials||"",t]):null}function $i(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function qo(t,e){try{t.onError?.(e)}catch{}}async function lt(t,e={}){let n=e.as??"blob",o=e.timeout??3e3,i=e.useProxy||"",r=e.errorTTL??8e3,s=e.headers||{},a=!!e.debug;if(/^data:/i.test(t))try{if(n==="text")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1,mime:String(t).slice(5).split(";")[0]||""};let[,g="",y=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(g)?atob(y):decodeURIComponent(y),S=new Uint8Array([...w].map(C=>C.charCodeAt(0))),k=new Blob([S],{type:(g||"").split(";")[0]||""});return{ok:!0,data:k,status:200,url:t,fromCache:!1,mime:k.type||""}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let g=await fetch(t);if(!g.ok)return{ok:!1,data:null,status:g.status,url:t,fromCache:!1,reason:"http_error"};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ti(y),blob:y,status:g.status,url:t,fromCache:!1,mime:b}:n==="text"?{ok:!0,data:await y.text(),status:g.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:t,fromCache:!1,mime:b}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let l;try{l=_c(t,{as:n,timeout:o,useProxy:i,errorTTL:r,credentials:e.credentials,headers:s})}catch{let g={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return qo(e,g),g}let u=qt.get(l);if(u&&u.until>Date.now())return{...u.result,fromCache:!0};u&&qt.delete(l);let c=Go.get(l);if(c)return c;let f=Mc(t,i)?Ac(t,i):t,d=e.credentials;if(!d)try{let g=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(t,g);d=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{d="omit"}let h=new AbortController,m=setTimeout(()=>h.abort("timeout"),o),p=(async()=>{try{let g=await fetch(f,{signal:h.signal,credentials:d,headers:s});if(!g.ok){let w={ok:!1,data:null,status:g.status,url:f,fromCache:!1,reason:"http_error"};if(l!==null&&r>0&&Fi(l,w,r),a){let S=`${g.status} ${g.statusText||""}`.trim();Ei.warnOnce(`http:${g.status}:${n}:${$i(t)}`,`Couldn't load ${t} (HTTP ${S}).`)}return qo(e,w),w}if(n==="text")return{ok:!0,data:await g.text(),status:g.status,url:f,fromCache:!1};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ti(y),blob:y,status:g.status,url:f,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:f,fromCache:!1,mime:b}}catch(g){let y=h.signal.aborted?h.signal.reason==="timeout"?"timeout":"abort":g&&typeof g=="object"&&g.name==="AbortError"?"abort":"network",b={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:y};if(l!==null&&!/^blob:/i.test(t)&&r>0&&Fi(l,b,r),a){let w=`${y}:${n}:${$i(t)}`,S=y==="timeout"?`Timed out loading ${t} after ${o}ms. Raise the timeout option or set useProxy.`:y==="abort"?`Loading ${t} was cancelled.`:`Couldn't load ${t} (network or CORS). Try the useProxy option.`;Ei.errorOnce(w,S)}return qo(e,b),b}finally{clearTimeout(m),Go.delete(l)}})();return l!==null&&Go.set(l,p),p}var Ei,Go,Ri,qt,me=at(()=>{"use strict";Rt();Ei=vc("[SnapDOM]",{ttlMs:3*6e4,maxEntries:10}),Go=new Map,Ri=50,qt=new Map});async function Te(t,e={}){if(/^\s*url\(\s*['"]?data:/i.test(t)||/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let o=ln(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??he(t);if(!o)return t;let i=Ho(o),r=te(i),s=(e.useProxy||"")+"|"+r;if(H.background.has(s)){let a=H.background.get(s);return a?`url("${a}")`:"none"}try{let a=await lt(r,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});return a.ok?(H.background.set(s,a.data),`url("${a.data}")`):(H.background.set(s,null),"none")}catch{return H.background.set(s,null),"none"}}var Pi=at(()=>{"use strict";kt();Rt();me()});function Ii(t,e){if(Ec.has(e))t.add(e);else if(e.startsWith("transform-origin-"))t.add("transform-origin");else return!1;return!0}function Di(t){let e=t.replace(Pc,"").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function Bi(t,e,n,o){for(let i=0;i<t.length;i++){if(--o.budget<0)return!1;let r=t[i],s=r.style,a=!1,l=!1;if(s){let c=!!r.selectorText&&Wi.test(r.selectorText);for(let f=0;f<s.length;f++){let d=s[f];if(e.add(d),o.svgGeometry&&(Ii(o.svgGeometry,d)?a=!0:Rc.test(d)&&(l=!0)),c&&o.pseudoProps.add(d),s.getPropertyPriority(d)&&o.importantProps.add(d),d.length>5&&(d[0]==="m"||d[0]==="p")){let h=d.startsWith("margin")?"marginUnstable":d.startsWith("padding")?"paddingUnstable":null;h&&!o[h]&&$c.test(s.getPropertyValue(d))&&(o[h]=!0)}}}let u=r.selectorText;if(u&&u.includes(":has(")&&(o.usesHas=!0),u&&/[+~]|:has\(|:nth-(?:last-)?child\([^)]*\bof\b/i.test(u)&&(o.leaksAcrossSubtrees=!0),s&&(s.counterReset||s.counterIncrement||s.counterSet||s.content&&s.content.includes("counter"))&&(o.leaksAcrossSubtrees=!0),u&&u.includes("&"))for(let c=r.parentRule;c&&u.includes("&");c=c.parentRule)c.selectorText&&(u=u.replace(/&/g,`:is(${c.selectorText})`));if(u&&(o.inContainer||Li.test(u)||u.includes("+")||u.includes("~")))for(let c of Pn(u,",")){let f=c.trim();f&&(o.inContainer||Li.test(f)||f.includes("+")||f.includes("~"))&&o.shareUnsafeSels.add(f)}if((a||l)&&Nc(r,u,a,o),u&&u.includes(":"))for(let c in Ni)Ni[c].test(u)&&n[c].push(Di(u));if(r.styleSheet){if(!$n(r.styleSheet,e,n,o))return!1}else if(r.cssRules&&r.cssRules.length){let c=r.constructor?.name==="CSSContainerRule",f=r.constructor?.name==="CSSScopeRule";c&&o.inContainer++,f&&(o.inScope=(o.inScope||0)+1);let d=Bi(r.cssRules,e,n,o);if(c&&o.inContainer--,f&&o.inScope--,!d)return!1}}return!0}function Nc(t,e,n,o){if(n&&t.constructor?.name==="CSSKeyframeRule"){o.svgKeyframes=!0;return}if(!e||o.inScope){n&&(o.svgGeometryAll=!0);return}let i=n?o.svgGeometrySels:o.svgAnimSels;for(let r of Pn(e,",")){let s=r.trim();s&&i.add(Wi.test(s)?Di(s):s)}}function $n(t,e,n,o){let i;try{i=t.cssRules}catch{i=o.crossOriginRules?.(t)}return i?Bi(i,e,n,o):!1}function Yo(t,e){for(let n of t){let o=n.effect?.getKeyframes?.()||[];for(let i of o)for(let r of Object.keys(i))r==="offset"||r==="easing"||r==="composite"||r==="computedOffset"||e.add(r.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function Ui(t){let e=new Set;return $n(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:Oi,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function Pn(t,e){if(!t.includes(e))return[t];let n=[],o=0,i=null,r=0;for(let s=0;s<t.length;s++){let a=t[s];if(a==="\\"){s++;continue}if(i){a===i&&(i=null);continue}a==='"'||a==="'"?i=a:a==="("||a==="["?o++:a===")"||a==="]"?o--:o===0&&a===e&&(n.push(t.slice(r,s)),r=s+1)}return n.push(t.slice(r)),n}function Lc(t){let e=0,n=null,o=0;for(let c=0;c<t.length;c++){let f=t[c];if(n){f===n&&t[c-1]!=="\\"&&(n=null);continue}f==='"'||f==="'"?n=f:f==="("||f==="["?e++:f===")"||f==="]"?e--:e===0&&(f===" "||f===">"||f==="+"||f==="~")&&(o=c+1)}let i="",r=0;for(let c of t.slice(o))c==="("||c==="["?r++:c===")"||c==="]"?r--:r===0&&(i+=c);let s=c=>!c||/\\[0-9a-fA-F]/.test(c)?null:c.replace(/\\(.)/g,"$1"),a=s((i.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let l=s((i.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(l)return"i"+l;let u=(i.match(/^([a-zA-Z][\w-]*)/)||[])[1];return u?"t"+u.toLowerCase():null}function zi(t,e){if(!e.length)return"";if(e.some(o=>o.includes("&")))return null;let n=e.join(",");try{return t.matches(n),n}catch{return null}}function Ic(t,e){let n=t.createElement("div"),o={};for(let i in e){let r=e[i];(i==="before"||i==="after")&&r.push("q"),o[i]=zi(n,r)}return o}function Hi(t,e){let n={universe:null,pseudoUniverse:null,svgGeometry:null,svgGeometrySel:null,usesHas:!0,leaksAcrossSubtrees:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let o=new Set(Xo),i={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},r={budget:Oi,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set,svgGeometry:new Set,svgGeometrySels:new Set,svgAnimSels:new Set,svgKeyframes:!1,svgGeometryAll:!1,inScope:0,crossOriginRules:e};for(let f of t.styleSheets)if(!$n(f,o,i,r))return n;let s=t.adoptedStyleSheets;if(Array.isArray(s)){for(let f of s)if(!$n(f,o,i,r))return n}if(typeof t.getAnimations=="function"){let f=new Set;Yo(t.getAnimations(),f);for(let d of f)o.add(d),Ii(r.svgGeometry,d)&&(r.svgGeometryAll=!0)}if(r.svgKeyframes)for(let f of r.svgAnimSels)r.svgGeometrySels.add(f);let a=r.svgGeometryAll?null:Array.from(r.svgGeometrySels).join(","),l=Array.from(r.shareUnsafeSels),u=zi(t.createElement("div"),l)===null?null:l.map(f=>({sel:f,key:Lc(f)})),c=new Set(Tc);for(let f of Fc)o.has(f)&&c.add(f);for(let f of r.pseudoProps)c.add(f);return(r.pseudoProps.has("transform")||r.pseudoProps.has("rotate")||r.pseudoProps.has("scale"))&&c.add("transform-origin"),r.pseudoProps.has("perspective")&&c.add("perspective-origin"),{universe:o,pseudoUniverse:c,svgGeometry:r.svgGeometry,svgGeometrySel:a,pseudoGates:Ic(t,i),usesHas:r.usesHas,leaksAcrossSubtrees:r.leaksAcrossSubtrees,shareGate:u,marginUnstable:r.marginUnstable,paddingUnstable:r.paddingUnstable,importantProps:r.importantProps}}catch{return n}}var Ec,Rc,Xo,Fc,Tc,Wi,Oi,$c,Ni,Pc,Li,Nn=at(()=>{"use strict";Ec=new Set(["r","cx","cy","rx","ry","x","y","width","height","d","transform","translate","rotate","scale","transform-origin","transform-box","vector-effect"]);Rc=/^(?:animation|transition)/,Xo=["display","position","top","right","bottom","left","float","clear","z-index","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","visibility","opacity","content-visibility","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","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","order","align-items","align-self","align-content","justify-content","justify-items","justify-self","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-auto-flow","grid-auto-columns","grid-auto-rows","grid-column-start","grid-column-end","grid-row-start","grid-row-end","color","font-family","font-size","font-weight","font-style","font-stretch","line-height","letter-spacing","word-spacing","white-space","text-align","text-transform","text-indent","text-overflow","text-shadow","direction","unicode-bidi","writing-mode","text-orientation","word-break","overflow-wrap","tab-size","list-style-type","list-style-position","list-style-image","counter-reset","counter-increment","counter-set","background-color","background-image","background-size","background-position","background-repeat","background-clip","background-origin","background-attachment","box-shadow","outline-width","outline-style","outline-color","outline-offset","transform","transform-origin","rotate","scale","translate","filter","mix-blend-mode","clip-path","object-fit","object-position","border-collapse","border-spacing","table-layout","caption-side","empty-cells"],Fc=["color","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-kerning","font-feature-settings","font-variation-settings","line-height","letter-spacing","word-spacing","white-space","text-align","text-align-last","text-indent","text-transform","text-shadow","text-rendering","direction","unicode-bidi","word-break","overflow-wrap","writing-mode","text-orientation","hyphens","tab-size","visibility","list-style-type","list-style-position","list-style-image","border-collapse","border-spacing","caption-side","empty-cells","quotes","color-scheme","-webkit-text-fill-color","-webkit-font-smoothing","image-rendering"],Tc=["display","width","height","min-width","min-height"],Wi=/::?(?:before|after|first-letter|first-line|marker)/,Oi=2e4,$c=/%|\bauto\b|calc\(|var\(/i,Ni={before:/::?before\b/,after:/::?after\b/,firstLetter:/::?first-letter\b/,marker:/::marker\b/,firstLine:/::?first-line\b/},Pc=/::?(?:before|after|first-letter|first-line|marker)\b/g;Li=/:(nth-|first-child|last-child|only-|first-of-type|last-of-type|empty|hover|focus|active|target|checked|indeterminate|disabled|enabled|read-only|read-write|placeholder-shown|autofill|valid|invalid|user-valid|user-invalid|in-range|out-of-range|required|optional|default|link|any-link|scope|defined|modal|fullscreen|picture-in-picture|playing|paused|dir\(|lang\(|has\()/});function tt(t){return ji.add(t),t.setAttribute("data-snapdom-internal",""),t}function ee(t){return ji.has(t)}var ji,Ft=at(()=>{"use strict";ji=new WeakSet});function Jo(t){if(t=String(t).toLowerCase(),fn.has(t)){let r={};return H.defaultStyle.set(t,r),r}if(H.defaultStyle.has(t))return H.defaultStyle.get(t);let e=[...document.querySelectorAll("#snapdom-sandbox")].find(ee);e||(e=document.createElement("div"),tt(e),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t.includes("-")?"span":t);n.style.all="initial",e.appendChild(n);let o=getComputedStyle(n),i={};for(let r of o){if($e(r))continue;let s=o.getPropertyValue(r);i[r]=s}for(let r of Xo)!(r in i)&&!$e(r)&&(i[r]=o.getPropertyValue(r));return e.removeChild(n),H.defaultStyle.set(t,i),i}function $e(t){let e=Vi.get(t);if(e===void 0){let n=String(t).toLowerCase();e=Dc.has(n)||Oc.test(n)||Wc.test(n),Vi.set(t,e)}return e}function Xi(t,e){let n=jc.get(t);if(n===void 0||e[n]!==e[t])return!1;let o=e["writing-mode"];if(o&&o!=="horizontal-tb")return!1;let i=e.direction;return!(i&&i!=="ltr")}function Ln(t,e){return!Uc.has(t)&&(e==="inline"||Bc.has(t)||qi.has(t))}function Qo(t,e,n){let o=(e.display||"").toLowerCase();if(o==="inline"||qi.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let r=(e.position||"static").toLowerCase();return r==="absolute"||r==="fixed"?!1:!Gc.has(o)}function Pe(t,e,n=!0,o=!1){if(e=String(e||"").toLowerCase(),fn.has(e))return"";let i=[],r=Jo(e),s=(t.display||"").toLowerCase(),a=s==="inline",l=Ln(e,s),u=t["text-wrap-mode"]||t["white-space"]||"",c=u==="nowrap"||u==="pre",d=l&&n&&!(l&&n&&!a&&c),h=!1;for(let m in t){if($e(m)||Xi(m,t))continue;let p=t[m];if(!(Gi.has(m)&&zc.has(e))){if(d){if(Gi.has(m))continue;if(Hc.has(m)){p&&p!==r[m]&&(i.push(`${m}:${p}`),p!=="auto"&&(h=!0));continue}}if(p&&p!==r[m]){if((m==="height"||m==="block-size"||!c&&(m==="width"||m==="inline-size"))&&p.endsWith("px")&&p.includes(".")){let y=parseFloat(p);if(Number.isFinite(y)){i.push(`${m}:${(y+Vc).toFixed(3)}px`);continue}}i.push(`${m}:${p}`)}}}if(d&&!a&&!o&&!h){let m=t.width;m&&m!=="auto"&&m!==r.width&&i.push(`min-width:${m}`)}return i.sort(),i.join(";")}function Zo(t){let e=new Set;return t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(t.tagName&&e.add(t.tagName.toLowerCase()),typeof t.querySelectorAll=="function"&&t.querySelectorAll("*").forEach(n=>e.add(n.tagName.toLowerCase())),Array.from(e))}function tr(t,e=null){let n=new Map;for(let s of t){let a=Jo(s);if(!a)continue;let c=(e?Object.entries(a).filter(([d])=>e.has(d)):Object.entries(a)).filter(([d])=>!Xi(d,a)).map(([d,h])=>`${d}:${h};`).sort(),f=c.join("");f&&(n.has(f)||n.set(f,{tagList:[],declarations:c}),n.get(f).tagList.push(s))}let o=[...n.values()],i=null;for(let{declarations:s}of o){let a=new Set(s);if(!i){i=a;continue}for(let l of i)a.has(l)||i.delete(l)}i??=new Set;let r="";if(i.size&&o.length>1){let s=o.flatMap(a=>a.tagList);r+=`${s.join(",")} { ${[...i].join("")} }
`}for(let{tagList:s,declarations:a}of o){let l=o.length>1?a.filter(c=>!i.has(c)):a;if(!l.length)continue;let u=l.join("");r+=`${s.join(",")} { ${u} }
`}return r}function un(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,o=1;for(let i of e)n.set(i,`c${o++}`);return n}function qc(t){try{let e=t?.ownerDocument;if(!e)return typeof window<"u"?window:null;let n=e.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let o=0;o<window.frames.length;o++)try{if(window.frames[o]?.document===e)return window.frames[o]}catch{}}catch{}return typeof window<"u"?window:null}function D(t,e=null){let n=()=>{let r={length:0,getPropertyValue:()=>"",item:()=>""};return r[Symbol.iterator]=function*(){},r};if(t?.nodeType!==1){let r=typeof window<"u"?window:null;if(r&&typeof r.getComputedStyle=="function")try{return r.getComputedStyle(t,e)||n()}catch{return n()}return n()}let o=H.computedStyle.get(t);o||(o=new Map,H.computedStyle.set(t,o));let i=o.get(e);if(!i){let r=qc(t),s=null;try{s=r&&typeof r.getComputedStyle=="function"?r.getComputedStyle(t,e):null}catch{}if(!s&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(s=window.getComputedStyle(t,e))}catch{}i=s||n(),o.set(e,i)}return i}function Ne(t,e=null){let n={};for(let o of e||t){let i=t.getPropertyValue(o);i&&(n[o]=i)}for(let o of Xc){let i=n[`border-${o}-style`],r=n[`border-${o}-width`];(i==="none"||i==="hidden"||r==="0px")&&(delete n[`border-${o}-style`],delete n[`border-${o}-width`],delete n[`border-${o}-color`])}return n}function ne(t){let e=[],n=0,o=0;for(let i=0;i<t.length;i++){let r=t[i];r==="("&&n++,r===")"&&n--,r===","&&n===0&&(e.push(t.slice(o,i).trim()),o=i+1)}return e.push(t.slice(o).trim()),e}var Ko,fn,Wc,Oc,Dc,Vi,Bc,qi,Uc,Gi,zc,Hc,jc,Vc,Gc,Xc,Le=at(()=>{"use strict";kt();Nn();Ft();Ko=new Set(["meta","script","noscript","title","link","template"]),fn=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]);Wc=/(?:^|-)(animation|transition)(?:-|$)/i,Oc=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Dc=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),Vi=new Map;Bc=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),qi=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Uc=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Gi=new Set(["width","max-width","inline-size","max-inline-size"]),zc=new Set(["mi","mn","mo","ms","mtext"]),Hc=new Set(["min-width","min-inline-size"]),jc=new Map(Object.entries({"block-size":"height","inline-size":"width","min-block-size":"min-height","min-inline-size":"min-width","max-block-size":"max-height","max-inline-size":"max-width","margin-block-start":"margin-top","margin-block-end":"margin-bottom","margin-inline-start":"margin-left","margin-inline-end":"margin-right","padding-block-start":"padding-top","padding-block-end":"padding-bottom","padding-inline-start":"padding-left","padding-inline-end":"padding-right","inset-block-start":"top","inset-block-end":"bottom","inset-inline-start":"left","inset-inline-end":"right","border-block-start-width":"border-top-width","border-block-start-style":"border-top-style","border-block-start-color":"border-top-color","border-block-end-width":"border-bottom-width","border-block-end-style":"border-bottom-style","border-block-end-color":"border-bottom-color","border-inline-start-width":"border-left-width","border-inline-start-style":"border-left-style","border-inline-start-color":"border-left-color","border-inline-end-width":"border-right-width","border-inline-end-style":"border-right-style","border-inline-end-color":"border-right-color","border-start-start-radius":"border-top-left-radius","border-start-end-radius":"border-top-right-radius","border-end-start-radius":"border-bottom-left-radius","border-end-end-radius":"border-bottom-right-radius","overflow-block":"overflow-y","overflow-inline":"overflow-x","overscroll-behavior-block":"overscroll-behavior-y","overscroll-behavior-inline":"overscroll-behavior-x","contain-intrinsic-block-size":"contain-intrinsic-height","contain-intrinsic-inline-size":"contain-intrinsic-width"}));Vc=.001;Gc=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]);Xc=["top","right","bottom","left"]});function wt(t=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(e=>{let n=!1,o=()=>{n||(n=!0,e())};try{requestAnimationFrame(o)}catch{o();return}setTimeout(o,t)})}function Ki(t){if(t!==!1&&t!=="auto")return null;let e=performance.now()+(t==="auto"?Yc:Yi),n=null,o={yielded:!1,due:()=>performance.now()>=e,pause:()=>n||(n=new Promise(i=>{let r=()=>{n=null,o.yielded=!0,e=performance.now()+Yi,i()},s=new MessageChannel;s.port1.onmessage=r,s.port2.postMessage(0)}))};return o}function dn(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let t=navigator.userAgent||"",e=/iPhone|iPad|iPod/.test(t),n=navigator.maxTouchPoints>2&&/Macintosh/.test(t);return e||n}function Y(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"",e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),o=/applewebkit/i.test(t),i=/mobile/i.test(t),r=!/safari/i.test(t),s=o&&i&&r,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),u=/ipad|iphone|ipod/.test(e)&&o;return n||s||a||l||u}function Mt(){return typeof navigator>"u"?!1:(navigator.userAgent||"").toLowerCase().includes("firefox")}var Yi,Yc,gt=at(()=>{"use strict";Yi=16,Yc=40});function W(t,e,n){let o=t&&typeof t=="object"&&(t.options||t);o&&o.debug&&(n!==void 0?console.warn("[SnapDOM]",e,n):console.warn("[SnapDOM]",e))}function nt(t,e,n,o){let i=t&&t.warnings;i&&i.length<Kc&&i.push(o===void 0?{code:e,message:n}:{code:e,message:n,detail:o})}var Kc,xt=at(()=>{"use strict";Kc=50});var At=at(()=>{"use strict";Pi();Le();gt();Rt();xt()});var Gl={};pe(Gl,{MAX_RASTER_AREA:()=>fe,MAX_RASTER_SIDE:()=>zt,WEBP_MAX_SIDE:()=>pi,__setDecodeFrameIdleMs:()=>mh,cropSvgText:()=>$o,decodeSvgFromDataURL:()=>Me,encodeSvgToDataURL:()=>Ae,fixSafariShadows:()=>No,peekSvgHeader:()=>Po,toCanvas:()=>Yt});function rh(t,e){let n=e.__session;try{let o=t.match(/<svg\b[^>]*>/i);if(!o)return t;let i=o[0],r=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),s=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(s)||r<=0||s<=0)return t;let a=Math.min(1,zt/r,zt/s,Math.sqrt(fe/(r*s)));if(a>=1)return t;let l=Math.max(1,Math.floor(r*a)),u=Math.max(1,Math.floor(s*a));return nt(n,"raster-clamp",`capture ${Math.round(r)}x${Math.round(s)}px exceeds decode limits; downscaled to ${l}x${u}px`),W(e,`${Math.round(r)}\xD7${Math.round(s)}px is too large for the browser to draw; scaled down to ${l}\xD7${u}px. For full size, export ${typeof CompressionStream=="function"?"a PNG or JPEG":"a JPEG"} blob, an SVG, or crop.`),t.replace(i,i.replace(/(\bwidth=")[\d.]+/i,`$1${l}`).replace(/(\bheight=")[\d.]+/i,`$1${u}`))}catch{return t}}function $o(t,e,{shiftContent:n=Y()}={}){let o=["x","y","width","height"].map(M=>Number(e?.[M]));if(!o.every(Number.isFinite)||o[2]<=0||o[3]<=0)throw new RangeError("[SnapDOM] crop needs finite x/y and a positive width/height.");let i=t.match(/<svg\b[^>]*>/i);if(!i)throw new Error("[SnapDOM] Only SVG captures can be cropped.");let r=i[0],s=(r.match(/\bviewBox="([^"]+)"/i)||[])[1],a=String(s||"").trim().split(/[\s,]+/).map(Number);if(a.length!==4||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("[SnapDOM] Can't crop: the SVG has no valid viewBox.");let[l,u,c,f]=a,d=Math.max(l,o[0]),h=Math.max(u,o[1]),m=Math.min(l+c,o[0]+o[2]),p=Math.min(u+f,o[1]+o[3]);if(!(m>d)||!(p>h))throw new RangeError("[SnapDOM] The crop area does not intersect the capture.");let g=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),y=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]),b=Number.isFinite(g)&&g>0?g/c:1,w=Number.isFinite(y)&&y>0?y/f:1,S=Math.max(1,(m-d)*b),k=Math.max(1,(p-h)*w),C=r.replace(/(\bwidth=")[^"]*/i,`$1${S}`).replace(/(\bheight=")[^"]*/i,`$1${k}`),x=n?ih(t,r,d,h):null;if(x)return C.replace(/(\bviewBox=")[^"]*/i,(v,_)=>`${_}0 0 ${m-d} ${p-h}`)+x.slice(r.length);let A=C.replace(/(\bviewBox=")[^"]*/i,`$1${d} ${h} ${m-d} ${p-h}`);return t.replace(r,A)}function ih(t,e,n,o){if(!t.startsWith(e))return null;let i=/^\s*<foreignObject\b[^>]*>/i.exec(t.slice(e.length,e.length+2048));if(!i)return null;let r=i[0],s=(u,c,f)=>{let d=new RegExp(`(\\s${c}=")([^"]*)`),h=u.match(d),m=h?parseFloat(h[2]):0;return Number.isFinite(m)?h?u.replace(d,(p,g)=>`${g}${m-f}`):u.replace(/^(\s*<foreignObject\b)/i,(p,g)=>`${g} ${c}="${-f}"`):null},a=s(r,"x",n),l=a&&s(a,"y",o);return l?e+l+t.slice(e.length+r.length):null}function ci(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function Me(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function Po(t){let e=t.indexOf(",");if(e<0)return"";let n=t.slice(e+1,e+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}function Ae(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function zl(t){let e=[],n="",o=0;for(let i=0;i<t.length;i++){let r=t[i];r==="("&&o++,r===")"&&(o=Math.max(0,o-1)),r===";"&&o===0?(e.push(n),n=""):n+=r}return n.trim()&&e.push(n),e.map(i=>i.trim()).filter(Boolean)}function sh(t){let e=[],n="",o=0;for(let r=0;r<t.length;r++){let s=t[r];s==="("&&o++,s===")"&&(o=Math.max(0,o-1)),s===","&&o===0?(e.push(n.trim()),n=""):n+=s}n.trim()&&e.push(n.trim());let i=[];for(let r of e){if(/\binset\b/i.test(r))continue;let s=r.match(/-?\d+(?:\.\d+)?px/gi)||[],[a="0px",l="0px",u="0px"]=s;u=`${parseFloat(u)/2}px`;let c=r.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),f=!!c&&c!==",";i.push(`drop-shadow(${a} ${l} ${u}${f?` ${c}`:""})`)}return i.join(" ")}function Hl(t){let e=zl(t),n=null,o=null,i=null,r=[];for(let a of e){let l=a.indexOf(":");if(l<0)continue;let u=a.slice(0,l).trim().toLowerCase(),c=a.slice(l+1).trim();u==="box-shadow"?i=c:u==="filter"?n=c:u==="-webkit-filter"?o=c:r.push([u,c])}if(i){let a=sh(i);a&&(n=n?`${n} ${a}`:a,o=o?`${o} ${a}`:a)}let s=[...r];return n&&s.push(["filter",n]),o&&s.push(["-webkit-filter",o]),s.map(([a,l])=>`${a}:${l}`).join(";")}function ah(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,o)=>`${n}{${Hl(o)}}`)}function lh(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,ah(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,o)=>`style=${n}${Hl(o)}${n}`),t}function ch(){return Eo||(Eo=(async()=>{try{let t='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',e=new Image;e.decoding="sync",e.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await e.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let o=n.getContext("2d",{willReadFrequently:!0});o.drawImage(e,0,0);let i=o.getImageData(2,18,1,1).data[3]>128,r=o.getImageData(2,2,1,1).data[3]>128;return{native:i||r,flippedY:r&&!i}}catch{return{native:!1,flippedY:!1}}})(),Eo)}function fh(t){let e=[],n=0,o=0;for(let i=0;i<t.length;i++){let r=t[i];r==="("?n++:r===")"?n=Math.max(0,n-1):r===","&&n===0&&(e.push(t.slice(o,i)),o=i+1)}return e.push(t.slice(o)),e.map(i=>{let r=0,s=0,a="",l=0;for(;l<i.length;){let u=i[l];if(u==="("?r++:u===")"&&(r=Math.max(0,r-1)),r===0&&(l===0||i[l-1]===" ")){let c=/^-?\d*\.?\d+px/.exec(i.slice(l));if(c){s++,a+=s===2?`${-parseFloat(c[0])}px`:c[0],l+=c[0].length;continue}}a+=u,l++}return a}).join(",")}function uh(t,e){let n=o=>zl(o).map(i=>{let r=i.indexOf(":");if(r<0)return i;let s=i.slice(0,r).trim().toLowerCase();return s==="text-shadow"||e&&s==="box-shadow"?`${s}:${fh(i.slice(r+1))}`:i}).join(";");return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(o,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security (javascript.browser.security.insecure-innerhtml): User controlled data in a g.innerHTML is an anti-pattern that can lead to XSS vulnerabilities

Source: opengrep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(Dom2Image): update SnapDOM to v3.4.0

1 participant