From 2e2192fbf42a354ad4d52d4c01a86203e415848f Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 2 Dec 2026 14:37:27 +0800 Subject: [PATCH] feat(Dom2Image): update SnapDOM to v3.9.0 --- .../BootstrapBlazor.Dom2Image.csproj | 2 +- .../wwwroot/lib/snapdom.mjs | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj b/src/components/BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj index b7a96906..41b46466 100644 --- a/src/components/BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj +++ b/src/components/BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj @@ -1,7 +1,7 @@ - 11.0.6 + 11.0.7 bb-dom2image diff --git a/src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs b/src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs index fda03b91..42a348e7 100644 --- a/src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs +++ b/src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs @@ -1,16 +1,16 @@ /* * SnapDOM -* v3.8.3 +* v3.9.0 * License: MIT */ -var ad=Object.defineProperty;var ct=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(o){throw n=[o],o}};var ae=(t,e)=>{for(var n in e)ad(t,n,{get:e[n],enumerable:!0})};function ma(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function ai(t="soft"){t==="disabled"&&(G.computedStyle=new WeakMap,G.measureHints=new WeakMap,G.baseStyle=new Tt(50),G.defaultStyle=new Tt(64),G.image=new Tt(100),G.background=new Tt(100),G.resource=new Tt(150),G.compress=new Map)}var Tt,G,Kt=ct(()=>{"use strict";Tt=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)}},G={image:new Tt(100),background:new Tt(100),resource:new Tt(150),defaultStyle:new Tt(64),baseStyle:new Tt(50),compress:new Map,computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function _e(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function cd(t){let e=[],n=0,o=0,r="";for(let i=0;ii.dppx-s.dppx),(o.find(i=>i.dppx>=e)||o[o.length-1]).url):null}function ci(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,o)=>{let r=o.split(",").map(i=>i.trim());return r.length!==6?`matrix(${o})`:(r[4]="0",r[5]="0",`matrix(${r.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,o)=>{let r=o.split(",").map(i=>i.trim());return r.length!==16?`matrix3d(${o})`:(r[12]="0",r[13]="0",`matrix3d(${r.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function $o(t,e){if(!e)return t;let[n,o,r]=e.zoomed,i=t.indexOf("")+8;if(i<8||!t.startsWith(n)||!t.startsWith(o,i)||!t.endsWith(r))return t;let[s,a,l]=e.flat;return s+t.slice(n.length,i)+a+t.slice(i+o.length,t.length-r.length)+l}function ge(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function fi(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 Hn(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function ui(t){return"\u2022".repeat(String(t??"").length)}function ye(t,e){return t?.nodeType===1&&t.localName===e}function zt(t){return t?.nodeType===1&&t.namespaceURI===fd}function Ut(t){return t?.nodeType===1&&t.namespaceURI===ud}function Ie(t){return t?.nodeType===11&&!!t.host}function Ht(t){let e=t?.parentNode;return e?.nodeType===11?e.host:null}function di(t){return t?.nodeType===9}var li,ld,fd,ud,$t=ct(()=>{"use strict";li=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,ld=li;fd="http://www.w3.org/1999/xhtml",ud="http://www.w3.org/2000/svg"});function dd(t="[SnapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let o=new Map,r=0;function i(s,a,l){if(r>=n)return;let f=Date.now();(o.get(a)||0)>f||(o.set(a,f+e),r++,s==="warn"&&console&&console.warn?console.warn(`${t} ${l}`):console&&console.error&&console.error(`${t} ${l}`))}return{warnOnce(s,a){i("warn",s,a)},errorOnce(s,a){i("error",s,a)},reset(){o.clear(),r=0}}}function ba(t,e,n){if(le.size>=ya){let o=Date.now();for(let[r,i]of le)i.until<=o&&le.delete(r);for(;le.size>=ya;)le.delete(le.keys().next().value)}le.set(t,{until:Date.now()+n,result:e})}function pd(t){return/^data:|^blob:|^about:blank$/i.test(t)}function hd(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=e.split(/\{url(?:Raw)?\}/)[0],r=new URL(o||".",n);if(new URL(t,n).origin===r.origin)return!0}catch{}return!1}function md(t,e){if(!e||pd(t)||hd(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 gd(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>ge(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}${ge(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function wa(t){return new Promise((e,n)=>{let o=new FileReader;o.onload=()=>e(String(o.result||"").replace(/^data:[^,]*/,r=>r.replace(/\s+/g,""))),o.onerror=()=>n(new Error("read_failed")),o.readAsDataURL(t)})}function yd(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 xa(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function hi(t,e){try{t.onError?.(e)}catch{}}async function bt(t,e={}){let n=e.as??"blob",o=e.timeout??3e3,r=e.useProxy||"",i=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[,p="",h=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(p)?atob(h):decodeURIComponent(h),k=new Uint8Array([...w].map(M=>M.charCodeAt(0))),v=new Blob([k],{type:(p||"").split(";")[0]||""});return{ok:!0,data:v,status:200,url:t,fromCache:!1,mime:v.type||""}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let p=await fetch(t);if(!p.ok)return{ok:!1,data:null,status:p.status,url:t,fromCache:!1,reason:"http_error"};let h=await p.blob(),b=h.type||p.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await wa(h),blob:h,status:p.status,url:t,fromCache:!1,mime:b}:n==="text"?{ok:!0,data:await h.text(),status:p.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:h,status:p.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,f;try{l=yd(t,{as:n,timeout:o,useProxy:r,errorTTL:i,credentials:e.credentials,headers:s}),f=md(t,r)?gd(t,r):t}catch{let p={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return hi(e,p),p}let c=le.get(l);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&le.delete(l);let u=pi.get(l);if(u)return u;let d=e.credentials;if(!d)try{let p=typeof location<"u"&&location.href?location.href:"http://localhost/",h=new URL(t,p);d=typeof location<"u"&&h.origin===location.origin?"same-origin":"omit"}catch{d="omit"}let m=new AbortController,g=setTimeout(()=>m.abort("timeout"),o),y=(async()=>{try{let p=await fetch(f,{signal:m.signal,credentials:d,headers:s});if(!p.ok){let w={ok:!1,data:null,status:p.status,url:f,fromCache:!1,reason:"http_error"};if(l!==null&&i>0&&ba(l,w,i),a){let k=`${p.status} ${p.statusText||""}`.trim();ga.warnOnce(`http:${p.status}:${n}:${xa(t)}`,`Couldn't load ${t} (HTTP ${k}).`)}return hi(e,w),w}if(n==="text")return{ok:!0,data:await p.text(),status:p.status,url:f,fromCache:!1};let h=await p.blob(),b=h.type||p.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await wa(h),blob:h,status:p.status,url:f,fromCache:!1,mime:b}:{ok:!0,data:h,status:p.status,url:f,fromCache:!1,mime:b}}catch(p){let h=m.signal.aborted?m.signal.reason==="timeout"?"timeout":"abort":p&&typeof p=="object"&&p.name==="AbortError"?"abort":"network",b={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:h};if(l!==null&&!/^blob:/i.test(t)&&i>0&&ba(l,b,i),a){let w=`${h}:${n}:${xa(t)}`,k=h==="timeout"?`Timed out loading ${t} after ${o}ms. Raise the timeout option or set useProxy.`:h==="abort"?`Loading ${t} was cancelled.`:`Couldn't load ${t} (network or CORS). Try the useProxy option.`;ga.errorOnce(w,k)}return hi(e,b),b}finally{clearTimeout(g),pi.delete(l)}})();return l!==null&&pi.set(l,y),y}var ga,pi,ya,le,be=ct(()=>{"use strict";$t();ga=dd("[SnapDOM]",{ttlMs:3*6e4,maxEntries:10}),pi=new Map,ya=50,le=new Map});async function rn(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=Un(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??_e(t);if(!o)return t;let r=fi(o),i=ge(r),s=(e.useProxy||"")+"|"+i,a=G.background.get(s);if(a)return`url("${a}")`;let l=await bt(i,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});return l.ok?(G.background.set(s,l.data),`url("${l.data}")`):"none"}var Sa=ct(()=>{"use strict";Kt();$t();be()});function ka(t,e){if(bd.has(e))t.add(e);else if(e.startsWith("transform-origin-"))t.add("transform-origin");else return!1;return!0}function mi(t){let e=t.replace(kd,"$1").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function Aa(t,e,n,o){for(let r=0;r5&&(v[0]==="m"||v[0]==="p")){let M=v.startsWith("margin")?"marginUnstable":v.startsWith("padding")?"paddingUnstable":null;M&&!o[M]&&Cd.test(s.getPropertyValue(v))&&(o[M]=!0)}}}let h=a;if(h&&h.includes(":has(")&&(o.usesHas=!0),!o.leaksAcrossSubtrees&&h&&Ad.test(h)&&(o.leaksAcrossSubtrees=!0),h&&h.includes("&"))for(let w=i.parentRule;w&&h.includes("&");w=w.parentRule)w.selectorText&&(h=h.replace(/&/g,`:is(${w.selectorText})`));let b=y!==null&&y.includes("sibling-");if(h&&(b||c||o.inContainer||gi.test(h)||h.includes("+")||h.includes("~")))for(let w of We(h,",")){let k=w.trim();if(k&&(b||c||o.inContainer||gi.test(k)||k.includes("+")||k.includes("~"))){let v=k.replace(/::part\([^)]*\)/g,"")||"*";o.shareUnsafeSels.add(No.test(v)?mi(v):v)}}if((l||f)&&Ed(i,h,l,o),m&&o.chromeSels&&!o.mediaOff&&i.keyText===void 0&&(!h||o.inScope?o.chromeAll=!0:(Ca(h,o.chromeSels),g&&Ca(h,o.borderColorSels))),u&&o.scrollSels&&(!h||o.inScope?o.scrollAll=!0:Ea(h,o.scrollSels)),h&&h.includes(":"))for(let w in va)(w==="before"||w==="after")&&!d||va[w].test(h)&&n[w].push(mi(h));if(i.styleSheet){if(!xi(i.styleSheet,e,n,o))return!1}else if(i.cssRules&&i.cssRules.length){let w=i.constructor?.name==="CSSContainerRule",k=i.constructor?.name==="CSSScopeRule";w&&(o.inContainer++,o.leaksAcrossSubtrees=!0),k&&(o.inScope=(o.inScope||0)+1);let v=Ra(i,o);v&&o.mediaOff++;let M=Aa(i.cssRules,e,n,o);if(v&&o.mediaOff--,w&&o.inContainer--,k&&o.inScope--,!M)return!1}}return!0}function Ed(t,e,n,o){if(n&&t.constructor?.name==="CSSKeyframeRule"){o.svgKeyframes=!0;return}if(!e||o.inScope){n&&(o.svgGeometryAll=!0);return}Ea(e,n?o.svgGeometrySels:o.svgAnimSels)}function Ea(t,e){for(let n of We(t,",")){let o=n.trim();o&&e.add(No.test(o)?mi(o):o)}}function Ra(t,e){if(!e.view)return!1;let n=t.media?.mediaText;try{return!!t.disabled||!!n&&!e.view.matchMedia(n).matches}catch{return!1}}function Ca(t,e){for(let n of We(t,",")){let o=n.trim();o&&!o.includes("::")&&!No.test(o)&&e.add(o)}}function wi(t,e){try{return t.cssRules}catch{return e?.(t)}}function xi(t,e,n,o){let r=wi(t,o.crossOriginRules);if(!r)return!1;let i=o.siblingFn,s=t.ownerNode;o.siblingFn=o.siblingSupport&&(s?.localName!=="style"||s.textContent.includes("sibling-"));let a=Ra(t,o);a&&o.mediaOff++;let l=Aa(r,e,n,o);return a&&o.mediaOff--,o.siblingFn=i,l}function _o(t,e){for(let n of t){let o=n.effect?.getKeyframes?.()||[];for(let r of o)for(let i of Object.keys(r))i==="offset"||i==="easing"||i==="composite"||i==="computedOffset"||e.add(i.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function Fa(t){let e=new Set;return xi(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:Po,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function Ta(t,e){let n=[],o=t.adoptedStyleSheets;for(let r of[t.styleSheets,Array.isArray(o)?o:[]])for(let i of r){let s=wi(i,e);if(!s)return null;let a=s.length;for(let l=0;l"||u==="+"||u==="~")&&(o=c+1)}let r="",i=0;for(let c of t.slice(o))c==="("||c==="["?i++:c===")"||c==="]"?i--:i===0&&(r+=c);let s=c=>!c||/\\[0-9a-fA-F]/.test(c)?null:c.replace(/\\(.)/g,"$1"),a=s((r.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let l=s((r.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(l)return"i"+l;let f=(r.match(/^([a-zA-Z][\w-]*)/)||[])[1];return f?"t"+f.toLowerCase():null}function sn(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 Td(t,e){let n={};for(let o in e){let r=e[o];(o==="before"||o==="after")&&r.push("q"),n[o]=r.some(i=>i.includes(":scope"))?null:sn(t,r)}return n}function Pa(t,e,n=Po){let o={universe:null,pseudoUniverse:null,svgGeometry:null,svgGeometrySel:null,usesHas:!0,leaksAcrossSubtrees:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,scrollGate:null,chromeGate:null,borderColorGate:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let r=new Set(Lo),i={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},s={budget:Po,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,scrollSels:new Set,scrollAll:!1,chromeSels:new Set,borderColorSels:new Set,chromeAll:!1,mediaOff:0,view:t.defaultView,inScope:0,crossOriginRules:e,siblingSupport:CSS.supports("opacity","calc(sibling-index() / 2)")},a=t.adoptedStyleSheets,l=Array.isArray(a)?[...t.styleSheets,...a]:Array.from(t.styleSheets),f=0;for(let b of l){let w=wi(b,e);if(!w)return o;f+=w.length}if(f>Po)return o;if(f>n)return{...o,declined:f};for(let b of l)if(!xi(b,r,i,s))return o;if(typeof t.getAnimations=="function"){let b=new Set;_o(t.getAnimations(),b);for(let w of b)r.add(w),ka(s.svgGeometry,w)&&(s.svgGeometryAll=!0),Ma.has(w)&&(s.scrollAll=!0)}if(s.svgKeyframes)for(let b of s.svgAnimSels)s.svgGeometrySels.add(b);let c=t.createElement("div"),u=s.svgGeometryAll?null:sn(c,Array.from(s.svgGeometrySels)),d=Array.from(s.shareUnsafeSels),m=sn(c,d)===null?null:d.map(b=>({sel:b,key:Fd(b)})),g=new Set(Sd);for(let b of xd)r.has(b)&&g.add(b);for(let b of s.pseudoProps)g.add(b);(s.pseudoProps.has("transform")||s.pseudoProps.has("rotate")||s.pseudoProps.has("scale"))&&g.add("transform-origin"),s.pseudoProps.has("perspective")&&g.add("perspective-origin");let y=s.scrollAll?null:sn(c,[...vd,...s.scrollSels]),p=s.chromeAll?null:sn(c,[...s.chromeSels]),h=s.chromeAll?null:sn(c,[...s.borderColorSels]);return{universe:r,pseudoUniverse:g,svgGeometry:s.svgGeometry,svgGeometrySel:u,pseudoGates:Td(c,i),usesHas:s.usesHas,leaksAcrossSubtrees:s.leaksAcrossSubtrees,shareGate:m,marginUnstable:s.marginUnstable,paddingUnstable:s.paddingUnstable,importantProps:s.importantProps,scrollGate:y,chromeGate:p,borderColorGate:h}}catch{return o}}var bd,wd,Lo,xd,Sd,No,yi,Oe,Ma,bi,vd,Po,Cd,va,kd,Md,Ad,Rd,gi,$a,ce=ct(()=>{"use strict";bd=new Set(["r","cx","cy","rx","ry","x","y","width","height","d","transform","translate","rotate","scale","transform-origin","transform-box","vector-effect"]);wd=/^(?:animation|transition)/,Lo=["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"],xd=["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"],Sd=["display","width","height","min-width","min-height"],No=/(?:^|[^\\])::?(?:before|after|first-letter|first-line|marker)/,yi=/^(?:currentcolor|initial|unset|revert|revert-layer)?$/i,Oe=/^(?:background|border)(?:$|-(?!collapse|spacing))/,Ma=new Set(["overflow","overflow-x","overflow-y","overflow-block","overflow-inline","all"]),bi=new Set(["input","textarea","select","dialog","foreignObject","body","marquee"]),vd=[...bi,"[popover]","[overflow]",'[style*="overflow" i]','[style*="all" i]'],Po=2e4,Cd=/%|\bauto\b|calc\(|var\(/i,va={before:/(?:^|[^\\])::?before\b/,after:/(?:^|[^\\])::?after\b/,firstLetter:/(?:^|[^\\])::?first-letter\b/,marker:/(?:^|[^\\])::marker\b/,firstLine:/(?:^|[^\\])::?first-line\b/},kd=/(\\.)|::?(?:before|after|first-letter|first-line|marker)\b/g,Md=/^(?:content|all|(?:animation|transition)(?:-.*)?)$/,Ad=/[+~]|:has\(|:nth-(?:last-)?child\([^)]*\bof\b/i;Rd=64;gi=/:(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|muted|seeking|buffering|stalled|volume-locked|open|popover-open|state\(|dir\(|lang\(|has\()/,$a=new RegExp(gi.source.replace("hover|focus|active|","")+"|[+~]|@container|container-|\\dcq[whibm]|:host(?:-context)?\\(|::slotted\\(|sibling-|random\\(")});function rt(t){return Na.add(t),t.setAttribute("data-snapdom-internal",""),t}function Vt(t){return Na.has(t)}function Oo(t,e,n){let o=Io.get(t);o?o[1]=n:Io.set(t,[e,n])}function Si(t,e){let n=Io.get(t);return n?e===n[0]||e===n[1]?!0:(Io.delete(t),!1):!1}var Na,Io,wt=ct(()=>{"use strict";Na=new WeakSet;Io=new WeakMap});function ki(t,e=null){if(t=String(t).toLowerCase(),jn.has(t)){let r={};return G.defaultStyle.set(t,r),r}let n=G.defaultStyle.get(t);if(n){let r=Wo.get(n);if(r){if(!e)Do(n,r.probe,null),Wo.delete(n);else if(r.done.get(e)!==e.size){for(let i of e)if(!(i in n)&&we.has(i)){Do(n,r.probe,e);break}r.done.set(e,e.size)}}return n}let o=document.createElement(t.includes("-")?"span":t);return o.style.all="initial",n={},Do(n,o,e),e&&Wo.set(n,{probe:o,done:new WeakMap([[e,e.size]])}),G.defaultStyle.set(t,n),n}function Mi(){let t=[...document.querySelectorAll("#snapdom-sandbox")].find(Vt);return t||(t=document.createElement("div"),rt(t),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t)),t}function Ai(t,e){let n=`${t.localName} ${t.type} ${t.disabled} ${e}`,o=G.defaultStyle.get(n);if(!o){let r=document.createElement(t.localName);t.localName==="input"&&(r.type=t.type),r.disabled=t.disabled,r.style.cssText=`all:revert;color-scheme:${e}`;let i=Mi();i.appendChild(r);let s=getComputedStyle(r);o={};for(let a of s)Oe.test(a)&&(o[a]=s.getPropertyValue(a));i.removeChild(r),G.defaultStyle.set(n,o)}return o}function Ei(t){let e=`${t.localName} ${t.type} border`,n=G.defaultStyle.get(e);if(n===void 0){let o=document.createElement(t.localName.includes("-")?"span":t.localName);t.localName==="input"&&(o.type=t.type),o.style.cssText="all:revert;color:rgb(1, 2, 3)";let r=Mi();r.appendChild(o),n=getComputedStyle(o).getPropertyValue("border-top-color")==="rgb(1, 2, 3)",r.removeChild(o),G.defaultStyle.set(e,n)}return n}function Do(t,e,n){let o=Mi();o.appendChild(e);let r=getComputedStyle(e);if(!we){we=new Set;for(let s of r)xe(s)||we.add(s);for(let s of Lo)xe(s)||we.add(s)}let i=s=>{!(s in t)&&we.has(s)&&(t[s]=r.getPropertyValue(s))};if(!n)we.forEach(i);else if($d.forEach(i),Ri.forEach(i),n instanceof Set)n.forEach(i);else for(let s in n)i(s);o.removeChild(e)}function xe(t){let e=La.get(t);if(e===void 0){let n=String(t).toLowerCase();e=Ld.has(n)||Nd.test(n)||Pd.test(n),La.set(t,e)}return e}function Da(t,e){let n=Ri.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 r=e.direction;return!(r&&r!=="ltr")}function Se(t,e){return!Id.has(t)&&(e==="inline"||_d.has(t)||Wa.has(t))}function Ti(t,e,n){let o=(e.display||"").toLowerCase();if(o==="inline"||Wa.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let i=(e.position||"static").toLowerCase();return i==="absolute"||i==="fixed"?!1:!Bd.has(o)}function Ia(t){return Be.set(t,(xe(t)?Ba:0)|(Ri.has(t)?za:0)|(Od.has(t)?Ua:0)|(Dd.has(t)?Ha:0)|(t==="height"||t==="block-size"?Va:0)|(t==="width"||t==="inline-size"?ja:0)),De.push(t),Be.get(t)}function Vn(t,e){let n=ze[t>>6];ze[t>>6]=n===void 0?e:n{let M=a[v];return M!==void 0||!l||!we.has(v)?M:(Do(a,l.probe,t),a[v])},c=(t.display||"").toLowerCase(),u=c==="inline",d=Se(e,c),m=t["text-wrap-mode"]||t["white-space"]||"",g=m==="nowrap"||m==="pre",p=d&&n&&!(d&&n&&!u&&g),h=!1,b=p||Wd.has(e);for(let v in t){let M=Be.get(v);if(M===void 0&&Be.set(v,M=Ia(v)),(M&_a)===0){let S=t[v];S&&S!==f(v)&&(ze[M>>6]=`${v}:${S}`);continue}if(M&Ba||M&za&&Da(v,t))continue;let C=r&&v==="min-width"?r:t[v];if(!(M&Ua&&b)){if(p&&M&Ha){C&&C!==f(v)&&(Vn(M,`${v}:${C}`),C!=="auto"&&(h=!0));continue}if(C&&C!==f(v)){if((M&Va||M&ja&&!g)&&C.endsWith("px")&&C.includes(".")){let S=parseFloat(C);if(Number.isFinite(S)){Vn(M,`${v}:${(S+Fi).toFixed(3)}px`);continue}}Vn(M,`${v}:${C}`)}}}let w=Be.get("min-width")??Ia("min-width");if(p&&!u&&!o&&!h){let v=t.width;v&&v!=="auto"&&v!==a.width&&Vn(w,`min-width:${v}`)}r&&!("min-width"in t)&&r!==a["min-width"]&&Vn(w,`min-width:${r}`);let k=[];for(let v=0;vv+":"e.add(n.tagName.toLowerCase())),Array.from(e))}function Pi(t,e=null){let n=new Map;for(let s of t){let a=ki(s,e);if(!a)continue;let c=(e?Object.entries(a).filter(([d])=>e.has(d)):Object.entries(a)).filter(([d])=>!Da(d,a)).map(([d,m])=>`${d}:${m};`).sort(),u=c.join("");u&&(n.has(u)||n.set(u,{tagList:[],declarations:c}),n.get(u).tagList.push(s))}let o=[...n.values()],r=null;for(let{declarations:s}of o){let a=new Set(s);if(!r){r=a;continue}for(let l of r)a.has(l)||r.delete(l)}r??=new Set;let i="";if(r.size&&o.length>1){let s=o.flatMap(a=>a.tagList);i+=`${s.join(",")} { ${[...r].join("")} } +var hd=Object.defineProperty;var ct=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(o){throw n=[o],o}};var le=(t,e)=>{for(var n in e)hd(t,n,{get:e[n],enumerable:!0})};function Ea(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function mi(t="soft"){t==="disabled"&&(G.computedStyle=new WeakMap,G.measureHints=new WeakMap,G.baseStyle=new Tt(50),G.defaultStyle=new Tt(64),G.image=new Tt(100),G.background=new Tt(100),G.resource=new Tt(150),G.compress=new Map)}var Tt,G,Kt=ct(()=>{"use strict";Tt=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)}},G={image:new Tt(100),background:new Tt(100),resource:new Tt(150),defaultStyle:new Tt(64),baseStyle:new Tt(50),compress:new Map,computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function Oe(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function gd(t){let e=[],n=0,o=0,r="";for(let i=0;ii.dppx-s.dppx),(o.find(i=>i.dppx>=e)||o[o.length-1]).url):null}function yi(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,o)=>{let r=o.split(",").map(i=>i.trim());return r.length!==6?`matrix(${o})`:(r[4]="0",r[5]="0",`matrix(${r.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,o)=>{let r=o.split(",").map(i=>i.trim());return r.length!==16?`matrix3d(${o})`:(r[12]="0",r[13]="0",`matrix3d(${r.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Lo(t,e){if(!e)return t;let[n,o,r]=e.zoomed,i=t.indexOf("")+8;if(i<8||!t.startsWith(n)||!t.startsWith(o,i)||!t.endsWith(r))return t;let[s,a,l]=e.flat;return s+t.slice(n.length,i)+a+t.slice(i+o.length,t.length-r.length)+l}function ye(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function bi(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 Xn(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function wi(t){return"\u2022".repeat(String(t??"").length)}function be(t,e){return t?.nodeType===1&&t.localName===e}function zt(t){return t?.nodeType===1&&t.namespaceURI===yd}function Ut(t){return t?.nodeType===1&&t.namespaceURI===bd}function We(t){return t?.nodeType===11&&!!t.host}function Ht(t){let e=t?.parentNode;return e?.nodeType===11?e.host:null}function xi(t){return t?.nodeType===9}var gi,md,yd,bd,$t=ct(()=>{"use strict";gi=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,md=gi;yd="http://www.w3.org/1999/xhtml",bd="http://www.w3.org/2000/svg"});function wd(t="[SnapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let o=new Map,r=0;function i(s,a,l){if(r>=n)return;let f=Date.now();(o.get(a)||0)>f||(o.set(a,f+e),r++,s==="warn"&&console&&console.warn?console.warn(`${t} ${l}`):console&&console.error&&console.error(`${t} ${l}`))}return{warnOnce(s,a){i("warn",s,a)},errorOnce(s,a){i("error",s,a)},reset(){o.clear(),r=0}}}function Ta(t,e,n){if(ce.size>=Fa){let o=Date.now();for(let[r,i]of ce)i.until<=o&&ce.delete(r);for(;ce.size>=Fa;)ce.delete(ce.keys().next().value)}ce.set(t,{until:Date.now()+n,result:e})}function xd(t){return/^data:|^blob:|^about:blank$/i.test(t)}function Sd(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=e.split(/\{url(?:Raw)?\}/)[0],r=new URL(o||".",n);if(new URL(t,n).origin===r.origin)return!0}catch{}return!1}function vd(t,e){if(!e||xd(t)||Sd(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 Cd(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>ye(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}${ye(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function $a(t){return new Promise((e,n)=>{let o=new FileReader;o.onload=()=>e(String(o.result||"").replace(/^data:[^,]*/,r=>r.replace(/\s+/g,""))),o.onerror=()=>n(new Error("read_failed")),o.readAsDataURL(t)})}function kd(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 Pa(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function vi(t,e){try{t.onError?.(e)}catch{}}async function bt(t,e={}){let n=e.as??"blob",o=e.timeout??3e3,r=e.useProxy||"",i=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[,p="",h=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],b=/;base64/i.test(p)?atob(h):decodeURIComponent(h),x=new Uint8Array([...b].map(C=>C.charCodeAt(0))),v=new Blob([x],{type:(p||"").split(";")[0]||""});return{ok:!0,data:v,status:200,url:t,fromCache:!1,mime:v.type||""}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let p=await fetch(t);if(!p.ok)return{ok:!1,data:null,status:p.status,url:t,fromCache:!1,reason:"http_error"};let h=await p.blob(),w=h.type||p.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await $a(h),blob:h,status:p.status,url:t,fromCache:!1,mime:w}:n==="text"?{ok:!0,data:await h.text(),status:p.status,url:t,fromCache:!1,mime:w}:{ok:!0,data:h,status:p.status,url:t,fromCache:!1,mime:w}}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,f;try{l=kd(t,{as:n,timeout:o,useProxy:r,errorTTL:i,credentials:e.credentials,headers:s}),f=vd(t,r)?Cd(t,r):t}catch{let p={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return vi(e,p),p}let c=ce.get(l);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&ce.delete(l);let u=Si.get(l);if(u)return u;let d=e.credentials;if(!d)try{let p=typeof location<"u"&&location.href?location.href:"http://localhost/",h=new URL(t,p);d=typeof location<"u"&&h.origin===location.origin?"same-origin":"omit"}catch{d="omit"}let y=new AbortController,m=setTimeout(()=>y.abort("timeout"),o),g=(async()=>{try{let p=await fetch(f,{signal:y.signal,credentials:d,headers:s});if(!p.ok){let b={ok:!1,data:null,status:p.status,url:f,fromCache:!1,reason:"http_error"};if(l!==null&&i>0&&Ta(l,b,i),a){let x=`${p.status} ${p.statusText||""}`.trim();Ra.warnOnce(`http:${p.status}:${n}:${Pa(t)}`,`Couldn't load ${t} (HTTP ${x}).`)}return vi(e,b),b}if(n==="text")return{ok:!0,data:await p.text(),status:p.status,url:f,fromCache:!1};let h=await p.blob(),w=h.type||p.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await $a(h),blob:h,status:p.status,url:f,fromCache:!1,mime:w}:{ok:!0,data:h,status:p.status,url:f,fromCache:!1,mime:w}}catch(p){let h=y.signal.aborted?y.signal.reason==="timeout"?"timeout":"abort":p&&typeof p=="object"&&p.name==="AbortError"?"abort":"network",w={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:h};if(l!==null&&!/^blob:/i.test(t)&&i>0&&Ta(l,w,i),a){let b=`${h}:${n}:${Pa(t)}`,x=h==="timeout"?`Timed out loading ${t} after ${o}ms. Raise the timeout option or set useProxy.`:h==="abort"?`Loading ${t} was cancelled.`:`Couldn't load ${t} (network or CORS). Try the useProxy option.`;Ra.errorOnce(b,x)}return vi(e,w),w}finally{clearTimeout(m),Si.delete(l)}})();return l!==null&&Si.set(l,g),g}var Ra,Si,Fa,ce,we=ct(()=>{"use strict";$t();Ra=wd("[SnapDOM]",{ttlMs:3*6e4,maxEntries:10}),Si=new Map,Fa=50,ce=new Map});async function sn(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=qn(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??Oe(t);if(!o)return t;let r=bi(o),i=ye(r),s=(e.useProxy||"")+"|"+i,a=G.background.get(s);if(a)return`url("${a}")`;let l=await bt(i,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});return l.ok?(G.background.set(s,l.data),`url("${l.data}")`):"none"}var Na=ct(()=>{"use strict";Kt();$t();we()});function Pt(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)})}async function Kn(t=document){let e=t.fonts,n=!1,o=e.ready.then(()=>{n=!0},()=>{n=!0});for(;!n&&e.status==="loading";){let r=[...e].filter(i=>i.status==="loading");if(!r.length)return;await Promise.race([o,Promise.allSettled(r.map(i=>i.loaded))])}}function Wa(t){if(t!==!1&&t!=="auto")return null;let e=performance.now()+(t==="auto"?Md:Ci),n=null,o={yielded:!1,due:()=>performance.now()>=e,pause:()=>n||(n=ki().then(()=>{n=null,o.yielded=!0,e=performance.now()+Ci}))};return o}function ki(){return new Promise(t=>{let e=new MessageChannel;e.port1.onmessage=()=>t(),e.port2.postMessage(0)})}async function _o(){Yn>=0&&performance.now()-Yn>Ci&&await ki(),Yn<0&&(Yn=performance.now(),ki().then(()=>{Yn=-1}))}function Zn(){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 K(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"";if(t===La)return _a;La=t;let e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),o=/applewebkit/i.test(t),r=/mobile/i.test(t),i=!/safari/i.test(t),s=o&&r&&i,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),f=/ipad|iphone|ipod/.test(e)&&o;return _a=n||s||a||l||f}function rt(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"";return t===Ia?Oa:(Ia=t,Oa=t.toLowerCase().includes("firefox"))}var Ci,Md,Yn,La,_a,Ia,Oa,pt=ct(()=>{"use strict";Ci=16,Md=40;Yn=-1});function za(t,e){if(Ad.has(e))t.add(e);else if(e.startsWith("transform-origin-"))t.add("transform-origin");else return!1;return!0}function Mi(t){let e=t.replace(Pd,"$1").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function Ha(t,e,n,o){for(let r=0;r5&&(v[0]==="m"||v[0]==="p")){let C=v.startsWith("margin")?"marginUnstable":v.startsWith("padding")?"paddingUnstable":null;C&&!o[C]&&$d.test(s.getPropertyValue(v))&&(o[C]=!0)}}}let h=a;if(h&&h.includes(":has(")&&(o.usesHas=!0),!o.leaksAcrossSubtrees&&h&&Ld.test(h)&&(o.leaksAcrossSubtrees=!0),h&&h.includes("&"))for(let b=i.parentRule;b&&h.includes("&");b=b.parentRule)b.selectorText&&(h=h.replace(/&/g,`:is(${b.selectorText})`));let w=g!==null&&g.includes("sibling-");if(h&&(w||c||o.inContainer||Ai.test(h)||h.includes("+")||h.includes("~")))for(let b of fe(h,",")){let x=b.trim();if(x&&(w||c||o.inContainer||Ai.test(x)||x.includes("+")||x.includes("~"))){let v=x.replace(/::part\([^)]*\)/g,"")||"*";o.shareUnsafeSels.add(Oo.test(v)?Mi(v):v)}}if((l||f)&&_d(i,h,l,o),y&&o.chromeSels&&!o.mediaOff&&i.keyText===void 0&&(!h||o.inScope?o.chromeAll=!0:(Ba(h,o.chromeSels),m&&Ba(h,o.borderColorSels))),u&&o.scrollSels&&(!h||o.inScope?o.scrollAll=!0:Va(h,o.scrollSels)),h&&h.includes(":"))for(let b in Da)(b==="before"||b==="after")&&!d||Da[b].test(h)&&n[b].push(Mi(h));if(i.styleSheet){if(!Ti(i.styleSheet,e,n,o))return!1}else if(i.cssRules&&i.cssRules.length){let b=i.constructor?.name==="CSSContainerRule",x=i.constructor?.name==="CSSScopeRule";b&&(o.inContainer++,o.leaksAcrossSubtrees=!0),x&&(o.inScope=(o.inScope||0)+1);let v=ja(i,o);v&&o.mediaOff++;let C=Ha(i.cssRules,e,n,o);if(v&&o.mediaOff--,b&&o.inContainer--,x&&o.inScope--,!C)return!1}}return!0}function _d(t,e,n,o){if(n&&t.constructor?.name==="CSSKeyframeRule"){o.svgKeyframes=!0;return}if(!e||o.inScope){n&&(o.svgGeometryAll=!0);return}Va(e,n?o.svgGeometrySels:o.svgAnimSels)}function Va(t,e){for(let n of fe(t,",")){let o=n.trim();o&&e.add(Oo.test(o)?Mi(o):o)}}function ja(t,e){if(!e.view)return!1;let n=t.media?.mediaText;try{return!!t.disabled||!!n&&!e.view.matchMedia(n).matches}catch{return!1}}function Ba(t,e){for(let n of fe(t,",")){let o=n.trim();o&&!o.includes("::")&&!Oo.test(o)&&e.add(o)}}function Fi(t,e){try{return t.cssRules}catch{return e?.(t)}}function Ti(t,e,n,o){let r=Fi(t,o.crossOriginRules);if(!r)return!1;let i=o.siblingFn,s=t.ownerNode;o.siblingFn=o.siblingSupport&&(s?.localName!=="style"||s.textContent.includes("sibling-"));let a=ja(t,o);a&&o.mediaOff++;let l=Ha(r,e,n,o);return a&&o.mediaOff--,o.siblingFn=i,l}function Do(t,e){for(let n of t){let o=n.effect?.getKeyframes?.()||[];for(let r of o)for(let i of Object.keys(r))i==="offset"||i==="easing"||i==="composite"||i==="computedOffset"||e.add(i.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function Ga(t){let e=new Set;return Ti(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:Io,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function qa(t,e){let n=[],o=t.adoptedStyleSheets;for(let r of[t.styleSheets,Array.isArray(o)?o:[]])for(let i of r){let s=Fi(i,e);if(!s)return null;let a=s.length;for(let l=0;l"||u==="+"||u==="~")&&(o=c+1)}let r="",i=0;for(let c of t.slice(o))c==="("||c==="["?i++:c===")"||c==="]"?i--:i===0&&(r+=c);let s=c=>!c||/\\[0-9a-fA-F]/.test(c)?null:c.replace(/\\(.)/g,"$1"),a=s((r.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let l=s((r.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(l)return"i"+l;let f=(r.match(/^([a-zA-Z][\w-]*)/)||[])[1];return f?"t"+f.toLowerCase():null}function an(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 Wd(t,e){let n={};for(let o in e){let r=e[o];(o==="before"||o==="after")&&r.push("q"),n[o]=r.some(i=>i.includes(":scope"))?null:an(t,r)}return n}function Ya(t,e,n=Io){let o={universe:null,pseudoUniverse:null,svgGeometry:null,svgGeometrySel:null,usesHas:!0,leaksAcrossSubtrees:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,scrollGate:null,chromeGate:null,borderColorGate:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let r=new Set(Wo),i={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},s={budget:Io,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,scrollSels:new Set,scrollAll:!1,chromeSels:new Set,borderColorSels:new Set,chromeAll:!1,mediaOff:0,view:t.defaultView,inScope:0,crossOriginRules:e,siblingSupport:CSS.supports("opacity","calc(sibling-index() / 2)")},a=t.adoptedStyleSheets,l=Array.isArray(a)?[...t.styleSheets,...a]:Array.from(t.styleSheets),f=0;for(let w of l){let b=Fi(w,e);if(!b)return o;f+=b.length}if(f>Io)return o;if(f>n)return{...o,declined:f};for(let w of l)if(!Ti(w,r,i,s))return o;if(typeof t.getAnimations=="function"){let w=new Set;Do(t.getAnimations(),w);for(let b of w)r.add(b),za(s.svgGeometry,b)&&(s.svgGeometryAll=!0),Ua.has(b)&&(s.scrollAll=!0)}if(s.svgKeyframes)for(let w of s.svgAnimSels)s.svgGeometrySels.add(w);let c=t.createElement("div"),u=s.svgGeometryAll?null:an(c,Array.from(s.svgGeometrySels)),d=Array.from(s.shareUnsafeSels),y=an(c,d)===null?null:d.map(w=>({sel:w,key:Od(w)})),m=new Set(Fd);for(let w of Rd)r.has(w)&&m.add(w);for(let w of s.pseudoProps)m.add(w);(s.pseudoProps.has("transform")||s.pseudoProps.has("rotate")||s.pseudoProps.has("scale"))&&m.add("transform-origin"),s.pseudoProps.has("perspective")&&m.add("perspective-origin");let g=s.scrollAll?null:an(c,[...Td,...s.scrollSels]),p=s.chromeAll?null:an(c,[...s.chromeSels]),h=s.chromeAll?null:an(c,[...s.borderColorSels]);return{universe:r,pseudoUniverse:m,svgGeometry:s.svgGeometry,svgGeometrySel:u,pseudoGates:Wd(c,i),usesHas:s.usesHas,leaksAcrossSubtrees:s.leaksAcrossSubtrees,shareGate:y,marginUnstable:s.marginUnstable,paddingUnstable:s.paddingUnstable,importantProps:s.importantProps,scrollGate:g,chromeGate:p,borderColorGate:h}}catch{return o}}var Ad,Ed,Wo,Rd,Fd,Oo,Ei,De,Ua,Ri,Td,Io,$d,Da,Pd,Nd,Ld,Id,Ai,Xa,ne=ct(()=>{"use strict";Ad=new Set(["r","cx","cy","rx","ry","x","y","width","height","d","transform","translate","rotate","scale","transform-origin","transform-box","vector-effect"]);Ed=/^(?:animation|transition)/,Wo=["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"],Rd=["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"],Fd=["display","width","height","min-width","min-height"],Oo=/(?:^|[^\\])::?(?:before|after|first-letter|first-line|marker)/,Ei=/^(?:currentcolor|initial|unset|revert|revert-layer)?$/i,De=/^(?:background|border)(?:$|-(?!collapse|spacing))/,Ua=new Set(["overflow","overflow-x","overflow-y","overflow-block","overflow-inline","all"]),Ri=new Set(["input","textarea","select","dialog","foreignObject","body","marquee"]),Td=[...Ri,"[popover]","[overflow]",'[style*="overflow" i]','[style*="all" i]'],Io=2e4,$d=/%|\bauto\b|calc\(|var\(/i,Da={before:/(?:^|[^\\])::?before\b/,after:/(?:^|[^\\])::?after\b/,firstLetter:/(?:^|[^\\])::?first-letter\b/,marker:/(?:^|[^\\])::marker\b/,firstLine:/(?:^|[^\\])::?first-line\b/},Pd=/(\\.)|::?(?:before|after|first-letter|first-line|marker)\b/g,Nd=/^(?:content|all|(?:animation|transition)(?:-.*)?)$/,Ld=/[+~]|:has\(|:nth-(?:last-)?child\([^)]*\bof\b/i;Id=64;Ai=/:(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|muted|seeking|buffering|stalled|volume-locked|open|popover-open|state\(|dir\(|lang\(|has\()/,Xa=new RegExp(Ai.source.replace("hover|focus|active|","")+"|[+~]|@container|container-|\\dcq[whibm]|:host(?:-context)?\\(|::slotted\\(|sibling-|random\\(")});function it(t){return Ka.add(t),t.setAttribute("data-snapdom-internal",""),t}function Vt(t){return Ka.has(t)}function zo(t,e,n){let o=Bo.get(t);o?o[1]=n:Bo.set(t,[e,n])}function $i(t,e){let n=Bo.get(t);return n?e===n[0]||e===n[1]?!0:(Bo.delete(t),!1):!1}var Ka,Bo,wt=ct(()=>{"use strict";Ka=new WeakSet;Bo=new WeakMap});function Li(t,e=null){if(t=String(t).toLowerCase(),Jn.has(t)){let r={};return G.defaultStyle.set(t,r),r}let n=G.defaultStyle.get(t);if(n){let r=Uo.get(n);if(r){if(!e)Ho(n,r.probe,null),Uo.delete(n);else if(r.done.get(e)!==e.size){for(let i of e)if(!(i in n)&&xe.has(i)){Ho(n,r.probe,e);break}r.done.set(e,e.size)}}return n}let o=document.createElement(t.includes("-")?"span":t);return o.style.all="initial",n={},Ho(n,o,e),e&&Uo.set(n,{probe:o,done:new WeakMap([[e,e.size]])}),G.defaultStyle.set(t,n),n}function _i(){let t=[...document.querySelectorAll("#snapdom-sandbox")].find(Vt);return t||(t=document.createElement("div"),it(t),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t)),t.shadowRoot??t.attachShadow({mode:"open"})}function Ii(t,e){let n=`${t.localName} ${t.type} ${t.disabled} ${e}`,o=G.defaultStyle.get(n);if(!o){let r=document.createElement(t.localName);t.localName==="input"&&(r.type=t.type),r.disabled=t.disabled,r.style.cssText=`all:revert;color-scheme:${e}`;let i=_i();i.appendChild(r);let s=getComputedStyle(r);o={};for(let a of s)De.test(a)&&(o[a]=s.getPropertyValue(a));i.removeChild(r),G.defaultStyle.set(n,o)}return o}function Oi(t){let e=`${t.localName} ${t.type} border`,n=G.defaultStyle.get(e);if(n===void 0){let o=document.createElement(t.localName.includes("-")?"span":t.localName);t.localName==="input"&&(o.type=t.type),o.style.cssText="all:revert;color:rgb(1, 2, 3)";let r=_i();r.appendChild(o),n=getComputedStyle(o).getPropertyValue("border-top-color")==="rgb(1, 2, 3)",r.removeChild(o),G.defaultStyle.set(e,n)}return n}function Ho(t,e,n){let o=_i();o.appendChild(e);let r=getComputedStyle(e);if(!xe){xe=new Set;for(let s of r)Se(s)||xe.add(s);for(let s of Wo)Se(s)||xe.add(s)}let i=s=>{!(s in t)&&xe.has(s)&&(t[s]=r.getPropertyValue(s))};if(!n)xe.forEach(i);else if(Dd.forEach(i),Wi.forEach(i),n instanceof Set)n.forEach(i);else for(let s in n)i(s);o.removeChild(e)}function Se(t){let e=Za.get(t);if(e===void 0){let n=String(t).toLowerCase();e=Ud.has(n)||zd.test(n)||Bd.test(n),Za.set(t,e)}return e}function nl(t,e){let n=Wi.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 r=e.direction;return!(r&&r!=="ltr")}function cn(t){return t==="grid-template-rows"||t==="grid-template-columns"}function fn(t){let e=!rt()&&!K();return t.replace(Xd,(n,o,r)=>{let i=parseFloat(r),s=e&&i<1e4?5*10**(Math.floor(Math.log10(i))-6):0;return`${o}${(i+Math.max(Go,s)).toFixed(3)}px`})}function ve(t,e){return!Vd.has(t)&&(e==="inline"||Hd.has(t)||el.has(t))}function Di(t,e,n){let o=(e.display||"").toLowerCase();if(o==="inline"||el.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let i=(e.position||"static").toLowerCase();return i==="absolute"||i==="fixed"?!1:!Yd.has(o)}function Qa(t){return ze.set(t,(Se(t)?ol:0)|(Wi.has(t)?rl:0)|(jd.has(t)?il:0)|(qd.has(t)?sl:0)|(t==="height"||t==="block-size"?al:0)|(t==="width"||t==="inline-size"?ll:0)|(cn(t)?cl:0)),Be.push(t),ze.get(t)}function ln(t,e){let n=Ue[t>>jo];Ue[t>>jo]=n===void 0?e:n{let C=a[v];return C!==void 0||!l||!xe.has(v)?C:(Ho(a,l.probe,t),a[v])},c=(t.display||"").toLowerCase(),u=c==="inline",d=ve(e,c),y=t["text-wrap-mode"]||t["white-space"]||"",m=y==="nowrap"||y==="pre",p=d&&n&&!(d&&n&&!u&&m),h=!1,w=p||Gd.has(e);for(let v in t){let C=ze.get(v);if(C===void 0&&ze.set(v,C=Qa(v)),(C&Ja)===0){let M=t[v];M&&M!==f(v)&&(Ue[C>>jo]=`${v}:${M}`);continue}if(C&ol||C&rl&&nl(v,t))continue;let A=r&&v==="min-width"?r:t[v];if(!(C&il&&w)){if(p&&C&sl){A&&A!==f(v)&&(ln(C,`${v}:${A}`),A!=="auto"&&(h=!0));continue}if(A&&A!==f(v)){if((C&al||C&ll&&!m)&&A.endsWith("px")&&A.includes(".")){let M=parseFloat(A);if(Number.isFinite(M)){ln(C,`${v}:${(M+Go).toFixed(3)}px`);continue}}if(C&cl){ln(C,`${v}:${fn(A)}`);continue}ln(C,`${v}:${A}`)}}}let b=ze.get("min-width")??Qa("min-width");if(p&&!u&&!o&&!h){let v=t.width;v&&v!=="auto"&&v!==a.width&&ln(b,`min-width:${v}`)}r&&!("min-width"in t)&&r!==a["min-width"]&&ln(b,`min-width:${r}`);let x=[];for(let v=0;vv+":"e.add(n.tagName.toLowerCase())),Array.from(e))}function zi(t,e=null){let n=new Map;for(let s of t){let a=Li(s,e);if(!a)continue;let c=(e?Object.entries(a).filter(([d])=>e.has(d)):Object.entries(a)).filter(([d])=>!nl(d,a)).map(([d,y])=>`${d}:${y};`).sort(),u=c.join("");u&&(n.has(u)||n.set(u,{tagList:[],declarations:c}),n.get(u).tagList.push(s))}let o=[...n.values()],r=null;for(let{declarations:s}of o){let a=new Set(s);if(!r){r=a;continue}for(let l of r)a.has(l)||r.delete(l)}r??=new Set;let i="";if(r.size&&o.length>1){let s=o.flatMap(a=>a.tagList);i+=`${s.join(",")} { ${[...r].join("")} } `}for(let{tagList:s,declarations:a}of o){let l=o.length>1?a.filter(c=>!r.has(c)):a;if(!l.length)continue;let f=l.join("");i+=`${s.join(",")} { ${f} } -`}return i}function Gn(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,o=1;for(let r of e)n.set(r,`c${o++}`);return n}function zd(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"",item:()=>""};return t[Symbol.iterator]=function*(){},t}function Oa(t,e){let n=zd(t),o=null;try{o=n&&typeof n.getComputedStyle=="function"?n.getComputedStyle(t,e):null}catch{}if(!o&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(o=window.getComputedStyle(t,e))}catch{}return o||Bo()}function W(t,e=null){if(t?.nodeType!==1){let i=typeof window<"u"?window:null;if(i&&typeof i.getComputedStyle=="function")try{return i.getComputedStyle(t,e)||Bo()}catch{return Bo()}return Bo()}let n=G.computedStyle.get(t);if(n||G.computedStyle.set(t,n=Oa(t,null)),e===null)return n;let o=G.computedStyle.get(n);o||G.computedStyle.set(n,o=new Map);let r=o.get(e);return r||o.set(e,r=Oa(t,e)),r}function zo(t){if(vi)return vi;let e=Array.from(t).filter(n=>!xe(n));return e.length?vi=e:e}function an(t,e=null){let n={};for(let o of e||zo(t)){let r=t.getPropertyValue(o);r&&(n[o]=r)}for(let o of Ud){let r=n[`border-${o}-style`],i=n[`border-${o}-width`];(r==="none"||r==="hidden"||i==="0px")&&(delete n[`border-${o}-style`],delete n[`border-${o}-width`],delete n[`border-${o}-color`])}return n}function ve(t){let e=[],n=0,o=0,r="";for(let i=0;i{"use strict";Kt();ce();wt();Ci=new Set(["meta","script","noscript","title","link","template"]),jn=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"]);Wo=new WeakMap,we=null,$d=[...Lo,"text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink","-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order","font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing","-webkit-text-fill-color","text-wrap-mode"];Pd=/(?:^|-)(animation|transition)(?:-|$)/i,Nd=/^(--.+|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,Ld=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","stroke-color"]),La=new Map;_d=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),Wa=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Id=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Od=new Set(["width","max-width","inline-size","max-inline-size"]),Wd=new Set(["mi","mn","mo","ms","mtext"]),Dd=new Set(["min-width","min-inline-size"]),Ri=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"}));Fi=.001;Bd=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]);Ba=1,za=2,Ua=4,Ha=8,Va=16,ja=32,_a=63,Be=new Map,De=[],ze=[];Ud=["top","right","bottom","left"],vi=null});function Pt(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)})}async function Xn(t=document){let e=t.fonts,n=!1,o=e.ready.then(()=>{n=!0},()=>{n=!0});for(;!n&&e.status==="loading";){let r=[...e].filter(i=>i.status==="loading");if(!r.length)return;await Promise.race([o,Promise.allSettled(r.map(i=>i.loaded))])}}function Ka(t){if(t!==!1&&t!=="auto")return null;let e=performance.now()+(t==="auto"?Hd:Ni),n=null,o={yielded:!1,due:()=>performance.now()>=e,pause:()=>n||(n=Li().then(()=>{n=null,o.yielded=!0,e=performance.now()+Ni}))};return o}function Li(){return new Promise(t=>{let e=new MessageChannel;e.port1.onmessage=()=>t(),e.port2.postMessage(0)})}async function Uo(){qn>=0&&performance.now()-qn>Ni&&await Li(),qn<0&&(qn=performance.now(),Li().then(()=>{qn=-1}))}function Yn(){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 Z(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"";if(t===Ga)return qa;Ga=t;let e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),o=/applewebkit/i.test(t),r=/mobile/i.test(t),i=!/safari/i.test(t),s=o&&r&&i,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),f=/ipad|iphone|ipod/.test(e)&&o;return qa=n||s||a||l||f}function st(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"";return t===Xa?Ya:(Xa=t,Ya=t.toLowerCase().includes("firefox"))}var Ni,Hd,qn,Ga,qa,Xa,Ya,ht=ct(()=>{"use strict";Ni=16,Hd=40;qn=-1});function U(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 at(t,e,n,o){let r=t&&t.warnings;r&&r.length{"use strict";Vd=50});var xt=ct(()=>{"use strict";Sa();He();ht();$t();At()});function Ve(){fe=++Ct}function Kn(t){let e=t&&(t.nodeType===1?t:t.parentElement);for(;e;){if(Vt(e))return!0;e.parentElement?e=e.parentElement:e=Ht(e)}return!1}function tl(t){for(let e of t)if(dn(e))return!0;return!1}function dn(t){if(Kn(t.target))return!1;if(t.type==="characterData"?Si(t.target,t.target.data):t.attributeName==="style"&&Si(t.target,t.target.style.cssText))return Ct++,!1;if(t.type==="childList"){let e=!0;for(let n of t.addedNodes)if(!Kn(n)){e=!1;break}if(e){for(let n of t.removedNodes)if(!Kn(n)){e=!1;break}}if(e)return!1}return!0}function el(t){for(let e of t){let n=e.target.ownerDocument||document;ln.set(n,(ln.get(n)||0)+1);let o=e.target.nodeType===1?e.target:e.target.parentElement||e.target.host;for(;o;o=o.parentElement||Ht(o))ln.set(o,(ln.get(o)||0)+1)}}function Qn(t){let e=t.ownerDocument||document;return qe(e),(ln.get(e)||0)-(ln.get(t)||0)}function un(){fe=Nt=++Ct}function pn(t=document){return qe(t),Nt}function Ge(){return qe(),fe}function to(t){return t?(qe(t.ownerDocument||document),oo(t,Go(t))):0}function hn(){un()}function nl(){Ct++}function cn(){ol=++Ct}function eo(t){je.set(t,++Ct)}function no(t){if(!t||t.nodeType!==1)return;let e=++Ct;je.set(t,e);let n=t.querySelectorAll("*");for(let o=0;on?.nodeType===1&&(n.matches?.("style,link")||n.querySelector?.("style,link"));for(let n of t){let o=n.target,r=o&&(o.nodeType===1?o:o.parentElement);if(r&&(r.tagName==="STYLE"||r.tagName==="LINK"))return r.ownerDocument||document;for(let i of n.addedNodes)if(e(i))return i.ownerDocument||document;for(let i of n.removedNodes)if(e(i))return i.ownerDocument||o&&o.ownerDocument||document}return null}function rl(t){let e=t.filter(dn);if(!e.length)return;el(e),Ve();let n=new Set;for(let o of e){let r=o.target.getRootNode&&o.target.getRootNode();if(!r||r.nodeType!==11||n.has(r))continue;n.add(r),r.host?no(r.host):Ct++;let i=r.querySelectorAll("*");for(let s=0;s{tl(r)&&un()},o=un;try{let r=new MutationObserver(sl);r.observe(t.documentElement,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),Jn.push({o:r,head:!1,doc:t})}catch{}try{let r=new MutationObserver(n);r.observe(t.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),Jn.push({o:r,head:!0,doc:t})}catch{}try{e?.addEventListener("resize",o,{passive:!0})}catch{}try{let r=i=>{Ve();let s=i.composedPath?.()[0]||i.target;s&&s.nodeType===1&&!Kn(s)&&Di(s.ownerDocument||t)?Wi(s):cn()};t.addEventListener("focusin",r,{capture:!0,passive:!0}),t.addEventListener("focusout",r,{capture:!0,passive:!0}),t.addEventListener("change",r,{capture:!0,passive:!0}),t.addEventListener("pointerdown",r,{capture:!0,passive:!0}),t.addEventListener("pointerup",r,{capture:!0,passive:!0}),t.addEventListener("pointercancel",r,{capture:!0,passive:!0}),t.addEventListener("keydown",r,{capture:!0,passive:!0}),t.addEventListener("keyup",r,{capture:!0,passive:!0}),t.addEventListener("beforetoggle",r,{capture:!0,passive:!0}),t.addEventListener("toggle",r,{capture:!0,passive:!0}),e?.addEventListener("hashchange",()=>{Ve(),cn()},{passive:!0}),t.addEventListener("load",i=>{Kn(i.target)||Ct++},{capture:!0,passive:!0})}catch{}try{let r=t.fonts;r&&(r.addEventListener?.("loadingdone",o),r.status==="loading"&&r.ready?.then(o).catch(()=>{}))}catch{}}function Ja(t,e){if(!t?.querySelectorAll)return;let n;try{n=Array.from(t.querySelectorAll(":hover"))}catch{return}let o=Za.get(t)||[];if(o.length===n.length&&o.every((i,s)=>i===n[s]))return;if(Za.set(t,n),Ve(),t.nodeType===11){t.host?no(t.host):Ct++;for(let i of t.querySelectorAll("*"))je.set(i,Ct);return}let r=o.filter(i=>!n.includes(i)).concat(n.filter(i=>!o.includes(i)));for(let i of r)if(i.isConnected)if(Di(e))Wi(i);else{cn();return}}function qo(t,e=null){if(!t)return;Ja(t,t);let n=e||fn.filter(({root:o})=>o.host?.isConnected).map(({root:o})=>o);for(let o of n)Ja(o,t)}function ne(){qe();try{for(let t=Jn.length-1;t>=0;t--){let{o:e,head:n,doc:o}=Jn[t];if(o!==document&&!o.defaultView){try{e.disconnect()}catch{}Ii.delete(o),Zn===o&&(Zn=null),Jn.splice(t,1);continue}let r=e.takeRecords();r.length&&(n?tl(r)&&un():sl(r))}for(let t=fn.length-1;t>=0;t--){let{o:e,root:n}=fn[t];if(!n.host||!n.host.isConnected){try{e.disconnect()}catch{}_i.delete(n),fn.splice(t,1);continue}let o=e.takeRecords();o.length&&rl(o)}}catch{}}function Qa(t){let e=t.href;return!e||typeof CSSStyleSheet!="function"?null:Ho.has(e)?Ho.get(e):(Ho.set(e,null),bt(e,{as:"text"}).then(n=>{if(!n.ok||typeof n.data!="string"||/@import/i.test(n.data))return;let o=new CSSStyleSheet;o.replaceSync(n.data),Ho.set(e,o.cssRules),un()}).catch(()=>{}),null)}function ll(t,e){let n=(Oi.get(t)||0)+e+Gd;Oi.set(t,n),jo.get(t)?.declined<=n*al&&(jo.delete(t),Vo.delete(t))}function Lt(t){let e=jo.get(t);if(!e||e.epoch!==fe){let n=Ta(t,Qa);if(e&&n&&e.env===Nt&&e.census&&e.census.length===n.length&&n.every((i,s)=>i===e.census[s]))return e.epoch=fe,e;let o=e&&e.universe;e={epoch:fe,env:Nt,census:n,...Pa(t,Qa,(Oi.get(t)||0)*al)};let r=e.universe;if(o&&r&&o.size===r.size){let i=!0;for(let s of r)if(!o.has(s)){i=!1;break}i&&(e.universe=o)}jo.set(t,e)}return e}function Xo(t,e){return e?(e.scan||(e.scan=Lt(t),e.scanEnv=Nt),e.scan):Lt(t)}var Ct,fe,ln,Nt,je,ol,Vo,_i,fn,Ii,Zn,Jn,Za,jo,Ho,al,Gd,Oi,Ot=ct(()=>{"use strict";xt();ce();wt();be();Ct=0,fe=0;ln=new WeakMap;Nt=0;je=new WeakMap;ol=0;Vo=new WeakMap;_i=new WeakSet,fn=[];Ii=new WeakSet,Zn=null,Jn=[];Za=new WeakMap;jo=new WeakMap,Ho=new Map;al=12,Gd=10,Oi=new WeakMap});function is(t){return Dc(t.boxShadow)}function ss(t){return Dc(t.textShadow)}function Dc(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",o=0;for(let l=0;lparseFloat(p))||[];if(f.length<2)continue;let[c,u,d=0,m=0]=f,g=Math.abs(c)+d+m,y=Math.abs(u)+d+m;i=Math.max(i,g+Math.max(c,0)),a=Math.max(a,g+Math.max(-c,0)),s=Math.max(s,y+Math.max(u,0)),r=Math.max(r,y+Math.max(-u,0))}return{top:Math.ceil(r),right:Math.ceil(i),bottom:Math.ceil(s),left:Math.ceil(a)}}function as(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,o=0,r;for(;r=n.exec(e);)o+=parseFloat(r[1])||0;let i=Math.ceil(o*2);return{top:i,right:i,bottom:i,left:i}}function ls(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 cs(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,r=0,i=0,s=0,a=!1;for(let l of n){a=!0;let f=l.match(/-?\d+(?:\.\d+)?px/gi)?.map(y=>parseFloat(y))||[],[c=0,u=0,d=0]=f,m=Math.abs(c)+d,g=Math.abs(u)+d;r=Math.max(r,m+Math.max(c,0)),s=Math.max(s,m+Math.max(-c,0)),i=Math.max(i,g+Math.max(u,0)),o=Math.max(o,g+Math.max(-u,0))}return{bleed:{top:H(o),right:H(r),bottom:H(i),left:H(s)},has:a}}function Xh(t){let e=is(t),n=ss(t),o=as(t),r=ls(t),i=cs(t);return{top:Math.max(e.top,n.top)+o.top+r.top+i.bleed.top,right:Math.max(e.right,n.right)+o.right+r.right+i.bleed.right,bottom:Math.max(e.bottom,n.bottom)+o.bottom+r.bottom+i.bleed.bottom,left:Math.max(e.left,n.left)+o.left+r.left+i.bleed.left}}function Yh(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 Wc(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 fs(t,e,n,o=1,r=1){let i=0,s=0,a=0,l=0,f=Wc(n.get(t)||W(t));if(f.x&&f.y)return{top:0,right:0,bottom:0,left:0};let c=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||!Yh(d))continue;let m=Xh(d);if(!(m.top||m.right||m.bottom||m.left))continue;let g=u.getBoundingClientRect(),y={left:g.left-m.left/o,top:g.top-m.top/r,right:g.right+m.right/o,bottom:g.bottom+m.bottom/r};for(let p=u.parentElement;p;p=p.parentElement){let h=Wc(n.get(p)||W(p));if(h.x||h.y){let b=p.getBoundingClientRect();h.x&&(y.left=Math.max(y.left,b.left),y.right=Math.min(y.right,b.right)),h.y&&(y.top=Math.max(y.top,b.top),y.bottom=Math.min(y.bottom,b.bottom))}if(p===t)break}f.x||(l=Math.max(l,(c.left-y.left)*o),s=Math.max(s,(y.right-c.right)*o)),f.y||(i=Math.max(i,(c.top-y.top)*r),a=Math.max(a,(y.bottom-c.bottom)*r))}return{top:Math.max(0,Math.ceil(i)),right:Math.max(0,Math.ceil(s)),bottom:Math.max(0,Math.ceil(a)),left:Math.max(0,Math.ceil(l))}}function Bc(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=Ke(t).scale}catch{}try{e.style.transform="none"}catch{}if(!l)return{a:1,b:0,c:0,d:1};let f=Ae({scale:l});return{a:f.a,b:f.b,c:f.c,d:f.d}}function r(l,f,c,u){let d=Math.sqrt(l*l+f*f)||0,m=0,g=0;if(d>0){let y=l/d,p=f/d;m=y*c+p*u;let h=c-y*m,b=u-p*m;g=Math.sqrt(h*h+b*b)||0,g>0?m=m/g:m=0}return{a:d,b:0,c:m*g,d:g}}let i=l=>{let f=Ke(t).scale;if(!f)return l;let c=Ae({scale:f,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(f=>parseFloat(f.trim()));if(l.length===6&&l.every(Number.isFinite)){let[f,c,u,d]=l,m=r(f,c,u,d);try{e.style.transform=`matrix(${m.a}, ${m.b}, ${m.c}, ${m.d}, 0, 0)`}catch{}return i(m)}}let a=o.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let l=a[1].split(",").map(f=>parseFloat(f.trim()));if(l.length===16&&l.every(Number.isFinite)){let f=l[0],c=l[1],u=l[4],d=l[5],m=r(f,c,u,d);try{e.style.transform=`matrix(${m.a}, ${m.b}, ${m.c}, ${m.d}, 0, 0)`}catch{}return i(m)}}try{let l=new DOMMatrix(o),f=r(l.a,l.b,l.c,l.d);try{e.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return i(f)}catch{return null}}function kn(t,e,n,o,r){let i=n.a,s=n.b,a=n.c,l=n.d,f=n.e||0,c=n.f||0;function u(h,b){let w=h-o,k=b-r,v=i*w+a*k,M=s*w+l*k;return v+=o+f,M+=r+c,[v,M]}let d=[u(0,0),u(t,0),u(0,e),u(t,e)],m=1/0,g=1/0,y=-1/0,p=-1/0;for(let[h,b]of d)hy&&(y=h),b>p&&(p=b);return{minX:m,minY:g,maxX:y,maxY:p,width:y-m,height:p-g}}function po(t,e,n){let o=(t.transformOrigin||"0 0").trim().split(/\s+/),[r,i]=[o[0]||"0",o[1]||"0"],s=(a,l)=>{let f=a.toLowerCase();return f==="left"||f==="top"?0:f==="center"?l/2:f==="right"||f==="bottom"?l:f.endsWith("px")?parseFloat(f)||0:f.endsWith("%")?(parseFloat(f)||0)*l/100:/^-?\d+(\.\d+)?$/.test(f)&&parseFloat(f)||0};return{ox:s(r,e),oy:s(i,n)}}function Ke(t){let e={rotate:"0deg",scale:null,translate:null},n=null;try{n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null}catch{}if(n){let r=l=>{try{return typeof n.has=="function"&&!n.has(l)||typeof n.get!="function"?null:n.get(l)}catch{return null}},i=r("rotate");if(i)if(i.angle){let l=i.angle;e.rotate=l.unit==="rad"?l.value*180/Math.PI+"deg":l.value+l.unit,i.is2D===!1&&i.x&&i.y&&i.z&&(e.rotate=`${i.x.value} ${i.y.value} ${i.z.value} ${e.rotate}`)}else i.unit?e.rotate=i.unit==="rad"?i.value*180/Math.PI+"deg":i.value+i.unit:e.rotate=String(i);else{let l=getComputedStyle(t);e.rotate=l.rotate&&l.rotate!=="none"?l.rotate:"0deg"}let s=r("scale");if(s){let l=f=>f&&f.value!=null?`${f.value}${f.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=r("translate");if(a){let l=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":f.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}function Kh(){if(rs?.isConnected)return rs;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),rt(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),rs=t,t}function Ae(t){let e=i=>{let s=[],a=0,l=0,f=String(i).trim();for(let c=0;cl&&s.push(f.slice(l,c)),l=c+1);return li&&i!=="none",o=[];if(n(t.translate)){let i=e(t.translate);for(let s=0;s<2&&s2?`translate3d(${i.join(",")})`:`translate(${i.join(",")})`)}if(n(t.rotate)&&t.rotate!=="0deg"){let i=e(t.rotate);i.length===4?o.push(`rotate3d(${i.join(",")})`):i.length===2&&/^[xyz]$/i.test(i[0])?o.push(`rotate${i[0].toUpperCase()}(${i[1]})`):o.push(`rotate(${i.join(" ")})`)}if(n(t.scale)){let i=e(t.scale).map(s=>/%$/.test(s)?String(parseFloat(s)/100):s);o.push(i.length>2?`scale3d(${i.join(",")})`:`scale(${i.join(",")})`)}if(n(t.baseTransform)&&o.push(t.baseTransform),!o.length)return new DOMMatrix;let r=o.join(" ");try{if(r.includes("%"))throw new Error("Transform needs a reference box");return new DOMMatrix(r)}catch{let i=Kh(),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",r,"important"),!s.style.transform)throw new Error("[SnapDOM] Couldn't read the transform of an element.");i.appendChild(s);try{return Zh(s)}finally{s.remove()}}}function dr(t){let e=W(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 r=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",i=e.scale&&e.scale!=="none"&&e.scale!=="1",s=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(r||i||s)}function Zh(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}var rs,ho=ct(()=>{"use strict";Ze();He();wt();rs=null});function pr(t,e){if(!e)return null;let n=t.ownerDocument||document,o=n.defaultView||window,r,i,s,a;if(e==="viewport")r=0,i=0,s=n.documentElement?.clientWidth||o.innerWidth,a=n.documentElement?.clientHeight||o.innerHeight;else if(typeof e=="object")r=(Number(e.x)||0)-(o.scrollX||0),i=(Number(e.y)||0)-(o.scrollY||0),s=Number(e.width),a=Number(e.height);else return null;return s>0&&a>0?{left:r,top:i,width:s,height:a,right:r+s,bottom:i+a}:null}function mo(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return Ie(e)?e.host:null}function Jh(t,e){for(let n=e;n;n=mo(n))if(n===t)return!0;return!1}function Qh(t,e){for(let n=mo(t);n&&n!==e&&n?.nodeType===1;n=mo(n)){let o=W(n);if(o.position!=="static"||us(o))return n}return null}function us(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||"")}function Gc(t,e,n,o,r,i){if(t.scrollTop||t.scrollLeft)return;let s=o.get(t)||W(t);if(us(s))return;let a=s.position!=="static",l=new Map;for(let[f,c]of e){let u=n.get(f);if(!u)continue;let d=l.get(u);if(d===void 0&&l.set(u,d=tm.exec(u)?.[1]||""),!d||d==="absolute"&&a||ps.has(f))continue;let m=!1;for(let h=mo(c);h&&h!==t&&h.nodeType===1;h=mo(h)){let b=o.get(h)||W(h);if(d==="absolute"&&b.position!=="static"||us(b)){m=!0;break}}if(m)continue;let g=o.get(c)||W(c),y=parseFloat(g.left),p=parseFloat(g.top);r&&Number.isFinite(y)&&(f.style.left=`${y+r}px`),i&&Number.isFinite(p)&&(f.style.top=`${p+i}px`)}}function hs(t,e){try{return Ae({baseTransform:t,rotate:e?.rotate,scale:e?.scale})}catch{return null}}function qc(t,e,n,o,r){let i=t.getBoundingClientRect();zt(e)&&W(t).position==="static"&&(e.style.position="relative");let s=[];for(let[a,l]of n){if(l?.nodeType!==1)continue;let f=a.localName==="svg"&&Ut(a)&&!Ut(l.parentNode);if(!zt(a)&&!f||l===t||!Jh(t,l))continue;let c=o.get(l)||W(l),u=c.position;if(u!=="fixed"&&u!=="sticky"&&u!=="-webkit-sticky"||a.style.position==="absolute")continue;let d=l.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;ps.add(a);let m=c.transform&&c.transform!=="none"?c.transform:"",g=Ke(l),y=!!(m||g.rotate!=="0deg"||g.scale||g.translate),p=y?hs(m,g):null,h=!p||!p.is2D||p.a===1&&p.b===0&&p.c===0&&p.d===1,b=d.width,w=d.height;h||(b=l.offsetWidth||d.width,w=l.offsetHeight||d.height);let k=l.getRootNode&&Ie(l.getRootNode()),v=i,M=t.clientLeft||0,C=t.clientTop||0;if(k){let R=Qh(l,t);R&&(v=R.getBoundingClientRect(),M=R.clientLeft||0,C=R.clientTop||0)}let S=d.left-v.left-M,A=d.top-v.top-C;if(y)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",h)a.style.transform="none";else{a.style.transform=`matrix(${p.a},${p.b},${p.c},${p.d},0,0)`;let{ox:R,oy:F}=po(c,b,w),N=kn(b,w,{a:p.a,b:p.b,c:p.c,d:p.d,e:0,f:0},R,F);S-=N.minX,A-=N.minY}if(u!=="fixed"){let R=a.cloneNode(!1);R.setAttribute("data-snap-ph","1"),R.style.position="static",R.style.visibility="hidden",R.style.width=`${b}px`,R.style.height=`${w}px`,R.style.boxSizing="border-box",a.parentElement?.insertBefore(R,a)}let x=f?b:b+2,E=w;r&&(Math.abs(A-r.y)<.5&&(A-=1,E+=1),Math.abs(S-r.x)<.5&&(S-=1,x+=1)),a.style.position="absolute",a.style.left=`${S}px`,a.style.top=`${A}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${x}px`,a.style.height=`${E}px`,a.style.boxSizing="border-box",k||s.push(a)}for(let a of s)e.appendChild(a)}function Xc(t,e,n={}){if(!t||!e||!e.style)return;let o=getComputedStyle(t);try{e.style.boxShadow="none"}catch(s){U(n,"Couldn't remove the root box-shadow.",s)}try{e.style.textShadow="none"}catch(s){U(n,"Couldn't remove the root text-shadow.",s)}try{e.style.outline="none"}catch(s){U(n,"Couldn't remove the root outline.",s)}let i=(o.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=i.length?i:"none"}catch(s){U(n,"Couldn't remove the root drop-shadow filter.",s)}}function Yc(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 zc(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 Kc(t,e){let n=Array.from(t.childNodes),o=e==="top"?n:n.reverse();for(let r of o){if(r.nodeType===Node.TEXT_NODE){if(/\S/.test(r.textContent||""))return null;continue}if(r.nodeType!==Node.ELEMENT_NODE)continue;let i=getComputedStyle(r),s=String(i.display||"");if(s!=="none"){if(s==="contents"){let a=Kc(r,e);if(a!==void 0)return a;continue}if(!(i.position==="absolute"||i.position==="fixed"))return i.float&&i.float!=="none"||s.startsWith("inline")?null:r}}}function go(t,e,n,o=null){let r=[];if(!t)return r;let i=getComputedStyle(t);if(zc(i))return r;for(let s of["top","bottom"]){let a=s==="top"?"Top":"Bottom";if(s==="bottom"&&r.push(null),(parseFloat(i[`border${a}Width`])||0)>0||(parseFloat(i[`padding${a}`])||0)>0)continue;let l=t,f=e;for(;l;){let c=Kc(l,s);if(!c)break;let u=f?n?Array.from(f.children).find(g=>n.get(g)===c)||o?.get(c)||null:f.children[Array.from(l.children).indexOf(c)]||null:null,d=getComputedStyle(c);if((parseFloat(d[`margin${a}`])||0)>0&&(r.push(c),u?.style&&(u.style[`margin${a}`]="0px")),zc(d)||(parseFloat(d[`border${a}Width`])||0)>0||(parseFloat(d[`padding${a}`])||0)>0)break;l=c,f=u}}return r}function om(t,e){if(!nm.test(t)||t==="xmlns")return!0;if(t.includes(":")){let n=t.split(":",1)[0];if(!em.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}function hr(t,e={}){if(!t)return;let{stripFrameworkDirectives:n=!0}=e,o=new Map,r=l=>{for(let f of l.getAttributeNames()){let c=o.get(f);if(c===void 0&&o.set(f,c=om(f,n)),c){l.removeAttribute(f);continue}let u=l.getAttribute(f);if(u===null||im.test(u)||!Uc.test(u))continue;let d=Hc(u);if(d!==u)try{l.setAttribute(f,d)}catch{}}};t.nodeType===Node.ELEMENT_NODE&&r(t);let i=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),a;for(;a=s.nextNode();)if(a.nodeType===Node.ELEMENT_NODE)r(a);else if(a.nodeType===Node.COMMENT_NODE)i.push(a);else{let l=a.data;if(Uc.test(l)){let f=Hc(l);f!==l&&(a.data=f)}}for(let l of i)l.remove()}function sm(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}function lm(t){return Ut(t)||am.has(t?.localName)}function cm(t,e){if(t?.nodeType!==1||sm(t)||lm(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 Zc(t,e,n=new Map,o=null){function r(i,s){if(i?.nodeType!==1||s?.nodeType!==1)return;let a=[];if(o){let c=u=>{for(let d of u.children){let m=o.get(d);m?m.nodeType===1&&a.push([m,d]):c(d)}};c(s)}else{let c=i.children,u=s.children;for(let d=0;d(o?a.length:s.childElementCount),f=n.get(i)||getComputedStyle(i);if(n.has(i)||n.set(i,f),l&&cm(i,f)){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=f.overflowY||f.overflowBlock||"visible",u=f.overflowX||f.overflowInline||"visible";(c!=="visible"||u!=="visible")&&(s.style.overflow="visible")}for(let[c,u]of a)r(c,u)}r(t,e)}function fm(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function um(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){U(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){U(e,"Your exclude function threw; ignored.",o)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){U(e,"Your filter function threw; ignored.",n)}return!1}function ms(t,e){let n=getComputedStyle(t),o=t.getBoundingClientRect(),r=1/0,i=-1/0,s=!1,a=Array.from(t.children);for(let m of a){if(um(m,e)||!fm(m))continue;let g=m.getBoundingClientRect(),y=g.top-o.top,p=g.bottom-o.top;p<=y||(yi&&(i=p),s=!0)}let l=s?Math.max(0,i-r):0,f=parseFloat(n.borderTopWidth)||0,c=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,d=parseFloat(n.paddingBottom)||0;return f+c+u+d+l}function gs(t){let e=document.implementation.createHTMLDocument(""),n=e.importNode(t,!0);for(let o of[n,...n.querySelectorAll("*")]){let r=o.localName.includes("-");if(!zt(o)||!(r||o.hasAttribute("is")))continue;let i=e.createElement(r?"span":o.localName);for(let s of o.attributes)s.name!=="is"&&i.setAttribute(s.name,s.value);i.append(...o.childNodes),o===n?n=i:o.replaceWith(i)}return n}function yo(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)}}function Jc(t,e,n,o,r,i){let s=t.ownerDocument||document,a=t.getBoundingClientRect(),l=r>0&&a.width>0?a.width/r:1,f=i>0&&a.height>0?a.height/i:1;if(Math.abs(l-f)>.02)return 0;let c=s.createElement("div");rt(c),c.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+r+"px!important;overflow:visible!important;visibility:hidden!important;";let u=c.attachShadow({mode:"open"});yo(u,n);let d=gs(e);u.appendChild(d),s.body.appendChild(c);let m=0,g=["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],y=["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],p=(h,b,w)=>{let k=W(h),v=k.boxSizing==="border-box",M=(C,S,A)=>{let x=parseFloat(C);if(!Number.isFinite(x))return S;let E=0;if(!v)for(let F of A)E+=parseFloat(k[F])||0;let R=x+E;return Math.abs(R-S)<=.51?R:S};return{width:M(k.width,b,g),height:M(k.height,w,y)}};try{let h=d.getBoundingClientRect(),b=d.offsetWidth||r,w=d.offsetHeight||i,k=b>0&&h.width>0?h.width/b:1,v=w>0&&h.height>0?h.height/w:1,M=(C,S,A=!1)=>{let x=C.children,E=S.children,R=Math.min(x.length,E.length);for(let F=0;F0&&B.height>0){let D=P.getBoundingClientRect(),z=B.width/l,$=B.height/f,T=D.width,L=D.height,O=_.offsetWidth||z,K=_.offsetHeight||$,Q=P.offsetWidth||T,j=P.offsetHeight||L,q=Math.abs(z-O)>Mn||Math.abs($-K)>Mn||Math.abs(T-Q)>Mn||Math.abs(L-j)>Mn;if(I){let et=p(P,Q,j);z=T>0?z*k*et.width/T:z,$=L>0?$*v*et.height/L:$,T=et.width,L=et.height}else if(q){let et=p(_,O,K),pt=p(P,Q,j);z=et.width,$=et.height,T=pt.width,L=pt.height}let V=T-z,gt=L-$;(Math.abs(V)>Mn||Math.abs(gt)>Mn)&&(N.style.boxSizing="border-box",N.style.width=`${H(z)}px`,N.style.height=`${H($)}px`,m++)}}M(N,P,I)}};M(e,d)}finally{c.remove()}return m}function ds(t,e=new Set){let n="";if(!t)return n;for(let o=0;oVc.test(f));l.length`${a*u/100}px`),f=parseFloat(i==="x"?n.width:n.height);e.style.setProperty(r,Number.isFinite(f)?`${r.slice(0,3)}(${l}, ${f}px)`:l)}}function mm(t,e){let n=t.ownerDocument,o=n.documentElement,r={w:o.clientWidth,h:o.clientHeight};if(e.position==="fixed")return r;if(e.position==="absolute"){let l=t.offsetParent;return!l||(l===n.body||l===o)&&getComputedStyle(l).position==="static"?r:{w:l.clientWidth,h:l.clientHeight}}let i=t.parentElement;if(!i)return r;let s=getComputedStyle(i),a=l=>parseFloat(s.getPropertyValue(l))||0;return{w:i.clientWidth-a("padding-left")-a("padding-right"),h:i.clientHeight-a("padding-top")-a("padding-bottom")}}var ps,tm,em,nm,rm,Uc,Hc,im,am,H,Mn,Vc,jc,hm,Ze=ct(()=>{"use strict";xt();Kt();Ot();wt();ce();ho();ps=new WeakSet;tm=/(?:^|;)position:(absolute|fixed)(?:;|$)/;em=new Set(["xml","xlink"]),nm=/^[A-Za-z_:][\w.:-]*$/;rm=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/g,Uc=/[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/,Hc=t=>t.replace(rm,e=>e.length===2?e:""),im=/^data:[^,]{0,120};base64,/;am=new Set(["img","canvas","video","iframe","object","embed"]);H=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t;Mn=.75;Vc=/::-(?:webkit-(?:scrollbar|meter|progress|slider)|moz-(?:meter|progress))/i;jc=new WeakMap;hm=[["max-width","x"],["min-width","x"],["max-height","y"],["min-height","y"]]});var Xf={};ae(Xf,{detectDrawApi:()=>qf,tryCanvasEngine:()=>cy});function qf(){try{let t=document.createElement("canvas").getContext("2d");if(t&&typeof t.drawElementImage=="function")return"drawElementImage"}catch{}return null}function ly(t,e,n,o){let r=document.createElement("canvas");r.setAttribute("layoutsubtree",""),r.setAttribute("content","drawable"),rt(r),r.style.cssText="position:fixed;top:0;left:0;z-index:-2147483647;pointer-events:none";let i=document.createElement("div");i.setAttribute("drawable",""),i.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${n}px;height:${o}px`;let s=i.attachShadow({mode:"open"});return yo(s,e),s.appendChild(t),r.appendChild(i),{canvas:r,wrapper:i}}async function cy(t,e,n){let o=qf();if(!o)return null;let r=t.element,i=t.clone;if(!r||!i)return null;let s=r.ownerDocument||document;if(!r.isConnected||s!==document||r===s.body||r===s.documentElement||r.scrollTop||r.scrollLeft||e.outerShadows||e.clip||e.excludeMode==="remove"||typeof e.filter=="function"&&e.filterMode==="remove"||e.width!=null||e.height!=null)return null;try{for(let M=r;M;M=M.assignedSlot||M.parentElement||M.getRootNode?.().host){let C=getComputedStyle(M);if(C.transform&&C.transform!=="none"||C.rotate&&C.rotate!=="none"||C.scale&&C.scale!=="none"||C.translate&&C.translate!=="none"||M===r&&C.filter&&C.filter!=="none")return null;let S=C.getPropertyValue("zoom");if(S&&Number.isFinite(parseFloat(S))&&Math.abs(parseFloat(S)-1)>1e-4)return null}}catch{return null}let a=r.getBoundingClientRect(),l=Math.max(1,a.width||r.offsetWidth||1),f=Math.max(1,a.height||r.offsetHeight||1),c=r.offsetWidth||Math.ceil(l),u=r.offsetHeight||Math.ceil(f),d=Number.isFinite(e.scale)&&e.scale>0?e.scale:1,m=Number.isFinite(e.dpr)&&e.dpr>0?e.dpr:window.devicePixelRatio||1,g=Math.max(1,Math.round(c*d*m)),y=Math.max(1,Math.round(u*d*m)),p=(t.scrollbarCSS||"")+(t.baseCSS||"")+(t.fontsCSS||"")+(t.classCSS||""),{canvas:h,wrapper:b}=ly(i,p,l,f);h.width=g,h.height=y,document.body.appendChild(h);let w;try{h.getBoundingClientRect(),await new Promise(x=>{requestAnimationFrame(()=>setTimeout(x,0)),setTimeout(x,50)});let M=h.getContext("2d"),C=M&&M[o];if(typeof C!="function")return null;M.save(),M.scale(m*d,m*d),C.call(M,b,0,0,l,f),M.restore();let S;try{S=M.getImageData(0,0,Math.min(64,g),Math.min(64,y)).data}catch{return U(e,`html-in-canvas: ${o} tainted the canvas; used the SVG engine.`),null}let A=!1;for(let x=3;x0){A=!0;break}if(!A){let x=M.getImageData(0,0,g,y).data,E=!1;for(let R=3;R0){E=!0;break}if(!E)return null}w=document.createElement("canvas"),w.width=g,w.height=y,w.getContext("2d").drawImage(h,0,0),w.style.width=`${c*d}px`,w.style.height=`${u*d}px`}catch(M){return U(e,"html-in-canvas: the browser couldn't paint it; used the SVG engine.",M),null}finally{try{h.remove()}catch{}}let k=Object.freeze({w0:l,h0:f,vbW:c,vbH:u,targetW:l,targetH:f,contentX:0,contentY:0,clip:null});Object.defineProperty(e,"meta",{value:k,enumerable:!0,writable:!1,configurable:!0}),n.artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},t.clone=t.nodeMap=t.styleCache=t.svgString=null;let v=[...document.querySelectorAll("#snapdom-sandbox")].find(Vt);return v&&v.style.position==="absolute"&&v.remove(),w}var Yf=ct(()=>{"use strict";At();wt();Ze()});var Eu={};ae(Eu,{cropSvgText:()=>Ln,decodeSvgFromDataURL:()=>pe,encodeSvgToDataURL:()=>In,isSvgDataURL:()=>ko,patchSvgHeader:()=>Mo,peekSvgHeader:()=>_n,zoomSvgText:()=>Ks});function Ln(t,e,{shiftContent:n=Z()}={}){let o=["x","y","width","height"].map(A=>Number(e?.[A]));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 r=t.match(/]*>/i);if(!r)throw new Error("[SnapDOM] Only SVG captures can be cropped.");let i=r[0],s=(i.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,f,c,u]=a,d=Math.max(l,o[0]),m=Math.max(f,o[1]),g=Math.min(l+c,o[0]+o[2]),y=Math.min(f+u,o[1]+o[3]);if(!(g>d)||!(y>m))throw new RangeError("[SnapDOM] The crop area does not intersect the capture.");let p=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),h=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]),b=Number.isFinite(p)&&p>0?p/c:1,w=Number.isFinite(h)&&h>0?h/u:1,k=Math.max(1,(g-d)*b),v=Math.max(1,(y-m)*w),M=i.replace(/(\bwidth=")[^"]*/i,`$1${k}`).replace(/(\bheight=")[^"]*/i,`$1${v}`),C=n?_y(t,i,d,m):null;if(C)return M.replace(/(\bviewBox=")[^"]*/i,(x,E)=>`${E}0 0 ${g-d} ${y-m}`)+C.slice(i.length);let S=M.replace(/(\bviewBox=")[^"]*/i,`$1${d} ${m} ${g-d} ${y-m}`);return t.replace(i,S)}function _y(t,e,n,o){if(!t.startsWith(e))return null;let r=/^\s*]*>/i.exec(t.slice(e.length,e.length+2048));if(!r)return null;let i=r[0],s=(f,c,u)=>{let d=new RegExp(`(\\s${c}=")([^"]*)`),m=f.match(d),g=m?parseFloat(m[2]):0;return Number.isFinite(g)?m?f.replace(d,(y,p)=>`${p}${g-u}`):f.replace(/^(\s*`${p} ${c}="${-u}"`):null},a=s(i,"x",n),l=a&&s(a,"y",o);return l?e+l+t.slice(e.length+i.length):null}function Ks(t,e,n){let o=t.match(/]*>/i);if(!o)return null;let r=o[0],i=String((r.match(/\bviewBox="([^"]+)"/i)||[])[1]||"").trim().split(/[\s,]+/).map(Number);if(i.length!==4||!i.every(Number.isFinite)||i[2]<=0||i[3]<=0)return null;let s=Math.min(e/i[2],n/i[3]),a=/^\s*]*>/i.exec(t.slice(r.length,r.length+2048));if(!a)return null;let l=a[0],f={x:(e-s*i[2])/2,y:(n-s*i[3])/2};for(let p of["x","y","width","height"]){let h=new RegExp(`(\\s${p}=")([^"]*)`),b=l.match(h),w=b?parseFloat(b[2]):0;if(!Number.isFinite(w))return null;let k=w*s+(f[p]||0);l=b?l.replace(h,(v,M)=>`${M}${k}`):l.replace(/^(\s*`${M} ${p}="${k}"`)}let c=t.slice(r.length+a[0].length),u=c.indexOf(""),d=/]*?( style=")([^"]*)"/i.exec(c.slice(u<0?0:u));if(!d)return null;let m=(u<0?0:u)+d.index,g=c.slice(0,m)+d[0].slice(0,-1)+`;zoom:${s} !important"`+c.slice(m+d[0].length);return r.replace(/(\bwidth=")[^"]*/i,`$1${e}`).replace(/(\bheight=")[^"]*/i,`$1${n}`).replace(/(\bviewBox=")[^"]*/i,`$10 0 ${e} ${n}`)+l+g}function ko(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function pe(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function _n(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 Mo(t,e){let n=t.indexOf(",")+1,o=_n(t).match(/]*>/i)?.[0],r=o&&encodeURIComponent(o);return!r||!t.startsWith(r,n)?null:t.slice(0,n)+encodeURIComponent(e(o))+t.slice(n+r.length)}function In(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}var Ao=ct(()=>{"use strict";ht()});function Ru(t){let e=[],n="",o=0;for(let r=0;rr.trim()).filter(Boolean)}function Iy(t){let e=[],n="",o=0;for(let i=0;i`${a}:${l}`).join(";")}function Oy(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,o)=>`${n}{${Fu(o)}}`)}function Wy(t){return t=t.replace(/]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,()=>Oy(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,o)=>`style=${n}${Fu(o)}${n}`),t}function Dy(){return Yr||(Yr=(async()=>{try{let t='
',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 r=o.getImageData(2,18,1,1).data[3]>128,i=o.getImageData(2,2,1,1).data[3]>128;return{native:r||i,flippedY:i&&!r}}catch{return{native:!1,flippedY:!1}}})(),Yr)}function By(t){let e=[],n=0,o=0;for(let r=0;r{let i=0,s=0,a="",l=0;for(;lRu(o).map(r=>{let i=r.indexOf(":");if(i<0)return r;let s=r.slice(0,i).trim().toLowerCase();return s==="text-shadow"||e&&s==="box-shadow"?`${s}:${By(r.slice(i+1))}`:r}).join(";");return t=t.replace(/]*>([\s\S]*?)<\/style>/gi,(o,r)=>o.replace(r,()=>r.replace(/([^{}]+)\{([^}]*)\}/g,(i,s,a)=>`${s}{${n(a)}}`))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(o,r,i)=>`style=${r}${n(i)}${r}`),t}async function Kr(t){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(t))return{svg:t,naturalOnly:!1};let{native:n,flippedY:o}=await Dy();try{let r=t;return n||(r=Wy(r)),o&&(r=zy(r,n)),{svg:r,naturalOnly:!0}}catch{return{svg:t,naturalOnly:!0}}}var Yr,Zs=ct(()=>{"use strict";Yr=null});var _u={};ae(_u,{MAX_RASTER_AREA:()=>Fe,MAX_RASTER_SIDE:()=>Qt,WEBP_MAX_SIDE:()=>ea,__setDecodeFrameIdleMs:()=>jy,toCanvas:()=>he});function Tu(t,e,n){try{let o=t.match(/]*>/i);if(!o)return t;let r=o[0],i=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),s=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(i)||!Number.isFinite(s)||i<=0||s<=0)return t;let a=Math.min(1,Qt/i,Qt/s,Math.sqrt(Fe/(i*s)));if(a>=1)return t;let l=Math.max(1,Math.floor(i*a)),f=Math.max(1,Math.floor(s*a));return at(n,"raster-clamp",`capture ${Math.round(i)}x${Math.round(s)}px exceeds decode limits; downscaled to ${l}x${f}px`),U(e,`${Math.round(i)}\xD7${Math.round(s)}px is too large for the browser to draw; scaled down to ${l}\xD7${f}px. For full size, export ${typeof CompressionStream=="function"?"a PNG or JPEG":"a JPEG"} blob, an SVG, or crop.`),t.replace(r,r.replace(/(\bwidth=")[\d.]+/i,`$1${l}`).replace(/(\bheight=")[\d.]+/i,`$1${f}`))}catch{return t}}function Uy(t,e,n){let o=t.naturalWidth,r=t.naturalHeight,i=Math.min(8,r),s=document.createElement("canvas");s.width=Math.max(1,Math.ceil(o*e)),s.height=Math.max(1,Math.ceil(i*6*n));let a=s.getContext("2d",{willReadFrequently:!0});return!a||!(o>0&&r>0)?null:()=>{a.clearRect(0,0,s.width,s.height);for(let u=0;u<6;u++){let d=Math.floor((r-i)*u/5);a.drawImage(t,0,d,o,i,0,u*i*n,o*e,i*n)}let l=a.getImageData(0,0,s.width,s.height).data,f=!1,c=0;for(let u=3;u0&&(f=!0),c=c*31+l[u-3]+l[u-2]*7+l[u-1]*13+l[u]|0;return{ink:f,sig:c}}}async function Hy(t,e,n){rt(t),t.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(t);try{if(!n)return await Zr(),await Zr(),!1;let o=performance.now()+(e?600:150),r=null;for(;;){let i;try{i=n()}catch{return!1}if(i.ink&&(!e||i.sig===r))return!0;if(r=i.sig,performance.now()>o)return i.ink;await Zr()}}finally{try{t.remove()}catch{}}}function Qr(){clearTimeout(na),Re?.remove(),Re=null,Jr=0}function jy(t){Lu=t??Nu}function $u(t){if(typeof document>"u"||!document.body)return new Image;if(clearTimeout(na),Re&&!Re.contentDocument&&Qr(),Re&&Jr>Vy&&Eo===0&&Qr(),!Re){let n=document.createElement("iframe");rt(n),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;left:-9999px;top:0;width:0;height:0;border:0;visibility:hidden;pointer-events:none";try{document.body.appendChild(n)}catch{}if(n.contentDocument)Re=n,Jr=0;else{try{n.remove()}catch{}return new Image}}Jr+=t.length,Eo+=1;let e=Re.contentDocument.createElement("img");return e.__snapdomDecodeFrame=!0,e}function Qs(t,e=!1){!t||!t.__snapdomDecodeFrame||(t.__snapdomDecodeFrame=!1,Eo=Math.max(0,Eo-1),e&&(Js=!0),!(Eo>0)&&(Js?(Js=!1,Qr()):na=setTimeout(Qr,Lu)))}function Pu(t,e){return t.loading="eager",t.decoding="sync",t.crossOrigin="anonymous",t.src=e,t.decode()}function Ky(t){if(typeof t!="string")return!1;let e=t.indexOf(",")+1,n=Math.max(48,Math.floor((t.length-e)/200)),o=0,r=0;for(let i=e;i+48<=t.length;i+=n){let s=t.slice(i,i+48);o++,Yy.some(a=>s.includes(a))||r++}return r*2>o}function ta(t,e,n,o,r){if(!e.naturalWidth){t.drawImage(e,0,0,n,o);return}let i=n*o,s=i>Gy&&!Ky(r)?Math.min(Xy,Math.ceil(i/qy)):1;if(s===1){t.drawImage(e,0,0,n,o);return}let a=e.naturalWidth,l=e.naturalHeight/o;for(let f=0;f]*>/i)||[])[0]||"",p=parseFloat((y.match(/\bwidth="([\d.]+)/i)||[])[1]),h=parseFloat((y.match(/\bheight="([\d.]+)/i)||[])[1]),b=Number.isFinite(p)&&Number.isFinite(h)&&p>0&&h>0&&Math.min(1,Qt/p,Qt/h,Math.sqrt(Fe/(p*h)))<1,w=Z();if(f||b||w)try{let k=!w&&Mo(t,v=>Tu(f?Ln(v,f,{shiftContent:!1}):v,e,n));if(k)u=k;else{let v=pe(t);if(f&&(v=Ln(v,f)),w){let M=await Kr(v);v=M.svg,d=M.naturalOnly,m=/@font-face|data:image\//i.test(v)}(b||f)&&(v=Tu(v,e,n)),u=In(v)}}catch(k){if(f)throw k;u=t}}let g=c||$u(u);try{c||await Pu(g,u)}catch(y){if(!g.__snapdomDecodeFrame)throw y;let p=g;g=$u(u),Qs(p);try{await Pu(g,u)}catch(h){throw Qs(g,n.retireDecodeFrame),h}}try{!c&&!Z()&&ko(u)&&(st()?/.data(?:%3A|:)image(?:%2F|\/)svg/i:/(?:%40|@)font-face/i).test(u)&&await new Promise(T=>{let L=new MessageChannel;L.port1.onmessage=()=>{L.port1.close(),L.port2.close(),T()},L.port2.postMessage(0)});let y=c?c.width:g.naturalWidth,p=c?c.height:g.naturalHeight,h=f?y:Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:y,b=f?p:Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:p,w,k,v=Number.isFinite(o),M=Number.isFinite(r);if(v&&M)w=Math.max(1,o),k=Math.max(1,r);else if(v){let T=o/Math.max(1,h);w=o,k=b*T}else if(M){let T=r/Math.max(1,b);k=r,w=h*T}else{let T=c&&Number.isFinite(a.vbW)&&Number.isFinite(a.vbH);w=T?a.vbW:y,k=T?a.vbH:p}!v&&!M&&(w=w*i,k=k*i);let C=w*s,S=k*s,A=Math.max(C/Qt,S/Qt,Math.sqrt(C*S/Fe)),x=n.codec==="webp"?Math.max(C,S)/ea:0,E=Math.max(A,x);if(E>1){let T=A<=1;at(n,"canvas-clamp",`output ${Math.round(C)}x${Math.round(S)}px exceeds ${T?"WebP":"canvas"} limits; downscaled`),U(e,T?`${Math.round(C)}\xD7${Math.round(S)}px is larger than WebP can encode (${ea}px per side); scaled down. For full size, export a PNG, an SVG, or crop.`:`${Math.round(C)}\xD7${Math.round(S)}px is larger than a canvas allows; scaled down. For full size, export ${typeof CompressionStream=="function"?"a PNG or JPEG":"a JPEG"} blob, an SVG, or crop.`),w/=E,k/=E}let R=zt(e.canvas)&&ye(e.canvas,"canvas")?e.canvas:document.createElement("canvas");R.width=Math.max(1,w*s),R.height=Math.max(1,k*s),R.style.width=`${w}px`,R.style.height=`${k}px`;let F=R.getContext("2d");if(!F)throw new Error("[SnapDOM] The canvas you passed has no 2D context (is it already used for WebGL?).");let N=null,P=n.layoutZoom||1;if(!c&&st()){let T=P*h/(w*s),L=Math.round(w*s*T),O=Math.round(k*s*T);T>1.01&&L<=Qt&&O<=Qt&&L*O<=Fe&&(N={w:L,h:O})}let _=d&&(Math.round(w*s)!==y||Math.round(k*s)!==p),I=_?y:N?N.w:w*s,B=_?p:N?N.h:k*s,D=Z()&&!c?Uy(g,I/Math.max(1,y),B/Math.max(1,p)):null,z=!1;D&&(z=await Hy(g,m,D));let $=()=>{if(F.save(),s!==1&&F.scale(s,s),l&&(F.save(),F.fillStyle=l,F.fillRect(0,0,w,k),F.restore()),_){let T=document.createElement("canvas");T.width=y,T.height=p,ta(T.getContext("2d"),g,y,p,u),F.drawImage(T,0,0,w,k)}else{if(F.save(),F.setTransform(1,0,0,1,0,0),N){let T=document.createElement("canvas");for(T.width=N.w,T.height=N.h,ta(T.getContext("2d"),g,N.w,N.h,u);T.width>w*s*2;){let L=document.createElement("canvas");L.width=Math.ceil(T.width/2),L.height=Math.ceil(T.height/2),L.getContext("2d").drawImage(T,0,0,L.width,L.height),T=L}F.imageSmoothingQuality="high",F.drawImage(T,0,0,w*s,k*s)}else ta(F,g,w*s,k*s,u);F.restore()}F.restore()};if($(),D&&z&&m){let T=!0;try{T=D().ink}catch{}if(!T){let L=performance.now()+600;do{await Zr();try{T=D().ink}catch{break}}while(!T&&performance.now(){"use strict";ht();At();$t();wt();Ao();Zs();Qt=Z()?16384:32767,Fe=16384*16384,ea=16383;Zr=()=>new Promise(t=>{requestAnimationFrame(t),setTimeout(t,50)});Vy=24*1024*1024,Nu=5e3,Re=null,Jr=0,Eo=0,Js=!1,Lu=Nu,na=0;Gy=4e6,qy=2e6,Xy=8,Yy=["%3C","%3E","%20","%7B","%7D","%3B"]});var Ro={};ae(Ro,{rasterize:()=>oa});async function oa(t,e,n={}){let o=await he(t,e,{...n,codec:e.format}),s=o.width*o.height<=2e6?o.toDataURL(`image/${e.format}`,e.quality):await new Promise(l=>{let f=()=>l(o.toDataURL(`image/${e.format}`,e.quality));try{o.toBlob(c=>{if(!c)return f();let u=new FileReader;u.onload=()=>l(String(u.result||"")),u.onerror=f,u.readAsDataURL(c)},`image/${e.format}`,e.quality)}catch{f()}}),a=new Image;return a.src=s,Z()?await a.decode():await new Promise((l,f)=>{if(a.complete&&a.naturalWidth)return l();a.onload=l,a.onerror=f}),a.style.width=`${o.width/e.dpr}px`,a.style.height=`${o.height/e.dpr}px`,a}var Wn=ct(()=>{"use strict";On();ht()});var ra={};ae(ra,{toImg:()=>Zy,toSvg:()=>Zy});async function Zy(t,e,n={}){let{scale:o=1,width:r,height:i,meta:s={}}=e,a=Number.isFinite(r),l=Number.isFinite(i),f=Number.isFinite(o)&&o!==1||a||l;if(Z()&&f)try{let{svg:m}=await Kr(pe(t)),g=(m.match(/]*>/i)||[])[0]||"",y=parseFloat((g.match(/\bwidth="([\d.]+)/i)||[])[1]),p=parseFloat((g.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(y)||!Number.isFinite(p))throw new Error("The SVG has no size.");let h=Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:y,b=Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:p,w,k;a&&l?(w=r,k=i):a?(w=r,k=Math.max(1,Math.round(b*(r/Math.max(1,h))))):l?(k=i,w=Math.max(1,Math.round(h*(i/Math.max(1,b))))):(w=Math.max(1,Math.round(y*o)),k=Math.max(1,Math.round(p*o)));let v=Ks(m,w,k)||m.replace(/width="[^"]*"/,`width="${w}"`).replace(/height="[^"]*"/,`height="${k}"`),M=new Image;return M.decoding="sync",M.loading="eager",M.src=In(v),await M.decode(),M.style.width=`${w}px`,M.style.height=`${k}px`,M}catch(m){return at(n,"safari-png-fallback","Safari vector toImg failed; using PNG",m),U(e,"Safari couldn't show the SVG; used a PNG.",m),oa(t,{...e,format:"png",quality:1,meta:s},n)}let c=t,u=!1;if(!a&&!l&&o!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let m=y=>{let p=Number((y.match(/\bwidth="([\d.]+)"/i)||[])[1]),h=Number((y.match(/\bheight="([\d.]+)"/i)||[])[1]);return p>0&&h>0?(u=!0,y.replace(/\bwidth="[^"]*"/i,`width="${Math.max(1,Math.round(p*o))}"`).replace(/\bheight="[^"]*"/i,`height="${Math.max(1,Math.round(h*o))}"`)):y},g=Mo(t,m);if(g)c=g;else{let y=pe(t),p=(y.match(/]*>/i)||[])[0]||"",h=m(p);u&&(c=In(y.replace(p,h)))}}catch{}let d=new Image;d.decoding="sync",d.loading="eager",d.src=c;try{await d.decode()}catch(m){if(!u)throw m;d.src=t,u=!1,await d.decode()}if(a&&l)d.style.width=`${r}px`,d.style.height=`${i}px`;else if(a){let m=Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:d.naturalWidth,g=Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:d.naturalHeight,y=r/Math.max(1,m);d.style.width=`${r}px`,d.style.height=`${Math.max(1,Math.round(g*y))}px`}else if(l){let m=Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:d.naturalWidth,g=Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:d.naturalHeight,y=i/Math.max(1,g);d.style.height=`${i}px`,d.style.width=`${Math.max(1,Math.round(m*y))}px`}else{let m=Math.max(1,Math.round(d.naturalWidth*(u?1:o))),g=Math.max(1,Math.round(d.naturalHeight*(u?1:o)));if(d.style.width=`${m}px`,d.style.height=`${g}px`,!u&&o!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let p=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${m}"`).replace(/height="[^"]*"/,`height="${g}"`);d.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,await d.decode()}catch(y){U(e,"Couldn't size the SVG image.",y),d.src!==t&&(d.src=t,await d.decode().catch(()=>{}))}}return d}var ia=ct(()=>{"use strict";xt();At();Wn();Ao();Zs()});var Ou={};ae(Ou,{encodePng:()=>Jy});function ti(t,e=new Uint8Array(0)){let n=new Uint8Array(e.length+12),o=new DataView(n.buffer);o.setUint32(0,e.length);for(let i=0;i<4;i++)n[i+4]=t.charCodeAt(i);n.set(e,8);let r=4294967295;for(let i=4;i>>8;return o.setUint32(n.length-4,(r^4294967295)>>>0),n}async function Jy(t,e,n){if(![t,e].every(y=>Number.isInteger(y)&&y>0&&y<=2147483647))throw new RangeError("[SnapDOM] PNG dimensions must be integers from 1 to 2147483647");let o=new Uint8Array(13),r=new DataView(o.buffer);r.setUint32(0,t),r.setUint32(4,e),o[8]=8,o[9]=6;let i=[new Uint8Array([137,80,78,71,13,10,26,10]),ti("IHDR",o),ti("sRGB",new Uint8Array([0]))],s=t*4,a=Math.max(1,Math.floor(65536/(s+1))),l=new Uint8Array(s),f=0,c=new CompressionStream("deflate"),u=c.writable.getWriter(),d=c.readable.getReader(),m,g=(async()=>{try{for(;;){let{done:y,value:p}=await d.read();if(y)return;i.push(ti("IDAT",p))}}catch(y){m=y,await u.abort(y).catch(()=>{})}})();try{for await(let y of n){if(!(y instanceof Uint8Array||y instanceof Uint8ClampedArray)||!y.length||y.length%s)throw new RangeError("[SnapDOM] PNG input must contain complete RGBA rows");let p=y.length/s;if(f+p>e)throw new RangeError("[SnapDOM] PNG input exceeds the declared height");for(let h=0;h{"use strict";Iu=new Uint32Array(256);for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;Iu[t]=e}});var Gu={};ae(Gu,{encodeJpeg:()=>nb});function zu(t){let e=[0,240];for(let n=0;n<16;n++)for(let o=1;o<=10;o++)e.push(n<<4|o);return t.concat(e.filter(n=>!t.includes(n)).sort((n,o)=>n-o))}function eb(t){for(let e=0;e<64;e+=8)Vu(t,e,1);for(let e=0;e<8;e++)Vu(t,e,8)}function Vu(t,e,n){let o=t[e]+t[e+7*n],r=t[e]-t[e+7*n],i=t[e+n]+t[e+6*n],s=t[e+n]-t[e+6*n],a=t[e+2*n]+t[e+5*n],l=t[e+2*n]-t[e+5*n],f=t[e+3*n]+t[e+4*n],c=t[e+3*n]-t[e+4*n],u=o+f,d=o-f,m=i+a,g=i-a;t[e]=u+m,t[e+4*n]=u-m;let y=(g+d)*.707106781;t[e+2*n]=d+y,t[e+6*n]=d-y,u=c+l,m=l+s,g=s+r;let p=(u-g)*.382683433,h=.5411961*u+p,b=1.306562965*g+p,w=m*.707106781,k=r+w,v=r-w;t[e+5*n]=v+h,t[e+3*n]=v-h,t[e+n]=k+b,t[e+7*n]=k-b}async function nb(t,e,n,o){if(![t,e].every(P=>Number.isInteger(P)&&P>0&&P<=65535))throw new RangeError("[SnapDOM] JPEG dimensions must be integers from 1 to 65535");let r=Math.min(100,Math.max(1,Math.round((typeof o=="number"&&o>=0&&o<=1?o:.92)*100))),i=r<50?5e3/r:200-r*2,s=r<90?1:0,a=8<{let I=new Uint8Array(64),B=new Float32Array(64);for(let D=0;D<64;D++){let z=Math.min(255,Math.max(1,Math.floor((P[D]*i+50)/100)));I[Du[D]]=z,B[D]=1/(z*Bu[D>>3]*Bu[D&7]*8)}return l.push(..._?[1]:[],...I),B}),c=(P,_)=>[255,P,_.length+2>>8,_.length+2&255,..._],u=[255,216,...c(224,[74,70,73,70,0,1,1,0,0,1,0,1,0,0]),...c(219,l),...c(192,[8,e>>8,e&255,t>>8,t&255,3,1,s?34:17,0,2,17,1,3,17,1]),...c(196,ju.flatMap(([P,,_,I])=>[P,..._,...I])),...c(218,[3,1,0,2,17,3,17,0,63,0])],d=[new Uint8Array(u)],m=new Uint8Array(65536),g=0,y=0,p=0;function h(P,_){for(y=y<<_|P,p+=_;p>=8;){p-=8;let I=y>>>p&255;g>=m.length-1&&(d.push(m.subarray(0,g)),m=new Uint8Array(65536),g=0),m[g++]=I,I===255&&(m[g++]=0)}y&=(1<15;T-=16)h(D[240][0],D[240][1]);$=32-Math.clz32(Math.abs(z));let O=D[T<<4|$];h(O[0],O[1]),h((z<0?z-1:z)&(1<<$)-1,$),T=0}T&&h(D[0][0],D[0][1])}let M=t*4,C=new Uint8Array(M*a),S=new Float32Array(a*a),A=new Float32Array(64),x=new Float32Array(64),E=s?.25:1;function R(P){for(let _=0;_>s)*8+(D>>s);A[O]+=(-.168736*$-.331264*T+.5*L)*E,x[O]+=(.5*$-.418688*T-.081312*L)*E}}for(let I=0;I<(s?4:1);I++){let B=(I>>1)*128+(I&1)*8;for(let D=0;D<64;D++)b[D]=S[B+(D>>3)*a+(D&7)];v(0,0)}b.set(A),v(1,1),b.set(x),v(2,1)}}let F=0,N=0;for await(let P of n){if(!(P instanceof Uint8Array||P instanceof Uint8ClampedArray)||!P.length||P.length%M)throw new RangeError("[SnapDOM] JPEG input must contain complete RGBA rows");let _=P.length/M;if(F+_>e)throw new RangeError("[SnapDOM] JPEG input exceeds the declared height");for(let I=0;I<_;){let B=Math.min(a-N,_-I);C.set(P.subarray(I*M,(I+B)*M),N*M),N+=B,I+=B,N===a&&(R(a),N=0)}F+=_}if(F!==e)throw new RangeError("[SnapDOM] JPEG input does not match the declared height");return N&&R(N),p&&h((1<<8-p)-1,8-p),d.push(m.subarray(0,g),new Uint8Array([255,217])),new Blob(d,{type:"image/jpeg"})}var Du,Qy,tb,Bu,Uu,ju,Hu,qu=ct(()=>{"use strict";Du=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],Qy=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],tb=Array.from({length:64},(t,e)=>(e&7)<4&&e<32?[17,18,24,47,18,21,26,66,24,26,56,99,47,66,99,99][(e>>3)*4+(e&7)]:99),Bu=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379];Uu=[0,1,2,3,4,5,6,7,8,9,10,11],ju=[[0,0,[0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],Uu],[16,0,[0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],zu([1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130])],[1,1,[0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Uu],[17,1,[0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],zu([0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241])]],Hu=ju.map(([,,t,e])=>{let n=[],o=0,r=0;for(let i=1;i<=16;i++,o<<=1)for(let s=0;s]*>/i)?.[0];if(!r)return null;let i=e.crop?Ln(r,e.crop):r,s=parseFloat(i.match(/\bwidth="([^"]+)/i)?.[1]),a=parseFloat(i.match(/\bheight="([^"]+)/i)?.[1]),l=(i.match(/\bviewBox="([^"]+)/i)?.[1]||"").trim().split(/[\s,]+/).map(Number);if(!(s>0&&a>0)||l.length!==4||!l.every(Number.isFinite)||!(l[2]>0&&l[3]>0))return null;let f=Number.isFinite(e.width),c=Number.isFinite(e.height),u=e.meta||{},d=Math.max(1,Math.floor(s)),m=Math.max(1,Math.floor(a)),g=e.crop?d:Number.isFinite(u.vbW)?u.vbW:Number.isFinite(u.w0)?u.w0:d,y=e.crop?m:Number.isFinite(u.vbH)?u.vbH:Number.isFinite(u.h0)?u.h0:m,p=e.dpr??1,h=e.scale??1,b=(f&&c?Math.max(1,e.width):f?e.width:c?e.height*g/Math.max(1,y):d*h)*p,w=(f&&c?Math.max(1,e.height):c?e.height:f?e.width*y/Math.max(1,g):m*h)*p;if(Math.max(s,a,b,w)<=Qt&&s*a<=Fe&&b*w<=Fe||(n==="png"?typeof CompressionStream!="function":Math.max(b,w)>=65536))return null;return k();async function k(){let v=Math.max(1,Math.floor(b)),M=Math.max(1,Math.floor(w)),C=t.indexOf(",")+1,S=encodeURIComponent(r),A=t.lastIndexOf("%3C%2Fsvg%3E"),x;if(t.startsWith(S,C)&&A>=C+S.length)x=t.slice(C+S.length,A);else{let O=pe(t);x=encodeURIComponent(O.slice(O.indexOf(r)+r.length,O.lastIndexOf("")))}let E=i.match(/\bpreserveAspectRatio="([^"]*)"/i)?.[1]||"xMidYMid meet",R=s/l[2],F=a/l[3],N=0,P=0;/\bnone\b/.test(E)||(R=F=/\bslice\b/.test(E)?Math.max(R,F):Math.min(R,F),N=(s-l[2]*R)*(/xMin/.test(E)?0:/xMax/.test(E)?1:.5),P=(a-l[3]*F)*(/YMin/.test(E)?0:/YMax/.test(E)?1:.5)),N-=l[0]*R,P-=l[1]*F;let _=i.replace(/\s(?:width|height|preserveAspectRatio)="[^"]*"/gi,"").slice(0,-1),I=Z()&&/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(pe(t)),B=s/b,D=a/w,z=Math.max(1,Math.min(8192,Math.floor(4*1024*1024/v),I?Math.floor(2046/D):8192)),$=Math.max(1,Math.min(8192,v,I?Math.floor(2046/B):8192)),T=n!=="png";if(T&&e.backgroundColor){let O=document.createElement("canvas").getContext("2d");O.fillStyle=e.backgroundColor,O.fillRect(0,0,1,1),T=O.getImageData(0,0,1,1).data[3]<255}async function*L(){for(let O=0;O`)+x+"%3C%2Fg%3E%3C%2Fsvg%3E",J=await he(X,{width:et,height:pt,dpr:1,backgroundColor:I?null:e.backgroundColor},{warnings:o.warnings,retireDecodeFrame:!0}),Y=J;try{if(I){Y=document.createElement("canvas"),Y.width=q,Y.height=K;let St=Y.getContext("2d");e.backgroundColor&&(St.fillStyle=e.backgroundColor,St.fillRect(0,0,q,K)),St.drawImage(J,j*B-V,O*D-gt,q*B,K*D,0,0,q,K)}let Ft=Y.getContext("2d");T&&(Ft.globalCompositeOperation="destination-over",Ft.fillStyle="#000",Ft.fillRect(0,0,q,K));let te=Ft.getImageData(0,0,q,K).data;for(let St=0;St(Wu(),Ou))).encodePng(v,M,L()):(await Promise.resolve().then(()=>(qu(),Gu))).encodeJpeg(v,M,L(),e.quality)}}var sa=ct(()=>{"use strict";On();Ao();ht()});var Xu={};ae(Xu,{toBlob:()=>aa});async function aa(t,e,n={}){let o=e.format||e.type||"svg";if(o==="svg"){if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)throw new Error("[SnapDOM] html-in-canvas makes a raster capture, not an SVG; ask for png, jpeg or webp.");let a=$o(decodeURIComponent(t.split(",")[1]),n.fileSvg);return new Blob([a],{type:"image/svg+xml"})}let r=o==="jpg"?"jpeg":o,i=(r==="png"||r==="jpeg")&&ei(t,e,r,n);if(i)return i;let s=await he(t,e,{...n,codec:r});return new Promise(a=>s.toBlob(l=>a(l),`image/${r}`,e.quality))}var la=ct(()=>{"use strict";On();sa();$t()});var Ku={};ae(Ku,{download:()=>ob});async function Yu(t,e){let n=new File([t],e,{type:t.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:e})}catch(o){if(o.name!=="AbortError")return!1}return!0}async function ob(t,e,n={}){let o=new Set(["png","jpeg","jpg","webp","svg"]),r=(e?.type||"").toLowerCase(),i=o.has(r)?r:"",s=(e?.format||i||"").toLowerCase(),a=s==="jpg"?"jpeg":s||"png",l=e?.filename||"snapdom",f=/\.(png|jpe?g|webp|svg)$/i.test(l)?l:`${l}.${a}`,c={...e||{},format:a,type:a};c.dpr=1;let u=Yn(),d=(a==="png"||a==="jpeg")&&ei(t,c,a,n);if(a==="svg"||d){let y=d?await d:await aa(t,{...c,type:"svg"},n);if(u&&await Yu(y,f))return;let p=URL.createObjectURL(y),h=document.createElement("a");h.href=p,h.download=f,document.body.appendChild(h),h.click(),setTimeout(()=>URL.revokeObjectURL(p),1e3),h.remove();return}let m=await he(t,c,{...n,codec:a});if(u){let y=`image/${a}`,p=await new Promise(h=>m.toBlob(h,y,e?.quality));if(p&&await Yu(p,f))return}let g=document.createElement("a");g.href=m.toDataURL(`image/${a}`,e?.quality),g.download=f,document.body.appendChild(g),g.click(),g.remove()}var Zu=ct(()=>{"use strict";la();On();sa();ht()});xt();xt();ht();Ot();xt();ce();Ot();function fl(t){return Lt(t).leaksAcrossSubtrees}function ul(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Lt(e).importantProps}function Ce(t,e){let n=t.ownerDocument||document,o=t.getRootNode?t.getRootNode():n;return o===n?Xo(n,e).universe:e&&Ie(o)?qd(t,o,n,e):null}var cl=new WeakMap;function qd(t,e,n,o){let r=o.shadowUniverse;if(r===null)return null;if(!r){let a=Xo(n,o).universe;if(!a)return o.shadowUniverse=null;r=o.shadowUniverse={universe:new Set(a),roots:new Set}}let i=a=>{for(;Ie(a)&&!r.roots.has(a);a=a.host.getRootNode()){r.roots.add(a);for(let l of[...a.styleSheets,...a.adoptedStyleSheets||[]]){let f=cl.get(l);if((!f||f.epoch!==fe)&&cl.set(l,f={epoch:fe,props:Fa(l)}),!f.props)return!1;for(let c of f.props)r.universe.add(c)}_o(a.getAnimations(),r.universe)}return!0},s=i(e)&&(!t.shadowRoot||i(t.shadowRoot));for(let a=t.assignedSlot;s&&a;a=a.assignedSlot)s=i(a.getRootNode());return s?r.universe:o.shadowUniverse=null}function mn(t,e){let n=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==n?null:Xo(n,e).pseudoUniverse}function dl(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Lt(e).svgGeometry}function pl(t){let e=Lt(t.ownerDocument||document).svgGeometrySel;if(e==null)return!0;if(!e)return!1;try{return t.matches(e)}catch{return!0}}function zi(t,e){let n=t.style;for(let i=0;n&&i{n.add("t"+s.localName),s.id&&n.add("i"+s.id);let a=s.classList;for(let l=0;lparseFloat(f)||0,s=t.offsetWidth-t.clientWidth-i(e.getPropertyValue("border-left-width"))-i(e.getPropertyValue("border-right-width")),a=t.offsetHeight-t.clientHeight-i(e.getPropertyValue("border-top-width"))-i(e.getPropertyValue("border-bottom-width")),l=(f,c)=>{let u=n[f];if(!u||!u.endsWith("px"))return;let d=parseFloat(u);Number.isFinite(d)&&(n[f]=`${Math.round((d+c)*1e3)/1e3}px`)};return s>=2&&(l("width",s),l("inline-size",s)),a>=2&&(l("height",a),l("block-size",a)),s>=2||a>=2}var ji=["border-top-width","border-right-width","border-bottom-width","border-left-width"],xl=["width","inline-size","height","block-size"];function Sl(t,e,n){if(!ji.some(f=>n[f]?.includes("."))||e.getPropertyValue("box-sizing")==="border-box"||n.display==="inline")return"";for(let f of["width","height"]){let c=n[`min-${f}`],u=n[`max-${f}`];if(c&&c!=="0px"&&c!=="auto"||u&&u!=="none")return""}let o=f=>parseFloat(n[f])||0,r=n["border-collapse"]==="collapse"&&n.display==="table-cell"?.5:1,i=o("padding-left")+o("padding-right")+(o("border-left-width")+o("border-right-width"))*r,s=o("padding-top")+o("padding-bottom")+(o("border-top-width")+o("border-bottom-width"))*r,a=(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb";for(let f of xl){let c=n[f];if(!c||!c.endsWith("px"))continue;let d=f==="width"||f==="inline-size"&&!a||f==="block-size"&&a?i:s;n[f]=`${Math.round((parseFloat(c)+d)*1e3)/1e3}px`}n["box-sizing"]="border-box";let l="";if(e.getPropertyValue("overflow-x")==="auto"){let f=t.scrollWidth<=t.clientWidth;n["overflow-x"]=f?"hidden":"auto",f&&(l+="x")}if(e.getPropertyValue("overflow-y")==="auto"){let f=t.scrollHeight<=t.clientHeight;n["overflow-y"]=f?"hidden":"auto",f&&(l+="y")}return l}var Zd=["box-sizing",...xl,"overflow-x","overflow-y"],Jd=/(?:box-sizing|width|height|inline-size|block-size|overflow(?:-[xy])?)\s*:/i;function vl(t,e,n){if(Jd.test(t.getAttribute("style")))for(let o of Zd)e.style.getPropertyValue(o)&&n[o]&&e.style.setProperty(o,n[o],e.style.getPropertyPriority(o))}function Qd(t){return t.backgroundImage&&t.backgroundImage!=="none"||t.backgroundColor&&t.backgroundColor!=="rgba(0, 0, 0, 0)"&&t.backgroundColor!=="transparent"||(parseFloat(t.borderTopWidth)||0)>0||(parseFloat(t.borderBottomWidth)||0)>0||(parseFloat(t.paddingTop)||0)>0||(parseFloat(t.paddingBottom)||0)>0?!0:(t.overflowBlock||t.overflowY||"visible")!=="visible"}var kt=typeof CSS<"u"&&CSS.supports?.("text-wrap-mode","nowrap")?"text-wrap-mode":"white-space";function Cl(t,e,n,o,r){let i=n["text-wrap-mode"]||n["white-space"]||"",s=i==="nowrap"||i==="pre"||kt==="white-space"&&i!=="normal",a=r.oneLine||=new WeakSet;if(a.has(t.parentElement)){a.add(t),!s&&e.style&&e.style.setProperty(kt,"nowrap");return}let l=n.display||"";!o&&!l.startsWith("inline-")&&(n.float||"none")==="none"&&n.position!=="absolute"&&n.position!=="fixed"||s||(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb"||!e.style||tp(t,n,r)&&(a.add(t),e.style.setProperty(kt,"nowrap"))}var Gi=/^[\w\u00C0-\u024F.,:;!?'"()%]*$/;function tp(t,e,n){let o=t.clientHeight-(parseFloat(e["padding-top"])||0)-(parseFloat(e["padding-bottom"])||0);if(o>3*(parseFloat(e["font-size"])||16)||e["word-break"]==="normal"&&e["overflow-wrap"]==="normal"&&Gi.test(t.textContent.trim()))return!1;let r=t.ownerDocument||document,i=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),s=r.createRange(),a=null,l=0,f=0,c=0;for(let m=i.nextNode();m;m=i.nextNode()){if(m.nodeType===1){if(m.shadowRoot||m.localName==="br"||m.localName==="textarea")return!1;continue}if(/\S/.test(m.data)){if(++f>64)return!1;s.selectNodeContents(m);for(let g of s.getClientRects())if(g.height){if(c++,a||=g,Math.min(a.bottom,g.bottom)-Math.max(a.top,g.top)[`border-${t}-style`,`border-${t}-color`]);function kl(t,e){let n;for(let[o,r]of ip)if(!(!rp.has(e[o])||e[r]!==e.color)){if(n===void 0&&(n=zi(t,!0)===!0||!Ei(t)),n)return;e[r]="currentcolor"}}var Ml=new Set(["col","colgroup","table","input","button","select","textarea","progress","meter"]),sp=/^(?:checkbox|radio|range|color|hidden|image)$/;function Al(t,e,n){let o=t.localName;if(o==="colgroup"||o==="col"){(o==="colgroup"||t.span>1)&&op(t,n);return}if(o==="table"){t.caption&&(n.height=n["block-size"]=void 0);return}if(sp.test(t.type))return;let r=Ai(t,e.colorScheme);for(let i in r)if(e.getPropertyValue(i)!==r[i])return;if(!zi(t,!1)){for(let i in n)Oe.test(i)&&(n[i]=void 0);return n.background=n.border=n["border-radius"]="revert",!0}}var ap=new Set(["div","section","article","main","aside","header","footer","nav"]);function El(t,e,n){if(!t.tagName)return;if(!ap.has(t.tagName.toLowerCase())){if(n.display!=="block")return;let m=t.lastElementChild;if(!m||W(m).marginBottom==="0px")return}if(zt(t)&&t.style&&t.style.height||e.aspectRatio&&e.aspectRatio!=="none"&&e.aspectRatio!=="auto")return;let o=e.display||"";if(o.includes("flex")||o.includes("grid"))return;let r=e.position;if(r==="absolute"||r==="fixed"||r==="sticky"||e.transform!=="none"||Qd(e)||qi(t))return;let i=e.overflowX||e.overflow||"visible",s=e.overflowY||e.overflow||"visible";if(i!=="visible"||s!=="visible")return;let a=e.clip;if(a&&a!=="auto"&&a!=="rect(auto, auto, auto, auto)"||e.visibility==="hidden"||e.opacity==="0"||!ep(t))return;let l=parseFloat(e.height),f=t.getBoundingClientRect(),c=t.offsetWidth?f.width/t.offsetWidth:1,u=np(t,f.top)/(Math.abs(c-1)<.01?1:c);if(!(Number.isFinite(l)&&Number.isFinite(u)&&Math.abs(l-u)>2)){if(t.localName==="details"&&st()){let m=W(t.lastElementChild).marginBottom;parseFloat(m)>(parseFloat(n["margin-bottom"])||0)&&(n["margin-bottom"]=m);return}n.height=void 0,n["block-size"]=void 0}}var oe=new WeakMap,yn=["margin-top","margin-right","margin-bottom","margin-left","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end"];function Zt(t){if(!(!t||t.nodeType!==1)){nl(),oe.delete(t);try{let e=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();)oe.delete(e.currentNode)}catch{}}}function Zo(t){let e=null;for(let n of t){let o=n.effect?.target;if(!o||n.effect.pseudoElement)continue;let r=(e||=new Map).get(o);r||e.set(o,r=new Set);let i=o.ownerDocument.createElement("div").style;for(let s of n.effect.getKeyframes())for(let a in s)a==="offset"||a==="easing"||a==="composite"||a==="computedOffset"||(a.startsWith("--")?r.add(a):i[a]=s[a]);for(let s=0;s!xe(n))}),e.list}function fp(t,e={},n=null,o=null){let r={},i=e.excludeStyleProps,s=g=>{if(i&&(i instanceof RegExp&&i.test(g)||typeof i=="function"&&i(g)))return;let y=t.getPropertyValue(g);y&&((g==="background-image"||g==="content")&&y.includes("url(")&&!y.includes("data:")&&(y="none"),r[g]=y)},a=g=>{r[g]!==void 0||xe(g)||s(g)};if(o){let g=cp(o);for(let p=0;pi==="transparent"||i==="rgba(0, 0, 0, 0)",o=t["-webkit-text-fill-color"];if(!n(o!==void 0?o:t.color))return;let r=hp(t["background-image"],t["background-color"]);r&&(n(t.color)&&(t.color=r),o!==void 0&&(t["-webkit-text-fill-color"]=r),t["background-image"]="none",t["background-color"]="transparent",delete t["background-clip"],delete t["-webkit-background-clip"],Object.defineProperty(t,"__bgClipTextFix",{value:r,enumerable:!1}))}function dp(t,e,n){let o=n.textShadow;if(!o||o==="none"||!(parseFloat(n.webkitTextStrokeWidth)>0)||t.firstElementChild||n.backgroundImage!=="none"||n.boxShadow!=="none"||Jo(n.backgroundColor)[3]!==0||["Top","Right","Bottom","Left"].some(f=>parseFloat(n[`border${f}Width`])>0)||o.replace(/\([^)]*\)/g,"").includes(","))return;let r=(o.match(/(?:rgba?|hsla?|color|oklch|oklab|lab|lch)\([^)]*\)|#[\da-f]+|\b[a-z]+\b/i)||[])[0],[i=0,s=0,a=0]=(o.match(/-?[\d.]+px/g)||[]).map(parseFloat);if(!r)return;let l=n.filter&&n.filter!=="none"?`${n.filter} `:"";e.style.setProperty("text-shadow","none","important"),e.style.setProperty("filter",`${l}drop-shadow(${i}px ${s}px ${a/2}px ${r})`,"important")}var pp=/(?:rgba?|hsla?|oklch|oklab|lab|lch|color)\([^()]*\)/g,Xe;function Jo(t){if(!Xe){let e=document.createElement("canvas");e.width=e.height=1,Xe=e.getContext("2d",{willReadFrequently:!0})}return Xe.clearRect(0,0,1,1),Xe.fillStyle="transparent",Xe.fillStyle=t,Xe.fillRect(0,0,1,1),Xe.getImageData(0,0,1,1).data}function hp(t,e){let n=i=>{let s=[];for(let a of(i||"").match(pp)||[]){let[l,f,c,u]=Jo(a);u>13&&s.push([l,f,c])}return s},o=n(t);if(o.length||(o=n(e)),!o.length)return null;let r=[0,0,0];for(let[i,s,a]of o)r[0]+=i,r[1]+=s,r[2]+=a;return`rgb(${r.map(i=>Math.round(i/o.length)).join(", ")})`}function _l(t){let e=t.getPropertyValue("background-image");if(e&&e!=="none")return!0;let n=t.getPropertyValue("background-color");if(n&&n!=="rgba(0, 0, 0, 0)"&&n!=="transparent")return!0;for(let r of lp){let i=t.getPropertyValue(r);if(i&&i!=="none")return!0}let o=t.getPropertyValue("background");return!!(o&&/url\s*\(/i.test(o))}function mp(t){for(let e=t.firstChild;e;e=e.nextSibling){if(e.nodeType===3&&/\S/.test(e.nodeValue||""))return!0;if(e.nodeType===1){let n=W(e).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function gp(t,e,n){try{if(typeof t.computedStyleMap=="function"){let r=t.computedStyleMap().get("width");if(r!=null)return!Fl(String(r).trim().toLowerCase())}}catch{}let o=t.style&&(t.style.width||t.style.inlineSize);return o&&!Fl(String(o).trim().toLowerCase())?!0:bp(t,e)?n||wp(t,e):!1}var yp=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function Fl(t){return yp.has(t)||t.startsWith("fit-content")}function bp(t,e){let n=t.getBoundingClientRect().width-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)-(parseFloat(e.borderLeftWidth)||0)-(parseFloat(e.borderRightWidth)||0);if(!(n>0))return!1;let o=1/0,r=-1/0,i=null;for(let s=t.firstChild;s;s=s.nextSibling){let a;if(s.nodeType===3){if(!/\S/.test(s.nodeValue||"")||(i=i||document.createRange(),i.selectNode(s),a=i.getBoundingClientRect(),!a.width&&!a.height))continue}else if(s.nodeType===1){let l=W(s);if(l.display==="none"||l.position==="absolute"||l.position==="fixed")continue;a=s.getBoundingClientRect()}else continue;a.leftr&&(r=a.right)}return r===-1/0?!1:r-o0?Math.abs(t.getBoundingClientRect().width-r)>.5:!1}var Tl=new WeakMap;function Qo(t,e){return t.v===oo(e,t.hosts)}function xp(t){let e=t.split(" ");return e.length===4?t:`${e[0]} ${e[1]??e[0]} ${e[2]??e[0]} ${e[3]??e[1]??e[0]}`}var Il=["top","right","bottom","left"],$l="0px 0px 0px 0px";function Pl(t,e){let n=t[e[0]],o=t[e[1]],r=t[e[2]],i=t[e[3]];return n===void 0||o===void 0||r===void 0||i===void 0?null:`${n} ${o} ${r} ${i}`}function Xi(t,e,n,o){return xp(t.getPropertyValue(n))===e||`${t.getPropertyValue(o[0])} ${t.getPropertyValue(o[1])} ${t.getPropertyValue(o[2])} ${t.getPropertyValue(o[3])}`===e}function Ol(t,e){let n=oe.get(t)?.used;return!n||n.box===!1||e.getPropertyValue("width")===n.w&&e.getPropertyValue("height")===n.h}function Wl(t,e){let n=oe.get(t)?.used?.margin;return!n||Xi(e,n,"margin",yn)}function Sp(t,e,n){let o=t.width,r=t.height,i={w:o,h:r,box:o===void 0||r===void 0||o==="auto"&&r==="auto"?!1:null,inset:null,margin:null,tracks:null},s=t.position,a=s==="absolute"||s==="fixed";if(a||s==="relative"||s==="sticky"){let f=Pl(t,Il);f&&(a||f!==$l)&&(i.inset=f)}let l=typeof e.computedStyleMap=="function";if(a||n||!l){let f=Pl(t,yn);f&&(f!==$l||!l)&&(i.margin=f)}if((t.display||"").includes("grid")){let f=t["grid-template-columns"],c=t["grid-template-rows"];f!==void 0&&c!==void 0&&(i.tracks=f+"/"+c)}return i}function vp(t,e,n){if(t.box!==!1){let o=e.getBoundingClientRect();if(t.box){if(o.width!==t.box[0]||o.height!==t.box[1])return!1}else{if(n.getPropertyValue("width")!==t.w||n.getPropertyValue("height")!==t.h)return!1;t.box=[o.width,o.height]}}return(!t.inset||Xi(n,t.inset,"inset",Il))&&(!t.margin||Xi(n,t.margin,"margin",yn))&&(!t.tracks||n.getPropertyValue("grid-template-columns")+"/"+n.getPropertyValue("grid-template-rows")===t.tracks)}function Cp(t,e=null,n={},o=null,r=null,i=!1){let s=oe.get(t),a=!!(n&&n.embedFonts),l=n&&n.excludeStyleProps||null,f=e||getComputedStyle(t);if(typeof l!="function"&&s&&Qo(s,t)&&s.embedFonts===a&&s.excludeStyleProps===l&&(s.checked===Ct||vp(s.used,t,f)))return s.checked=Ct,s.snapshot;let c,u=null,d=o&&o.st.snaps.get(o.id);if(d){let v=d.rr||Vi(d,t,o.st);c=Object.create(d.snap),u=[];for(let M=0;Mc[v])),y&&u.push(""+y),p&&u.push("\x07"+c.width,c.height),o.tail=u.join("")+(c.height===void 0?"":"")+(c["block-size"]===void 0?"":""),o.rec=d);let b=Go(t),w=s&&s.used;if(w&&(w.w!==m.w||w.h!==m.h||w.tracks!==m.tracks)){let v=(w.w!==m.w||w.h!==m.h)&&f.getPropertyValue("container-type"),[M,C]=/^(?:vertical|sideways)/.test(c["writing-mode"])?["h","w"]:["w","h"];if(v&&v!=="normal")no(t);else if(w[M]!==m[M]||w.tracks!==m.tracks||w[C]==="0px"){eo(t);for(let S=t.firstElementChild;S;S=S.nextElementSibling)if(eo(S),S.localName==="slot")for(let A of S.assignedElements({flatten:!0}))eo(A)}}let k=(r?.scanEnv??Nt)!==Nt?-1:oo(t,b);return oe.set(t,{v:k,checked:Ct,hosts:b,snapshot:c,embedFonts:a,excludeStyleProps:l,used:m}),c}function Ki(t,e){let n=e.flexOverflow||(e.flexOverflow=new WeakMap),o=n.get(t);if(o===void 0){if(o=t.scrollWidth>t.clientWidth,!o){let r=W(t),i=u=>parseFloat(r.getPropertyValue(u))||0,s=i("width")-(r.boxSizing==="border-box"?i("padding-left")+i("padding-right")+i("border-left-width")+i("border-right-width"):0),l=r.flexDirection.startsWith("row")===(r.writingMode==="horizontal-tb")&&r.flexWrap==="nowrap",f=0,c=0;for(let u of t.children){e.styleCache.has(u)||e.styleCache.set(u,getComputedStyle(u));let d=e.styleCache.get(u);if(d.display==="none"||d.position==="absolute"||d.position==="fixed")continue;let m=y=>parseFloat(d.getPropertyValue(y))||0,g=m("width")+m("margin-left")+m("margin-right")+(d.boxSizing==="border-box"?0:m("padding-left")+m("padding-right")+m("border-left-width")+m("border-right-width"));f=l?f+g:Math.max(f,g),c++}o=f+(l?Math.max(0,c-1)*i("column-gap"):0)>s+c/60}n.set(t,o)}return o}function kp(t,e){if(t&&t.session)return t;if(t&&(t.styleMap||t.styleCache||t.nodeMap)){let n=t.stylesCtx;return(!n||t.stylesCtxOpts!==e)&&(n={session:t,options:e||{}},t.stylesCtx=n,t.stylesCtxOpts=e),n}return{session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},options:t||e||{}}}var Mp=/%|[\d.](?:em|rem|ex|ch|cap|ic|lh|rlh|v[whib]|vmin|vmax|cq[whbi]|cqmin|cqmax)\b|\b(?:calc|var|min|max|clamp|env|attr)\(|\b(?:auto|inherit|initial|unset|revert|currentcolor|-webkit-fill-available|fit-content|min-content|max-content)\b/i,Nl=t=>t.tagName==="INPUT"||t.tagName==="TEXTAREA",Ap;function Ep(t,e,n,o,r){let i=t.style;if(!i||i.length===0)return;let s=ul(t),a=s!=null&&!Mp.test(o),l=a&&s.size===0&&!r&&!Nl(t);if(l&&!/border|\ball\s*:/i.test(o))return;let f;for(let c=0,u=i.length;cp.snapshot[h]===y)||n.borderWidth===y,f&&l)return}if(a&&!s.has(d)&&!r?.has(d)&&(!m||f)&&!(d.startsWith("background")&&Nl(t)))continue;let g=n.getPropertyValue(d);g&&(!m||g!==i.getPropertyValue(d))&&e.style.setProperty(d,g,i.getPropertyPriority(d))}}function Et(t,e,n,o){if(t.tagName==="STYLE")return;let r=kp(n,o),i=r.options&&r.options.cache||"soft";i!=="disabled"&&qe(t.ownerDocument),i==="disabled"&&!r.session.bumpedForDisabled&&(Ve(),r.session.bumpedForDisabled=!0);let{session:s}=r;if(!s.styleCache.has(t)){let v=null;try{v=getComputedStyle(t)}catch{}s.styleCache.set(t,v||getComputedStyle((t.ownerDocument||document).documentElement))}let a=s.styleCache.get(t);(Ap??=st())&&a.display?.includes("grid")&&a.getPropertyValue("grid-template-columns");let l=t.getAttribute?.("style");l&&Ep(t,e,a,l,s.animated?.get(t));let f=a.getPropertyValue("animation-name");e&&e.style&&f&&f!=="none"&&e.style.setProperty("animation","none","important");let c=t.tagName?.toLowerCase()||"div";if(jn.has(c)){let v={};Object.defineProperty(v,"__needsBgInline",{value:_l(a),enumerable:!1});let M=Go(t);oe.set(t,{v:oo(t,M),hosts:M,snapshot:v,embedFonts:!!(r.options&&r.options.embedFonts),excludeStyleProps:r.options&&r.options.excludeStyleProps||null}),s.styleMap.set(e,"");return}let u=null;if(s.styleShare&&s.styleMap){let v=yl(s),M=Hi(t,v),C=t.ownerDocument||document,S=C.activeElement;M!==-1&&!gl.has(t.tagName)&&!(S&&S!==C.body&&S!==C.documentElement&&S===t)&&!t.shadowRoot&&!t.assignedSlot&&(u={st:v,id:M})}let d=qi(t),m=Cp(t,a,r.options,u,s,d);if(l)for(let v=0;v<4;v++){let M=yn[v];m[M]==="auto"&&e.style.setProperty(M,"auto","important")}m.__bgClipTextFix&&e&&e.style&&(e.style.setProperty("background-image","none","important"),e.style.setProperty("background-color","transparent","important"),e.style.setProperty("color",m.__bgClipTextFix,"important"),e.style.setProperty("-webkit-text-fill-color",m.__bgClipTextFix,"important"),(s.bgClipText||=[]).push([t,e])),r.safari??=Z(),r.safari&&dp(t,e,a),e.style?.length&&m["box-sizing"]==="border-box"&&a.getPropertyValue("box-sizing")!=="border-box"&&vl(t,e,m),Cl(t,e,m,d,s);let g="";if(d){let v=a.getPropertyValue("min-width");if(!v||v==="auto"||v==="0px"){g="0px";let M=a.getPropertyValue("overflow-x"),C=t.parentElement;v==="auto"&&(M==="visible"||M==="clip")&&C&&W(C).display.includes("flex")&&Ki(C,s)&&(g=m.width),m["min-width"]===g&&(g="")}}let y=!0,p=g&&"|m"+g;if(Se(c,(m.display||"").toLowerCase())){y=mp(t),y&&Ti(c,m,d)&&gp(t,a,d)&&(y=!1),p+=(y?"|c":"")+(d?"|f":"");let v=m["text-wrap-mode"]||m["white-space"]||"";y&&v!=="nowrap"&&v!=="pre"&&(s.reconcileRisk=(s.reconcileRisk||0)+1)}let h=u&&u.tail!==void 0?u.rec.keys||=new Map:null,b=h&&u.tail+p,w=h?null:Tl.get(m),k=h?h.get(b):w&&w.flags===p?w.key:void 0;k===void 0&&(k=Ue(m,c,y,d,g,Ce(t,s)),h?h.set(b,k):Tl.set(m,{flags:p,key:k})),s.styleMap.set(e,k)}Ot();ce();He();Ot();var Rp=new Set(["symbol","defs"]),Fp=new Set(["mask","clipPath","linearGradient","radialGradient","pattern","marker","filter"]),Zi=new WeakMap,Dl=-1;function tr(t){let e=Ge();return e!==Dl&&(Zi=new WeakMap,Dl=e),Bl(t)}function Bl(t){let e=Zi.get(t);if(e!==void 0)return e;let n;if(t.namespaceURI==="http://www.w3.org/2000/svg"&&(Fp.has(t.localName)?n=!1:Rp.has(t.localName)&&(n=!0)),n===void 0){let o=t.parentNode;n=!!(o&&o.nodeType===1)&&Bl(o)}return Zi.set(t,n),n}function zl(t,e){if(t?.nodeType!==1||e?.nodeType!==1||tr(t))return;let n=t.getAttribute?.("style"),o=!!(n&&n.includes("var("));if(!o&&t.attributes?.length){let i=t.attributes;for(let s=0;si.d-s.d);let r=window.devicePixelRatio||1;return(o.find(i=>i.d>=r)||o[o.length-1]).url}function Ul(t,e){let n=t.currentSrc||"";if(n&&!bn(n))return n;let o=e.querySelectorAll("source[srcset]"),r=null;for(let i of o){let s=i.getAttribute("srcset");if(!s||bn(s))continue;let a=i.getAttribute("type");if(a&&!li.test(a.trim()))continue;let l=i.getAttribute("media");if(l)try{if(window.matchMedia(l).matches)return wn(s,t)}catch{}r||(r=wn(s,t))}return r}function Hl(t){let e=[t.getAttribute("data-src"),t.getAttribute("data-lazy-src"),t.getAttribute("data-original"),t.getAttribute("data-hi-res-src")];for(let o of e)if(o&&!bn(o))return o;let n=t.getAttribute("data-srcset")||t.getAttribute("data-lazy-srcset");if(n){let o=n.split(",")[0].trim().split(/\s+/)[0];if(o&&!bn(o))return o}return null}wt();ht();function Tp(t,e){if(t=t.trim(),!t)return t;let n=e?`[data-sd-slotted~="${e}"]`:"[data-sd-slotted]";return t.endsWith(":not([data-sd-slotted])")||t.endsWith(`:not(${n})`)?t:`${t}:not(${n})`}var $p=/::[a-zA-Z-]+(?:\([^)]*\))?$|:(?:before|after|first-letter|first-line)$/,Pp=/^::?(?:before|after|first-letter)$/;function Vl(t,e,n=!0,o){return We(t,",").map(r=>r.trim()).filter(Boolean).map(r=>{if(r.startsWith(":where(")&&r.includes("data-sd"))return r;let i=r.match($p);if(i&&i[0][1]!==":"&&r[i.index-1]==="\\"&&(i=null),i&&Pp.test(i[0]))return":not(*)";let s=i?r.slice(0,i.index).trim():r,a=n?Tp(s,o):s;return`:where(${e} ${a})${i?i[0]:""}`}).join(", ")}function Xl(t,e,n){return t?(t=t.replace(/:host-context\(([^)]+)\)/g,(o,r)=>`:where(:where(${r.trim()}) ${e})`),t=t.replace(/:host\(([^)]+)\)/g,(o,r)=>`:where(${e}:is(${r.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(o,r)=>`:where(${e} ${r.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(o,r,i,s)=>{let a=Vl(s,e,!0,n);return`${r}${i}${a}{`}),t=t.replace(/(^|})(\s*@(?:supports|container|layer|scope|media)\b[^{};]*{\s*)([^@}{;]+){/g,(o,r,i,s)=>`${r}${i}${Vl(s,e,!0,n)}{`),t):""}function Ye(t){let e="";for(let n of t)if(n.media&&n.cssRules){let o=!1;try{o=window.matchMedia(n.conditionText||n.media.mediaText).matches}catch{}o&&(e+=Ye(n.cssRules))}else if(n.constructor?.name==="CSSSupportsRule")e+=`@supports ${n.conditionText}{${Ye(n.cssRules)}}`;else if(n.cssRules&&n.cssRules.length&&/@media/i.test(n.cssText)){let o=n.cssText.slice(0,n.cssText.indexOf("{")+1);e+=o+(n.style?n.style.cssText:"")+Ye(n.cssRules)+"}"}else e+=n.cssText+` -`;return e}function Yl(t,e){let n="";try{t.querySelectorAll("style").forEach(r=>{let i=null;try{i=r.sheet&&r.sheet.cssRules}catch{}n+=(i?Ye(i):r.textContent||"")+` -`});let o=t.adoptedStyleSheets||[];for(let r of o)try{let i=e.get(r);i===void 0&&e.set(r,i=r.cssRules?Ye(r.cssRules):""),n+=i}catch{}}catch{}return n}function Kl(t,e,n){if(!e)return;let o=document.createElement("style");o.setAttribute("data-sd",n),o.textContent=e,t.insertBefore(o,t.firstChild||null)}function Zl(t,e,n={}){try{let o=null,r=W(t).content;if(r&&r.includes("url(")){let f=r.match(/url\(["']?([^"')]+)["']?\)/);f&&(o=f[1])}let i=t.closest?.("picture"),s=t.getAttribute("src")||"",a=t.getAttribute("srcset")||"",l=o||(i?Ul(t,i):!a.trim()&&s.startsWith("data:")?s:t.currentSrc)||wn(a,t)||t.src||"";if((!l||bn(l))&&n.resolvePicturePlaceholders!==!1){let f=Hl(t);f&&(l=f)}if(!l)return;e.getAttribute("src")!==l&&e.setAttribute("src",l),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function Jl(t){let e=new Set;if(!t)return e;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,o;for(;o=n.exec(t);)e.add(o[1]);return e}function Ql(t,e,n){let o=[];for(let r of e){let i="";try{i=getComputedStyle(t).getPropertyValue(r).trim()||getComputedStyle(document.documentElement).getPropertyValue(r).trim()}catch{}i&&o.push(`${r}: ${i};`)}return o.length?`${n}{${o.join("")}} -`:""}function tc(t,e){if(!t)return;let n=o=>{let r=o.getAttribute("data-sd-slotted")||"";e?` ${r} `.includes(` ${e} `)||o.setAttribute("data-sd-slotted",r?`${r} ${e}`:e):o.setAttribute("data-sd-slotted",r)};t.nodeType===Node.ELEMENT_NODE&&n(t),t.querySelectorAll?.("*").forEach(n)}var xn=t=>(t=parseFloat(t))>0?t:0;function jt(t){let e=t.offsetWidth>0?t.offsetWidth:0,n=t.offsetHeight>0?t.offsetHeight:0;if(!e||!n){let o=getComputedStyle(t);e||=xn(o.width)||xn(t.getAttribute("width"))||xn(t.naturalWidth),n||=xn(o.height)||xn(t.getAttribute("height"))||xn(t.naturalHeight)}return{width:e,height:n}}var jl=new WeakMap;function Np(t,e,n){let o=t.defaultView,r=o?o.scrollX:0,i=o?o.scrollY:0,s=t.body?t.body.scrollLeft:0,a=t.body?t.body.scrollTop:0,l=t.documentElement?t.documentElement.scrollLeft:0,f=t.documentElement?t.documentElement.scrollTop:0,c=0,u=0,d=0,m=0;try{let p=o&&t.body?o.getComputedStyle(t.body):null;p&&(c=(parseFloat(p.marginTop)||0)+(parseFloat(p.paddingTop)||0),u=(parseFloat(p.marginRight)||0)+(parseFloat(p.paddingRight)||0),d=(parseFloat(p.marginBottom)||0)+(parseFloat(p.paddingBottom)||0),m=(parseFloat(p.marginLeft)||0)+(parseFloat(p.paddingLeft)||0))}catch{}let g=`html {margin: 0 !important;padding: 0 !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${c}px ${u}px ${d}px ${m}px !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,y;try{let p=jl.get(t);p||jl.set(t,p=new o.CSSStyleSheet),p.replaceSync(g),t.adoptedStyleSheets=[...t.adoptedStyleSheets,p],y=()=>{t.adoptedStyleSheets=t.adoptedStyleSheets.filter(h=>h!==p)}}catch{let p=t.createElement("style");p.setAttribute("data-sd-iframe-pin",""),rt(p),p.textContent=g,(t.head||t.documentElement).appendChild(p),y=()=>p.remove()}if(Zt(t.documentElement),r||i)try{t.body&&(t.body.scrollLeft=r,t.body.scrollTop=i),t.documentElement&&(t.documentElement.scrollLeft||(t.documentElement.scrollLeft=r),t.documentElement.scrollTop||(t.documentElement.scrollTop=i))}catch{}return()=>{try{y()}catch{}try{o&&typeof o.scrollTo=="function"&&o.scrollTo(r,i),t.body&&(t.body.scrollLeft=s,t.body.scrollTop=a),t.documentElement&&(t.documentElement.scrollLeft=l,t.documentElement.scrollTop=f)}catch{}Zt(t.documentElement)}}function er(t){try{if(t.localName!=="embed")return t.contentDocument||t.contentWindow?.document||null}catch{return null}let e=t.ownerDocument.defaultView;for(let n=0;e&&nsetTimeout(p,0)),o=er(t);if(!o?.documentElement)throw new Error("The iframe document isn't ready.");let r=t.getBoundingClientRect(),i=getComputedStyle(t),s=y=>parseFloat(i[`border${y}Width`])||0,a=Math.max(0,Math.round(r.width-(s("Left")+s("Right")))),l=Math.max(0,Math.round(r.height-(s("Top")+s("Bottom")))),f=n?.snap;if(!f||typeof f.toPng!="function")throw new Error("Iframes are only captured through snapdom(el).");let c={...n,scale:1,clip:null,__pinned:!0,__styleShare:e.styleShare},u=Np(o,a,l),d;try{d=await f.toPng(o.documentElement,c)}finally{u()}d.style.display="block",d.style.width=`${a}px`,d.style.height=`${l}px`;let m=document.createElement("div");e.nodeMap.set(m,t),Et(t,m,e,n),m.style.overflow="hidden",W(t).display==="inline"&&(m.style.display="inline-block");let g=W(t);return m.style.width||(m.style.width=g.width),m.style.height||(m.style.height=g.height),m.appendChild(d),m}function Lp(t){return t&&!st()&&!Z()?{fill:"#99c8ff",mark:"Field"}:!nr("AccentColor")||!nr("AccentColorText")?{fill:"#0a6ed1",mark:"white"}:{fill:"AccentColor",mark:"AccentColorText"}}function _p(t){try{let e=s=>{let a=s/255;return a<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)},[n,o,r]=Jo(t);return 1.05/(.2126*e(n)+.7152*e(o)+.0722*e(r)+.05)<2.4?"black":"white"}catch{return"white"}}function ec(t){try{let e=t&&t.colorScheme||"";return(!e||e==="normal")&&(e=document.querySelector('meta[name="color-scheme"]')?.content||""),/\bdark\b/.test(e)?!/\blight\b/.test(e)||matchMedia("(prefers-color-scheme: dark)").matches:!1}catch{return!1}}function nc(t){return`;color-scheme:${ec(t)?"dark":"light"}`}function nr(t){try{return CSS.supports("color",t)}catch{return!1}}function oc(t){let e="",n="";try{e=t&&t.accentColor||"",n=t&&t.color||""}catch{}let o=e&&e!=="auto"&&e!=="none",{fill:r,mark:i}=o?{fill:e,mark:_p(e)}:Lp(ec(t)),s=st()&&nr("ButtonBorder")?"ButtonBorder":n||r;return{fill:r,mark:i,rim:s,text:n||r}}function rc(t){let{width:e,height:n}=jt(t),o=t.getBoundingClientRect(),r;try{r=window.getComputedStyle(t)}catch{}let i=r?parseFloat(r.width):NaN,s=r?parseFloat(r.height):NaN,a=Number.isFinite(i)&&i>0?i:e||o.width||128,l=Number.isFinite(s)&&s>0?s:n||o.height||16,f=Number.parseFloat(t.min)||0,c=Number.isFinite(Number.parseFloat(t.max))?Number.parseFloat(t.max):100,u=Number.parseFloat(t.value),d=c-f,m=d>0&&Number.isFinite(u)?Math.min(1,Math.max(0,(u-f)/d)):.5,g="middle";try{r&&r.verticalAlign&&(g=r.verticalAlign)}catch{}let y=document.createElement("div");y.setAttribute("data-snapdom-input-replacement","range"),y.style.cssText=`display:inline-block;width:${a}px;height:${l}px;vertical-align:${g};flex-shrink:0;line-height:0;`;let p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("width",String(a)),p.setAttribute("height",String(l)),p.setAttribute("viewBox",`0 0 ${a} ${l}`),p.style.cssText=`width:${a}px;height:${l}px;overflow:visible${nc(r)}`,y.appendChild(p);function h(){let b=oc(r).fill,w=!!t.disabled,k=Math.max(2,Math.min(4,l)),v=(l-k)/2,M=Math.max(10,Math.min(14,Math.max(l,10))),C=M/2,S=C+m*Math.max(0,a-M);p.innerHTML="";let A=(R,F,N,P)=>{let _=document.createElementNS("http://www.w3.org/2000/svg","rect");_.setAttribute("x",String(R)),_.setAttribute("y",String(v)),_.setAttribute("width",String(Math.max(0,F))),_.setAttribute("height",String(k)),_.setAttribute("rx",String(k/2)),_.setAttribute("fill",N),P&&_.setAttribute("fill-opacity",P),p.appendChild(_)};A(0,a,"#808080","0.4"),A(0,S,b);let x=document.createElementNS("http://www.w3.org/2000/svg","circle");x.setAttribute("cx",String(S)),x.setAttribute("cy",String(l/2));let E=st();x.setAttribute("r",String(E?C-1:C)),x.setAttribute("fill",E?"#676774":b),E&&(x.setAttribute("stroke","white"),x.setAttribute("stroke-width","2")),p.appendChild(x),w&&p.setAttribute("opacity","0.5"),y.style.setProperty("width",`${a}px`,"important"),y.style.setProperty("height",`${l}px`,"important"),y.style.setProperty("min-width",`${a}px`,"important"),y.style.setProperty("min-height",`${l}px`,"important")}return h(),{el:y,applyVisual:h}}function ic(t){let{width:e,height:n}=jt(t),o=t.getBoundingClientRect(),r;try{r=window.getComputedStyle(t)}catch{}let i=r?parseFloat(r.width):NaN,s=r?parseFloat(r.height):NaN,a=Math.round(e||o.width||0),l=Math.round(n||o.height||0),f=Number.isFinite(i)&&i>0?Math.round(i):Math.max(12,a||16),c=Number.isFinite(s)&&s>0?Math.round(s):Math.max(12,l||16),u=(t.type||"text").toLowerCase()==="checkbox",d=u&&!!t.indeterminate,m=!!t.checked&&!d,y=Math.max(Math.min(f,c),12),p=Math.max(f,y),h=Math.max(c,y),b="middle";try{r&&r.verticalAlign&&(b=r.verticalAlign)}catch{}let w=document.createElement("div");w.setAttribute("data-snapdom-input-replacement",t.type||"checkbox"),w.style.cssText=`display:inline-block;width:${p}px;height:${h}px;vertical-align:${b};flex-shrink:0;line-height:0;`;let k=document.createElementNS("http://www.w3.org/2000/svg","svg");k.setAttribute("width",String(p)),k.setAttribute("height",String(h)),k.setAttribute("viewBox",`0 0 ${y} ${y}`),k.style.cssText=`width:${p}px;height:${h}px${nc(r)}`,w.appendChild(k);function v(){let M=oc(r),C=t.matches(":disabled"),S=C?M.text:M.fill,A=C?"white":M.mark,x=(N,P)=>{let _=document.createElementNS("http://www.w3.org/2000/svg",N);for(let I in P)_.setAttribute(I,String(P[I]));k.appendChild(_)},E=m||d,R=E?0:.5,F=E?{fill:S}:{fill:nr("Field")?"Field":"none",stroke:M.rim,"stroke-width":1};if(k.innerHTML="",u){if(x("rect",{x:R,y:R,width:y-R*2,height:y-R*2,rx:2,ry:2,...F}),m)x("path",{d:`M ${y*.2} ${y*.53} L ${y*.4} ${y*.72} L ${y*.78} ${y*.3}`,stroke:A,"stroke-width":Math.max(1.5,y*.12),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"});else if(d){let N=y*(st()?.82:.6),P=st()?Math.max(1,y/16):Math.max(2,y/8);x("rect",{x:(y-N)/2,y:(y-P)/2,width:N,height:P,fill:A})}}else x("circle",{cx:y/2,cy:y/2,r:y/2-R,...F}),m&&x("circle",{cx:y/2,cy:y/2,r:y/2-2,fill:"none",stroke:A,"stroke-width":2});C&&k.setAttribute("opacity","0.5"),w.style.setProperty("width",`${p}px`,"important"),w.style.setProperty("height",`${h}px`,"important"),w.style.setProperty("min-width",`${p}px`,"important"),w.style.setProperty("min-height",`${h}px`,"important")}return v(),{el:w,applyVisual:v}}var io=new Tt(80);async function Ip(t){if(G.resource?.has(t))return G.resource.get(t);if(io.has(t))return io.get(t);let e=(async()=>{let n=await bt(t,{as:"dataURL"});if(!n.ok||typeof n.data!="string")throw new Error(`Couldn't read ${t}`);return G.resource?.set(t,n.data),n.data})();io.set(t,e);try{let n=await e;return io.set(t,n),n}catch(n){throw io.delete(t),n}}var Gl=/\bblob:[^)"'\s]+/g;function Ji(t){return typeof t=="string"&&t.startsWith("blob:")}function Op(t){return(t||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function Wp(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function so(t,e){let n=t.querySelectorAll?Array.from(t.querySelectorAll(e)):[];return t.matches?.(e)&&n.unshift(t),n}async function or(t,e=null){if(!t)return;let n=new Set,o=[],r=new Map,i=(c,u,d,m)=>{n.add(d),o.push(()=>{r.has(d)&&(c.setAttribute(u,r.get(d)),m?.())})},s=(c,u)=>{if(!c||!c.includes("blob:"))return;let d=c.match(Gl)||[];if(d.length){for(let m of d)n.add(m);o.push(()=>{let m=c.replace(Gl,g=>r.get(g)||g);m!==c&&u(m)})}};for(let c of so(t,"img")){let u=c.getAttribute("src")||c.currentSrc||"";Ji(u)&&i(c,"src",u);let d=c.getAttribute("srcset");if(d&&d.includes("blob:")){let m=Op(d);for(let g of m)Ji(g.url)&&n.add(g.url);o.push(()=>{let g=!1;for(let y of m)r.has(y.url)&&(y.url=r.get(y.url),g=!0);g&&c.setAttribute("srcset",Wp(m))})}}let a="http://www.w3.org/1999/xlink";for(let c of so(t,"image")){let u=c.getAttribute("href")||c.getAttributeNS?.(a,"href");Ji(u)&&i(c,"href",u,()=>c.removeAttributeNS?.(a,"href"))}for(let c of so(t,"[style*='blob:']"))s(c.getAttribute("style"),u=>c.setAttribute("style",u));for(let c of so(t,"style"))s(c.textContent||"",u=>{c.textContent=u});for(let c of so(t,"[poster^='blob:']"))i(c,"poster",c.getAttribute("poster"));if(!n.size)return;let l=[...n],f=0;await Promise.all(Array.from({length:Math.min(4,l.length)},async()=>{for(;f1.005&&Number.isFinite(y)){if(c){let p=[];for(let h of[!1,!0]){let b=parseFloat(s.fontSize),w=b*(y+1);for(let k=0;k<10;k++){let v=(b+w)/2;a.style.fontSize=`${v}px`;let M=m.getBoundingClientRect().height;(h?M>l:M>=l)?w=v:b=v}p.push((b+w)/2)}y=(p[0]+p[1])/2/parseFloat(s.fontSize)}i.style.setProperty("font-size",`${parseFloat(s.fontSize)*y}px`),s.lineHeight!=="normal"&&i.style.setProperty("line-height",`${parseFloat(s.lineHeight)*y}px`)}}}finally{o.remove()}}}function ql(t,e){let n=t.ownerDocument.createRange();n.setStart(t,e),n.setEnd(t,e+1);let o=n.getBoundingClientRect();return o.left+o.width/2}function Up(t,e=!1){for(let n=t.firstChild;n;n=n.nextSibling){if(n.nodeType!==3)continue;let o=/\S+/.exec(n.data);if(!o)continue;let r=t.ownerDocument.createRange();r.setStart(n,o.index),r.setEnd(n,o.index+o[0].length);let i=r.getClientRects();return i.length===1?{word:o[0],distance:e?i[0].height:i[0].width,centers:!1,height:e}:null}return null}function Hp(t,e,n){let o=zp.exec(t.value.split(` -`)[0]);if(!o||t.scrollLeft||t.scrollTop||!n.caretPositionFromPoint)return null;let r=t.getBoundingClientRect(),i=t.localName==="textarea"?r.top+(parseFloat(e.borderTopWidth)||0)+(parseFloat(e.paddingTop)||0)+3:r.top+r.height/2,s=c=>{let u=n.caretPositionFromPoint(c,i);return u&&u.offsetNode===t?u.offset:-1},a=r.width/16,l=c=>{let u=r.left;for(;u<=r.right&&s(u)r.right)return NaN;let d=u-a;for(let m=0;m<16;m++){let g=(d+u)/2;s(g)>=c?u=g:d=g}return u},f=Math.abs(l(o.index+o[0].length)-l(o.index+1));return Number.isFinite(f)?{word:o[0],distance:f,centers:!0}:null}ht();var ac=new Set(["rgba(0, 0, 0, 0)","transparent"]),ts="Highlight";function lc(t){let n=(t.ownerDocument||document).getSelection?.();if(!n||n.isCollapsed||n.rangeCount===0)return null;let o=[];for(let r=0;ru&&r.push([u,d])}if(r.length===0)return null;let i=Vp(o,e);if(!i)return null;r.sort((f,c)=>f[0]-c[0]);let s=t.ownerDocument||document,a=s.createDocumentFragment(),l=0;for(let[f,c]of r){f>l&&a.append(s.createTextNode(n.slice(l,f)));let u=s.createElement("span");u.setAttribute("data-snapdom-selection",""),u.setAttribute("style",`all:unset;${i}`),u.textContent=n.slice(f,c),a.append(u),l=c}return lNumber.parseFloat(t)||0,jp=["font-family","font-size","font-weight","font-style","font-variant","font-stretch","letter-spacing","word-spacing","text-transform","text-indent","text-align","line-height","tab-size","direction"];function Gp(t,e){try{let o=getComputedStyle(t,"::selection").backgroundColor;if(o&&!ac.has(o)&&o!==e.backgroundColor)return o}catch{}return ts}function fc(t,e){let n=t.ownerDocument||document;if(n.activeElement!==t)return;let o=null,r=null;try{o=t.selectionStart,r=t.selectionEnd}catch{return}if(o==null||r==null||o===r)return;let i=t.value||"";if(t.localName==="input"&&t.type==="password"&&(i="\u2022".repeat(i.length)),!i)return;let s=getComputedStyle(t),a=t.localName==="textarea",l=rr(s.paddingLeft),f=rr(s.paddingTop),c=t.clientWidth-l-rr(s.paddingRight),u=t.clientHeight-f-rr(s.paddingBottom),d=n.createElement("div");d.style.cssText="position:absolute;top:0;left:-99999px;visibility:hidden;margin:0;border:0;padding:0;box-sizing:content-box;";for(let p of jp)d.style.setProperty(p,s.getPropertyValue(p));a?(d.style.whiteSpace="pre-wrap",d.style.overflowWrap="break-word",d.style.width=`${Math.max(0,c)}px`):d.style.whiteSpace="pre";let m=n.createElement("span");m.textContent=i.slice(o,r),d.append(n.createTextNode(i.slice(0,o)),m,n.createTextNode(i.slice(r))),n.body.appendChild(d);let g=[];try{let p=d.getBoundingClientRect(),h=-t.scrollLeft,b=-t.scrollTop;if(!a){b+=Math.max(0,(u-p.height)/2);let w=s.direction==="rtl",k=s.textAlign;k==="start"?k=w?"right":"left":k==="end"&&(k=w?"left":"right");let v=c-p.width;v>0&&(k==="right"?h+=v:k==="center"&&(h+=v/2))}for(let w of m.getClientRects())w.width<=0||w.height<=0||g.push({x:l+(w.left-p.left)+h,y:f+(w.top-p.top)+b,width:w.width,height:w.height})}finally{d.remove()}if(g.length===0)return;let y=Gp(t,s);e.__snapdomFieldSelection={images:g.map(()=>`linear-gradient(${y},${y})`),positions:g.map(p=>`${p.x}px ${p.y}px`),sizes:g.map(p=>`${p.width}px ${p.height}px`),repeats:g.map(()=>"no-repeat"),origins:g.map(()=>"padding-box"),clips:g.map(()=>"padding-box"),base:{image:s.backgroundImage,position:s.backgroundPosition,size:s.backgroundSize,repeat:s.backgroundRepeat,origin:s.backgroundOrigin,clip:s.backgroundClip}}}function uc(t){for(let e of t.keys()){let n=e.__snapdomFieldSelection;if(!n)continue;delete e.__snapdomFieldSelection;let{images:o,positions:r,sizes:i,repeats:s,origins:a,clips:l,base:f}=n,c=e.style.backgroundImage||f.image;c&&c!=="none"?(o.push(c),r.push(e.style.backgroundPosition||f.position),i.push(e.style.backgroundSize||f.size),s.push(e.style.backgroundRepeat||f.repeat),a.push(e.style.backgroundOrigin||f.origin),l.push(e.style.backgroundClip||f.clip)):(o.push("linear-gradient(transparent,transparent)"),r.push("0% 0%"),i.push("auto"),s.push("repeat"),a.push(f.origin||"padding-box"),l.push(f.clip||"border-box")),e.style.backgroundImage=o.join(","),e.style.backgroundPosition=r.join(","),e.style.backgroundSize=i.join(","),e.style.backgroundRepeat=s.join(","),e.style.backgroundOrigin=a.join(","),e.style.backgroundClip=l.join(",")}}wt();At();var qp=["transform","translate","rotate","scale","transform-origin","transform-box"],Xp={circle:["cx","cy","r","vector-effect"],ellipse:["cx","cy","rx","ry","vector-effect"],rect:["x","y","width","height","rx","ry","vector-effect"],path:["d","vector-effect"],line:["vector-effect"],polyline:["vector-effect"],polygon:["vector-effect"],use:["x","y","width","height","vector-effect"],g:[],clipPath:[]},Yp={r:"0px",cx:"0px",cy:"0px",x:"0px",y:"0px",rx:"auto",ry:"auto",width:"auto",height:"auto",d:"none","vector-effect":"none",transform:"none",translate:"none",rotate:"none",scale:"none","transform-origin":"0px 0px","transform-box":"view-box"},dc=new Set(["transform","translate","rotate","scale"]),pc=new WeakMap,Kp=new Map;function Zp(t){let e=t.localName,n=Xp[e];if(!n)return null;let o=dl(t);if(o&&(o.size===0||!pl(t)))return null;let r=o?pc.get(o):Kp;r||pc.set(o,r=new Map);let i=r.get(e);return i||(i=[...n,...qp].filter(s=>!o||o.has(s)),r.set(e,i)),i.length?i:null}var hc=/^-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?(?:px)?$/i;function Jp(t,e){let n=t.trim();if(!hc.test(n)||!hc.test(e))return!1;let o=parseFloat(n),r=parseFloat(e);return Math.abs(o-r)<=1e-4*Math.max(1,Math.abs(o))}function Qp(t){let e=t.transform?.baseVal;if(!e?.numberOfItems)return null;let n=new DOMMatrix;for(let o=0;o1e-4*Math.max(1,Math.abs(r[i])))return!1;return!0}function eh(t,e,n,o){let r=!1;for(let i of o){if(!r&&(i==="transform-origin"||i==="transform-box")&&!t.hasAttribute("transform"))continue;let s=n.getPropertyValue(i);if(!s)continue;dc.has(i)&&s!=="none"&&(r=!0);let a=dc.has(i)&&i!=="transform"?null:t.getAttribute(i);if(a!=null){if(s===a||s===a+"px"||i==="d"||i==="transform"&&(s==="none"||th(t,s))||Jp(a,s))continue}else if(s===Yp[i])continue;e.style.setProperty(i,s)}}function ir(t){let e=W(t),n=e.display;if(n==="none"||e.position==="absolute"||e.position==="fixed")return null;let o=/^(block|inline-block|flow-root|flex|inline-flex|grid|inline-grid|list-item)$/.test(n),r=g=>parseFloat(g)||0,i=(g,y,p,h,b)=>{if(!o||!g?.endsWith("px"))return null;let w=parseFloat(g);if(!Number.isFinite(w)||w<0)return null;if(e.boxSizing==="border-box")return w;let k=h-b-p;return w+y+p+(k>0&&w+ysr)return!1;let s=o.inkReach||=new WeakMap,a=s.get(t);return a===void 0&&s.set(t,a=rh(t,e||W(t),o)),i<=a}function ih(t,e){if(t===e.root)return!1;let n=t.getBoundingClientRect();if(n.width===0&&n.height===0)return!1;let o=W(t);if(o.display==="inline"&&!oh.has((t.localName||"").toLowerCase()))return!1;let r=t.scrollWidth||0,i=t.scrollHeight||0,s={left:o.direction==="rtl"?Math.min(n.left,n.right-r):n.left,top:n.top,right:Math.max(n.right,n.left+r),bottom:Math.max(n.bottom,n.top+i)},a=o.writingMode||"";if((a.startsWith("vertical")||a.startsWith("sideways"))&&(s.top=Math.min(n.top,n.bottom-i),s.left=Math.min(s.left,n.right-r)),gc(t,o,s,e))return!1;let l=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;l.nextNode();){let f=l.currentNode,c=f.getBoundingClientRect();if((c.width>0||c.height>0)&&gc(f,null,c,e))return!1}return!0}function sh(t,e){let n=t.cloneNode(!1);return t.tagName==="IMG"&&(n.removeAttribute("src"),n.removeAttribute("srcset"),n.removeAttribute("sizes")),e.husks||(e.husks=new Map),e.husks.set(n,t),n}var ah=/^(block|flow-root|list-item|inline-block)$/,lh=/^(block|flow-root|flex|grid|table)$/;function ch(t){if(!t)return!1;let e=W(t);return ah.test(e.display)&&e.writingMode==="horizontal-tb"&&e.columnCount==="auto"&&e.columnWidth==="auto"}function yc(t){if(t.localName==="summary"||t.localName==="legend")return!1;let e=W(t);return lh.test(e.display)&&e.float==="none"&&e.clear==="none"&&(e.position==="static"||e.position==="relative")&&e.counterReset==="none"&&e.counterIncrement==="none"&&(e.counterSet||"none")==="none"}function es(t,e){let n=W(t);return n.display!=="contents"&&(n.position==="static"||n.position==="relative"&&n.top==="0px")&&(n.transform==="none"||n.transform==="matrix(1, 0, 0, 1, 0, 0)")&&(n.translate||"none")==="none"&&(n.rotate||"none")==="none"&&(n.scale||"none")==="none"&&Math.abs(e.width-t.offsetWidth)<1&&Math.abs(e.height-t.offsetHeight)<1}function fh(t,e){for(let n=t.nextElementSibling;n;n=n.nextElementSibling){if(n===e)return!0;if(W(n).display!=="none")return!1}return!1}function ar(t,e,n){let o=n<0?t.previousSibling:t.nextSibling;for(;o;o=n<0?o.previousSibling:o.nextSibling){if(o.nodeType===3&&!/^[ \t\n\r\f]*$/.test(o.data))return null;if(o.nodeType!==1)continue;let s=W(o);if(!(s.display==="none"||s.position==="absolute"||s.position==="fixed"||s.float!=="none")){if(s.display.startsWith("inline"))return null;break}}if(!o)return null;let r=o.getBoundingClientRect();if(!es(o,r))return null;let i=n<0?e.top-r.bottom:r.top-e.bottom;return i>=0?i:null}function uh(t,e,n,o){let r=[...t.childNodes];for(let i=0;i0&&(t.style.width=`${i}px`,t.style.minWidth=`${i}px`,t.style.maxWidth=`${i}px`),s>0&&(t.style.height=`${s}px`,t.style.minHeight=`${s}px`,t.style.maxHeight=`${s}px`),t.style.visibility="hidden";let a=e.parentElement?W(e.parentElement).display:"";if(!/flex|grid|table/.test(a)&&!r.display.startsWith("inline")&&r.float==="none"&&(r.position==="static"||r.position==="relative")){let l=e.getBoundingClientRect(),f=ar(e,l,-1);f!==null&&(t.style.marginTop=`${f}px`);let c=ar(e,l,1);c!==null&&(t.style.marginBottom=`${c}px`)}t.style.boxSizing="border-box"}async function Me(t,e,n){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");for(;e.slicer?.due();)await e.slicer.pause();let o=null,r=null;if(t.nodeType===Node.ELEMENT_NODE){let p=(t.localName||t.tagName||"").toLowerCase(),h=Vt(t);if(h&&(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox"))||t!==n.element&&h||Ci.has(p))return null;if(p==="foreignobject"&&t.parentElement?.closest?.("foreignObject"))return U(e,"Skipped a nested ; it can't be captured."),null;if(p==="source"&&t.parentElement?.localName==="picture")return null}if(t.nodeType===Node.TEXT_NODE){if(e.selection){let p=cc(t,e.selection);if(p)return p}return t.cloneNode(!0)}if(t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return ir(t);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let p of n.exclude)try{if(t.matches?.(p)){if(n.excludeMode==="hide")return ir(t);if(n.excludeMode==="remove")return null}}catch{U(n,`Invalid exclude selector "${p}"; ignored.`)}if(n.excludePredicates)for(let p of n.excludePredicates)try{if(p(t))return n.excludeMode==="remove"?null:ir(t)}catch(h){U(n,"Your exclude function threw; the element was kept.",h)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide")return ir(t);if(n.filterMode==="remove")return null}}catch(p){U(n,"Your filter function threw; the element was kept.",p)}if(t!==n.element&&!nh.has(t.localName)&&!Ut(t)&&W(t).display==="none"){let p=t.cloneNode(!1);t.tagName==="IMG"&&(p.removeAttribute("src"),p.removeAttribute("srcset")),p.style.setProperty("display","none","important");for(let h of t.querySelectorAll("style")){let b=await Me(h,e,n);b&&p.appendChild(b)}return p}if(e.clip&&ih(t,e.clip))return sh(t,e.clip);if(e.resolveNodeHooks)for(let p of e.resolveNodeHooks){let h;try{h=await p(t,n)}catch(b){U(e,"A plugin's resolveNode hook threw; ignored it.",b)}if(h===null)return null;if(h?.nodeType)return h.nodeType===Node.ELEMENT_NODE&&(e.nodeMap.set(h,t),Et(t,h,e,n)),h}let i=Sh.get(t.tagName);if(i&&(t.tagName==="IFRAME"||t.getAttribute("data-capture")!=="placeholder")){let p=await i(t,e,n);if(p!==void 0)return p}if(t.getAttribute("data-capture")==="placeholder"){let p=t.cloneNode(!1);e.nodeMap.set(p,t),Et(t,p,e,n);let h=document.createElement("div");return h.textContent=t.getAttribute("data-placeholder-text")||"",h.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",p.appendChild(h),p}let s;try{if(s=t.cloneNode(!1),zl(t,s),e.nodeMap.set(s,t),t.tagName==="IMG"){Zl(t,s,n);try{let p=window.getComputedStyle(t),h=parseFloat(p.width),b=parseFloat(p.height);if(!(h>0)||!(b>0)){let v=jt(t),M=S=>parseFloat(p.getPropertyValue(S))||0,C=p.getPropertyValue("box-sizing")==="border-box";h>0||(h=v.width-(C?0:M("padding-left")+M("padding-right")+M("border-left-width")+M("border-right-width"))),b>0||(b=v.height-(C?0:M("padding-top")+M("padding-bottom")+M("border-top-width")+M("border-bottom-width")))}let w=Math.round((h||0)*1e3)/1e3,k=Math.round((b||0)*1e3)/1e3;w&&(s.dataset.snapdomWidth=String(w)),k&&(s.dataset.snapdomHeight=String(k))}catch(p){U(e,"Couldn't measure an image; kept its own size.",p)}try{let p=t.getAttribute("style")||"",h=window.getComputedStyle(t),b=A=>{let x=p.match(new RegExp(`${A}\\s*:\\s*([^;]+)`,"i")),E=x?x[1].trim():h.getPropertyValue(A);return/%|auto/i.test(String(E||""))},w=parseFloat(s.dataset.snapdomWidth||"0")||0,k=parseFloat(s.dataset.snapdomHeight||"0")||0,v=b("width")||!(w>0),M=b("height")||!(k>0);v&&w>0&&(s.style.width=`${w}px`),M&&k>0&&(s.style.height=`${k}px`);let C=h.getPropertyValue("object-fit"),S=h.getPropertyValue("object-position");C&&C!=="fill"?(s.style.objectFit=C,S&&(s.style.objectPosition=S)):(w>0&&(s.style.minWidth=`${w}px`),k>0&&(s.style.minHeight=`${k}px`))}catch(p){U(e,"Couldn't fix the size of an image.",p)}}}catch(p){throw U(n,"Couldn't copy this element:",[t,p]),p}let a=null,l=t.localName,f=l==="input",c=l==="textarea",u=f||c||l==="select";if(c){let{width:p,height:h}=jt(t),b=p||t.getBoundingClientRect().width||0,w=h||t.getBoundingClientRect().height||0;b&&(s.style.width=`${b}px`),w&&(s.style.height=`${w}px`),(b||w)&&(s.style.boxSizing="border-box")}if(f){let p=(t.type||"text").toLowerCase();if((p==="checkbox"||p==="radio")&&(st()||t.indeterminate)){let{el:b,applyVisual:w}=ic(t);e.nodeMap.set(b,t),a=w,s=b}else if(p==="range"&&(st()||Z())){let{el:b,applyVisual:w}=rc(t);e.nodeMap.set(b,t),a=w,s=b}else if(p==="color"&&Z()){let b=s,w=t.value||"#000000";a=()=>{b.style.setProperty("background-color",w,"important"),b.style.setProperty("color","transparent","important"),b.style.setProperty("-webkit-text-fill-color","transparent","important"),b.style.setProperty("appearance","none","important"),b.style.setProperty("-webkit-appearance","none","important")},b.removeAttribute("value")}else if((p==="date"||p==="time"||p==="datetime-local")&&(st()||Z())){s.setAttribute("type","text");let b=t.value;p==="date"&&t.valueAsDate&&(b=t.valueAsDate.toLocaleDateString(void 0,{timeZone:"UTC"})),s.value=b,s.setAttribute("value",b)}else{let b=Hn(t)?ui(t.value):t.value;(b||t.hasAttribute("value"))&&(s.value=b,s.setAttribute("value",b)),t.checked!==void 0&&(s.checked=t.checked,t.checked?s.setAttribute("checked",""):s.removeAttribute("checked"),t.indeterminate&&(s.indeterminate=t.indeterminate))}}if((f||c)&&!t.value&&t.placeholder)try{let p=window.getComputedStyle(t,"::placeholder"),h=p&&p.color;h&&h!=="rgba(0, 0, 0, 0)"&&(e.usesPlaceholder=!0,s.setAttribute("data-sd-ph",""),s.style.setProperty("--sd-ph",h),s.style.setProperty("--sd-ph-o",p.opacity||"1"))}catch{}if(l==="select"&&(o=new Set(Array.from(t.options).filter(p=>p.selected))),c&&(r=t.value),u){t.disabled&&s.setAttribute("disabled",""),t.required&&s.setAttribute("required",""),t.readOnly&&s.setAttribute("readonly","");let p=t;p.min!==void 0&&p.min!==""&&s.setAttribute("min",p.min),p.max!==void 0&&p.max!==""&&s.setAttribute("max",p.max),p.pattern!==void 0&&p.pattern!==""&&s.setAttribute("pattern",p.pattern);let h=t.getAttribute("aria-invalid");h!==null&&s.setAttribute("aria-invalid",h)}if(tr(t)||Et(t,s,e,n),a&&a(),n.captureSelection&&(f||c))try{fc(t,s)}catch(p){U(e,"Couldn't copy the selection of a text field.",p)}if(Ut(t)&&!tr(t)){let p=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display","color"];try{let h=window.getComputedStyle(t);for(let w of p){let k=h.getPropertyValue(w);k&&s.style.setProperty(w,k)}t.localName==="stop"&&(s.style.setProperty("stop-color",h.getPropertyValue("stop-color")),s.style.setProperty("stop-opacity",h.getPropertyValue("stop-opacity")));let b=Zp(t);b&&eh(t,s,h,b)}catch{}}let d=t.shadowRoot,m=null;if(d){m=new Set,Bi(d);for(let E of d.querySelectorAll("slot"))for(let R of E.assignedNodes?.()||[])m.add(R);let p=e.shadowScopes||=new WeakMap,h=0;for(let E=t;E=E.assignedSlot||E.parentNode||(E.nodeType===11?E.host:null);)E.shadowRoot&&p.has(E.shadowRoot)&&h++;let b=`s${e.shadowScopeSeq=(e.shadowScopeSeq||0)+1}`,w=Yl(d,e.shadowSheets||=new WeakMap),k=(e.shadowGroups||=[])[h]||=new Map,v=w&&k.get(w),M="";v||(v={id:b,vars:Jl(w),share:!$a.test(w),unstable:Ui.test(w)},w&&k.set(w,v),!e.shadowPseudo&&/::?(?:before|after|first-l|marker)|counter/.test(w)&&(e.shadowPseudo=!0),M=Xl(w,`[data-sd~="${b}"]`,b));let C=v.id===b?b:`${b} ${v.id}`;p.set(d,v.id),v.share&&(e.shadowShare||=new WeakMap).set(d,v.unstable),s.setAttribute("data-sd",C);let S=Ql(t,v.vars,`[data-sd="${C}"]`);Kl(s,S+M,h);let A=[],x=!1;for(let E of Array.from(d.childNodes))if(!(E.nodeType===Node.ELEMENT_NODE&&E.tagName==="STYLE")){if(E.nodeType!==Node.ELEMENT_NODE&&(E.nodeType!==Node.TEXT_NODE||!e.selection)){A.push(E.cloneNode(!0));continue}A.push(Me(E,e,n).catch(()=>null)),x=!0}for(let E of x?await Promise.all(A):A)E&&s.appendChild(E)}if(t.tagName==="SLOT"){let p=e.shadowScopes?.get(t.getRootNode()),h=t.assignedNodes?.()||[],b=h.length?t.assignedNodes?.({flatten:!0})||h:[],w=b.length?b:Array.from(t.childNodes),k=document.createDocumentFragment(),v=await Promise.all(w.map(M=>Me(M,e,n).then(C=>(C&&h.length&&tc(C,p),C||null)).catch(()=>null)));return k.append(...v.filter(M=>!!M)),k}let g=[],y=!1;for(let p of Array.from(t.childNodes))if(!(d&&(m.has(p)||!p.assignedSlot))){if(p.nodeType!==Node.ELEMENT_NODE&&(p.nodeType!==Node.TEXT_NODE||!e.selection)){g.push(p.cloneNode(!0));continue}g.push(Me(p,e,n).catch(()=>null)),y=!0}for(let p of y?await Promise.all(g):g)p&&s.appendChild(p);if(o&&ye(s,"select")){let p=!1;for(let h of s.options){let b=o.has(e.nodeMap.get(h));h.selected=b,b?h.setAttribute("selected",""):h.removeAttribute("selected"),p||=b}if(!p&&!s.multiple){let h=s.ownerDocument.createElement("option");h.hidden=!0,h.style.setProperty("display","none","important"),h.setAttribute("selected",""),h.value="",s.appendChild(h)}}return r!==null&&ye(s,"textarea")&&(s.textContent=r),s}async function hh(t,e,n){let o=!1;try{o=!!(t.contentDocument||t.contentWindow?.document)}catch(a){U(e,"Couldn't tell if an iframe is same-origin; treated it as cross-origin.",a)}if(o)try{return await Qi(t,e,n)}catch(a){at(e,"iframe-failed","same-origin iframe failed to rasterize",a),U(n,"Couldn't capture an iframe, so it was left out.",a)}o||(at(e,"iframe-cross-origin",`cross-origin iframe replaced by ${n.placeholders?"a placeholder":"a spacer"}`,t),U(n,n.placeholders?"Can't capture a cross-origin iframe; showing a placeholder. Set placeholders: false to hide it.":"Can't capture a cross-origin iframe; left it out.",t));let{width:r,height:i}=jt(t),s=document.createElement("div");return s.style.cssText=n.placeholders?`width:${r}px;height:${i}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`:`display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`,Et(t,s,e,n),s}function lo(t){try{let e=Math.max(1,Math.min(32,t.width)),n=Math.max(1,Math.min(32,t.height)),o=document.createElement("canvas");o.width=e,o.height=n;let r=o.getContext("2d",{willReadFrequently:!0});if(!r)return!1;r.drawImage(t,0,0,e,n);let i=r.getImageData(0,0,e,n).data;for(let s=3;s0&&(r.style.width=`${i}px`),s>0&&(r.style.height=`${s}px`),r.style.boxSizing="border-box";let a=W(t),l=f=>parseFloat(f)||0;return r.dataset.snapdomWidth=String(i-l(a.paddingLeft)-l(a.paddingRight)-l(a.borderLeftWidth)-l(a.borderRightWidth)),r.dataset.snapdomHeight=String(s-l(a.paddingTop)-l(a.paddingBottom)-l(a.borderTopWidth)-l(a.borderBottomWidth)),e.nodeMap.set(r,t),Et(t,r,e,n),r}async function wh(t,e,n){let o="",r=t.poster&&t.paused&&!t.currentTime&&!t.played.length,i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch{}if(!r)try{let l=document.createElement("canvas");l.width=t.videoWidth||t.offsetWidth||320,l.height=t.videoHeight||t.offsetHeight||240;let f=l.getContext("2d");f&&(f.drawImage(t,0,0,l.width,l.height),o=l.toDataURL(gh(f,l.width,l.height)?"image/jpeg":"image/png",mh),(!o||o==="data:,")&&(o=""))}catch(l){U(e,"Couldn't capture a video frame; used its poster.",l)}o?i.src=o:t.poster&&(i.src=t.poster),i.width=t.videoWidth||t.offsetWidth||0,i.height=t.videoHeight||t.offsetHeight||0;let{width:s,height:a}=jt(t);return s>0&&(i.style.width=`${s}px`),a>0&&(i.style.height=`${a}px`),i.style.boxSizing="border-box",i.style.objectFit="contain",e.nodeMap.set(i,t),Et(t,i,e,n),i}async function xh(t,e,n){if(!t.controls)return;let{width:o,height:r}=jt(t),i=Math.round(o||t.offsetWidth||300),s=Math.round(r||t.offsetHeight||54),a=s/2,l=Math.max(4,s*.16),f=s*.34,c=i-s*.34,u=f+l+s*.55,d=Math.max(0,c-s*.7-u),m=Math.max(9,Math.round(s*.24)),g=`0:00`,y=document.createElement("img");try{y.decoding="sync",y.loading="eager"}catch{}return y.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g)}`,y.width=i,y.height=s,y.style.width=`${i}px`,y.style.height=`${s}px`,e.nodeMap.set(y,t),Et(t,y,e,n),y}async function bc(t,e,n){let o=t.getAttribute("data")||t.getAttribute("src")||"",r=(t.getAttribute("type")||"").toLowerCase(),i=/^image\//.test(r)||/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)(\?|#|$)/i.test(o);if(o&&i){let s=document.createElement("img");try{s.decoding="sync",s.loading="eager"}catch{}s.src=o;let{width:a,height:l}=jt(t);return a>0&&(s.style.width=`${a}px`),l>0&&(s.style.height=`${l}px`),s.style.boxSizing="border-box",e.nodeMap.set(s,t),Et(t,s,e,n),s}if(er(t))try{let s=await Qi(t,e,n);if(s)return s}catch{}o&&(at(e,"embed-fallback",`<${t.localName}> not capturable, using its fallback content: ${o}`),U(n,`Couldn't capture <${t.localName}>${r?` (${r})`:""}; showing its fallback content.`))}var Sh=new Map([["IFRAME",hh],["CANVAS",bh],["VIDEO",wh],["AUDIO",xh],["OBJECT",bc],["EMBED",bc]]);At();function re(t={},e=null){return{styleMap:e?e.styleMap:new Map,styleCache:e?e.styleCache:new WeakMap,nodeMap:e?e.nodeMap:new Map,warnings:e?null:[],resolveNodeHooks:null,animated:null,styleShare:t.__styleShare,slicer:null,fontUsage:null,tornSinceStart:null,retain:null,rootBox:null,compressedAssets:e?e.compressedAssets:null,compressionDensity:e?e.compressionDensity:void 0,compressedSnapshot:null,layoutZoom:1,fileSvg:null,artifacts:null}}function co(t,e,n){return{options:e,styleMap:t.styleMap,styleCache:t.styleCache,nodeMap:n,warnings:t.warnings,styleShare:t.styleShare,resolveNodeHooks:t.resolveNodeHooks,animated:t.animated,slicer:t.slicer,clip:null,selection:null,shadowScopes:null,shadowShare:null,shadowSheets:null,shadowGroups:null,shadowScopeSeq:0,shadowPseudo:!1,pseudoCSS:"",pseudoRuleSeq:0,counterCtx:null,siblingCounters:null,usesPlaceholder:!1,scan:null,scanEnv:null,shadowUniverse:void 0,share:null,oneLine:null,axes:null,flexOverflow:null,stylesCtx:null,stylesCtxOpts:null,bumpedForDisabled:!1,bgClipText:null,reconcileRisk:0}}xt();wt();ht();At();var vh=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],Sn=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{});function Ch(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cc(t,e){let n=Array.isArray(t)?t:t?[t]:[],o=[];for(let r of n)r instanceof RegExp?o.push(r.global||r.sticky?new RegExp(r.source,r.flags.replace(/[gy]/g,"")):r):typeof r=="string"?o.push(new RegExp(Ch(r),"i")):U(e,"Ignored an iconFonts entry: use a string or a RegExp.",r);return o}function Jt(t,e){let n=typeof t=="string"?t:"";for(let o of vh)if(o.test(n))return!0;if(e){for(let o of e)if(o instanceof RegExp&&o.test(n))return!0}return!!(/icon/i.test(n)||/glyph/i.test(n)||/symbols/i.test(n)||/feather/i.test(n)||/fontawesome/i.test(n))}function ns(t,e){if(typeof t!="string"||!t)return!1;let n;try{n=new URL(t,typeof location<"u"?location.href:void 0)}catch{return Jt(t,e)}let o=n.searchParams.getAll("family").flatMap(r=>r.split("|")).map(r=>r.split(":")[0].trim()).filter(Boolean);return o.length?o.every(r=>Jt(r,e)):Jt(t,e)}async function kc(t,e,n,o=32,r="#000",i="normal"){e=e.replace(/^['"]+|['"]+$/g,"");let s=window.devicePixelRatio||1;try{await Xn()}catch{}let a=document.createElement("span");rt(a),a.textContent=t,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${e}"`,a.style.fontWeight=n||"normal",a.style.fontStyle=i||"normal",a.style.fontSize=`${o}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let l=a.getBoundingClientRect(),f=Math.ceil(l.width),c=Math.ceil(l.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,f*s),u.height=Math.max(1,c*s);let d=u.getContext("2d");d.scale(s,s),d.font=`${i||"normal"} ${n||"normal"} ${o}px "${e}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=r,d.fillText(t,0,0);let m=d.measureText(t).actualBoundingBoxAscent;d.textBaseline="alphabetic";let g=d.measureText(t).actualBoundingBoxAscent,y=c-(g-m);return{dataUrl:u.toDataURL(),width:f,height:c,advance:l.width,descent:Number.isFinite(y)?y:0}}function kh(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var lr=new Map;function Mh(t=""){let e=Object.create(null),n=String(t||""),o=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,r;for(;r=o.exec(n);)e[r[1].toUpperCase()]=Number(r[2]);return e}async function Ah(t,e,n){let o=String(t||""),r=o.toLowerCase(),i=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(r)&&!/\bsymbols\b/.test(r))return{familyForMeasure:o,familyForCanvas:o};if(!/\bmaterial\s*symbols\b/.test(r))return{familyForMeasure:o,familyForCanvas:o};let a=n&&(n.FILL??n.fill),l="outlined";/\brounded\b/.test(i)||/\bround\b/.test(i)?l="rounded":/\bsharp\b/.test(i)?l="sharp":/\boutlined\b/.test(i)&&(l="outlined");let f=a===1,c=null;if(f&&(l==="outlined"&&Sn.materialIconsFilled?c={url:Sn.materialIconsFilled,alias:"snapdom-mi-filled"}:l==="rounded"&&Sn.materialIconsRound?c={url:Sn.materialIconsRound,alias:"snapdom-mi-round"}:l==="sharp"&&Sn.materialIconsSharp&&(c={url:Sn.materialIconsSharp,alias:"snapdom-mi-sharp"})),!c)return{familyForMeasure:o,familyForCanvas:o};if(!lr.has(c.alias))try{let d=new FontFace(c.alias,`url(${c.url})`,{style:"normal",weight:"400"});await d.load(),document.fonts.add(d),lr.set(c.alias,!0)}catch{return lr.set(c.alias,!1),{familyForMeasure:o,familyForCanvas:o}}if(lr.get(c.alias)===!1)return{familyForMeasure:o,familyForCanvas:o};let u=`"${c.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function Eh(t="Material Icons",e=24){try{await Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),Xn()])}catch{}}function Rh(t){let e=t.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(e)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e);if(e&&!n&&e.toLowerCase()!=="currentcolor")return e;let o=t.color?.trim();return o&&o!=="inherit"?o:"#000"}async function Fh(t,{family:e="Material Icons",weight:n="normal",fontSize:o=32,color:r="#000",variation:i="",className:s=""}={}){let a=String(e||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,f=Mh(i),{familyForMeasure:c,familyForCanvas:u}=await Ah(a,s,f);await Eh(u.replace(/^["']+|["']+$/g,""),o);let d=document.createElement("span");rt(d),d.textContent=t,d.style.position="absolute",d.style.visibility="hidden",d.style.left="-99999px",d.style.whiteSpace="nowrap",d.style.fontFamily=c,d.style.fontWeight=String(n||"normal"),d.style.fontSize=`${o}px`,d.style.lineHeight="1",d.style.margin="0",d.style.padding="0",d.style.fontFeatureSettings="'liga' 1",d.style.fontVariantLigatures="normal",d.style.color=r,document.body.appendChild(d);let m=d.getBoundingClientRect(),g=Math.max(1,Math.ceil(m.width)),y=Math.max(1,Math.ceil(m.height));document.body.removeChild(d);let p=document.createElement("canvas");p.width=g*l,p.height=y*l;let h=p.getContext("2d");h.scale(l,l),h.font=`${n?`${n} `:""}${o}px ${u}`,h.textAlign="left",h.textBaseline="top",h.fillStyle=r;try{h.fontKerning="normal"}catch{}return h.fillText(t,0,0),{dataUrl:p.toDataURL(),width:g,height:y}}async function cr(t,e,n=new Map){if(t?.nodeType!==1)return 0;let o='.material-icons, [class*="material-symbols"]',r=Array.from(t.querySelectorAll(o)).filter(a=>a&&a.textContent&&a.textContent.trim());if(t.matches?.(o)&&t.textContent&&t.textContent.trim()&&r.unshift(t),r.length===0)return 0;let i=e?.nodeType===1?Array.from(e.querySelectorAll(o)).filter(a=>a&&a.textContent&&a.textContent.trim()):[];e?.nodeType===1&&e.matches?.(o)&&e.textContent&&e.textContent.trim()&&i.unshift(e);let s=0;for(let a=0;a0?{height:r,descent:r-i}:null}finally{n.remove()}}At();$t();function os(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function Mc(t,e=!1){let n="",o=Math.max(1,t);for(;o>0;)o--,n=String.fromCharCode(97+o%26)+n,o=Math.floor(o/26);return e?n.toUpperCase():n}function Ac(t,e=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],o=Math.max(1,Math.min(3999,t)),r="";for(let[i,s]of n)for(;o>=i;)r+=s,o-=i;return e?r:r.toLowerCase()}function Ec(t,e){switch((e||"decimal").toLowerCase()){case"decimal":return String(t);case"decimal-leading-zero":{let n=Math.abs(t);return(t<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":case"lower-latin":return Mc(t,!1);case"upper-alpha":case"upper-latin":return Mc(t,!0);case"lower-roman":return Ac(t,!1);case"upper-roman":return Ac(t,!0);case"none":return"";case"disc":return"\u2022";case"circle":return"\u25E6";case"square":return"\u25AA";default:return String(t)}}function fo(t,e){let n=(t||"").trim().split(/[\s,]+/).filter(Boolean),o=[];for(let r=0;rf&&f.tagName==="LI",r=new WeakMap,i=f=>{let c=new Map;for(let[u,d]of f)c.set(u,d.slice());return c},s=(f,c,u)=>{let d=i(f),m;try{m=getComputedStyle(u)}catch{m=u.style}let g;try{g=m?.counterReset}catch{}if(g&&g!=="none")for(let[h,b]of fo(g,0)){let w=c.get(h);if(w&&w.length){let k=w.slice();k.push(b),d.set(h,k)}else d.set(h,[b])}let y;try{y=m?.counterSet}catch{}if(y&&y!=="none")for(let[h,b]of fo(y,0)){let w=d.get(h)||[];w.length===0&&w.push(0),w[w.length-1]=b,d.set(h,w)}let p;try{p=m?.counterIncrement}catch{}if(p&&p!=="none")for(let[h,b]of fo(p,1)){let w=d.get(h)||[];w.length===0&&w.push(0),w[w.length-1]+=b,d.set(h,w)}try{if(m?.display==="list-item"&&o(u)){let h=u.parentElement,b=h&&r.get(h),w=h?.tagName==="OL"?parseInt(h.getAttribute("start"),10):NaN,k=b===void 0?Number.isFinite(w)?w:1:b+1,v=h?.tagName==="OL"?parseInt(u.getAttribute("value"),10):NaN;Number.isFinite(v)&&(k=v),h&&r.set(h,k);let M=d.get("list-item")||[];M.length===0&&M.push(0),M[M.length-1]=k,d.set("list-item",M)}}catch{}return d},a=(f,c,u)=>{let d=s(u,c,f);e.set(f,d);let m=d;for(let y of f.children)m=a(y,d,m);let g=new Map;for(let[y,p]of u){let h=p.length,b=m.get(y);g.set(y,b&&b.length?b.slice(0,h):p.slice())}for(let[y,p]of m)!g.has(y)&&p.length&&!c.has(y)&&g.set(y,p.slice(0,1));return g},l=new Map;return a(n,l,l),{get(f,c){let u=e.get(f)?.get(c);return u&&u.length?u[u.length-1]:0},getStack(f,c){let u=e.get(f)?.get(c);return u?u.slice():[]}}}var Nh=/\b(counter|counters)\s*\(((?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^)"'])+)\)/g,Lh=/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^,"'])+/g;function Fc(t,e,n){if(!t||t==="none")return t;try{return t.replace(Nh,(o,r,i)=>{let s=(String(i).match(Lh)||[]).map(a=>a.trim());if(r==="counter"){let a=s[0]?.replace(/^["']|["']$/g,""),l=(s[1]||"decimal").toLowerCase(),f=n.get(e,a);return Ec(f,l)}else{let a=s[0]?.replace(/^["']|["']$/g,""),l=s[1]?.replace(/^["']|["']$/g,"")??"",f=(s[2]||"decimal").toLowerCase(),c=n.getStack(e,a);return c.length?c.map(d=>Ec(d,f)).join(l):""}})}catch{return"- "}}be();Ot();var Tc=new WeakMap;function _h(t){let e=t.adoptedStyleSheets;if(!Array.isArray(e))return;let n=e.length+"/";for(let r of e)n+=r.cssRules.length+",";let o=Tc.get(t);Tc.set(t,n),o!==void 0&&o!==n&&hn()}function $c(t){let e;return!!((e=t.borderTopStyle)&&e!=="none"&&e!=="hidden"&&parseFloat(t.borderTopWidth)>0||(e=t.borderRightStyle)&&e!=="none"&&e!=="hidden"&&parseFloat(t.borderRightWidth)>0||(e=t.borderBottomStyle)&&e!=="none"&&e!=="hidden"&&parseFloat(t.borderBottomWidth)>0||(e=t.borderLeftStyle)&&e!=="none"&&e!=="hidden"&&parseFloat(t.borderLeftWidth)>0)}function Ih(t,e){let n=null,o=()=>{if(!n)try{n=Rc(t)}catch(r){U(e,"Couldn't compute CSS counters; list numbers may be off.",r),n={get:()=>0,getStack:()=>[]}}return n};return{get(r,i){return o().get(r,i)},getStack(r,i){return o().getStack(r,i)}}}function Oh(t){let e=!1;for(let n=0;n{if(n){let r=parseInt(n,16);return r===0||r>1114111?"\uFFFD":String.fromCodePoint(r)}return o===` -`?"":o})}function Pc(t){if(!t)return"";let e=[],n=/"((?:\\[\s\S]|[^"\\])*)"|'((?:\\[\s\S]|[^'\\])*)'/g,o=0,r;for(;r=n.exec(t);){let s=t.slice(o,r.index).trim();s&&e.push(s),e.push(Wh(r[1]!==void 0?r[1]:r[2])),o=n.lastIndex}let i=t.slice(o).trim();return i&&e.push(i),e.join("")}function Dh(t,e,n){let o=t.parentElement,r=o&&n?n.get(o):null;return r?{get(i,s){let a=e.get(i,s),l=r.get(s);return typeof l=="number"?Math.max(a,l):a},getStack(i,s){let a=e.getStack(i,s);if(!a.length)return a;let l=r.get(s);if(typeof l=="number"){let f=a.slice();return f[f.length-1]=Math.max(f[f.length-1],l),f}return a}}:e}function Bh(t,e,n){let o=new Map,r=(f,c)=>fo(f,c).map(([u,d])=>({name:u,num:d})),i=r(e?.counterReset,0),s=r(e?.counterSet,0),a=r(e?.counterIncrement,1);function l(f){if(o.has(f))return o.get(f).slice();let c=n.getStack(t,f);c=c.length?c.slice():[];let u=i.find(g=>g.name===f);if(u){let g=Number.isFinite(u.num)?u.num:0;c=c.length?[...c,g]:[g]}let d=s.find(g=>g.name===f);if(d){let g=Number.isFinite(d.num)?d.num:0;c.length===0&&(c=[0]),c[c.length-1]=g}let m=a.find(g=>g.name===f);if(m){let g=Number.isFinite(m.num)?m.num:1;c.length===0&&(c=[0]),c[c.length-1]+=g}return o.set(f,c.slice()),c}return{get(f,c){let u=l(c);return u.length?u[u.length-1]:0},getStack(f,c){return l(c)},incs:a}}var zh=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","letter-spacing","line-height"],Uh=["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 Nc(t,e,n,o,r,i){try{if(o===null){if(t.getRootNode()!==(t.ownerDocument||document))return;let u=W(t).display||"";if(r==="::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(r==="::marker"&&!(W(t).display||"").includes("list-item"))return;let s=W(t,r),a=W(t);if(!s)return;let l="";for(let u of i){let d=s.getPropertyValue(u);d&&d!==a.getPropertyValue(u)&&!(u==="background-color"&&d==="rgba(0, 0, 0, 0)")&&!(u==="vertical-align"&&d==="baseline")&&(l+=`${u}:${d};`)}if(r==="::marker"){let u=s.getPropertyValue("content");u&&u!=="normal"&&u!=="none"&&(l+=`content:${u};`)}if(!l)return;let c=`data-sd-p${n.pseudoRuleSeq=(n.pseudoRuleSeq||0)+1}`;e.setAttribute(c,""),n.pseudoCSS=(n.pseudoCSS||"")+`[${c}]${r}{${l}}`}catch{}}function Hh(t,e){if(!/\b(?:no-)?(?:open|close)-quote\b/.test(t))return t;let n="\u201C",o="\u201D";try{let r=W(e).quotes;if(r==="none")n="",o="";else if(r&&r!=="auto"){let i=r.match(/"[^"]*"|'[^']*'/g);i&&i.length>=2&&(n=i[0].slice(1,-1),o=i[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,(r,i)=>i?i==="open-quote"?`"${n}"`:i==="close-quote"?`"${o}"`:'""':r)}function Vh(t,e,n,o){let r=e.content;if(!r||r==="none"||r==="normal")return{text:"",incs:[]};r=Oh(r),r=Hh(r,t);let i=e.counterIncrement;if(!os(r)&&(!i||i==="none"))return{text:Pc(r),incs:[]};let s=Dh(t,n,o),a=Bh(t,e,s),l=os(r)?Fc(r,t,a):r;return{text:Pc(l),incs:a.incs||[],derived:a}}function jh(t,e){if(e.shadowPseudo)return!1;let n=ke(t),o=[];for(let i of["before","after","firstLetter","marker","firstLine"]){let s=n[i];if(s===null)return!1;s&&o.push(s)}if(!o.length)return!0;let r=o.join(",");try{return!t.matches(r)&&t.querySelector(r)===null}catch{return!1}}async function vn(t,e,n,o,r=!1){if(t?.nodeType!==1||e?.nodeType!==1||(n.slicer?.due()&&await n.slicer.pause(),t.tagName==="TEXTAREA")||!r&&(ne(),_h(t.ownerDocument||document),jh(t,n)))return;n.siblingCounters||(n.siblingCounters=new WeakMap),n.counterCtx||(n.counterCtx=Ih(t.ownerDocument||document,n));let i=n.counterCtx,s=ke(t);s.marker!==""&&Nc(t,e,n,s.marker,"::marker",zh),s.firstLine!==""&&Nc(t,e,n,s.firstLine,"::first-line",Uh);for(let a of["::before","::after","::first-letter"]){let l=s[a==="::before"?"before":a==="::after"?"after":"firstLetter"];if(l!==null){if(l==="")continue;try{if(!t.matches(l))continue}catch{}}let f=null;if(a==="::first-letter"){for(let c=e.firstChild;c&&!f;c=c.nextSibling)c.nodeType===3&&c.data.trim()&&(f=c);if(!f)continue}try{let c=W(t,a);if(!c)continue;let u=c.content,d=c.display;if(u==="-moz-alt-content"||u==="none"&&c.backgroundImage==="none"&&(c.backgroundColor==="transparent"||c.backgroundColor==="rgba(0, 0, 0, 0)")&&!$c(c)&&(!c.transform||c.transform==="none")&&d==="inline")continue;if(d==="none"||a!=="::first-letter"&&(u==="none"||u==="normal")){a==="::before"&&e.setAttribute("data-snapdom-has-before","1"),a==="::after"&&e.setAttribute("data-snapdom-has-after","1");continue}if(a==="::first-letter"){let X=W(t),J=(X?.display||"").toLowerCase();if(J.includes("flex")||J.includes("grid"))continue;let Y=Le=>c[Le]!==X[Le]&&(parseFloat(c[Le])||0)!==0;if(!(c.color!==X.color||c.fontSize!==X.fontSize||c.fontWeight!==X.fontWeight||c.fontFamily!==X.fontFamily||c.fontStyle!==X.fontStyle||c.textTransform!==X.textTransform||c.float!==X.float&&c.float!=="none"||Y("paddingTop")||Y("paddingRight")||Y("paddingBottom")||Y("paddingLeft")||Y("marginTop")||Y("marginRight")||Y("marginBottom")||Y("marginLeft")))continue;let te=f.textContent,St=/^\s*/.exec(te)[0],Bn=te.slice(St.length),Te=Bn.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['\u2019])?)/u)?.[0],se=Bn.slice(Te?.length||0);if(!Te||/[\uD800-\uDFFF]/.test(Te))continue;let It=document.createElement("span");It.textContent=Te,It.setAttribute("data-snapdom-pseudo","::first-letter");let $e=mn(t,n),nn=an(c,$e),Pe=Ue(nn,"span",!0,!1,"",$e);n.styleMap.set(It,Pe);let Ne=document.createTextNode(se);e.replaceChild(Ne,f),e.insertBefore(It,Ne),St&&e.insertBefore(document.createTextNode(St),It);continue}let y=u??"",p=y===""||y==="none"||y==="normal",{text:h,incs:b,derived:w}=Vh(t,c,i,n.siblingCounters),k=c.backgroundImage,v=c.backgroundColor,M=c.fontFamily,C=parseInt(c.fontSize)||32,S=parseInt(c.fontWeight)||!1,A=c.fontStyle||"normal",x=c.color||"#000",E=c.transform,R=Jt(M,o?.__iconMatchers),F=!p&&h!=="",N=k&&k!=="none",P=v&&v!=="transparent"&&v!=="rgba(0, 0, 0, 0)",_=$c(c),I=E&&E!=="none",B=y!=="none"&&y!=="normal",D=/^inline-/.test(d||""),z=B&&((parseFloat(c.width)||0)>0||(parseFloat(c.height)||0)>0||D),$=c.boxShadow,T=c.outlineStyle,L=B&&$&&$!=="none",O=B&&T&&T!=="none"&&(parseFloat(c.outlineWidth)||0)>0;if(!(F||N||P||_||I||z||L||O)){if(b&&b.length&&t.parentElement){let X=n.siblingCounters.get(t.parentElement)||new Map;for(let{name:J}of b)J&&X.set(J,w.get(t,J));n.siblingCounters.set(t.parentElement,X)}continue}let Q=h.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(h),j=d==="inline"&&c.cssFloat==="none"&&c.position!=="absolute"&&c.position!=="fixed",q=!1;if(F&&!R&&h.length>1&&!Q&&j){let X=W(t),J=parseFloat(X.fontSize)||16,Y=parseFloat(X.lineHeight);Number.isFinite(Y)||(Y=J*1.5),t.getBoundingClientRect().height=1.5*(parseFloat(c.lineHeight)||(parseFloat(c.fontSize)||16)*1.2)&&(Rt=!1,V.style.whiteSpace=c.whiteSpace);let Dn=Ue(gt,"span",Rt,pt,"",mn(t,n));if(n.styleMap.set(V,Dn),R&&h&&[...h].length===1){let{dataUrl:X,height:J,advance:Y,descent:Ft}=await kc(h,M,S,C,x,A),te=document.createElement("img");te.src=X,te.style=`height:${C}px;width:${Y/J*C}px;object-fit:contain;vertical-align:${-Ft}px;`,V.appendChild(te)}else if(h&&Q){let X=Un(h,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??_e(h);if(X?.trim())try{let J=await bt(ge(X),{as:"dataURL",useProxy:o.useProxy,debug:o.debug});if(J?.ok&&typeof J.data=="string"){let Y=document.createElement("img");Y.src=J.data,Y.style=`width:${C}px;height:auto;object-fit:contain;`,V.appendChild(Y)}}catch(J){U(o,`Couldn't draw the ${a} icon of`,[t,J])}}else!R&&F&&(V.textContent=h);V.style.backgroundImage="none","maskImage"in V.style&&(V.style.maskImage="none"),"webkitMaskImage"in V.style&&(V.style.webkitMaskImage="none");try{V.style.backgroundClip=c.backgroundClip,N&&(V.style.backgroundRepeat=c.backgroundRepeat,V.style.backgroundSize=c.backgroundSize,c.backgroundPositionX&&c.backgroundPositionY?(V.style.backgroundPositionX=c.backgroundPositionX,V.style.backgroundPositionY=c.backgroundPositionY):V.style.backgroundPosition=c.backgroundPosition,V.style.backgroundOrigin=c.backgroundOrigin,V.style.backgroundAttachment=c.backgroundAttachment,V.style.backgroundBlendMode=c.backgroundBlendMode)}catch{}if(N)try{let X=ve(k),J=await Promise.all(X.map(Y=>rn(Y,o)));V.style.backgroundImage=J.join(", ")}catch(X){U(o,`Couldn't load the ${a} background image.`,X)}P&&(V.style.backgroundColor=v);let qt=c.maskImage||c.webkitMaskImage;if(qt&&qt!=="none")try{let J=(await Promise.all(ve(qt).map(Y=>rn(Y,o)))).join(", ");V.style.maskImage=J,V.style.webkitMaskImage=J;for(let Y of["maskSize","maskRepeat","maskPosition","maskMode","maskComposite","maskOrigin","maskClip"])c[Y]&&(V.style[Y]=c[Y])}catch(X){U(o,`Couldn't load the ${a} mask image.`,X)}let en=V.childNodes.length>0||V.textContent?.trim()!==""||N||P||_||I||z||L||O;if(b&&b.length&&t.parentElement){let X=n.siblingCounters.get(t.parentElement)||new Map;for(let{name:J}of b){if(!J)continue;let Y=w.get(t,J);X.set(J,Y)}n.siblingCounters.set(t.parentElement,X)}if(!en)continue;a==="::before"?(e.setAttribute("data-snapdom-has-before","1"),e.insertBefore(V,e.firstChild)):(e.setAttribute("data-snapdom-has-after","1"),e.appendChild(V))}catch(c){at(n,"pseudo-failed",`${a} could not be copied`,t),U(o,`Couldn't copy the ${a} of`,[t,c])}}if(n.nodeMap)for(let a=e.firstElementChild;a;a=a.nextElementSibling){let l=n.nodeMap.get(a);l?.nodeType===1&&!a.hasAttribute("data-snapdom-pseudo")&&await vn(l,a,n,o,!0)}else{let a=Array.from(e.children).filter(f=>!f.hasAttribute("data-snapdom-pseudo")),l=Array.from(t.children);for(let f=0;fw+k.width,0),b=0;a=r.map(w=>{let k={x:w.left-i-b,y:w.top-s,w:h,h:w.height,top:w.top,bottom:w.bottom};return b+=w.width,k})}else{let h=t.clientWidth||r[0].width,b=t.clientHeight||r[0].height;a=[{x:0,y:0,w:h,h:b,top:-1/0,bottom:1/0}]}let l=e.ownerDocument,f=`sd-bct-${Math.random().toString(36).slice(2,9)}`,c=Gh.map(h=>`${h}:${o.getPropertyValue(h)}`).join(";").replace(/"/g,"'"),u="";a.forEach((h,b)=>{let w=`
`;u+=``});let d="",m=l.createElement("canvas").getContext("2d"),g=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT),y=t.ownerDocument.createRange();for(let h=g.nextNode();h;h=g.nextNode()){let b=n.getComputedStyle(h.parentElement);m.font=b.font;let w=m.measureText("X").fontBoundingBoxAscent;if(!Number.isFinite(w))return;let k=b.font.replace(/"/g,"'"),v=a.map(()=>({xs:[],ys:[],chars:""})),M=h.data;for(let C=0;C=55296&&M.charCodeAt(C)<=56319?2:1;y.setStart(h,C),y.setEnd(h,C+S);let A=y.getClientRects()[0],x=M.slice(C,C+S);if(C+=S-1,!A||!x.trim())continue;let E=(A.top+A.bottom)/2,R=a.findIndex(F=>E>=F.top&&E<=F.bottom);R<0&&(R=0),v[R].xs.push(+(A.left-i).toFixed(2)),v[R].ys.push(+(A.top-s+w).toFixed(2)),v[R].chars+=x}v.forEach((C,S)=>{if(!C.chars)return;let A=C.chars.replace(/&/g,"&").replace(/${A}`})}if(!d)return;let p=l.createElementNS(Lc,"svg");p.setAttribute("style","position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none"),p.innerHTML=`${u}${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(p,e.firstChild)}Ot();$t();function Ic(t,e,n){if(!t||t?.nodeType!==1)return;let o=t.ownerDocument||document,r=e||o,i=Ut(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=M=>window.CSS&&CSS.escape?CSS.escape(M):M.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),f="http://www.w3.org/1999/xlink",c=M=>{if(!M||!M.getAttribute)return null;let C=M.getAttribute("href")||M.getAttribute("xlink:href")||(typeof M.getAttributeNS=="function"?M.getAttributeNS(f,"href"):null);if(C)return C;let S=M.attributes;if(!S)return null;for(let A=0;AM.id)),d=new Set,m=!1,g=(M,C=null)=>{if(!M)return;s.lastIndex=0;let S;for(;S=s.exec(M);){m=!0;let A=(S[1]||"").trim();A&&(u.has(A)||(d.add(A),C&&!C.has(A)&&C.add(A)))}},y=M=>{let C=M.querySelectorAll("use");for(let x of C){let E=c(x);if(!E||!E.startsWith("#"))continue;m=!0;let R=E.slice(1).trim();R&&!u.has(R)&&d.add(R)}let S='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';g(M.getAttribute("style")||"");for(let x of a)g(M.getAttribute(x));let A=M.querySelectorAll(S);for(let x of A){g(x.getAttribute("style")||"");for(let E of a)g(x.getAttribute(E))}},p=M=>{if(!M||M.nodeType!==1||!M.querySelectorAll)return;let C="filter[id],clipPath[id],mask[id],linearGradient[id],radialGradient[id],pattern[id]",S=!1;try{S=!!(r.querySelector&&r.querySelector(C))}catch{return}if(!S)return;let A=["filter","clipPath","mask","maskImage","webkitMaskImage"],x=E=>{if(Ut(E))return;let R;try{R=getComputedStyle(E)}catch{return}for(let F of A){let N=R[F];N&&N.includes("url(")&&g(N)}};x(M);for(let E of M.querySelectorAll("*"))x(E)};for(let M of i)y(M);if(p(n),!m)return;let h=t.querySelector("svg.inline-defs-container");h||(h=o.createElementNS("http://www.w3.org/2000/svg","svg"),h.classList.add("inline-defs-container"),h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(h,t.firstChild||null));let b=h.querySelector("defs")||null,w=M=>{if(!M||u.has(M))return null;let C=l(M),S=A=>{let x=r.querySelector(A);return x&&!t.contains(x)?x:null};return S(`svg defs > *#${C}`)||S(`svg > symbol#${C}`)||S(`*#${C}`)};if(!d.size)return;let k=new Set(d),v=new Set;for(;k.size;){let M=k.values().next().value;if(k.delete(M),!M||u.has(M)||v.has(M))continue;let C=w(M);if(!C){v.add(M);continue}b||(b=o.createElementNS("http://www.w3.org/2000/svg","defs"),h.appendChild(b));let S=C.cloneNode(!0);S.id||S.setAttribute("id",M),b.appendChild(S),v.add(M),u.add(M);let A=[S,...S.querySelectorAll("*")];for(let x of A){let E=c(x);if(E&&E.startsWith("#")){let F=E.slice(1).trim();F&&!u.has(F)&&!v.has(F)&&k.add(F)}let R=x.getAttribute?.("style")||"";R&&g(R,k);for(let F of a){let N=x.getAttribute?.(F);N&&g(N,k)}}}}$t();wt();var ur=new WeakMap;function Oc(t,e){let n=ur.get(t),o=t.style;if(!n){let i=o.cssText,s=t.hasAttribute("style");n={users:0,saved:e.map(([l,f])=>{let c={property:l,value:o.getPropertyValue(l),priority:o.getPropertyPriority(l)};return o.setProperty(l,f,"important"),c.forcedValue=o.getPropertyValue(l),c}),originalCSS:i,forcedCSS:o.cssText,hadStyle:s},Oo(t,i,n.forcedCSS),ur.set(t,n)}n.users++;let r=!1;return()=>{if(!r&&(r=!0,!--n.users)){if(ur.delete(t),o.cssText===n.forcedCSS)o.cssText=n.originalCSS;else for(let i of n.saved)o.getPropertyValue(i.property)!==i.forcedValue||o.getPropertyPriority(i.property)!=="important"||(i.value?o.setProperty(i.property,i.value,i.priority):o.removeProperty(i.property));!n.hadStyle&&!o.length&&(t.getAttribute("style"),t.removeAttribute("style"))}}}var Cn='[style*="content-visibility"]';function uo(t,e=null,n=null){let o=[],r=i=>{if(!zt(i))return;if(ur.has(i)){o.push(Oc(i,[]));return}let s=getComputedStyle(i);(s.contentVisibility||s.getPropertyValue("content-visibility")||"")==="auto"&&o.push(Oc(i,[["content-visibility","visible"]]))};try{if(n)for(let i of n)r(i);else if(e){let s=a=>{let l;try{l=a.getBoundingClientRect()}catch{return}if(!((l.width>0||l.height>0)&&(l.righte.right+200||l.bottome.bottom+200))){r(a);for(let f=a.firstElementChild;f;f=f.nextElementSibling)s(f)}};s(t)}else{for(let i of t.querySelectorAll("*"))r(i);r(t)}}catch{}return()=>{for(let i of o)try{i()}catch{}}}Ze();ht();Kt();He();be();ho();var Qe="data-snapdom-asset",nf="http://www.w3.org/1999/xlink",gm=0;function bo(t,e,n,o,r,i){let s=i.compressedAssets||=new WeakMap,a=s.get(t);a||(a={token:String(++gm),properties:[]},s.set(t,a),t.setAttribute(Qe,a.token));let l=a.properties.find(f=>f.kind===e&&f.name===n);l?(l.compressed!==o&&(l.original=o),l.compressed=r):a.properties.push({kind:e,name:n,original:o,compressed:r})}var of=(t,e)=>e.kind==="style"?t.style?.getPropertyValue(e.name):t.getAttribute(e.name);function br(t,e){let n=new Map;if(!t||!e)return n;let o=[t,...t.querySelectorAll(`[${Qe}]`)];for(let r of o){let i=e.get(r);if(!i||r.getAttribute(Qe)!==i.token)continue;let s=i.properties.filter(a=>of(r,a)===a.compressed).map(a=>Object.freeze({...a}));s.length&&n.set(i.token,Object.freeze(s))}return n}function wr(t,e){if(!t||!e)return;let n=0;for(let o of[t,...t.querySelectorAll(`[${Qe}]`)]){let r=e.get(o);r&&(r.token=String(++n),o.setAttribute(Qe,r.token))}}async function rf(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 r=!1;for(let i of o.querySelectorAll(`[${Qe}]`))for(let s of e.get(i.getAttribute(Qe))||[]){if(of(i,s)!==s.compressed)continue;let a=await s.original;if(a!=null){if(typeof a!="string"){let l=a;if(a=await new Promise(f=>{let c=new FileReader;c.onload=()=>f(c.result),c.onerror=()=>f(null),c.readAsDataURL(l)}),a==null)continue}s.kind==="style"?i.style.setProperty(s.name,a,i.style.getPropertyPriority(s.name)):s.name==="xlink:href"?i.setAttributeNS(nf,s.name,a):i.setAttribute(s.name,a),r=!0}}return r?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(o))}`:t}function tf(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 xr(t,e,n){let o=e.element||t,r=o.isConnected?W(o):o.style,i=n.clip,s=(g,y)=>{try{return g[y]?.baseVal?.value||0}catch{return 0}},a=i?.width||o.offsetWidth||parseFloat(r?.width)||s(o,"width"),l=i?.height||o.offsetHeight||parseFloat(r?.height)||s(o,"height"),f=Number.isFinite(e.width),c=Number.isFinite(e.height);if(!i&&(f||c)&&a&&l)try{let g=e.outerTransforms===!1&&n.rootTransform?n.rootTransform:Ae({baseTransform:r?.transform,rotate:r?.rotate,scale:r?.scale,width:a,height:l});if(g.is2D===!1)a=0,l=0;else{let y=Math.abs(g.a)*a+Math.abs(g.c)*l,p=Math.abs(g.b)*a+Math.abs(g.d)*l;a=Math.min(a,y),l=Math.min(l,p)}}catch{a=0,l=0}let u=(f||c?Math.max(f?a?e.width/a:1/0:0,c?l?e.height/l:1/0:0):e.scale||1)*(e.dpr||1);n.session.compressionDensity=u;let d=new WeakMap,m=g=>{if(!g||g.nodeType!==1)return 1;if(d.has(g))return d.get(g);let y=g.isConnected?W(g):g.style,p=1;try{y?.perspective&&y.perspective!=="none"&&(p=1/0);let h=y?.transform;if(h&&h!=="none")p*=tf(new DOMMatrix(h));else if(g.transform?.baseVal?.numberOfItems){let b=new DOMMatrix;for(let w=0;wparseFloat(w)/(w.endsWith("%")?100:1));p*=Math.max(...b.map(Math.abs))}if(g!==o&&y?.zoom&&y.zoom!=="normal"&&(p*=parseFloat(y.zoom)||1),g.localName==="svg"&&g.viewBox?.baseVal?.width>0&&g.viewBox.baseVal.height>0){let b=g.viewBox.baseVal,w=M=>/^\d+(?:\.\d+)?px$/.test(y?.[M]||"")?parseFloat(y[M]):s(g,M),k=w("width"),v=w("height");p*=k>0&&v>0?Math.max(k/b.width,v/b.height):1/0}}catch{p=1/0}return Number.isFinite(p)||(p=1/0),g!==o&&(p*=m(g.parentElement||g.getRootNode?.().host)),d.set(g,p),p};return{density:u,stretch:m}}var xs=.92,yr=1;async function ym(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 bm(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}var wm=64*1024,sf=32*1024*1024,xm=50,gr=new Map,ys=0,bs=0;function Sm(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,r=t.length-n-1,i=Math.min(r,o);try{let s=atob(t.slice(n+1,n+1+i-i%4)),a=new Uint8Array(s.length);for(let l=0;le[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=208&&r<=215){o+=2;continue}if(r>=192&&r<=207&&r!==196&&r!==200&&r!==204)return{h:n(o+5),w:n(o+7)};let i=n(o+2);if(i<2)break;o+=2+i}}return null}function ws(t,e,n,o){let r=Math.min(1,Math.max(n/t,o/e));return!(r>0)||r>=.95?0:r}var Cm=`self.onmessage = async (e) => { +`}return i}function Qn(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,o=1;for(let r of e)n.set(r,`c${o++}`);return n}function Kd(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"",item:()=>""};return t[Symbol.iterator]=function*(){},t}function tl(t,e){let n=Kd(t),o=null;try{o=n&&typeof n.getComputedStyle=="function"?n.getComputedStyle(t,e):null}catch{}if(!o&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(o=window.getComputedStyle(t,e))}catch{}return o||Vo()}function W(t,e=null){if(t?.nodeType!==1){let i=typeof window<"u"?window:null;if(i&&typeof i.getComputedStyle=="function")try{return i.getComputedStyle(t,e)||Vo()}catch{return Vo()}return Vo()}let n=G.computedStyle.get(t);if(n||G.computedStyle.set(t,n=tl(t,null)),e===null)return n;let o=G.computedStyle.get(n);o||G.computedStyle.set(n,o=new Map);let r=o.get(e);return r||o.set(e,r=tl(t,e)),r}function qo(t){if(Pi)return Pi;let e=Array.from(t).filter(n=>!Se(n));return e.length?Pi=e:e}function un(t,e=null){let n={};for(let o of e||qo(t)){let r=t.getPropertyValue(o);r&&(n[o]=r)}for(let o of Zd){let r=n[`border-${o}-style`],i=n[`border-${o}-width`];(r==="none"||r==="hidden"||i==="0px")&&(delete n[`border-${o}-style`],delete n[`border-${o}-width`],delete n[`border-${o}-color`])}return n}function Ce(t){let e=[],n=0,o=0,r="";for(let i=0;i{"use strict";Kt();pt();ne();wt();Ni=new Set(["meta","script","noscript","title","link","template"]),Jn=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"]);Uo=new WeakMap,xe=null,Dd=[...Wo,"text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink","-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order","font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing","-webkit-text-fill-color","text-wrap-mode"];Bd=/(?:^|-)(animation|transition)(?:-|$)/i,zd=/^(--.+|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,Ud=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","stroke-color"]),Za=new Map;Hd=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),el=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Vd=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),jd=new Set(["width","max-width","inline-size","max-inline-size"]),Gd=new Set(["mi","mn","mo","ms","mtext"]),qd=new Set(["min-width","min-inline-size"]),Wi=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"}));Go=.001,Xd=/(^| )(\d+\.\d+)px(?= |$)/g;Yd=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]);ol=1,rl=2,il=4,sl=8,al=16,ll=32,cl=64,Ja=127,jo=7,ze=new Map,Be=[],Ue=[];Zd=["top","right","bottom","left"],Pi=null});function U(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 at(t,e,n,o){let r=t&&t.warnings;r&&r.length{"use strict";Jd=50});var xt=ct(()=>{"use strict";Na();Ve();pt();$t();At()});function je(){ue=++Ct}function to(t){let e=t&&(t.nodeType===1?t:t.parentElement);for(;e;){if(Vt(e))return!0;e.parentElement?e=e.parentElement:e=Ht(e)}return!1}function pl(t){for(let e of t)if(gn(e))return!0;return!1}function gn(t){if(to(t.target))return!1;if(t.type==="characterData"?$i(t.target,t.target.data):t.attributeName==="style"&&$i(t.target,t.target.style.cssText))return Ct++,!1;if(t.type==="childList"){let e=!0;for(let n of t.addedNodes)if(!to(n)){e=!1;break}if(e){for(let n of t.removedNodes)if(!to(n)){e=!1;break}}if(e)return!1}return!0}function hl(t){for(let e of t){let n=e.target.ownerDocument||document;dn.set(n,(dn.get(n)||0)+1);let o=e.target.nodeType===1?e.target:e.target.parentElement||e.target.host;for(;o;o=o.parentElement||Ht(o))dn.set(o,(dn.get(o)||0)+1)}}function oo(t){let e=t.ownerDocument||document;return Xe(e),(dn.get(e)||0)-(dn.get(t)||0)}function mn(){ue=Nt=++Ct}function yn(t=document){return Xe(t),Nt}function qe(){return Xe(),ue}function ro(t){return t?(Xe(t.ownerDocument||document),ao(t,Zo(t))):0}function bn(){mn()}function ml(){Ct++}function pn(){gl=++Ct}function io(t){Ge.set(t,++Ct)}function so(t){if(!t||t.nodeType!==1)return;let e=++Ct;Ge.set(t,e);let n=t.querySelectorAll("*");for(let o=0;on?.nodeType===1&&(n.matches?.("style,link")||n.querySelector?.("style,link"));for(let n of t){let o=n.target,r=o&&(o.nodeType===1?o:o.parentElement);if(r&&(r.tagName==="STYLE"||r.tagName==="LINK"))return r.ownerDocument||document;for(let i of n.addedNodes)if(e(i))return i.ownerDocument||document;for(let i of n.removedNodes)if(e(i))return i.ownerDocument||o&&o.ownerDocument||document}return null}function yl(t){let e=t.filter(gn);if(!e.length)return;hl(e),je();let n=new Set;for(let o of e){let r=o.target.getRootNode&&o.target.getRootNode();if(!r||r.nodeType!==11||n.has(r))continue;n.add(r),r.host?so(r.host):Ct++;let i=r.querySelectorAll("*");for(let s=0;s{pl(r)&&mn()},o=mn;try{let r=new MutationObserver(wl);r.observe(t.documentElement,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),no.push({o:r,head:!1,doc:t})}catch{}try{let r=new MutationObserver(n);r.observe(t.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),no.push({o:r,head:!0,doc:t})}catch{}try{e?.addEventListener("resize",o,{passive:!0})}catch{}try{let r=i=>{je();let s=i.composedPath?.()[0]||i.target;s&&s.nodeType===1&&!to(s)&&Gi(s.ownerDocument||t)?ji(s):pn()};t.addEventListener("focusin",r,{capture:!0,passive:!0}),t.addEventListener("focusout",r,{capture:!0,passive:!0}),t.addEventListener("change",r,{capture:!0,passive:!0}),t.addEventListener("pointerdown",r,{capture:!0,passive:!0}),t.addEventListener("pointerup",r,{capture:!0,passive:!0}),t.addEventListener("pointercancel",r,{capture:!0,passive:!0}),t.addEventListener("keydown",r,{capture:!0,passive:!0}),t.addEventListener("keyup",r,{capture:!0,passive:!0}),t.addEventListener("beforetoggle",r,{capture:!0,passive:!0}),t.addEventListener("toggle",r,{capture:!0,passive:!0}),e?.addEventListener("hashchange",()=>{je(),pn()},{passive:!0}),t.addEventListener("load",i=>{to(i.target)||Ct++},{capture:!0,passive:!0})}catch{}try{let r=t.fonts;r&&(r.addEventListener?.("loadingdone",o),r.status==="loading"&&r.ready?.then(o).catch(()=>{}))}catch{}}function ul(t,e){if(!t?.querySelectorAll)return;let n;try{n=Array.from(t.querySelectorAll(":hover"))}catch{return}let o=fl.get(t)||[];if(o.length===n.length&&o.every((i,s)=>i===n[s]))return;if(fl.set(t,n),je(),t.nodeType===11){t.host?so(t.host):Ct++;for(let i of t.querySelectorAll("*"))Ge.set(i,Ct);return}let r=o.filter(i=>!n.includes(i)).concat(n.filter(i=>!o.includes(i)));for(let i of r)if(i.isConnected)if(Gi(e))ji(i);else{pn();return}}function Jo(t,e=null){if(!t)return;ul(t,t);let n=e||hn.filter(({root:o})=>o.host?.isConnected).map(({root:o})=>o);for(let o of n)ul(o,t)}function oe(){Xe();try{for(let t=no.length-1;t>=0;t--){let{o:e,head:n,doc:o}=no[t];if(o!==document&&!o.defaultView){try{e.disconnect()}catch{}Hi.delete(o),eo===o&&(eo=null),no.splice(t,1);continue}let r=e.takeRecords();r.length&&(n?pl(r)&&mn():wl(r))}for(let t=hn.length-1;t>=0;t--){let{o:e,root:n}=hn[t];if(!n.host||!n.host.isConnected){try{e.disconnect()}catch{}Ui.delete(n),hn.splice(t,1);continue}let o=e.takeRecords();o.length&&yl(o)}}catch{}}function dl(t){let e=t.href;return!e||typeof CSSStyleSheet!="function"?null:Xo.has(e)?Xo.get(e):(Xo.set(e,null),bt(e,{as:"text"}).then(n=>{if(!n.ok||typeof n.data!="string"||/@import/i.test(n.data))return;let o=new CSSStyleSheet;o.replaceSync(n.data),Xo.set(e,o.cssRules),mn()}).catch(()=>{}),null)}function Sl(t,e){let n=(Vi.get(t)||0)+e+tp;Vi.set(t,n),Ko.get(t)?.declined<=n*xl&&(Ko.delete(t),Yo.delete(t))}function Lt(t){let e=Ko.get(t);if(!e||e.epoch!==ue){let n=qa(t,dl);if(e&&n&&e.env===Nt&&e.census&&e.census.length===n.length&&n.every((i,s)=>i===e.census[s]))return e.epoch=ue,e;let o=e&&e.universe;e={epoch:ue,env:Nt,census:n,...Ya(t,dl,(Vi.get(t)||0)*xl)};let r=e.universe;if(o&&r&&o.size===r.size){let i=!0;for(let s of r)if(!o.has(s)){i=!1;break}i&&(e.universe=o)}Ko.set(t,e)}return e}function Qo(t,e){return e?(e.scan||(e.scan=Lt(t),e.scanEnv=Nt),e.scan):Lt(t)}var Ct,ue,dn,Nt,Ge,gl,Yo,Ui,hn,Hi,eo,no,fl,Ko,Xo,xl,tp,Vi,Ot=ct(()=>{"use strict";xt();ne();wt();we();Ct=0,ue=0;dn=new WeakMap;Nt=0;Ge=new WeakMap;gl=0;Yo=new WeakMap;Ui=new WeakSet,hn=[];Hi=new WeakSet,eo=null,no=[];fl=new WeakMap;Ko=new WeakMap,Xo=new Map;xl=12,tp=10,Vi=new WeakMap});function ms(t){return Zc(t.boxShadow)}function gs(t){return Zc(t.textShadow)}function Zc(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",o=0;for(let l=0;lparseFloat(p))||[];if(f.length<2)continue;let[c,u,d=0,y=0]=f,m=Math.abs(c)+d+y,g=Math.abs(u)+d+y;i=Math.max(i,m+Math.max(c,0)),a=Math.max(a,m+Math.max(-c,0)),s=Math.max(s,g+Math.max(u,0)),r=Math.max(r,g+Math.max(-u,0))}return{top:Math.ceil(r),right:Math.ceil(i),bottom:Math.ceil(s),left:Math.ceil(a)}}function ys(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,o=0,r;for(;r=n.exec(e);)o+=parseFloat(r[1])||0;let i=Math.ceil(o*2);return{top:i,right:i,bottom:i,left:i}}function bs(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 ws(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,r=0,i=0,s=0,a=!1;for(let l of n){a=!0;let f=l.match(/-?\d+(?:\.\d+)?px/gi)?.map(g=>parseFloat(g))||[],[c=0,u=0,d=0]=f,y=Math.abs(c)+d,m=Math.abs(u)+d;r=Math.max(r,y+Math.max(c,0)),s=Math.max(s,y+Math.max(-c,0)),i=Math.max(i,m+Math.max(u,0)),o=Math.max(o,m+Math.max(-u,0))}return{bleed:{top:H(o),right:H(r),bottom:H(i),left:H(s)},has:a}}function om(t){let e=ms(t),n=gs(t),o=ys(t),r=bs(t),i=ws(t);return{top:Math.max(e.top,n.top)+o.top+r.top+i.bleed.top,right:Math.max(e.right,n.right)+o.right+r.right+i.bleed.right,bottom:Math.max(e.bottom,n.bottom)+o.bottom+r.bottom+i.bleed.bottom,left:Math.max(e.left,n.left)+o.left+r.left+i.bleed.left}}function rm(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 Kc(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 xs(t,e,n,o=1,r=1){let i=0,s=0,a=0,l=0,f=Kc(n.get(t)||W(t));if(f.x&&f.y)return{top:0,right:0,bottom:0,left:0};let c=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||!rm(d))continue;let y=om(d);if(!(y.top||y.right||y.bottom||y.left))continue;let m=u.getBoundingClientRect(),g={left:m.left-y.left/o,top:m.top-y.top/r,right:m.right+y.right/o,bottom:m.bottom+y.bottom/r};for(let p=u.parentElement;p;p=p.parentElement){let h=Kc(n.get(p)||W(p));if(h.x||h.y){let w=p.getBoundingClientRect();h.x&&(g.left=Math.max(g.left,w.left),g.right=Math.min(g.right,w.right)),h.y&&(g.top=Math.max(g.top,w.top),g.bottom=Math.min(g.bottom,w.bottom))}if(p===t)break}f.x||(l=Math.max(l,(c.left-g.left)*o),s=Math.max(s,(g.right-c.right)*o)),f.y||(i=Math.max(i,(c.top-g.top)*r),a=Math.max(a,(g.bottom-c.bottom)*r))}return{top:Math.max(0,Math.ceil(i)),right:Math.max(0,Math.ceil(s)),bottom:Math.max(0,Math.ceil(a)),left:Math.max(0,Math.ceil(l))}}function Jc(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=Ze(t).scale}catch{}try{e.style.transform="none"}catch{}if(!l)return{a:1,b:0,c:0,d:1};let f=Ee({scale:l});return{a:f.a,b:f.b,c:f.c,d:f.d}}function r(l,f,c,u){let d=Math.sqrt(l*l+f*f)||0,y=0,m=0;if(d>0){let g=l/d,p=f/d;y=g*c+p*u;let h=c-g*y,w=u-p*y;m=Math.sqrt(h*h+w*w)||0,m>0?y=y/m:y=0}return{a:d,b:0,c:y*m,d:m}}let i=l=>{let f=Ze(t).scale;if(!f)return l;let c=Ee({scale:f,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(f=>parseFloat(f.trim()));if(l.length===6&&l.every(Number.isFinite)){let[f,c,u,d]=l,y=r(f,c,u,d);try{e.style.transform=`matrix(${y.a}, ${y.b}, ${y.c}, ${y.d}, 0, 0)`}catch{}return i(y)}}let a=o.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let l=a[1].split(",").map(f=>parseFloat(f.trim()));if(l.length===16&&l.every(Number.isFinite)){let f=l[0],c=l[1],u=l[4],d=l[5],y=r(f,c,u,d);try{e.style.transform=`matrix(${y.a}, ${y.b}, ${y.c}, ${y.d}, 0, 0)`}catch{}return i(y)}}try{let l=new DOMMatrix(o),f=r(l.a,l.b,l.c,l.d);try{e.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return i(f)}catch{return null}}function Rn(t,e,n,o,r){let i=n.a,s=n.b,a=n.c,l=n.d,f=n.e||0,c=n.f||0;function u(h,w){let b=h-o,x=w-r,v=i*b+a*x,C=s*b+l*x;return v+=o+f,C+=r+c,[v,C]}let d=[u(0,0),u(t,0),u(0,e),u(t,e)],y=1/0,m=1/0,g=-1/0,p=-1/0;for(let[h,w]of d)hg&&(g=h),w>p&&(p=w);return{minX:y,minY:m,maxX:g,maxY:p,width:g-y,height:p-m}}function bo(t,e,n){let o=(t.transformOrigin||"0 0").trim().split(/\s+/),[r,i]=[o[0]||"0",o[1]||"0"],s=(a,l)=>{let f=a.toLowerCase();return f==="left"||f==="top"?0:f==="center"?l/2:f==="right"||f==="bottom"?l:f.endsWith("px")?parseFloat(f)||0:f.endsWith("%")?(parseFloat(f)||0)*l/100:/^-?\d+(\.\d+)?$/.test(f)&&parseFloat(f)||0};return{ox:s(r,e),oy:s(i,n)}}function Ze(t){let e={rotate:"0deg",scale:null,translate:null},n=null;try{n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null}catch{}if(n){let r=l=>{try{return typeof n.has=="function"&&!n.has(l)||typeof n.get!="function"?null:n.get(l)}catch{return null}},i=r("rotate");if(i)if(i.angle){let l=i.angle;e.rotate=l.unit==="rad"?l.value*180/Math.PI+"deg":l.value+l.unit,i.is2D===!1&&i.x&&i.y&&i.z&&(e.rotate=`${i.x.value} ${i.y.value} ${i.z.value} ${e.rotate}`)}else i.unit?e.rotate=i.unit==="rad"?i.value*180/Math.PI+"deg":i.value+i.unit:e.rotate=String(i);else{let l=getComputedStyle(t);e.rotate=l.rotate&&l.rotate!=="none"?l.rotate:"0deg"}let s=r("scale");if(s){let l=f=>f&&f.value!=null?`${f.value}${f.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=r("translate");if(a){let l=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":f.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}function im(){if(hs?.isConnected)return hs;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),it(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),hs=t,t}function Ee(t){let e=i=>{let s=[],a=0,l=0,f=String(i).trim();for(let c=0;cl&&s.push(f.slice(l,c)),l=c+1);return li&&i!=="none",o=[];if(n(t.translate)){let i=e(t.translate);for(let s=0;s<2&&s2?`translate3d(${i.join(",")})`:`translate(${i.join(",")})`)}if(n(t.rotate)&&t.rotate!=="0deg"){let i=e(t.rotate);i.length===4?o.push(`rotate3d(${i.join(",")})`):i.length===2&&/^[xyz]$/i.test(i[0])?o.push(`rotate${i[0].toUpperCase()}(${i[1]})`):o.push(`rotate(${i.join(" ")})`)}if(n(t.scale)){let i=e(t.scale).map(s=>/%$/.test(s)?String(parseFloat(s)/100):s);o.push(i.length>2?`scale3d(${i.join(",")})`:`scale(${i.join(",")})`)}if(n(t.baseTransform)&&o.push(t.baseTransform),!o.length)return new DOMMatrix;let r=o.join(" ");try{if(r.includes("%"))throw new Error("Transform needs a reference box");return new DOMMatrix(r)}catch{let i=im(),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",r,"important"),!s.style.transform)throw new Error("[SnapDOM] Couldn't read the transform of an element.");i.appendChild(s);try{return sm(s)}finally{s.remove()}}}function wr(t){let e=W(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 r=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",i=e.scale&&e.scale!=="none"&&e.scale!=="1",s=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(r||i||s)}function sm(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}var hs,wo=ct(()=>{"use strict";Re();Ve();wt();hs=null});function xr(t,e){if(!e)return null;let n=t.ownerDocument||document,o=n.defaultView||window,r,i,s,a;if(e==="viewport")r=0,i=0,s=n.documentElement?.clientWidth||o.innerWidth,a=n.documentElement?.clientHeight||o.innerHeight;else if(typeof e=="object")r=(Number(e.x)||0)-(o.scrollX||0),i=(Number(e.y)||0)-(o.scrollY||0),s=Number(e.width),a=Number(e.height);else return null;return s>0&&a>0?{left:r,top:i,width:s,height:a,right:r+s,bottom:i+a}:null}function xo(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return We(e)?e.host:null}function am(t,e){for(let n=e;n;n=xo(n))if(n===t)return!0;return!1}function lm(t,e){for(let n=xo(t);n&&n!==e&&n?.nodeType===1;n=xo(n)){let o=W(n);if(o.position!=="static"||vs(o))return n}return null}function vs(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||"")}function of(t,e,n,o,r,i){if(t.scrollTop||t.scrollLeft)return;let s=o.get(t)||W(t);if(vs(s))return;let a=s.position!=="static",l=new Map;for(let[f,c]of e){let u=n.get(f);if(!u)continue;let d=l.get(u);if(d===void 0&&l.set(u,d=cm.exec(u)?.[1]||""),!d||d==="absolute"&&a||ks.has(f))continue;let y=!1;for(let h=xo(c);h&&h!==t&&h.nodeType===1;h=xo(h)){let w=o.get(h)||W(h);if(d==="absolute"&&w.position!=="static"||vs(w)){y=!0;break}}if(y)continue;let m=o.get(c)||W(c),g=parseFloat(m.left),p=parseFloat(m.top);r&&Number.isFinite(g)&&(f.style.left=`${g+r}px`),i&&Number.isFinite(p)&&(f.style.top=`${p+i}px`)}}function Ms(t,e){try{return Ee({baseTransform:t,rotate:e?.rotate,scale:e?.scale})}catch{return null}}function rf(t,e,n,o,r){let i=t.getBoundingClientRect();zt(e)&&W(t).position==="static"&&(e.style.position="relative");let s=[];for(let[a,l]of n){if(l?.nodeType!==1)continue;let f=a.localName==="svg"&&Ut(a)&&!Ut(l.parentNode);if(!zt(a)&&!f||l===t||!am(t,l))continue;let c=o.get(l)||W(l),u=c.position;if(u!=="fixed"&&u!=="sticky"&&u!=="-webkit-sticky"||a.style.position==="absolute")continue;let d=l.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;ks.add(a);let y=c.transform&&c.transform!=="none"?c.transform:"",m=Ze(l),g=!!(y||m.rotate!=="0deg"||m.scale||m.translate),p=g?Ms(y,m):null,h=!p||!p.is2D||p.a===1&&p.b===0&&p.c===0&&p.d===1,w=d.width,b=d.height;h||(w=l.offsetWidth||d.width,b=l.offsetHeight||d.height);let x=l.getRootNode&&We(l.getRootNode()),v=i,C=t.clientLeft||0,A=t.clientTop||0;if(x){let R=lm(l,t);R&&(v=R.getBoundingClientRect(),C=R.clientLeft||0,A=R.clientTop||0)}let M=d.left-v.left-C,k=d.top-v.top-A;if(g)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",h)a.style.transform="none";else{a.style.transform=`matrix(${p.a},${p.b},${p.c},${p.d},0,0)`;let{ox:R,oy:F}=bo(c,w,b),N=Rn(w,b,{a:p.a,b:p.b,c:p.c,d:p.d,e:0,f:0},R,F);M-=N.minX,k-=N.minY}if(u!=="fixed"){let R=a.cloneNode(!1);R.setAttribute("data-snap-ph","1"),R.style.position="static",R.style.visibility="hidden",R.style.width=`${w}px`,R.style.height=`${b}px`,R.style.boxSizing="border-box",a.parentElement?.insertBefore(R,a)}let S=f?w:w+2,E=b;r&&(Math.abs(k-r.y)<.5&&(k-=1,E+=1),Math.abs(M-r.x)<.5&&(M-=1,S+=1)),a.style.position="absolute",a.style.left=`${M}px`,a.style.top=`${k}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${S}px`,a.style.height=`${E}px`,a.style.boxSizing="border-box",x||s.push(a)}for(let a of s)e.appendChild(a)}function sf(t,e,n={}){if(!t||!e||!e.style)return;let o=getComputedStyle(t);try{e.style.boxShadow="none"}catch(s){U(n,"Couldn't remove the root box-shadow.",s)}try{e.style.textShadow="none"}catch(s){U(n,"Couldn't remove the root text-shadow.",s)}try{e.style.outline="none"}catch(s){U(n,"Couldn't remove the root outline.",s)}let i=(o.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=i.length?i:"none"}catch(s){U(n,"Couldn't remove the root drop-shadow filter.",s)}}function af(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 Ss(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 lf(t,e){let n=Array.from(t.childNodes),o=e==="top"?n:n.reverse();for(let r of o){if(r.nodeType===Node.TEXT_NODE){if(/\S/.test(r.textContent||""))return null;continue}if(r.nodeType!==Node.ELEMENT_NODE)continue;let i=getComputedStyle(r),s=String(i.display||"");if(s!=="none"){if(s==="contents"){let a=lf(r,e);if(a!==void 0)return a;continue}if(!(i.position==="absolute"||i.position==="fixed"))return i.float&&i.float!=="none"||s.startsWith("inline")?null:r}}}function Je(t,e,n,o=null){let r=[];if(!t)return r;let i=getComputedStyle(t);if(t===t.ownerDocument?.documentElement)return e?.style&&!Ss(i)&&(e.style.display="flow-root"),r;if(Ss(i))return r;for(let s of["top","bottom"]){let a=s==="top"?"Top":"Bottom";if(s==="bottom"&&r.push(null),(parseFloat(i[`border${a}Width`])||0)>0||(parseFloat(i[`padding${a}`])||0)>0)continue;let l=t,f=e;for(;l;){let c=lf(l,s);if(!c)break;let u=f?n?Array.from(f.children).find(m=>n.get(m)===c)||o?.get(c)||null:f.children[Array.from(l.children).indexOf(c)]||null:null,d=getComputedStyle(c);if((parseFloat(d[`margin${a}`])||0)>0&&(r.push(c),u?.style&&(u.style[`margin${a}`]="0px")),Ss(d)||(parseFloat(d[`border${a}Width`])||0)>0||(parseFloat(d[`padding${a}`])||0)>0)break;l=c,f=u}}return r}function dm(t,e){if(!um.test(t)||t==="xmlns")return!0;if(t.includes(":")){let n=t.split(":",1)[0];if(!fm.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}function Sr(t,e={}){if(!t)return;let{stripFrameworkDirectives:n=!0}=e,o=new Map,r=l=>{for(let f of l.getAttributeNames()){let c=o.get(f);if(c===void 0&&o.set(f,c=dm(f,n)),c){l.removeAttribute(f);continue}let u=l.getAttribute(f);if(u===null||hm.test(u)||!Qc.test(u))continue;let d=tf(u);if(d!==u)try{l.setAttribute(f,d)}catch{}}};t.nodeType===Node.ELEMENT_NODE&&r(t);let i=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),a;for(;a=s.nextNode();)if(a.nodeType===Node.ELEMENT_NODE)r(a);else if(a.nodeType===Node.COMMENT_NODE)i.push(a);else{let l=a.data;if(Qc.test(l)){let f=tf(l);f!==l&&(a.data=f)}}for(let l of i)l.remove()}function mm(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}function ym(t){return Ut(t)||gm.has(t?.localName)}function bm(t,e){if(t?.nodeType!==1||mm(t)||ym(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 cf(t,e,n=new Map,o=null){function r(i,s){if(i?.nodeType!==1||s?.nodeType!==1)return;let a=[];if(o){let c=u=>{for(let d of u.children){let y=o.get(d);y?y.nodeType===1&&a.push([y,d]):c(d)}};c(s)}else{let c=i.children,u=s.children;for(let d=0;d(o?a.length:s.childElementCount),f=n.get(i)||getComputedStyle(i);if(n.has(i)||n.set(i,f),l&&bm(i,f)){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=f.overflowY||f.overflowBlock||"visible",u=f.overflowX||f.overflowInline||"visible";(c!=="visible"||u!=="visible")&&(s.style.overflow="visible")}for(let[c,u]of a)r(c,u)}r(t,e)}function wm(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function xm(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){U(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){U(e,"Your exclude function threw; ignored.",o)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){U(e,"Your filter function threw; ignored.",n)}return!1}function As(t,e){let n=getComputedStyle(t),o=t.getBoundingClientRect(),r=1/0,i=-1/0,s=!1,a=Array.from(t.children);for(let y of a){if(xm(y,e)||!wm(y))continue;let m=y.getBoundingClientRect(),g=m.top-o.top,p=m.bottom-o.top;p<=g||(gi&&(i=p),s=!0)}let l=s?Math.max(0,i-r):0,f=parseFloat(n.borderTopWidth)||0,c=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,d=parseFloat(n.paddingBottom)||0;return f+c+u+d+l}function Es(t){let e=document.implementation.createHTMLDocument(""),n=e.importNode(t,!0);for(let o of[n,...n.querySelectorAll("*")]){let r=o.localName.includes("-");if(!zt(o)||!(r||o.hasAttribute("is")))continue;let i=e.createElement(r?"span":o.localName);for(let s of o.attributes)s.name!=="is"&&i.setAttribute(s.name,s.value);i.append(...o.childNodes),o===n?n=i:o.replaceWith(i)}return n}function So(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)}}function ff(t,e,n,o,r,i){let s=t.ownerDocument||document,a=t.getBoundingClientRect(),l=r>0&&a.width>0?a.width/r:1,f=i>0&&a.height>0?a.height/i:1;if(Math.abs(l-f)>.02)return 0;let c=s.createElement("div");it(c),c.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+r+"px!important;overflow:visible!important;visibility:hidden!important;";let u=c.attachShadow({mode:"open"});So(u,n);let d=Es(e);u.appendChild(d),s.body.appendChild(c);let y=0,m=["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],g=["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],p=(h,w,b)=>{let x=W(h),v=x.boxSizing==="border-box",C=(A,M,k)=>{let S=parseFloat(A);if(!Number.isFinite(S))return M;let E=0;if(!v)for(let F of k)E+=parseFloat(x[F])||0;let R=S+E;return Math.abs(R-M)<=.51?R:M};return{width:C(x.width,w,m),height:C(x.height,b,g)}};try{let h=d.getBoundingClientRect(),w=d.offsetWidth||r,b=d.offsetHeight||i,x=w>0&&h.width>0?h.width/w:1,v=b>0&&h.height>0?h.height/b:1,C=(A,M,k=!1)=>{let S=A.children,E=M.children,R=Math.min(S.length,E.length);for(let F=0;F0&&B.height>0){let D=P.getBoundingClientRect(),z=B.width/l,$=B.height/f,T=D.width,L=D.height,I=_.offsetWidth||z,Z=_.offsetHeight||$,Q=P.offsetWidth||T,j=P.offsetHeight||L,q=Math.abs(z-I)>Fn||Math.abs($-Z)>Fn||Math.abs(T-Q)>Fn||Math.abs(L-j)>Fn;if(O){let et=p(P,Q,j);z=T>0?z*x*et.width/T:z,$=L>0?$*v*et.height/L:$,T=et.width,L=et.height}else if(q){let et=p(_,I,Z),ht=p(P,Q,j);z=et.width,$=et.height,T=ht.width,L=ht.height}let V=T-z,gt=L-$;(Math.abs(V)>Fn||Math.abs(gt)>Fn)&&(N.style.boxSizing="border-box",N.style.width=`${H(z)}px`,N.style.height=`${H($)}px`,y++)}}C(N,P,O)}};C(e,d)}finally{c.remove()}return y}function Cs(t,e=new Set){let n="";if(!t)return n;for(let o=0;oef.test(f));l.length`${a*u/100}px`),f=parseFloat(i==="x"?n.width:n.height);e.style.setProperty(r,Number.isFinite(f)?`${r.slice(0,3)}(${l}, ${f}px)`:l)}}function km(t,e){let n=t.ownerDocument,o=n.documentElement,r={w:o.clientWidth,h:o.clientHeight};if(e.position==="fixed")return r;if(e.position==="absolute"){let l=t.offsetParent;return!l||(l===n.body||l===o)&&getComputedStyle(l).position==="static"?r:{w:l.clientWidth,h:l.clientHeight}}let i=t.parentElement;if(!i)return r;let s=getComputedStyle(i),a=l=>parseFloat(s.getPropertyValue(l))||0;return{w:i.clientWidth-a("padding-left")-a("padding-right"),h:i.clientHeight-a("padding-top")-a("padding-bottom")}}var ks,cm,fm,um,pm,Qc,tf,hm,gm,H,Fn,ef,nf,Cm,Re=ct(()=>{"use strict";xt();Kt();Ot();wt();ne();wo();ks=new WeakSet;cm=/(?:^|;)position:(absolute|fixed)(?:;|$)/;fm=new Set(["xml","xlink"]),um=/^[A-Za-z_:][\w.:-]*$/;pm=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/g,Qc=/[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/,tf=t=>t.replace(pm,e=>e.length===2?e:""),hm=/^data:[^,]{0,120};base64,/;gm=new Set(["img","canvas","video","iframe","object","embed"]);H=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t;Fn=.75;ef=/::-(?:webkit-(?:scrollbar|meter|progress|slider)|moz-(?:meter|progress))/i;nf=new WeakMap;Cm=[["max-width","x"],["min-width","x"],["max-height","y"],["min-height","y"]]});var ru={};le(ru,{detectDrawApi:()=>ou,tryCanvasEngine:()=>Cy});function ou(){try{let t=document.createElement("canvas").getContext("2d");if(t&&typeof t.drawElementImage=="function")return"drawElementImage"}catch{}return null}function vy(t,e,n,o){let r=document.createElement("canvas");r.setAttribute("layoutsubtree",""),r.setAttribute("content","drawable"),it(r),r.style.cssText="position:fixed;top:0;left:0;z-index:-2147483647;pointer-events:none";let i=document.createElement("div");i.setAttribute("drawable",""),i.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${n}px;height:${o}px`;let s=i.attachShadow({mode:"open"});return So(s,e),s.appendChild(t),r.appendChild(i),{canvas:r,wrapper:i}}async function Cy(t,e,n){let o=ou();if(!o)return null;let r=t.element,i=t.clone;if(!r||!i)return null;let s=r.ownerDocument||document;if(!r.isConnected||s!==document||r===s.body||r===s.documentElement||r.scrollTop||r.scrollLeft||e.outerShadows||e.clip||e.excludeMode==="remove"||typeof e.filter=="function"&&e.filterMode==="remove"||e.width!=null||e.height!=null)return null;try{for(let C=r;C;C=C.assignedSlot||C.parentElement||C.getRootNode?.().host){let A=getComputedStyle(C);if(A.transform&&A.transform!=="none"||A.rotate&&A.rotate!=="none"||A.scale&&A.scale!=="none"||A.translate&&A.translate!=="none"||C===r&&A.filter&&A.filter!=="none")return null;let M=A.getPropertyValue("zoom");if(M&&Number.isFinite(parseFloat(M))&&Math.abs(parseFloat(M)-1)>1e-4)return null}}catch{return null}let a=r.getBoundingClientRect(),l=Math.max(1,a.width||r.offsetWidth||1),f=Math.max(1,a.height||r.offsetHeight||1),c=r.offsetWidth||Math.ceil(l),u=r.offsetHeight||Math.ceil(f),d=Number.isFinite(e.scale)&&e.scale>0?e.scale:1,y=Number.isFinite(e.dpr)&&e.dpr>0?e.dpr:window.devicePixelRatio||1,m=Math.max(1,Math.round(c*d*y)),g=Math.max(1,Math.round(u*d*y)),p=(t.scrollbarCSS||"")+(t.baseCSS||"")+(t.fontsCSS||"")+(t.classCSS||""),{canvas:h,wrapper:w}=vy(i,p,l,f);h.width=m,h.height=g,document.body.appendChild(h);let b;try{h.getBoundingClientRect(),await new Promise(S=>{requestAnimationFrame(()=>setTimeout(S,0)),setTimeout(S,50)});let C=h.getContext("2d"),A=C&&C[o];if(typeof A!="function")return null;C.save(),C.scale(y*d,y*d),A.call(C,w,0,0,l,f),C.restore();let M;try{M=C.getImageData(0,0,Math.min(64,m),Math.min(64,g)).data}catch{return U(e,`html-in-canvas: ${o} tainted the canvas; used the SVG engine.`),null}let k=!1;for(let S=3;S0){k=!0;break}if(!k){let S=C.getImageData(0,0,m,g).data,E=!1;for(let R=3;R0){E=!0;break}if(!E)return null}b=document.createElement("canvas"),b.width=m,b.height=g,b.getContext("2d").drawImage(h,0,0),b.style.width=`${c*d}px`,b.style.height=`${u*d}px`}catch(C){return U(e,"html-in-canvas: the browser couldn't paint it; used the SVG engine.",C),null}finally{try{h.remove()}catch{}}let x=Object.freeze({w0:l,h0:f,vbW:c,vbH:u,targetW:l,targetH:f,contentX:0,contentY:0,clip:null});Object.defineProperty(e,"meta",{value:x,enumerable:!0,writable:!1,configurable:!0}),n.artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},t.clone=t.nodeMap=t.styleCache=t.svgString=null;let v=[...document.querySelectorAll("#snapdom-sandbox")].find(Vt);return v&&v.style.position==="absolute"&&v.remove(),b}var iu=ct(()=>{"use strict";At();wt();Re()});var Lu={};le(Lu,{cropSvgText:()=>Dn,decodeSvgFromDataURL:()=>he,encodeSvgToDataURL:()=>zn,isSvgDataURL:()=>Eo,patchSvgHeader:()=>Ro,peekSvgHeader:()=>Bn,zoomSvgText:()=>la});function Dn(t,e,{shiftContent:n=K()}={}){let o=["x","y","width","height"].map(k=>Number(e?.[k]));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 r=t.match(/]*>/i);if(!r)throw new Error("[SnapDOM] Only SVG captures can be cropped.");let i=r[0],s=(i.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,f,c,u]=a,d=Math.max(l,o[0]),y=Math.max(f,o[1]),m=Math.min(l+c,o[0]+o[2]),g=Math.min(f+u,o[1]+o[3]);if(!(m>d)||!(g>y))throw new RangeError("[SnapDOM] The crop area does not intersect the capture.");let p=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),h=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]),w=Number.isFinite(p)&&p>0?p/c:1,b=Number.isFinite(h)&&h>0?h/u:1,x=Math.max(1,(m-d)*w),v=Math.max(1,(g-y)*b),C=i.replace(/(\bwidth=")[^"]*/i,`$1${x}`).replace(/(\bheight=")[^"]*/i,`$1${v}`),A=n?Zy(t,i,d,y):null;if(A)return C.replace(/(\bviewBox=")[^"]*/i,(S,E)=>`${E}0 0 ${m-d} ${g-y}`)+A.slice(i.length);let M=C.replace(/(\bviewBox=")[^"]*/i,`$1${d} ${y} ${m-d} ${g-y}`);return t.replace(i,M)}function Zy(t,e,n,o){if(!t.startsWith(e))return null;let r=/^\s*]*>/i.exec(t.slice(e.length,e.length+2048));if(!r)return null;let i=r[0],s=(f,c,u)=>{let d=new RegExp(`(\\s${c}=")([^"]*)`),y=f.match(d),m=y?parseFloat(y[2]):0;return Number.isFinite(m)?y?f.replace(d,(g,p)=>`${p}${m-u}`):f.replace(/^(\s*`${p} ${c}="${-u}"`):null},a=s(i,"x",n),l=a&&s(a,"y",o);return l?e+l+t.slice(e.length+i.length):null}function la(t,e,n){let o=t.match(/]*>/i);if(!o)return null;let r=o[0],i=String((r.match(/\bviewBox="([^"]+)"/i)||[])[1]||"").trim().split(/[\s,]+/).map(Number);if(i.length!==4||!i.every(Number.isFinite)||i[2]<=0||i[3]<=0)return null;let s=Math.min(e/i[2],n/i[3]),a=/^\s*]*>/i.exec(t.slice(r.length,r.length+2048));if(!a)return null;let l=a[0],f={x:(e-s*i[2])/2,y:(n-s*i[3])/2};for(let p of["x","y","width","height"]){let h=new RegExp(`(\\s${p}=")([^"]*)`),w=l.match(h),b=w?parseFloat(w[2]):0;if(!Number.isFinite(b))return null;let x=b*s+(f[p]||0);l=w?l.replace(h,(v,C)=>`${C}${x}`):l.replace(/^(\s*`${C} ${p}="${x}"`)}let c=t.slice(r.length+a[0].length),u=c.indexOf(""),d=/]*?( style=")([^"]*)"/i.exec(c.slice(u<0?0:u));if(!d)return null;let y=(u<0?0:u)+d.index,m=c.slice(0,y)+d[0].slice(0,-1)+`;zoom:${s} !important"`+c.slice(y+d[0].length);return r.replace(/(\bwidth=")[^"]*/i,`$1${e}`).replace(/(\bheight=")[^"]*/i,`$1${n}`).replace(/(\bviewBox=")[^"]*/i,`$10 0 ${e} ${n}`)+l+m}function Eo(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function he(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function Bn(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 Ro(t,e){let n=t.indexOf(",")+1,o=Bn(t).match(/]*>/i)?.[0],r=o&&encodeURIComponent(o);return!r||!t.startsWith(r,n)?null:t.slice(0,n)+encodeURIComponent(e(o))+t.slice(n+r.length)}function zn(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}var Fo=ct(()=>{"use strict";pt()});function _u(t){let e=[],n="",o=0;for(let r=0;rr.trim()).filter(Boolean)}function Jy(t){let e=[],n="",o=0;for(let i=0;i`${a}:${l}`).join(";")}function Qy(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,o)=>`${n}{${Iu(o)}}`)}function tb(t){return t=t.replace(/]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,()=>Qy(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,o)=>`style=${n}${Iu(o)}${n}`),t}function eb(){return oi||(oi=(async()=>{try{let t='
',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 r=o.getImageData(2,18,1,1).data[3]>128,i=o.getImageData(2,2,1,1).data[3]>128;return{native:r||i,flippedY:i&&!r}}catch{return{native:!1,flippedY:!1}}})(),oi)}function nb(t){let e=[],n=0,o=0;for(let r=0;r{let i=0,s=0,a="",l=0;for(;l_u(o).map(r=>{let i=r.indexOf(":");if(i<0)return r;let s=r.slice(0,i).trim().toLowerCase();return s==="text-shadow"||e&&s==="box-shadow"?`${s}:${nb(r.slice(i+1))}`:r}).join(";");return t=t.replace(/]*>([\s\S]*?)<\/style>/gi,(o,r)=>o.replace(r,()=>r.replace(/([^{}]+)\{([^}]*)\}/g,(i,s,a)=>`${s}{${n(a)}}`))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(o,r,i)=>`style=${r}${n(i)}${r}`),t}async function ri(t){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(t))return{svg:t,naturalOnly:!1};let{native:n,flippedY:o}=await eb();try{let r=t;return n||(r=tb(r)),o&&(r=ob(r,n)),{svg:r,naturalOnly:!0}}catch{return{svg:t,naturalOnly:!0}}}var oi,ca=ct(()=>{"use strict";oi=null});var Uu={};le(Uu,{MAX_RASTER_AREA:()=>$e,MAX_RASTER_SIDE:()=>Qt,WEBP_MAX_SIDE:()=>pa,__setDecodeFrameIdleMs:()=>ab,toCanvas:()=>me});function Ou(t,e,n){try{let o=t.match(/]*>/i);if(!o)return t;let r=o[0],i=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),s=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(i)||!Number.isFinite(s)||i<=0||s<=0)return t;let a=Math.min(1,Qt/i,Qt/s,Math.sqrt($e/(i*s)));if(a>=1)return t;let l=Math.max(1,Math.floor(i*a)),f=Math.max(1,Math.floor(s*a));return at(n,"raster-clamp",`capture ${Math.round(i)}x${Math.round(s)}px exceeds decode limits; downscaled to ${l}x${f}px`),U(e,`${Math.round(i)}\xD7${Math.round(s)}px is too large for the browser to draw; scaled down to ${l}\xD7${f}px. For full size, export ${typeof CompressionStream=="function"?"a PNG or JPEG":"a JPEG"} blob, an SVG, or crop.`),t.replace(r,r.replace(/(\bwidth=")[\d.]+/i,`$1${l}`).replace(/(\bheight=")[\d.]+/i,`$1${f}`))}catch{return t}}function rb(t,e,n){let o=t.naturalWidth,r=t.naturalHeight,i=Math.min(8,r),s=document.createElement("canvas");s.width=Math.max(1,Math.ceil(o*e)),s.height=Math.max(1,Math.ceil(i*6*n));let a=s.getContext("2d",{willReadFrequently:!0});return!a||!(o>0&&r>0)?null:()=>{a.clearRect(0,0,s.width,s.height);for(let u=0;u<6;u++){let d=Math.floor((r-i)*u/5);a.drawImage(t,0,d,o,i,0,u*i*n,o*e,i*n)}let l=a.getImageData(0,0,s.width,s.height).data,f=!1,c=0;for(let u=3;u0&&(f=!0),c=c*31+l[u-3]+l[u-2]*7+l[u-1]*13+l[u]|0;return{ink:f,sig:c}}}async function ib(t,e,n){it(t),t.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(t);try{if(!n)return await ii(),await ii(),!1;let o=performance.now()+(e?600:150),r=null;for(;;){let i;try{i=n()}catch{return!1}if(i.ink&&(!e||i.sig===r))return!0;if(r=i.sig,performance.now()>o)return i.ink;await ii()}}finally{try{t.remove()}catch{}}}function ai(){clearTimeout(ha),Te?.remove(),Te=null,si=0}function ab(t){zu=t??Bu}function Wu(t){if(typeof document>"u"||!document.body)return new Image;if(clearTimeout(ha),Te&&!Te.contentDocument&&ai(),Te&&si>sb&&To===0&&ai(),!Te){let n=document.createElement("iframe");it(n),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;left:-9999px;top:0;width:0;height:0;border:0;visibility:hidden;pointer-events:none";try{document.body.appendChild(n)}catch{}if(n.contentDocument)Te=n,si=0;else{try{n.remove()}catch{}return new Image}}si+=t.length,To+=1;let e=Te.contentDocument.createElement("img");return e.__snapdomDecodeFrame=!0,e}function ua(t,e=!1){!t||!t.__snapdomDecodeFrame||(t.__snapdomDecodeFrame=!1,To=Math.max(0,To-1),e&&(fa=!0),!(To>0)&&(fa?(fa=!1,ai()):ha=setTimeout(ai,zu)))}function Du(t,e){return t.loading="eager",t.decoding="sync",t.crossOrigin="anonymous",t.src=e,t.decode()}function db(t){if(typeof t!="string")return!1;let e=t.indexOf(",")+1,n=Math.max(48,Math.floor((t.length-e)/200)),o=0,r=0;for(let i=e;i+48<=t.length;i+=n){let s=t.slice(i,i+48);o++,ub.some(a=>s.includes(a))||r++}return r*2>o}function da(t,e,n,o,r){if(!e.naturalWidth){t.drawImage(e,0,0,n,o);return}let i=n*o,s=i>lb&&!db(r)?Math.min(fb,Math.ceil(i/cb)):1;if(s===1){t.drawImage(e,0,0,n,o);return}let a=e.naturalWidth,l=e.naturalHeight/o;for(let f=0;f]*>/i)||[])[0]||"",p=parseFloat((g.match(/\bwidth="([\d.]+)/i)||[])[1]),h=parseFloat((g.match(/\bheight="([\d.]+)/i)||[])[1]),w=Number.isFinite(p)&&Number.isFinite(h)&&p>0&&h>0&&Math.min(1,Qt/p,Qt/h,Math.sqrt($e/(p*h)))<1,b=K();if(f||w||b)try{let x=!b&&Ro(t,v=>Ou(f?Dn(v,f,{shiftContent:!1}):v,e,n));if(x)u=x;else{let v=he(t);if(f&&(v=Dn(v,f)),b){let C=await ri(v);v=C.svg,d=C.naturalOnly,y=/@font-face|data:image\//i.test(v)}(w||f)&&(v=Ou(v,e,n)),u=zn(v)}}catch(x){if(f)throw x;u=t}}let m=c||Wu(u);try{c||await Du(m,u)}catch(g){if(!m.__snapdomDecodeFrame)throw g;let p=m;m=Wu(u),ua(p);try{await Du(m,u)}catch(h){throw ua(m,n.retireDecodeFrame),h}}try{!c&&!K()&&Eo(u)&&(rt()?/.data(?:%3A|:)image(?:%2F|\/)svg/i:/(?:%40|@)font-face/i).test(u)&&await new Promise(T=>{let L=new MessageChannel;L.port1.onmessage=()=>{L.port1.close(),L.port2.close(),T()},L.port2.postMessage(0)});let g=c?c.width:m.naturalWidth,p=c?c.height:m.naturalHeight,h=f?g:Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:g,w=f?p:Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:p,b,x,v=Number.isFinite(o),C=Number.isFinite(r);if(v&&C)b=Math.max(1,o),x=Math.max(1,r);else if(v){let T=o/Math.max(1,h);b=o,x=w*T}else if(C){let T=r/Math.max(1,w);x=r,b=h*T}else{let T=c&&Number.isFinite(a.vbW)&&Number.isFinite(a.vbH);b=T?a.vbW:g,x=T?a.vbH:p}!v&&!C&&(b=b*i,x=x*i);let A=b*s,M=x*s,k=Math.max(A/Qt,M/Qt,Math.sqrt(A*M/$e)),S=n.codec==="webp"?Math.max(A,M)/pa:0,E=Math.max(k,S);if(E>1){let T=k<=1;at(n,"canvas-clamp",`output ${Math.round(A)}x${Math.round(M)}px exceeds ${T?"WebP":"canvas"} limits; downscaled`),U(e,T?`${Math.round(A)}\xD7${Math.round(M)}px is larger than WebP can encode (${pa}px per side); scaled down. For full size, export a PNG, an SVG, or crop.`:`${Math.round(A)}\xD7${Math.round(M)}px is larger than a canvas allows; scaled down. For full size, export ${typeof CompressionStream=="function"?"a PNG or JPEG":"a JPEG"} blob, an SVG, or crop.`),b/=E,x/=E}let R=zt(e.canvas)&&be(e.canvas,"canvas")?e.canvas:document.createElement("canvas");R.width=Math.max(1,b*s),R.height=Math.max(1,x*s),R.style.width=`${b}px`,R.style.height=`${x}px`;let F=R.getContext("2d");if(!F)throw new Error("[SnapDOM] The canvas you passed has no 2D context (is it already used for WebGL?).");let N=null,P=n.layoutZoom||1;if(!c&&rt()){let T=P*h/(b*s),L=Math.round(b*s*T),I=Math.round(x*s*T);T>1.01&&L<=Qt&&I<=Qt&&L*I<=$e&&(N={w:L,h:I})}let _=d&&(Math.round(b*s)!==g||Math.round(x*s)!==p),O=_?g:N?N.w:b*s,B=_?p:N?N.h:x*s,D=K()&&!c?rb(m,O/Math.max(1,g),B/Math.max(1,p)):null,z=!1;D&&(z=await ib(m,y,D));let $=()=>{if(F.save(),s!==1&&F.scale(s,s),l&&(F.save(),F.fillStyle=l,F.fillRect(0,0,b,x),F.restore()),_){let T=document.createElement("canvas");T.width=g,T.height=p,da(T.getContext("2d"),m,g,p,u),F.drawImage(T,0,0,b,x)}else{if(F.save(),F.setTransform(1,0,0,1,0,0),N){let T=document.createElement("canvas");for(T.width=N.w,T.height=N.h,da(T.getContext("2d"),m,N.w,N.h,u);T.width>b*s*2;){let L=document.createElement("canvas");L.width=Math.ceil(T.width/2),L.height=Math.ceil(T.height/2),L.getContext("2d").drawImage(T,0,0,L.width,L.height),T=L}F.imageSmoothingQuality="high",F.drawImage(T,0,0,b*s,x*s)}else da(F,m,b*s,x*s,u);F.restore()}F.restore()};if($(),D&&z&&y){let T=!0;try{T=D().ink}catch{}if(!T){let L=performance.now()+600;do{await ii();try{T=D().ink}catch{break}}while(!T&&performance.now(){"use strict";pt();At();$t();wt();Fo();ca();Qt=K()?16384:32767,$e=16384*16384,pa=16383;ii=()=>new Promise(t=>{requestAnimationFrame(t),setTimeout(t,50)});sb=24*1024*1024,Bu=5e3,Te=null,si=0,To=0,fa=!1,zu=Bu,ha=0;lb=4e6,cb=2e6,fb=8,ub=["%3C","%3E","%20","%7B","%7D","%3B"]});var $o={};le($o,{rasterize:()=>ma});async function ma(t,e,n={}){let o=await me(t,e,{...n,codec:e.format}),s=o.width*o.height<=2e6?o.toDataURL(`image/${e.format}`,e.quality):await new Promise(l=>{let f=()=>l(o.toDataURL(`image/${e.format}`,e.quality));try{o.toBlob(c=>{if(!c)return f();let u=new FileReader;u.onload=()=>l(String(u.result||"")),u.onerror=f,u.readAsDataURL(c)},`image/${e.format}`,e.quality)}catch{f()}}),a=new Image;return a.src=s,K()?await a.decode():await new Promise((l,f)=>{if(a.complete&&a.naturalWidth)return l();a.onload=l,a.onerror=f}),a.style.width=`${o.width/e.dpr}px`,a.style.height=`${o.height/e.dpr}px`,a}var Hn=ct(()=>{"use strict";Un();pt()});var ga={};le(ga,{toImg:()=>pb,toSvg:()=>pb});async function pb(t,e,n={}){let{scale:o=1,width:r,height:i,meta:s={}}=e,a=Number.isFinite(r),l=Number.isFinite(i),f=Number.isFinite(o)&&o!==1||a||l;if(K()&&f)try{let{svg:y}=await ri(he(t)),m=(y.match(/]*>/i)||[])[0]||"",g=parseFloat((m.match(/\bwidth="([\d.]+)/i)||[])[1]),p=parseFloat((m.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(g)||!Number.isFinite(p))throw new Error("The SVG has no size.");let h=Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:g,w=Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:p,b,x;a&&l?(b=r,x=i):a?(b=r,x=Math.max(1,Math.round(w*(r/Math.max(1,h))))):l?(x=i,b=Math.max(1,Math.round(h*(i/Math.max(1,w))))):(b=Math.max(1,Math.round(g*o)),x=Math.max(1,Math.round(p*o)));let v=la(y,b,x)||y.replace(/width="[^"]*"/,`width="${b}"`).replace(/height="[^"]*"/,`height="${x}"`),C=new Image;return C.decoding="sync",C.loading="eager",C.src=zn(v),await C.decode(),C.style.width=`${b}px`,C.style.height=`${x}px`,C}catch(y){return at(n,"safari-png-fallback","Safari vector toImg failed; using PNG",y),U(e,"Safari couldn't show the SVG; used a PNG.",y),ma(t,{...e,format:"png",quality:1,meta:s},n)}let c=t,u=!1;if(!a&&!l&&o!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let y=g=>{let p=Number((g.match(/\bwidth="([\d.]+)"/i)||[])[1]),h=Number((g.match(/\bheight="([\d.]+)"/i)||[])[1]);return p>0&&h>0?(u=!0,g.replace(/\bwidth="[^"]*"/i,`width="${Math.max(1,Math.round(p*o))}"`).replace(/\bheight="[^"]*"/i,`height="${Math.max(1,Math.round(h*o))}"`)):g},m=Ro(t,y);if(m)c=m;else{let g=he(t),p=(g.match(/]*>/i)||[])[0]||"",h=y(p);u&&(c=zn(g.replace(p,h)))}}catch{}let d=new Image;d.decoding="sync",d.loading="eager",d.src=c;try{await d.decode()}catch(y){if(!u)throw y;d.src=t,u=!1,await d.decode()}if(a&&l)d.style.width=`${r}px`,d.style.height=`${i}px`;else if(a){let y=Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:d.naturalWidth,m=Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:d.naturalHeight,g=r/Math.max(1,y);d.style.width=`${r}px`,d.style.height=`${Math.max(1,Math.round(m*g))}px`}else if(l){let y=Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:d.naturalWidth,m=Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:d.naturalHeight,g=i/Math.max(1,m);d.style.height=`${i}px`,d.style.width=`${Math.max(1,Math.round(y*g))}px`}else{let y=Math.max(1,Math.round(d.naturalWidth*(u?1:o))),m=Math.max(1,Math.round(d.naturalHeight*(u?1:o)));if(d.style.width=`${y}px`,d.style.height=`${m}px`,!u&&o!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let p=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${y}"`).replace(/height="[^"]*"/,`height="${m}"`);d.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,await d.decode()}catch(g){U(e,"Couldn't size the SVG image.",g),d.src!==t&&(d.src=t,await d.decode().catch(()=>{}))}}return d}var ya=ct(()=>{"use strict";xt();At();Hn();Fo();ca()});var Vu={};le(Vu,{encodePng:()=>hb});function li(t,e=new Uint8Array(0)){let n=new Uint8Array(e.length+12),o=new DataView(n.buffer);o.setUint32(0,e.length);for(let i=0;i<4;i++)n[i+4]=t.charCodeAt(i);n.set(e,8);let r=4294967295;for(let i=4;i>>8;return o.setUint32(n.length-4,(r^4294967295)>>>0),n}async function hb(t,e,n){if(![t,e].every(g=>Number.isInteger(g)&&g>0&&g<=2147483647))throw new RangeError("[SnapDOM] PNG dimensions must be integers from 1 to 2147483647");let o=new Uint8Array(13),r=new DataView(o.buffer);r.setUint32(0,t),r.setUint32(4,e),o[8]=8,o[9]=6;let i=[new Uint8Array([137,80,78,71,13,10,26,10]),li("IHDR",o),li("sRGB",new Uint8Array([0]))],s=t*4,a=Math.max(1,Math.floor(65536/(s+1))),l=new Uint8Array(s),f=0,c=new CompressionStream("deflate"),u=c.writable.getWriter(),d=c.readable.getReader(),y,m=(async()=>{try{for(;;){let{done:g,value:p}=await d.read();if(g)return;i.push(li("IDAT",p))}}catch(g){y=g,await u.abort(g).catch(()=>{})}})();try{for await(let g of n){if(!(g instanceof Uint8Array||g instanceof Uint8ClampedArray)||!g.length||g.length%s)throw new RangeError("[SnapDOM] PNG input must contain complete RGBA rows");let p=g.length/s;if(f+p>e)throw new RangeError("[SnapDOM] PNG input exceeds the declared height");for(let h=0;h{"use strict";Hu=new Uint32Array(256);for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;Hu[t]=e}});var Qu={};le(Qu,{encodeJpeg:()=>bb});function Xu(t){let e=[0,240];for(let n=0;n<16;n++)for(let o=1;o<=10;o++)e.push(n<<4|o);return t.concat(e.filter(n=>!t.includes(n)).sort((n,o)=>n-o))}function yb(t){for(let e=0;e<64;e+=8)Zu(t,e,1);for(let e=0;e<8;e++)Zu(t,e,8)}function Zu(t,e,n){let o=t[e]+t[e+7*n],r=t[e]-t[e+7*n],i=t[e+n]+t[e+6*n],s=t[e+n]-t[e+6*n],a=t[e+2*n]+t[e+5*n],l=t[e+2*n]-t[e+5*n],f=t[e+3*n]+t[e+4*n],c=t[e+3*n]-t[e+4*n],u=o+f,d=o-f,y=i+a,m=i-a;t[e]=u+y,t[e+4*n]=u-y;let g=(m+d)*.707106781;t[e+2*n]=d+g,t[e+6*n]=d-g,u=c+l,y=l+s,m=s+r;let p=(u-m)*.382683433,h=.5411961*u+p,w=1.306562965*m+p,b=y*.707106781,x=r+b,v=r-b;t[e+5*n]=v+h,t[e+3*n]=v-h,t[e+n]=x+w,t[e+7*n]=x-w}async function bb(t,e,n,o){if(![t,e].every(P=>Number.isInteger(P)&&P>0&&P<=65535))throw new RangeError("[SnapDOM] JPEG dimensions must be integers from 1 to 65535");let r=Math.min(100,Math.max(1,Math.round((typeof o=="number"&&o>=0&&o<=1?o:.92)*100))),i=r<50?5e3/r:200-r*2,s=r<90?1:0,a=8<{let O=new Uint8Array(64),B=new Float32Array(64);for(let D=0;D<64;D++){let z=Math.min(255,Math.max(1,Math.floor((P[D]*i+50)/100)));O[Gu[D]]=z,B[D]=1/(z*qu[D>>3]*qu[D&7]*8)}return l.push(..._?[1]:[],...O),B}),c=(P,_)=>[255,P,_.length+2>>8,_.length+2&255,..._],u=[255,216,...c(224,[74,70,73,70,0,1,1,0,0,1,0,1,0,0]),...c(219,l),...c(192,[8,e>>8,e&255,t>>8,t&255,3,1,s?34:17,0,2,17,1,3,17,1]),...c(196,Ju.flatMap(([P,,_,O])=>[P,..._,...O])),...c(218,[3,1,0,2,17,3,17,0,63,0])],d=[new Uint8Array(u)],y=new Uint8Array(65536),m=0,g=0,p=0;function h(P,_){for(g=g<<_|P,p+=_;p>=8;){p-=8;let O=g>>>p&255;m>=y.length-1&&(d.push(y.subarray(0,m)),y=new Uint8Array(65536),m=0),y[m++]=O,O===255&&(y[m++]=0)}g&=(1<15;T-=16)h(D[240][0],D[240][1]);$=32-Math.clz32(Math.abs(z));let I=D[T<<4|$];h(I[0],I[1]),h((z<0?z-1:z)&(1<<$)-1,$),T=0}T&&h(D[0][0],D[0][1])}let C=t*4,A=new Uint8Array(C*a),M=new Float32Array(a*a),k=new Float32Array(64),S=new Float32Array(64),E=s?.25:1;function R(P){for(let _=0;_>s)*8+(D>>s);k[I]+=(-.168736*$-.331264*T+.5*L)*E,S[I]+=(.5*$-.418688*T-.081312*L)*E}}for(let O=0;O<(s?4:1);O++){let B=(O>>1)*128+(O&1)*8;for(let D=0;D<64;D++)w[D]=M[B+(D>>3)*a+(D&7)];v(0,0)}w.set(k),v(1,1),w.set(S),v(2,1)}}let F=0,N=0;for await(let P of n){if(!(P instanceof Uint8Array||P instanceof Uint8ClampedArray)||!P.length||P.length%C)throw new RangeError("[SnapDOM] JPEG input must contain complete RGBA rows");let _=P.length/C;if(F+_>e)throw new RangeError("[SnapDOM] JPEG input exceeds the declared height");for(let O=0;O<_;){let B=Math.min(a-N,_-O);A.set(P.subarray(O*C,(O+B)*C),N*C),N+=B,O+=B,N===a&&(R(a),N=0)}F+=_}if(F!==e)throw new RangeError("[SnapDOM] JPEG input does not match the declared height");return N&&R(N),p&&h((1<<8-p)-1,8-p),d.push(y.subarray(0,m),new Uint8Array([255,217])),new Blob(d,{type:"image/jpeg"})}var Gu,mb,gb,qu,Yu,Ju,Ku,td=ct(()=>{"use strict";Gu=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],mb=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],gb=Array.from({length:64},(t,e)=>(e&7)<4&&e<32?[17,18,24,47,18,21,26,66,24,26,56,99,47,66,99,99][(e>>3)*4+(e&7)]:99),qu=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379];Yu=[0,1,2,3,4,5,6,7,8,9,10,11],Ju=[[0,0,[0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],Yu],[16,0,[0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],Xu([1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130])],[1,1,[0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Yu],[17,1,[0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Xu([0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241])]],Ku=Ju.map(([,,t,e])=>{let n=[],o=0,r=0;for(let i=1;i<=16;i++,o<<=1)for(let s=0;s]*>/i)?.[0];if(!r)return null;let i=e.crop?Dn(r,e.crop):r,s=parseFloat(i.match(/\bwidth="([^"]+)/i)?.[1]),a=parseFloat(i.match(/\bheight="([^"]+)/i)?.[1]),l=(i.match(/\bviewBox="([^"]+)/i)?.[1]||"").trim().split(/[\s,]+/).map(Number);if(!(s>0&&a>0)||l.length!==4||!l.every(Number.isFinite)||!(l[2]>0&&l[3]>0))return null;let f=Number.isFinite(e.width),c=Number.isFinite(e.height),u=e.meta||{},d=Math.max(1,Math.floor(s)),y=Math.max(1,Math.floor(a)),m=e.crop?d:Number.isFinite(u.vbW)?u.vbW:Number.isFinite(u.w0)?u.w0:d,g=e.crop?y:Number.isFinite(u.vbH)?u.vbH:Number.isFinite(u.h0)?u.h0:y,p=e.dpr??1,h=e.scale??1,w=(f&&c?Math.max(1,e.width):f?e.width:c?e.height*m/Math.max(1,g):d*h)*p,b=(f&&c?Math.max(1,e.height):c?e.height:f?e.width*g/Math.max(1,m):y*h)*p;if(Math.max(s,a,w,b)<=Qt&&s*a<=$e&&w*b<=$e||(n==="png"?typeof CompressionStream!="function":Math.max(w,b)>=65536))return null;return x();async function x(){let v=Math.max(1,Math.floor(w)),C=Math.max(1,Math.floor(b)),A=t.indexOf(",")+1,M=encodeURIComponent(r),k=t.lastIndexOf("%3C%2Fsvg%3E"),S;if(t.startsWith(M,A)&&k>=A+M.length)S=t.slice(A+M.length,k);else{let I=he(t);S=encodeURIComponent(I.slice(I.indexOf(r)+r.length,I.lastIndexOf("")))}let E=i.match(/\bpreserveAspectRatio="([^"]*)"/i)?.[1]||"xMidYMid meet",R=s/l[2],F=a/l[3],N=0,P=0;/\bnone\b/.test(E)||(R=F=/\bslice\b/.test(E)?Math.max(R,F):Math.min(R,F),N=(s-l[2]*R)*(/xMin/.test(E)?0:/xMax/.test(E)?1:.5),P=(a-l[3]*F)*(/YMin/.test(E)?0:/YMax/.test(E)?1:.5)),N-=l[0]*R,P-=l[1]*F;let _=i.replace(/\s(?:width|height|preserveAspectRatio)="[^"]*"/gi,"").slice(0,-1),O=K()&&/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(he(t)),B=s/w,D=a/b,z=Math.max(1,Math.min(8192,Math.floor(4*1024*1024/v),O?Math.floor(2046/D):8192)),$=Math.max(1,Math.min(8192,v,O?Math.floor(2046/B):8192)),T=n!=="png";if(T&&e.backgroundColor){let I=document.createElement("canvas").getContext("2d");I.fillStyle=e.backgroundColor,I.fillRect(0,0,1,1),T=I.getImageData(0,0,1,1).data[3]<255}async function*L(){for(let I=0;I`)+S+"%3C%2Fg%3E%3C%2Fsvg%3E",J=await me(X,{width:et,height:ht,dpr:1,backgroundColor:O?null:e.backgroundColor},{warnings:o.warnings,retireDecodeFrame:!0}),Y=J;try{if(O){Y=document.createElement("canvas"),Y.width=q,Y.height=Z;let St=Y.getContext("2d");e.backgroundColor&&(St.fillStyle=e.backgroundColor,St.fillRect(0,0,q,Z)),St.drawImage(J,j*B-V,I*D-gt,q*B,Z*D,0,0,q,Z)}let Ft=Y.getContext("2d");T&&(Ft.globalCompositeOperation="destination-over",Ft.fillStyle="#000",Ft.fillRect(0,0,q,Z));let te=Ft.getImageData(0,0,q,Z).data;for(let St=0;St(ju(),Vu))).encodePng(v,C,L()):(await Promise.resolve().then(()=>(td(),Qu))).encodeJpeg(v,C,L(),e.quality)}}var ba=ct(()=>{"use strict";Un();Fo();pt()});var ed={};le(ed,{toBlob:()=>wa});async function wa(t,e,n={}){let o=e.format||e.type||"svg";if(o==="svg"){if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)throw new Error("[SnapDOM] html-in-canvas makes a raster capture, not an SVG; ask for png, jpeg or webp.");let a=Lo(decodeURIComponent(t.split(",")[1]),n.fileSvg);return new Blob([a],{type:"image/svg+xml"})}let r=o==="jpg"?"jpeg":o,i=(r==="png"||r==="jpeg")&&ci(t,e,r,n);if(i)return i;let s=await me(t,e,{...n,codec:r});return new Promise(a=>s.toBlob(l=>a(l),`image/${r}`,e.quality))}var xa=ct(()=>{"use strict";Un();ba();$t()});var od={};le(od,{download:()=>wb});async function nd(t,e){let n=new File([t],e,{type:t.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:e})}catch(o){if(o.name!=="AbortError")return!1}return!0}async function wb(t,e,n={}){let o=new Set(["png","jpeg","jpg","webp","svg"]),r=(e?.type||"").toLowerCase(),i=o.has(r)?r:"",s=(e?.format||i||"").toLowerCase(),a=s==="jpg"?"jpeg":s||"png",l=e?.filename||"snapdom",f=/\.(png|jpe?g|webp|svg)$/i.test(l)?l:`${l}.${a}`,c={...e||{},format:a,type:a};c.dpr=1;let u=Zn(),d=(a==="png"||a==="jpeg")&&ci(t,c,a,n);if(a==="svg"||d){let g=d?await d:await wa(t,{...c,type:"svg"},n);if(u&&await nd(g,f))return;let p=URL.createObjectURL(g),h=document.createElement("a");h.href=p,h.download=f,document.body.appendChild(h),h.click(),setTimeout(()=>URL.revokeObjectURL(p),1e3),h.remove();return}let y=await me(t,c,{...n,codec:a});if(u){let g=`image/${a}`,p=await new Promise(h=>y.toBlob(h,g,e?.quality));if(p&&await nd(p,f))return}let m=document.createElement("a");m.href=y.toDataURL(`image/${a}`,e?.quality),m.download=f,document.body.appendChild(m),m.click(),m.remove()}var rd=ct(()=>{"use strict";xa();Un();ba();pt()});xt();xt();pt();Ot();xt();ne();Ot();function Cl(t){return Lt(t).leaksAcrossSubtrees}function kl(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Lt(e).importantProps}function ke(t,e){let n=t.ownerDocument||document,o=t.getRootNode?t.getRootNode():n;return o===n?Qo(n,e).universe:e&&We(o)?ep(t,o,n,e):null}var vl=new WeakMap;function ep(t,e,n,o){let r=o.shadowUniverse;if(r===null)return null;if(!r){let a=Qo(n,o).universe;if(!a)return o.shadowUniverse=null;r=o.shadowUniverse={universe:new Set(a),roots:new Set}}let i=a=>{for(;We(a)&&!r.roots.has(a);a=a.host.getRootNode()){r.roots.add(a);for(let l of[...a.styleSheets,...a.adoptedStyleSheets||[]]){let f=vl.get(l);if((!f||f.epoch!==ue)&&vl.set(l,f={epoch:ue,props:Ga(l)}),!f.props)return!1;for(let c of f.props)r.universe.add(c)}Do(a.getAnimations(),r.universe)}return!0},s=i(e)&&(!t.shadowRoot||i(t.shadowRoot));for(let a=t.assignedSlot;s&&a;a=a.assignedSlot)s=i(a.getRootNode());return s?r.universe:o.shadowUniverse=null}function wn(t,e){let n=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==n?null:Qo(n,e).pseudoUniverse}function Ml(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Lt(e).svgGeometry}function Al(t){let e=Lt(t.ownerDocument||document).svgGeometrySel;if(e==null)return!0;if(!e)return!1;try{return t.matches(e)}catch{return!0}}function Xi(t,e){let n=t.style;for(let i=0;n&&i{n.add("t"+s.localName),s.id&&n.add("i"+s.id);let a=s.classList;for(let l=0;lparseFloat(f)||0,s=t.offsetWidth-t.clientWidth-i(e.getPropertyValue("border-left-width"))-i(e.getPropertyValue("border-right-width")),a=t.offsetHeight-t.clientHeight-i(e.getPropertyValue("border-top-width"))-i(e.getPropertyValue("border-bottom-width")),l=(f,c)=>{let u=n[f];if(!u||!u.endsWith("px"))return;let d=parseFloat(u);Number.isFinite(d)&&(n[f]=`${Math.round((d+c)*1e3)/1e3}px`)};return s>=2&&(l("width",s),l("inline-size",s)),a>=2&&(l("height",a),l("block-size",a)),s>=2||a>=2}var Ji=["border-top-width","border-right-width","border-bottom-width","border-left-width"],Nl=["width","inline-size","height","block-size"];function Ll(t,e,n){if(!Ji.some(f=>n[f]?.includes("."))||e.getPropertyValue("box-sizing")==="border-box"||n.display==="inline")return"";for(let f of["width","height"]){let c=n[`min-${f}`],u=n[`max-${f}`];if(c&&c!=="0px"&&c!=="auto"||u&&u!=="none")return""}let o=f=>parseFloat(n[f])||0,r=n["border-collapse"]==="collapse"&&n.display==="table-cell"?.5:1,i=o("padding-left")+o("padding-right")+(o("border-left-width")+o("border-right-width"))*r,s=o("padding-top")+o("padding-bottom")+(o("border-top-width")+o("border-bottom-width"))*r,a=(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb";for(let f of Nl){let c=n[f];if(!c||!c.endsWith("px"))continue;let d=f==="width"||f==="inline-size"&&!a||f==="block-size"&&a?i:s;n[f]=`${Math.round((parseFloat(c)+d)*1e3)/1e3}px`}n["box-sizing"]="border-box";let l="";if(e.getPropertyValue("overflow-x")==="auto"){let f=t.scrollWidth<=t.clientWidth;n["overflow-x"]=f?"hidden":"auto",f&&(l+="x")}if(e.getPropertyValue("overflow-y")==="auto"){let f=t.scrollHeight<=t.clientHeight;n["overflow-y"]=f?"hidden":"auto",f&&(l+="y")}return l}var ip=["box-sizing",...Nl,"overflow-x","overflow-y"],sp=/(?:box-sizing|width|height|inline-size|block-size|overflow(?:-[xy])?)\s*:/i;function _l(t,e,n){if(sp.test(t.getAttribute("style")))for(let o of ip)e.style.getPropertyValue(o)&&n[o]&&e.style.setProperty(o,n[o],e.style.getPropertyPriority(o))}function ap(t){return t.backgroundImage&&t.backgroundImage!=="none"||t.backgroundColor&&t.backgroundColor!=="rgba(0, 0, 0, 0)"&&t.backgroundColor!=="transparent"||(parseFloat(t.borderTopWidth)||0)>0||(parseFloat(t.borderBottomWidth)||0)>0||(parseFloat(t.paddingTop)||0)>0||(parseFloat(t.paddingBottom)||0)>0?!0:(t.overflowBlock||t.overflowY||"visible")!=="visible"}var kt=typeof CSS<"u"&&CSS.supports?.("text-wrap-mode","nowrap")?"text-wrap-mode":"white-space";function Il(t,e,n,o,r){let i=n["text-wrap-mode"]||n["white-space"]||"",s=i==="nowrap"||i==="pre"||kt==="white-space"&&i!=="normal",a=r.oneLine||=new WeakSet;if(a.has(t.parentElement)){a.add(t),!s&&e.style&&e.style.setProperty(kt,"nowrap");return}let l=n.display||"";!o&&!l.startsWith("inline-")&&(n.float||"none")==="none"&&n.position!=="absolute"&&n.position!=="fixed"||s||(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb"||!e.style||lp(t,n,r)&&(a.add(t),e.style.setProperty(kt,"nowrap"))}var Qi=/^[\w\u00C0-\u024F.,:;!?'"()%]*$/;function lp(t,e,n){let o=t.clientHeight-(parseFloat(e["padding-top"])||0)-(parseFloat(e["padding-bottom"])||0);if(o>3*(parseFloat(e["font-size"])||16)||e["word-break"]==="normal"&&e["overflow-wrap"]==="normal"&&Qi.test(t.textContent.trim()))return!1;let r=t.ownerDocument||document,i=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),s=n.range||=r.createRange(),a=null,l=0,f=0,c=0;for(let y=i.nextNode();y;y=i.nextNode()){if(y.nodeType===1){if(y.shadowRoot||y.localName==="br"||y.localName==="textarea")return!1;continue}if(/\S/.test(y.data)){if(++f>64)return!1;s.selectNodeContents(y);for(let m of s.getClientRects())if(m.height){if(c++,a||=m,Math.min(a.bottom,m.bottom)-Math.max(a.top,m.top)[`border-${t}-style`,`border-${t}-color`]);function Ol(t,e){let n;for(let[o,r]of pp)if(!(!dp.has(e[o])||e[r]!==e.color)){if(n===void 0&&(n=Xi(t,!0)===!0||!Oi(t)),n)return;e[r]="currentcolor"}}var Wl=new Set(["col","colgroup","table","input","button","select","textarea","progress","meter"]),hp=/^(?:checkbox|radio|range|color|hidden|image)$/;function Dl(t,e,n){let o=t.localName;if(o==="colgroup"||o==="col"){(o==="colgroup"||t.span>1)&&up(t,n);return}if(o==="table"){t.caption&&(n.height=n["block-size"]=void 0);return}if(hp.test(t.type))return;let r=Ii(t,e.colorScheme);for(let i in r)if(e.getPropertyValue(i)!==r[i])return;if(!Xi(t,!1)){for(let i in n)De.test(i)&&(n[i]=void 0);return n.background=n.border=n["border-radius"]="revert",!0}}var mp=new Set(["div","section","article","main","aside","header","footer","nav"]);function Bl(t,e,n){if(!t.tagName)return;if(!mp.has(t.tagName.toLowerCase())){if(n.display!=="block")return;let y=t.lastElementChild;if(!y||W(y).marginBottom==="0px")return}if(zt(t)&&t.style&&t.style.height||e.aspectRatio&&e.aspectRatio!=="none"&&e.aspectRatio!=="auto")return;let o=e.display||"";if(o.includes("flex")||o.includes("grid"))return;let r=e.position;if(r==="absolute"||r==="fixed"||r==="sticky"||e.transform!=="none"||ap(e)||ts(t))return;let i=e.overflowX||e.overflow||"visible",s=e.overflowY||e.overflow||"visible";if(i!=="visible"||s!=="visible")return;let a=e.clip;if(a&&a!=="auto"&&a!=="rect(auto, auto, auto, auto)"||e.visibility==="hidden"||e.opacity==="0"||!cp(t))return;let l=parseFloat(e.height),f=t.getBoundingClientRect(),c=t.offsetWidth?f.width/t.offsetWidth:1,u=fp(t,f.top)/(Math.abs(c-1)<.01?1:c);if(!(Number.isFinite(l)&&Number.isFinite(u)&&Math.abs(l-u)>2)){if(t.localName==="details"&&rt()){let y=W(t.lastElementChild).marginBottom;parseFloat(y)>(parseFloat(n["margin-bottom"])||0)&&(n["margin-bottom"]=y);return}n.height=void 0,n["block-size"]=void 0}}var re=new WeakMap,Sn=["margin-top","margin-right","margin-bottom","margin-left","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end"];function Zt(t){if(!(!t||t.nodeType!==1)){ml(),re.delete(t);try{let e=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();)re.delete(e.currentNode)}catch{}}}function nr(t){let e=null;for(let n of t){let o=n.effect?.target;if(!o||n.effect.pseudoElement)continue;let r=(e||=new Map).get(o);r||e.set(o,r=new Set);let i=o.ownerDocument.createElement("div").style;for(let s of n.effect.getKeyframes())for(let a in s)a==="offset"||a==="easing"||a==="composite"||a==="computedOffset"||(a.startsWith("--")?r.add(a):i[a]=s[a]);for(let s=0;s!Se(n))}),e.list}function bp(t,e={},n=null,o=null){let r={},i=e.excludeStyleProps,s=m=>{if(i&&(i instanceof RegExp&&i.test(m)||typeof i=="function"&&i(m)))return;let g=t.getPropertyValue(m);g&&((m==="background-image"||m==="content")&&g.includes("url(")&&!g.includes("data:")&&(g="none"),r[m]=g)},a=m=>{r[m]!==void 0||Se(m)||s(m)};if(o){let m=yp(o);for(let p=0;pi==="transparent"||i==="rgba(0, 0, 0, 0)",o=t["-webkit-text-fill-color"];if(!n(o!==void 0?o:t.color))return;let r=vp(t["background-image"],t["background-color"]);r&&(n(t.color)&&(t.color=r),o!==void 0&&(t["-webkit-text-fill-color"]=r),t["background-image"]="none",t["background-color"]="transparent",delete t["background-clip"],delete t["-webkit-background-clip"],Object.defineProperty(t,"__bgClipTextFix",{value:r,enumerable:!1}))}function xp(t,e,n){let o=n.textShadow;if(!o||o==="none"||!(parseFloat(n.webkitTextStrokeWidth)>0)||t.firstElementChild||n.backgroundImage!=="none"||n.boxShadow!=="none"||or(n.backgroundColor)[3]!==0||["Top","Right","Bottom","Left"].some(f=>parseFloat(n[`border${f}Width`])>0)||o.replace(/\([^)]*\)/g,"").includes(","))return;let r=(o.match(/(?:rgba?|hsla?|color|oklch|oklab|lab|lch)\([^)]*\)|#[\da-f]+|\b[a-z]+\b/i)||[])[0],[i=0,s=0,a=0]=(o.match(/-?[\d.]+px/g)||[]).map(parseFloat);if(!r)return;let l=n.filter&&n.filter!=="none"?`${n.filter} `:"";e.style.setProperty("text-shadow","none","important"),e.style.setProperty("filter",`${l}drop-shadow(${i}px ${s}px ${a/2}px ${r})`,"important")}var Sp=/(?:rgba?|hsla?|oklch|oklab|lab|lch|color)\([^()]*\)/g,Ye;function or(t){if(!Ye){let e=document.createElement("canvas");e.width=e.height=1,Ye=e.getContext("2d",{willReadFrequently:!0})}return Ye.clearRect(0,0,1,1),Ye.fillStyle="transparent",Ye.fillStyle=t,Ye.fillRect(0,0,1,1),Ye.getImageData(0,0,1,1).data}function vp(t,e){let n=i=>{let s=[];for(let a of(i||"").match(Sp)||[]){let[l,f,c,u]=or(a);u>13&&s.push([l,f,c])}return s},o=n(t);if(o.length||(o=n(e)),!o.length)return null;let r=[0,0,0];for(let[i,s,a]of o)r[0]+=i,r[1]+=s,r[2]+=a;return`rgb(${r.map(i=>Math.round(i/o.length)).join(", ")})`}function Xl(t){let e=t.getPropertyValue("background-image");if(e&&e!=="none")return!0;let n=t.getPropertyValue("background-color");if(n&&n!=="rgba(0, 0, 0, 0)"&&n!=="transparent")return!0;for(let r of gp){let i=t.getPropertyValue(r);if(i&&i!=="none")return!0}let o=t.getPropertyValue("background");return!!(o&&/url\s*\(/i.test(o))}function Cp(t){for(let e=t.firstChild;e;e=e.nextSibling){if(e.nodeType===3&&/\S/.test(e.nodeValue||""))return!0;if(e.nodeType===1){let n=W(e).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function kp(t,e,n){try{if(typeof t.computedStyleMap=="function"){let r=t.computedStyleMap().get("width");if(r!=null)return!Ul(String(r).trim().toLowerCase())}}catch{}let o=t.style&&(t.style.width||t.style.inlineSize);return o&&!Ul(String(o).trim().toLowerCase())?!0:Ap(t,e)?n||Ep(t,e):!1}var Mp=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function Ul(t){return Mp.has(t)||t.startsWith("fit-content")}function Ap(t,e){let n=t.getBoundingClientRect().width-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)-(parseFloat(e.borderLeftWidth)||0)-(parseFloat(e.borderRightWidth)||0);if(!(n>0))return!1;let o=1/0,r=-1/0,i=null;for(let s=t.firstChild;s;s=s.nextSibling){let a;if(s.nodeType===3){if(!/\S/.test(s.nodeValue||"")||(i=i||document.createRange(),i.selectNode(s),a=i.getBoundingClientRect(),!a.width&&!a.height))continue}else if(s.nodeType===1){let l=W(s);if(l.display==="none"||l.position==="absolute"||l.position==="fixed")continue;a=s.getBoundingClientRect()}else continue;a.leftr&&(r=a.right)}return r===-1/0?!1:r-o0?Math.abs(t.getBoundingClientRect().width-r)>.5:!1}var Hl=new WeakMap;function rr(t,e){return t.v===ao(e,t.hosts)}function Rp(t){let e=t.split(" ");return e.length===4?t:`${e[0]} ${e[1]??e[0]} ${e[2]??e[0]} ${e[3]??e[1]??e[0]}`}var Yl=["top","right","bottom","left"],Vl="0px 0px 0px 0px";function jl(t,e){let n=t[e[0]],o=t[e[1]],r=t[e[2]],i=t[e[3]];return n===void 0||o===void 0||r===void 0||i===void 0?null:`${n} ${o} ${r} ${i}`}function es(t,e,n,o){return Rp(t.getPropertyValue(n))===e||`${t.getPropertyValue(o[0])} ${t.getPropertyValue(o[1])} ${t.getPropertyValue(o[2])} ${t.getPropertyValue(o[3])}`===e}function Kl(t,e){let n=re.get(t)?.used;return!n||n.box===!1||e.getPropertyValue("width")===n.w&&e.getPropertyValue("height")===n.h}function Zl(t,e){let n=re.get(t)?.used?.margin;return!n||es(e,n,"margin",Sn)}function Fp(t,e,n){let o=t.width,r=t.height,i={w:o,h:r,box:o===void 0||r===void 0||o==="auto"&&r==="auto"?!1:null,inset:null,margin:null,tracks:null},s=t.position,a=s==="absolute"||s==="fixed";if(a||s==="relative"||s==="sticky"){let f=jl(t,Yl);f&&(a||f!==Vl)&&(i.inset=f)}let l=typeof e.computedStyleMap=="function";if(a||n||!l){let f=jl(t,Sn);f&&(f!==Vl||!l)&&(i.margin=f)}if((t.display||"").includes("grid")){let f=t["grid-template-columns"],c=t["grid-template-rows"];f!==void 0&&c!==void 0&&(i.tracks=f+"/"+c)}return i}function Tp(t,e,n){if(t.box!==!1){let o=e.getBoundingClientRect();if(t.box){if(o.width!==t.box[0]||o.height!==t.box[1])return!1}else{if(n.getPropertyValue("width")!==t.w||n.getPropertyValue("height")!==t.h)return!1;t.box=[o.width,o.height]}}return(!t.inset||es(n,t.inset,"inset",Yl))&&(!t.margin||es(n,t.margin,"margin",Sn))&&(!t.tracks||n.getPropertyValue("grid-template-columns")+"/"+n.getPropertyValue("grid-template-rows")===t.tracks)}function $p(t,e=null,n={},o=null,r=null,i=!1){let s=re.get(t),a=!!(n&&n.embedFonts),l=n&&n.excludeStyleProps||null,f=e||getComputedStyle(t);if(typeof l!="function"&&s&&rr(s,t)&&s.embedFonts===a&&s.excludeStyleProps===l&&(s.checked===Ct||Tp(s.used,t,f)))return s.checked=Ct,s.snapshot;let c,u=null,d=o&&o.st.snaps.get(o.id);if(d){let v=d.rr||Zi(d,t,o.st);c=Object.create(d.snap),u=[];for(let C=0;Cc[v])),g&&u.push(""+g),p&&u.push("\x07"+c.width,c.height),o.tail=u.join("")+(c.height===void 0?"":"")+(c["block-size"]===void 0?"":""),o.rec=d);let w=Zo(t),b=s&&s.used;if(b&&(b.w!==y.w||b.h!==y.h||b.tracks!==y.tracks)){let v=(b.w!==y.w||b.h!==y.h)&&f.getPropertyValue("container-type"),[C,A]=/^(?:vertical|sideways)/.test(c["writing-mode"])?["h","w"]:["w","h"];if(v&&v!=="normal")so(t);else if(b[C]!==y[C]||b.tracks!==y.tracks||b[A]==="0px"){io(t);for(let M=t.firstElementChild;M;M=M.nextElementSibling)if(io(M),M.localName==="slot")for(let k of M.assignedElements({flatten:!0}))io(k)}}let x=(r?.scanEnv??Nt)!==Nt?-1:ao(t,w);return re.set(t,{v:x,checked:Ct,hosts:w,snapshot:c,embedFonts:a,excludeStyleProps:l,used:y}),c}function os(t,e){let n=t.width;if(!n||!n.endsWith("px"))return"";if(!e||t.boxSizing==="border-box")return n;let o=parseFloat(n);for(let r of["padding-left","padding-right","border-left-width","border-right-width"])o+=parseFloat(t.getPropertyValue(r))||0;return`${Math.round(o*1e3)/1e3}px`}function rs(t,e,n){if(e.minWidth!=="auto"||e.position==="absolute"||e.position==="fixed")return"";let o=e.getPropertyValue("overflow-x");if(o!=="visible"&&o!=="clip")return"";let r=t.parentElement&&W(t.parentElement);if(!r||!r.display.includes("flex")||r.flexDirection.startsWith("row")!==(r.writingMode==="horizontal-tb"))return"";let i=os(e,n);if(!i)return"";let s=parseFloat(i);return r.flexWrap!=="nowrap"&&s>0?`${Math.max(0,s-1/60).toFixed(3)}px`:i}function Pp(t,e){if(t&&t.session)return t;if(t&&(t.styleMap||t.styleCache||t.nodeMap)){let n=t.stylesCtx;return(!n||t.stylesCtxOpts!==e)&&(n={session:t,options:e||{}},t.stylesCtx=n,t.stylesCtxOpts=e),n}return{session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},options:t||e||{}}}var Np=/%|[\d.](?:em|rem|ex|ch|cap|ic|lh|rlh|v[whib]|vmin|vmax|cq[whbi]|cqmin|cqmax)\b|\b(?:calc|var|min|max|clamp|env|attr)\(|\b(?:auto|inherit|initial|unset|revert|currentcolor|-webkit-fill-available|fit-content|min-content|max-content)\b/i,Gl=t=>t.tagName==="INPUT"||t.tagName==="TEXTAREA",Lp;function _p(t,e,n,o,r){let i=t.style;if(!i||i.length===0)return;let s=kl(t),a=s!=null&&!Np.test(o),l=a&&s.size===0&&!r&&!Gl(t);if(l&&!/border|\ball\s*:/i.test(o))return;let f;for(let c=0,u=i.length;cp.snapshot[h]===g)||n.borderWidth===g,f&&l)return}if(a&&!s.has(d)&&!r?.has(d)&&(!y||f)&&!(d.startsWith("background")&&Gl(t)))continue;let m=n.getPropertyValue(d);m&&cn(d)&&(m=fn(m)),m&&(!y||m!==i.getPropertyValue(d))&&e.style.setProperty(d,m,i.getPropertyPriority(d))}}function Et(t,e,n,o){if(t.tagName==="STYLE")return;let r=Pp(n,o),i=r.options&&r.options.cache||"soft";i!=="disabled"&&Xe(t.ownerDocument),i==="disabled"&&!r.session.bumpedForDisabled&&(je(),r.session.bumpedForDisabled=!0);let{session:s}=r;if(!s.styleCache.has(t)){let v=null;try{v=getComputedStyle(t)}catch{}s.styleCache.set(t,v||getComputedStyle((t.ownerDocument||document).documentElement))}let a=s.styleCache.get(t);(Lp??=rt())&&a.display?.includes("grid")&&a.getPropertyValue("grid-template-columns");let l=t.getAttribute?.("style");l&&_p(t,e,a,l,s.animated?.get(t));let f=a.getPropertyValue("animation-name");e&&e.style&&f&&f!=="none"&&e.style.setProperty("animation","none","important");let c=t.tagName?.toLowerCase()||"div";if(Jn.has(c)){let v={};Object.defineProperty(v,"__needsBgInline",{value:Xl(a),enumerable:!1});let C=Zo(t);re.set(t,{v:ao(t,C),hosts:C,snapshot:v,embedFonts:!!(r.options&&r.options.embedFonts),excludeStyleProps:r.options&&r.options.excludeStyleProps||null}),s.styleMap.set(e,"");return}let u=null;if(s.styleShare&&s.styleMap){let v=Tl(s),C=Ki(t,v),A=t.ownerDocument||document,M=A.activeElement;C!==-1&&!Fl.has(t.tagName)&&!(M&&M!==A.body&&M!==A.documentElement&&M===t)&&!t.shadowRoot&&!t.assignedSlot&&(u={st:v,id:C})}let d=ts(t),y=$p(t,a,r.options,u,s,d);if(l)for(let v=0;v<4;v++){let C=Sn[v];y[C]==="auto"&&e.style.setProperty(C,"auto","important")}y.__bgClipTextFix&&e&&e.style&&(e.style.setProperty("background-image","none","important"),e.style.setProperty("background-color","transparent","important"),e.style.setProperty("color",y.__bgClipTextFix,"important"),e.style.setProperty("-webkit-text-fill-color",y.__bgClipTextFix,"important"),(s.bgClipText||=[]).push([t,e])),r.safari??=K(),r.safari&&xp(t,e,a),e.style?.length&&y["box-sizing"]==="border-box"&&a.getPropertyValue("box-sizing")!=="border-box"&&_l(t,e,y),Il(t,e,y,d,s);let m=d?rs(t,a,y["box-sizing"]==="border-box"):"",g=!0,p=m&&"|m"+m;if(ve(c,(y.display||"").toLowerCase())){g=Cp(t),g&&Di(c,y,d)&&kp(t,a,d)&&(g=!1),p+=(g?"|c":"")+(d?"|f":"");let v=y["text-wrap-mode"]||y["white-space"]||"";g&&v!=="nowrap"&&v!=="pre"&&(s.reconcileRisk=(s.reconcileRisk||0)+1)}let h=u&&u.tail!==void 0?u.rec.keys||=new Map:null,w=h&&u.tail+p,b=h?null:Hl.get(y),x=h?h.get(w):b&&b.flags===p?b.key:void 0;x===void 0&&(x=He(y,c,g,d,m,ke(t,s)),h?h.set(w,x):Hl.set(y,{flags:p,key:x})),s.styleMap.set(e,x)}Ot();ne();Ve();Ot();var Ip=new Set(["symbol","defs"]),Op=new Set(["mask","clipPath","linearGradient","radialGradient","pattern","marker","filter"]),is=new WeakMap,Jl=-1;function ir(t){let e=qe();return e!==Jl&&(is=new WeakMap,Jl=e),Ql(t)}function Ql(t){let e=is.get(t);if(e!==void 0)return e;let n;if(t.namespaceURI==="http://www.w3.org/2000/svg"&&(Op.has(t.localName)?n=!1:Ip.has(t.localName)&&(n=!0)),n===void 0){let o=t.parentNode;n=!!(o&&o.nodeType===1)&&Ql(o)}return is.set(t,n),n}function tc(t,e){if(t?.nodeType!==1||e?.nodeType!==1||ir(t))return;let n=t.getAttribute?.("style"),o=!!(n&&n.includes("var("));if(!o&&t.attributes?.length){let i=t.attributes;for(let s=0;si.d-s.d);let r=window.devicePixelRatio||1;return(o.find(i=>i.d>=r)||o[o.length-1]).url}function ec(t,e){let n=t.currentSrc||"";if(n&&!vn(n))return n;let o=e.querySelectorAll("source[srcset]"),r=null;for(let i of o){let s=i.getAttribute("srcset");if(!s||vn(s))continue;let a=i.getAttribute("type");if(a&&!gi.test(a.trim()))continue;let l=i.getAttribute("media");if(l)try{if(window.matchMedia(l).matches)return Cn(s,t)}catch{}r||(r=Cn(s,t))}return r}function nc(t){let e=[t.getAttribute("data-src"),t.getAttribute("data-lazy-src"),t.getAttribute("data-original"),t.getAttribute("data-hi-res-src")];for(let o of e)if(o&&!vn(o))return o;let n=t.getAttribute("data-srcset")||t.getAttribute("data-lazy-srcset");if(n){let o=n.split(",")[0].trim().split(/\s+/)[0];if(o&&!vn(o))return o}return null}wt();pt();function Wp(t,e){if(t=t.trim(),!t)return t;let n=e?`[data-sd-slotted~="${e}"]`:"[data-sd-slotted]";return t.endsWith(":not([data-sd-slotted])")||t.endsWith(`:not(${n})`)?t:`${t}:not(${n})`}var Dp=/::[a-zA-Z-]+(?:\([^)]*\))?$|:(?:before|after|first-letter|first-line)$/,Bp=/^::?(?:before|after|first-letter)$/;function oc(t,e,n=!0,o){return fe(t,",").map(r=>r.trim()).filter(Boolean).map(r=>{if(r.startsWith(":where(")&&r.includes("data-sd"))return r;let i=r.match(Dp);if(i&&i[0][1]!==":"&&r[i.index-1]==="\\"&&(i=null),i&&Bp.test(i[0]))return":not(*)";let s=i?r.slice(0,i.index).trim():r,a=n?Wp(s,o):s;return`:where(${e} ${a})${i?i[0]:""}`}).join(", ")}function ac(t,e,n){return t?(t=t.replace(/:host-context\(([^)]+)\)/g,(o,r)=>`:where(:where(${r.trim()}) ${e})`),t=t.replace(/:host\(([^)]+)\)/g,(o,r)=>`:where(${e}:is(${r.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(o,r)=>`:where(${e} ${r.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(o,r,i,s)=>{let a=oc(s,e,!0,n);return`${r}${i}${a}{`}),t=t.replace(/(^|})(\s*@(?:supports|container|layer|scope|media)\b[^{};]*{\s*)([^@}{;]+){/g,(o,r,i,s)=>`${r}${i}${oc(s,e,!0,n)}{`),t):""}function Ke(t){let e="";for(let n of t)if(n.media&&n.cssRules){let o=!1;try{o=window.matchMedia(n.conditionText||n.media.mediaText).matches}catch{}o&&(e+=Ke(n.cssRules))}else if(n.constructor?.name==="CSSSupportsRule")e+=`@supports ${n.conditionText}{${Ke(n.cssRules)}}`;else if(n.cssRules&&n.cssRules.length&&/@media/i.test(n.cssText)){let o=n.cssText.slice(0,n.cssText.indexOf("{")+1);e+=o+(n.style?n.style.cssText:"")+Ke(n.cssRules)+"}"}else e+=n.cssText+` +`;return e}function lc(t,e){let n="";try{t.querySelectorAll("style").forEach(r=>{let i=null;try{i=r.sheet&&r.sheet.cssRules}catch{}n+=(i?Ke(i):r.textContent||"")+` +`});let o=t.adoptedStyleSheets||[];for(let r of o)try{let i=e.get(r);i===void 0&&e.set(r,i=r.cssRules?Ke(r.cssRules):""),n+=i}catch{}}catch{}return n}function cc(t,e,n){if(!e)return;let o=document.createElement("style");o.setAttribute("data-sd",n),o.textContent=e,t.insertBefore(o,t.firstChild||null)}function fc(t,e,n={}){try{let o=null,r=W(t).content;if(r&&r.includes("url(")){let f=r.match(/url\(["']?([^"')]+)["']?\)/);f&&(o=f[1])}let i=t.closest?.("picture"),s=t.getAttribute("src")||"",a=t.getAttribute("srcset")||"",l=o||(i?ec(t,i):!a.trim()&&s.startsWith("data:")?s:t.currentSrc)||Cn(a,t)||t.src||"";if((!l||vn(l))&&n.resolvePicturePlaceholders!==!1){let f=nc(t);f&&(l=f)}if(!l)return;e.getAttribute("src")!==l&&e.setAttribute("src",l),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function uc(t){let e=new Set;if(!t)return e;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,o;for(;o=n.exec(t);)e.add(o[1]);return e}function dc(t,e,n){let o=[];for(let r of e){let i="";try{i=getComputedStyle(t).getPropertyValue(r).trim()||getComputedStyle(document.documentElement).getPropertyValue(r).trim()}catch{}i&&o.push(`${r}: ${i};`)}return o.length?`${n}{${o.join("")}} +`:""}function pc(t,e){if(!t)return;let n=o=>{let r=o.getAttribute("data-sd-slotted")||"";e?` ${r} `.includes(` ${e} `)||o.setAttribute("data-sd-slotted",r?`${r} ${e}`:e):o.setAttribute("data-sd-slotted",r)};t.nodeType===Node.ELEMENT_NODE&&n(t),t.querySelectorAll?.("*").forEach(n)}var kn=t=>(t=parseFloat(t))>0?t:0;function jt(t){let e=t.offsetWidth>0?t.offsetWidth:0,n=t.offsetHeight>0?t.offsetHeight:0;if(!e||!n){let o=getComputedStyle(t);e||=kn(o.width)||kn(t.getAttribute("width"))||kn(t.naturalWidth),n||=kn(o.height)||kn(t.getAttribute("height"))||kn(t.naturalHeight)}return{width:e,height:n}}var rc=new WeakMap;function zp(t,e,n){let o=t.defaultView,r=o?o.scrollX:0,i=o?o.scrollY:0,s=t.body?t.body.scrollLeft:0,a=t.body?t.body.scrollTop:0,l=t.documentElement?t.documentElement.scrollLeft:0,f=t.documentElement?t.documentElement.scrollTop:0,c=0,u=0,d=0,y=0;try{let p=o&&t.body?o.getComputedStyle(t.body):null;p&&(c=(parseFloat(p.marginTop)||0)+(parseFloat(p.paddingTop)||0),u=(parseFloat(p.marginRight)||0)+(parseFloat(p.paddingRight)||0),d=(parseFloat(p.marginBottom)||0)+(parseFloat(p.paddingBottom)||0),y=(parseFloat(p.marginLeft)||0)+(parseFloat(p.paddingLeft)||0))}catch{}let m=`html {margin: 0 !important;padding: 0 !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${c}px ${u}px ${d}px ${y}px !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,g;try{let p=rc.get(t);p||rc.set(t,p=new o.CSSStyleSheet),p.replaceSync(m),t.adoptedStyleSheets=[...t.adoptedStyleSheets,p],g=()=>{t.adoptedStyleSheets=t.adoptedStyleSheets.filter(h=>h!==p)}}catch{let p=t.createElement("style");p.setAttribute("data-sd-iframe-pin",""),it(p),p.textContent=m,(t.head||t.documentElement).appendChild(p),g=()=>p.remove()}if(Zt(t.documentElement),r||i)try{t.body&&(t.body.scrollLeft=r,t.body.scrollTop=i),t.documentElement&&(t.documentElement.scrollLeft||(t.documentElement.scrollLeft=r),t.documentElement.scrollTop||(t.documentElement.scrollTop=i))}catch{}return()=>{try{g()}catch{}try{o&&typeof o.scrollTo=="function"&&o.scrollTo(r,i),t.body&&(t.body.scrollLeft=s,t.body.scrollTop=a),t.documentElement&&(t.documentElement.scrollLeft=l,t.documentElement.scrollTop=f)}catch{}Zt(t.documentElement)}}function sr(t){try{if(t.localName!=="embed")return t.contentDocument||t.contentWindow?.document||null}catch{return null}let e=t.ownerDocument.defaultView;for(let n=0;e&&nsetTimeout(p,0)),o=sr(t);if(!o?.documentElement)throw new Error("The iframe document isn't ready.");let r=t.getBoundingClientRect(),i=getComputedStyle(t),s=g=>parseFloat(i[`border${g}Width`])||0,a=Math.max(0,Math.round(r.width-(s("Left")+s("Right")))),l=Math.max(0,Math.round(r.height-(s("Top")+s("Bottom")))),f=n?.snap;if(!f||typeof f.toPng!="function")throw new Error("Iframes are only captured through snapdom(el).");let c={...n,scale:1,clip:null,__pinned:!0,__styleShare:e.styleShare},u=zp(o,a,l),d;try{d=await f.toPng(o.documentElement,c)}finally{u()}d.style.display="block",d.style.width=`${a}px`,d.style.height=`${l}px`;let y=document.createElement("div");e.nodeMap.set(y,t),Et(t,y,e,n),y.style.overflow="hidden",W(t).display==="inline"&&(y.style.display="inline-block");let m=W(t);return y.style.width||(y.style.width=m.width),y.style.height||(y.style.height=m.height),y.appendChild(d),y}function Up(t){return t&&!rt()&&!K()?{fill:"#99c8ff",mark:"Field"}:!ar("AccentColor")||!ar("AccentColorText")?{fill:"#0a6ed1",mark:"white"}:{fill:"AccentColor",mark:"AccentColorText"}}function Hp(t){try{let e=s=>{let a=s/255;return a<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)},[n,o,r]=or(t);return 1.05/(.2126*e(n)+.7152*e(o)+.0722*e(r)+.05)<2.4?"black":"white"}catch{return"white"}}function hc(t){try{let e=t&&t.colorScheme||"";return(!e||e==="normal")&&(e=document.querySelector('meta[name="color-scheme"]')?.content||""),/\bdark\b/.test(e)?!/\blight\b/.test(e)||matchMedia("(prefers-color-scheme: dark)").matches:!1}catch{return!1}}function mc(t){return`;color-scheme:${hc(t)?"dark":"light"}`}function ar(t){try{return CSS.supports("color",t)}catch{return!1}}function gc(t){let e="",n="";try{e=t&&t.accentColor||"",n=t&&t.color||""}catch{}let o=e&&e!=="auto"&&e!=="none",{fill:r,mark:i}=o?{fill:e,mark:Hp(e)}:Up(hc(t)),s=rt()&&ar("ButtonBorder")?"ButtonBorder":n||r;return{fill:r,mark:i,rim:s,text:n||r}}function yc(t){let{width:e,height:n}=jt(t),o=t.getBoundingClientRect(),r;try{r=window.getComputedStyle(t)}catch{}let i=r?parseFloat(r.width):NaN,s=r?parseFloat(r.height):NaN,a=Number.isFinite(i)&&i>0?i:e||o.width||128,l=Number.isFinite(s)&&s>0?s:n||o.height||16,f=Number.parseFloat(t.min)||0,c=Number.isFinite(Number.parseFloat(t.max))?Number.parseFloat(t.max):100,u=Number.parseFloat(t.value),d=c-f,y=d>0&&Number.isFinite(u)?Math.min(1,Math.max(0,(u-f)/d)):.5,m="middle";try{r&&r.verticalAlign&&(m=r.verticalAlign)}catch{}let g=document.createElement("div");g.setAttribute("data-snapdom-input-replacement","range"),g.style.cssText=`display:inline-block;width:${a}px;height:${l}px;vertical-align:${m};flex-shrink:0;line-height:0;`;let p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("width",String(a)),p.setAttribute("height",String(l)),p.setAttribute("viewBox",`0 0 ${a} ${l}`),p.style.cssText=`width:${a}px;height:${l}px;overflow:visible${mc(r)}`,g.appendChild(p);function h(){let w=gc(r).fill,b=!!t.disabled,x=Math.max(2,Math.min(4,l)),v=(l-x)/2,C=Math.max(10,Math.min(14,Math.max(l,10))),A=C/2,M=A+y*Math.max(0,a-C);p.innerHTML="";let k=(R,F,N,P)=>{let _=document.createElementNS("http://www.w3.org/2000/svg","rect");_.setAttribute("x",String(R)),_.setAttribute("y",String(v)),_.setAttribute("width",String(Math.max(0,F))),_.setAttribute("height",String(x)),_.setAttribute("rx",String(x/2)),_.setAttribute("fill",N),P&&_.setAttribute("fill-opacity",P),p.appendChild(_)};k(0,a,"#808080","0.4"),k(0,M,w);let S=document.createElementNS("http://www.w3.org/2000/svg","circle");S.setAttribute("cx",String(M)),S.setAttribute("cy",String(l/2));let E=rt();S.setAttribute("r",String(E?A-1:A)),S.setAttribute("fill",E?"#676774":w),E&&(S.setAttribute("stroke","white"),S.setAttribute("stroke-width","2")),p.appendChild(S),b&&p.setAttribute("opacity","0.5"),g.style.setProperty("width",`${a}px`,"important"),g.style.setProperty("height",`${l}px`,"important"),g.style.setProperty("min-width",`${a}px`,"important"),g.style.setProperty("min-height",`${l}px`,"important")}return h(),{el:g,applyVisual:h}}function bc(t){let{width:e,height:n}=jt(t),o=t.getBoundingClientRect(),r;try{r=window.getComputedStyle(t)}catch{}let i=r?parseFloat(r.width):NaN,s=r?parseFloat(r.height):NaN,a=Math.round(e||o.width||0),l=Math.round(n||o.height||0),f=Number.isFinite(i)&&i>0?Math.round(i):Math.max(12,a||16),c=Number.isFinite(s)&&s>0?Math.round(s):Math.max(12,l||16),u=(t.type||"text").toLowerCase()==="checkbox",d=u&&!!t.indeterminate,y=!!t.checked&&!d,g=Math.max(Math.min(f,c),12),p=Math.max(f,g),h=Math.max(c,g),w="middle";try{r&&r.verticalAlign&&(w=r.verticalAlign)}catch{}let b=document.createElement("div");b.setAttribute("data-snapdom-input-replacement",t.type||"checkbox"),b.style.cssText=`display:inline-block;width:${p}px;height:${h}px;vertical-align:${w};flex-shrink:0;line-height:0;`;let x=document.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("width",String(p)),x.setAttribute("height",String(h)),x.setAttribute("viewBox",`0 0 ${g} ${g}`),x.style.cssText=`width:${p}px;height:${h}px${mc(r)}`,b.appendChild(x);function v(){let C=gc(r),A=t.matches(":disabled"),M=A?C.text:C.fill,k=A?"white":C.mark,S=(N,P)=>{let _=document.createElementNS("http://www.w3.org/2000/svg",N);for(let O in P)_.setAttribute(O,String(P[O]));x.appendChild(_)},E=y||d,R=E?0:.5,F=E?{fill:M}:{fill:ar("Field")?"Field":"none",stroke:C.rim,"stroke-width":1};if(x.innerHTML="",u){if(S("rect",{x:R,y:R,width:g-R*2,height:g-R*2,rx:2,ry:2,...F}),y)S("path",{d:`M ${g*.2} ${g*.53} L ${g*.4} ${g*.72} L ${g*.78} ${g*.3}`,stroke:k,"stroke-width":Math.max(1.5,g*.12),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"});else if(d){let N=g*(rt()?.82:.6),P=rt()?Math.max(1,g/16):Math.max(2,g/8);S("rect",{x:(g-N)/2,y:(g-P)/2,width:N,height:P,fill:k})}}else S("circle",{cx:g/2,cy:g/2,r:g/2-R,...F}),y&&S("circle",{cx:g/2,cy:g/2,r:g/2-2,fill:"none",stroke:k,"stroke-width":2});A&&x.setAttribute("opacity","0.5"),b.style.setProperty("width",`${p}px`,"important"),b.style.setProperty("height",`${h}px`,"important"),b.style.setProperty("min-width",`${p}px`,"important"),b.style.setProperty("min-height",`${h}px`,"important")}return v(),{el:b,applyVisual:v}}var co=new Tt(80);async function Vp(t){if(G.resource?.has(t))return G.resource.get(t);if(co.has(t))return co.get(t);let e=(async()=>{let n=await bt(t,{as:"dataURL"});if(!n.ok||typeof n.data!="string")throw new Error(`Couldn't read ${t}`);return G.resource?.set(t,n.data),n.data})();co.set(t,e);try{let n=await e;return co.set(t,n),n}catch(n){throw co.delete(t),n}}var ic=/\bblob:[^)"'\s]+/g;function ss(t){return typeof t=="string"&&t.startsWith("blob:")}function jp(t){return(t||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function Gp(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function fo(t,e){let n=t.querySelectorAll?Array.from(t.querySelectorAll(e)):[];return t.matches?.(e)&&n.unshift(t),n}async function lr(t,e=null){if(!t)return;let n=new Set,o=[],r=new Map,i=(c,u,d,y)=>{n.add(d),o.push(()=>{r.has(d)&&(c.setAttribute(u,r.get(d)),y?.())})},s=(c,u)=>{if(!c||!c.includes("blob:"))return;let d=c.match(ic)||[];if(d.length){for(let y of d)n.add(y);o.push(()=>{let y=c.replace(ic,m=>r.get(m)||m);y!==c&&u(y)})}};for(let c of fo(t,"img")){let u=c.getAttribute("src")||c.currentSrc||"";ss(u)&&i(c,"src",u);let d=c.getAttribute("srcset");if(d&&d.includes("blob:")){let y=jp(d);for(let m of y)ss(m.url)&&n.add(m.url);o.push(()=>{let m=!1;for(let g of y)r.has(g.url)&&(g.url=r.get(g.url),m=!0);m&&c.setAttribute("srcset",Gp(y))})}}let a="http://www.w3.org/1999/xlink";for(let c of fo(t,"image")){let u=c.getAttribute("href")||c.getAttributeNS?.(a,"href");ss(u)&&i(c,"href",u,()=>c.removeAttributeNS?.(a,"href"))}for(let c of fo(t,"[style*='blob:']"))s(c.getAttribute("style"),u=>c.setAttribute("style",u));for(let c of fo(t,"style"))s(c.textContent||"",u=>{c.textContent=u});for(let c of fo(t,"[poster^='blob:']"))i(c,"poster",c.getAttribute("poster"));if(!n.size)return;let l=[...n],f=0;await Promise.all(Array.from({length:Math.min(4,l.length)},async()=>{for(;f1.005&&Number.isFinite(g)){if(c){let p=[];for(let h of[!1,!0]){let w=parseFloat(s.fontSize),b=w*(g+1);for(let x=0;x<10;x++){let v=(w+b)/2;a.style.fontSize=`${v}px`;let C=y.getBoundingClientRect().height;(h?C>l:C>=l)?b=v:w=v}p.push((w+b)/2)}g=(p[0]+p[1])/2/parseFloat(s.fontSize)}i.style.setProperty("font-size",`${parseFloat(s.fontSize)*g}px`),s.lineHeight!=="normal"&&i.style.setProperty("line-height",`${parseFloat(s.lineHeight)*g}px`)}}}finally{o.remove()}}}function sc(t,e){let n=t.ownerDocument.createRange();n.setStart(t,e),n.setEnd(t,e+1);let o=n.getBoundingClientRect();return o.left+o.width/2}function Kp(t,e=!1){for(let n=t.firstChild;n;n=n.nextSibling){if(n.nodeType!==3)continue;let o=/\S+/.exec(n.data);if(!o)continue;let r=t.ownerDocument.createRange();r.setStart(n,o.index),r.setEnd(n,o.index+o[0].length);let i=r.getClientRects();return i.length===1?{word:o[0],distance:e?i[0].height:i[0].width,centers:!1,height:e}:null}return null}function Zp(t,e,n){let o=Yp.exec(t.value.split(` +`)[0]);if(!o||t.scrollLeft||t.scrollTop||!n.caretPositionFromPoint)return null;let r=t.getBoundingClientRect(),i=t.localName==="textarea"?r.top+(parseFloat(e.borderTopWidth)||0)+(parseFloat(e.paddingTop)||0)+3:r.top+r.height/2,s=c=>{let u=n.caretPositionFromPoint(c,i);return u&&u.offsetNode===t?u.offset:-1},a=r.width/16,l=c=>{let u=r.left;for(;u<=r.right&&s(u)r.right)return NaN;let d=u-a;for(let y=0;y<16;y++){let m=(d+u)/2;s(m)>=c?u=m:d=m}return u},f=Math.abs(l(o.index+o[0].length)-l(o.index+1));return Number.isFinite(f)?{word:o[0],distance:f,centers:!0}:null}pt();var xc=new Set(["rgba(0, 0, 0, 0)","transparent"]),ls="Highlight";function Sc(t){let n=(t.ownerDocument||document).getSelection?.();if(!n||n.isCollapsed||n.rangeCount===0)return null;let o=[];for(let r=0;ru&&r.push([u,d])}if(r.length===0)return null;let i=Jp(o,e);if(!i)return null;r.sort((f,c)=>f[0]-c[0]);let s=t.ownerDocument||document,a=s.createDocumentFragment(),l=0;for(let[f,c]of r){f>l&&a.append(s.createTextNode(n.slice(l,f)));let u=s.createElement("span");u.setAttribute("data-snapdom-selection",""),u.setAttribute("style",`all:unset;${i}`),u.textContent=n.slice(f,c),a.append(u),l=c}return lNumber.parseFloat(t)||0,Qp=["font-family","font-size","font-weight","font-style","font-variant","font-stretch","letter-spacing","word-spacing","text-transform","text-indent","text-align","line-height","tab-size","direction"];function th(t,e){try{let o=getComputedStyle(t,"::selection").backgroundColor;if(o&&!xc.has(o)&&o!==e.backgroundColor)return o}catch{}return ls}function Cc(t,e){let n=t.ownerDocument||document;if(n.activeElement!==t)return;let o=null,r=null;try{o=t.selectionStart,r=t.selectionEnd}catch{return}if(o==null||r==null||o===r)return;let i=t.value||"";if(t.localName==="input"&&t.type==="password"&&(i="\u2022".repeat(i.length)),!i)return;let s=getComputedStyle(t),a=t.localName==="textarea",l=cr(s.paddingLeft),f=cr(s.paddingTop),c=t.clientWidth-l-cr(s.paddingRight),u=t.clientHeight-f-cr(s.paddingBottom),d=n.createElement("div");d.style.cssText="position:absolute;top:0;left:-99999px;visibility:hidden;margin:0;border:0;padding:0;box-sizing:content-box;";for(let p of Qp)d.style.setProperty(p,s.getPropertyValue(p));a?(d.style.whiteSpace="pre-wrap",d.style.overflowWrap="break-word",d.style.width=`${Math.max(0,c)}px`):d.style.whiteSpace="pre";let y=n.createElement("span");y.textContent=i.slice(o,r),d.append(n.createTextNode(i.slice(0,o)),y,n.createTextNode(i.slice(r))),n.body.appendChild(d);let m=[];try{let p=d.getBoundingClientRect(),h=-t.scrollLeft,w=-t.scrollTop;if(!a){w+=Math.max(0,(u-p.height)/2);let b=s.direction==="rtl",x=s.textAlign;x==="start"?x=b?"right":"left":x==="end"&&(x=b?"left":"right");let v=c-p.width;v>0&&(x==="right"?h+=v:x==="center"&&(h+=v/2))}for(let b of y.getClientRects())b.width<=0||b.height<=0||m.push({x:l+(b.left-p.left)+h,y:f+(b.top-p.top)+w,width:b.width,height:b.height})}finally{d.remove()}if(m.length===0)return;let g=th(t,s);e.__snapdomFieldSelection={images:m.map(()=>`linear-gradient(${g},${g})`),positions:m.map(p=>`${p.x}px ${p.y}px`),sizes:m.map(p=>`${p.width}px ${p.height}px`),repeats:m.map(()=>"no-repeat"),origins:m.map(()=>"padding-box"),clips:m.map(()=>"padding-box"),base:{image:s.backgroundImage,position:s.backgroundPosition,size:s.backgroundSize,repeat:s.backgroundRepeat,origin:s.backgroundOrigin,clip:s.backgroundClip}}}function kc(t){for(let e of t.keys()){let n=e.__snapdomFieldSelection;if(!n)continue;delete e.__snapdomFieldSelection;let{images:o,positions:r,sizes:i,repeats:s,origins:a,clips:l,base:f}=n,c=e.style.backgroundImage||f.image;c&&c!=="none"?(o.push(c),r.push(e.style.backgroundPosition||f.position),i.push(e.style.backgroundSize||f.size),s.push(e.style.backgroundRepeat||f.repeat),a.push(e.style.backgroundOrigin||f.origin),l.push(e.style.backgroundClip||f.clip)):(o.push("linear-gradient(transparent,transparent)"),r.push("0% 0%"),i.push("auto"),s.push("repeat"),a.push(f.origin||"padding-box"),l.push(f.clip||"border-box")),e.style.backgroundImage=o.join(","),e.style.backgroundPosition=r.join(","),e.style.backgroundSize=i.join(","),e.style.backgroundRepeat=s.join(","),e.style.backgroundOrigin=a.join(","),e.style.backgroundClip=l.join(",")}}wt();At();var eh=["transform","translate","rotate","scale","transform-origin","transform-box"],nh={circle:["cx","cy","r","vector-effect"],ellipse:["cx","cy","rx","ry","vector-effect"],rect:["x","y","width","height","rx","ry","vector-effect"],path:["d","vector-effect"],line:["vector-effect"],polyline:["vector-effect"],polygon:["vector-effect"],use:["x","y","width","height","vector-effect"],g:[],clipPath:[]},oh={r:"0px",cx:"0px",cy:"0px",x:"0px",y:"0px",rx:"auto",ry:"auto",width:"auto",height:"auto",d:"none","vector-effect":"none",transform:"none",translate:"none",rotate:"none",scale:"none","transform-origin":"0px 0px","transform-box":"view-box"},Mc=new Set(["transform","translate","rotate","scale"]),Ac=new WeakMap,rh=new Map;function ih(t){let e=t.localName,n=nh[e];if(!n)return null;let o=Ml(t);if(o&&(o.size===0||!Al(t)))return null;let r=o?Ac.get(o):rh;r||Ac.set(o,r=new Map);let i=r.get(e);return i||(i=[...n,...eh].filter(s=>!o||o.has(s)),r.set(e,i)),i.length?i:null}var Ec=/^-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?(?:px)?$/i;function sh(t,e){let n=t.trim();if(!Ec.test(n)||!Ec.test(e))return!1;let o=parseFloat(n),r=parseFloat(e);return Math.abs(o-r)<=1e-4*Math.max(1,Math.abs(o))}function ah(t){let e=t.transform?.baseVal;if(!e?.numberOfItems)return null;let n=new DOMMatrix;for(let o=0;o1e-4*Math.max(1,Math.abs(r[i])))return!1;return!0}function ch(t,e,n,o){let r=!1;for(let i of o){if(!r&&(i==="transform-origin"||i==="transform-box")&&!t.hasAttribute("transform"))continue;let s=n.getPropertyValue(i);if(!s)continue;Mc.has(i)&&s!=="none"&&(r=!0);let a=Mc.has(i)&&i!=="transform"?null:t.getAttribute(i);if(a!=null){if(s===a||s===a+"px"||i==="d"||i==="transform"&&(s==="none"||lh(t,s))||sh(a,s))continue}else if(s===oh[i])continue;e.style.setProperty(i,s)}}function fr(t){let e=W(t),n=e.display;if(n==="none"||e.position==="absolute"||e.position==="fixed")return null;let o=/^(block|inline-block|flow-root|flex|inline-flex|grid|inline-grid|list-item)$/.test(n),r=m=>parseFloat(m)||0,i=(m,g,p,h,w)=>{if(!o||!m?.endsWith("px"))return null;let b=parseFloat(m);if(!Number.isFinite(b)||b<0)return null;if(e.boxSizing==="border-box")return b;let x=h-w-p;return b+g+p+(x>0&&b+gur)return!1;let i=n.inkReach||=new WeakMap,s=i.get(t);return s===void 0&&i.set(t,s=dh(t,W(t),n)),r<=s}function Nc(){return{boxes:new WeakMap,rects:new WeakMap,fits:new WeakMap,inkReach:new WeakMap,filterReach:new WeakMap}}function ho(t,e){let n=e.rects;if(!n)return t.getBoundingClientRect();let o=n.get(t);return o||n.set(t,o=t.getBoundingClientRect()),o}function ph(t,e){let n=e.boxes?.get(t);if(n!==void 0)return n;n=null;let o=ho(t,e),r=o.width!==0||o.height!==0?W(t):null;if(r&&(r.display!=="inline"||uh.has((t.localName||"").toLowerCase()))){let i=t.scrollWidth||0,s=t.scrollHeight||0;n={left:r.direction==="rtl"?Math.min(o.left,o.right-i):o.left,top:o.top,right:Math.max(o.right,o.left+i),bottom:Math.max(o.bottom,o.top+s)};let a=r.writingMode||"";(a.startsWith("vertical")||a.startsWith("sideways"))&&(n.top=Math.min(o.top,o.bottom-s),n.left=Math.min(n.left,o.right-i))}return e.boxes?.set(t,n),n}function fs(t,e){if(t===e.root)return!1;let n=ph(t,e);if(!n||Fc(t,n,e))return!1;let o=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;o.nextNode();){let r=o.currentNode,i=ho(r,e);if((i.width>0||i.height>0)&&Fc(r,i,e))return!1}return!0}function us(t,e,n=t){let o=n.cloneNode(!1);return t.tagName==="IMG"&&(o.removeAttribute("src"),o.removeAttribute("srcset"),o.removeAttribute("sizes")),e.husks||(e.husks=new Map),e.husks.set(o,t),o}var hh=/^(block|flow-root|list-item|inline-block)$/,mh=/^(block|flow-root|flex|grid|table)$/;function gh(t){if(!t)return!1;let e=W(t);return hh.test(e.display)&&e.writingMode==="horizontal-tb"&&e.columnCount==="auto"&&e.columnWidth==="auto"}function Tc(t){if(t.localName==="summary"||t.localName==="legend")return!1;let e=W(t);return mh.test(e.display)&&e.float==="none"&&e.clear==="none"&&(e.position==="static"||e.position==="relative")&&e.counterReset==="none"&&e.counterIncrement==="none"&&(e.counterSet||"none")==="none"}function cs(t,e){let n=W(t);return n.display!=="contents"&&(n.position==="static"||n.position==="relative"&&n.top==="0px")&&(n.transform==="none"||n.transform==="matrix(1, 0, 0, 1, 0, 0)")&&(n.translate||"none")==="none"&&(n.rotate||"none")==="none"&&(n.scale||"none")==="none"&&Math.abs(e.width-t.offsetWidth)<1&&Math.abs(e.height-t.offsetHeight)<1}function yh(t,e){for(let n=t.nextElementSibling;n;n=n.nextElementSibling){if(n===e)return!0;if(W(n).display!=="none")return!1}return!1}function dr(t,e,n){let o=n<0?t.previousSibling:t.nextSibling;for(;o;o=n<0?o.previousSibling:o.nextSibling){if(o.nodeType===3&&!/^[ \t\n\r\f]*$/.test(o.data))return null;if(o.nodeType!==1)continue;let s=W(o);if(!(s.display==="none"||s.position==="absolute"||s.position==="fixed"||s.float!=="none")){if(s.display.startsWith("inline"))return null;break}}if(!o)return null;let r=o.getBoundingClientRect();if(!cs(o,r))return null;let i=n<0?e.top-r.bottom:r.top-e.bottom;return i>=0?i:null}function bh(t,e,n,o){let r=[...t.childNodes];for(let i=0;i0&&(t.style.width=`${s}px`,t.style.minWidth=`${s}px`,t.style.maxWidth=`${s}px`),a>0&&(t.style.height=`${a}px`,t.style.minHeight=`${a}px`,t.style.maxHeight=`${a}px`),t.style.visibility="hidden",r.top!==null&&(t.style.marginTop=`${r.top}px`),r.bottom!==null&&(t.style.marginBottom=`${r.bottom}px`),t.style.boxSizing="border-box"}async function Ae(t,e,n){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");for(;e.slicer?.due();)await e.slicer.pause();let o=null,r=null;if(t.nodeType===Node.ELEMENT_NODE){let p=(t.localName||t.tagName||"").toLowerCase(),h=Vt(t);if(h&&(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox"))||t!==n.element&&h||Ni.has(p)||p==="source"&&t.parentElement?.localName==="picture")return null}if(t.nodeType===Node.TEXT_NODE){if(e.selection){let p=vc(t,e.selection);if(p)return p}return t.cloneNode(!0)}if(t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return fr(t);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let p of n.exclude)try{if(t.matches?.(p)){if(n.excludeMode==="hide")return fr(t);if(n.excludeMode==="remove")return null}}catch{U(n,`Invalid exclude selector "${p}"; ignored.`)}if(n.excludePredicates)for(let p of n.excludePredicates)try{if(p(t))return n.excludeMode==="remove"?null:fr(t)}catch(h){U(n,"Your exclude function threw; the element was kept.",h)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide")return fr(t);if(n.filterMode==="remove")return null}}catch(p){U(n,"Your filter function threw; the element was kept.",p)}if(t!==n.element&&!fh.has(t.localName)&&!Ut(t)&&W(t).display==="none"){let p=t.cloneNode(!1);t.tagName==="IMG"&&(p.removeAttribute("src"),p.removeAttribute("srcset")),p.style.setProperty("display","none","important");for(let h of t.querySelectorAll("style")){let w=await Ae(h,e,n);w&&p.appendChild(w)}return p}if(e.clip&&fs(t,e.clip))return us(t,e.clip);if(e.resolveNodeHooks)for(let p of e.resolveNodeHooks){let h;try{h=await p(t,n)}catch(w){U(e,"A plugin's resolveNode hook threw; ignored it.",w)}if(h===null)return null;if(h?.nodeType)return h.nodeType===Node.ELEMENT_NODE&&(e.nodeMap.set(h,t),Et(t,h,e,n)),h}let i=Th.get(t.tagName);if(i&&(t.tagName==="IFRAME"||t.getAttribute("data-capture")!=="placeholder")){let p=await i(t,e,n);if(p!==void 0)return p}if(t.getAttribute("data-capture")==="placeholder"){let p=t.cloneNode(!1);e.nodeMap.set(p,t),Et(t,p,e,n);let h=document.createElement("div");return h.textContent=t.getAttribute("data-placeholder-text")||"",h.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",p.appendChild(h),p}let s;try{if(s=t.cloneNode(!1),tc(t,s),e.nodeMap.set(s,t),t.tagName==="IMG"){fc(t,s,n);try{let p=window.getComputedStyle(t),h=parseFloat(p.width),w=parseFloat(p.height);if(!(h>0)||!(w>0)){let v=jt(t),C=M=>parseFloat(p.getPropertyValue(M))||0,A=p.getPropertyValue("box-sizing")==="border-box";h>0||(h=v.width-(A?0:C("padding-left")+C("padding-right")+C("border-left-width")+C("border-right-width"))),w>0||(w=v.height-(A?0:C("padding-top")+C("padding-bottom")+C("border-top-width")+C("border-bottom-width")))}let b=Math.round((h||0)*1e3)/1e3,x=Math.round((w||0)*1e3)/1e3;b&&(s.dataset.snapdomWidth=String(b)),x&&(s.dataset.snapdomHeight=String(x))}catch(p){U(e,"Couldn't measure an image; kept its own size.",p)}try{let p=t.getAttribute("style")||"",h=window.getComputedStyle(t),w=k=>{let S=p.match(new RegExp(`${k}\\s*:\\s*([^;]+)`,"i")),E=S?S[1].trim():h.getPropertyValue(k);return/%|auto/i.test(String(E||""))},b=parseFloat(s.dataset.snapdomWidth||"0")||0,x=parseFloat(s.dataset.snapdomHeight||"0")||0,v=w("width")||!(b>0),C=w("height")||!(x>0);v&&b>0&&(s.style.width=`${b}px`),C&&x>0&&(s.style.height=`${x}px`);let A=h.getPropertyValue("object-fit"),M=h.getPropertyValue("object-position");A&&A!=="fill"?(s.style.objectFit=A,M&&(s.style.objectPosition=M)):(b>0&&(s.style.minWidth=`${b}px`),x>0&&(s.style.minHeight=`${x}px`))}catch(p){U(e,"Couldn't fix the size of an image.",p)}}}catch(p){throw U(n,"Couldn't copy this element:",[t,p]),p}let a=null,l=t.localName,f=l==="input",c=l==="textarea",u=f||c||l==="select";if(c){let{width:p,height:h}=jt(t),w=p||t.getBoundingClientRect().width||0,b=h||t.getBoundingClientRect().height||0;w&&(s.style.width=`${w}px`),b&&(s.style.height=`${b}px`),(w||b)&&(s.style.boxSizing="border-box")}if(f){let p=(t.type||"text").toLowerCase();if((p==="checkbox"||p==="radio")&&(rt()||t.indeterminate)){let{el:w,applyVisual:b}=bc(t);e.nodeMap.set(w,t),a=b,s=w}else if(p==="range"&&(rt()||K())){let{el:w,applyVisual:b}=yc(t);e.nodeMap.set(w,t),a=b,s=w}else if(p==="color"&&K()){let w=s,b=t.value||"#000000";a=()=>{w.style.setProperty("background-color",b,"important"),w.style.setProperty("color","transparent","important"),w.style.setProperty("-webkit-text-fill-color","transparent","important"),w.style.setProperty("appearance","none","important"),w.style.setProperty("-webkit-appearance","none","important")},w.removeAttribute("value")}else if((p==="date"||p==="time"||p==="datetime-local")&&(rt()||K())){s.setAttribute("type","text");let w=t.value;p==="date"&&t.valueAsDate&&(w=t.valueAsDate.toLocaleDateString(void 0,{timeZone:"UTC"})),s.value=w,s.setAttribute("value",w)}else{let w=Xn(t)?wi(t.value):t.value;(w||t.hasAttribute("value"))&&(s.value=w,s.setAttribute("value",w)),t.checked!==void 0&&(s.checked=t.checked,t.checked?s.setAttribute("checked",""):s.removeAttribute("checked"),t.indeterminate&&(s.indeterminate=t.indeterminate))}}if((f||c)&&!t.value&&t.placeholder)try{let p=window.getComputedStyle(t,"::placeholder"),h=p&&p.color;h&&h!=="rgba(0, 0, 0, 0)"&&(e.usesPlaceholder=!0,s.setAttribute("data-sd-ph",""),s.style.setProperty("--sd-ph",h),s.style.setProperty("--sd-ph-o",p.opacity||"1"))}catch{}if(l==="select"&&(o=new Set(Array.from(t.options).filter(p=>p.selected))),c&&(r=t.value),u){t.disabled&&s.setAttribute("disabled",""),t.required&&s.setAttribute("required",""),t.readOnly&&s.setAttribute("readonly","");let p=t;p.min!==void 0&&p.min!==""&&s.setAttribute("min",p.min),p.max!==void 0&&p.max!==""&&s.setAttribute("max",p.max),p.pattern!==void 0&&p.pattern!==""&&s.setAttribute("pattern",p.pattern);let h=t.getAttribute("aria-invalid");h!==null&&s.setAttribute("aria-invalid",h)}if(ir(t)||Et(t,s,e,n),a&&a(),n.captureSelection&&(f||c))try{Cc(t,s)}catch(p){U(e,"Couldn't copy the selection of a text field.",p)}if(Ut(t)&&!ir(t)){let p=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display","color"];try{let h=window.getComputedStyle(t);for(let b of p){let x=h.getPropertyValue(b);x&&s.style.setProperty(b,x)}t.localName==="stop"&&(s.style.setProperty("stop-color",h.getPropertyValue("stop-color")),s.style.setProperty("stop-opacity",h.getPropertyValue("stop-opacity")));let w=ih(t);w&&ch(t,s,h,w)}catch{}}let d=t.shadowRoot,y=null;if(d){y=new Set,qi(d);for(let E of d.querySelectorAll("slot"))for(let R of E.assignedNodes?.()||[])y.add(R);let p=e.shadowScopes||=new WeakMap,h=0;for(let E=t;E=E.assignedSlot||E.parentNode||(E.nodeType===11?E.host:null);)E.shadowRoot&&p.has(E.shadowRoot)&&h++;let w=`s${e.shadowScopeSeq=(e.shadowScopeSeq||0)+1}`,b=lc(d,e.shadowSheets||=new WeakMap),x=(e.shadowGroups||=[])[h]||=new Map,v=b&&x.get(b),C="";v||(v={id:w,vars:uc(b),share:!Xa.test(b),unstable:Yi.test(b)},b&&x.set(b,v),!e.shadowPseudo&&/::?(?:before|after|first-l|marker)|counter/.test(b)&&(e.shadowPseudo=!0),C=ac(b,`[data-sd~="${w}"]`,w));let A=v.id===w?w:`${w} ${v.id}`;p.set(d,v.id),v.share&&(e.shadowShare||=new WeakMap).set(d,v.unstable),s.setAttribute("data-sd",A);let M=dc(t,v.vars,`[data-sd="${A}"]`);cc(s,M+C,h);let k=[],S=!1;for(let E of Array.from(d.childNodes))if(!(E.nodeType===Node.ELEMENT_NODE&&E.tagName==="STYLE")){if(E.nodeType!==Node.ELEMENT_NODE&&(E.nodeType!==Node.TEXT_NODE||!e.selection)){k.push(E.cloneNode(!0));continue}k.push(Ae(E,e,n).catch(()=>null)),S=!0}for(let E of S?await Promise.all(k):k)E&&s.appendChild(E)}if(t.tagName==="SLOT"){let p=e.shadowScopes?.get(t.getRootNode()),h=t.assignedNodes?.()||[],w=h.length?t.assignedNodes?.({flatten:!0})||h:[],b=w.length?w:Array.from(t.childNodes),x=document.createDocumentFragment(),v=await Promise.all(b.map(C=>Ae(C,e,n).then(A=>(A&&h.length&&pc(A,p),A||null)).catch(()=>null)));return x.append(...v.filter(C=>!!C)),x}let m=[],g=!1;for(let p of Array.from(t.childNodes))if(!(d&&(y.has(p)||!p.assignedSlot))){if(p.nodeType!==Node.ELEMENT_NODE&&(p.nodeType!==Node.TEXT_NODE||!e.selection)){m.push(p.cloneNode(!0));continue}m.push(Ae(p,e,n).catch(()=>null)),g=!0}for(let p of g?await Promise.all(m):m)p&&s.appendChild(p);if(o&&be(s,"select")){let p=!1;for(let h of s.options){let w=o.has(e.nodeMap.get(h));h.selected=w,w?h.setAttribute("selected",""):h.removeAttribute("selected"),p||=w}if(!p&&!s.multiple){let h=s.ownerDocument.createElement("option");h.hidden=!0,h.style.setProperty("display","none","important"),h.setAttribute("selected",""),h.value="",s.appendChild(h)}}return r!==null&&be(s,"textarea")&&(s.textContent=r),s}async function Ch(t,e,n){let o=!1;try{o=!!(t.contentDocument||t.contentWindow?.document)}catch(a){U(e,"Couldn't tell if an iframe is same-origin; treated it as cross-origin.",a)}if(o)try{return await as(t,e,n)}catch(a){at(e,"iframe-failed","same-origin iframe failed to rasterize",a),U(n,"Couldn't capture an iframe, so it was left out.",a)}o||(at(e,"iframe-cross-origin",`cross-origin iframe replaced by ${n.placeholders?"a placeholder":"a spacer"}`,t),U(n,n.placeholders?"Can't capture a cross-origin iframe; showing a placeholder. Set placeholders: false to hide it.":"Can't capture a cross-origin iframe; left it out.",t));let{width:r,height:i}=jt(t),s=document.createElement("div");return s.style.cssText=n.placeholders?`width:${r}px;height:${i}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`:`display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`,Et(t,s,e,n),s}function po(t){try{let e=Math.max(1,Math.min(32,t.width)),n=Math.max(1,Math.min(32,t.height)),o=document.createElement("canvas");o.width=e,o.height=n;let r=o.getContext("2d",{willReadFrequently:!0});if(!r)return!1;r.drawImage(t,0,0,e,n);let i=r.getImageData(0,0,e,n).data;for(let s=3;s0&&(r.style.width=`${i}px`),s>0&&(r.style.height=`${s}px`),r.style.boxSizing="border-box";let a=W(t),l=f=>parseFloat(f)||0;return r.dataset.snapdomWidth=String(i-l(a.paddingLeft)-l(a.paddingRight)-l(a.borderLeftWidth)-l(a.borderRightWidth)),r.dataset.snapdomHeight=String(s-l(a.paddingTop)-l(a.paddingBottom)-l(a.borderTopWidth)-l(a.borderBottomWidth)),e.nodeMap.set(r,t),Et(t,r,e,n),r}async function Rh(t,e,n){let o="",r=t.poster&&t.paused&&!t.currentTime&&!t.played.length,i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch{}if(!r)try{let l=document.createElement("canvas");l.width=t.videoWidth||t.offsetWidth||320,l.height=t.videoHeight||t.offsetHeight||240;let f=l.getContext("2d");f&&(f.drawImage(t,0,0,l.width,l.height),o=l.toDataURL(Mh(f,l.width,l.height)?"image/jpeg":"image/png",kh),(!o||o==="data:,")&&(o=""))}catch(l){U(e,"Couldn't capture a video frame; used its poster.",l)}o?i.src=o:t.poster&&(i.src=t.poster),i.width=t.videoWidth||t.offsetWidth||0,i.height=t.videoHeight||t.offsetHeight||0;let{width:s,height:a}=jt(t);return s>0&&(i.style.width=`${s}px`),a>0&&(i.style.height=`${a}px`),i.style.boxSizing="border-box",i.style.objectFit=W(t).objectFit||"contain",e.nodeMap.set(i,t),Et(t,i,e,n),i}async function Fh(t,e,n){if(!t.controls)return;let{width:o,height:r}=jt(t),i=Math.round(o||t.offsetWidth||300),s=Math.round(r||t.offsetHeight||54),a=s/2,l=Math.max(4,s*.16),f=s*.34,c=i-s*.34,u=f+l+s*.55,d=Math.max(0,c-s*.7-u),y=Math.max(9,Math.round(s*.24)),m=`0:00`,g=document.createElement("img");try{g.decoding="sync",g.loading="eager"}catch{}return g.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(m)}`,g.width=i,g.height=s,g.style.width=`${i}px`,g.style.height=`${s}px`,e.nodeMap.set(g,t),Et(t,g,e,n),g}async function $c(t,e,n){let o=t.getAttribute("data")||t.getAttribute("src")||"",r=(t.getAttribute("type")||"").toLowerCase(),i=/^image\//.test(r)||/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)(\?|#|$)/i.test(o);if(o&&i){let s=document.createElement("img");try{s.decoding="sync",s.loading="eager"}catch{}s.src=o;let{width:a,height:l}=jt(t);return a>0&&(s.style.width=`${a}px`),l>0&&(s.style.height=`${l}px`),s.style.boxSizing="border-box",e.nodeMap.set(s,t),Et(t,s,e,n),s}if(sr(t))try{let s=await as(t,e,n);if(s)return s}catch{}o&&(at(e,"embed-fallback",`<${t.localName}> not capturable, using its fallback content: ${o}`),U(n,`Couldn't capture <${t.localName}>${r?` (${r})`:""}; showing its fallback content.`))}var Th=new Map([["IFRAME",Ch],["CANVAS",Eh],["VIDEO",Rh],["AUDIO",Fh],["OBJECT",$c],["EMBED",$c]]);At();function ie(t={},e=null){return{styleMap:e?e.styleMap:new Map,styleCache:e?e.styleCache:new WeakMap,nodeMap:e?e.nodeMap:new Map,warnings:e?null:[],resolveNodeHooks:null,animated:null,styleShare:t.__styleShare,slicer:null,fontUsage:null,tornSinceStart:null,retain:null,rootBox:null,compressedAssets:e?e.compressedAssets:null,compressionDensity:e?e.compressionDensity:void 0,compressedSnapshot:null,layoutZoom:1,fileSvg:null,artifacts:null}}function mo(t,e,n){return{options:e,styleMap:t.styleMap,styleCache:t.styleCache,nodeMap:n,warnings:t.warnings,styleShare:t.styleShare,resolveNodeHooks:t.resolveNodeHooks,animated:t.animated,slicer:t.slicer,clip:null,selection:null,shadowScopes:null,shadowShare:null,shadowSheets:null,shadowGroups:null,shadowScopeSeq:0,shadowPseudo:!1,pseudoCSS:"",pseudoRuleSeq:0,counterCtx:null,siblingCounters:null,usesPlaceholder:!1,scan:null,scanEnv:null,shadowUniverse:void 0,share:null,oneLine:null,axes:null,range:null,stylesCtx:null,stylesCtxOpts:null,bumpedForDisabled:!1,bgClipText:null,reconcileRisk:0}}xt();wt();pt();At();var $h=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],Mn=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{});function Ph(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _c(t,e){let n=Array.isArray(t)?t:t?[t]:[],o=[];for(let r of n)r instanceof RegExp?o.push(r.global||r.sticky?new RegExp(r.source,r.flags.replace(/[gy]/g,"")):r):typeof r=="string"?o.push(new RegExp(Ph(r),"i")):U(e,"Ignored an iconFonts entry: use a string or a RegExp.",r);return o}function Jt(t,e){let n=typeof t=="string"?t:"";for(let o of $h)if(o.test(n))return!0;if(e){for(let o of e)if(o instanceof RegExp&&o.test(n))return!0}return!!(/icon/i.test(n)||/glyph/i.test(n)||/symbols/i.test(n)||/feather/i.test(n)||/fontawesome/i.test(n))}function ds(t,e){if(typeof t!="string"||!t)return!1;let n;try{n=new URL(t,typeof location<"u"?location.href:void 0)}catch{return Jt(t,e)}let o=n.searchParams.getAll("family").flatMap(r=>r.split("|")).map(r=>r.split(":")[0].trim()).filter(Boolean);return o.length?o.every(r=>Jt(r,e)):Jt(t,e)}async function Ic(t,e,n,o=32,r="#000",i="normal"){e=e.replace(/^['"]+|['"]+$/g,"");let s=window.devicePixelRatio||1;try{await Kn()}catch{}let a=document.createElement("span");it(a),a.textContent=t,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${e}"`,a.style.fontWeight=n||"normal",a.style.fontStyle=i||"normal",a.style.fontSize=`${o}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let l=a.getBoundingClientRect(),f=Math.ceil(l.width),c=Math.ceil(l.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,f*s),u.height=Math.max(1,c*s);let d=u.getContext("2d");d.scale(s,s),d.font=`${i||"normal"} ${n||"normal"} ${o}px "${e}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=r,d.fillText(t,0,0);let y=d.measureText(t).actualBoundingBoxAscent;d.textBaseline="alphabetic";let m=d.measureText(t).actualBoundingBoxAscent,g=c-(m-y);return{dataUrl:u.toDataURL(),width:f,height:c,advance:l.width,descent:Number.isFinite(g)?g:0}}function Nh(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var mr=new Map;function Lh(t=""){let e=Object.create(null),n=String(t||""),o=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,r;for(;r=o.exec(n);)e[r[1].toUpperCase()]=Number(r[2]);return e}async function _h(t,e,n){let o=String(t||""),r=o.toLowerCase(),i=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(r)&&!/\bsymbols\b/.test(r))return{familyForMeasure:o,familyForCanvas:o};if(!/\bmaterial\s*symbols\b/.test(r))return{familyForMeasure:o,familyForCanvas:o};let a=n&&(n.FILL??n.fill),l="outlined";/\brounded\b/.test(i)||/\bround\b/.test(i)?l="rounded":/\bsharp\b/.test(i)?l="sharp":/\boutlined\b/.test(i)&&(l="outlined");let f=a===1,c=null;if(f&&(l==="outlined"&&Mn.materialIconsFilled?c={url:Mn.materialIconsFilled,alias:"snapdom-mi-filled"}:l==="rounded"&&Mn.materialIconsRound?c={url:Mn.materialIconsRound,alias:"snapdom-mi-round"}:l==="sharp"&&Mn.materialIconsSharp&&(c={url:Mn.materialIconsSharp,alias:"snapdom-mi-sharp"})),!c)return{familyForMeasure:o,familyForCanvas:o};if(!mr.has(c.alias))try{let d=new FontFace(c.alias,`url(${c.url})`,{style:"normal",weight:"400"});await d.load(),document.fonts.add(d),mr.set(c.alias,!0)}catch{return mr.set(c.alias,!1),{familyForMeasure:o,familyForCanvas:o}}if(mr.get(c.alias)===!1)return{familyForMeasure:o,familyForCanvas:o};let u=`"${c.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function Ih(t="Material Icons",e=24){try{await Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),Kn()])}catch{}}function Oh(t){let e=t.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(e)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e);if(e&&!n&&e.toLowerCase()!=="currentcolor")return e;let o=t.color?.trim();return o&&o!=="inherit"?o:"#000"}async function Wh(t,{family:e="Material Icons",weight:n="normal",fontSize:o=32,color:r="#000",variation:i="",className:s=""}={}){let a=String(e||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,f=Lh(i),{familyForMeasure:c,familyForCanvas:u}=await _h(a,s,f);await Ih(u.replace(/^["']+|["']+$/g,""),o);let d=document.createElement("span");it(d),d.textContent=t,d.style.position="absolute",d.style.visibility="hidden",d.style.left="-99999px",d.style.whiteSpace="nowrap",d.style.fontFamily=c,d.style.fontWeight=String(n||"normal"),d.style.fontSize=`${o}px`,d.style.lineHeight="1",d.style.margin="0",d.style.padding="0",d.style.fontFeatureSettings="'liga' 1",d.style.fontVariantLigatures="normal",d.style.color=r,document.body.appendChild(d);let y=d.getBoundingClientRect(),m=Math.max(1,Math.ceil(y.width)),g=Math.max(1,Math.ceil(y.height));document.body.removeChild(d);let p=document.createElement("canvas");p.width=m*l,p.height=g*l;let h=p.getContext("2d");h.scale(l,l),h.font=`${n?`${n} `:""}${o}px ${u}`,h.textAlign="left",h.textBaseline="top",h.fillStyle=r;try{h.fontKerning="normal"}catch{}return h.fillText(t,0,0),{dataUrl:p.toDataURL(),width:m,height:g}}async function gr(t,e,n=new Map){if(t?.nodeType!==1)return 0;let o='.material-icons, [class*="material-symbols"]',r=Array.from(t.querySelectorAll(o)).filter(a=>a&&a.textContent&&a.textContent.trim());if(t.matches?.(o)&&t.textContent&&t.textContent.trim()&&r.unshift(t),r.length===0)return 0;let i=e?.nodeType===1?Array.from(e.querySelectorAll(o)).filter(a=>a&&a.textContent&&a.textContent.trim()):[];e?.nodeType===1&&e.matches?.(o)&&e.textContent&&e.textContent.trim()&&i.unshift(e);let s=0;for(let a=0;a0?{height:r,descent:r-i}:null}finally{n.remove()}}At();$t();function ps(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function Oc(t,e=!1){let n="",o=Math.max(1,t);for(;o>0;)o--,n=String.fromCharCode(97+o%26)+n,o=Math.floor(o/26);return e?n.toUpperCase():n}function Wc(t,e=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],o=Math.max(1,Math.min(3999,t)),r="";for(let[i,s]of n)for(;o>=i;)r+=s,o-=i;return e?r:r.toLowerCase()}function Dc(t,e){switch((e||"decimal").toLowerCase()){case"decimal":return String(t);case"decimal-leading-zero":{let n=Math.abs(t);return(t<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":case"lower-latin":return Oc(t,!1);case"upper-alpha":case"upper-latin":return Oc(t,!0);case"lower-roman":return Wc(t,!1);case"upper-roman":return Wc(t,!0);case"none":return"";case"disc":return"\u2022";case"circle":return"\u25E6";case"square":return"\u25AA";default:return String(t)}}function go(t,e){let n=(t||"").trim().split(/[\s,]+/).filter(Boolean),o=[];for(let r=0;rf&&f.tagName==="LI",r=new WeakMap,i=f=>{let c=new Map;for(let[u,d]of f)c.set(u,d.slice());return c},s=(f,c,u)=>{let d=i(f),y;try{y=getComputedStyle(u)}catch{y=u.style}let m;try{m=y?.counterReset}catch{}if(m&&m!=="none")for(let[h,w]of go(m,0)){let b=c.get(h);if(b&&b.length){let x=b.slice();x.push(w),d.set(h,x)}else d.set(h,[w])}let g;try{g=y?.counterSet}catch{}if(g&&g!=="none")for(let[h,w]of go(g,0)){let b=d.get(h)||[];b.length===0&&b.push(0),b[b.length-1]=w,d.set(h,b)}let p;try{p=y?.counterIncrement}catch{}if(p&&p!=="none")for(let[h,w]of go(p,1)){let b=d.get(h)||[];b.length===0&&b.push(0),b[b.length-1]+=w,d.set(h,b)}try{if(y?.display==="list-item"&&o(u)){let h=u.parentElement,w=h&&r.get(h),b=h?.tagName==="OL"?parseInt(h.getAttribute("start"),10):NaN,x=w===void 0?Number.isFinite(b)?b:1:w+1,v=h?.tagName==="OL"?parseInt(u.getAttribute("value"),10):NaN;Number.isFinite(v)&&(x=v),h&&r.set(h,x);let C=d.get("list-item")||[];C.length===0&&C.push(0),C[C.length-1]=x,d.set("list-item",C)}}catch{}return d},a=(f,c,u)=>{let d=s(u,c,f);e.set(f,d);let y=d;for(let g of f.children)y=a(g,d,y);let m=new Map;for(let[g,p]of u){let h=p.length,w=y.get(g);m.set(g,w&&w.length?w.slice(0,h):p.slice())}for(let[g,p]of y)!m.has(g)&&p.length&&!c.has(g)&&m.set(g,p.slice(0,1));return m},l=new Map;return a(n,l,l),{get(f,c){let u=e.get(f)?.get(c);return u&&u.length?u[u.length-1]:0},getStack(f,c){let u=e.get(f)?.get(c);return u?u.slice():[]}}}var Uh=/\b(counter|counters)\s*\(((?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^)"'])+)\)/g,Hh=/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^,"'])+/g;function zc(t,e,n){if(!t||t==="none")return t;try{return t.replace(Uh,(o,r,i)=>{let s=(String(i).match(Hh)||[]).map(a=>a.trim());if(r==="counter"){let a=s[0]?.replace(/^["']|["']$/g,""),l=(s[1]||"decimal").toLowerCase(),f=n.get(e,a);return Dc(f,l)}else{let a=s[0]?.replace(/^["']|["']$/g,""),l=s[1]?.replace(/^["']|["']$/g,"")??"",f=(s[2]||"decimal").toLowerCase(),c=n.getStack(e,a);return c.length?c.map(d=>Dc(d,f)).join(l):""}})}catch{return"- "}}we();Ot();var Uc=new WeakMap;function Vh(t){let e=t.adoptedStyleSheets;if(!Array.isArray(e))return;let n=e.length+"/";for(let r of e)n+=r.cssRules.length+",";let o=Uc.get(t);Uc.set(t,n),o!==void 0&&o!==n&&bn()}function Hc(t){let e;return!!((e=t.borderTopStyle)&&e!=="none"&&e!=="hidden"&&parseFloat(t.borderTopWidth)>0||(e=t.borderRightStyle)&&e!=="none"&&e!=="hidden"&&parseFloat(t.borderRightWidth)>0||(e=t.borderBottomStyle)&&e!=="none"&&e!=="hidden"&&parseFloat(t.borderBottomWidth)>0||(e=t.borderLeftStyle)&&e!=="none"&&e!=="hidden"&&parseFloat(t.borderLeftWidth)>0)}function jh(t,e){let n=null,o=()=>{if(!n)try{n=Bc(t)}catch(r){U(e,"Couldn't compute CSS counters; list numbers may be off.",r),n={get:()=>0,getStack:()=>[]}}return n};return{get(r,i){return o().get(r,i)},getStack(r,i){return o().getStack(r,i)}}}function Gh(t){let e=!1;for(let n=0;n{if(n){let r=parseInt(n,16);return r===0||r>1114111?"\uFFFD":String.fromCodePoint(r)}return o===` +`?"":o})}function Vc(t){if(!t)return"";let e=[],n=/"((?:\\[\s\S]|[^"\\])*)"|'((?:\\[\s\S]|[^'\\])*)'/g,o=0,r;for(;r=n.exec(t);){let s=t.slice(o,r.index).trim();s&&e.push(s),e.push(qh(r[1]!==void 0?r[1]:r[2])),o=n.lastIndex}let i=t.slice(o).trim();return i&&e.push(i),e.join("")}function Xh(t,e,n){let o=t.parentElement,r=o&&n?n.get(o):null;return r?{get(i,s){let a=e.get(i,s),l=r.get(s);return typeof l=="number"?Math.max(a,l):a},getStack(i,s){let a=e.getStack(i,s);if(!a.length)return a;let l=r.get(s);if(typeof l=="number"){let f=a.slice();return f[f.length-1]=Math.max(f[f.length-1],l),f}return a}}:e}function Yh(t,e,n){let o=new Map,r=(f,c)=>go(f,c).map(([u,d])=>({name:u,num:d})),i=r(e?.counterReset,0),s=r(e?.counterSet,0),a=r(e?.counterIncrement,1);function l(f){if(o.has(f))return o.get(f).slice();let c=n.getStack(t,f);c=c.length?c.slice():[];let u=i.find(m=>m.name===f);if(u){let m=Number.isFinite(u.num)?u.num:0;c=c.length?[...c,m]:[m]}let d=s.find(m=>m.name===f);if(d){let m=Number.isFinite(d.num)?d.num:0;c.length===0&&(c=[0]),c[c.length-1]=m}let y=a.find(m=>m.name===f);if(y){let m=Number.isFinite(y.num)?y.num:1;c.length===0&&(c=[0]),c[c.length-1]+=m}return o.set(f,c.slice()),c}return{get(f,c){let u=l(c);return u.length?u[u.length-1]:0},getStack(f,c){return l(c)},incs:a}}var Kh=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","letter-spacing","line-height"],Zh=["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 jc(t,e,n,o,r,i){try{if(o===null){if(t.getRootNode()!==(t.ownerDocument||document))return;let u=W(t).display||"";if(r==="::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(r==="::marker"&&!(W(t).display||"").includes("list-item"))return;let s=W(t,r),a=W(t);if(!s)return;let l="";for(let u of i){let d=s.getPropertyValue(u);d&&d!==a.getPropertyValue(u)&&!(u==="background-color"&&d==="rgba(0, 0, 0, 0)")&&!(u==="vertical-align"&&d==="baseline")&&(l+=`${u}:${d};`)}if(r==="::marker"){let u=s.getPropertyValue("content");u&&u!=="normal"&&u!=="none"&&(l+=`content:${u};`)}if(!l)return;let c=`data-sd-p${n.pseudoRuleSeq=(n.pseudoRuleSeq||0)+1}`;e.setAttribute(c,""),n.pseudoCSS=(n.pseudoCSS||"")+`[${c}]${r}{${l}}`}catch{}}function Jh(t,e){if(!/\b(?:no-)?(?:open|close)-quote\b/.test(t))return t;let n="\u201C",o="\u201D";try{let r=W(e).quotes;if(r==="none")n="",o="";else if(r&&r!=="auto"){let i=r.match(/"[^"]*"|'[^']*'/g);i&&i.length>=2&&(n=i[0].slice(1,-1),o=i[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,(r,i)=>i?i==="open-quote"?`"${n}"`:i==="close-quote"?`"${o}"`:'""':r)}function Qh(t,e,n,o){let r=e.content;if(!r||r==="none"||r==="normal")return{text:"",incs:[]};r=Gh(r),r=Jh(r,t);let i=e.counterIncrement;if(!ps(r)&&(!i||i==="none"))return{text:Vc(r),incs:[]};let s=Xh(t,n,o),a=Yh(t,e,s),l=ps(r)?zc(r,t,a):r;return{text:Vc(l),incs:a.incs||[],derived:a}}function tm(t,e){if(e.shadowPseudo)return!1;let n=Me(t),o=[];for(let i of["before","after","firstLetter","marker","firstLine"]){let s=n[i];if(s===null)return!1;s&&o.push(s)}if(!o.length)return!0;let r=o.join(",");try{return!t.matches(r)&&t.querySelector(r)===null}catch{return!1}}async function An(t,e,n,o,r=!1){if(t?.nodeType!==1||e?.nodeType!==1||(n.slicer?.due()&&await n.slicer.pause(),t.tagName==="TEXTAREA")||!r&&(oe(),Vh(t.ownerDocument||document),tm(t,n)))return;n.siblingCounters||(n.siblingCounters=new WeakMap),n.counterCtx||(n.counterCtx=jh(t.ownerDocument||document,n));let i=n.counterCtx,s=Me(t);s.marker!==""&&jc(t,e,n,s.marker,"::marker",Kh),s.firstLine!==""&&jc(t,e,n,s.firstLine,"::first-line",Zh);for(let a of["::before","::after","::first-letter"]){let l=s[a==="::before"?"before":a==="::after"?"after":"firstLetter"];if(l!==null){if(l==="")continue;try{if(!t.matches(l))continue}catch{}}let f=null;if(a==="::first-letter"){for(let c=e.firstChild;c&&!f;c=c.nextSibling)c.nodeType===3&&c.data.trim()&&(f=c);if(!f)continue}try{let c=W(t,a);if(!c)continue;let u=c.content,d=c.display;if(u==="-moz-alt-content"||u==="none"&&c.backgroundImage==="none"&&(c.backgroundColor==="transparent"||c.backgroundColor==="rgba(0, 0, 0, 0)")&&!Hc(c)&&(!c.transform||c.transform==="none")&&d==="inline")continue;if(d==="none"||a!=="::first-letter"&&(u==="none"||u==="normal")){a==="::before"&&e.setAttribute("data-snapdom-has-before","1"),a==="::after"&&e.setAttribute("data-snapdom-has-after","1");continue}if(a==="::first-letter"){let X=W(t),J=(X?.display||"").toLowerCase();if(J.includes("flex")||J.includes("grid"))continue;let Y=Ie=>c[Ie]!==X[Ie]&&(parseFloat(c[Ie])||0)!==0;if(!(c.color!==X.color||c.fontSize!==X.fontSize||c.fontWeight!==X.fontWeight||c.fontFamily!==X.fontFamily||c.fontStyle!==X.fontStyle||c.textTransform!==X.textTransform||c.float!==X.float&&c.float!=="none"||Y("paddingTop")||Y("paddingRight")||Y("paddingBottom")||Y("paddingLeft")||Y("marginTop")||Y("marginRight")||Y("marginBottom")||Y("marginLeft")))continue;let te=f.textContent,St=/^\s*/.exec(te)[0],jn=te.slice(St.length),Pe=jn.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['\u2019])?)/u)?.[0],ae=jn.slice(Pe?.length||0);if(!Pe||/[\uD800-\uDFFF]/.test(Pe))continue;let It=document.createElement("span");It.textContent=Pe,It.setAttribute("data-snapdom-pseudo","::first-letter");let Ne=wn(t,n),on=un(c,Ne),Le=He(on,"span",!0,!1,"",Ne);n.styleMap.set(It,Le);let _e=document.createTextNode(ae);e.replaceChild(_e,f),e.insertBefore(It,_e),St&&e.insertBefore(document.createTextNode(St),It);continue}let g=u??"",p=g===""||g==="none"||g==="normal",{text:h,incs:w,derived:b}=Qh(t,c,i,n.siblingCounters),x=c.backgroundImage,v=c.backgroundColor,C=c.fontFamily,A=parseInt(c.fontSize)||32,M=parseInt(c.fontWeight)||!1,k=c.fontStyle||"normal",S=c.color||"#000",E=c.transform,R=Jt(C,o?.__iconMatchers),F=!p&&h!=="",N=x&&x!=="none",P=v&&v!=="transparent"&&v!=="rgba(0, 0, 0, 0)",_=Hc(c),O=E&&E!=="none",B=g!=="none"&&g!=="normal",D=/^inline-/.test(d||""),z=B&&((parseFloat(c.width)||0)>0||(parseFloat(c.height)||0)>0||D),$=c.boxShadow,T=c.outlineStyle,L=B&&$&&$!=="none",I=B&&T&&T!=="none"&&(parseFloat(c.outlineWidth)||0)>0;if(!(F||N||P||_||O||z||L||I)){if(w&&w.length&&t.parentElement){let X=n.siblingCounters.get(t.parentElement)||new Map;for(let{name:J}of w)J&&X.set(J,b.get(t,J));n.siblingCounters.set(t.parentElement,X)}continue}let Q=h.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(h),j=d==="inline"&&c.cssFloat==="none"&&c.position!=="absolute"&&c.position!=="fixed",q=!1;if(F&&!R&&h.length>1&&!Q&&j){let X=W(t),J=parseFloat(X.fontSize)||16,Y=parseFloat(X.lineHeight);Number.isFinite(Y)||(Y=J*1.5),t.getBoundingClientRect().height=1.5*(parseFloat(c.lineHeight)||(parseFloat(c.fontSize)||16)*1.2)&&(Rt=!1,V.style.whiteSpace=c.whiteSpace);let Vn=He(gt,"span",Rt,ht,"",wn(t,n));if(n.styleMap.set(V,Vn),R&&h&&[...h].length===1){let{dataUrl:X,height:J,advance:Y,descent:Ft}=await Ic(h,C,M,A,S,k),te=document.createElement("img");te.src=X,te.style=`height:${A}px;width:${Y/J*A}px;object-fit:contain;vertical-align:${-Ft}px;`,V.appendChild(te)}else if(h&&Q){let X=qn(h,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??Oe(h);if(X?.trim())try{let J=await bt(ye(X),{as:"dataURL",useProxy:o.useProxy,debug:o.debug});if(J?.ok&&typeof J.data=="string"){let Y=document.createElement("img");Y.src=J.data,Y.style=`width:${A}px;height:auto;object-fit:contain;`,V.appendChild(Y)}}catch(J){U(o,`Couldn't draw the ${a} icon of`,[t,J])}}else!R&&F&&(V.textContent=h);V.style.backgroundImage="none","maskImage"in V.style&&(V.style.maskImage="none"),"webkitMaskImage"in V.style&&(V.style.webkitMaskImage="none");try{V.style.backgroundClip=c.backgroundClip,N&&(V.style.backgroundRepeat=c.backgroundRepeat,V.style.backgroundSize=c.backgroundSize,c.backgroundPositionX&&c.backgroundPositionY?(V.style.backgroundPositionX=c.backgroundPositionX,V.style.backgroundPositionY=c.backgroundPositionY):V.style.backgroundPosition=c.backgroundPosition,V.style.backgroundOrigin=c.backgroundOrigin,V.style.backgroundAttachment=c.backgroundAttachment,V.style.backgroundBlendMode=c.backgroundBlendMode)}catch{}if(N)try{let X=Ce(x),J=await Promise.all(X.map(Y=>sn(Y,o)));V.style.backgroundImage=J.join(", ")}catch(X){U(o,`Couldn't load the ${a} background image.`,X)}P&&(V.style.backgroundColor=v);let qt=c.maskImage||c.webkitMaskImage;if(qt&&qt!=="none")try{let J=(await Promise.all(Ce(qt).map(Y=>sn(Y,o)))).join(", ");V.style.maskImage=J,V.style.webkitMaskImage=J;for(let Y of["maskSize","maskRepeat","maskPosition","maskMode","maskComposite","maskOrigin","maskClip"])c[Y]&&(V.style[Y]=c[Y])}catch(X){U(o,`Couldn't load the ${a} mask image.`,X)}let nn=V.childNodes.length>0||V.textContent?.trim()!==""||N||P||_||O||z||L||I;if(w&&w.length&&t.parentElement){let X=n.siblingCounters.get(t.parentElement)||new Map;for(let{name:J}of w){if(!J)continue;let Y=b.get(t,J);X.set(J,Y)}n.siblingCounters.set(t.parentElement,X)}if(!nn)continue;a==="::before"?(e.setAttribute("data-snapdom-has-before","1"),e.insertBefore(V,e.firstChild)):(e.setAttribute("data-snapdom-has-after","1"),e.appendChild(V))}catch(c){at(n,"pseudo-failed",`${a} could not be copied`,t),U(o,`Couldn't copy the ${a} of`,[t,c])}}if(n.nodeMap)for(let a=e.firstElementChild;a;a=a.nextElementSibling){let l=n.nodeMap.get(a);l?.nodeType===1&&!a.hasAttribute("data-snapdom-pseudo")&&await An(l,a,n,o,!0)}else{let a=Array.from(e.children).filter(f=>!f.hasAttribute("data-snapdom-pseudo")),l=Array.from(t.children);for(let f=0;fb+x.width,0),w=0;a=r.map(b=>{let x={x:b.left-i-w,y:b.top-s,w:h,h:b.height,top:b.top,bottom:b.bottom};return w+=b.width,x})}else{let h=t.clientWidth||r[0].width,w=t.clientHeight||r[0].height;a=[{x:0,y:0,w:h,h:w,top:-1/0,bottom:1/0}]}let l=e.ownerDocument,f=`sd-bct-${Math.random().toString(36).slice(2,9)}`,c=em.map(h=>`${h}:${o.getPropertyValue(h)}`).join(";").replace(/"/g,"'"),u="";a.forEach((h,w)=>{let b=`
`;u+=``});let d="",y=l.createElement("canvas").getContext("2d"),m=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT),g=t.ownerDocument.createRange();for(let h=m.nextNode();h;h=m.nextNode()){let w=n.getComputedStyle(h.parentElement);y.font=w.font;let b=y.measureText("X").fontBoundingBoxAscent;if(!Number.isFinite(b))return;let x=w.font.replace(/"/g,"'"),v=a.map(()=>({xs:[],ys:[],chars:""})),C=h.data;for(let A=0;A=55296&&C.charCodeAt(A)<=56319?2:1;g.setStart(h,A),g.setEnd(h,A+M);let k=g.getClientRects()[0],S=C.slice(A,A+M);if(A+=M-1,!k||!S.trim())continue;let E=(k.top+k.bottom)/2,R=a.findIndex(F=>E>=F.top&&E<=F.bottom);R<0&&(R=0),v[R].xs.push(+(k.left-i).toFixed(2)),v[R].ys.push(+(k.top-s+b).toFixed(2)),v[R].chars+=S}v.forEach((A,M)=>{if(!A.chars)return;let k=A.chars.replace(/&/g,"&").replace(/${k}`})}if(!d)return;let p=l.createElementNS(Gc,"svg");p.setAttribute("style","position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none"),p.innerHTML=`${u}${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(p,e.firstChild)}Ot();$t();function Xc(t,e,n){if(!t||t?.nodeType!==1)return;let o=t.ownerDocument||document,r=e||o,i=Ut(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,"\\$&"),f="http://www.w3.org/1999/xlink",c=C=>{if(!C||!C.getAttribute)return null;let A=C.getAttribute("href")||C.getAttribute("xlink:href")||(typeof C.getAttributeNS=="function"?C.getAttributeNS(f,"href"):null);if(A)return A;let M=C.attributes;if(!M)return null;for(let k=0;kC.id)),d=new Set,y=!1,m=(C,A=null)=>{if(!C)return;s.lastIndex=0;let M;for(;M=s.exec(C);){y=!0;let k=(M[1]||"").trim();k&&(u.has(k)||(d.add(k),A&&!A.has(k)&&A.add(k)))}},g=C=>{let A=C.querySelectorAll("use");for(let S of A){let E=c(S);if(!E||!E.startsWith("#"))continue;y=!0;let R=E.slice(1).trim();R&&!u.has(R)&&d.add(R)}let M='*[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 S of a)m(C.getAttribute(S));let k=C.querySelectorAll(M);for(let S of k){m(S.getAttribute("style")||"");for(let E of a)m(S.getAttribute(E))}},p=C=>{if(!C||C.nodeType!==1||!C.querySelectorAll)return;let A="filter[id],clipPath[id],mask[id],linearGradient[id],radialGradient[id],pattern[id]",M=!1;try{M=!!(r.querySelector&&r.querySelector(A))}catch{return}if(!M)return;let k=["filter","clipPath","mask","maskImage","webkitMaskImage"],S=E=>{if(Ut(E))return;let R;try{R=getComputedStyle(E)}catch{return}for(let F of k){let N=R[F];N&&N.includes("url(")&&m(N)}};S(C);for(let E of C.querySelectorAll("*"))S(E)};for(let C of i)g(C);if(p(n),!y)return;let h=t.querySelector("svg.inline-defs-container");h||(h=o.createElementNS("http://www.w3.org/2000/svg","svg"),h.classList.add("inline-defs-container"),h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(h,t.firstChild||null));let w=h.querySelector("defs")||null,b=C=>{if(!C||u.has(C))return null;let A=l(C),M=k=>{let S=r.querySelector(k);return S&&!t.contains(S)?S:null};return M(`svg defs > *#${A}`)||M(`svg > symbol#${A}`)||M(`*#${A}`)};if(!d.size)return;let x=new Set(d),v=new Set;for(;x.size;){let C=x.values().next().value;if(x.delete(C),!C||u.has(C)||v.has(C))continue;let A=b(C);if(!A){v.add(C);continue}w||(w=o.createElementNS("http://www.w3.org/2000/svg","defs"),h.appendChild(w));let M=A.cloneNode(!0);M.id||M.setAttribute("id",C),w.appendChild(M),v.add(C),u.add(C);let k=[M,...M.querySelectorAll("*")];for(let S of k){let E=c(S);if(E&&E.startsWith("#")){let F=E.slice(1).trim();F&&!u.has(F)&&!v.has(F)&&x.add(F)}let R=S.getAttribute?.("style")||"";R&&m(R,x);for(let F of a){let N=S.getAttribute?.(F);N&&m(N,x)}}}}$t();wt();var br=new WeakMap;function Yc(t,e){let n=br.get(t),o=t.style;if(!n){let i=o.cssText,s=t.hasAttribute("style");n={users:0,saved:e.map(([l,f])=>{let c={property:l,value:o.getPropertyValue(l),priority:o.getPropertyPriority(l)};return o.setProperty(l,f,"important"),c.forcedValue=o.getPropertyValue(l),c}),originalCSS:i,forcedCSS:o.cssText,hadStyle:s},zo(t,i,n.forcedCSS),br.set(t,n)}n.users++;let r=!1;return()=>{if(!r&&(r=!0,!--n.users)){if(br.delete(t),o.cssText===n.forcedCSS)o.cssText=n.originalCSS;else for(let i of n.saved)o.getPropertyValue(i.property)!==i.forcedValue||o.getPropertyPriority(i.property)!=="important"||(i.value?o.setProperty(i.property,i.value,i.priority):o.removeProperty(i.property));!n.hadStyle&&!o.length&&(t.getAttribute("style"),t.removeAttribute("style"))}}}var En='[style*="content-visibility"]';function yo(t,e=null,n=null){let o=[],r=i=>{if(!zt(i))return;if(br.has(i)){o.push(Yc(i,[]));return}let s=getComputedStyle(i);(s.contentVisibility||s.getPropertyValue("content-visibility")||"")==="auto"&&o.push(Yc(i,[["content-visibility","visible"]]))};try{if(n)for(let i of n)r(i);else if(e){let s=a=>{let l;try{l=a.getBoundingClientRect()}catch{return}if(!((l.width>0||l.height>0)&&(l.righte.right+200||l.bottome.bottom+200))){r(a);for(let f=a.firstElementChild;f;f=f.nextElementSibling)s(f)}};s(t)}else{for(let i of t.querySelectorAll("*"))r(i);r(t)}}catch{}return()=>{for(let i of o)try{i()}catch{}}}Re();pt();Kt();Ve();we();wo();var tn="data-snapdom-asset",hf="http://www.w3.org/1999/xlink",Mm=0;function vo(t,e,n,o,r,i){let s=i.compressedAssets||=new WeakMap,a=s.get(t);a||(a={token:String(++Mm),properties:[]},s.set(t,a),t.setAttribute(tn,a.token));let l=a.properties.find(f=>f.kind===e&&f.name===n);l?(l.compressed!==o&&(l.original=o),l.compressed=r):a.properties.push({kind:e,name:n,original:o,compressed:r})}var mf=(t,e)=>e.kind==="style"?t.style?.getPropertyValue(e.name):t.getAttribute(e.name);function Mr(t,e){let n=new Map;if(!t||!e)return n;let o=[t,...t.querySelectorAll(`[${tn}]`)];for(let r of o){let i=e.get(r);if(!i||r.getAttribute(tn)!==i.token)continue;let s=i.properties.filter(a=>mf(r,a)===a.compressed).map(a=>Object.freeze({...a}));s.length&&n.set(i.token,Object.freeze(s))}return n}function Ar(t,e){if(!t||!e)return;let n=0;for(let o of[t,...t.querySelectorAll(`[${tn}]`)]){let r=e.get(o);r&&(r.token=String(++n),o.setAttribute(tn,r.token))}}async function gf(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 r=!1;for(let i of o.querySelectorAll(`[${tn}]`))for(let s of e.get(i.getAttribute(tn))||[]){if(mf(i,s)!==s.compressed)continue;let a=await s.original;if(a!=null){if(typeof a!="string"){let l=a;if(a=await new Promise(f=>{let c=new FileReader;c.onload=()=>f(c.result),c.onerror=()=>f(null),c.readAsDataURL(l)}),a==null)continue}s.kind==="style"?i.style.setProperty(s.name,a,i.style.getPropertyPriority(s.name)):s.name==="xlink:href"?i.setAttributeNS(hf,s.name,a):i.setAttribute(s.name,a),r=!0}}return r?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(o))}`:t}function df(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 Er(t,e,n){let o=e.element||t,r=o.isConnected?W(o):o.style,i=n.clip,s=(m,g)=>{try{return m[g]?.baseVal?.value||0}catch{return 0}},a=i?.width||o.offsetWidth||parseFloat(r?.width)||s(o,"width"),l=i?.height||o.offsetHeight||parseFloat(r?.height)||s(o,"height"),f=Number.isFinite(e.width),c=Number.isFinite(e.height);if(!i&&(f||c)&&a&&l)try{let m=e.outerTransforms===!1&&n.rootTransform?n.rootTransform:Ee({baseTransform:r?.transform,rotate:r?.rotate,scale:r?.scale,width:a,height:l});if(m.is2D===!1)a=0,l=0;else{let g=Math.abs(m.a)*a+Math.abs(m.c)*l,p=Math.abs(m.b)*a+Math.abs(m.d)*l;a=Math.min(a,g),l=Math.min(l,p)}}catch{a=0,l=0}let u=(f||c?Math.max(f?a?e.width/a:1/0:0,c?l?e.height/l:1/0:0):e.scale||1)*(e.dpr||1);n.session.compressionDensity=u;let d=new WeakMap,y=m=>{if(!m||m.nodeType!==1)return 1;if(d.has(m))return d.get(m);let g=m.isConnected?W(m):m.style,p=1;try{g?.perspective&&g.perspective!=="none"&&(p=1/0);let h=g?.transform;if(h&&h!=="none")p*=df(new DOMMatrix(h));else if(m.transform?.baseVal?.numberOfItems){let w=new DOMMatrix;for(let b=0;bparseFloat(b)/(b.endsWith("%")?100:1));p*=Math.max(...w.map(Math.abs))}if(m!==o&&g?.zoom&&g.zoom!=="normal"&&(p*=parseFloat(g.zoom)||1),m.localName==="svg"&&m.viewBox?.baseVal?.width>0&&m.viewBox.baseVal.height>0){let w=m.viewBox.baseVal,b=C=>/^\d+(?:\.\d+)?px$/.test(g?.[C]||"")?parseFloat(g[C]):s(m,C),x=b("width"),v=b("height");p*=x>0&&v>0?Math.max(x/w.width,v/w.height):1/0}}catch{p=1/0}return Number.isFinite(p)||(p=1/0),m!==o&&(p*=y(m.parentElement||m.getRootNode?.().host)),d.set(m,p),p};return{density:u,stretch:y}}var $s=.92,kr=1;async function Am(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 Em(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}var Rm=64*1024,yf=32*1024*1024,Fm=50,Cr=new Map,Rs=0,Fs=0;function Tm(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,r=t.length-n-1,i=Math.min(r,o);try{let s=atob(t.slice(n+1,n+1+i-i%4)),a=new Uint8Array(s.length);for(let l=0;le[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=208&&r<=215){o+=2;continue}if(r>=192&&r<=207&&r!==196&&r!==200&&r!==204)return{h:n(o+5),w:n(o+7)};let i=n(o+2);if(i<2)break;o+=2+i}}return null}function Ts(t,e,n,o){let r=Math.min(1,Math.max(n/t,o/e));return!(r>0)||r>=.95?0:r}var Pm=`self.onmessage = async (e) => { const { id, dataURL, blob: given, srcLength, targetW, targetH, resFactor, quality, mime } = e.data try { const blob = given || await (await fetch(dataURL)).blob() @@ -34,7 +34,7 @@ var ad=Object.defineProperty;var ct=(t,e,n)=>()=>{if(n)throw n[0];try{return t&& } catch (err) { self.postMessage({ id, error: String(err) }) } -}`,km=Math.max(1,Math.min(4,(typeof navigator<"u"&&navigator.hardwareConcurrency||2)-1)),ie=null,Mm=0,Am=0,Je=new Map;function af(){for(let t of Je.values())t(void 0);if(Je.clear(),Array.isArray(ie))for(let t of ie)try{t?.terminate()}catch{}ie=!1}function Em(){let t,e=null;try{t=URL.createObjectURL(new Blob([Cm],{type:"text/javascript"})),e=new Worker(t),e.onmessage=n=>{let o=Je.get(n.data.id);o&&(Je.delete(n.data.id),o(n.data.error?void 0:n.data.url??null))},e.onerror=af}catch{e=null}return t&&URL.revokeObjectURL(t),e}function Rm(){if(ie===!1)return!1;if(ie===null){if(typeof Worker>"u"||typeof OffscreenCanvas>"u")return ie=!1;ie=[]}let t=Mm++%km;if(!ie[t]){let e=Em();if(!e)return af(),!1;ie[t]=e}return ie[t]}var Fm=5e3;function Tm(t,e,n,o,r){let i=Rm();return i?new Promise(s=>{let a=++Am,l=setTimeout(()=>{Je.delete(a),s(void 0)},Fm);Je.set(a,f=>{clearTimeout(l),s(f)});try{i.postMessage({id:a,dataURL:r?"":t,blob:r,srcLength:t.length,targetW:e,targetH:n,resFactor:yr,quality:xs,mime:o})}catch{clearTimeout(l),Je.delete(a),s(void 0)}}):Promise.resolve(void 0)}async function Ss(t,e,n,o){if(typeof t!="string"||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return null;e=Math.ceil(e),n=Math.ceil(n);let r=t.length+":"+t.slice(0,64)+t.slice(-64)+":"+e+"x"+n,i=G.compress,s=i.get(r);if(s?.source===t)return s.pass=ys,s.result;let a=gr.get(r);if(a?.source===t&&a.cache===i)return a.promise;let l=(async()=>{let c=bm(t),u=c==="image/jpeg"?"image/jpeg":c==="image/webp"?"image/webp":"image/png",d=vm(t);if(d&&d.w>0&&d.h>0&&!ws(d.w,d.h,e,n))return null;if(t.length>=wm){let M=await Tm(t,e,n,u,o);if(M!==void 0)return M}let m;try{m=await ym(t)}catch{return null}let g=m.naturalWidth||m.width,y=m.naturalHeight||m.height;if(!g||!y)return null;let p=ws(g,y,e,n);if(!p)return null;let h=p*yr,b=Math.max(1,Math.round(g*h)),w=Math.max(1,Math.round(y*h)),k=document.createElement("canvas");k.width=b,k.height=w;let v=k.getContext("2d");if(!v)return null;v.imageSmoothingEnabled=!0,v.imageSmoothingQuality="high",v.drawImage(m,0,0,b,w);try{let M=k.toDataURL(u,xs);if(typeof M=="string"&&M.startsWith("data:image")&&M.length0))continue;let l=a.currentSrc||a.src||"",f=ef(l),c=/^blob:/i.test(l);if(!f&&!c)continue;let u=lf(s,a);if(!u)continue;let{w:d,h:m}=u,g=o.value||=xr(t,e,o),y=g.density*g.stretch(a),p=ws(a.naturalWidth,a.naturalHeight,Math.ceil(d*y),Math.ceil(m*y));if(!p||W(a).content.includes("url("))continue;if(!/^(?:data|blob):/i.test(l)&&a.crossOrigin==null)try{if(new URL(l,a.baseURI).origin!==a.ownerDocument.defaultView.location.origin)continue}catch{continue}let h=f?null:new AbortController,b=h&&fetch(l,{signal:h.signal}).then(M=>(h.abort(),M.headers),()=>null),w=/^data:/i.test(l)?l:bt(l,{as:"blob",useProxy:e.useProxy}).then(M=>M.ok&&M.data?M.data:null),k=document.createElement("canvas");k.width=Math.max(1,Math.round(a.naturalWidth*p*yr)),k.height=Math.max(1,Math.round(a.naturalHeight*p*yr));let v=k.getContext("2d");if(!v)return;v.imageSmoothingEnabled=!0,v.imageSmoothingQuality="high",v.drawImage(a,0,0,k.width,k.height),i.push({img:s,canvas:k,type:f,head:b,original:w,src:l})}for(let{img:s,canvas:a,type:l,head:f,original:c,src:u}of i){let d=typeof c=="string"?c.length*.75:performance.getEntriesByName(u).pop()?.decodedBodySize;if(f){let g=await f;if(l=ef(`data:${g?.get("content-type")},`),!l)continue;d=+g.get("content-length")}let m;try{m=a.toDataURL(l,xs)}catch{continue}d&&m.length*.75>=d||(s.setAttribute("src",m),bo(s,"attribute","src",c,m,o.session))}}async function $m(t,e,n=new Map,o={session:{}}){if(!e.compress)return{count:0,before:0,after:0};let r=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&r.unshift(t);let i=0,s=0,a=0,l=async c=>{let u=c.getAttribute("src")||"";if(!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let d=lf(c,n.get(c));if(!d)return;let{w:m,h:g}=d,y=o.value||=xr(t,e,o),p=y.density*y.stretch(n.get(c)||c),h=await Ss(u,m*p,g*p,c.__snapdomBlob);h&&(i++,s+=u.length,a+=h.length,c.setAttribute("src",h),bo(c,"attribute","src",u,h,o.session))},f=6;for(let c=0;c{let c=n.get(f);if(!c||!c.isConnected)return;let u;try{u=getComputedStyle(c)}catch{return}if((u.backgroundRepeat||"repeat").toLowerCase().split(",").some(S=>S.trim()!=="no-repeat"))return;let m=(f.style.backgroundSize||u.backgroundSize||"auto").toLowerCase();if(m.split(",").some(S=>!Pm.test(S.trim())))return;let{w:g,h:y}=Nm(c);if(!g||!y)return;let p=Math.max(1,...(m.match(/\d+(?:\.\d+)?%/g)||[]).map(S=>parseFloat(S)/100)),h=o.value||=xr(t,e,o),b=h.density*h.stretch(c)*p,w=g*b,k=y*b,v=f.style.backgroundImage,M=[...v.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],C=v;for(let S of M){let A=S[2];if(A.startsWith("data:image/svg"))continue;let x=await Ss(A,w,k);x&&(C=C.split(A).join(x),s++)}C!==v&&(f.style.setProperty("background-image",C,f.style.getPropertyPriority("background-image")),bo(f,"style","background-image",v,f.style.backgroundImage,o.session))},l=6;for(let f=0;f{let f=l.getAttribute("href")||(typeof l.getAttributeNS=="function"?l.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!f||!f.startsWith("data:image")||f.startsWith("data:image/svg"))return;let c=l.getAttribute("width")||"",u=l.getAttribute("height")||"";if(c.includes("%")||u.includes("%"))return;let d=n.get(l),m=d?W(d):l.style,g=(k,v)=>{if(/^\d+(?:\.\d+)?px$/.test(m?.[k]||""))return parseFloat(m[k]);if(/^\d+(?:\.\d+)?(?:px)?$/.test(v.trim()))return parseFloat(v);try{return d?.[k]?.baseVal?.value||0}catch{return 0}},y=g("width",c),p=g("height",u);if(!y||!p)return;let h=o.value||=xr(t,e,o),b=h.density*h.stretch(d||l),w=await Ss(f,y*b,p*b);w&&(l.setAttribute("href",w),bo(l,"attribute","href",f,w,o.session),l.hasAttribute("xlink:href")&&(l.setAttributeNS(nf,"xlink:href",w),bo(l,"attribute","xlink:href",f,w,o.session)),i++)},a=6;for(let l=0;l=r||(a-=f.source.length+(f.result?.length||0),s.delete(l))}}var Cr=new Set,Im=/^(?:IMG|VIDEO|CANVAS|IFRAME|EMBED|OBJECT|SVG|svg|INPUT|SELECT|TEXTAREA|BUTTON)$/,Om="[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 cf(t,e={},n=re(e)){ne(),qo(t.ownerDocument||document);let o=co(n,e,n.nodeMap),r=null,i=null,s=null;if(e.clip&&(i=pr(t,e.clip),i&&(o.clip={rect:i,root:t})),e.captureSelection)try{o.selection=lc(t)}catch(h){U(o,"Couldn't read the text selection.",h)}let a,l="",f="";if(Cr.size){let h=(b,w)=>{for(let k=w;k;k=k.assignedSlot||k.parentElement||Ht(k))if(k===b)return!0;return!1};for(;;){let b=[...Cr].filter(({root:w})=>h(w,t)||h(t,w)).map(({promise:w})=>w.catch(()=>{}));if(!b.length)break;await Promise.all(b)}}if(!o.clip&&t.isConnected&&t.ownerDocument?.visibilityState!=="hidden")try{let h=t.getBoundingClientRect(),b=t.ownerDocument?.defaultView||window,w=h.right<=0||h.bottom<=0||h.left>=b.innerWidth||h.top>=b.innerHeight,k=[];if(w&&(()=>{let M=[];t.shadowRoot&&M.push(t.shadowRoot);for(let C of t.querySelectorAll("*"))C.shadowRoot&&M.push(C.shadowRoot);for(;M.length;){let C=M.pop(),S=C.host?.localName==="calcite-icon";for(let A of C.querySelectorAll("*")){if(A.shadowRoot&&M.push(A.shadowRoot),!S||A.localName!=="svg")continue;let x=A.querySelectorAll("path");if(!x.length||[...x].some(R=>R.getAttribute("d")?.trim()))continue;let E=A.getBoundingClientRect();E.width&&E.height&&k.push(A)}}})(),k.length){let M=(async()=>{let S=t.style,A=t.hasAttribute("style"),x=new Map,E=(R,F)=>{x.has(R)||x.set(R,{value:S.getPropertyValue(R),priority:S.getPropertyPriority(R)}),S.setProperty(R,F,"important");let N=x.get(R);N.forcedValue=S.getPropertyValue(R),N.forcedPriority=S.getPropertyPriority(R)};try{E("left","0"),E("top","0"),E("right","auto"),E("bottom","auto"),E("margin-top","0"),E("margin-right","0"),E("margin-bottom","0"),E("margin-left","0"),E("transform","none"),E("translate","none"),E("opacity","0"),E("pointer-events","none");let R=t.getBoundingClientRect();if(R.right<=0||R.bottom<=0||R.left>=b.innerWidth||R.top>=b.innerHeight){let P=t.parentElement?.getBoundingClientRect(),_=P&&P.right>0&&P.left0&&P.topk.some(P=>{if([...P.querySelectorAll("path")].some(I=>I.getAttribute("d")?.trim()))return!1;let _=P.getBoundingClientRect();return _.width&&_.height&&_.right>0&&_.bottom>0&&_.leftsetTimeout(P,25));await Pt(100)}finally{for(let[R,F]of x)S.getPropertyValue(R)!==F.forcedValue||S.getPropertyPriority(R)!==F.forcedPriority||(F.value?S.setProperty(R,F.value,F.priority):S.removeProperty(R));!A&&!S.length&&t.removeAttribute("style"),await Pt(100)}})(),C={root:t,promise:M};Cr.add(C);try{await M}finally{Cr.delete(C)}}}catch{}let c=uo(t,i);if(i){let h=t.getBoundingClientRect(),b=t.offsetWidth||h.width,w=t.offsetHeight||h.height,k=h.width&&Math.abs(b-h.width)>=1?b/h.width:1,v=h.height&&Math.abs(w-h.height)>=1?w/h.height:1;r={x:(i.left-h.left)*k,y:(i.top-h.top)*v,width:i.width*k,height:i.height*v}}try{a=await Me(t,o,e),s=Sc(a,o,e)}catch(h){throw U(o,"Capture failed while copying the element.",h),h}finally{n&&(n.rootBox=t.matches(Cn)||t.querySelector(Cn)?[t.offsetWidth,t.offsetHeight]:null),c()}sc(o.nodeMap,t.ownerDocument||document),o.slicer?.due()&&await o.slicer.pause();try{Ic(a,void 0,t)}catch(h){at(n,"svg-defs-failed","external references failed to inline",h),U(o,"Couldn't copy external SVG icons; some may be missing.",h)}try{await vn(t,a,o,e)}catch(h){at(n,"pseudo-failed","::before/::after pass failed",h),U(o,"Couldn't copy ::before/::after content; some decorations may be missing.",h)}o.bgClipText&&_c(o.bgClipText),await Sr(a,e,o.nodeMap,{session:n,clip:r}),await or(a,o);for(let[h,b]of o.nodeMap.entries())if(b?.tagName==="STYLE"&&h?.tagName==="STYLE"&&!h.hasAttribute("data-sd")){let w=h.textContent||"";try{let k=b.sheet&&b.sheet.cssRules;k&&/@media/i.test(w)&&(w=Ye(k))}catch{}/@(?:import|namespace)\b/i.test(w)||(w=`@layer{${w}}`),h.textContent=w}try{let h=[...a.querySelectorAll("style[data-sd]")].sort((b,w)=>b.getAttribute("data-sd")-w.getAttribute("data-sd"));for(let b of h)f+=b.textContent||"",b.remove()}catch(h){U(o,"Couldn't copy shadow DOM styles.",h)}o.slicer?.due()&&await o.slicer.pause();let u=Gn(o.styleMap);l=Array.from(u.entries()).map(([h,b])=>`.${b}{${h}}`).join("");let m=f+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+(o.usesPlaceholder?Om:"")+(o.pseudoCSS||"");l=m+l;for(let[h,b]of o.styleMap.entries())vs(h,b,u);try{Wm(t,a,o.nodeMap)}catch(h){U(o,"Couldn't bring an open dialog or popover into the capture.",h)}let g=t.ownerDocument.defaultView,y=t===t.ownerDocument.body&&g&&(g.scrollX||g.scrollY);if((o.clip||t.scrollTop||t.scrollLeft||y)&&a?.nodeType===1)try{let h=o.clip&&r?{x:r.x,y:r.y}:{x:0,y:0};qc(t,a,o.nodeMap,o.styleCache,h)}catch(h){U(o,"Couldn't keep fixed-position elements in place.",h)}for(let[h,b]of o.nodeMap.entries())b===t&&t===t.ownerDocument.scrollingElement||Cs(h,b,o.nodeMap,o.styleCache);let p=t.ownerDocument;if((t===p.body||t===p.documentElement)&&p.documentElement.localName==="html"){let h=o.styleCache.get(p.documentElement)||W(p.documentElement);t===p.documentElement&&(a.style.overflow="visible");let b=t===p.body?a:a.querySelector("body");if(b&&h.overflowX==="visible"&&h.overflowY==="visible"&&h.contain==="none"&&!h.containerType?.includes("size")&&h.contentVisibility!=="auto"&&h.contentVisibility!=="hidden"){let w=o.styleCache.get(p.body)||W(p.body);w.contain==="none"&&!w.containerType?.includes("size")&&w.contentVisibility!=="auto"&&w.contentVisibility!=="hidden"&&w.display!=="none"&&(b.style.overflow="visible")}}if(t===o.nodeMap.get(a)){let h=o.styleCache.get(t)||W(t);o.styleCache.set(t,h);let b=ci(h.transform);if(a.style.margin="0",a.style.top="auto",a.style.left="auto",a.style.right="auto",a.style.bottom="auto",a.style.animation="none",a.style.transition="none",a.style.willChange="auto",a.style.float="none",a.style.clear="none",a.style.placeSelf="normal",a.style.transform=b||"",a.style.translate="none",(/^inline-/.test(h.display)||h.display==="inline"&&Im.test(t.tagName))&&(a.style.verticalAlign="top"),Qc(t,a,h),!a.hasAttribute("lang")){let w=t.closest?.("[lang]")?.getAttribute("lang")??t.ownerDocument?.documentElement?.getAttribute("lang");w&&a.setAttribute("lang",w)}}return{clone:a,classCSS:l,classPrefixCSS:m,shadowCSS:!!f,styleCache:o.styleCache,nodeMap:o.nodeMap,reconcileRisk:o.reconcileRisk||0,clipWindow:r,standIns:s,universe:Ce(t,o)}}function Wm(t,e,n){let o=[];for(let s of[":modal",":popover-open"])try{o.push(...t.querySelectorAll(s))}catch{}if(!o.length)return;let r=new Map;for(let[s,a]of n.entries())r.set(a,s);let i=214748e4;for(let s of o){let a=r.get(s);if(!(!a||a===e||a.parentNode==null)){try{let l=getComputedStyle(s,"::backdrop"),f=l.backgroundColor,c=l.backgroundImage;if(f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"||c&&c!=="none"){let d=document.createElement("div");d.setAttribute("data-sd-backdrop",""),d.style.cssText=`position:fixed;inset:0;z-index:${i};background-color:${f};`+(c&&c!=="none"&&c.includes("data:")?`background-image:${c};`:""),e.appendChild(d)}}catch{}i+=1,a.style.zIndex=String(i),e.appendChild(a),i+=1}}}function vs(t,e,n){if(t.tagName==="STYLE")return;let o=n.get(e);o&&t.classList.add(o);let r=t.style?.backgroundImage;r&&r!=="none"&&(t.style.backgroundImage=r)}var Dm=["grid-template-columns","grid-template-rows","grid-template-areas","grid-auto-columns","grid-auto-rows","grid-auto-flow","row-gap","column-gap","align-items","justify-items","align-content","justify-content","flex-direction","flex-wrap"];function Cs(t,e,n,o){let r=e.scrollLeft,i=e.scrollTop;if(!(r||i)||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 u of c){if(u.nodeType!==1||u.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let d=n?.get(u),m=d&&(o?.get(d)||W(d)),g=u.style.position||m?.position;if(g!=="fixed"&&g!=="absolute")continue;let y=m&&m.position!=="absolute"&&g==="absolute",p=null;if(d&&!y)for(let w=d.parentElement||Ht(d);w;w=w.parentElement||Ht(w)){let k=o?.get(w)||W(w);if(g==="absolute"&&k.position!=="static"||k.transform&&k.transform!=="none"||k.translate&&k.translate!=="none"||k.rotate&&k.rotate!=="none"||k.scale&&k.scale!=="none"||k.filter&&k.filter!=="none"||k.backdropFilter&&k.backdropFilter!=="none"||k.perspective&&k.perspective!=="none"||/transform|perspective|filter/.test(k.willChange||"")||/layout|paint|strict|content/.test(k.contain||"")){p=w;break}if(w===e)break}if(p){p===e&&(u.style.top=m.top,u.style.left=m.left,u.style.right=m.right,u.style.bottom=m.bottom);continue}let h=parseFloat(u.style.top||m?.top)||0,b=parseFloat(u.style.left||m?.left)||0;u.style.top=`${h+i}px`,u.style.left=`${b+r}px`,g==="fixed"&&(u.style.position="absolute")}}catch{}let a=document.createElement("div");a.style.all="unset",a.style.direction="inherit",a.style.transform=`translate(${-r}px, ${-i}px)`,a.style.willChange="transform";let l=(o?.get(e)||W(e)).display,f=l.includes("grid")?"grid":l.includes("flex")?"flex":"";if(f){t.style.display=l.startsWith("inline")?"inline-block":"block",a.style.display=f;for(let c of Dm)a.style.setProperty(c,"inherit")}else a.style.display="inline-block";for(a.style.width="100%";t.firstChild;)a.appendChild(t.firstChild);t.appendChild(a)}be();At();Kt();var ff="http://www.w3.org/1999/xlink";function Bm(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(ff,"href"):null)}function zm(t){let e=parseFloat(t.dataset?.snapdomWidth||"")||0,n=parseFloat(t.dataset?.snapdomHeight||"")||0,o=parseInt(t.getAttribute("width")||"",10)||0,r=parseInt(t.getAttribute("height")||"",10)||0,i=parseFloat(t.style?.width||"")||0,s=parseFloat(t.style?.height||"")||0,a=e||i||o||t.width||t.naturalWidth||100,l=n||s||r||t.height||t.naturalHeight||100;return{width:a,height:l}}async function kr(t,e={},n=null){let o=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&o.unshift(t);let r=async l=>{if(!l.getAttribute("src")){let p=l.currentSrc||l.src||wn(l.getAttribute("srcset"),l)||"";p&&l.setAttribute("src",p)}if(l.removeAttribute("srcset"),l.removeAttribute("sizes"),(l.getAttribute("src")||"").startsWith("data:")){l.width||(l.width=l.naturalWidth||100),l.height||(l.height=l.naturalHeight||100);return}let f=l.src||"";if(!f)return;let c=G.image?.get(f);if(c){l.src=c,l.width||(l.width=l.naturalWidth||100),l.height||(l.height=l.naturalHeight||100);return}let u=await bt(f,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});if(u.ok&&typeof u.data=="string"&&u.data.startsWith("data:")){G.image?.set(f,u.data),l.src=u.data,u.blob&&(l.__snapdomBlob=u.blob),l.width||(l.width=l.naturalWidth||100),l.height||(l.height=l.naturalHeight||100);return}let{width:d,height:m}=zm(l),{fallbackURL:g}=e||{};if(g)try{let p=typeof g=="function"?await g({width:d,height:m,src:f,element:l}):g;if(p){let h=await bt(p,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});if(h?.ok&&typeof h.data=="string"){l.src=h.data,l.width||(l.width=d),l.height||(l.height=m);return}}}catch{}let y="";e.placeholders!==!1&&(at(n,"image-fallback",`image failed to inline, using placeholder: ${f}`),y='img'),l.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(`${y}`)}`,l.width||(l.width=d),l.height||(l.height=m)},i=6;for(let l=0;l{let f=Bm(l);if(!f||f.startsWith("data:")||f.startsWith("blob:"))return;let c=await bt(f,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")&&(l.setAttribute("href",c.data),l.removeAttribute("xlink:href"),typeof l.removeAttributeNS=="function"&&l.removeAttributeNS(ff,"href"))};for(let l=0;lg in i?i[g]:"":g=>r.getPropertyValue(g),a=s("border-image"),l=s("border-image-source"),f=a&&a!=="none"||l&&l!=="none",c=r.getPropertyValue("background-image"),u=s("background-color"),d=c&&c!=="none"||u&&u!=="rgba(0, 0, 0, 0)"&&u!=="transparent"||/url\s*\(|gradient\s*\(/i.test(r.getPropertyValue("background")||""),m=st()&&(s("background-clip")||s("-webkit-background-clip")||"").includes("text");if(d&&!m)for(let g of Hm){let y=s(g);y&&e.style.setProperty(g,y)}for(let g of uf){if(m&&g==="background-image")continue;let y=r.getPropertyValue(g);if(g==="background-image"&&(!y||y==="none")){let b=r.getPropertyValue("background");b&&/url\s*\(/.test(b)&&(y=ve(b).filter(w=>/url\s*\(/.test(w)).join(", ")||y)}if(!y||y==="none")continue;let p=ve(y),h=await Promise.all(p.map(b=>rn(b,o)));h.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&e.style.setProperty(g,h.join(", "))}for(let g of Um){let y=s(g);!y||y==="initial"||e.style.setProperty(g,y)}if(f)for(let g of Vm){let y=s(g);!y||y==="initial"||e.style.setProperty(g,y)}if(d&&/fixed/.test(s("background-attachment")||""))try{await qm(t,e,r)}catch{}}function Gm(t,e,n,o,r){let i=(t||"auto").trim();if(i==="cover"||i==="contain"){if(!e||!n)return{w:o,h:r};let d=i==="cover"?Math.max(o/e,r/n):Math.min(o/e,r/n);return{w:e*d,h:n*d}}let s=i.split(/\s+/),a=(d,m)=>{if(d==="auto"||d===void 0)return null;if(d.endsWith("px"))return parseFloat(d);if(d.endsWith("%"))return m*parseFloat(d)/100},l=a(s[0],o),f=a(s[1],r);if(l===void 0||f===void 0)return null;let c=l,u=f;return c==null&&u==null?(c=e||o,u=n||r):c==null?c=e&&n?u*(e/n):o:u==null&&(u=e&&n?c*(n/e):r),!c||!u?null:{w:c,h:u}}async function qm(t,e,n){let o=(n.getPropertyValue("background-attachment")||"").split(",").map(g=>g.trim()),r=Yn();if(!r)for(let g=t.parentElement;g&&!r;g=g.parentElement){let y=W(g);(y.transform&&y.transform!=="none"||y.filter&&y.filter!=="none")&&(r=!0)}if(r){e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "));return}let i=t.getBoundingClientRect(),s=t.ownerDocument?.defaultView||window,a=s.innerWidth,l=s.innerHeight,f=ve(e.style.backgroundImage||n.getPropertyValue("background-image")||""),c=(e.style.backgroundSize||n.getPropertyValue("background-size")||"auto").split(",").map(g=>g.trim()),u=(e.style.backgroundPosition||n.getPropertyValue("background-position")||"0% 0%").split(",").map(g=>g.trim()),d=[],m=[];for(let g=0;g{if(!x)return 0;if(x.endsWith("px"))return parseFloat(x);if(x.endsWith("%"))return(E-R)*parseFloat(x)/100},S=C(M[0]||"0%",a,v.w),A=C(M[1]||M[0]||"0%",l,v.h);if(S===void 0||A===void 0){d.push(p),m.push(h);continue}d.push(`${Mr(v.w)}px ${Mr(v.h)}px`),m.push(`${Mr(S-i.left)}px ${Mr(A-i.top)}px`)}e.style.setProperty("background-size",d.join(", ")),e.style.setProperty("background-position",m.join(", ")),e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "))}var Mr=t=>Math.round(t*100)/100;async function Ar(t,e,n,o={},r=new Map,i=!1){if(!e)return;let s=[],a=(c,u)=>{if(Ll(c)){if(i&&Yi(c)){let d=n.get(c)||W(c);if(uf.every(m=>(d.getPropertyValue(m)||"none")==="none")&&!/url\s*\(/.test(d.getPropertyValue("background")||""))return}s.push([c,u])}};t&&a(t,e);let l=[e];for(;l.length;){let c=l.pop();if(c.children)for(let u of c.children){if(u.tagName==="STYLE")continue;let d=r.get(u);d&&a(d,u),l.push(u)}}let f=6;for(let c=0;cjm(u,d,n,o)))}xt();function pf(t,e,n=new Map){let o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let l=r.currentNode;l;l=r.nextNode()){let f=n.get(l);if(f?.nodeType!==1)continue;let c=W(f),u=c.getPropertyValue("backdrop-filter")||c.getPropertyValue("-webkit-backdrop-filter");u&&u!=="none"&&l!==e&&o.push({cloneEl:l,orig:f,bf:u,path:Zm(e,l)})}if(!o.length)return;let i=t.getBoundingClientRect(),s=o.length>1?new Map:null,a=o.map((l,f)=>{let c=e.cloneNode(!0);Km(c,e,l.orig.getBoundingClientRect(),n,s),Jm(df(c,l.path));for(let u=0;u.001?1/a:1;o.style.position="absolute",o.style.left=`${(r.left-i.left)*l}px`,o.style.top=`${(r.top-i.top)*l}px`,o.style.width=`${r.width}px`,o.style.height=`${r.height}px`,o.style.margin="0",o.style.filter=n,l!==1&&(o.style.transform=`scale(${l})`,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 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 u of["background-size","background-position","background-repeat","background-origin","background-clip"])c.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(c),t.prepend(f)}var Er=128;function Km(t,e,n,o,r){let i=[[t,e]];for(;i.length;){let[s,a]=i.pop(),l=o.get(a);if(l?.nodeType===1){let u=r?.get(l);u||(u=l.getBoundingClientRect(),r?.set(l,u)),(u.left>n.right+Er||u.rightn.bottom+Er||u.bottomf.split("|")):[];if(a.length){let f=new Set(e);return a.some(c=>f.has(c.split(":")[0].trim().toLowerCase()))}if(s.some(f=>i.endsWith(f))||n.some(f=>i===f.toLowerCase()||i.endsWith("."+f.toLowerCase())))return!0;let l=(o.pathname+o.search).toLowerCase();if(/\bfont(s)?\b/.test(l)||/\.woff2?(\b|$)/.test(l)||tg.some(f=>l.includes(f)))return!0;for(let f of e){let c=f.toLowerCase().replace(/\s+/g,"+"),u=f.toLowerCase().replace(/\s+/g,"-"),d=sg(f);if(l.includes(c)||l.includes(u)||d&&l.includes(d))return!0}return!1}catch{return!1}}var ue="";function Pr(t){return String(t).split(ue)[0]}function Nr(t){let e=new Set,n=new Set;try{for(let o of t.fonts){let r=String(o.family).replace(/["']/g,"").toLowerCase();e.add(r),(o.status==="loading"||o.status==="loaded")&&n.add(r)}}catch{}return{declared:e,drawn:n}}function wo(t,e){try{return new URL(t,e||location.href).href}catch{return t}}function hf(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,o,r)=>{let i=(r||"").trim();return!i||/^data:|^blob:|^https?:|^file:|^about:/i.test(i)?n:`url("${wo(i,e)}")`})}var bf=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,$r=4;async function lg(t,e,n,o){if(!t)return t;let r=new Set;async function i(a,l,f=0){if(f>$r)return U({debug:o},`Too many nested @import rules in ${l}; stopped at ${$r} levels.`),a;let c="",u=0,d,m=new RegExp(bf.source,"g");for(;d=m.exec(a);){c+=a.slice(u,d.index),u=m.lastIndex;let g=(d[2]||d[4]||"").trim(),y=wo(g,l);if(r.has(y)){U({debug:o},`Skipped an @import that loops back: ${y}`);continue}r.add(y);let p="";try{let h=await bt(y,{as:"text",useProxy:n});h.ok&&typeof h.data=="string"&&(p=h.data)}catch{}p?(p=hf(p,y),p=await i(p,y,f+1),c+=` -/* inlined: ${y} */ +}`,Nm=Math.max(1,Math.min(4,(typeof navigator<"u"&&navigator.hardwareConcurrency||2)-1)),se=null,Lm=0,_m=0,Qe=new Map;function bf(){for(let t of Qe.values())t(void 0);if(Qe.clear(),Array.isArray(se))for(let t of se)try{t?.terminate()}catch{}se=!1}function Im(){let t,e=null;try{t=URL.createObjectURL(new Blob([Pm],{type:"text/javascript"})),e=new Worker(t),e.onmessage=n=>{let o=Qe.get(n.data.id);o&&(Qe.delete(n.data.id),o(n.data.error?void 0:n.data.url??null))},e.onerror=bf}catch{e=null}return t&&URL.revokeObjectURL(t),e}function Om(){if(se===!1)return!1;if(se===null){if(typeof Worker>"u"||typeof OffscreenCanvas>"u")return se=!1;se=[]}let t=Lm++%Nm;if(!se[t]){let e=Im();if(!e)return bf(),!1;se[t]=e}return se[t]}var Wm=5e3;function Dm(t,e,n,o,r){let i=Om();return i?new Promise(s=>{let a=++_m,l=setTimeout(()=>{Qe.delete(a),s(void 0)},Wm);Qe.set(a,f=>{clearTimeout(l),s(f)});try{i.postMessage({id:a,dataURL:r?"":t,blob:r,srcLength:t.length,targetW:e,targetH:n,resFactor:kr,quality:$s,mime:o})}catch{clearTimeout(l),Qe.delete(a),s(void 0)}}):Promise.resolve(void 0)}async function Ps(t,e,n,o){if(typeof t!="string"||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return null;e=Math.ceil(e),n=Math.ceil(n);let r=t.length+":"+t.slice(0,64)+t.slice(-64)+":"+e+"x"+n,i=G.compress,s=i.get(r);if(s?.source===t)return s.pass=Rs,s.result;let a=Cr.get(r);if(a?.source===t&&a.cache===i)return a.promise;let l=(async()=>{let c=Em(t),u=c==="image/jpeg"?"image/jpeg":c==="image/webp"?"image/webp":"image/png",d=$m(t);if(d&&d.w>0&&d.h>0&&!Ts(d.w,d.h,e,n))return null;if(t.length>=Rm){let C=await Dm(t,e,n,u,o);if(C!==void 0)return C}let y;try{y=await Am(t)}catch{return null}let m=y.naturalWidth||y.width,g=y.naturalHeight||y.height;if(!m||!g)return null;let p=Ts(m,g,e,n);if(!p)return null;let h=p*kr,w=Math.max(1,Math.round(m*h)),b=Math.max(1,Math.round(g*h)),x=document.createElement("canvas");x.width=w,x.height=b;let v=x.getContext("2d");if(!v)return null;v.imageSmoothingEnabled=!0,v.imageSmoothingQuality="high",v.drawImage(y,0,0,w,b);try{let C=x.toDataURL(u,$s);if(typeof C=="string"&&C.startsWith("data:image")&&C.length0))continue;let l=a.currentSrc||a.src||"",f=pf(l),c=/^blob:/i.test(l);if(!f&&!c)continue;let u=wf(s,a);if(!u)continue;let{w:d,h:y}=u,m=o.value||=Er(t,e,o),g=m.density*m.stretch(a),p=Ts(a.naturalWidth,a.naturalHeight,Math.ceil(d*g),Math.ceil(y*g));if(!p||W(a).content.includes("url("))continue;if(!/^(?:data|blob):/i.test(l)&&a.crossOrigin==null)try{if(new URL(l,a.baseURI).origin!==a.ownerDocument.defaultView.location.origin)continue}catch{continue}let h=f?null:new AbortController,w=h&&fetch(l,{signal:h.signal}).then(C=>(h.abort(),C.headers),()=>null),b=/^data:/i.test(l)?l:bt(l,{as:"blob",useProxy:e.useProxy}).then(C=>C.ok&&C.data?C.data:null),x=document.createElement("canvas");x.width=Math.max(1,Math.round(a.naturalWidth*p*kr)),x.height=Math.max(1,Math.round(a.naturalHeight*p*kr));let v=x.getContext("2d");if(!v)return;v.imageSmoothingEnabled=!0,v.imageSmoothingQuality="high",v.drawImage(a,0,0,x.width,x.height),i.push({img:s,canvas:x,type:f,head:w,original:b,src:l})}for(let{img:s,canvas:a,type:l,head:f,original:c,src:u}of i){let d=typeof c=="string"?c.length*.75:performance.getEntriesByName(u).pop()?.decodedBodySize;if(f){let m=await f;if(l=pf(`data:${m?.get("content-type")},`),!l)continue;d=+m.get("content-length")}let y;try{y=a.toDataURL(l,$s)}catch{continue}d&&y.length*.75>=d||(s.setAttribute("src",y),vo(s,"attribute","src",c,y,o.session))}}async function Bm(t,e,n=new Map,o={session:{}}){if(!e.compress)return{count:0,before:0,after:0};let r=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&r.unshift(t);let i=0,s=0,a=0,l=async c=>{let u=c.getAttribute("src")||"";if(!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let d=wf(c,n.get(c));if(!d)return;let{w:y,h:m}=d,g=o.value||=Er(t,e,o),p=g.density*g.stretch(n.get(c)||c),h=await Ps(u,y*p,m*p,c.__snapdomBlob);h&&(i++,s+=u.length,a+=h.length,c.setAttribute("src",h),vo(c,"attribute","src",u,h,o.session))},f=6;for(let c=0;c{let c=n.get(f);if(!c||!c.isConnected)return;let u;try{u=getComputedStyle(c)}catch{return}if((u.backgroundRepeat||"repeat").toLowerCase().split(",").some(M=>M.trim()!=="no-repeat"))return;let y=(f.style.backgroundSize||u.backgroundSize||"auto").toLowerCase();if(y.split(",").some(M=>!zm.test(M.trim())))return;let{w:m,h:g}=Um(c);if(!m||!g)return;let p=Math.max(1,...(y.match(/\d+(?:\.\d+)?%/g)||[]).map(M=>parseFloat(M)/100)),h=o.value||=Er(t,e,o),w=h.density*h.stretch(c)*p,b=m*w,x=g*w,v=f.style.backgroundImage,C=[...v.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],A=v;for(let M of C){let k=M[2];if(k.startsWith("data:image/svg"))continue;let S=await Ps(k,b,x);S&&(A=A.split(k).join(S),s++)}A!==v&&(f.style.setProperty("background-image",A,f.style.getPropertyPriority("background-image")),vo(f,"style","background-image",v,f.style.backgroundImage,o.session))},l=6;for(let f=0;f{let f=l.getAttribute("href")||(typeof l.getAttributeNS=="function"?l.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!f||!f.startsWith("data:image")||f.startsWith("data:image/svg"))return;let c=l.getAttribute("width")||"",u=l.getAttribute("height")||"";if(c.includes("%")||u.includes("%"))return;let d=n.get(l),y=d?W(d):l.style,m=(x,v)=>{if(/^\d+(?:\.\d+)?px$/.test(y?.[x]||""))return parseFloat(y[x]);if(/^\d+(?:\.\d+)?(?:px)?$/.test(v.trim()))return parseFloat(v);try{return d?.[x]?.baseVal?.value||0}catch{return 0}},g=m("width",c),p=m("height",u);if(!g||!p)return;let h=o.value||=Er(t,e,o),w=h.density*h.stretch(d||l),b=await Ps(f,g*w,p*w);b&&(l.setAttribute("href",b),vo(l,"attribute","href",f,b,o.session),l.hasAttribute("xlink:href")&&(l.setAttributeNS(hf,"xlink:href",b),vo(l,"attribute","xlink:href",f,b,o.session)),i++)},a=6;for(let l=0;l=r||(a-=f.source.length+(f.result?.length||0),s.delete(l))}}var Tr=new Set,jm=/^(?:IMG|VIDEO|CANVAS|IFRAME|EMBED|OBJECT|SVG|svg|INPUT|SELECT|TEXTAREA|BUTTON)$/,Gm="[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 xf(t,e={},n=ie(e)){oe(),Jo(t.ownerDocument||document);let o=mo(n,e,n.nodeMap),r=null,i=null,s=null;if(e.clip&&(i=xr(t,e.clip),i&&(o.clip={rect:i,root:t})),e.captureSelection)try{o.selection=Sc(t)}catch(h){U(o,"Couldn't read the text selection.",h)}let a,l="",f="";if(Tr.size){let h=(w,b)=>{for(let x=b;x;x=x.assignedSlot||x.parentElement||Ht(x))if(x===w)return!0;return!1};for(;;){let w=[...Tr].filter(({root:b})=>h(b,t)||h(t,b)).map(({promise:b})=>b.catch(()=>{}));if(!w.length)break;await Promise.all(w)}}if(!o.clip&&t.isConnected&&t.ownerDocument?.visibilityState!=="hidden")try{let h=t.getBoundingClientRect(),w=t.ownerDocument?.defaultView||window,b=h.right<=0||h.bottom<=0||h.left>=w.innerWidth||h.top>=w.innerHeight,x=[];if(b&&(()=>{let C=[];t.shadowRoot&&C.push(t.shadowRoot);for(let A of t.querySelectorAll("*"))A.shadowRoot&&C.push(A.shadowRoot);for(;C.length;){let A=C.pop(),M=A.host?.localName==="calcite-icon";for(let k of A.querySelectorAll("*")){if(k.shadowRoot&&C.push(k.shadowRoot),!M||k.localName!=="svg")continue;let S=k.querySelectorAll("path");if(!S.length||[...S].some(R=>R.getAttribute("d")?.trim()))continue;let E=k.getBoundingClientRect();E.width&&E.height&&x.push(k)}}})(),x.length){let C=(async()=>{let M=t.style,k=t.hasAttribute("style"),S=new Map,E=(R,F)=>{S.has(R)||S.set(R,{value:M.getPropertyValue(R),priority:M.getPropertyPriority(R)}),M.setProperty(R,F,"important");let N=S.get(R);N.forcedValue=M.getPropertyValue(R),N.forcedPriority=M.getPropertyPriority(R)};try{E("left","0"),E("top","0"),E("right","auto"),E("bottom","auto"),E("margin-top","0"),E("margin-right","0"),E("margin-bottom","0"),E("margin-left","0"),E("transform","none"),E("translate","none"),E("opacity","0"),E("pointer-events","none");let R=t.getBoundingClientRect();if(R.right<=0||R.bottom<=0||R.left>=w.innerWidth||R.top>=w.innerHeight){let P=t.parentElement?.getBoundingClientRect(),_=P&&P.right>0&&P.left0&&P.topx.some(P=>{if([...P.querySelectorAll("path")].some(O=>O.getAttribute("d")?.trim()))return!1;let _=P.getBoundingClientRect();return _.width&&_.height&&_.right>0&&_.bottom>0&&_.leftsetTimeout(P,25));await Pt(100)}finally{for(let[R,F]of S)M.getPropertyValue(R)!==F.forcedValue||M.getPropertyPriority(R)!==F.forcedPriority||(F.value?M.setProperty(R,F.value,F.priority):M.removeProperty(R));!k&&!M.length&&t.removeAttribute("style"),await Pt(100)}})(),A={root:t,promise:C};Tr.add(A);try{await C}finally{Tr.delete(A)}}}catch{}let c=yo(t,i);if(i){let h=t.getBoundingClientRect(),w=t.offsetWidth||h.width,b=t.offsetHeight||h.height,x=h.width&&Math.abs(w-h.width)>=1?w/h.width:1,v=h.height&&Math.abs(b-h.height)>=1?b/h.height:1;r={x:(i.left-h.left)*x,y:(i.top-h.top)*v,width:i.width*x,height:i.height*v}}try{a=await Ae(t,o,e),s=hr(a,o.clip,(h,w)=>Et(h,w,o,e))}catch(h){throw U(o,"Capture failed while copying the element.",h),h}finally{n&&(n.rootBox=t.matches(En)||t.querySelector(En)?[t.offsetWidth,t.offsetHeight]:null),c()}wc(o.nodeMap,t.ownerDocument||document),o.slicer?.due()&&await o.slicer.pause();try{Xc(a,void 0,t)}catch(h){at(n,"svg-defs-failed","external references failed to inline",h),U(o,"Couldn't copy external SVG icons; some may be missing.",h)}try{await An(t,a,o,e)}catch(h){at(n,"pseudo-failed","::before/::after pass failed",h),U(o,"Couldn't copy ::before/::after content; some decorations may be missing.",h)}o.bgClipText&&qc(o.bgClipText),await Rr(a,e,o.nodeMap,{session:n,clip:r}),await lr(a,o);for(let[h,w]of o.nodeMap.entries())if(w?.tagName==="STYLE"&&h?.tagName==="STYLE"&&!h.hasAttribute("data-sd")){let b=h.textContent||"";try{let x=w.sheet&&w.sheet.cssRules;x&&/@media/i.test(b)&&(b=Ke(x))}catch{}/@(?:import|namespace)\b/i.test(b)||(b=`@layer{${b}}`),h.textContent=b}try{let h=[...a.querySelectorAll("style[data-sd]")].sort((w,b)=>w.getAttribute("data-sd")-b.getAttribute("data-sd"));for(let w of h)f+=w.textContent||"",w.remove()}catch(h){U(o,"Couldn't copy shadow DOM styles.",h)}o.slicer?.due()&&await o.slicer.pause();let u=Qn(o.styleMap);l=Array.from(u.entries()).map(([h,w])=>`.${w}{${h}}`).join("");let y=f+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+(o.usesPlaceholder?Gm:"")+(o.pseudoCSS||"");l=y+l;for(let[h,w]of o.styleMap.entries())Ns(h,w,u);try{qm(t,a,o.nodeMap)}catch(h){U(o,"Couldn't bring an open dialog or popover into the capture.",h)}let m=t.ownerDocument.defaultView,g=t===t.ownerDocument.body&&m&&(m.scrollX||m.scrollY);if((o.clip||t.scrollTop||t.scrollLeft||g)&&a?.nodeType===1)try{let h=o.clip&&r?{x:r.x,y:r.y}:{x:0,y:0};rf(t,a,o.nodeMap,o.styleCache,h)}catch(h){U(o,"Couldn't keep fixed-position elements in place.",h)}for(let[h,w]of o.nodeMap.entries())w===t&&t===t.ownerDocument.scrollingElement||Ls(h,w,o.nodeMap,o.styleCache);let p=t.ownerDocument;if((t===p.body||t===p.documentElement)&&p.documentElement.localName==="html"){let h=o.styleCache.get(p.documentElement)||W(p.documentElement);t===p.documentElement&&(a.style.overflow="visible");let w=t===p.body?a:a.querySelector("body");if(w&&h.overflowX==="visible"&&h.overflowY==="visible"&&h.contain==="none"&&!h.containerType?.includes("size")&&h.contentVisibility!=="auto"&&h.contentVisibility!=="hidden"){let b=o.styleCache.get(p.body)||W(p.body);b.contain==="none"&&!b.containerType?.includes("size")&&b.contentVisibility!=="auto"&&b.contentVisibility!=="hidden"&&b.display!=="none"&&(w.style.overflow="visible")}}if(t===o.nodeMap.get(a)){let h=o.styleCache.get(t)||W(t);o.styleCache.set(t,h);let w=yi(h.transform);if(a.style.margin="0",a.style.top="auto",a.style.left="auto",a.style.right="auto",a.style.bottom="auto",a.style.animation="none",a.style.transition="none",a.style.willChange="auto",a.style.float="none",a.style.clear="none",a.style.placeSelf="normal",a.style.transform=w||"",a.style.translate="none",(/^inline-/.test(h.display)||h.display==="inline"&&jm.test(t.tagName))&&(a.style.verticalAlign="top"),uf(t,a,h),!a.hasAttribute("lang")){let b=t.closest?.("[lang]")?.getAttribute("lang")??t.ownerDocument?.documentElement?.getAttribute("lang");b&&a.setAttribute("lang",b)}}return{clone:a,classCSS:l,classPrefixCSS:y,shadowCSS:!!f,styleCache:o.styleCache,nodeMap:o.nodeMap,reconcileRisk:o.reconcileRisk||0,clipWindow:r,standIns:s,universe:ke(t,o)}}function qm(t,e,n){let o=[];for(let s of[":modal",":popover-open"])try{o.push(...t.querySelectorAll(s))}catch{}if(!o.length)return;let r=new Map;for(let[s,a]of n.entries())r.set(a,s);let i=214748e4;for(let s of o){let a=r.get(s);if(!(!a||a===e||a.parentNode==null)){try{let l=getComputedStyle(s,"::backdrop"),f=l.backgroundColor,c=l.backgroundImage;if(f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"||c&&c!=="none"){let d=document.createElement("div");d.setAttribute("data-sd-backdrop",""),d.style.cssText=`position:fixed;inset:0;z-index:${i};background-color:${f};`+(c&&c!=="none"&&c.includes("data:")?`background-image:${c};`:""),e.appendChild(d)}}catch{}i+=1,a.style.zIndex=String(i),e.appendChild(a),i+=1}}}function Ns(t,e,n){if(t.tagName==="STYLE")return;let o=n.get(e);o&&t.classList.add(o);let r=t.style?.backgroundImage;r&&r!=="none"&&(t.style.backgroundImage=r)}var Xm=["grid-template-columns","grid-template-rows","grid-template-areas","grid-auto-columns","grid-auto-rows","grid-auto-flow","row-gap","column-gap","align-items","justify-items","align-content","justify-content","flex-direction","flex-wrap"];function Ls(t,e,n,o){let r=e.scrollLeft,i=e.scrollTop;if(!(r||i)||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 u of c){if(u.nodeType!==1||u.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let d=n?.get(u),y=d&&(o?.get(d)||W(d)),m=u.style.position||y?.position;if(m!=="fixed"&&m!=="absolute")continue;let g=y&&y.position!=="absolute"&&m==="absolute",p=null;if(d&&!g)for(let b=d.parentElement||Ht(d);b;b=b.parentElement||Ht(b)){let x=o?.get(b)||W(b);if(m==="absolute"&&x.position!=="static"||x.transform&&x.transform!=="none"||x.translate&&x.translate!=="none"||x.rotate&&x.rotate!=="none"||x.scale&&x.scale!=="none"||x.filter&&x.filter!=="none"||x.backdropFilter&&x.backdropFilter!=="none"||x.perspective&&x.perspective!=="none"||/transform|perspective|filter/.test(x.willChange||"")||/layout|paint|strict|content/.test(x.contain||"")){p=b;break}if(b===e)break}if(p){p===e&&(u.style.top=y.top,u.style.left=y.left,u.style.right=y.right,u.style.bottom=y.bottom);continue}let h=parseFloat(u.style.top||y?.top)||0,w=parseFloat(u.style.left||y?.left)||0;u.style.top=`${h+i}px`,u.style.left=`${w+r}px`,m==="fixed"&&(u.style.position="absolute")}}catch{}let a=document.createElement("div");a.style.all="unset",a.style.direction="inherit",a.style.transform=`translate(${-r}px, ${-i}px)`,a.style.willChange="transform";let l=(o?.get(e)||W(e)).display,f=l.includes("grid")?"grid":l.includes("flex")?"flex":"";if(f){t.style.display=l.startsWith("inline")?"inline-block":"block",a.style.display=f;for(let c of Xm)a.style.setProperty(c,"inherit")}else a.style.display="inline-block";for(a.style.width="100%";t.firstChild;)a.appendChild(t.firstChild);t.appendChild(a)}we();At();Kt();var Sf="http://www.w3.org/1999/xlink";function Ym(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(Sf,"href"):null)}function Km(t){let e=parseFloat(t.dataset?.snapdomWidth||"")||0,n=parseFloat(t.dataset?.snapdomHeight||"")||0,o=parseInt(t.getAttribute("width")||"",10)||0,r=parseInt(t.getAttribute("height")||"",10)||0,i=parseFloat(t.style?.width||"")||0,s=parseFloat(t.style?.height||"")||0,a=e||i||o||t.width||t.naturalWidth||100,l=n||s||r||t.height||t.naturalHeight||100;return{width:a,height:l}}async function $r(t,e={},n=null){let o=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&o.unshift(t);let r=async l=>{if(!l.getAttribute("src")){let p=l.currentSrc||l.src||Cn(l.getAttribute("srcset"),l)||"";p&&l.setAttribute("src",p)}if(l.removeAttribute("srcset"),l.removeAttribute("sizes"),(l.getAttribute("src")||"").startsWith("data:")){l.width||(l.width=l.naturalWidth||100),l.height||(l.height=l.naturalHeight||100);return}let f=l.src||"";if(!f)return;let c=G.image?.get(f);if(c){l.src=c,l.width||(l.width=l.naturalWidth||100),l.height||(l.height=l.naturalHeight||100);return}let u=await bt(f,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});if(u.ok&&typeof u.data=="string"&&u.data.startsWith("data:")){G.image?.set(f,u.data),l.src=u.data,u.blob&&(l.__snapdomBlob=u.blob),l.width||(l.width=l.naturalWidth||100),l.height||(l.height=l.naturalHeight||100);return}let{width:d,height:y}=Km(l),{fallbackURL:m}=e||{};if(m)try{let p=typeof m=="function"?await m({width:d,height:y,src:f,element:l}):m;if(p){let h=await bt(p,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});if(h?.ok&&typeof h.data=="string"){l.src=h.data,l.width||(l.width=d),l.height||(l.height=y);return}}}catch{}let g="";e.placeholders!==!1&&(at(n,"image-fallback",`image failed to inline, using placeholder: ${f}`),g='img'),l.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(`${g}`)}`,l.width||(l.width=d),l.height||(l.height=y)},i=6;for(let l=0;l{let f=Ym(l);if(!f||f.startsWith("data:")||f.startsWith("blob:"))return;let c=await bt(f,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")&&(l.setAttribute("href",c.data),l.removeAttribute("xlink:href"),typeof l.removeAttributeNS=="function"&&l.removeAttributeNS(Sf,"href"))};for(let l=0;lm in i?i[m]:"":m=>r.getPropertyValue(m),a=s("border-image"),l=s("border-image-source"),f=a&&a!=="none"||l&&l!=="none",c=r.getPropertyValue("background-image"),u=s("background-color"),d=c&&c!=="none"||u&&u!=="rgba(0, 0, 0, 0)"&&u!=="transparent"||/url\s*\(|gradient\s*\(/i.test(r.getPropertyValue("background")||""),y=rt()&&(s("background-clip")||s("-webkit-background-clip")||"").includes("text");if(d&&!y)for(let m of Jm){let g=s(m);g&&e.style.setProperty(m,g)}for(let m of Nr){if(y&&m==="background-image")continue;let g=r.getPropertyValue(m);if(m==="background-image"&&(!g||g==="none")){let w=r.getPropertyValue("background");w&&/url\s*\(/.test(w)&&(g=Ce(w).filter(b=>/url\s*\(/.test(b)).join(", ")||g)}if(!g||g==="none")continue;let p=Ce(g),h=await Promise.all(p.map(w=>sn(w,o)));h.some(w=>w&&w!=="none"&&!/^url\(undefined/.test(w))&&e.style.setProperty(m,h.join(", "))}for(let m of Zm){let g=s(m);!g||g==="initial"||e.style.setProperty(m,g)}if(f)for(let m of Qm){let g=s(m);!g||g==="initial"||e.style.setProperty(m,g)}if(d&&/fixed/.test(s("background-attachment")||""))try{await ng(t,e,r)}catch{}}function eg(t,e,n,o,r){let i=(t||"auto").trim();if(i==="cover"||i==="contain"){if(!e||!n)return{w:o,h:r};let d=i==="cover"?Math.max(o/e,r/n):Math.min(o/e,r/n);return{w:e*d,h:n*d}}let s=i.split(/\s+/),a=(d,y)=>{if(d==="auto"||d===void 0)return null;if(d.endsWith("px"))return parseFloat(d);if(d.endsWith("%"))return y*parseFloat(d)/100},l=a(s[0],o),f=a(s[1],r);if(l===void 0||f===void 0)return null;let c=l,u=f;return c==null&&u==null?(c=e||o,u=n||r):c==null?c=e&&n?u*(e/n):o:u==null&&(u=e&&n?c*(n/e):r),!c||!u?null:{w:c,h:u}}async function ng(t,e,n){let o=(n.getPropertyValue("background-attachment")||"").split(",").map(m=>m.trim()),r=Zn();if(!r)for(let m=t.parentElement;m&&!r;m=m.parentElement){let g=W(m);(g.transform&&g.transform!=="none"||g.filter&&g.filter!=="none")&&(r=!0)}if(r){e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "));return}let i=t.getBoundingClientRect(),s=t.ownerDocument?.defaultView||window,a=s.innerWidth,l=s.innerHeight,f=Ce(e.style.backgroundImage||n.getPropertyValue("background-image")||""),c=(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=[],y=[];for(let m=0;m{if(!S)return 0;if(S.endsWith("px"))return parseFloat(S);if(S.endsWith("%"))return(E-R)*parseFloat(S)/100},M=A(C[0]||"0%",a,v.w),k=A(C[1]||C[0]||"0%",l,v.h);if(M===void 0||k===void 0){d.push(p),y.push(h);continue}d.push(`${Pr(v.w)}px ${Pr(v.h)}px`),y.push(`${Pr(M-i.left)}px ${Pr(k-i.top)}px`)}e.style.setProperty("background-size",d.join(", ")),e.style.setProperty("background-position",y.join(", ")),e.style.setProperty("background-attachment",o.map(()=>"scroll").join(", "))}var Pr=t=>Math.round(t*100)/100;async function Lr(t,e,n,o={},r=new Map,i=!1){if(!e)return;let s=[],a=(c,u)=>{if(ql(c)){if(i&&ns(c)){let d=n.get(c)||W(c);if(Nr.every(y=>(d.getPropertyValue(y)||"none")==="none")&&!/url\s*\(/.test(d.getPropertyValue("background")||""))return}s.push([c,u])}};t&&a(t,e);let l=[e];for(;l.length;){let c=l.pop();if(c.children)for(let u of c.children){if(u.tagName==="STYLE")continue;let d=r.get(u);d&&a(d,u),l.push(u)}}let f=6;for(let c=0;ctg(u,d,n,o)))}xt();Re();ne();function Cf(t,e,n=new Map){let o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let l=r.currentNode;l;l=r.nextNode()){let f=n.get(l);if(f?.nodeType!==1)continue;let c=W(f),u=c.getPropertyValue("backdrop-filter")||c.getPropertyValue("-webkit-backdrop-filter");u&&u!=="none"&&l!==e&&o.push({cloneEl:l,orig:f,bf:u,path:ug(e,l)})}if(!o.length)return;let i=t.getBoundingClientRect(),s=Nc(),a=o.map((l,f)=>{let c=e.cloneNode(!0);dg(vf(c,l.path));for(let u=0;u.001?1/a:1;o.style.position="absolute",o.style.left=`${(r.left-i.left)*l}px`,o.style.top=`${(r.top-i.top)*l}px`,o.style.width=`${r.width}px`,o.style.height=`${r.height}px`,o.style.margin="0",o.style.filter=n,l!==1&&(o.style.transform=`scale(${l})`,o.style.transformOrigin="top left");let f=[s.borderTopWidth,s.borderRightWidth,s.borderBottomWidth,s.borderLeftWidth],{coversBorder:c,movesBorder:u}=ag(s),d=c?`inset:${f.map(h=>`-${h}`).join(" ")};border:solid transparent;border-width:${f.join(" ")};`:"inset:0;",y=document.createElement("div");y.style.cssText=`position:absolute;${d}border-radius:inherit;overflow:hidden;z-index:-2`,y.appendChild(o);let m=document.createElement("div");m.style.cssText=`position:absolute;${d}border-radius:inherit;z-index:-1`,m.style.padding=`${s.paddingTop} ${s.paddingRight} ${s.paddingBottom} ${s.paddingLeft}`,m.style.backgroundColor=s.backgroundColor,m.style.backgroundImage=t.style.backgroundImage||s.backgroundImage;for(let h of og)m.style.setProperty(h,s.getPropertyValue(h));if(u){for(let h of rg)m.style.setProperty(h,t.style.getPropertyValue(h)||s.getPropertyValue(h));t.style.setProperty("border-color","transparent","important"),t.style.setProperty("border-image","none","important")}let{inset:g,outer:p}=lg(s.boxShadow);g&&(m.style.boxShadow=g,t.style.setProperty("box-shadow",p||"none","important")),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(m),t.prepend(y)}function ag(t){let e=`${t.overflowX} ${t.overflowY}`;return/auto|scroll/.test(e)?{coversBorder:!1,movesBorder:!1}:{coversBorder:!0,movesBorder:e==="visible visible"}}function lg(t){let e=[],n=[];if(t&&t!=="none")for(let o of fe(t,","))(/\binset\b/i.test(o)?e:n).push(o.trim());return{inset:e.join(", "),outer:n.join(", ")}}var _r=128;function cg(t,e,n,o,r,i,s){let a=pr(r),l={rect:{left:o.left-a,top:o.top-a,right:o.right+a,bottom:o.bottom+a},root:n,...s},f=new Map,c=[[t,e]];for(;c.length;){let[d,y]=c.pop(),m=i.get(y);if(m?.nodeType===1){if(fs(m,l)){let w=us(m,l,d);for(let b of Nr)w.style?.getPropertyValue(b)&&w.style.setProperty(b,"none");d.replaceWith(w);continue}f.set(d,m);let h=ho(m,l);(h.left>o.right+_r||h.righto.bottom+_r||h.bottomf.split("|")):[];if(a.length){let f=new Set(e);return a.some(c=>f.has(c.split(":")[0].trim().toLowerCase()))}if(s.some(f=>i.endsWith(f))||n.some(f=>i===f.toLowerCase()||i.endsWith("."+f.toLowerCase())))return!0;let l=(o.pathname+o.search).toLowerCase();if(/\bfont(s)?\b/.test(l)||/\.woff2?(\b|$)/.test(l)||hg.some(f=>l.includes(f)))return!0;for(let f of e){let c=f.toLowerCase().replace(/\s+/g,"+"),u=f.toLowerCase().replace(/\s+/g,"-"),d=xg(f);if(l.includes(c)||l.includes(u)||d&&l.includes(d))return!0}return!1}catch{return!1}}var de="";function Br(t){return String(t).split(de)[0]}function zr(t){let e=new Set,n=new Set;try{for(let o of t.fonts){let r=String(o.family).replace(/["']/g,"").toLowerCase();e.add(r),(o.status==="loading"||o.status==="loaded")&&n.add(r)}}catch{}return{declared:e,drawn:n}}function Co(t,e){try{return new URL(t,e||location.href).href}catch{return t}}function kf(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,o,r)=>{let i=(r||"").trim();return!i||/^data:|^blob:|^https?:|^file:|^about:/i.test(i)?n:`url("${Co(i,e)}")`})}var Rf=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,Dr=4;async function vg(t,e,n,o){if(!t)return t;let r=new Set;async function i(a,l,f=0){if(f>Dr)return U({debug:o},`Too many nested @import rules in ${l}; stopped at ${Dr} levels.`),a;let c="",u=0,d,y=new RegExp(Rf.source,"g");for(;d=y.exec(a);){c+=a.slice(u,d.index),u=y.lastIndex;let m=(d[2]||d[4]||"").trim(),g=Co(m,l);if(r.has(g)){U({debug:o},`Skipped an @import that loops back: ${g}`);continue}r.add(g);let p="";try{let h=await bt(g,{as:"text",useProxy:n});h.ok&&typeof h.data=="string"&&(p=h.data)}catch{}p?(p=kf(p,g),p=await i(p,g,f+1),c+=` +/* inlined: ${g} */ ${p} -`):c+=d[0]}return c+=a.slice(u),c}let s=hf(t,e||location.href);return s=await i(s,e||location.href,0),s}var wf=/url\((["']?)([^"')]+)\1\)/g,Ms=/@font-face[^{}]*\{[^}]*\}/g;function Gt(t,e,n=""){return(t.match(new RegExp(`${e}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function mf(t){let e=[];for(let n of(t||"").split(",")){let o=n.trim().match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!o)continue;let r=parseInt(o[1].replace(/\?/g,"0"),16),i=parseInt((o[2]||o[1]).replace(/\?/g,"F"),16);e.push([Math.min(r,i),Math.max(r,i)])}return e}function gf(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[o,r]of e)if(n>=o&&n<=r)return!0;return!1}function As(t,e){let n=[];if(!t)return n;for(let o of t.matchAll(wf)){let r=(o[2]||"").trim();!r||r.startsWith("data:")||(/^https?:/i.test(r)||(r=wo(r,e)),n.push(r))}return n}async function Es(t,e,n){if(G.resource?.has(t))return G.resource.get(t);try{let o=await bt(t,{as:"dataURL",useProxy:e});if(o.ok&&typeof o.data=="string")return G.resource?.set(t,o.data),o.data}catch{U({debug:n},"Couldn't load font file:",t)}return null}async function Rr(t,e,n="",o=!1){let r=t;for(let i of t.matchAll(wf)){let s=_e(i[0]);if(!s)continue;let a=s.startsWith("http")||s.startsWith("data:")?s:wo(s,e),l=await Es(a,n,o);l!=null&&(r=r.replace(i[0],`url(${l})`))}return r}function cg(t){let e=(a,l)=>t.some(([f,c])=>!(cl)),n=e(0,255)||e(305,305),o=e(256,591)||e(7680,7935),r=e(880,1023),i=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":i?"cyrillic":r?"greek":o?"latin-ext":n?"latin":null}function fg(t={}){let e=new Set((t.families||[]).map(r=>String(r).toLowerCase())),n=new Set((t.domains||[]).map(r=>String(r).toLowerCase())),o=new Set((t.subsets||[]).map(r=>String(r).toLowerCase()));return(r,i)=>{if(e.size&&e.has(r.family.toLowerCase()))return!0;if(n.size)for(let s of r.srcUrls)try{if(n.has(new URL(s).host.toLowerCase()))return!0}catch{}if(o.size){let s=cg(i);if(s&&o.has(s))return!0}return!1}}function ug(t){let e=new Set,n=[];for(let r of t.match(Ms)||[]){let i=Gt(r,"font-family"),s=Tr(i)[0],a=Gt(r,"font-weight","400"),l=Gt(r,"font-style","normal"),f=Gt(r,"font-stretch","100%"),c=Gt(r,"unicode-range"),u=Gt(r,"src"),d=As(u,location.href),m=d.length?d.map(y=>String(y).toLowerCase()).sort().join("|"):u.toLowerCase(),g=[String(s||"").toLowerCase(),a,l,f,c.toLowerCase(),m].join("|");e.has(g)||(e.add(g),n.push(r))}let o=0;return t.replace(Ms,()=>n[o++]||"")}var yf=new WeakMap,dg=0;function pg(t){let e=yf.get(t);return e===void 0&&yf.set(t,e=dg++),e}function hg(t,e,n,o,r,i,s,a,l){let f=Array.from(t||[]).sort().join("|"),c=0,u=0;for(let b of s||[]){let w=Math.imul(b,2654435761);w^=w>>>15,w=Math.imul(w,2246822507),w^=w>>>13,c=c+w|0,u++}let d=e?JSON.stringify({families:(e.families||[]).map(b=>String(b).toLowerCase()).sort(),domains:(e.domains||[]).map(b=>String(b).toLowerCase()).sort(),subsets:(e.subsets||[]).map(b=>String(b).toLowerCase()).sort()}):"",m=(n||[]).map(b=>`${(b.family||"").toLowerCase()}::${b.weight||"normal"}::${b.style||"normal"}::${b.stretchPct??100}::${b.src||""}`).sort().join("|"),g=o||"",y=(r||[]).map(b=>String(b).toLowerCase()).sort().join("|"),p=pg(i||document),h=(a||[]).map(b=>String(b)).sort().join("|");return`fonts-embed-css::req=${f}::ex=${d}::lf=${m}::px=${g}::fd=${y}::doc=${p}::cp=${c}::n=${u}::ic=${h}::env=${l}`}async function xf({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:o=[],useProxy:r="",fontStylesheetDomains:i=[],iconMatchers:s=[],doc:a=document,debug:l=!1}={}){t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let f=new Map;for(let x of t){let[E,R,F,N]=String(x).split(ue);if(!E)continue;let P=E.toLowerCase(),_=f.get(P)||[];_.push({w:parseInt(R,10),s:F,st:parseInt(N,10)}),f.set(P,_)}function c(x,E,R,F){let N=String(x).toLowerCase();if(!f.has(N))return null;let P=f.get(N),_=og(R),I=rg(E),B=ig(F),D=_.min!==_.max,z=_.min,$=L=>I.kind==="normal"&&L==="normal"||I.kind!=="normal"&&(L==="italic"||L==="oblique"),T=P.filter(L=>(D?L.w>=_.min&&L.w<=_.max:L.w===z)&&$(ks(L.s))&&L.st>=B.min&&L.st<=B.max);if(T.length)return{exact:T,near:[]};if(!D){let L=P.filter(O=>Math.abs(z-O.w)<=300&&$(ks(O.s))&&O.st>=B.min&&O.st<=B.max);if(L.length)return{exact:T,near:L}}return!D&&I.kind==="normal"&&P.some(L=>Math.abs(z-L.w)<=300&&L.st>=B.min&&L.st<=B.max)?{exact:T,near:[]}:null}let u=fg(n);pn(a),ne();let d=hg(t,n,o,r,i,a,e,s,pn(a));if(G.resource?.has(d))return G.resource.get(d);let m=[];for(let x of a.querySelectorAll("style")){let E=x.textContent||"";for(let R of E.matchAll(bf)){let F=(R[2]||R[4]||"").trim();if(!F||ns(F,s))continue;a.querySelector(`link[rel="stylesheet"][href="${F}"]`)||m.push(F)}}let g=[];m.length&&await Promise.all(m.map(x=>new Promise(E=>{if(a.querySelector(`link[rel="stylesheet"][href="${x}"]`))return E(null);let R=a.createElement("link");R.rel="stylesheet",R.href=x,rt(R),R.setAttribute("data-snapdom","injected-import");let F=setTimeout(()=>E(null),3e3),N=P=>{clearTimeout(F),E(P)};R.onload=()=>N(R),R.onerror=()=>N(null),a.head.appendChild(R),g.push(R)})));let y="",p=new Set,h=[],b=[],w=new Map,k=(x,E)=>E.some(([R,F])=>x>=R&&x<=F),v=(x,E)=>{if(E.length)for(let R of x){let F=w.get(R)||new Set;for(let N of e)k(N,E)&&F.add(N);w.set(R,F)}},M=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(x=>!!x.href);for(let x of g)try{x.remove()}catch{}for(let x of M)try{if(ns(x.href,s))continue;let E="",R=!1;try{R=new URL(x.href,location.href).origin===location.origin}catch{}if(!R){let N=Array.isArray(i)?i:[];if(!ag(x.href,f.keys(),N))continue}if(R){let N=Array.from(a.styleSheets).find(P=>P.href===x.href);if(N)try{let P=N.cssRules||[];E=Array.from(P).map(_=>_.cssText).join("")}catch{}}if(!E){let N=await bt(x.href,{as:"text",useProxy:r,debug:l});N?.ok&&typeof N.data=="string"&&(E=N.data)}E=await lg(E,x.href,r,l);let F="";for(let N of E.match(Ms)||[]){let P=Gt(N,"font-family"),_=Tr(P)[0];if(!_||Jt(_,s))continue;let I=Gt(N,"font-weight","400"),B=Gt(N,"font-style","normal"),D=Gt(N,"font-stretch","100%"),z=Gt(N,"unicode-range"),$=Gt(N,"src"),T=As($,x.href),L=c(_,B,I,D);if(!L&&!f.has(_.toLowerCase()))continue;let O=mf(z);if(!gf(e,O))continue;let K={family:_,weightSpec:I,styleSpec:B,stretchSpec:D,unicodeRange:z,srcRaw:$,srcUrls:T,href:x.href};if(n&&u(K,O))continue;let Q={family:_.toLowerCase(),block:N,srcRaw:$,baseHref:x.href};if(!L){h.push(Q);continue}if(L.near.length){b.push({...Q,near:L.near,ranges:O});continue}v(L.exact,O),p.add(_.toLowerCase());let j=/url\(/i.test($)?await Rr(N,x.href,r,l):N;F+=j}F.trim()&&(y+=F)}catch{U({debug:l},"Couldn't read stylesheet:",x.href)}let C=new Set;async function S(x,E,R=0){let F=a?.defaultView||window;if(x.disabled||x.media?.mediaText&&!F.matchMedia(x.media.mediaText).matches)return;let N;try{N=x.cssRules||[]}catch{return}for(let P of N){if(P.type===CSSRule.IMPORT_RULE&&P.styleSheet){let _=P.href?wo(P.href,E):E;if(R>=$r){U({debug:l},`Too many nested @import rules in ${_}; stopped at ${$r} levels.`);continue}if(_&&C.has(_)){U({debug:l},`Skipped an @import that loops back: ${_}`);continue}_&&C.add(_),await S(P.styleSheet,_,R+1);continue}if(P.cssRules?.length){if(P.type===CSSRule.MEDIA_RULE&&!F.matchMedia(P.conditionText).matches||P.type===CSSRule.SUPPORTS_RULE&&!F.CSS.supports(P.conditionText))continue;await S(P,E,R);continue}if(P.type===CSSRule.FONT_FACE_RULE){let _=(P.style.getPropertyValue("font-family")||"").trim(),I=Tr(_)[0];if(!I||Jt(I,s))continue;let B=(P.style.getPropertyValue("font-weight")||"").trim(),D=(P.style.getPropertyValue("font-style")||"").trim(),z=(P.style.getPropertyValue("font-stretch")||"").trim(),$=(P.style.getPropertyValue("font-variation-settings")||"").trim(),T=(P.style.getPropertyValue("src")||"").trim(),L=(P.style.getPropertyValue("unicode-range")||"").trim(),O=B||"400",K=D||"normal",Q=z||"100%",j=(D?`font-style:${D};`:"")+(B?`font-weight:${B};`:"")+(z?`font-stretch:${z};`:"")+($?`font-variation-settings:${$};`:"")+(L?`unicode-range:${L};`:"")+eg.map(pt=>{let Rt=P.style.getPropertyValue(pt);return Rt?`${pt}:${Rt};`:""}).join(""),q=c(I,K,O,Q);if(!q&&!f.has(I.toLowerCase()))continue;let V=mf(L);if(!gf(e,V))continue;let gt={family:I,weightSpec:O,styleSpec:K,stretchSpec:Q,unicodeRange:L,srcRaw:T,srcUrls:As(T,E||location.href),href:E||location.href};if(n&&u(gt,V))continue;let et=`"${String(I).replace(/^\s*["']|["']\s*$/g,"").replace(/(["\\])/g,"\\$1")}"`;if(!q){h.push({family:I.toLowerCase(),block:`@font-face{font-family:${et};src:${T};${j}}`,srcRaw:T,baseHref:E||location.href});continue}if(q.near.length){b.push({family:I.toLowerCase(),block:`@font-face{font-family:${et};src:${T};${j}}`,srcRaw:T,baseHref:E||location.href,near:q.near,ranges:V});continue}if(v(q.exact,V),p.add(I.toLowerCase()),/url\(/i.test(T)){let pt=await Rr(T,E||location.href,r,l);y+=`@font-face{font-family:${et};src:${pt};${j}}`}else y+=`@font-face{font-family:${et};src:${T};${j}}`}}}let A=new Set([...a.styleSheets,...a.adoptedStyleSheets||[]]);for(let x of A)if(!(x.href&&M.some(E=>E.href===x.href)))try{let E=x.href||a.baseURI||location.origin+"/";E&&C.add(E),await S(x,E)}catch{}for(let x of b)x.near.some(R=>{let F=w.get(R);if(!F||!e.size)return!0;for(let N of e)if(!F.has(N)&&(!x.ranges.length||k(N,x.ranges)))return!0;return!1})&&(p.add(x.family),y+=/url\(/i.test(x.srcRaw)?await Rr(x.block,x.baseHref,r,l):x.block);for(let x of h)p.has(x.family)||(y+=/url\(/i.test(x.srcRaw)?await Rr(x.block,x.baseHref,r,l):x.block);try{for(let x of a.fonts||[]){if(!x||!x.family||x.status!=="loaded"||!x._snapdomSrc)continue;let E=String(x.family).replace(/^['"]+|['"]+$/g,"");if(Jt(E,s)||!f.has(E.toLowerCase())||n?.families&&n.families.some(F=>String(F).toLowerCase()===E.toLowerCase()))continue;let R=String(x._snapdomSrc).startsWith("data:")?x._snapdomSrc:await Es(x._snapdomSrc,r,l);R!=null&&(y+=`@font-face{font-family:'${E}';src:url(${R});font-style:${x.style||"normal"};font-weight:${x.weight||"normal"};}`)}}catch{}for(let x of o){if(!x||typeof x!="object")continue;let E=String(x.family||"").replace(/^['"]+|['"]+$/g,"");if(!E||Jt(E,s)||!f.has(E.toLowerCase())||n?.families&&n.families.some(I=>String(I).toLowerCase()===E.toLowerCase()))continue;let R=x.weight!=null?String(x.weight):"normal",F=x.style!=null?String(x.style):"normal",N=x.stretchPct!=null?`${x.stretchPct}%`:"100%",P=String(x.src||""),_=P.startsWith("data:")?P:await Es(P,r,l);_!=null&&(y+=`@font-face{font-family:'${E}';src:url(${_});font-style:${F};font-weight:${R};font-stretch:${N};}`)}return y&&(y=ug(y),G.resource?.set(d,y)),y}function Lr(t,e){let n=new Set,o=new Set;if(!t)return{required:n,usedCodepoints:o};let r=u=>{if(u)for(let d of u)o.add(d.codePointAt(0))},i=new Set,s=u=>{let d=u.fontFamily,m=u.fontWeight,g=u.fontStyle,y=u.fontStretch,p=d+ue+m+ue+g+ue+y;if(i.has(p))return;i.add(p);let h=Tr(d);if(!h.length)return;let b=ue+Fr(m)+ue+ks(g)+ue+ng(y);for(let w of h)n.add(w+b)},a=ke(t),l=t.getRootNode(),f=u=>{s(W(u));let d=u.getRootNode()===l?a:ke(u);for(let m of["::before","::after"]){let g=m==="::before"?d.before:d.after;if(g!==null){if(g==="")continue;try{if(!u.matches(g))continue}catch{}}let y=W(u,m),p=y&&y.content;if(!(!p||p==="none"||p==="normal"))if(s(y),/^["']/.test(p))r(p.slice(1,-1));else for(let h of p.match(/\\[0-9A-Fa-f]{1,6}/g)||[])o.add(parseInt(h.slice(1),16))}},c=[t];for(let u=0;ui<=1114111?String.fromCodePoint(i):"").join(""),r=n.createElement("div");rt(r),r.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let i of t){let[s,a,l,f]=i.split(ue),c=n.createElement("span");c.textContent=o,c.style.fontFamily=`"${s}"`,c.style.fontWeight=a,c.style.fontStyle=l,c.style.fontStretch=`${f}%`,c.style.fontSize="32px",c.style.lineHeight="1",c.style.whiteSpace="nowrap",c.style.margin="0",c.style.padding="0",r.appendChild(c)}n.body.appendChild(r),r.offsetWidth,n.body.removeChild(r),await Pt(),await Pt()}Kt();At();ht();wt();var Wt=()=>{};function Ir(t,e){if(!t)return Wt;let n=[],o=200;function r(i){if(e){let s=i.getBoundingClientRect();if(s.width>0||s.height>0){let a=Math.max(s.right,s.left+(i.scrollWidth||0)),l=Math.max(s.bottom,s.top+(i.scrollHeight||0));if(ae.right+o||le.bottom+o)return}}if(i.firstElementChild===null&&i.firstChild!==null){let s=getComputedStyle(i),a=mg(i,s);a!==Wt&&n.push(a);let l=gg(i,s);l!==Wt&&n.push(l)}for(let s=i.firstElementChild;s;s=s.nextElementSibling)r(s)}return r(t),()=>n.forEach(i=>i())}function mg(t,e){if(!t)return Wt;e=e||getComputedStyle(t);let n=wg(e);if(n<=0||!Mf(t))return Wt;let o=kf(t),r=o.text,i=Sg(e);o.write("X");let s=t.scrollHeight-i;o.restore();let a=s>0?s:xg(e),l=Math.round(a*n+i),f=.5*(n+1);if(t.scrollHeight<=l+f)return Wt;let c=0,u=r.length,d=-1;for(;c<=u;){let g=c+u>>1;o.write(r.slice(0,Rs(r,g))+"\u2026"),t.scrollHeight<=l+f?(d=g,c=g+1):u=g-1}let m=(d>=0?r.slice(0,Rs(r,d)):"")+"\u2026";return o.write(m),Cf(t,m,o)}function gg(t,e){if(!t||(e=e||getComputedStyle(t),e.textOverflow!=="ellipsis")||e.whiteSpace!=="nowrap"&&e.whiteSpace!=="pre"||e.overflowX!=="hidden"&&e.overflowX!=="clip"||!Mf(t)||t.scrollWidth<=t.clientWidth+.5)return Wt;let n=kf(t),o=n.text,r=bg(t,e,n.nodes),i=c=>{if(!r){let d=Rs(o,c);return o.slice(0,d)+vf(o,d)+"\u2026"}let u=yg(o,o.length-c);return vf(o,u)+o.slice(u)+"\u2026"},s=0,a=o.length,l=-1;for(;s<=a;){let c=s+a>>1;n.write(i(c)),t.scrollWidth<=t.clientWidth+.5?(l=c,s=c+1):a=c-1}let f=l>=0?i(l):"\u2026";return n.write(f),Cf(t,f,n)}function Cf(t,e,n){return()=>{t.textContent===e&&n.restore()}}function kf(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 r=1;r=t.length)return e;let n=t.charCodeAt(e-1);return n>=55296&&n<=56319?e-1:e}function yg(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e);return n>=56320&&n<=57343?e-1:e}var Sf=/[\u0600-\u08FF\u1800-\u18AF\uFB50-\uFDFF\uFE70-\uFEFF]/;function vf(t,e){return e>0&&e(i.setStart(p,h),i.setEnd(p,b),i.getBoundingClientRect()),[a,l]=o,[f,c]=r,u=f.data.length-c,d=s(a,l,Math.min(a.data.length,l+1)),m=s(f,Math.max(0,u-1),u),g=t.getBoundingClientRect();if(e.direction==="rtl"){let p=g.right-(parseFloat(e.borderRightWidth)||0)-(parseFloat(e.paddingRight)||0);return Math.abs(m.right-p)0?n:0}function xg(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 Sg(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function Mf(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var An=["clone","render"],xo={clone:0,render:1},_t="render";function Af(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];if(!e.length)return{stage:_t,loweredBy:[]};let n=-1,o=[];for(let i of e){if(!i||typeof i!="object")continue;let s=i.needs===void 0?_t:i.needs;if(!Object.prototype.hasOwnProperty.call(xo,s))throw new Error(`[SnapDOM] Plugin '${i.name||"(unnamed)"}' declares needs: ${JSON.stringify(s)}, expected one of ${An.join(", ")}.`);o.push({name:i.name||"(unnamed)",needs:s}),n=Math.max(n,xo[s])}if(n<0)return{stage:_t,loweredBy:[]};let r=An[n];return{loweredBy:r===_t?[]:o.filter(i=>i.needs===r).map(i=>i.name),stage:r}}function En(t,e){return xo[t]>=xo[e]}function Ef(t,e,n=An){let o=n[n.length-1];if(e==null)return o;if(!Object.prototype.hasOwnProperty.call(xo,e))throw new Error(`[SnapDOM] ${t}: needs must be one of ${An.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 Rf(t,e,n){let o=e.length?e.map(r=>`'${r}'`).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 Rn=[];function Fn(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 Fs(...t){let e=t.flat();for(let n of e){let o=Fn(n);if(o){if(o.needs!==void 0&&o.needs!==_t)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 '${_t}'). Pass it per capture: snapdom(el, { plugins: [...] }).`);Rn.some(r=>r&&r.name&&o.name&&r.name===o.name)||Rn.push(o)}}}function Ff(t){return t&&Array.isArray(t.plugins)?t.plugins:Rn}async function de(t,e,n){let o=n,r=Ff(e);for(let i of r){let s=i&&typeof i[t]=="function"?i[t]:null;if(!s)continue;let a=await s(e,o);typeof a<"u"&&(o=a)}return o}async function Or(t,e,n){let o=[],r=Ff(e);for(let i of r){let s=i&&typeof i[t]=="function"?i[t]:null;if(!s)continue;let a=await s(e,n);typeof a<"u"&&o.push(a)}return o}function vg(){Rn.length=0}var Cg=0;function kg(t){let e=[];if(Array.isArray(t))for(let n of t){let o=Fn(n);if(!o)continue;o.name||(o.name=`anonymous-${++Cg}`);let r=e.findIndex(i=>i&&i.name===o.name);r>=0&&e.splice(r,1),e.push(o)}for(let n of Rn)n&&n.name&&!e.some(o=>o.name===n.name)&&e.push(n);return Object.freeze(e)}function Tf(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=kg(e)),t}function Ts(){return Rn.slice()}var Mg=["resolveNode","beforeSnap","beforeClone","afterClone","beforeRender","afterRender"];function Wr(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];for(let n of e){let o=Fn(n);if(!(!o||o.pure===!0)){for(let r of Mg)if(typeof o[r]=="function")return!0}}return!1}Ot();wt();xt();ht();Kt();At();wt();xt();ht();wt();var Is="http://www.w3.org/1999/xhtml",Ag=`all:unset;${kt}:nowrap;word-break:normal;line-break:auto`,Eg=[[kt,"nowrap"],["word-break","normal"],["line-break","auto"]],$f="\u2060",Pf=/[\w\u00C0-\u024F]/,Nf=new Set(["inline","contents","ruby","ruby-base","ruby-base-container"]),Rg=new Set(["img","picture","video","audio","canvas","iframe","object","embed","input","textarea","select","script","style","template","noscript","title"]),Fg=new Set(["script","style","template","noscript","title"]),zf=Object.freeze([]),Tg=/^[ \t\n\r\f!-~\u00A0-\u00AC\u00AE-\u024F\u0370-\u03FF\u0400-\u04FF\u1E00-\u1EFF\u2010-\u2027\u2030-\u205E\u20A0-\u20CF\u2100-\u22FF\u25A0-\u25FC\u2713-\u2717]*$/,$g=/[0-9A-Za-z_'\u00C0-\u024F\u0370-\u03FF\u0400-\u04FF\u1E00-\u1EFF\u2019]/,Pg=/[-/,.:;!?)\]}%\u2010\u2013\u201D]/,Ng=new Set(["none","uppercase","lowercase","capitalize"]),Lg=new Set(["block","inline-block","list-item","flow-root","table-caption"]),_g=new Set(["button","fieldset","legend","details","summary","marquee"]),Lf={start:0,left:0,"-webkit-left":0,"-moz-left":0,center:1,"-webkit-center":1,"-moz-center":1,end:2,right:2,"-webkit-right":2,"-moz-right":2},Ns={forced:!0},Ig=6,Og=.25;function mt(t){return t===32||t===9||t===10||t===12||t===13||t===5760||t>=8192&&t<=8202&&t!==8199||t===8287||t===12288}function Br(t,e){let n=t.node.data;return mt(n.charCodeAt(e?0:n.length-1))}function Ee(t,e){return Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top)>Math.min(t.height,e.height)/2}var it=t=>parseFloat(t)||0;function Wg(t,e){if(!Gi.test(t)||e.overflowWrap!=="normal"||e.hyphens==="auto")return!0;let n=e.wordBreak;return n!=="normal"&&n!=="keep-all"||e.lineBreak==="anywhere"}function _f(t){if(t.loose===void 0){let e=t.node.data,n=0;for(;nn&&mt(e.charCodeAt(o-1));)o--;t.loose=Wg(e.slice(n,o),t.cs)}return t.loose}function Dg(t){let e=t.whiteSpaceCollapse;if(!e){let o=t.whiteSpace;e=o==="normal"||o==="nowrap"?"collapse":""}let n=e==="collapse"&&t.wordBreak;return(n==="normal"||n==="keep-all")&&t.overflowWrap==="normal"&&t.lineBreak!=="anywhere"&&t.hyphens!=="auto"&&Ng.has(t.textTransform||"none")&&t.direction==="ltr"}function Uf(t,e){let n=t.data,o=[];for(let c=0;c=56320&&u<=57343&&c>0||mt(u)||o.push(c)}let r=new Map,i=c=>{let u=r.get(c);if(u===void 0){let d=o[c],m=n.charCodeAt(d);e.setStart(t,d),e.setEnd(t,Math.min(n.length,d+(m>=55296&&m<=56319?2:1)));let g=e.getClientRects();u=null;for(let y=g.length-1;y>=0&&!u;y--)g[y].width&&g[y].height&&(u=g[y]);r.set(c,u)}return u},s=0;for(;ss&&!i(a);)a--;let l=[],f=(c,u)=>{if(Ee(i(c),i(u)))return;let d=c+u>>1,m=d>c?d:u;for(;mc&&!i(m);)m--;if(m<=c){l.push(o[u]);return}f(c,m),f(m,u)};return a>s&&f(s,a),{breaks:l,start:i(s),end:i(a)}}function Hf(t,e){if(t.rl)return t.rl;e.selectNodeContents(t.live);let n=e.getClientRects(),o=[],r=null;for(let i=0;i=0;s--){let a=r[s];if(!(!a.width||!a.height))if(!i)i={top:a.top,bottom:a.bottom,height:a.height,left:a.left,right:a.right};else if(Ee(i,a))i.left=Math.min(i.left,a.left);else return null}return i}function $s(t,e){if(t){for(let n=0;n=0&&mt(t.charCodeAt(e));)e--;return e}function Ug(t,e){for(;e>0&&!mt(t.charCodeAt(e-1));)e--;return e}function If(t,e){return!mt(t.charCodeAt(e))&&mt(t.charCodeAt(e-1))}function Hg(t,e,n,o){e=Math.min(Math.max(e,n+1),o-1);for(let r=0;e-r>n||e+rn&&If(t,e-r))return e-r}return-1}function Vg(t,e){let n=t.rl,o=t.live,r=o.data,i=0;for(;ii&&mt(r.charCodeAt(s-1));)s--;let a=0;for(let d of n)a+=d.right-d.left;let l=[],f=[],c=i,u=0;for(let d=1;dIg)return null;if(p<0&&(h=Dr(o,m,So(r,m),e),p=$s(h,n),p===d&&h.left-n[d].left=s)return null;g=w-1,y=p,m=k,p=-1}else if(y>=d){let w=Ug(r,g);if(w<=c)return null;p=y,h=null,m=w,y=-1}else return null}if(!h&&(h=Dr(o,m,So(r,m),e),$s(h,n)!==d))return null;l.push(m),f.push(h),c=m}return{breaks:l,words:f}}function Ls(t,e){if(t.found===void 0&&(t.found=Vg(t,e),!t.found)){let n=Uf(t.live,e);t.found=n&&{breaks:n.breaks,words:null}}return t.found}function Ps(t,e){if(t.start!==void 0)return t.start!==null;if(t.start=t.end=null,t.atom){let s=t.atom.getBoundingClientRect();return s.height&&(t.start=t.end=s),t.start!==null}if(t.simple){let s=Hf(t,e);if(!s.length)return!1;if(s.length>1&&t.wraps){let a=Ls(t,e);if(!a)return!1;t.breaks=a.breaks}return t.start=s[0],t.end=s[s.length-1],!0}e.selectNodeContents(t.live);let n=e.getClientRects(),o=null,r=null,i=1;for(let s=0;s1&&t.wraps){let s=Uf(t.live,e);if(!s)return!1;t.breaks=s.breaks,t.start=s.start,t.end=s.end}else t.start=o,t.end=r;return!0}function jg(t,e,n){if(!e||e.nodeType!==1)return null;let o=[];for(let a=e.firstChild;a;a=a.nextSibling)a.nodeType===3&&o.push(a);let r=0;for(let a=t.firstChild;a;a=a.nextSibling)if(a.nodeType===3){if(r===o.length||o[r].data!==a.data)return null;r++}if(r!==o.length)return null;let i=W(e);if((i.writingMode||"horizontal-tb")!=="horizontal-tb"||Gg(e,i,n)===Yo)return null;let s=i.textWrapMode!=="nowrap"&&t.style?.getPropertyValue(kt)!=="nowrap";return{live:o,at:0,cs:i,wraps:s,plain:Dg(i)}}function Gg(t,e,n){let o=n.get(t);if(o!==void 0)return o;let r=t.parentElement;if(!r||e.display!=="inline")return gn(t,n);o=gn(r,n);let i=e.zoom;return o===ro&&i&&i!=="1"&&(o=Ko),n.set(t,o),o}function Vf(t,e=st()?"gecko":"blink"){if(e==="gecko"){let o=1.1*(t+1)/(120*t),r=1/(60*t)+.01,i=s=>r+s*o;return{zoom:t,starts:!0,optical:!0,early:i,pull:i}}let n=1/(64*t);return{zoom:t,starts:!1,optical:!1,early:(o,r)=>.05+r*n,pull:null}}function qg(t,e){let n=e.spaceMemo.get(t);if(n!==void 0)return n;let o=t.font||`${t.fontStyle} ${t.fontWeight} ${t.fontSize} ${t.fontFamily}`,r=`${o}|${t.wordSpacing}|${t.letterSpacing}`;if(n=e.spaceMemo.get(r),n===void 0){n=0;try{let i=e.ctx||(e.ctx=e.doc.createElement("canvas").getContext("2d"));i.font="1px serif",i.font=o,i.font!=="1px serif"&&(n=i.measureText("x x").width-i.measureText("xx").width+it(t.wordSpacing)+it(t.letterSpacing),n=Math.max(0,n-.05))}catch{n=0}e.spaceMemo.set(r,n)}return e.spaceMemo.set(t,n),n}function jf(t,e){let n=e.faces.get(t);if(n===void 0){let o=t.fontOpticalSizing==="auto"?t.fontVariationSettings||"":"opsz";n=/opsz/.test(o)?"":`${t.fontStyle}|${t.fontWeight}|${t.fontStretch}|${t.fontFamily}|${o}`,e.faces.set(t,n)}return n}function Xg(t,e){let n=e.doc,o=new Set,r=Kg(n),i=r===null?null:Of.get(n);r!==null&&i?.stamp!==r&&Of.set(n,i={stamp:r,faces:new Map});let s=new Map;for(let f of t)if(!f.why)for(let c of f.items){if(!c.node)continue;let u=c.cs,d=jf(u,e);if(!d)continue;let m=i?.faces.get(d);m!==void 0?m&&o.add(d):s.has(d)||s.set(d,{cs:u,text:`${Yg} ${c.node.data.trim().slice(0,40).trim()}`})}if(!s.size)return o;let a=rt(n.createElement("div"));a.style.cssText="all:initial;position:absolute!important;left:-99999px!important;top:0!important;visibility:hidden!important;white-space:nowrap!important;pointer-events:none!important;font-size:16px";let l=[];for(let[f,{cs:c,text:u}]of s){let d=c.fontVariationSettings&&c.fontVariationSettings!=="normal"?`${c.fontVariationSettings}, `:"",m=[];for(let g of['"opsz" 1','"opsz" 1000']){let y=n.createElement("span"),p=y.style;p.setProperty("font-style",c.fontStyle,"important"),p.setProperty("font-weight",c.fontWeight,"important"),p.setProperty("font-stretch",c.fontStretch,"important"),p.setProperty("font-family",c.fontFamily,"important"),p.setProperty("font-variation-settings",d+g,"important"),y.textContent=u,a.append(y,n.createElement("br")),m.push(y)}l.push([f,m])}(n.body||n.documentElement).appendChild(a);try{for(let[f,[c,u]]of l){let d=Math.abs(c.getBoundingClientRect().width-u.getBoundingClientRect().width)>.001;d&&o.add(f),i?.faces.set(f,d)}}finally{a.remove()}return o}var Yg="Hamburgefonstiv 0123456789",Of=new WeakMap;function Kg(t){let e=t.fonts;if(!e)return"";if(e.status!=="loaded")return null;let n=0;return e.forEach(o=>{o.status==="loaded"&&n++}),`${e.size}|${n}`}function Zg(t,e){if(t.why)return t.why;let n=t.root;if(!n)return"root";let o=W(n),r=o.display||"";if(!Lg.has(r)||_g.has(n.localName)||Se(n.localName,r))return"box";if((o.writingMode||"horizontal-tb")!=="horizontal-tb"||o.direction!=="ltr")return"direction";let i=Lf[o.textAlign],s=o.textAlignLast;if(i===void 0||s&&s!=="auto"&&Lf[s]!==i)return"align";let a=o.textWrapStyle;if(a==="balance"||a==="pretty")return"balance";let l=o.columnCount,f=o.columnWidth;if(l&&l!=="auto"||f&&f!=="auto")return"columns";if(i&&(it(o.textIndent)||r==="list-item"&&o.listStylePosition==="inside"))return"indent";if(gn(n,e.axes)!==ro)return"scaled";for(let C of t.items)if(C.node){if(!C.plain||C.wraps&&!C.simple)return"text";if(e.optical?.size&&e.optical.has(jf(C.cs,e)))return"optical"}let c=n.getClientRects();if(c.length!==1)return"fragmented";let u=c[0],d=it(o.borderLeftWidth),m=it(o.borderRightWidth),g=C=>C==="visible"||C==="clip";if((!g(o.overflowX)||!g(o.overflowY))&&(n.scrollLeft||n.offsetWidth-n.clientWidth-d-m>=2))return"scrollbar";let y=u.left+d+it(o.paddingLeft),p=u.right-m-it(o.paddingRight);for(let C of e.floats){if(C===n||C.contains(n))continue;let S=e.floatBoxes.get(C);if(!S){let A=C.getBoundingClientRect(),x=W(C);e.floatBoxes.set(C,S={top:A.top-it(x.marginTop),bottom:A.bottom+it(x.marginBottom),left:A.left-it(x.marginLeft),right:A.right+it(x.marginRight)})}if(S.bottom>u.top&&S.topu.left&&S.left1&&!Ls(C,e.range))return"unmeasured";Br(C,!0)&&k.push(C.cs)}M&&M.node&&Br(M,!1)&&k.push(M.cs);for(let A=0;AEe(N,E));if(!F)return"order";R?F.right=Math.max(F.right,E.right+C.mr):F.left=Math.min(F.left,E.left-C.ml),F.n++,F.edges++}}for(let C of b)if(C.room=i===0?p-C.right:i===2?C.left-y:p-y-(C.right-C.left),C.roomz&&mt(I.charCodeAt($-1));)$--;D=!A.at&&x.rl.length===1&&z===$?x.rl[0]:Dr(x.live,B,z,e.range)}if(!D)return"unmeasured";E=D.right-D.left,R=z-B}let N=E-S.room,P=e.risk.pull(S.n+1+R,S.edges);if(N>=P)continue;let _=1/0;if(!F)for(let I of A.spaces)_=Math.min(_,qg(I,e));if(_===1/0&&(_=0),_+N=e?o[e-1]:0,i=eu&&mt(o.charCodeAt(d-1));)d--;!c&&d===f&&o.charCodeAt(d-1)===173&&d--;let m=!a&&t.before?l:u,g=c&&t.after?f:d;if(m>l&&i.append(o.slice(l,m)),i.append(_s(r,o.slice(m,g))),g{let A=a.get(S);return A||a.set(S,A={root:S,items:[],links:[],runs:[],boxes:[],last:null,gap:[],why:""}),A},u=(S,A)=>{let x=c(S);x.why||(x.why=A)},d=(S,A)=>{let x=S.last;if(x){let E=S.gap.length||x.wraps&&Br(x,!1)||A.wraps&&Br(A,!0),R=!E&&x.node&&A.node&&(x.wraps||A.wraps)&&!(Pf.test(x.node.data[x.node.data.length-1])&&Pf.test(A.node.data[0]));(E||R||x.atom||A.atom)&&S.links.push({prev:x,run:A,gap:S.gap.slice(),seam:R}),S.gap.length=0}S.last=A,S.items.push(A)},m=(S,A,x,E)=>{let R=x.transform,F=x.translate;(Bf(x)||R&&R!=="none"||F&&F!=="none")&&u(S.root,"shifted"),(it(x.marginLeft)<0||it(x.marginRight)<0)&&u(S.root,"margin"),d(S,{atom:A,el:E,cs:x,start:void 0,end:null})},g=[e,null];for(;g.length;){let S=g.pop(),A=g.pop();if(A.nodeType===3){let R=A.parentNode,F=l.get(R);F===void 0&&l.set(R,F=jg(R,n.get(R),s));let N=A.data,P=0;for(;P0,end:$>0,ml:B,mr:D}))}else F!=="contents"&&u(S,"ruby");else{if(N&&m(c(S),E,R,A),!E.childElementCount&&Se(E.localName,F)&&E.clientHeight-it(R.paddingTop)-it(R.paddingBottom)<1.5*(it(R.lineHeight)||1.2*it(R.fontSize)))continue;x=E}}else{if(Fg.has(A.localName))continue;{let R=A.getAttribute?.("data-snapdom-pseudo"),F=R&&n.get(A.parentNode),N=F?W(F,R):null;(!N||N.position!=="absolute"&&N.position!=="fixed")&&u(S,R?"pseudo":"wrapper")}}for(let R=A.lastChild;R;R=R.previousSibling)g.push(R,x)}let y=[];for(let S of a.values())(S.links.length||S.runs.some(_f))&&y.push(S);let p={risk:r,range:i,axes:s,floats:f,floatBoxes:new Map,doc:o,ctx:null,spaceMemo:new Map,faces:new Map,optical:null};r&&r.optical&&(p.optical=Xg(y,p));let h=[],b=[],w=new Set,k=[];for(let S of y)if(!(r&&!Zg(S,p))){for(let{prev:A,run:x,gap:E,seam:R}of S.links)if(Ps(A,i)&&Ps(x,i)&&Ee(A.end,x.start)){A.after=!0,x.before=!0;for(let F of E)h.push(F);R&&b.push(A),A.atom&&w.add(A),x.atom&&w.add(x)}for(let A of S.runs){let x=A.node.data,E=0;for(;EE&&mt(x.charCodeAt(R-1));)R--;!(A.before&&E>0||A.after&&RS.node),...h,...b.map(S=>S.node),...[...w].map(S=>S.el)]));for(let S of k)S.tail=Qg(S,C.get(S.node));for(let S of h){let A=C.get(S);if(A.nodeType===1)A.replaceWith($f);else{let x=_s(v,"");A.replaceWith(x),x.append(A)}}for(let S of b)(S.tail||C.get(S.node)).after($f);for(let S of w){let A=C.get(S.el),x=_s(v,"");A.replaceWith(x),x.append(A);for(let[E,R]of Eg){let F=S.cs.getPropertyValue(E);F&&F!==R&&A.style?.setProperty(E,F)}}return M}Ze();ho();function Tn(t,e,n,o){return t>e+.5?t-n:o-n}function ny(t){let e=r=>r&&r!=="transparent"&&!/^rgba\(.*,\s*0\)$/.test(r),n=W(t.documentElement).backgroundColor,o=e(n)?n:W(t.body).backgroundColor;return e(o)?`;background-color:${o} !important`:""}var oy=/(?:^|;)(?:box-shadow|text-shadow|outline-style|filter|-webkit-filter):/;function ry(t,e){if(Z())return t;let n=t.indexOf("");if(n===-1)return t;let o=[],r=n;if(t.indexOf("]*>[\s\S]*?<\/style>/g,p;for(y.lastIndex=n;p=y.exec(t);)o.push({text:t.slice(r,p.index),intern:!0}),o.push({text:p[0],intern:!1}),r=y.lastIndex}o.push({text:t.slice(r),intern:!0});let i=new Map,s=/ style="([^"]*)"/g,a;for(let y of o)if(y.intern)for(s.lastIndex=0;a=s.exec(y.text);)i.set(a[1],(i.get(a[1])||0)+1);let l=0;for(let[y,p]of i)p>1&&(l+=(p-1)*y.length);if(l<2048||t.includes(" data-sdi="))return t;let f=sy(e,o.some(y=>!y.intern),t.includes("data-snapdom-asset"));if(f===null)return t;let c=new Map,u=0,d=[],m=(y,p)=>{if((i.get(p)||0)<2||f.has(p))return y;let h=c.get(p);return h===void 0&&(h="i"+(u++).toString(36),c.set(p,h),d.push(`[data-sdi="${h}"]{${p}}`)),` data-sdi="${h}"`},g="";for(let y of o)g+=y.intern?y.text.replace(s,m):y.text;return t.slice(0,n)+d.join("")+g}function iy(t){if(/@import\b/i.test(t))return null;let e=[],n=o=>{for(let r of o){if(r.type===CSSRule.IMPORT_RULE||r.type===CSSRule.NAMESPACE_RULE)throw new Error("External or namespaced CSS");if(r.selectorText){if(/\[\s*style\b|data-sdi|\[[^\]]*\\|&/i.test(r.selectorText))throw new Error("Attribute-dependent or nested CSS");e.push(r.selectorText)}r.cssRules&&n(r.cssRules)}};try{let o=new CSSStyleSheet;o.replaceSync(t),n(o.cssRules)}catch{return null}return e}var zr=new Map;function sy(t,e,n){let o=new Set;if(!e&&!n)return o;if(!t||t.querySelector("[data-sdi]"))return null;let r=l=>{let f=l.getAttribute("style");f&&o.add(f)};if(n&&t.querySelectorAll("[data-snapdom-asset][style]").forEach(r),e)try{let l=[],f=new Map;for(let d of[...t.querySelectorAll("style")].slice(1)){let m=d.textContent||"";f.has(m)||f.set(m,zr.has(m)?zr.get(m):iy(m));let g=f.get(m);if(!g)return zr=f,null;for(let y of g)l.push(y)}zr=f;let c=[];for(let d of l)/:scope\b/i.test(d)?t.querySelectorAll(d).forEach(r):c.push(d);let u=c.join(",");if(u)for(let d of t.querySelectorAll("[style]")){let m=d.getAttribute("style");m&&!o.has(m)&&d.matches(u)&&o.add(m)}}catch{return null}let i=new Set,s=document.createElement("div"),a=new XMLSerializer;for(let l of o){s.setAttribute("style",l);let f=a.serializeToString(s).match(/ style="([^"]*)"/);f&&i.add(f[1])}return i}async function Ur(t,e){let{clipWindow:n,outerTransforms:o,outerShadows:r,rootTransform2D:i,fontsCSS:s,universe:a,session:l,signatures:f}=e,c=t.options;if(t!==c){let{options:tt,...ot}=t;t=Object.assign(c,ot),Object.defineProperty(t,"options",{value:t,configurable:!0})}let u,d;mr(t,s,a),await de("beforeRender",t);let m=W(t.element),g=t.element.getBoundingClientRect(),y=l?.rootBox,p=Math.max(1,H(y?.[0]||t.element.offsetWidth||parseFloat(m.width)||g.width||1)),h=Math.max(1,H(y?.[1]||t.element.offsetHeight||parseFloat(m.height)||g.height||1)),b=t.element.ownerDocument||document,w=!n&&(t.element===b.body||t.element===b.documentElement)&&!t.__pinned,k=null,v=null,M=0;if(w){let tt=Math.max(t.element.scrollHeight||0,b.documentElement?.scrollHeight||0,b.body?.scrollHeight||0),ot=Math.max(t.element.scrollWidth||0,b.documentElement?.scrollWidth||0,b.body?.scrollWidth||0),ft=Math.max(p,H(ot)),dt=t.element===b.body,Bt=dt&&W(b.documentElement).direction==="rtl",vt=nt=>{nt>0&&(Bt?M=Math.max(M,H(nt-g.width)):p=Math.max(p,H(nt)))};if(dt&&b.documentElement){let nt=b.documentElement.getBoundingClientRect(),Mt=t.element.currentCSSZoom||1,ut={top:Math.max(0,g.top-nt.top)/Mt,right:Math.max(0,nt.right-g.right)/Mt,bottom:Math.max(0,nt.bottom-g.bottom)/Mt,left:Math.max(0,g.left-nt.left)/Mt};if(k=ut,r!=="subtree"&&(ut.top||ut.right||ut.bottom||ut.left)){let zn=new Map,To=new Map;for(let[me,Xt]of t.nodeMap){let Yt=f?.get(me);if(Yt){let si=zn.get(Yt);if(si===void 0&&zn.set(Yt,si=oy.test(Yt)),!si)continue}To.set(me,Xt)}let ee=fs(t.element,To,t.styleCache,g.width>0?p/g.width:1,g.height>0?h/g.height:1);v={top:Math.min(ee.top,ut.top),right:Math.min(ee.right,ut.right),bottom:Math.min(ee.bottom,ut.bottom),left:Math.min(ee.left,ut.left)}}tt=Math.max(t.element.scrollHeight||0,Tn(tt,nt.height,g.top-nt.top,g.bottom-nt.top)),ot=Math.max(t.element.scrollWidth||0,Bt?Tn(ot,nt.width,nt.right-g.right,nt.right-g.left):Tn(ot,nt.width,g.left-nt.left,g.right-nt.left))}tt>0&&(h=Math.max(h,H(tt))),vt(ot);try{let nt=(t.scrollbarCSS||"").length+(t.baseCSS||"").length+(t.fontsCSS||"").length+(t.classCSS||"").length,Mt=G.measureHints.get(t.element);if(Mt&&Mt.cssLen===nt&&Mt.w0===ft&&Mt.docH===tt&&Mt.docW===ot)Mt.csh>0&&(h=Math.max(h,H(Mt.csh))),vt(Mt.csw);else{let ut=b.createElement("div");rt(ut),ut.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+ft+"px!important;overflow:visible!important;visibility:hidden!important;";let zn=ut.attachShadow({mode:"open"});yo(zn,(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS);let To=zn.appendChild(gs(t.clone));b.body.appendChild(ut);let ee=ut.scrollHeight,me=ut.scrollWidth;if(dt){let Xt=ut.getBoundingClientRect(),Yt=To.getBoundingClientRect();ee=Tn(ee,Xt.height,Yt.top-Xt.top,Yt.bottom-Xt.top),me=Bt?Tn(me,Xt.width,Xt.right-Yt.right,Xt.right-Yt.left):Tn(me,Xt.width,Yt.left-Xt.left,Yt.right-Xt.left)}b.body.removeChild(ut),G.measureHints.set(t.element,{cssLen:nt,w0:ft,docH:tt,docW:ot,csh:ee,csw:me}),ee>0&&(h=Math.max(h,H(ee))),vt(me)}}catch{}}if(t.options?.excludeMode==="remove"||typeof t.options?.filter=="function"&&t.options.filterMode==="remove"){let tt=ms(t.element,t.options),ot=1,ft=ms(t.element,{}),dt=Math.max(2,h*.15);Number.isFinite(ft)&&ft>=h-dt&&Number.isFinite(tt)&&tt>0&&(h=Math.max(1,Math.min(h,H(tt+ot))))}if(t.options?.reconcile)try{let tt=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS;Jc(t.element,t.clone,tt,t.nodeMap,p,h)}catch(tt){at(l,"reconcile-failed","reconcile pass failed",tt),U(t.options,"reconcile couldn't run; captured without it.",tt)}let C=(tt,ot=NaN)=>{let ft=typeof tt=="string"?parseFloat(tt):tt;return Number.isFinite(ft)?ft:ot},S=C(t.options.width),A=C(t.options.height),x=n?H(n.width):p,E=n?H(n.height):h,R=x,F=E,N=Number.isFinite(S),P=Number.isFinite(A),_=E>0?x/E:1;N&&P?(R=Math.max(1,H(S)),F=Math.max(1,H(A))):N?(R=Math.max(1,H(S)),F=Math.max(1,H(R/(_||1)))):P&&(F=Math.max(1,H(A)),R=Math.max(1,H(F*(_||1))));let I=0,B=0,D=p,z=h;if(n){let tt=0,ot=0;if(dr(t.element)){let dt=null;if(!o&&i&&Number.isFinite(i.a))dt={a:i.a,b:i.b||0,c:i.c||0,d:i.d||1,e:0,f:0};else{let Bt=Ke(t.element),vt=hs(m.transform&&m.transform!=="none"?m.transform:"",Bt);vt&&vt.is2D&&(dt={a:vt.a,b:vt.b,c:vt.c,d:vt.d,e:0,f:0})}if(dt&&!(dt.a===1&&dt.b===0&&dt.c===0&&dt.d===1)){let{ox:Bt,oy:vt}=po(m,p,h),nt=kn(p,h,dt,Bt,vt);tt=nt.minX,ot=nt.minY}}let ft=Z()?0:(c.dpr||1)*(N||P?R/x:c.scale||1);I=H(ft?Math.round((n.x+tt)*ft)/ft:n.x+tt),B=H(ft?Math.round((n.y+ot)*ft)/ft:n.y+ot),D=H(I+n.width),z=H(B+n.height)}else if(!o&&i&&Number.isFinite(i.a)){let tt={a:i.a,b:i.b||0,c:i.c||0,d:i.d||1,e:0,f:0},ot=kn(p,h,tt,0,0);I=H(ot.minX),B=H(ot.minY),D=H(ot.maxX),z=H(ot.maxY)}else if(o&&dr(t.element)){let ot=m.transform&&m.transform!=="none"?m.transform:"",ft=Ke(t.element),dt=Ae({baseTransform:ot,rotate:ft.rotate||"0deg",scale:ft.scale,translate:ft.translate,width:p,height:h}),{ox:Bt,oy:vt}=po(m,p,h),nt=dt.is2D?dt:new DOMMatrix(dt.toString()),Mt={a:nt.a,b:nt.b,c:nt.c,d:nt.d,e:0,f:0},ut=kn(p,h,Mt,Bt,vt);I=H(ut.minX),B=H(ut.minY),D=H(ut.maxX),z=H(ut.maxY)}let $=is(m),T=ss(m),L=as(m),O=ls(m),K=cs(m),Q=g.width>0?(D-I)/g.width:1,j=g.height>0?(z-B)/g.height:1,q=r==="subtree"&&!n?fs(t.element,t.nodeMap,t.styleCache,Q,j):{top:0,right:0,bottom:0,left:0};v&&(q={top:v.top,right:Math.max(0,v.right-(p-g.width)),bottom:Math.max(0,v.bottom-(h-g.height)),left:v.left}),M>0&&(q={...q,left:Math.max(q.left,M)});let V=n?{top:0,right:0,bottom:0,left:0}:r?{top:H(Math.max($.top,T.top,q.top)+L.top+O.top+K.bleed.top),right:H(Math.max($.right,T.right,q.right)+L.right+O.right+K.bleed.right),bottom:H(Math.max($.bottom,T.bottom,q.bottom)+L.bottom+O.bottom+K.bleed.bottom),left:H(Math.max($.left,T.left,q.left)+L.left+O.left+K.bleed.left)}:{top:H(L.top+q.top),right:H(L.right+q.right),bottom:H(L.bottom+q.bottom),left:H(L.left+q.left)};I=H(I-V.left),B=H(B-V.top),D=H(D+V.right),z=H(z+V.bottom);let gt=Math.max(1,H(D-I)),et=Math.max(1,H(z-B)),pt="http://www.w3.org/2000/svg",Rt=dr(t.element)?2:0,qt=H(Rt+(o?0:1)),tn=c.__subpixel?.x||0,en=c.__subpixel?.y||0,X=Math.ceil(gt+qt*2+tn),J=Math.ceil(et+qt*2+en),Y=H(-(H(I)-qt)),Ft=H(-(H(B)-qt)),te=b.defaultView||window,St=!Z()&&CSS.supports("zoom","2"),Bn=St?ay(te):1,yt=St?(st()&&Number.isInteger(Bn)?1:Bn)*(t.element.currentCSSZoom||1):1;l.layoutZoom=yt;let Te=n&&!Z(),se=Te?H(Y-Math.floor(Y*yt+.01)/yt):0,It=Te?H(Ft-Math.floor(Ft*yt+.01)/yt):0,$e=Math.min(0,Y-se)-(se?1/yt:0),nn=Math.min(0,Ft-It)-(It?1/yt:0),Pe=Y-se-$e+tn,Ne=Ft-It-nn+en,Le=H(X-$e),ni=H(J-nn),Dt=document.createElementNS(pt,"foreignObject");Dt.setAttribute("x",String($e*yt)),Dt.setAttribute("y",String(nn*yt)),Dt.setAttribute("width",String(Le*yt)),Dt.setAttribute("height",String(ni*yt)),Dt.style.overflow="visible";let ua=document.createElement("style"),ed="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";ua.textContent=(t.scrollbarCSS||"")+t.baseCSS+t.fontsCSS+ed+t.classCSS,Dt.appendChild(ua);let on=document.createElement("div");on.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),on.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${c.__subpixel?H(Pe+g.width):Le}px;height:${ni}px`+(Pe!==0||Ne!==0?`;padding:${Ne}px 0 0 ${Pe}px !important`:"")+(yt!==1?`;zoom:${yt} !important`:"")+";direction:ltr !important"+(k?ny(b):""),k&&(Pe!==k.left||Ne!==k.top)&&f&&Gc(t.element,t.nodeMap,f,t.styleCache,Pe-k.left,Ne-k.top),on.appendChild(t.clone),Dt.appendChild(on);let da=new XMLSerializer,oi=Dt;if(!Number.isInteger(yt))try{oi=Gf(Dt,t.clone,t.nodeMap,b,Vf(yt))||Dt}catch(tt){at(l,"line-breaks-failed","line break pass failed",tt)}let nd=da.serializeToString(oi),pa=N||P,od=Object.freeze({w0:x,h0:E,vbW:X,vbH:J,targetW:R,targetH:F,contentX:H(Y+(n?I:0)),contentY:H(Ft+(n?B:0)),clip:n?Object.freeze({x:H(I),y:H(B),width:x,height:E}):null});Object.defineProperty(c,"meta",{value:od,enumerable:!0,writable:!1,configurable:!0});let rd=!pa||Z()?X:N?R:H(X*(F/J)),id=!pa||Z()?J:P?F:H(J*(R/X)),sd=parseFloat(W(b.documentElement)?.fontSize)||16,ri=[se||It?`translate(${se} ${It})`:"",yt!==1?`scale(${1/yt})`:""].join(" ").trim(),Fo=`${ri?``:""}`,ha=ri?"":"";if(d=Fo+ry(nd,oi)+ha,yt!==1){let tt=vt=>{let nt=da.serializeToString(vt.cloneNode(!1));return nt.slice(0,nt.indexOf(">")+1).replace(/\/>$/,">")},ot=Dt.cloneNode(!1);ot.setAttribute("x",String($e)),ot.setAttribute("y",String(nn)),ot.setAttribute("width",String(Le)),ot.setAttribute("height",String(ni));let ft=on.cloneNode(!1);ft.style.removeProperty("zoom");let dt=se||It?`translate(${se} ${It})`:"",Bt=Fo.slice(0,Fo.indexOf(">")+1)+(dt?``:"");l.fileSvg={zoomed:[Fo+tt(Dt),tt(on),ha],flat:[Bt+tt(ot),tt(ft),dt?"":""]}}u=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(d)}`,t.svgString=d,t.dataURL=u,l.artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},await de("afterRender",t),t.clone=t.nodeMap=t.styleCache=t.svgString=null;let ii=[...document.querySelectorAll("#snapdom-sandbox")].find(Vt);return ii&&ii.style.position==="absolute"&&ii.remove(),t.dataURL}function ay(t){let e=t.devicePixelRatio||1;if(e===1)return 1;let n=t.document,o=e;try{let r=n.createElement("div");rt(r),r.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:0!important;height:0!important;visibility:hidden!important;pointer-events:none!important;border:0 solid transparent!important;border-top-width:0.5px!important",(n.body||n.documentElement).appendChild(r);let i=parseFloat(t.getComputedStyle(r).borderTopWidth);r.remove(),i>=1&&(st()||Math.abs(i-1/e)>.01)&&(o=1)}catch{}return o}Ze();ho();function fy(t){let e=Array.isArray(t.plugins)?t.plugins:Ts(),n=[];for(let o of e){let r=Fn(o);r&&typeof r.resolveNode=="function"&&n.push(r.resolveNode.bind(r))}return n.length?n:null}async function Kf(t,e,n=re(e)){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");ai(e.cache),e.__session=n,e.__ownNode=rt,n.resolveNodeHooks=fy(e);let o=e;o.element=t,Object.defineProperty(o,"options",{value:o,configurable:!0});let r,i,s,a,l,f,c,u,d,m,g,y="",p=null,h=e.needs||_t,b=o.format,w=o.type;await de("beforeSnap",o);let k=o.format!==b&&/^(?:png|jpe?g|webp|svg)$/i.test(o.format),v=o.type!==w&&/^(?:png|jpe?g|webp|svg)$/i.test(o.type);if(k||v){let T=String(k?o.format:o.type).toLowerCase();o.format=T==="jpg"?"jpeg":T,o.type=o.format,o.__explicitFormat=o.format,/^(?:jpeg|webp)$/.test(o.format)&&(o.backgroundColor==null||o.backgroundColor==="transparent")&&(o.backgroundColor="#ffffff")}await de("beforeClone",o),ll(t.ownerDocument,t.getElementsByTagName("*").length+1);let M=o.outerTransforms!==!1,C=o.outerShadows==="subtree"?"subtree":!!o.outerShadows,S=o.clip?pr(o.element,o.clip):null,A=[];try{typeof o.element.getAnimations=="function"&&(A=o.element.getAnimations({subtree:!0}))}catch{A=null}let x=new Set(A),E=()=>{il(o.element,x);for(let T of x)Zt(T.effect?.target)};E(),n.animated=Zo(x);let R=e.__styleShare;if(R===void 0)try{R=ml(o.element)&&A?.length===0}catch{R=!1}n.styleShare=R;let F=Ka(e.fast);for(;;){n.slicer=F;let T=Ir(o.element,S);try{({clone:r,classCSS:i,classPrefixCSS:s,shadowCSS:a,styleCache:l,nodeMap:f,reconcileRisk:c,clipWindow:u,standIns:d,universe:m}=await cf(o.element,o.options,n)),c>0&&!e.reconcile&&(at(n,"reconcile-risk","text in inline/table-cell elements kept natural width and may re-wrap; pass { reconcile: true } for pixel-exact layout"),e.debug&&!G.warnedReconcile&&(G.warnedReconcile=!0,U(e,"Some text may wrap differently in the capture. Pass { reconcile: true } to fix it (about 2x slower)."))),!M&&r&&(p=Bc(o.element,r)),!C&&r&&Xc(o.element,r,o.options),r&&(g=go(o.element,r,f,d),Yc(o.element,r))}finally{T()}if(!F?.yielded||!n.tornSinceStart?.())break;F=null,ai(e.cache),n.styleMap=new Map,n.styleCache=new WeakMap,n.nodeMap=new Map,n.warnings=[]}if(n.slicer=null,o.clone=r,o.classCSS=i,o.styleCache=l,o.nodeMap=f,await de("afterClone",o),!En(h,"render"))return E(),null;if(F?.due()&&await F.pause(),hr(o.clone),o.options?.excludeMode==="remove"||typeof o.options?.filter=="function"&&o.options.filterMode==="remove")try{Zc(o.element,o.clone,o.styleCache,o.nodeMap)}catch(T){at(n,"shrink-failed","shrink pass failed",T),U(e,"Couldn't close the gaps left by removed elements.",T)}try{await cr(o.clone,o.element,o.nodeMap)}catch{}try{let T=n.styleMap;fr(T.keys(),T,o.nodeMap,o.options.__iconMatchers)}catch{}let N=T=>Promise.resolve().then(T),P=!a&&o.classCSS===i&&!o.clone?.querySelector("style"),_=(async()=>{await Promise.all([N(()=>kr(o.clone,o.options,n)),N(()=>Ar(o.element,o.clone,o.styleCache,o.options,o.nodeMap,P))]);try{pf(o.element,o.clone,o.nodeMap)}catch(T){at(n,"backdrop-filter-failed","backdrop-filter emulation failed",T),U(e,"Couldn't reproduce a backdrop-filter; captured without it.",T)}if(e.compress){let T={session:n,clip:u,rootTransform:p};await N(()=>vr(o.clone,o.options,o.nodeMap,T))}if(e.captureSelection)try{uc(o.nodeMap)}catch(T){at(n,"selection-compose-failed","field selection compose failed",T)}})(),I=Promise.resolve();(e.embedFonts==="auto"?((o.element.ownerDocument||document).fonts?.size||0)>0:e.embedFonts)&&(I=N(async()=>{let T=o.element.ownerDocument||document,L=S?q=>{try{let V=q.getBoundingClientRect();return V.right>=S.left-200&&V.left<=S.right+200&&V.bottom>=S.top-200&&V.top<=S.bottom+200}catch{return!0}}:null,{required:O,usedCodepoints:K}=!S&&n.fontUsage||Lr(o.element,L),Q=O,j=O;if(e.embedFonts==="auto"){let{declared:q,drawn:V}=Nr(T),gt=et=>Pr(et).toLowerCase();if(Q=new Set(Array.from(O).filter(et=>V.has(gt(et)))),!Q.size)return;j=new Set(Array.from(O).filter(et=>V.has(gt(et))||!q.has(gt(et))))}Z()&&await _r(Q,K,T),y=await xf({required:j,usedCodepoints:K,exclude:o.options.excludeFonts,localFonts:o.options.localFonts,useProxy:o.options.useProxy,fontStylesheetDomains:o.options.fontStylesheetDomains,iconMatchers:o.options.__iconMatchers,doc:T,debug:o.options.debug})})),await Promise.all([_,I]),E();let D=(o.options.plugins||[]).some(T=>T&&(typeof T.beforeRender=="function"||typeof T.afterRender=="function"));if(o.options.engine==="html-in-canvas"&&!D){let{tryCanvasEngine:T}=await Promise.resolve().then(()=>(Yf(),Xf));mr(o,y,m);let L=await T(o,o.options,n);if(L)return L}F?.due()&&await F.pause();let z=o.clone;wr(z,n.compressedAssets);let $=await Ur(o,{clipWindow:u,outerTransforms:M,outerShadows:C,rootTransform2D:p,fontsCSS:y,universe:m,session:n,signatures:n.styleMap});if(n.compressedSnapshot=br(z,n.compressedAssets),n.retain)try{n.retain({clone:r,nodeMap:f,styleCache:l,styleMap:n.styleMap,classPrefixCSS:s,plainBg:P,fontsCSS:y,clipWindow:u,outerTransforms:M,outerShadows:C,rootTransform2D:p,marginZeroed:g,compressedAssets:n.compressedAssets,compressionDensity:n.compressionDensity})}catch{}return $}Kt();$t();At();var uy=new Set(["png","jpeg","jpg","webp","svg"]);function Zf(t={}){let e=typeof t.type=="string"&&uy.has(t.type.toLowerCase())?t.type.toLowerCase():null,n=t.format??e??"png";n==="jpg"&&(n="jpeg");let o=t.format!=null?n:e==="jpg"?"jpeg":e,r=ma(t.cache),i=t.exclude==null?[]:Array.isArray(t.exclude)?t.exclude:[t.exclude],s=[],a=[];for(let u of i)if(typeof u=="string")try{document.createDocumentFragment().querySelector(u),s.push(u)}catch{U(t,`Invalid exclude selector "${u}"; ignored.`)}else typeof u=="function"?a.push(u):u!=null&&U(t,"Ignored an exclude entry: use a CSS selector or a function.",u);let l=t.excludeMode??"hide",f=u=>{if(!u||u.nodeType!==1)return!1;if(u.getAttribute("data-capture")==="exclude")return!0;for(let d of Array.isArray(c.exclude)?c.exclude:[])try{if(u.matches(d))return!0}catch{}for(let d of Array.isArray(c.excludePredicates)?c.excludePredicates:[])try{if(d(u))return!0}catch{}if(typeof c.filter=="function")try{if(!c.filter(u))return!0}catch{}return!1},c={debug:t.debug??!1,scale:t.scale??1,exclude:s,excludePredicates:a.length?a:null,excludeMode:l,filter:t.filter??null,filterMode:t.filterMode??"hide",shouldExclude:f,placeholders:t.placeholders!==!1,captureSelection:t.captureSelection??!1,canvas:ye(t.canvas,"canvas")?t.canvas:null,embedFonts:t.embedFonts??"auto",iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],__iconMatchers:Cc(t.iconFonts,t),localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:t.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(t.fontStylesheetDomains)?t.fontStylesheetDomains:[],fallbackURL:t.fallbackURL??void 0,cache:r,__styleShare:t.__styleShare,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:n,__explicitFormat:o,type:n,quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(n)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,reconcile:t.reconcile??!1,burst:t.burst,fast:t.fast===!1||t.fast==="auto"?t.fast:!0,engine:t.engine,invalidate:t.invalidate??!1,__pinned:t.__pinned===!0,__subpixel:t.__subpixel??null,clip:t.clip??null,compress:t.compress!==!1,excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1};return c}ht();At();Ot();Ot();ce();xt();He();Ze();var Jf="svg,iframe,canvas,video,audio,object,embed,slot,template,picture,style",Qf=/(?:^|;)position:(?:absolute|fixed)(?:;|$)/;function dy(t){try{return t.matches?.("dialog,[popover]")||!!t.querySelector?.("dialog,[popover]")}catch{return!0}}var py=/(?:^|;)\s*(?:-webkit-)?backdrop-filter:\s*(?!none(?:\s*!important)?(?:;|$))[^;]+/i;function hy(t){if(t.usesBackdropFilter!==void 0)return t.usesBackdropFilter;let e=!1;for(let n of t.styleMap.values())if(py.test(n)){e=!0;break}return t.usesBackdropFilter=e,e}function my(t,e){let n=e.has("backdrop-filter")||e.has("-webkit-backdrop-filter");if(!n&&(n=(i=>/(?:^|;)\s*(?:-webkit-)?backdrop-filter\s*:/i.test(i.getAttribute?.("style")||""))(t),!n))try{n=!!t.querySelector?.('[style*="backdrop-filter" i]')}catch{n=!0}if(!n)return!1;let o=[t];t.querySelectorAll&&o.push(...t.querySelectorAll("*"));for(let r of o){let i=getComputedStyle(r),s=i.getPropertyValue("backdrop-filter")||i.getPropertyValue("-webkit-backdrop-filter");if(s&&s!=="none")return!0}return!1}var gy=2*Fi;function yy(t,e){if(t===e)return!0;if(!t.endsWith("px")||!e.endsWith("px")||e.includes(" "))return!1;let n=parseFloat(t),o=parseFloat(e);return Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n-o)<=gy}var Hr=new Map,by=["width","height","min-width","min-height","top","right","bottom","left","margin-top","margin-right","margin-bottom","margin-left","grid-template-columns","grid-template-rows"];function tu(t){let e=Hr.get(t);if(e===void 0){e=null;for(let n of by){let o=t.match(new RegExp("(?:^|;)"+n+":([^;]+)"));o&&o[1].endsWith("px")&&((e||={})[n]=o[1])}Hr.size>5e3&&Hr.clear(),Hr.set(t,e)}return e}function wy(t){if(!(!t.classList||!t.classList.length))for(let e of Array.from(t.classList))/^c\d+$/.test(e)&&t.classList.remove(e)}function xy(t,e){let n=[t];for(;n.length;){let o=n.pop();if(o.nodeType===1){let r=e.nodeMap.get(o);r!==void 0&&(e.nodeMap.delete(o),e.srcToClone.get(r)===o&&e.srcToClone.delete(r)),e.styleMap.delete(o)}for(let r=o.firstChild;r;r=r.nextSibling)n.push(r)}}function eu(t,e){e.style.getPropertyValue(kt)==="nowrap"&&t.style.getPropertyValue(kt)!=="nowrap"&&e.parentElement?.style.getPropertyValue(kt)!=="nowrap"&&e.style.removeProperty(kt)}var Os={attempts:0,served:0,reconciled:0};async function nu(t,e,n,o=null){Os.attempts++;let r=e.retained,i=[];if(r?.clone&&r.nodeMap){r.clone.matches(Cn)&&i.push(t);for(let a of r.clone.querySelectorAll(Cn)){let l=r.nodeMap.get(a);l?.isConnected&&i.push(l)}}let s=i.length?uo(t,null,i):null;try{let a=await Sy(t,e,n,o);return a&&Os.served++,a}catch{return null}finally{s?.()}}async function Sy(t,e,n,o){let r=e.retained;if(!r||!r.clone||!r.styleMap||!r.srcToClone||n.reconcile||n.clip||n.captureSelection||r.clipWindow||t.scrollTop||t.scrollLeft||dy(t)||hy(r)||r.fontsCSS||Wr(n))return null;for(let C of n.plugins||[])if(C&&(typeof C.beforeSnap=="function"||typeof C.beforeClone=="function"||typeof C.resolveNode=="function"||typeof C.afterClone=="function"))return null;if(r.classPrefixCSS&&(r.classPrefixCSS.includes("::marker")||r.classPrefixCSS.includes("::first-line"))||n.excludeMode==="remove")return null;let i=t.ownerDocument||document,s=Ce(t);if(!s||fl(i))return null;let a=[];t:for(let C of e.dirtyRoots){if(!C.isConnected||C===t||!t.contains(C))return null;for(let S of e.dirtyRoots)if(S!==C&&S!==t&&S.contains(C))continue t;a.push(C)}if(!a.length)return null;let l=r.marginZeroed;if(!l)return null;let f=a.filter(C=>!(Qf.test(r.styleMap.get(r.srcToClone.get(C))||"")&&/^(?:absolute|fixed)$/.test(getComputedStyle(C).position)));if(f.length){if(f.some(S=>S.parentElement===t))return null;let C=go(t,null);if(C.length!==l.length||C.some((S,A)=>S!==l[A]))return null}let c=l.indexOf(null),u=re(n,r);u.animated=o;let d=[];for(let C of a){if(C.matches?.(Jf)||C.querySelector?.(Jf)||my(C,s))return null;let S=r.srcToClone.get(C);if(!S||!S.parentNode)return null;let A=new Map,x=co(u,n,A),E=Ir(C,null),R=uo(C),F;try{F=await Me(C,x,n)}finally{R(),E()}if(!F||F.nodeType!==1||F.querySelector?.("style[data-sd]")||(await vn(C,F,x,n),x.pseudoCSS)||x.usesPlaceholder&&!r.classPrefixCSS?.includes("[data-sd-ph]"))return null;if(await Sr(F,n,A,{session:u,rootTransform:r.rootTransform2D}),await or(F,x),l.length>1)for(let[N,P]of A){let _=l.indexOf(P);_!==-1&&(_c&&(N.style.marginBottom="0px"))}hr(F);try{await cr(F,C,A)}catch{}try{fr([F,...F.querySelectorAll("*")],r.styleMap,A,n.__iconMatchers)}catch{}if(await Promise.all([kr(F,n,u),Ar(C,F,r.styleCache,n,A,r.plainBg)]),n.compress)try{await vr(F,n,A,{session:u,rootTransform:r.rootTransform2D})}catch{}for(let[N,P]of A.entries())Cs(N,P,A,r.styleCache);S.replaceWith(F),xy(S,r),d.push(F,...F.querySelectorAll("*"));for(let[N,P]of A.entries())r.nodeMap.set(N,P),r.srcToClone.set(P,N)}let m=co(u,n,u.nodeMap),g=new WeakSet,y=new Set,p=C=>{for(let S=C.parentElement;S&&!y.has(S)&&(y.add(S),S!==t);S=S.parentElement);};a.forEach(p);let h=new Set(a),b=!1;for(let[C,S]of r.nodeMap.entries()){if(!S||S.nodeType!==1||!S.isConnected)continue;let A=r.styleMap.get(C);if(!A)continue;let x=tu(A);if(!x)continue;let E=null,R=!1;for(let F in x){E||=getComputedStyle(S);let N=E.getPropertyValue(F);if(F==="min-width"&&(N==="auto"||N==="0px"&&x[F]!=="0px"&&E.display.startsWith("table")&&!Qf.test(A))&&!g.has(S.parentElement)){let P=parseFloat(E.width);E.boxSizing!=="border-box"&&A.includes("box-sizing:border-box")&&(P+=["padding-left","padding-right","border-left-width","border-right-width"].reduce((_,I)=>_+(parseFloat(E.getPropertyValue(I))||0),0)),N=`${P}px`}if(!yy(N,x[F])){R=!0;break}}if(!R&&!Wl(S,E||getComputedStyle(S))&&(R=!0),!R&&!x.width&&!x["min-width"]&&!Ol(S,E||getComputedStyle(S))&&(R=!0),R){if(u.compressedAssets?.has(C))return null;g.add(S),y.add(S),p(S),h.add(S),Os.reconciled++;let F=S===t?C.style.cssText:null;if(eu(S,C),d.push(C),await Et(S,C,m,n),F!==null&&C.style.cssText!==F)return null;l.includes(S)&&(b=!0)}}for(let C of y){if(!C.isConnected||!getComputedStyle(C).display.includes("flex"))continue;let S=[],A=!1;for(let x=C.firstElementChild;x;x=x.nextElementSibling){let E=r.srcToClone.get(x),R=E&&!h.has(x)&&r.styleMap.get(E);if(!R)continue;S.push(x);let F=!A&&tu(R)?.["min-width"];F&&F!=="0px"&&getComputedStyle(x).minWidth==="auto"&&(A=!0)}if(A!==Ki(C,m))for(let x of S)eu(x,r.srcToClone.get(x)),d.push(r.srcToClone.get(x)),await Et(x,r.srcToClone.get(x),m,n),l.includes(x)&&(b=!0)}b&&go(t,r.clone,r.nodeMap);let w=r.keyToClass,k=r.classCSS,v=!w;for(let C=0;!v&&C`.${S}{${C}}`).join(""));for(let C of v?r.styleMap.keys():d){let S=r.styleMap.get(C);S!==void 0&&(wy(C),vs(C,S,w))}if(Ce(t)!==s)return null;wr(r.clone,u.compressedAssets);let M=await Ur({element:t,options:n,plugins:n.plugins,clone:r.clone,classCSS:k,styleCache:r.styleCache,nodeMap:r.nodeMap},{clipWindow:null,outerTransforms:r.outerTransforms,outerShadows:r.outerShadows,rootTransform2D:r.rootTransform2D,fontsCSS:r.fontsCSS||"",universe:s,session:u,signatures:null});return u.compressedSnapshot=br(r.clone,u.compressedAssets),r.compressedAssets=u.compressedAssets,r.compressionDensity=u.compressionDensity,M?{url:M,session:u}:null}$t();ht();wt();var Ds=new WeakMap,Gr=new WeakMap,hu=new WeakSet,Ws=new WeakMap,vy=64,vo=new Map,mu=["scroll","input","change","focusin","focusout","pointerdown","pointerup","pointercancel","keydown","keyup","beforetoggle","toggle"],Cy=["(prefers-color-scheme: dark)","(prefers-reduced-motion: reduce)","(prefers-contrast: more)","(forced-colors: active)","(inverted-colors: inverted)","(prefers-reduced-transparency: reduce)","(hover: hover)","(any-hover: hover)","(pointer: coarse)","(any-pointer: coarse)","(color-gamut: p3)","(dynamic-range: high)"];function ky(t){let e=t?.defaultView;return typeof e?.matchMedia!="function"?"":Cy.map(n=>{try{return e.matchMedia(n).matches?"1":"0"}catch{return"?"}}).join("")}function ou(t){let e=[];for(let n=t;n;){try{let o=n.getBoundingClientRect();e.push(o.x,o.y,o.width,o.height)}catch{e.push("?")}n.parentElement?n=n.parentElement:n=Ht(n)||null}return e.join("|")}function ru(t,e){if(e.disposed||(vo.delete(t),vo.set(t,e),vo.size<=vy))return;let[n,o]=vo.entries().next().value;gu(n,o)}function gu(t,e){e.disposed=!0,vo.delete(t),Ds.delete(t);for(let n of e.observers)try{n.disconnect()}catch{}for(let n of mu)t.removeEventListener(n,e.onMediaDirty,!0);for(let n of e.trackedShadowRoots.keys())for(let o of Bs)n.removeEventListener(o,e.onMediaDirty,!0);for(let[n,o]of e.trackedImages)n.removeEventListener("load",o),n.removeEventListener("error",o);e.trackedImages.clear(),e.trackedShadowRoots.clear(),e.images.length=0,e.controls.length=0,e.scrollNodes.length=0,e.observers.length=0,e.last=null,e.retained=null,e.retainedFrameDriven=!1}function yu(t){if(hu.has(t))return!1;Gr.delete(t);let e=[t],n=[],o=[];for(let r=0;r=0&&e.observers.splice(s,1)}for(let r of o)if(!e.trackedShadowRoots.has(r))try{let i=new MutationObserver(e.markDirty);i.observe(r,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),i.__flush=e.markDirty,e.observers.push(i),e.trackedShadowRoots.set(r,i);for(let s of Bs)r.addEventListener(s,e.onMediaDirty,{capture:!0,passive:!0});e.retained&&e.dirtyAll()}catch{}return!!n}var Bs=["scroll","change","beforetoggle","toggle"];function qr(t,e){return[t,...e.trackedShadowRoots.keys()]}function zs(t,e){let n=e.scannedImages;if(e.scannedImages=null,!n){n=[],t.tagName==="IMG"&&n.push(t);for(let o of qr(t,e))o.querySelectorAll&&n.push(...o.querySelectorAll("img"))}if(e.images=n,e.trackedImages.size){let o=new Set(n);for(let[r,i]of e.trackedImages)o.has(r)||(r.removeEventListener("load",i),r.removeEventListener("error",i),e.trackedImages.delete(r))}for(let o of n){if(o.complete||e.trackedImages.has(o))continue;let r=()=>{e.capturing&&(e.torn=!0),e.dirty=!0,e.dirtyRoots=null,o.removeEventListener("load",r),o.removeEventListener("error",r),e.trackedImages.delete(o)};e.trackedImages.set(o,r),o.addEventListener("load",r),o.addEventListener("error",r)}}function iu(t){let e=new Map,n=new Map,o=new Map;for(let r of t)if(dn(r))if(r.type==="attributes"){let i=e.get(r.target);i||e.set(r.target,i=new Map),i.has(r.attributeName)||i.set(r.attributeName,r.oldValue)}else if(r.type==="characterData")n.has(r.target)||n.set(r.target,r.oldValue);else if(r.type==="childList"){let i=o.get(r.target);i||o.set(r.target,i=new Map);for(let s of r.addedNodes){if(s.nodeType!==3)return!0;i.set(s.data,(i.get(s.data)||0)+1)}for(let s of r.removedNodes){if(s.nodeType!==3)return!0;i.set(s.data,(i.get(s.data)||0)-1)}}else return!0;for(let[r,i]of e)for(let[s,a]of i)if(r.getAttribute(s)!==a)return!0;for(let[r,i]of n)if(r.data!==i)return!0;for(let r of o.values())for(let i of r.values())if(i!==0)return!0;return!1}var My=/(?:^data:image\/(?:gif|apng)|\.(?:gif|apng)(?=[?#)'"\s;]|$))/i,Pn=t=>t&&(typeof t=="object"||typeof t=="function")?jr(t):"-";function Ay(t,e=131072){if(t=String(t||"").trim(),!/^data:/i.test(t))return"";let n=t.indexOf(",");if(n<0)return"";let o=t.slice(0,n),r=t.slice(n+1);try{if(/;base64/i.test(o)){let i=Math.ceil(e/3)*4;return atob(r.slice(0,i-i%4))}return r.slice(0,e*3).replace(/%([0-9a-f]{2})/gi,(i,s)=>String.fromCharCode(parseInt(s,16))).slice(0,e)}catch{return""}}function Ey(t){let e=(t.match(/^data:([^;,]+)/i)?.[1]||"").toLowerCase();if(e==="image/gif"||e==="image/apng")return!0;if(!/image\/(?:png|webp|avif|svg\+xml)/.test(e))return!1;let n=Ay(t);return e==="image/png"?n.includes("acTL"):e==="image/webp"?n.includes("ANIM")||n.includes("ANMF")||n.includes("VP8X")&&!!(n.charCodeAt(n.indexOf("VP8X")+8)&2):e==="image/avif"?n.includes("avis"):/<(?:animate|animateTransform|animateMotion|set)\b|@keyframes\b|animation(?:-name)?\s*:/i.test(n)}function su(t){let e=String(t||"").trim();if(!e)return!1;let n=/^data:[^,]*;base64,/i.exec(e);return My.test(n?n[0]:e)?!0:/^data:/i.test(e)?Ey(e):!1}function Nn(t){if(!t)return!1;let e=String(t);if(su(e))return!0;if(/^\s*data:[^,]*;base64,/i.test(e)||!/url\(/i.test(e))return!1;for(let n of e.matchAll(/url\(\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^)]*))\s*\)/gi))if(su(n[1]??n[2]??n[3]))return!0;return!1}function au(t,e=null){let n=t&&t.clone;if(!n)return!1;let o=e?e.map(s=>t.srcToClone?.get(s)).filter(Boolean):[n],r=new Set,i=s=>{if(Nn(s.getAttribute?.("src"))||Nn(s.getAttribute?.("href"))||Nn(s.getAttribute?.("style")))return!0;let a=t.styleMap?.get(s);return!a||r.has(a)?!1:(r.add(a),Nn(a))};for(let s of o){if(s.nodeType===1&&i(s))return!0;let a;try{a=s.querySelectorAll("*")}catch{continue}for(let l of a)if(i(l))return!0}return!1}function Us(t,e){let n=[],o=new Set,r=i=>{i&&!o.has(i)&&(o.add(i),n.push(i))};t.matches?.("input,textarea,select,option")&&r(t);for(let i of qr(t,e))try{for(let s of i.querySelectorAll("input,textarea,select,option"))r(s)}catch{}e.controls=n}var Ry=/^(?:INPUT|TEXTAREA|SELECT)$/,Vr=/^(?:visible|clip)$/,Fy=/(?:^|;)overflow(?:-[xy])?:(?!visible|clip)/;function Hs(t,e){let n=[],o=e.retained,r=qr(t,e),i=r.length===1?hl(t):null,s=!o&&!i&&!st()&&!Z(),a=(l,f=!1)=>{try{if(f){n.push(l);return}let c=Ry.test(l.tagName);if(o&&!c){let u=o.styleMap.get(o.srcToClone.get(l));if(u!==void 0&&!Fy.test(u))return}if(s&&!bi.has(l.localName)){let u=getComputedStyle(l);if(Vr.test(u.overflowX)&&Vr.test(u.overflowY))return}if(l.scrollLeft||l.scrollTop){n.push(l);return}if((l.scrollWidth>l.clientWidth||l.scrollHeight>l.clientHeight)&&(l.clientWidth||l.clientHeight||getComputedStyle(l).display!=="inline")){let u=c?null:getComputedStyle(l);(!u||!Vr.test(u.overflowX)||!Vr.test(u.overflowY))&&n.push(l)}}catch{}};for(let l=t;l;l=l.parentElement)a(l,!0);for(let l of r)try{for(let f of l.querySelectorAll(i||"*"))a(f)}catch{}e.scrollNodes=n}function lu(t,e){let n=t.ownerDocument||document,o=n.defaultView,r=[o?.location?.hash||"",ky(n),o?.innerWidth||0,o?.innerHeight||0,o?.devicePixelRatio||1,o?.screen?.orientation?.type||""];try{r.push(...[...n.adoptedStyleSheets||[]].map(Pn))}catch{}for(let c of e.trackedShadowRoots.keys())try{r.push("#shadow",...[...c.adoptedStyleSheets||[]].map(Pn))}catch{}let i=n.activeElement,s=n.fullscreenElement;(i?.contains(t)||t.contains(i))&&r.push(Pn(i)),(s?.contains(t)||t.contains(s))&&r.push(Pn(s));let a=[o?.scrollX||0,o?.scrollY||0];for(let c of e.scrollNodes)a.push(c.scrollLeft||0,c.scrollTop||0);let l=[];for(let c of e.controls)Vs(c,l);let f=[];for(let c of e.images){let u="";try{u=c.currentSrc||c.src||""}catch{}f.push(u,c.complete?1:0,c.naturalWidth||0,c.naturalHeight||0)}return{style:r.join("|"),scroll:a.join("|"),controls:l,images:f,frameDriven:e.retainedFrameDriven}}function Vs(t,e){let n=String(t.localName||"").toLowerCase();n==="input"?e.push(t.type,Hn(t)?t.value.length:t.value,t.checked?1:0,t.indeterminate?1:0):n==="textarea"?e.push(t.value):n==="select"?e.push(t.selectedIndex,t.value):e.push(t.selected?1:0)}var cu=new WeakMap;function wu(t){let e=[];t.matches?.("input,textarea,select,option")&&Vs(t,e);for(let o of t.querySelectorAll?.("input,textarea,select,option")||[])Vs(o,e);let n=cu.get(t);cu.set(t,e),e.length&&(!n||n.length!==e.length||n.some((o,r)=>o!==e[r]))&&Zt(t)}function $n(t,e,n){if(!t)return!1;let o=t[n],r=e[n];if(o===r)return!0;if(!Array.isArray(o)||o.length!==r.length)return!1;for(let i=0;i[Pn(e),e.playState,Math.round((Number(e.currentTime)||0)*10),e.playbackRate].join(":")).join("|")}function Ty(t,e,n){if(!n||n.nodeType!==1)return null;if(n===t||t.contains(n))return t;for(let o of e.trackedShadowRoots.keys())if(o.contains(n))return o;return null}function $y(t){let e={dirty:!0,pending:[],torn:!1,dirtyRoots:new Set,retained:null,retainedFrameDriven:!1,disposed:!1,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedShadowRoots:new Map,trackedImages:new Map,images:[],scannedImages:null,scrollNodes:[],controls:[],envEpoch:pn(),styleEpoch:Ge(),styleStamp:to(t),outsideMutations:Qn(t),geometry:null,renderState:null},n=()=>{e.dirty=!0,e.dirtyRoots=null},o=a=>{if(!e.dirtyRoots)return;let l=a&&(a.nodeType===1?a:a.parentElement);if(!l||l===t||!t.contains(l)||e.dirtyRoots.size>=12){e.dirtyRoots=null;return}e.dirtyRoots.add(l)},r=a=>{if(e.capturing){for(let l of a)e.pending.push(l);return}for(let l of a)dn(l)&&(e.dirty=!0,o(l.target))},i=()=>{if(e.capturing){e.torn=!0;return}n()};e.dirtyAll=n;try{let a=new MutationObserver(r);a.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),a.__flush=r,e.observers.push(a)}catch{}e.markDirty=r,e.onMediaDirty=i;try{for(let a of mu)t.addEventListener(a,i,{capture:!0,passive:!0})}catch{}return bu(t,e)||Us(t,e),Hs(t,e),zs(t,e),e}var Py=0,du=new WeakMap;function jr(t){let e=du.get(t);return e||(e="@"+ ++Py,du.set(t,e)),e}function js(t,e){let n=typeof t;if(n==="undefined")return null;if(t===null||n==="boolean"||n==="number"||n==="string")return JSON.stringify(t);if(n==="function"||n==="symbol")return n==="symbol"?null:JSON.stringify(jr(t));if(n!=="object")return null;if(typeof t.nodeType=="number")return JSON.stringify(jr(t));if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let i=[];for(let s of t){let a=js(s,e);if(a===null)return null;i.push(a)}return"["+i.join(",")+"]"}let o=Object.getPrototypeOf(t);if(o!==Object.prototype&&o!==null)return JSON.stringify(jr(t));let r=[];for(let i of Object.keys(t).sort()){let s=t[i];if(s===void 0)continue;let a=js(s,e);if(a===null)return null;r.push(JSON.stringify(i)+":"+a)}return"{"+r.join(",")+"}"}finally{e.delete(t)}}function pu(t,e){let{burst:n,invalidate:o,...r}=t||{};try{let i=js(r,new Set);return i===null?null:`${(e||[]).map(Pn).join(",")}:${i}`}catch{return null}}function xu(t,e,n,o,r=null){let i=Ds.get(t);i||(i=$y(t),i.baselineSignature=pu(e,n.plugins),Ds.set(t,i));let s=pu(e,n.plugins),a=async()=>{if(await Uo(),i.disposed)return o();let f=s===null||s!==i.baselineSignature;f&&s!==null?i.pendingSig===s?(i.baselineSignature=s,i.last=null,i.dirty=!0,i.dirtyRoots=null,i.pendingSig=null,f=!1):i.pendingSig=s:i.pendingSig=null,bu(t,i),Gr.delete(t),zs(t,i);for(let A of i.observers)A.__flush(A.takeRecords());ne();let c=Qn(t);i.dirty&&i.outsideMutations!==c&&i.dirtyAll(),i.outsideMutations=c;let u=t.getRootNode?.(),d=[...i.trackedShadowRoots.keys()];u?.nodeType===11&&!d.includes(u)&&d.push(u),qo(t.ownerDocument||document,d);let m=to(t);i.styleStamp!==m&&(i.styleStamp=m,i.dirty||i.dirtyAll());let g=lu(t,i),y=fu(t,i);g.animation=uu(y),i.renderState&&(!$n(i.renderState,g,"style")&&(hn(),i.dirtyAll()),$n(i.renderState,g,"scroll")||i.dirtyAll(),$n(i.renderState,g,"controls")||(Zt(t),i.dirtyAll()),!$n(i.renderState,g,"images")&&!i.dirty&&i.dirtyAll());let p=pn();i.envEpoch!==p&&(i.dirtyAll(),i.envEpoch=p);let h=Ge();if(i.styleEpoch!==h&&(i.styleEpoch=h,!i.dirty)){let A=ou(t);i.geometry!==null&&A!==i.geometry&&(Zt(t),i.dirtyAll()),i.geometry=A}n.invalidate&&i.dirtyAll();let b=!1,w=null,k=!!i.renderState&&!$n(i.renderState,g,"animation");try{let A=new Set;k&&y.length===0&&(A=null);for(let x of y){let E=x.playState==="running";if(!E&&!k)continue;E&&(b=!0),k=!0;let R=x.effect?.target;if(Ty(t,i,R)===t)A.add(R);else{A=null;break}}if(k&&A&&A.size&&i.retained){i.dirty=!0,w=A;for(let x of A)i.dirtyRoots&&i.dirtyRoots.add(x),Zt(x)}else k&&!A&&i.dirtyAll()}catch{}let v=g.frameDriven,M=b||v;if(M&&(i.last=null),v&&i.dirtyAll(),!f&&!M&&!i.dirty&&i.last)return ru(t,i),i.last;i.capturing=!0;let C=null,S=null;try{let A=null,x=!1,E=null;if(!f&&i.dirty&&i.retained&&i.dirtyRoots&&i.dirtyRoots.size&&r){E=[...i.dirtyRoots];let R=await nu(t,i,n,Zo(y));R&&(A=await r(R.url,R.session),x=!0)}if(A||(S=re(n),f||(S.retain=R=>{let F=new Map;for(let[N,P]of R.nodeMap.entries())F.set(P,N);C={...R,srcToClone:F,usesBackdropFilter:void 0}}),S.tornSinceStart=()=>{for(let R of i.observers)for(let F of R.takeRecords())i.pending.push(F);return ne(),i.torn||iu(i.pending)||Qn(t)!==c},A=await o(S)),!f&&!i.disposed){if(i.dirty=!1,i.dirtyRoots=new Set,C)i.retained=C,i.retainedFrameDriven=au(C),Us(t,i),Hs(t,i);else if(x){i.retainedFrameDriven||=au(i.retained,E),Us(t,i),Hs(t,i);for(let P of w||[])Zt(P)}let R=lu(t,i);R.animation=uu(fu(t,i));let F=["style","scroll","controls","images"];b||F.push("animation");let N=F.every(P=>$n(g,R,P));i.renderState=R,i.styleEpoch=Ge(),i.styleStamp=to(t),i.geometry=ou(t),i.renderState.frameDriven?(hu.add(t),gu(t,i)):N?!M&&!i.renderState.frameDriven&&(i.last=A,ru(t,i)):(i.dirtyAll(),i.last=null)}return A}finally{S&&(S.retain=null,S.tornSinceStart=null);for(let x of i.observers)for(let E of x.takeRecords())i.pending.push(E);ne();let A=Qn(t);(i.torn||iu(i.pending)||A!==c)&&(i.dirtyAll(),i.last=null),i.outsideMutations=A,i.styleEpoch=Ge(),i.styleStamp=to(t),i.pending.length=0,i.torn=!1,i.capturing=!1,i.disposed||zs(t,i)}},l=i.inflight.then(a,a);return i.inflight=l.catch(()=>{}),l}var Xr=null;function Cu(t){Xr=t}var Ny='button, a[href], [role="button"], input, select, summary, label, [tabindex]',Gs=!1,Co=null,qs=new WeakMap,Su=!1;function ku(t,e){!Gs||!Co||e&&e.burst===!1||qs.set(Co.control,{element:t,options:e&&typeof e=="object"?{...e}:e})}function Mu(t){let e={control:t};Co=e,setTimeout(()=>{Co===e&&(Co=null)},0)}function Ys(t){let e=t.target,n=e&&(e.nodeType===1?e:e.parentElement);return n&&n.closest?n.closest(Ny):null}function vu(t){if(t.type==="keydown"&&t.key!=="Enter"&&t.key!==" ")return;let e=Ys(t);e&&(Mu(e),Xs(t,!1))}function Ly(t){let e=Ys(t);e&&Mu(e)}function Xs(t,e=!0){if(!Xr||document.visibilityState==="hidden")return;let n=Ys(t);if(!n||t.type==="pointerenter"&&t.target!==n)return;let o=qs.get(n);if(o){if(!o.element.isConnected){qs.delete(n);return}Xr(o.element,o.options).catch(()=>{});return}e&&!Su&&(Su=!0,Xr(document.body,{clip:"viewport",burst:!1}).catch(()=>{}))}function Au(){if(Gs||typeof document>"u"||typeof document.addEventListener!="function")return;Gs=!0;let t={capture:!0,passive:!0};document.addEventListener("pointerdown",vu,t),document.addEventListener("keydown",vu,t),document.addEventListener("click",Ly,t),document.addEventListener("pointerenter",Xs,t),document.addEventListener("focusin",Xs,t)}wt();$t();function rb(...t){return Fs(...t),lt}async function ib(t,e){if(typeof t!="string"||!t.trim())throw new Error("[SnapDOM] fromString() needs an HTML string.");let n=document.createElement("div");rt(n),n.style.cssText="position:fixed;left:-99999px;top:0;pointer-events:none;",n.innerHTML=t,document.body.appendChild(n);try{await Pt();let o=Array.from(n.childNodes).some(i=>i.nodeType===3&&i.textContent.trim()),r=n.children.length===1&&!o?n.firstElementChild:n;return await fa(r,{...e||{},burst:!1})}finally{n.remove()}}var sb="3.8.3",lt=Object.assign(fa,{plugins:rb,fromString:ib,version:sb,preCapture:Au});Cu(fa);var ca=Symbol("snapdom.internal"),Ju=new Set(["png","jpeg","jpg","webp","svg"]);async function fa(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");let n=Zf(e);n.element=t,n.invalidate&&hn(),Tf(n,e&&e.plugins);let{stage:o,loweredBy:r}=Af(n);n.needs=o,n.__needsLoweredBy=r;let i=En(o,"render"),s=n.burst===!0||!Wr(n),a=typeof n.filter=="function"||!!n.excludePredicates||typeof n.excludeStyleProps=="function"||typeof n.fallbackURL=="function",f=i&&!n.captureSelection&&n.burst!==!1&&s&&!a&&yu(t);return f&&ku(t,e),n.snap||(n.snap={toPng:(c,u)=>lt.toPng(c,u),toSvg:(c,u)=>lt.toSvg(c,u)}),f?xu(t,e,n,c=>lt.capture(t,n,ca,c),(c,u)=>td(c,n,u)):(await Uo(),wu(t),lt.capture(t,n,ca))}lt.capture=async(t,e,n,o=re(e))=>{if(n!==ca)throw new Error("[SnapDOM] snapdom.capture() is internal; use snapdom(el).");if(En(e.needs||_t,"render")&&Z()){if(e.embedFonts)try{let s=t.ownerDocument||document,a=null;if(e.embedFonts==="auto"&&(t.getBoundingClientRect(),a=Nr(s).drawn,a.size===0))throw null;let l=Lr(t);e.clip||(o.fontUsage=l);let f=l.required;if(a&&(f=new Set([...f].filter(c=>a.has(Pr(c).toLowerCase()))),f.size===0))throw null;await _r(f,l.usedCodepoints,s)}catch{}let i=Array.from(t.querySelectorAll("canvas"));t.tagName==="CANVAS"&&i.unshift(t);for(let s of i)try{if(lo(s))continue;let a=s.getContext("2d",{willReadFrequently:!0});a&&a.getImageData(0,0,1,1)}catch(a){U(e,"Couldn't prepare canvases for Safari.",a)}}let r=await Kf(t,e,o);return td(r,e,o)};var Qu=Symbol("editSvg");async function td(t,e,n){let o=e.needs||_t,r=En(o,"render"),i=$=>Rf(o,e.__needsLoweredBy||[],$),s=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,a=s?null:t,l=()=>a??=s.toDataURL(),f=s||t;s&&(t="");let c=n.compressedSnapshot,u=n.compressionDensity;n.compressedAssets=null;let d,m=e.meta||{},y=(Number.isFinite(e.width)||Number.isFinite(e.height))&&!Z(),p=y?Number.isFinite(e.width)?m.targetW/m.vbW:m.targetH/m.vbH:1,h=y?Number.isFinite(e.height)?m.targetH/m.vbH:m.targetW/m.vbW:1,b=async $=>{let T=await w($),L=$[Qu];if(typeof L!="function"||typeof T!="string")return T;let{isSvgDataURL:O,decodeSvgFromDataURL:K,encodeSvgToDataURL:Q}=await Promise.resolve().then(()=>(Ao(),Eu));if(!O(T))return T;let j=await L(K(T));return typeof j=="string"&&j?Q(j):T},w=async $=>{if(s||!c?.size)return f;let T=m.vbW,L=m.vbH,O=$.crop;O&&(T=Math.max(1,Math.min(T,O.x+O.width)-Math.max(0,O.x)),L=Math.max(1,Math.min(L,O.y+O.height)-Math.max(0,O.y)));let K=Number.isFinite($.width),Q=Number.isFinite($.height);return(K&&Q?Math.max($.width/T,$.height/L):K?$.width/T*(O?Math.max(1,h/p):1):Q?$.height/L*(O?Math.max(1,p/h):1):($.scale||1)*Math.max(p,h))*($.dpr||1)<=u?f:d??=rf(l(),c)},k={warnings:n.warnings,layoutZoom:n.layoutZoom,fileSvg:n.fileSvg},v=n.artifacts,M=async($,T)=>{let{rasterize:L}=await Promise.resolve().then(()=>(Wn(),Ro));return L(f,{...$,...T||{},format:"png"},k)},C=()=>{if(!r)throw i("svgString");if(s)throw new Error("[SnapDOM] html-in-canvas makes a raster capture; there is no SVG string.");let $=t.indexOf(",");return $>=0?$o(decodeURIComponent(t.slice($+1)),k.fileSvg):""},S=$=>Object.defineProperty({...$||{},svgString:C},"url",r?{get:l,enumerable:!0}:{get(){throw i("export.url")},enumerable:!1,configurable:!0}),A={img:async($,T)=>{if(s)return M($,T);let{toImg:L}=await Promise.resolve().then(()=>(ia(),ra)),O={...$,...T||{}};return L(await b(O),O,k)},svg:async($,T)=>{if(s)return M($,T);let{toSvg:L}=await Promise.resolve().then(()=>(ia(),ra)),O={...$,...T||{}};return L(await b(O),O,k)},canvas:async($,T)=>{let{toCanvas:L}=await Promise.resolve().then(()=>(On(),_u)),O={...$,...T||{}};return L(await b(O),O,k)},blob:async($,T)=>{let{toBlob:L}=await Promise.resolve().then(()=>(la(),Xu)),O={...$,...T||{}};return L(await b(O),O,k)},png:async($,T)=>{let{rasterize:L}=await Promise.resolve().then(()=>(Wn(),Ro)),O={...$,...T||{},format:"png"};return L(await b(O),O,k)},jpeg:async($,T)=>{let{rasterize:L}=await Promise.resolve().then(()=>(Wn(),Ro)),O={...$,...T||{},format:"jpeg"};return L(await b(O),O,k)},webp:async($,T)=>{let{rasterize:L}=await Promise.resolve().then(()=>(Wn(),Ro)),O={...$,...T||{},format:"webp"};return L(await b(O),O,k)},download:async($,T)=>{let{download:L}=await Promise.resolve().then(()=>(Zu(),Ku)),O={...$,...T||{}};return L(await b(O),O,k)}};if(!r)for(let $ of Object.keys(A)){let T=$==="download"?"download()":`to${$.charAt(0).toUpperCase()}${$.slice(1)}()`;A[$]=async()=>{throw i(T)}}let x={};for(let $ of["img","svg","canvas","blob","png","jpeg","webp"])x[$]=async T=>{let L=_($,T||{});return delete L.editSvg,typeof T?.editSvg=="function"&&(L[Qu]=T.editSvg),A[$](e,L)};x.jpg=x.jpeg,Object.defineProperty(x,"editSvg",{value:!0});let E=$=>Object.defineProperty({...e,...$},"options",{value:e,configurable:!0}),R=E({artifacts:v,export:S(),exports:x}),F=await Or("defineExports",R),N=Object.assign({},...F.filter($=>$&&typeof $=="object").reverse()),P={...A,...N};P.jpeg&&!P.jpg&&(P.jpg=($,T)=>P.jpeg($,T));function _($,T){let L=T||{},O={...e,...L},K=typeof L.type=="string"?L.type.toLowerCase():"",Q=typeof L.format=="string"?L.format.toLowerCase():Ju.has(K)?K:"";Q&&(O.format=Q==="jpg"?"jpeg":Q),O.__explicitFormat=Q?O.format:e.__explicitFormat??null,$==="blob"&&!O.__explicitFormat&&(O.format=s?"png":"svg"),O.type=O.format;let j=V=>V==="jpeg"||V==="jpg"||V==="webp";return[$,O.format,K].map(V=>typeof V=="string"?V.toLowerCase():"").find(j)&&(O.backgroundColor==null||O.backgroundColor==="transparent")&&(O.backgroundColor="#ffffff"),O.scale!==1&&(Number.isFinite(O.width)||Number.isFinite(O.height))&&U(O,"scale ignored: width/height already set the size."),O}let I=!1,B=Promise.resolve();async function D($,T){let L=Object.freeze(T&&typeof T=="object"?{...T}:{}),O=async()=>{let Q=P[$];if(!Q)throw new Error(`[SnapDOM] Unknown export type: ${$}`);let j=_($,L),q=E({artifacts:v,export:S({type:$,options:j,requestedOptions:L})}),V=j.format,gt=j.type;await Or("beforeExport",q,{format:$,options:j});let et=j.format!==V?j.format:j.type!==gt?j.type:"",pt=typeof et=="string"?et.toLowerCase():"";Ju.has(pt)&&(j.format=pt==="jpg"?"jpeg":pt,j.type=j.format,j.__explicitFormat=j.format,/^(?:jpeg|webp)$/.test(j.format)&&(j.backgroundColor==null||j.backgroundColor==="transparent")&&(j.backgroundColor="#ffffff"));let Rt=await Q(q,j);return await Or("afterExport",q,{format:$,options:j,result:Rt}),I||(I=!0,await de("afterSnap",e)),Rt},K=B.then(O);return B=K.catch(()=>{}),K}let z={url:t,needs:o,warnings:k.warnings||[],toRaw:()=>{if(!r)throw i("toRaw()");return l()},to:($,T)=>D($,T),toImg:$=>D("img",$),toSvg:$=>D("svg",$),toCanvas:$=>D("canvas",$),toBlob:$=>D("blob",$),toPng:$=>D("png",$),toJpg:$=>D("jpg",$),toWebp:$=>D("webp",$),download:$=>D("download",$)};r?s&&Object.defineProperty(z,"url",{get:l,enumerable:!0,configurable:!0}):Object.defineProperty(z,"url",{get(){throw i("url")},enumerable:!1,configurable:!0}),Object.defineProperty(z,"meta",r?{value:e.meta,enumerable:!0}:{get(){throw i("meta")},enumerable:!1,configurable:!0});for(let $ of Object.keys(P)){let T="to"+$.charAt(0).toUpperCase()+$.slice(1);z[T]||(z[T]=L=>D($,L))}return z}lt.toRaw=(t,e)=>lt(t,e).then(n=>n.toRaw());lt.toImg=(t,e)=>lt(t,e).then(n=>n.toImg());lt.toSvg=(t,e)=>lt(t,e).then(n=>n.toSvg());lt.toCanvas=(t,e)=>lt(t,e).then(n=>n.toCanvas());lt.toBlob=(t,e)=>lt(t,e).then(n=>n.toBlob());lt.toPng=(t,e)=>lt(t,{...e,format:"png"}).then(n=>n.toPng());lt.toJpg=(t,e)=>lt(t,{...e,format:"jpeg"}).then(n=>n.toJpg());lt.toWebp=(t,e)=>lt(t,{...e,format:"webp"}).then(n=>n.toWebp());lt.download=(t,e)=>lt(t,e).then(n=>n.download());export{_t as DEFAULT_STAGE,An as STAGES,Ef as assertNeeds,vg as clearPlugins,Ts as getGlobalPlugins,Fn as normalizePlugin,Fs as registerPlugins,lt as snapdom}; +`):c+=d[0]}return c+=a.slice(u),c}let s=kf(t,e||location.href);return s=await i(s,e||location.href,0),s}var Ff=/url\((["']?)([^"')]+)\1\)/g,Is=/@font-face[^{}]*\{[^}]*\}/g;function Gt(t,e,n=""){return(t.match(new RegExp(`${e}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function Mf(t){let e=[];for(let n of(t||"").split(",")){let o=n.trim().match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!o)continue;let r=parseInt(o[1].replace(/\?/g,"0"),16),i=parseInt((o[2]||o[1]).replace(/\?/g,"F"),16);e.push([Math.min(r,i),Math.max(r,i)])}return e}function Af(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[o,r]of e)if(n>=o&&n<=r)return!0;return!1}function Os(t,e){let n=[];if(!t)return n;for(let o of t.matchAll(Ff)){let r=(o[2]||"").trim();!r||r.startsWith("data:")||(/^https?:/i.test(r)||(r=Co(r,e)),n.push(r))}return n}async function Ws(t,e,n){if(G.resource?.has(t))return G.resource.get(t);try{let o=await bt(t,{as:"dataURL",useProxy:e});if(o.ok&&typeof o.data=="string")return G.resource?.set(t,o.data),o.data}catch{U({debug:n},"Couldn't load font file:",t)}return null}async function Ir(t,e,n="",o=!1){let r=t;for(let i of t.matchAll(Ff)){let s=Oe(i[0]);if(!s)continue;let a=s.startsWith("http")||s.startsWith("data:")?s:Co(s,e),l=await Ws(a,n,o);l!=null&&(r=r.replace(i[0],`url(${l})`))}return r}function Cg(t){let e=(a,l)=>t.some(([f,c])=>!(cl)),n=e(0,255)||e(305,305),o=e(256,591)||e(7680,7935),r=e(880,1023),i=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":i?"cyrillic":r?"greek":o?"latin-ext":n?"latin":null}function kg(t={}){let e=new Set((t.families||[]).map(r=>String(r).toLowerCase())),n=new Set((t.domains||[]).map(r=>String(r).toLowerCase())),o=new Set((t.subsets||[]).map(r=>String(r).toLowerCase()));return(r,i)=>{if(e.size&&e.has(r.family.toLowerCase()))return!0;if(n.size)for(let s of r.srcUrls)try{if(n.has(new URL(s).host.toLowerCase()))return!0}catch{}if(o.size){let s=Cg(i);if(s&&o.has(s))return!0}return!1}}function Mg(t){let e=new Set,n=[];for(let r of t.match(Is)||[]){let i=Gt(r,"font-family"),s=Wr(i)[0],a=Gt(r,"font-weight","400"),l=Gt(r,"font-style","normal"),f=Gt(r,"font-stretch","100%"),c=Gt(r,"unicode-range"),u=Gt(r,"src"),d=Os(u,location.href),y=d.length?d.map(g=>String(g).toLowerCase()).sort().join("|"):u.toLowerCase(),m=[String(s||"").toLowerCase(),a,l,f,c.toLowerCase(),y].join("|");e.has(m)||(e.add(m),n.push(r))}let o=0;return t.replace(Is,()=>n[o++]||"")}var Ef=new WeakMap,Ag=0;function Eg(t){let e=Ef.get(t);return e===void 0&&Ef.set(t,e=Ag++),e}function Rg(t,e,n,o,r,i,s,a,l){let f=Array.from(t||[]).sort().join("|"),c=0,u=0;for(let w of s||[]){let b=Math.imul(w,2654435761);b^=b>>>15,b=Math.imul(b,2246822507),b^=b>>>13,c=c+b|0,u++}let d=e?JSON.stringify({families:(e.families||[]).map(w=>String(w).toLowerCase()).sort(),domains:(e.domains||[]).map(w=>String(w).toLowerCase()).sort(),subsets:(e.subsets||[]).map(w=>String(w).toLowerCase()).sort()}):"",y=(n||[]).map(w=>`${(w.family||"").toLowerCase()}::${w.weight||"normal"}::${w.style||"normal"}::${w.stretchPct??100}::${w.src||""}`).sort().join("|"),m=o||"",g=(r||[]).map(w=>String(w).toLowerCase()).sort().join("|"),p=Eg(i||document),h=(a||[]).map(w=>String(w)).sort().join("|");return`fonts-embed-css::req=${f}::ex=${d}::lf=${y}::px=${m}::fd=${g}::doc=${p}::cp=${c}::n=${u}::ic=${h}::env=${l}`}async function Tf({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:o=[],useProxy:r="",fontStylesheetDomains:i=[],iconMatchers:s=[],doc:a=document,debug:l=!1}={}){t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let f=new Map;for(let S of t){let[E,R,F,N]=String(S).split(de);if(!E)continue;let P=E.toLowerCase(),_=f.get(P)||[];_.push({w:parseInt(R,10),s:F,st:parseInt(N,10)}),f.set(P,_)}function c(S,E,R,F){let N=String(S).toLowerCase();if(!f.has(N))return null;let P=f.get(N),_=yg(R),O=bg(E),B=wg(F),D=_.min!==_.max,z=_.min,$=L=>O.kind==="normal"&&L==="normal"||O.kind!=="normal"&&(L==="italic"||L==="oblique"),T=P.filter(L=>(D?L.w>=_.min&&L.w<=_.max:L.w===z)&&$(_s(L.s))&&L.st>=B.min&&L.st<=B.max);if(T.length)return{exact:T,near:[]};if(!D){let L=P.filter(I=>Math.abs(z-I.w)<=300&&$(_s(I.s))&&I.st>=B.min&&I.st<=B.max);if(L.length)return{exact:T,near:L}}return!D&&O.kind==="normal"&&P.some(L=>Math.abs(z-L.w)<=300&&L.st>=B.min&&L.st<=B.max)?{exact:T,near:[]}:null}let u=kg(n);yn(a),oe();let d=Rg(t,n,o,r,i,a,e,s,yn(a));if(G.resource?.has(d))return G.resource.get(d);let y=[];for(let S of a.querySelectorAll("style")){let E=S.textContent||"";for(let R of E.matchAll(Rf)){let F=(R[2]||R[4]||"").trim();if(!F||ds(F,s))continue;a.querySelector(`link[rel="stylesheet"][href="${F}"]`)||y.push(F)}}let m=[];y.length&&await Promise.all(y.map(S=>new Promise(E=>{if(a.querySelector(`link[rel="stylesheet"][href="${S}"]`))return E(null);let R=a.createElement("link");R.rel="stylesheet",R.href=S,it(R),R.setAttribute("data-snapdom","injected-import");let F=setTimeout(()=>E(null),3e3),N=P=>{clearTimeout(F),E(P)};R.onload=()=>N(R),R.onerror=()=>N(null),a.head.appendChild(R),m.push(R)})));let g="",p=new Set,h=[],w=[],b=new Map,x=(S,E)=>E.some(([R,F])=>S>=R&&S<=F),v=(S,E)=>{if(E.length)for(let R of S){let F=b.get(R)||new Set;for(let N of e)x(N,E)&&F.add(N);b.set(R,F)}},C=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(S=>!!S.href);for(let S of m)try{S.remove()}catch{}for(let S of C)try{if(ds(S.href,s))continue;let E="",R=!1;try{R=new URL(S.href,location.href).origin===location.origin}catch{}if(!R){let N=Array.isArray(i)?i:[];if(!Sg(S.href,f.keys(),N))continue}if(R){let N=Array.from(a.styleSheets).find(P=>P.href===S.href);if(N)try{let P=N.cssRules||[];E=Array.from(P).map(_=>_.cssText).join("")}catch{}}if(!E){let N=await bt(S.href,{as:"text",useProxy:r,debug:l});N?.ok&&typeof N.data=="string"&&(E=N.data)}E=await vg(E,S.href,r,l);let F="";for(let N of E.match(Is)||[]){let P=Gt(N,"font-family"),_=Wr(P)[0];if(!_||Jt(_,s))continue;let O=Gt(N,"font-weight","400"),B=Gt(N,"font-style","normal"),D=Gt(N,"font-stretch","100%"),z=Gt(N,"unicode-range"),$=Gt(N,"src"),T=Os($,S.href),L=c(_,B,O,D);if(!L&&!f.has(_.toLowerCase()))continue;let I=Mf(z);if(!Af(e,I))continue;let Z={family:_,weightSpec:O,styleSpec:B,stretchSpec:D,unicodeRange:z,srcRaw:$,srcUrls:T,href:S.href};if(n&&u(Z,I))continue;let Q={family:_.toLowerCase(),block:N,srcRaw:$,baseHref:S.href};if(!L){h.push(Q);continue}if(L.near.length){w.push({...Q,near:L.near,ranges:I});continue}v(L.exact,I),p.add(_.toLowerCase());let j=/url\(/i.test($)?await Ir(N,S.href,r,l):N;F+=j}F.trim()&&(g+=F)}catch{U({debug:l},"Couldn't read stylesheet:",S.href)}let A=new Set;async function M(S,E,R=0){let F=a?.defaultView||window;if(S.disabled||S.media?.mediaText&&!F.matchMedia(S.media.mediaText).matches)return;let N;try{N=S.cssRules||[]}catch{return}for(let P of N){if(P.type===CSSRule.IMPORT_RULE&&P.styleSheet){let _=P.href?Co(P.href,E):E;if(R>=Dr){U({debug:l},`Too many nested @import rules in ${_}; stopped at ${Dr} levels.`);continue}if(_&&A.has(_)){U({debug:l},`Skipped an @import that loops back: ${_}`);continue}_&&A.add(_),await M(P.styleSheet,_,R+1);continue}if(P.cssRules?.length){if(P.type===CSSRule.MEDIA_RULE&&!F.matchMedia(P.conditionText).matches||P.type===CSSRule.SUPPORTS_RULE&&!F.CSS.supports(P.conditionText))continue;await M(P,E,R);continue}if(P.type===CSSRule.FONT_FACE_RULE){let _=(P.style.getPropertyValue("font-family")||"").trim(),O=Wr(_)[0];if(!O||Jt(O,s))continue;let B=(P.style.getPropertyValue("font-weight")||"").trim(),D=(P.style.getPropertyValue("font-style")||"").trim(),z=(P.style.getPropertyValue("font-stretch")||"").trim(),$=(P.style.getPropertyValue("font-variation-settings")||"").trim(),T=(P.style.getPropertyValue("src")||"").trim(),L=(P.style.getPropertyValue("unicode-range")||"").trim(),I=B||"400",Z=D||"normal",Q=z||"100%",j=(D?`font-style:${D};`:"")+(B?`font-weight:${B};`:"")+(z?`font-stretch:${z};`:"")+($?`font-variation-settings:${$};`:"")+(L?`unicode-range:${L};`:"")+mg.map(ht=>{let Rt=P.style.getPropertyValue(ht);return Rt?`${ht}:${Rt};`:""}).join(""),q=c(O,Z,I,Q);if(!q&&!f.has(O.toLowerCase()))continue;let V=Mf(L);if(!Af(e,V))continue;let gt={family:O,weightSpec:I,styleSpec:Z,stretchSpec:Q,unicodeRange:L,srcRaw:T,srcUrls:Os(T,E||location.href),href:E||location.href};if(n&&u(gt,V))continue;let et=`"${String(O).replace(/^\s*["']|["']\s*$/g,"").replace(/(["\\])/g,"\\$1")}"`;if(!q){h.push({family:O.toLowerCase(),block:`@font-face{font-family:${et};src:${T};${j}}`,srcRaw:T,baseHref:E||location.href});continue}if(q.near.length){w.push({family:O.toLowerCase(),block:`@font-face{font-family:${et};src:${T};${j}}`,srcRaw:T,baseHref:E||location.href,near:q.near,ranges:V});continue}if(v(q.exact,V),p.add(O.toLowerCase()),/url\(/i.test(T)){let ht=await Ir(T,E||location.href,r,l);g+=`@font-face{font-family:${et};src:${ht};${j}}`}else g+=`@font-face{font-family:${et};src:${T};${j}}`}}}let k=new Set([...a.styleSheets,...a.adoptedStyleSheets||[]]);for(let S of k)if(!(S.href&&C.some(E=>E.href===S.href)))try{let E=S.href||a.baseURI||location.origin+"/";E&&A.add(E),await M(S,E)}catch{}for(let S of w)S.near.some(R=>{let F=b.get(R);if(!F||!e.size)return!0;for(let N of e)if(!F.has(N)&&(!S.ranges.length||x(N,S.ranges)))return!0;return!1})&&(p.add(S.family),g+=/url\(/i.test(S.srcRaw)?await Ir(S.block,S.baseHref,r,l):S.block);for(let S of h)p.has(S.family)||(g+=/url\(/i.test(S.srcRaw)?await Ir(S.block,S.baseHref,r,l):S.block);try{for(let S of a.fonts||[]){if(!S||!S.family||S.status!=="loaded"||!S._snapdomSrc)continue;let E=String(S.family).replace(/^['"]+|['"]+$/g,"");if(Jt(E,s)||!f.has(E.toLowerCase())||n?.families&&n.families.some(F=>String(F).toLowerCase()===E.toLowerCase()))continue;let R=String(S._snapdomSrc).startsWith("data:")?S._snapdomSrc:await Ws(S._snapdomSrc,r,l);R!=null&&(g+=`@font-face{font-family:'${E}';src:url(${R});font-style:${S.style||"normal"};font-weight:${S.weight||"normal"};}`)}}catch{}for(let S of o){if(!S||typeof S!="object")continue;let E=String(S.family||"").replace(/^['"]+|['"]+$/g,"");if(!E||Jt(E,s)||!f.has(E.toLowerCase())||n?.families&&n.families.some(O=>String(O).toLowerCase()===E.toLowerCase()))continue;let R=S.weight!=null?String(S.weight):"normal",F=S.style!=null?String(S.style):"normal",N=S.stretchPct!=null?`${S.stretchPct}%`:"100%",P=String(S.src||""),_=P.startsWith("data:")?P:await Ws(P,r,l);_!=null&&(g+=`@font-face{font-family:'${E}';src:url(${_});font-style:${F};font-weight:${R};font-stretch:${N};}`)}return g&&(g=Mg(g),G.resource?.set(d,g)),g}function Ur(t,e){let n=new Set,o=new Set;if(!t)return{required:n,usedCodepoints:o};let r=u=>{if(u)for(let d of u)o.add(d.codePointAt(0))},i=new Set,s=u=>{let d=u.fontFamily,y=u.fontWeight,m=u.fontStyle,g=u.fontStretch,p=d+de+y+de+m+de+g;if(i.has(p))return;i.add(p);let h=Wr(d);if(!h.length)return;let w=de+Or(y)+de+_s(m)+de+gg(g);for(let b of h)n.add(b+w)},a=Me(t),l=t.getRootNode(),f=u=>{s(W(u));let d=u.getRootNode()===l?a:Me(u);for(let y of["::before","::after"]){let m=y==="::before"?d.before:d.after;if(m!==null){if(m==="")continue;try{if(!u.matches(m))continue}catch{}}let g=W(u,y),p=g&&g.content;if(!(!p||p==="none"||p==="normal"))if(s(g),/^["']/.test(p))r(p.slice(1,-1));else for(let h of p.match(/\\[0-9A-Fa-f]{1,6}/g)||[])o.add(parseInt(h.slice(1),16))}},c=[t];for(let u=0;ui<=1114111?String.fromCodePoint(i):"").join(""),r=n.createElement("div");it(r),r.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let i of t){let[s,a,l,f]=i.split(de),c=n.createElement("span");c.textContent=o,c.style.fontFamily=`"${s}"`,c.style.fontWeight=a,c.style.fontStyle=l,c.style.fontStretch=`${f}%`,c.style.fontSize="32px",c.style.lineHeight="1",c.style.whiteSpace="nowrap",c.style.margin="0",c.style.padding="0",r.appendChild(c)}n.body.appendChild(r),r.offsetWidth,n.body.removeChild(r),await Pt(),await Pt()}Kt();At();pt();wt();var Wt=()=>{};function Vr(t,e){if(!t)return Wt;let n=[],o=200;function r(i){if(e){let s=i.getBoundingClientRect();if(s.width>0||s.height>0){let a=Math.max(s.right,s.left+(i.scrollWidth||0)),l=Math.max(s.bottom,s.top+(i.scrollHeight||0));if(ae.right+o||le.bottom+o)return}}if(i.firstElementChild===null&&i.firstChild!==null){let s=getComputedStyle(i),a=Fg(i,s);a!==Wt&&n.push(a);let l=Tg(i,s);l!==Wt&&n.push(l)}for(let s=i.firstElementChild;s;s=s.nextElementSibling)r(s)}return r(t),()=>n.forEach(i=>i())}function Fg(t,e){if(!t)return Wt;e=e||getComputedStyle(t);let n=Ng(e);if(n<=0||!_f(t))return Wt;let o=Lf(t),r=o.text,i=_g(e);o.write("X");let s=t.scrollHeight-i;o.restore();let a=s>0?s:Lg(e),l=Math.round(a*n+i),f=.5*(n+1);if(t.scrollHeight<=l+f)return Wt;let c=0,u=r.length,d=-1;for(;c<=u;){let m=c+u>>1;o.write(r.slice(0,Ds(r,m))+"\u2026"),t.scrollHeight<=l+f?(d=m,c=m+1):u=m-1}let y=(d>=0?r.slice(0,Ds(r,d)):"")+"\u2026";return o.write(y),Nf(t,y,o)}function Tg(t,e){if(!t||(e=e||getComputedStyle(t),e.textOverflow!=="ellipsis")||e.whiteSpace!=="nowrap"&&e.whiteSpace!=="pre"||e.overflowX!=="hidden"&&e.overflowX!=="clip"||!_f(t)||t.scrollWidth<=t.clientWidth+.5)return Wt;let n=Lf(t),o=n.text,r=Pg(t,e,n.nodes),i=c=>{if(!r){let d=Ds(o,c);return o.slice(0,d)+Pf(o,d)+"\u2026"}let u=$g(o,o.length-c);return Pf(o,u)+o.slice(u)+"\u2026"},s=0,a=o.length,l=-1;for(;s<=a;){let c=s+a>>1;n.write(i(c)),t.scrollWidth<=t.clientWidth+.5?(l=c,s=c+1):a=c-1}let f=l>=0?i(l):"\u2026";return n.write(f),Nf(t,f,n)}function Nf(t,e,n){return()=>{t.textContent===e&&n.restore()}}function Lf(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 r=1;r=t.length)return e;let n=t.charCodeAt(e-1);return n>=55296&&n<=56319?e-1:e}function $g(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e);return n>=56320&&n<=57343?e-1:e}var $f=/[\u0600-\u08FF\u1800-\u18AF\uFB50-\uFDFF\uFE70-\uFEFF]/;function Pf(t,e){return e>0&&e(i.setStart(p,h),i.setEnd(p,w),i.getBoundingClientRect()),[a,l]=o,[f,c]=r,u=f.data.length-c,d=s(a,l,Math.min(a.data.length,l+1)),y=s(f,Math.max(0,u-1),u),m=t.getBoundingClientRect();if(e.direction==="rtl"){let p=m.right-(parseFloat(e.borderRightWidth)||0)-(parseFloat(e.paddingRight)||0);return Math.abs(y.right-p)0?n:0}function Lg(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 _g(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function _f(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var Tn=["clone","render"],ko={clone:0,render:1},_t="render";function If(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];if(!e.length)return{stage:_t,loweredBy:[]};let n=-1,o=[];for(let i of e){if(!i||typeof i!="object")continue;let s=i.needs===void 0?_t:i.needs;if(!Object.prototype.hasOwnProperty.call(ko,s))throw new Error(`[SnapDOM] Plugin '${i.name||"(unnamed)"}' declares needs: ${JSON.stringify(s)}, expected one of ${Tn.join(", ")}.`);o.push({name:i.name||"(unnamed)",needs:s}),n=Math.max(n,ko[s])}if(n<0)return{stage:_t,loweredBy:[]};let r=Tn[n];return{loweredBy:r===_t?[]:o.filter(i=>i.needs===r).map(i=>i.name),stage:r}}function $n(t,e){return ko[t]>=ko[e]}function Of(t,e,n=Tn){let o=n[n.length-1];if(e==null)return o;if(!Object.prototype.hasOwnProperty.call(ko,e))throw new Error(`[SnapDOM] ${t}: needs must be one of ${Tn.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 Wf(t,e,n){let o=e.length?e.map(r=>`'${r}'`).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 Pn=[];function Nn(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 Bs(...t){let e=t.flat();for(let n of e){let o=Nn(n);if(o){if(o.needs!==void 0&&o.needs!==_t)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 '${_t}'). Pass it per capture: snapdom(el, { plugins: [...] }).`);Pn.some(r=>r&&r.name&&o.name&&r.name===o.name)||Pn.push(o)}}}function Df(t){return t&&Array.isArray(t.plugins)?t.plugins:Pn}async function pe(t,e,n){let o=n,r=Df(e);for(let i of r){let s=i&&typeof i[t]=="function"?i[t]:null;if(!s)continue;let a=await s(e,o);typeof a<"u"&&(o=a)}return o}async function jr(t,e,n){let o=[],r=Df(e);for(let i of r){let s=i&&typeof i[t]=="function"?i[t]:null;if(!s)continue;let a=await s(e,n);typeof a<"u"&&o.push(a)}return o}function Ig(){Pn.length=0}var Og=0;function Wg(t){let e=[];if(Array.isArray(t))for(let n of t){let o=Nn(n);if(!o)continue;o.name||(o.name=`anonymous-${++Og}`);let r=e.findIndex(i=>i&&i.name===o.name);r>=0&&e.splice(r,1),e.push(o)}for(let n of Pn)n&&n.name&&!e.some(o=>o.name===n.name)&&e.push(n);return Object.freeze(e)}function Bf(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=Wg(e)),t}function zs(){return Pn.slice()}var Dg=["resolveNode","beforeSnap","beforeClone","afterClone","beforeRender","afterRender"];function Gr(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];for(let n of e){let o=Nn(n);if(!(!o||o.pure===!0)){for(let r of Dg)if(typeof o[r]=="function")return!0}}return!1}Ot();wt();xt();pt();Kt();At();wt();xt();pt();wt();var qs="http://www.w3.org/1999/xhtml",Bg=`all:unset;${kt}:nowrap;word-break:normal;line-break:auto`,zg=[[kt,"nowrap"],["word-break","normal"],["line-break","auto"]],zf="\u2060",Uf=/[\w\u00C0-\u024F]/,Hf=new Set(["inline","contents","ruby","ruby-base","ruby-base-container"]),Ug=new Set(["img","picture","video","audio","canvas","iframe","object","embed","input","textarea","select","script","style","template","noscript","title"]),Hg=new Set(["script","style","template","noscript","title"]),Zf=Object.freeze([]),Vg=/^[ \t\n\r\f!-~\u00A0-\u00AC\u00AE-\u024F\u0370-\u03FF\u0400-\u04FF\u1E00-\u1EFF\u2010-\u2027\u2030-\u205E\u20A0-\u20CF\u2100-\u22FF\u25A0-\u25FC\u2713-\u2717]*$/,jg=/[0-9A-Za-z_'\u00C0-\u024F\u0370-\u03FF\u0400-\u04FF\u1E00-\u1EFF\u2019]/,Gg=/[-/,.:;!?)\]}%\u2010\u2013\u201D]/,qg=new Set(["none","uppercase","lowercase","capitalize"]),Xg=new Set(["block","inline-block","list-item","flow-root","table-caption"]),Yg=new Set(["button","fieldset","legend","details","summary","marquee"]),Vf={start:0,left:0,"-webkit-left":0,"-moz-left":0,center:1,"-webkit-center":1,"-moz-center":1,end:2,right:2,"-webkit-right":2,"-moz-right":2},Vs={forced:!0},Kg=6,Zg=.25;function mt(t){return t===32||t===9||t===10||t===12||t===13||t===5760||t>=8192&&t<=8202&&t!==8199||t===8287||t===12288}function Xr(t,e){let n=t.node.data;return mt(n.charCodeAt(e?0:n.length-1))}function Fe(t,e){return Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top)>Math.min(t.height,e.height)/2}var st=t=>parseFloat(t)||0;function Jg(t,e){if(!Qi.test(t)||e.overflowWrap!=="normal"||e.hyphens==="auto")return!0;let n=e.wordBreak;return n!=="normal"&&n!=="keep-all"||e.lineBreak==="anywhere"}function jf(t){if(t.loose===void 0){let e=t.node.data,n=0;for(;nn&&mt(e.charCodeAt(o-1));)o--;t.loose=Jg(e.slice(n,o),t.cs)}return t.loose}function Qg(t){let e=t.whiteSpaceCollapse;if(!e){let o=t.whiteSpace;e=o==="normal"||o==="nowrap"?"collapse":""}let n=e==="collapse"&&t.wordBreak;return(n==="normal"||n==="keep-all")&&t.overflowWrap==="normal"&&t.lineBreak!=="anywhere"&&t.hyphens!=="auto"&&qg.has(t.textTransform||"none")&&t.direction==="ltr"}function Jf(t,e){let n=t.data,o=[];for(let c=0;c=56320&&u<=57343&&c>0||mt(u)||o.push(c)}let r=new Map,i=c=>{let u=r.get(c);if(u===void 0){let d=o[c],y=n.charCodeAt(d);e.setStart(t,d),e.setEnd(t,Math.min(n.length,d+(y>=55296&&y<=56319?2:1)));let m=e.getClientRects();u=null;for(let g=m.length-1;g>=0&&!u;g--)m[g].width&&m[g].height&&(u=m[g]);r.set(c,u)}return u},s=0;for(;ss&&!i(a);)a--;let l=[],f=(c,u)=>{if(Fe(i(c),i(u)))return;let d=c+u>>1,y=d>c?d:u;for(;yc&&!i(y);)y--;if(y<=c){l.push(o[u]);return}f(c,y),f(y,u)};return a>s&&f(s,a),{breaks:l,start:i(s),end:i(a)}}function Qf(t,e){if(t.rl)return t.rl;e.selectNodeContents(t.live);let n=e.getClientRects(),o=[],r=null;for(let i=0;i=0;s--){let a=r[s];if(!(!a.width||!a.height))if(!i)i={top:a.top,bottom:a.bottom,height:a.height,left:a.left,right:a.right};else if(Fe(i,a))i.left=Math.min(i.left,a.left);else return null}return i}function Us(t,e){if(t){for(let n=0;n=0&&mt(t.charCodeAt(e));)e--;return e}function ny(t,e){for(;e>0&&!mt(t.charCodeAt(e-1));)e--;return e}function Gf(t,e){return!mt(t.charCodeAt(e))&&mt(t.charCodeAt(e-1))}function oy(t,e,n,o){e=Math.min(Math.max(e,n+1),o-1);for(let r=0;e-r>n||e+rn&&Gf(t,e-r))return e-r}return-1}function ry(t,e){let n=t.rl,o=t.live,r=o.data,i=0;for(;ii&&mt(r.charCodeAt(s-1));)s--;let a=0;for(let d of n)a+=d.right-d.left;let l=[],f=[],c=i,u=0;for(let d=1;dKg)return null;if(p<0&&(h=qr(o,y,Mo(r,y),e),p=Us(h,n),p===d&&h.left-n[d].left=s)return null;m=b-1,g=p,y=x,p=-1}else if(g>=d){let b=ny(r,m);if(b<=c)return null;p=g,h=null,y=b,g=-1}else return null}if(!h&&(h=qr(o,y,Mo(r,y),e),Us(h,n)!==d))return null;l.push(y),f.push(h),c=y}return{breaks:l,words:f}}function js(t,e){if(t.found===void 0&&(t.found=ry(t,e),!t.found)){let n=Jf(t.live,e);t.found=n&&{breaks:n.breaks,words:null}}return t.found}function Hs(t,e){if(t.start!==void 0)return t.start!==null;if(t.start=t.end=null,t.atom){let s=t.atom.getBoundingClientRect();return s.height&&(t.start=t.end=s),t.start!==null}if(t.simple){let s=Qf(t,e);if(!s.length)return!1;if(s.length>1&&t.wraps){let a=js(t,e);if(!a)return!1;t.breaks=a.breaks}return t.start=s[0],t.end=s[s.length-1],!0}e.selectNodeContents(t.live);let n=e.getClientRects(),o=null,r=null,i=1;for(let s=0;s1&&t.wraps){let s=Jf(t.live,e);if(!s)return!1;t.breaks=s.breaks,t.start=s.start,t.end=s.end}else t.start=o,t.end=r;return!0}function iy(t,e,n){if(!e||e.nodeType!==1)return null;let o=[];for(let a=e.firstChild;a;a=a.nextSibling)a.nodeType===3&&o.push(a);let r=0;for(let a=t.firstChild;a;a=a.nextSibling)if(a.nodeType===3){if(r===o.length||o[r].data!==a.data)return null;r++}if(r!==o.length)return null;let i=W(e);if((i.writingMode||"horizontal-tb")!=="horizontal-tb"||sy(e,i,n)===tr)return null;let s=i.textWrapMode!=="nowrap"&&t.style?.getPropertyValue(kt)!=="nowrap";return{live:o,at:0,cs:i,wraps:s,plain:Qg(i)}}function sy(t,e,n){let o=n.get(t);if(o!==void 0)return o;let r=t.parentElement;if(!r||e.display!=="inline")return xn(t,n);o=xn(r,n);let i=e.zoom;return o===lo&&i&&i!=="1"&&(o=er),n.set(t,o),o}function tu(t,e=rt()?"gecko":"blink"){if(e==="gecko"){let o=1.1*(t+1)/(120*t),r=1/(60*t)+.01,i=s=>r+s*o;return{zoom:t,starts:!0,optical:!0,early:i,pull:i}}let n=1/(64*t);return{zoom:t,starts:!1,optical:!1,early:(o,r)=>.05+r*n,pull:null}}function ay(t,e){let n=e.spaceMemo.get(t);if(n!==void 0)return n;let o=t.font||`${t.fontStyle} ${t.fontWeight} ${t.fontSize} ${t.fontFamily}`,r=`${o}|${t.wordSpacing}|${t.letterSpacing}`;if(n=e.spaceMemo.get(r),n===void 0){n=0;try{let i=e.ctx||(e.ctx=e.doc.createElement("canvas").getContext("2d"));i.font="1px serif",i.font=o,i.font!=="1px serif"&&(n=i.measureText("x x").width-i.measureText("xx").width+st(t.wordSpacing)+st(t.letterSpacing),n=Math.max(0,n-.05))}catch{n=0}e.spaceMemo.set(r,n)}return e.spaceMemo.set(t,n),n}function eu(t,e){let n=e.faces.get(t);if(n===void 0){let o=t.fontOpticalSizing==="auto"?t.fontVariationSettings||"":"opsz";n=/opsz/.test(o)?"":`${t.fontStyle}|${t.fontWeight}|${t.fontStretch}|${t.fontFamily}|${o}`,e.faces.set(t,n)}return n}function ly(t,e){let n=e.doc,o=new Set,r=fy(n),i=r===null?null:qf.get(n);r!==null&&i?.stamp!==r&&qf.set(n,i={stamp:r,faces:new Map});let s=new Map;for(let f of t)if(!f.why)for(let c of f.items){if(!c.node)continue;let u=c.cs,d=eu(u,e);if(!d)continue;let y=i?.faces.get(d);y!==void 0?y&&o.add(d):s.has(d)||s.set(d,{cs:u,text:`${cy} ${c.node.data.trim().slice(0,40).trim()}`})}if(!s.size)return o;let a=it(n.createElement("div"));a.style.cssText="all:initial;position:absolute!important;left:-99999px!important;top:0!important;visibility:hidden!important;white-space:nowrap!important;pointer-events:none!important;font-size:16px";let l=[];for(let[f,{cs:c,text:u}]of s){let d=c.fontVariationSettings&&c.fontVariationSettings!=="normal"?`${c.fontVariationSettings}, `:"",y=[];for(let m of['"opsz" 1','"opsz" 1000']){let g=n.createElement("span"),p=g.style;p.setProperty("font-style",c.fontStyle,"important"),p.setProperty("font-weight",c.fontWeight,"important"),p.setProperty("font-stretch",c.fontStretch,"important"),p.setProperty("font-family",c.fontFamily,"important"),p.setProperty("font-variation-settings",d+m,"important"),g.textContent=u,a.append(g,n.createElement("br")),y.push(g)}l.push([f,y])}(n.body||n.documentElement).appendChild(a);try{for(let[f,[c,u]]of l){let d=Math.abs(c.getBoundingClientRect().width-u.getBoundingClientRect().width)>.001;d&&o.add(f),i?.faces.set(f,d)}}finally{a.remove()}return o}var cy="Hamburgefonstiv 0123456789",qf=new WeakMap;function fy(t){let e=t.fonts;if(!e)return"";if(e.status!=="loaded")return null;let n=0;return e.forEach(o=>{o.status==="loaded"&&n++}),`${e.size}|${n}`}function uy(t,e){if(t.why)return t.why;let n=t.root;if(!n)return"root";let o=W(n),r=o.display||"";if(!Xg.has(r)||Yg.has(n.localName)||ve(n.localName,r))return"box";if((o.writingMode||"horizontal-tb")!=="horizontal-tb"||o.direction!=="ltr")return"direction";let i=Vf[o.textAlign],s=o.textAlignLast;if(i===void 0||s&&s!=="auto"&&Vf[s]!==i)return"align";let a=o.textWrapStyle;if(a==="balance"||a==="pretty")return"balance";let l=o.columnCount,f=o.columnWidth;if(l&&l!=="auto"||f&&f!=="auto")return"columns";if(i&&(st(o.textIndent)||r==="list-item"&&o.listStylePosition==="inside"))return"indent";if(xn(n,e.axes)!==lo)return"scaled";for(let A of t.items)if(A.node){if(!A.plain||A.wraps&&!A.simple)return"text";if(e.optical?.size&&e.optical.has(eu(A.cs,e)))return"optical"}let c=n.getClientRects();if(c.length!==1)return"fragmented";let u=c[0],d=st(o.borderLeftWidth),y=st(o.borderRightWidth),m=A=>A==="visible"||A==="clip";if((!m(o.overflowX)||!m(o.overflowY))&&(n.scrollLeft||n.offsetWidth-n.clientWidth-d-y>=2))return"scrollbar";let g=u.left+d+st(o.paddingLeft),p=u.right-y-st(o.paddingRight);for(let A of e.floats){if(A===n||A.contains(n))continue;let M=e.floatBoxes.get(A);if(!M){let k=A.getBoundingClientRect(),S=W(A);e.floatBoxes.set(A,M={top:k.top-st(S.marginTop),bottom:k.bottom+st(S.marginBottom),left:k.left-st(S.marginLeft),right:k.right+st(S.marginRight)})}if(M.bottom>u.top&&M.topu.left&&M.left1&&!js(A,e.range))return"unmeasured";Xr(A,!0)&&x.push(A.cs)}C&&C.node&&Xr(C,!1)&&x.push(C.cs);for(let k=0;kFe(N,E));if(!F)return"order";R?F.right=Math.max(F.right,E.right+A.mr):F.left=Math.min(F.left,E.left-A.ml),F.n++,F.edges++}}for(let A of w)if(A.room=i===0?p-A.right:i===2?A.left-g:p-g-(A.right-A.left),A.roomz&&mt(O.charCodeAt($-1));)$--;D=!k.at&&S.rl.length===1&&z===$?S.rl[0]:qr(S.live,B,z,e.range)}if(!D)return"unmeasured";E=D.right-D.left,R=z-B}let N=E-M.room,P=e.risk.pull(M.n+1+R,M.edges);if(N>=P)continue;let _=1/0;if(!F)for(let O of k.spaces)_=Math.min(_,ay(O,e));if(_===1/0&&(_=0),_+N=e?o[e-1]:0,i=eu&&mt(o.charCodeAt(d-1));)d--;!c&&d===f&&o.charCodeAt(d-1)===173&&d--;let y=!a&&t.before?l:u,m=c&&t.after?f:d;if(y>l&&i.append(o.slice(l,y)),i.append(Gs(r,o.slice(y,m))),m{let k=a.get(M);return k||a.set(M,k={root:M,items:[],links:[],runs:[],boxes:[],last:null,gap:[],why:""}),k},u=(M,k)=>{let S=c(M);S.why||(S.why=k)},d=(M,k)=>{let S=M.last;if(S){let E=M.gap.length||S.wraps&&Xr(S,!1)||k.wraps&&Xr(k,!0),R=!E&&S.node&&k.node&&(S.wraps||k.wraps)&&!(Uf.test(S.node.data[S.node.data.length-1])&&Uf.test(k.node.data[0]));(E||R||S.atom||k.atom)&&M.links.push({prev:S,run:k,gap:M.gap.slice(),seam:R}),M.gap.length=0}M.last=k,M.items.push(k)},y=(M,k,S,E)=>{let R=S.transform,F=S.translate;(Kf(S)||R&&R!=="none"||F&&F!=="none")&&u(M.root,"shifted"),(st(S.marginLeft)<0||st(S.marginRight)<0)&&u(M.root,"margin"),d(M,{atom:k,el:E,cs:S,start:void 0,end:null})},m=[e,null];for(;m.length;){let M=m.pop(),k=m.pop();if(k.nodeType===3){let R=k.parentNode,F=l.get(R);F===void 0&&l.set(R,F=iy(R,n.get(R),s));let N=k.data,P=0;for(;P0,end:$>0,ml:B,mr:D}))}else F!=="contents"&&u(M,"ruby");else{if(N&&y(c(M),E,R,k),!E.childElementCount&&ve(E.localName,F)&&E.clientHeight-st(R.paddingTop)-st(R.paddingBottom)<1.5*(st(R.lineHeight)||1.2*st(R.fontSize)))continue;S=E}}else{if(Hg.has(k.localName))continue;{let R=k.getAttribute?.("data-snapdom-pseudo"),F=R&&n.get(k.parentNode),N=F?W(F,R):null;(!N||N.position!=="absolute"&&N.position!=="fixed")&&u(M,R?"pseudo":"wrapper")}}for(let R=k.lastChild;R;R=R.previousSibling)m.push(R,S)}let g=[];for(let M of a.values())(M.links.length||M.runs.some(jf))&&g.push(M);let p={risk:r,range:i,axes:s,floats:f,floatBoxes:new Map,doc:o,ctx:null,spaceMemo:new Map,faces:new Map,optical:null};r&&r.optical&&(p.optical=ly(g,p));let h=[],w=[],b=new Set,x=[];for(let M of g)if(!(r&&!uy(M,p))){for(let{prev:k,run:S,gap:E,seam:R}of M.links)if(Hs(k,i)&&Hs(S,i)&&Fe(k.end,S.start)){k.after=!0,S.before=!0;for(let F of E)h.push(F);R&&w.push(k),k.atom&&b.add(k),S.atom&&b.add(S)}for(let k of M.runs){let S=k.node.data,E=0;for(;EE&&mt(S.charCodeAt(R-1));)R--;!(k.before&&E>0||k.after&&RM.node),...h,...w.map(M=>M.node),...[...b].map(M=>M.el)]));for(let M of x)M.tail=py(M,A.get(M.node));for(let M of h){let k=A.get(M);if(k.nodeType===1)k.replaceWith(zf);else{let S=Gs(v,"");k.replaceWith(S),S.append(k)}}for(let M of w)(M.tail||A.get(M.node)).after(zf);for(let M of b){let k=A.get(M.el),S=Gs(v,"");k.replaceWith(S),S.append(k);for(let[E,R]of zg){let F=M.cs.getPropertyValue(E);F&&F!==R&&k.style?.setProperty(E,F)}}return C}Re();wo();function Ln(t,e,n,o){return t>e+.5?t-n:o-n}function gy(t){let e=r=>r&&r!=="transparent"&&!/^rgba\(.*,\s*0\)$/.test(r),n=W(t.documentElement).backgroundColor,o=e(n)?n:W(t.body).backgroundColor;return e(o)?`;background-color:${o} !important`:""}var yy=/(?:^|;)(?:box-shadow|text-shadow|outline-style|filter|-webkit-filter):/;function by(t,e){if(K())return t;let n=t.indexOf("");if(n===-1)return t;let o=[],r=n;if(t.indexOf("]*>[\s\S]*?<\/style>/g,p;for(g.lastIndex=n;p=g.exec(t);)o.push({text:t.slice(r,p.index),intern:!0}),o.push({text:p[0],intern:!1}),r=g.lastIndex}o.push({text:t.slice(r),intern:!0});let i=new Map,s=/ style="([^"]*)"/g,a;for(let g of o)if(g.intern)for(s.lastIndex=0;a=s.exec(g.text);)i.set(a[1],(i.get(a[1])||0)+1);let l=0;for(let[g,p]of i)p>1&&(l+=(p-1)*g.length);if(l<2048||t.includes(" data-sdi="))return t;let f=xy(e,o.some(g=>!g.intern),t.includes("data-snapdom-asset"));if(f===null)return t;let c=new Map,u=0,d=[],y=(g,p)=>{if((i.get(p)||0)<2||f.has(p))return g;let h=c.get(p);return h===void 0&&(h="i"+(u++).toString(36),c.set(p,h),d.push(`[data-sdi="${h}"]{${p}}`)),` data-sdi="${h}"`},m="";for(let g of o)m+=g.intern?g.text.replace(s,y):g.text;return t.slice(0,n)+d.join("")+m}function wy(t){if(/@import\b/i.test(t))return null;let e=[],n=o=>{for(let r of o){if(r.type===CSSRule.IMPORT_RULE||r.type===CSSRule.NAMESPACE_RULE)throw new Error("External or namespaced CSS");if(r.selectorText){if(/\[\s*style\b|data-sdi|\[[^\]]*\\|&/i.test(r.selectorText))throw new Error("Attribute-dependent or nested CSS");e.push(r.selectorText)}r.cssRules&&n(r.cssRules)}};try{let o=new CSSStyleSheet;o.replaceSync(t),n(o.cssRules)}catch{return null}return e}var Yr=new Map;function xy(t,e,n){let o=new Set;if(!e&&!n)return o;if(!t||t.querySelector("[data-sdi]"))return null;let r=l=>{let f=l.getAttribute("style");f&&o.add(f)};if(n&&t.querySelectorAll("[data-snapdom-asset][style]").forEach(r),e)try{let l=[],f=new Map;for(let d of[...t.querySelectorAll("style")].slice(1)){let y=d.textContent||"";f.has(y)||f.set(y,Yr.has(y)?Yr.get(y):wy(y));let m=f.get(y);if(!m)return Yr=f,null;for(let g of m)l.push(g)}Yr=f;let c=[];for(let d of l)/:scope\b/i.test(d)?t.querySelectorAll(d).forEach(r):c.push(d);let u=c.join(",");if(u)for(let d of t.querySelectorAll("[style]")){let y=d.getAttribute("style");y&&!o.has(y)&&d.matches(u)&&o.add(y)}}catch{return null}let i=new Set,s=document.createElement("div"),a=new XMLSerializer;for(let l of o){s.setAttribute("style",l);let f=a.serializeToString(s).match(/ style="([^"]*)"/);f&&i.add(f[1])}return i}async function Kr(t,e){let{clipWindow:n,outerTransforms:o,outerShadows:r,rootTransform2D:i,fontsCSS:s,universe:a,session:l,signatures:f}=e,c=t.options;if(t!==c){let{options:tt,...ot}=t;t=Object.assign(c,ot),Object.defineProperty(t,"options",{value:t,configurable:!0})}let u,d;vr(t,s,a),await pe("beforeRender",t);let y=W(t.element),m=t.element.getBoundingClientRect(),g=l?.rootBox,p=Math.max(1,H(g?.[0]||t.element.offsetWidth||parseFloat(y.width)||m.width||1)),h=Math.max(1,H(g?.[1]||t.element.offsetHeight||parseFloat(y.height)||m.height||1)),w=t.element.ownerDocument||document,b=!n&&(t.element===w.body||t.element===w.documentElement)&&!t.__pinned,x=null,v=null,C=0;if(b){let tt=Math.max(t.element.scrollHeight||0,w.documentElement?.scrollHeight||0,w.body?.scrollHeight||0),ot=Math.max(t.element.scrollWidth||0,w.documentElement?.scrollWidth||0,w.body?.scrollWidth||0),ft=Math.max(p,H(ot)),dt=t.element===w.body,Bt=dt&&W(w.documentElement).direction==="rtl",vt=nt=>{nt>0&&(Bt?C=Math.max(C,H(nt-m.width)):p=Math.max(p,H(nt)))};if(dt&&w.documentElement){let nt=w.documentElement.getBoundingClientRect(),Mt=t.element.currentCSSZoom||1,ut={top:Math.max(0,m.top-nt.top)/Mt,right:Math.max(0,nt.right-m.right)/Mt,bottom:Math.max(0,nt.bottom-m.bottom)/Mt,left:Math.max(0,m.left-nt.left)/Mt};if(x=ut,r!=="subtree"&&(ut.top||ut.right||ut.bottom||ut.left)){let Gn=new Map,No=new Map;for(let[ge,Xt]of t.nodeMap){let Yt=f?.get(ge);if(Yt){let hi=Gn.get(Yt);if(hi===void 0&&Gn.set(Yt,hi=yy.test(Yt)),!hi)continue}No.set(ge,Xt)}let ee=xs(t.element,No,t.styleCache,m.width>0?p/m.width:1,m.height>0?h/m.height:1);v={top:Math.min(ee.top,ut.top),right:Math.min(ee.right,ut.right),bottom:Math.min(ee.bottom,ut.bottom),left:Math.min(ee.left,ut.left)}}tt=Math.max(t.element.scrollHeight||0,Ln(tt,nt.height,m.top-nt.top,m.bottom-nt.top)),ot=Math.max(t.element.scrollWidth||0,Bt?Ln(ot,nt.width,nt.right-m.right,nt.right-m.left):Ln(ot,nt.width,m.left-nt.left,m.right-nt.left))}tt>0&&(h=Math.max(h,H(tt))),vt(ot);try{let nt=(t.scrollbarCSS||"").length+(t.baseCSS||"").length+(t.fontsCSS||"").length+(t.classCSS||"").length,Mt=G.measureHints.get(t.element);if(Mt&&Mt.cssLen===nt&&Mt.w0===ft&&Mt.docH===tt&&Mt.docW===ot)Mt.csh>0&&(h=Math.max(h,H(Mt.csh))),vt(Mt.csw);else{let ut=w.createElement("div");it(ut),ut.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+ft+"px!important;overflow:visible!important;visibility:hidden!important;";let Gn=ut.attachShadow({mode:"open"});So(Gn,(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS);let No=Gn.appendChild(Es(t.clone));w.body.appendChild(ut);let ee=ut.scrollHeight,ge=ut.scrollWidth;if(dt){let Xt=ut.getBoundingClientRect(),Yt=No.getBoundingClientRect();ee=Ln(ee,Xt.height,Yt.top-Xt.top,Yt.bottom-Xt.top),ge=Bt?Ln(ge,Xt.width,Xt.right-Yt.right,Xt.right-Yt.left):Ln(ge,Xt.width,Yt.left-Xt.left,Yt.right-Xt.left)}w.body.removeChild(ut),G.measureHints.set(t.element,{cssLen:nt,w0:ft,docH:tt,docW:ot,csh:ee,csw:ge}),ee>0&&(h=Math.max(h,H(ee))),vt(ge)}}catch{}}if(t.options?.excludeMode==="remove"||typeof t.options?.filter=="function"&&t.options.filterMode==="remove"){let tt=As(t.element,t.options),ot=1,ft=As(t.element,{}),dt=Math.max(2,h*.15);Number.isFinite(ft)&&ft>=h-dt&&Number.isFinite(tt)&&tt>0&&(h=Math.max(1,Math.min(h,H(tt+ot))))}if(t.options?.reconcile)try{let tt=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS;ff(t.element,t.clone,tt,t.nodeMap,p,h)}catch(tt){at(l,"reconcile-failed","reconcile pass failed",tt),U(t.options,"reconcile couldn't run; captured without it.",tt)}let A=(tt,ot=NaN)=>{let ft=typeof tt=="string"?parseFloat(tt):tt;return Number.isFinite(ft)?ft:ot},M=A(t.options.width),k=A(t.options.height),S=n?H(n.width):p,E=n?H(n.height):h,R=S,F=E,N=Number.isFinite(M),P=Number.isFinite(k),_=E>0?S/E:1;N&&P?(R=Math.max(1,H(M)),F=Math.max(1,H(k))):N?(R=Math.max(1,H(M)),F=Math.max(1,H(R/(_||1)))):P&&(F=Math.max(1,H(k)),R=Math.max(1,H(F*(_||1))));let O=0,B=0,D=p,z=h;if(n){let tt=0,ot=0;if(wr(t.element)){let dt=null;if(!o&&i&&Number.isFinite(i.a))dt={a:i.a,b:i.b||0,c:i.c||0,d:i.d||1,e:0,f:0};else{let Bt=Ze(t.element),vt=Ms(y.transform&&y.transform!=="none"?y.transform:"",Bt);vt&&vt.is2D&&(dt={a:vt.a,b:vt.b,c:vt.c,d:vt.d,e:0,f:0})}if(dt&&!(dt.a===1&&dt.b===0&&dt.c===0&&dt.d===1)){let{ox:Bt,oy:vt}=bo(y,p,h),nt=Rn(p,h,dt,Bt,vt);tt=nt.minX,ot=nt.minY}}let ft=K()?0:(c.dpr||1)*(N||P?R/S:c.scale||1);O=H(ft?Math.round((n.x+tt)*ft)/ft:n.x+tt),B=H(ft?Math.round((n.y+ot)*ft)/ft:n.y+ot),D=H(O+n.width),z=H(B+n.height)}else if(!o&&i&&Number.isFinite(i.a)){let tt={a:i.a,b:i.b||0,c:i.c||0,d:i.d||1,e:0,f:0},ot=Rn(p,h,tt,0,0);O=H(ot.minX),B=H(ot.minY),D=H(ot.maxX),z=H(ot.maxY)}else if(o&&wr(t.element)){let ot=y.transform&&y.transform!=="none"?y.transform:"",ft=Ze(t.element),dt=Ee({baseTransform:ot,rotate:ft.rotate||"0deg",scale:ft.scale,translate:ft.translate,width:p,height:h}),{ox:Bt,oy:vt}=bo(y,p,h),nt=dt.is2D?dt:new DOMMatrix(dt.toString()),Mt={a:nt.a,b:nt.b,c:nt.c,d:nt.d,e:0,f:0},ut=Rn(p,h,Mt,Bt,vt);O=H(ut.minX),B=H(ut.minY),D=H(ut.maxX),z=H(ut.maxY)}let $=ms(y),T=gs(y),L=ys(y),I=bs(y),Z=ws(y),Q=m.width>0?(D-O)/m.width:1,j=m.height>0?(z-B)/m.height:1,q=r==="subtree"&&!n?xs(t.element,t.nodeMap,t.styleCache,Q,j):{top:0,right:0,bottom:0,left:0};v&&(q={top:v.top,right:Math.max(0,v.right-(p-m.width)),bottom:Math.max(0,v.bottom-(h-m.height)),left:v.left}),C>0&&(q={...q,left:Math.max(q.left,C)});let V=n?{top:0,right:0,bottom:0,left:0}:r?{top:H(Math.max($.top,T.top,q.top)+L.top+I.top+Z.bleed.top),right:H(Math.max($.right,T.right,q.right)+L.right+I.right+Z.bleed.right),bottom:H(Math.max($.bottom,T.bottom,q.bottom)+L.bottom+I.bottom+Z.bleed.bottom),left:H(Math.max($.left,T.left,q.left)+L.left+I.left+Z.bleed.left)}:{top:H(L.top+q.top),right:H(L.right+q.right),bottom:H(L.bottom+q.bottom),left:H(L.left+q.left)};O=H(O-V.left),B=H(B-V.top),D=H(D+V.right),z=H(z+V.bottom);let gt=Math.max(1,H(D-O)),et=Math.max(1,H(z-B)),ht="http://www.w3.org/2000/svg",Rt=wr(t.element)?2:0,qt=H(Rt+(o?0:1)),en=c.__subpixel?.x||0,nn=c.__subpixel?.y||0,X=Math.ceil(gt+qt*2+en),J=Math.ceil(et+qt*2+nn),Y=H(-(H(O)-qt)),Ft=H(-(H(B)-qt)),te=w.defaultView||window,St=!K()&&CSS.supports("zoom","2"),jn=St?Sy(te):1,yt=St?(rt()&&Number.isInteger(jn)?1:jn)*(t.element.currentCSSZoom||1):1;l.layoutZoom=yt;let Pe=n&&!K(),ae=Pe?H(Y-Math.floor(Y*yt+.01)/yt):0,It=Pe?H(Ft-Math.floor(Ft*yt+.01)/yt):0,Ne=Math.min(0,Y-ae)-(ae?1/yt:0),on=Math.min(0,Ft-It)-(It?1/yt:0),Le=Y-ae-Ne+en,_e=Ft-It-on+nn,Ie=H(X-Ne),fi=H(J-on),Dt=document.createElementNS(ht,"foreignObject");Dt.setAttribute("x",String(Ne*yt)),Dt.setAttribute("y",String(on*yt)),Dt.setAttribute("width",String(Ie*yt)),Dt.setAttribute("height",String(fi*yt)),Dt.style.overflow="visible";let Ca=document.createElement("style"),ld="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";Ca.textContent=(t.scrollbarCSS||"")+t.baseCSS+t.fontsCSS+ld+t.classCSS,Dt.appendChild(Ca);let rn=document.createElement("div");rn.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),rn.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${c.__subpixel?H(Le+m.width):Ie}px;height:${fi}px`+(Le!==0||_e!==0?`;padding:${_e}px 0 0 ${Le}px !important`:"")+(yt!==1?`;zoom:${yt} !important`:"")+";direction:ltr !important"+(x?gy(w):""),x&&(Le!==x.left||_e!==x.top)&&f&&of(t.element,t.nodeMap,f,t.styleCache,Le-x.left,_e-x.top),rn.appendChild(t.clone),Dt.appendChild(rn);let ka=new XMLSerializer,ui=Dt;if(!Number.isInteger(yt))try{ui=nu(Dt,t.clone,t.nodeMap,w,tu(yt))||Dt}catch(tt){at(l,"line-breaks-failed","line break pass failed",tt)}let cd=ka.serializeToString(ui),Ma=N||P,fd=Object.freeze({w0:S,h0:E,vbW:X,vbH:J,targetW:R,targetH:F,contentX:H(Y+(n?O:0)),contentY:H(Ft+(n?B:0)),clip:n?Object.freeze({x:H(O),y:H(B),width:S,height:E}):null});Object.defineProperty(c,"meta",{value:fd,enumerable:!0,writable:!1,configurable:!0});let ud=!Ma||K()?X:N?R:H(X*(F/J)),dd=!Ma||K()?J:P?F:H(J*(R/X)),pd=parseFloat(W(w.documentElement)?.fontSize)||16,di=[ae||It?`translate(${ae} ${It})`:"",yt!==1?`scale(${1/yt})`:""].join(" ").trim(),Po=`${di?``:""}`,Aa=di?"":"";if(d=Po+by(cd,ui)+Aa,yt!==1){let tt=vt=>{let nt=ka.serializeToString(vt.cloneNode(!1));return nt.slice(0,nt.indexOf(">")+1).replace(/\/>$/,">")},ot=Dt.cloneNode(!1);ot.setAttribute("x",String(Ne)),ot.setAttribute("y",String(on)),ot.setAttribute("width",String(Ie)),ot.setAttribute("height",String(fi));let ft=rn.cloneNode(!1);ft.style.removeProperty("zoom");let dt=ae||It?`translate(${ae} ${It})`:"",Bt=Po.slice(0,Po.indexOf(">")+1)+(dt?``:"");l.fileSvg={zoomed:[Po+tt(Dt),tt(rn),Aa],flat:[Bt+tt(ot),tt(ft),dt?"":""]}}u=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(d)}`,t.svgString=d,t.dataURL=u,l.artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},await pe("afterRender",t),t.clone=t.nodeMap=t.styleCache=t.svgString=null;let pi=[...document.querySelectorAll("#snapdom-sandbox")].find(Vt);return pi&&pi.style.position==="absolute"&&pi.remove(),t.dataURL}function Sy(t){let e=t.devicePixelRatio||1;if(e===1)return 1;let n=t.document,o=e;try{let r=n.createElement("div");it(r),r.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:0!important;height:0!important;visibility:hidden!important;pointer-events:none!important;border:0 solid transparent!important;border-top-width:0.5px!important",(n.body||n.documentElement).appendChild(r);let i=parseFloat(t.getComputedStyle(r).borderTopWidth);r.remove(),i>=1&&(rt()||Math.abs(i-1/e)>.01)&&(o=1)}catch{}return o}Re();wo();function ky(t){let e=Array.isArray(t.plugins)?t.plugins:zs(),n=[];for(let o of e){let r=Nn(o);r&&typeof r.resolveNode=="function"&&n.push(r.resolveNode.bind(r))}return n.length?n:null}async function su(t,e,n=ie(e)){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");mi(e.cache),e.__session=n,e.__ownNode=it,n.resolveNodeHooks=ky(e);let o=e;o.element=t,Object.defineProperty(o,"options",{value:o,configurable:!0});let r,i,s,a,l,f,c,u,d,y,m,g="",p=null,h=e.needs||_t,w=o.format,b=o.type;await pe("beforeSnap",o);let x=o.format!==w&&/^(?:png|jpe?g|webp|svg)$/i.test(o.format),v=o.type!==b&&/^(?:png|jpe?g|webp|svg)$/i.test(o.type);if(x||v){let T=String(x?o.format:o.type).toLowerCase();o.format=T==="jpg"?"jpeg":T,o.type=o.format,o.__explicitFormat=o.format,/^(?:jpeg|webp)$/.test(o.format)&&(o.backgroundColor==null||o.backgroundColor==="transparent")&&(o.backgroundColor="#ffffff")}await pe("beforeClone",o),Sl(t.ownerDocument,t.getElementsByTagName("*").length+1);let C=o.outerTransforms!==!1,A=o.outerShadows==="subtree"?"subtree":!!o.outerShadows,M=o.clip?xr(o.element,o.clip):null,k=[];try{typeof o.element.getAnimations=="function"&&(k=o.element.getAnimations({subtree:!0}))}catch{k=null}let S=new Set(k),E=()=>{bl(o.element,S);for(let T of S)Zt(T.effect?.target)};E(),n.animated=nr(S);let R=e.__styleShare;if(R===void 0)try{R=Rl(o.element)&&k?.length===0}catch{R=!1}n.styleShare=R;let F=Wa(e.fast);for(;;){n.slicer=F;let T=Vr(o.element,M);try{({clone:r,classCSS:i,classPrefixCSS:s,shadowCSS:a,styleCache:l,nodeMap:f,reconcileRisk:c,clipWindow:u,standIns:d,universe:y}=await xf(o.element,o.options,n)),c>0&&!e.reconcile&&(at(n,"reconcile-risk","text in inline/table-cell elements kept natural width and may re-wrap; pass { reconcile: true } for pixel-exact layout"),e.debug&&!G.warnedReconcile&&(G.warnedReconcile=!0,U(e,"Some text may wrap differently in the capture. Pass { reconcile: true } to fix it (about 2x slower)."))),!C&&r&&(p=Jc(o.element,r)),!A&&r&&sf(o.element,r,o.options),r&&(m=Je(o.element,r,f,d),af(o.element,r))}finally{T()}if(!F?.yielded||!n.tornSinceStart?.())break;F=null,mi(e.cache),n.styleMap=new Map,n.styleCache=new WeakMap,n.nodeMap=new Map,n.warnings=[]}if(n.slicer=null,o.clone=r,o.classCSS=i,o.styleCache=l,o.nodeMap=f,await pe("afterClone",o),!$n(h,"render"))return E(),null;if(F?.due()&&await F.pause(),Sr(o.clone),o.options?.excludeMode==="remove"||typeof o.options?.filter=="function"&&o.options.filterMode==="remove")try{cf(o.element,o.clone,o.styleCache,o.nodeMap)}catch(T){at(n,"shrink-failed","shrink pass failed",T),U(e,"Couldn't close the gaps left by removed elements.",T)}try{await gr(o.clone,o.element,o.nodeMap)}catch{}try{let T=n.styleMap;yr(T.keys(),T,o.nodeMap,o.options.__iconMatchers)}catch{}let N=T=>Promise.resolve().then(T),P=!a&&o.classCSS===i&&!o.clone?.querySelector("style"),_=(async()=>{await Promise.all([N(()=>$r(o.clone,o.options,n)),N(()=>Lr(o.element,o.clone,o.styleCache,o.options,o.nodeMap,P))]);try{Cf(o.element,o.clone,o.nodeMap)}catch(T){at(n,"backdrop-filter-failed","backdrop-filter emulation failed",T),U(e,"Couldn't reproduce a backdrop-filter; captured without it.",T)}if(e.compress){let T={session:n,clip:u,rootTransform:p};await N(()=>Fr(o.clone,o.options,o.nodeMap,T))}if(e.captureSelection)try{kc(o.nodeMap)}catch(T){at(n,"selection-compose-failed","field selection compose failed",T)}})(),O=Promise.resolve();(e.embedFonts==="auto"?((o.element.ownerDocument||document).fonts?.size||0)>0:e.embedFonts)&&(O=N(async()=>{let T=o.element.ownerDocument||document,L=M?q=>{try{let V=q.getBoundingClientRect();return V.right>=M.left-200&&V.left<=M.right+200&&V.bottom>=M.top-200&&V.top<=M.bottom+200}catch{return!0}}:null,{required:I,usedCodepoints:Z}=!M&&n.fontUsage||Ur(o.element,L),Q=I,j=I;if(e.embedFonts==="auto"){let{declared:q,drawn:V}=zr(T),gt=et=>Br(et).toLowerCase();if(Q=new Set(Array.from(I).filter(et=>V.has(gt(et)))),!Q.size)return;j=new Set(Array.from(I).filter(et=>V.has(gt(et))||!q.has(gt(et))))}K()&&await Hr(Q,Z,T),g=await Tf({required:j,usedCodepoints:Z,exclude:o.options.excludeFonts,localFonts:o.options.localFonts,useProxy:o.options.useProxy,fontStylesheetDomains:o.options.fontStylesheetDomains,iconMatchers:o.options.__iconMatchers,doc:T,debug:o.options.debug})})),await Promise.all([_,O]),E();let D=(o.options.plugins||[]).some(T=>T&&(typeof T.beforeRender=="function"||typeof T.afterRender=="function"));if(o.options.engine==="html-in-canvas"&&!D){let{tryCanvasEngine:T}=await Promise.resolve().then(()=>(iu(),ru));vr(o,g,y);let L=await T(o,o.options,n);if(L)return L}F?.due()&&await F.pause();let z=o.clone;Ar(z,n.compressedAssets);let $=await Kr(o,{clipWindow:u,outerTransforms:C,outerShadows:A,rootTransform2D:p,fontsCSS:g,universe:y,session:n,signatures:n.styleMap});if(n.compressedSnapshot=Mr(z,n.compressedAssets),n.retain)try{n.retain({clone:r,nodeMap:f,styleCache:l,styleMap:n.styleMap,classPrefixCSS:s,plainBg:P,fontsCSS:g,clipWindow:u,outerTransforms:C,outerShadows:A,rootTransform2D:p,marginZeroed:m,compressedAssets:n.compressedAssets,compressionDensity:n.compressionDensity})}catch{}return $}Kt();$t();At();var My=new Set(["png","jpeg","jpg","webp","svg"]);function au(t={}){let e=typeof t.type=="string"&&My.has(t.type.toLowerCase())?t.type.toLowerCase():null,n=t.format??e??"png";n==="jpg"&&(n="jpeg");let o=t.format!=null?n:e==="jpg"?"jpeg":e,r=Ea(t.cache),i=t.exclude==null?[]:Array.isArray(t.exclude)?t.exclude:[t.exclude],s=[],a=[];for(let u of i)if(typeof u=="string")try{document.createDocumentFragment().querySelector(u),s.push(u)}catch{U(t,`Invalid exclude selector "${u}"; ignored.`)}else typeof u=="function"?a.push(u):u!=null&&U(t,"Ignored an exclude entry: use a CSS selector or a function.",u);let l=t.excludeMode??"hide",f=u=>{if(!u||u.nodeType!==1)return!1;if(u.getAttribute("data-capture")==="exclude")return!0;for(let d of Array.isArray(c.exclude)?c.exclude:[])try{if(u.matches(d))return!0}catch{}for(let d of Array.isArray(c.excludePredicates)?c.excludePredicates:[])try{if(d(u))return!0}catch{}if(typeof c.filter=="function")try{if(!c.filter(u))return!0}catch{}return!1},c={debug:t.debug??!1,scale:t.scale??1,exclude:s,excludePredicates:a.length?a:null,excludeMode:l,filter:t.filter??null,filterMode:t.filterMode??"hide",shouldExclude:f,placeholders:t.placeholders!==!1,captureSelection:t.captureSelection??!1,canvas:be(t.canvas,"canvas")?t.canvas:null,embedFonts:t.embedFonts??"auto",iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],__iconMatchers:_c(t.iconFonts,t),localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:t.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(t.fontStylesheetDomains)?t.fontStylesheetDomains:[],fallbackURL:t.fallbackURL??void 0,cache:r,__styleShare:t.__styleShare,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:n,__explicitFormat:o,type:n,quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(n)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,reconcile:t.reconcile??!1,burst:t.burst,fast:t.fast===!1||t.fast==="auto"?t.fast:!0,engine:t.engine,invalidate:t.invalidate??!1,__pinned:t.__pinned===!0,__subpixel:t.__subpixel??null,clip:t.clip??null,compress:t.compress!==!1,excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1};return c}pt();At();Ot();Ot();ne();xt();Ve();Re();var lu="svg,iframe,canvas,video,audio,object,embed,slot,template,picture,style",cu=/(?:^|;)position:(?:absolute|fixed)(?:;|$)/;function Ay(t){try{return t.matches?.("dialog,[popover]")||!!t.querySelector?.("dialog,[popover]")}catch{return!0}}var Ey=/(?:^|;)\s*(?:-webkit-)?backdrop-filter:\s*(?!none(?:\s*!important)?(?:;|$))[^;]+/i;function Ry(t){if(t.usesBackdropFilter!==void 0)return t.usesBackdropFilter;let e=!1;for(let n of t.styleMap.values())if(Ey.test(n)){e=!0;break}return t.usesBackdropFilter=e,e}function Fy(t,e){let n=e.has("backdrop-filter")||e.has("-webkit-backdrop-filter");if(!n&&(n=(i=>/(?:^|;)\s*(?:-webkit-)?backdrop-filter\s*:/i.test(i.getAttribute?.("style")||""))(t),!n))try{n=!!t.querySelector?.('[style*="backdrop-filter" i]')}catch{n=!0}if(!n)return!1;let o=[t];t.querySelectorAll&&o.push(...t.querySelectorAll("*"));for(let r of o){let i=getComputedStyle(r),s=i.getPropertyValue("backdrop-filter")||i.getPropertyValue("-webkit-backdrop-filter");if(s&&s!=="none")return!0}return!1}var Ty=2*Go;function $y(t,e){if(t===e)return!0;if(!t.endsWith("px")||!e.endsWith("px")||t.includes(" ")||e.includes(" "))return!1;let n=parseFloat(t),o=parseFloat(e);return Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n-o)<=Ty}var Zr=new Map,Py=["width","height","min-width","min-height","top","right","bottom","left","margin-top","margin-right","margin-bottom","margin-left","grid-template-columns","grid-template-rows"];function Ny(t){let e=Zr.get(t);if(e===void 0){e=null;for(let n of Py){let o=t.match(new RegExp("(?:^|;)"+n+":([^;]+)"));o&&o[1].endsWith("px")&&((e||={})[n]=o[1])}Zr.size>5e3&&Zr.clear(),Zr.set(t,e)}return e}function Ly(t){if(!(!t.classList||!t.classList.length))for(let e of Array.from(t.classList))/^c\d+$/.test(e)&&t.classList.remove(e)}function _y(t,e){let n=[t];for(;n.length;){let o=n.pop();if(o.nodeType===1){let r=e.nodeMap.get(o);r!==void 0&&(e.nodeMap.delete(o),e.srcToClone.get(r)===o&&e.srcToClone.delete(r)),e.styleMap.delete(o)}for(let r=o.firstChild;r;r=r.nextSibling)n.push(r)}}function Iy(t,e){e.style.getPropertyValue(kt)==="nowrap"&&t.style.getPropertyValue(kt)!=="nowrap"&&e.parentElement?.style.getPropertyValue(kt)!=="nowrap"&&e.style.removeProperty(kt)}var Xs={attempts:0,served:0,reconciled:0};async function fu(t,e,n,o=null){Xs.attempts++;let r=e.retained,i=[];if(r?.clone&&r.nodeMap){r.clone.matches(En)&&i.push(t);for(let a of r.clone.querySelectorAll(En)){let l=r.nodeMap.get(a);l?.isConnected&&i.push(l)}}let s=i.length?yo(t,null,i):null;try{let a=await Oy(t,e,n,o);return a&&Xs.served++,a}catch{return null}finally{s?.()}}async function Oy(t,e,n,o){let r=e.retained;if(!r||!r.clone||!r.styleMap||!r.srcToClone||n.reconcile||n.clip||n.captureSelection||r.clipWindow||t.scrollTop||t.scrollLeft||Ay(t)||Ry(r)||r.fontsCSS||Gr(n))return null;for(let b of n.plugins||[])if(b&&(typeof b.beforeSnap=="function"||typeof b.beforeClone=="function"||typeof b.resolveNode=="function"||typeof b.afterClone=="function"))return null;if(r.classPrefixCSS&&(r.classPrefixCSS.includes("::marker")||r.classPrefixCSS.includes("::first-line"))||n.excludeMode==="remove")return null;let i=t.ownerDocument||document,s=ke(t);if(!s||Cl(i))return null;let a=[];t:for(let b of e.dirtyRoots){if(!b.isConnected||b===t||!t.contains(b))return null;for(let x of e.dirtyRoots)if(x!==b&&x!==t&&x.contains(b))continue t;a.push(b)}if(!a.length)return null;let l=r.marginZeroed;if(!l)return null;let f=a.filter(b=>!(cu.test(r.styleMap.get(r.srcToClone.get(b))||"")&&/^(?:absolute|fixed)$/.test(getComputedStyle(b).position)));if(f.length){if(f.some(x=>x.parentElement===t))return null;let b=Je(t,null);if(b.length!==l.length||b.some((x,v)=>x!==l[v]))return null}let c=l.indexOf(null),u=ie(n,r);u.animated=o;let d=[];for(let b of a){if(b.matches?.(lu)||b.querySelector?.(lu)||Fy(b,s))return null;let x=r.srcToClone.get(b);if(!x||!x.parentNode)return null;let v=new Map,C=mo(u,n,v),A=Vr(b,null),M=yo(b),k;try{k=await Ae(b,C,n)}finally{M(),A()}if(!k||k.nodeType!==1||k.querySelector?.("style[data-sd]")||(await An(b,k,C,n),C.pseudoCSS)||C.usesPlaceholder&&!r.classPrefixCSS?.includes("[data-sd-ph]"))return null;if(await Rr(k,n,v,{session:u,rootTransform:r.rootTransform2D}),await lr(k,C),l.length>1)for(let[S,E]of v){let R=l.indexOf(E);R!==-1&&(Rc&&(S.style.marginBottom="0px"))}Sr(k);try{await gr(k,b,v)}catch{}try{yr([k,...k.querySelectorAll("*")],r.styleMap,v,n.__iconMatchers)}catch{}if(await Promise.all([$r(k,n,u),Lr(b,k,r.styleCache,n,v,r.plainBg)]),n.compress)try{await Fr(k,n,v,{session:u,rootTransform:r.rootTransform2D})}catch{}for(let[S,E]of v.entries())Ls(S,E,v,r.styleCache);x.replaceWith(k),_y(x,r),d.push(k,...k.querySelectorAll("*"));for(let[S,E]of v.entries())r.nodeMap.set(S,E),r.srcToClone.set(E,S)}let y=mo(u,n,u.nodeMap),m=!1;for(let[b,x]of r.nodeMap.entries()){if(!x||x.nodeType!==1||!x.isConnected)continue;let v=r.styleMap.get(b);if(!v)continue;let C=Ny(v);if(!C)continue;let A=null,M=!1;for(let k in C){A||=getComputedStyle(x);let S=A.getPropertyValue(k);if(k==="min-width"&&(S==="auto"||S==="0px"&&C[k]!=="0px"&&A.display.startsWith("table")&&!cu.test(v))){let E=v.includes("box-sizing:border-box");S=rs(x,A,E)||os(A,E)||S}if(cn(k)){if(fn(S)!==C[k]){M=!0;break}continue}if(!$y(S,C[k])){M=!0;break}}if(!M&&!Zl(x,A||getComputedStyle(x))&&(M=!0),!M&&!C.width&&!C["min-width"]&&!Kl(x,A||getComputedStyle(x))&&(M=!0),M){if(u.compressedAssets?.has(b))return null;Xs.reconciled++;let k=x===t?b.style.cssText:null;if(Iy(x,b),d.push(b),await Et(x,b,y,n),k!==null&&b.style.cssText!==k)return null;l.includes(x)&&(m=!0)}}m&&Je(t,r.clone,r.nodeMap);let g=r.keyToClass,p=r.classCSS,h=!g;for(let b=0;!h&&b`.${x}{${b}}`).join(""));for(let b of h?r.styleMap.keys():d){let x=r.styleMap.get(b);x!==void 0&&(Ly(b),Ns(b,x,g))}if(ke(t)!==s)return null;Ar(r.clone,u.compressedAssets);let w=await Kr({element:t,options:n,plugins:n.plugins,clone:r.clone,classCSS:p,styleCache:r.styleCache,nodeMap:r.nodeMap},{clipWindow:null,outerTransforms:r.outerTransforms,outerShadows:r.outerShadows,rootTransform2D:r.rootTransform2D,fontsCSS:r.fontsCSS||"",universe:s,session:u,signatures:null});return u.compressedSnapshot=Mr(r.clone,u.compressedAssets),r.compressedAssets=u.compressedAssets,r.compressionDensity=u.compressionDensity,w?{url:w,session:u}:null}$t();pt();wt();var Ks=new WeakMap,ti=new WeakMap,vu=new WeakSet,Ys=new WeakMap,Wy=64,In=new Map,Cu=["scroll","input","change","focusin","focusout","pointerdown","pointerup","pointercancel","keydown","keyup","beforetoggle","toggle"],Dy=["(prefers-color-scheme: dark)","(prefers-reduced-motion: reduce)","(prefers-contrast: more)","(forced-colors: active)","(inverted-colors: inverted)","(prefers-reduced-transparency: reduce)","(hover: hover)","(any-hover: hover)","(pointer: coarse)","(any-pointer: coarse)","(color-gamut: p3)","(dynamic-range: high)"];function By(t){let e=t?.defaultView;return typeof e?.matchMedia!="function"?"":Dy.map(n=>{try{return e.matchMedia(n).matches?"1":"0"}catch{return"?"}}).join("")}function uu(t){let e=[];for(let n=t;n;){try{let o=n.getBoundingClientRect();e.push(o.x,o.y,o.width,o.height)}catch{e.push("?")}n.parentElement?n=n.parentElement:n=Ht(n)||null}return e.join("|")}function du(t,e){if(e.disposed)return;for(let[r,i]of In)r!==t&&!r.isConnected&&Zs(r,i);if(In.delete(t),In.set(t,e),In.size<=Wy)return;let[n,o]=In.entries().next().value;Zs(n,o)}function Zs(t,e){e.disposed=!0,In.delete(t),Ks.delete(t);for(let n of e.observers)try{n.disconnect()}catch{}for(let n of Cu)t.removeEventListener(n,e.onMediaDirty,!0);for(let n of e.trackedShadowRoots.keys())for(let o of Js)n.removeEventListener(o,e.onMediaDirty,!0);for(let[n,o]of e.trackedImages)n.removeEventListener("load",o),n.removeEventListener("error",o);e.trackedImages.clear(),e.trackedShadowRoots.clear(),e.images.length=0,e.controls.length=0,e.scrollNodes.length=0,e.observers.length=0,e.last=null,e.retained=null,e.retainedFrameDriven=!1}function ku(t){if(vu.has(t))return!1;ti.delete(t);let e=[t],n=[],o=[];for(let r=0;r=0&&e.observers.splice(s,1)}for(let r of o)if(!e.trackedShadowRoots.has(r))try{let i=new MutationObserver(e.markDirty);i.observe(r,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),i.__flush=e.markDirty,e.observers.push(i),e.trackedShadowRoots.set(r,i);for(let s of Js)r.addEventListener(s,e.onMediaDirty,{capture:!0,passive:!0});e.retained&&e.dirtyAll()}catch{}return!!n}var Js=["scroll","change","beforetoggle","toggle"];function ei(t,e){return[t,...e.trackedShadowRoots.keys()]}function Qs(t,e){let n=e.scannedImages;if(e.scannedImages=null,!n){n=[],t.tagName==="IMG"&&n.push(t);for(let o of ei(t,e))o.querySelectorAll&&n.push(...o.querySelectorAll("img"))}if(e.images=n,e.trackedImages.size){let o=new Set(n);for(let[r,i]of e.trackedImages)o.has(r)||(r.removeEventListener("load",i),r.removeEventListener("error",i),e.trackedImages.delete(r))}for(let o of n){if(o.complete||e.trackedImages.has(o))continue;let r=()=>{e.capturing&&(e.torn=!0),e.dirty=!0,e.dirtyRoots=null,o.removeEventListener("load",r),o.removeEventListener("error",r),e.trackedImages.delete(o)};e.trackedImages.set(o,r),o.addEventListener("load",r),o.addEventListener("error",r)}}function pu(t){let e=new Map,n=new Map,o=new Map;for(let r of t)if(gn(r))if(r.type==="attributes"){let i=e.get(r.target);i||e.set(r.target,i=new Map),i.has(r.attributeName)||i.set(r.attributeName,r.oldValue)}else if(r.type==="characterData")n.has(r.target)||n.set(r.target,r.oldValue);else if(r.type==="childList"){let i=o.get(r.target);i||o.set(r.target,i=new Map);for(let s of r.addedNodes){if(s.nodeType!==3)return!0;i.set(s.data,(i.get(s.data)||0)+1)}for(let s of r.removedNodes){if(s.nodeType!==3)return!0;i.set(s.data,(i.get(s.data)||0)-1)}}else return!0;for(let[r,i]of e)for(let[s,a]of i)if(r.getAttribute(s)!==a)return!0;for(let[r,i]of n)if(r.data!==i)return!0;for(let r of o.values())for(let i of r.values())if(i!==0)return!0;return!1}var zy=/(?:^data:image\/(?:gif|apng)|\.(?:gif|apng)(?=[?#)'"\s;]|$))/i,On=t=>t&&(typeof t=="object"||typeof t=="function")?Qr(t):"-";function Uy(t,e=131072){if(t=String(t||"").trim(),!/^data:/i.test(t))return"";let n=t.indexOf(",");if(n<0)return"";let o=t.slice(0,n),r=t.slice(n+1);try{if(/;base64/i.test(o)){let i=Math.ceil(e/3)*4;return atob(r.slice(0,i-i%4))}return r.slice(0,e*3).replace(/%([0-9a-f]{2})/gi,(i,s)=>String.fromCharCode(parseInt(s,16))).slice(0,e)}catch{return""}}function Hy(t){let e=(t.match(/^data:([^;,]+)/i)?.[1]||"").toLowerCase();if(e==="image/gif"||e==="image/apng")return!0;if(!/image\/(?:png|webp|avif|svg\+xml)/.test(e))return!1;let n=Uy(t);return e==="image/png"?n.includes("acTL"):e==="image/webp"?n.includes("ANIM")||n.includes("ANMF")||n.includes("VP8X")&&!!(n.charCodeAt(n.indexOf("VP8X")+8)&2):e==="image/avif"?n.includes("avis"):/<(?:animate|animateTransform|animateMotion|set)\b|@keyframes\b|animation(?:-name)?\s*:/i.test(n)}function hu(t){let e=String(t||"").trim();if(!e)return!1;let n=/^data:[^,]*;base64,/i.exec(e);return zy.test(n?n[0]:e)?!0:/^data:/i.test(e)?Hy(e):!1}function Wn(t){if(!t)return!1;let e=String(t);if(hu(e))return!0;if(/^\s*data:[^,]*;base64,/i.test(e)||!/url\(/i.test(e))return!1;for(let n of e.matchAll(/url\(\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^)]*))\s*\)/gi))if(hu(n[1]??n[2]??n[3]))return!0;return!1}function mu(t,e=null){let n=t&&t.clone;if(!n)return!1;let o=e?e.map(s=>t.srcToClone?.get(s)).filter(Boolean):[n],r=new Set,i=s=>{if(Wn(s.getAttribute?.("src"))||Wn(s.getAttribute?.("href"))||Wn(s.getAttribute?.("style")))return!0;let a=t.styleMap?.get(s);return!a||r.has(a)?!1:(r.add(a),Wn(a))};for(let s of o){if(s.nodeType===1&&i(s))return!0;let a;try{a=s.querySelectorAll("*")}catch{continue}for(let l of a)if(i(l))return!0}return!1}function ta(t,e){let n=[],o=new Set,r=i=>{i&&!o.has(i)&&(o.add(i),n.push(i))};t.matches?.("input,textarea,select,option")&&r(t);for(let i of ei(t,e))try{for(let s of i.querySelectorAll("input,textarea,select,option"))r(s)}catch{}e.controls=n}var Vy=/^(?:INPUT|TEXTAREA|SELECT)$/,Jr=/^(?:visible|clip)$/,jy=/(?:^|;)overflow(?:-[xy])?:(?!visible|clip)/;function ea(t,e){let n=[],o=e.retained,r=ei(t,e),i=r.length===1?El(t):null,s=!o&&!i&&!rt()&&!K(),a=(l,f=!1)=>{try{if(f){n.push(l);return}let c=Vy.test(l.tagName);if(o&&!c){let u=o.styleMap.get(o.srcToClone.get(l));if(u!==void 0&&!jy.test(u))return}if(s&&!Ri.has(l.localName)){let u=getComputedStyle(l);if(Jr.test(u.overflowX)&&Jr.test(u.overflowY))return}if(l.scrollLeft||l.scrollTop){n.push(l);return}if((l.scrollWidth>l.clientWidth||l.scrollHeight>l.clientHeight)&&(l.clientWidth||l.clientHeight||getComputedStyle(l).display!=="inline")){let u=c?null:getComputedStyle(l);(!u||!Jr.test(u.overflowX)||!Jr.test(u.overflowY))&&n.push(l)}}catch{}};for(let l=t;l;l=l.parentElement)a(l,!0);for(let l of r)try{for(let f of l.querySelectorAll(i||"*"))a(f)}catch{}e.scrollNodes=n}function gu(t,e){let n=t.ownerDocument||document,o=n.defaultView,r=[o?.location?.hash||"",By(n),o?.innerWidth||0,o?.innerHeight||0,o?.devicePixelRatio||1,o?.screen?.orientation?.type||""];try{r.push(...[...n.adoptedStyleSheets||[]].map(On))}catch{}for(let c of e.trackedShadowRoots.keys())try{r.push("#shadow",...[...c.adoptedStyleSheets||[]].map(On))}catch{}let i=n.activeElement,s=n.fullscreenElement;(i?.contains(t)||t.contains(i))&&r.push(On(i)),(s?.contains(t)||t.contains(s))&&r.push(On(s));let a=[o?.scrollX||0,o?.scrollY||0];for(let c of e.scrollNodes)a.push(c.scrollLeft||0,c.scrollTop||0);let l=[];for(let c of e.controls)na(c,l);let f=[];for(let c of e.images){let u="";try{u=c.currentSrc||c.src||""}catch{}f.push(u,c.complete?1:0,c.naturalWidth||0,c.naturalHeight||0)}return{style:r.join("|"),scroll:a.join("|"),controls:l,images:f,frameDriven:e.retainedFrameDriven}}function na(t,e){let n=String(t.localName||"").toLowerCase();n==="input"?e.push(t.type,Xn(t)?t.value.length:t.value,t.checked?1:0,t.indeterminate?1:0):n==="textarea"?e.push(t.value):n==="select"?e.push(t.selectedIndex,t.value):e.push(t.selected?1:0)}var yu=new WeakMap;function Au(t){let e=[];t.matches?.("input,textarea,select,option")&&na(t,e);for(let o of t.querySelectorAll?.("input,textarea,select,option")||[])na(o,e);let n=yu.get(t);yu.set(t,e),e.length&&(!n||n.length!==e.length||n.some((o,r)=>o!==e[r]))&&Zt(t)}function _n(t,e,n){if(!t)return!1;let o=t[n],r=e[n];if(o===r)return!0;if(!Array.isArray(o)||o.length!==r.length)return!1;for(let i=0;i[On(e),e.playState,Math.round((Number(e.currentTime)||0)*10),e.playbackRate].join(":")).join("|")}function Gy(t,e,n){if(!n||n.nodeType!==1)return null;if(n===t||t.contains(n))return t;for(let o of e.trackedShadowRoots.keys())if(o.contains(n))return o;return null}function qy(t){let e={dirty:!0,pending:[],torn:!1,dirtyRoots:new Set,retained:null,retainedFrameDriven:!1,disposed:!1,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedShadowRoots:new Map,trackedImages:new Map,images:[],scannedImages:null,scrollNodes:[],controls:[],envEpoch:yn(),styleEpoch:qe(),styleStamp:ro(t),outsideMutations:oo(t),geometry:null,renderState:null},n=()=>{e.dirty=!0,e.dirtyRoots=null},o=a=>{if(!e.dirtyRoots)return;let l=a&&(a.nodeType===1?a:a.parentElement);if(!l||l===t||!t.contains(l)||e.dirtyRoots.size>=12){e.dirtyRoots=null;return}e.dirtyRoots.add(l)},r=a=>{if(e.capturing){for(let l of a)e.pending.push(l);return}for(let l of a)gn(l)&&(e.dirty=!0,o(l.target))},i=()=>{if(e.capturing){e.torn=!0;return}n()};e.dirtyAll=n;try{let a=new MutationObserver(r);a.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),a.__flush=r,e.observers.push(a)}catch{}e.markDirty=r,e.onMediaDirty=i;try{for(let a of Cu)t.addEventListener(a,i,{capture:!0,passive:!0})}catch{}return Mu(t,e)||ta(t,e),ea(t,e),Qs(t,e),e}var Xy=0,xu=new WeakMap;function Qr(t){let e=xu.get(t);return e||(e="@"+ ++Xy,xu.set(t,e)),e}function oa(t,e){let n=typeof t;if(n==="undefined")return null;if(t===null||n==="boolean"||n==="number"||n==="string")return JSON.stringify(t);if(n==="function"||n==="symbol")return n==="symbol"?null:JSON.stringify(Qr(t));if(n!=="object")return null;if(typeof t.nodeType=="number")return JSON.stringify(Qr(t));if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let i=[];for(let s of t){let a=oa(s,e);if(a===null)return null;i.push(a)}return"["+i.join(",")+"]"}let o=Object.getPrototypeOf(t);if(o!==Object.prototype&&o!==null)return JSON.stringify(Qr(t));let r=[];for(let i of Object.keys(t).sort()){let s=t[i];if(s===void 0)continue;let a=oa(s,e);if(a===null)return null;r.push(JSON.stringify(i)+":"+a)}return"{"+r.join(",")+"}"}finally{e.delete(t)}}function Su(t,e){let{burst:n,invalidate:o,...r}=t||{};try{let i=oa(r,new Set);return i===null?null:`${(e||[]).map(On).join(",")}:${i}`}catch{return null}}function Eu(t,e,n,o,r=null){let i=Ks.get(t);i||(i=qy(t),i.baselineSignature=Su(e,n.plugins),Ks.set(t,i));let s=Su(e,n.plugins),a=async()=>{if(await _o(),i.disposed)return o();let f=s===null||s!==i.baselineSignature;f&&s!==null?i.pendingSig===s?(i.baselineSignature=s,i.last=null,i.dirty=!0,i.dirtyRoots=null,i.pendingSig=null,f=!1):i.pendingSig=s:i.pendingSig=null,Mu(t,i),ti.delete(t),Qs(t,i);for(let k of i.observers)k.__flush(k.takeRecords());oe();let c=oo(t);i.dirty&&i.outsideMutations!==c&&i.dirtyAll(),i.outsideMutations=c;let u=t.getRootNode?.(),d=[...i.trackedShadowRoots.keys()];u?.nodeType===11&&!d.includes(u)&&d.push(u),Jo(t.ownerDocument||document,d);let y=ro(t);i.styleStamp!==y&&(i.styleStamp=y,i.dirty||i.dirtyAll());let m=gu(t,i),g=bu(t,i);m.animation=wu(g),i.renderState&&(!_n(i.renderState,m,"style")&&(bn(),i.dirtyAll()),_n(i.renderState,m,"scroll")||i.dirtyAll(),_n(i.renderState,m,"controls")||(Zt(t),i.dirtyAll()),!_n(i.renderState,m,"images")&&!i.dirty&&i.dirtyAll());let p=yn();i.envEpoch!==p&&(i.dirtyAll(),i.envEpoch=p);let h=qe();if(i.styleEpoch!==h&&(i.styleEpoch=h,!i.dirty)){let k=uu(t);i.geometry!==null&&k!==i.geometry&&(Zt(t),i.dirtyAll()),i.geometry=k}n.invalidate&&i.dirtyAll();let w=!1,b=null,x=!!i.renderState&&!_n(i.renderState,m,"animation");try{let k=new Set;x&&g.length===0&&(k=null);for(let S of g){let E=S.playState==="running";if(!E&&!x)continue;E&&(w=!0),x=!0;let R=S.effect?.target;if(Gy(t,i,R)===t)k.add(R);else{k=null;break}}if(x&&k&&k.size&&i.retained){i.dirty=!0,b=k;for(let S of k)i.dirtyRoots&&i.dirtyRoots.add(S),Zt(S)}else x&&!k&&i.dirtyAll()}catch{}let v=m.frameDriven,C=w||v;if(C&&(i.last=null),v&&i.dirtyAll(),!f&&!C&&!i.dirty&&i.last)return du(t,i),i.last;i.capturing=!0;let A=null,M=null;try{let k=null,S=!1,E=null;if(!f&&i.dirty&&i.retained&&i.dirtyRoots&&i.dirtyRoots.size&&r){E=[...i.dirtyRoots];let R=await fu(t,i,n,nr(g));R&&(k=await r(R.url,R.session),S=!0)}if(k||(M=ie(n),f||(M.retain=R=>{let F=new Map;for(let[N,P]of R.nodeMap.entries())F.set(P,N);A={...R,srcToClone:F,usesBackdropFilter:void 0}}),M.tornSinceStart=()=>{for(let R of i.observers)for(let F of R.takeRecords())i.pending.push(F);return oe(),i.torn||pu(i.pending)||oo(t)!==c},k=await o(M)),!f&&!i.disposed){if(i.dirty=!1,i.dirtyRoots=new Set,A)i.retained=A,i.retainedFrameDriven=mu(A),ta(t,i),ea(t,i);else if(S){i.retainedFrameDriven||=mu(i.retained,E),ta(t,i),ea(t,i);for(let P of b||[])Zt(P)}let R=gu(t,i);R.animation=wu(bu(t,i));let F=["style","scroll","controls","images"];w||F.push("animation");let N=F.every(P=>_n(m,R,P));i.renderState=R,i.styleEpoch=qe(),i.styleStamp=ro(t),i.geometry=uu(t),i.renderState.frameDriven?(vu.add(t),Zs(t,i)):N?!C&&!i.renderState.frameDriven&&(i.last=k,du(t,i)):(i.dirtyAll(),i.last=null)}return k}finally{M&&(M.retain=null,M.tornSinceStart=null);for(let S of i.observers)for(let E of S.takeRecords())i.pending.push(E);oe();let k=oo(t);(i.torn||pu(i.pending)||k!==c)&&(i.dirtyAll(),i.last=null),i.outsideMutations=k,i.styleEpoch=qe(),i.styleStamp=ro(t),i.pending.length=0,i.torn=!1,i.capturing=!1,i.disposed||Qs(t,i)}},l=i.inflight.then(a,a);return i.inflight=l.catch(()=>{}),l}var ni=null;function Tu(t){ni=t}var Yy='button, a[href], [role="button"], input, select, summary, label, [tabindex]',ra=!1,Ao=null,ia=new WeakMap,Ru=!1;function $u(t,e){!ra||!Ao||e&&e.burst===!1||ia.set(Ao.control,{element:t,options:e&&typeof e=="object"?{...e}:e})}function Pu(t){let e={control:t};Ao=e,setTimeout(()=>{Ao===e&&(Ao=null)},0)}function aa(t){let e=t.target,n=e&&(e.nodeType===1?e:e.parentElement);return n&&n.closest?n.closest(Yy):null}function Fu(t){if(t.type==="keydown"&&t.key!=="Enter"&&t.key!==" ")return;let e=aa(t);e&&(Pu(e),sa(t,!1))}function Ky(t){let e=aa(t);e&&Pu(e)}function sa(t,e=!0){if(!ni||document.visibilityState==="hidden")return;let n=aa(t);if(!n||t.type==="pointerenter"&&t.target!==n)return;let o=ia.get(n);if(o){if(!o.element.isConnected){ia.delete(n);return}ni(o.element,o.options).catch(()=>{});return}e&&!Ru&&(Ru=!0,ni(document.body,{clip:"viewport",burst:!1}).catch(()=>{}))}function Nu(){if(ra||typeof document>"u"||typeof document.addEventListener!="function")return;ra=!0;let t={capture:!0,passive:!0};document.addEventListener("pointerdown",Fu,t),document.addEventListener("keydown",Fu,t),document.addEventListener("click",Ky,t),document.addEventListener("pointerenter",sa,t),document.addEventListener("focusin",sa,t)}wt();$t();function xb(...t){return Bs(...t),lt}async function Sb(t,e){if(typeof t!="string"||!t.trim())throw new Error("[SnapDOM] fromString() needs an HTML string.");let n=document.createElement("div");it(n),n.style.cssText="position:fixed;left:-99999px;top:0;pointer-events:none;",n.innerHTML=t,document.body.appendChild(n);try{await Pt();let o=Array.from(n.childNodes).some(i=>i.nodeType===3&&i.textContent.trim()),r=n.children.length===1&&!o?n.firstElementChild:n;return await va(r,{...e||{},burst:!1})}finally{n.remove()}}var vb="3.9.0",lt=Object.assign(va,{plugins:xb,fromString:Sb,version:vb,preCapture:Nu});Tu(va);var Sa=Symbol("snapdom.internal"),id=new Set(["png","jpeg","jpg","webp","svg"]);async function va(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");let n=au(e);n.element=t,n.invalidate&&bn(),Bf(n,e&&e.plugins);let{stage:o,loweredBy:r}=If(n);n.needs=o,n.__needsLoweredBy=r;let i=$n(o,"render"),s=n.burst===!0||!Gr(n),a=typeof n.filter=="function"||!!n.excludePredicates||typeof n.excludeStyleProps=="function"||typeof n.fallbackURL=="function",f=i&&!n.captureSelection&&n.burst!==!1&&s&&!a&&ku(t);return f&&$u(t,e),n.snap||(n.snap={toPng:(c,u)=>lt.toPng(c,u),toSvg:(c,u)=>lt.toSvg(c,u)}),f?Eu(t,e,n,c=>lt.capture(t,n,Sa,c),(c,u)=>ad(c,n,u)):(await _o(),Au(t),lt.capture(t,n,Sa))}lt.capture=async(t,e,n,o=ie(e))=>{if(n!==Sa)throw new Error("[SnapDOM] snapdom.capture() is internal; use snapdom(el).");if($n(e.needs||_t,"render")&&K()){if(e.embedFonts)try{let s=t.ownerDocument||document,a=null;if(e.embedFonts==="auto"&&(t.getBoundingClientRect(),a=zr(s).drawn,a.size===0))throw null;let l=Ur(t);e.clip||(o.fontUsage=l);let f=l.required;if(a&&(f=new Set([...f].filter(c=>a.has(Br(c).toLowerCase()))),f.size===0))throw null;await Hr(f,l.usedCodepoints,s)}catch{}let i=Array.from(t.querySelectorAll("canvas"));t.tagName==="CANVAS"&&i.unshift(t);for(let s of i)try{if(po(s))continue;let a=s.getContext("2d",{willReadFrequently:!0});a&&a.getImageData(0,0,1,1)}catch(a){U(e,"Couldn't prepare canvases for Safari.",a)}}let r=await su(t,e,o);return ad(r,e,o)};var sd=Symbol("editSvg");async function ad(t,e,n){let o=e.needs||_t,r=$n(o,"render"),i=$=>Wf(o,e.__needsLoweredBy||[],$),s=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,a=s?null:t,l=()=>a??=s.toDataURL(),f=s||t;s&&(t="");let c=n.compressedSnapshot,u=n.compressionDensity;n.compressedAssets=null;let d,y=e.meta||{},g=(Number.isFinite(e.width)||Number.isFinite(e.height))&&!K(),p=g?Number.isFinite(e.width)?y.targetW/y.vbW:y.targetH/y.vbH:1,h=g?Number.isFinite(e.height)?y.targetH/y.vbH:y.targetW/y.vbW:1,w=async $=>{let T=await b($),L=$[sd];if(typeof L!="function"||typeof T!="string")return T;let{isSvgDataURL:I,decodeSvgFromDataURL:Z,encodeSvgToDataURL:Q}=await Promise.resolve().then(()=>(Fo(),Lu));if(!I(T))return T;let j=await L(Z(T));return typeof j=="string"&&j?Q(j):T},b=async $=>{if(s||!c?.size)return f;let T=y.vbW,L=y.vbH,I=$.crop;I&&(T=Math.max(1,Math.min(T,I.x+I.width)-Math.max(0,I.x)),L=Math.max(1,Math.min(L,I.y+I.height)-Math.max(0,I.y)));let Z=Number.isFinite($.width),Q=Number.isFinite($.height);return(Z&&Q?Math.max($.width/T,$.height/L):Z?$.width/T*(I?Math.max(1,h/p):1):Q?$.height/L*(I?Math.max(1,p/h):1):($.scale||1)*Math.max(p,h))*($.dpr||1)<=u?f:d??=gf(l(),c)},x={warnings:n.warnings,layoutZoom:n.layoutZoom,fileSvg:n.fileSvg},v=n.artifacts,C=async($,T)=>{let{rasterize:L}=await Promise.resolve().then(()=>(Hn(),$o));return L(f,{...$,...T||{},format:"png"},x)},A=()=>{if(!r)throw i("svgString");if(s)throw new Error("[SnapDOM] html-in-canvas makes a raster capture; there is no SVG string.");let $=t.indexOf(",");return $>=0?Lo(decodeURIComponent(t.slice($+1)),x.fileSvg):""},M=$=>Object.defineProperty({...$||{},svgString:A},"url",r?{get:l,enumerable:!0}:{get(){throw i("export.url")},enumerable:!1,configurable:!0}),k={img:async($,T)=>{if(s)return C($,T);let{toImg:L}=await Promise.resolve().then(()=>(ya(),ga)),I={...$,...T||{}};return L(await w(I),I,x)},svg:async($,T)=>{if(s)return C($,T);let{toSvg:L}=await Promise.resolve().then(()=>(ya(),ga)),I={...$,...T||{}};return L(await w(I),I,x)},canvas:async($,T)=>{let{toCanvas:L}=await Promise.resolve().then(()=>(Un(),Uu)),I={...$,...T||{}};return L(await w(I),I,x)},blob:async($,T)=>{let{toBlob:L}=await Promise.resolve().then(()=>(xa(),ed)),I={...$,...T||{}};return L(await w(I),I,x)},png:async($,T)=>{let{rasterize:L}=await Promise.resolve().then(()=>(Hn(),$o)),I={...$,...T||{},format:"png"};return L(await w(I),I,x)},jpeg:async($,T)=>{let{rasterize:L}=await Promise.resolve().then(()=>(Hn(),$o)),I={...$,...T||{},format:"jpeg"};return L(await w(I),I,x)},webp:async($,T)=>{let{rasterize:L}=await Promise.resolve().then(()=>(Hn(),$o)),I={...$,...T||{},format:"webp"};return L(await w(I),I,x)},download:async($,T)=>{let{download:L}=await Promise.resolve().then(()=>(rd(),od)),I={...$,...T||{}};return L(await w(I),I,x)}};if(!r)for(let $ of Object.keys(k)){let T=$==="download"?"download()":`to${$.charAt(0).toUpperCase()}${$.slice(1)}()`;k[$]=async()=>{throw i(T)}}let S={};for(let $ of["img","svg","canvas","blob","png","jpeg","webp"])S[$]=async T=>{let L=_($,T||{});return delete L.editSvg,typeof T?.editSvg=="function"&&(L[sd]=T.editSvg),k[$](e,L)};S.jpg=S.jpeg,Object.defineProperty(S,"editSvg",{value:!0});let E=$=>Object.defineProperty({...e,...$},"options",{value:e,configurable:!0}),R=E({artifacts:v,export:M(),exports:S}),F=await jr("defineExports",R),N=Object.assign({},...F.filter($=>$&&typeof $=="object").reverse()),P={...k,...N};P.jpeg&&!P.jpg&&(P.jpg=($,T)=>P.jpeg($,T));function _($,T){let L=T||{},I={...e,...L},Z=typeof L.type=="string"?L.type.toLowerCase():"",Q=typeof L.format=="string"?L.format.toLowerCase():id.has(Z)?Z:"";Q&&(I.format=Q==="jpg"?"jpeg":Q),I.__explicitFormat=Q?I.format:e.__explicitFormat??null,$==="blob"&&!I.__explicitFormat&&(I.format=s?"png":"svg"),I.type=I.format;let j=V=>V==="jpeg"||V==="jpg"||V==="webp";return[$,I.format,Z].map(V=>typeof V=="string"?V.toLowerCase():"").find(j)&&(I.backgroundColor==null||I.backgroundColor==="transparent")&&(I.backgroundColor="#ffffff"),I.scale!==1&&(Number.isFinite(I.width)||Number.isFinite(I.height))&&U(I,"scale ignored: width/height already set the size."),I}let O=!1,B=Promise.resolve();async function D($,T){let L=Object.freeze(T&&typeof T=="object"?{...T}:{}),I=async()=>{let Q=P[$];if(!Q)throw new Error(`[SnapDOM] Unknown export type: ${$}`);let j=_($,L),q=E({artifacts:v,export:M({type:$,options:j,requestedOptions:L})}),V=j.format,gt=j.type;await jr("beforeExport",q,{format:$,options:j});let et=j.format!==V?j.format:j.type!==gt?j.type:"",ht=typeof et=="string"?et.toLowerCase():"";id.has(ht)&&(j.format=ht==="jpg"?"jpeg":ht,j.type=j.format,j.__explicitFormat=j.format,/^(?:jpeg|webp)$/.test(j.format)&&(j.backgroundColor==null||j.backgroundColor==="transparent")&&(j.backgroundColor="#ffffff"));let Rt=await Q(q,j);return await jr("afterExport",q,{format:$,options:j,result:Rt}),O||(O=!0,await pe("afterSnap",e)),Rt},Z=B.then(I);return B=Z.catch(()=>{}),Z}let z={url:t,needs:o,warnings:x.warnings||[],toRaw:()=>{if(!r)throw i("toRaw()");return l()},to:($,T)=>D($,T),toImg:$=>D("img",$),toSvg:$=>D("svg",$),toCanvas:$=>D("canvas",$),toBlob:$=>D("blob",$),toPng:$=>D("png",$),toJpg:$=>D("jpg",$),toWebp:$=>D("webp",$),download:$=>D("download",$)};r?s&&Object.defineProperty(z,"url",{get:l,enumerable:!0,configurable:!0}):Object.defineProperty(z,"url",{get(){throw i("url")},enumerable:!1,configurable:!0}),Object.defineProperty(z,"meta",r?{value:e.meta,enumerable:!0}:{get(){throw i("meta")},enumerable:!1,configurable:!0});for(let $ of Object.keys(P)){let T="to"+$.charAt(0).toUpperCase()+$.slice(1);z[T]||(z[T]=L=>D($,L))}return z}lt.toRaw=(t,e)=>lt(t,e).then(n=>n.toRaw());lt.toImg=(t,e)=>lt(t,e).then(n=>n.toImg());lt.toSvg=(t,e)=>lt(t,e).then(n=>n.toSvg());lt.toCanvas=(t,e)=>lt(t,e).then(n=>n.toCanvas());lt.toBlob=(t,e)=>lt(t,e).then(n=>n.toBlob());lt.toPng=(t,e)=>lt(t,{...e,format:"png"}).then(n=>n.toPng());lt.toJpg=(t,e)=>lt(t,{...e,format:"jpeg"}).then(n=>n.toJpg());lt.toWebp=(t,e)=>lt(t,{...e,format:"webp"}).then(n=>n.toWebp());lt.download=(t,e)=>lt(t,e).then(n=>n.download());export{_t as DEFAULT_STAGE,Tn as STAGES,Of as assertNeeds,Ig as clearPlugins,zs as getGlobalPlugins,Nn as normalizePlugin,Bs as registerPlugins,lt as snapdom};