@zumer/snapdom 2.0.0-dev.2 → 2.0.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/snapdom.js +718 -561
- package/dist/snapdom.min.js +8 -8
- package/dist/snapdom.min.mjs +8 -8
- package/dist/snapdom.mjs +711 -554
- package/package.json +1 -1
package/dist/snapdom.min.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(()=>{var kn=Object.defineProperty,An=Object.defineProperties;var Mn=Object.getOwnPropertyDescriptors;var Se=Object.getOwnPropertySymbols;var vn=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable;var Gt=Math.pow,Ce=(t,e,n)=>e in t?kn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))vn.call(e,n)&&Ce(t,n,e[n]);if(Se)for(var n of Se(e))En.call(e,n)&&Ce(t,n,e[n]);return t},W=(t,e)=>An(t,Mn(e));var k=(t,e,n)=>new Promise((o,s)=>{var r=i=>{try{f(n.next(i))}catch(l){s(l)}},a=i=>{try{f(n.throw(i))}catch(l){s(l)}},f=i=>i.done?o(i.value):Promise.resolve(i.value).then(r,a);f((n=n.apply(t,e)).next())});var x={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}};function Rt(t="soft"){switch(x.session.__counterEpoch=(x.session.__counterEpoch||0)+1,t){case"auto":{x.session.styleMap=new Map,x.session.nodeMap=new Map;return}case"soft":{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap,x.computedStyle=new WeakMap,x.baseStyle=new Map,x.defaultStyle=new Map,x.image=new Map,x.background=new Map,x.resource=new Map,x.font=new Set;return}default:{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap;return}}}function ht(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function Qt(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,o)=>{let s=o.split(",").map(r=>r.trim());return s.length!==6?`matrix(${o})`:(s[4]="0",s[5]="0",`matrix(${s.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,o)=>{let s=o.split(",").map(r=>r.trim());return s.length!==16?`matrix3d(${o})`:(s[12]="0",s[13]="0",`matrix3d(${s.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function dt(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch(e){return t}}function Fn(t="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let o=new Map,s=0;function r(a,f,i){if(s>=n)return;let l=Date.now();(o.get(f)||0)>l||(o.set(f,l+e),s++,a==="warn"&&console&&console.warn?console.warn(`${t} ${i}`):console&&console.error&&console.error(`${t} ${i}`))}return{warnOnce(a,f){r("warn",a,f)},errorOnce(a,f){r("error",a,f)},reset(){o.clear(),s=0}}}var ke=Fn("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),Jt=new Map,Tt=new Map;function $n(t){return/^data:|^blob:|^about:blank$/i.test(t)}function In(t,e){try{let n=typeof location!="undefined"&&location.href?location.href:"http://localhost/",o=e.includes("{url}")?e.split("{url}")[0]:e,s=new URL(o||".",n),r=new URL(t,n);if(r.origin===s.origin)return!0;let a=r.searchParams;if(a&&(a.has("url")||a.has("target")))return!0}catch(n){}return!1}function Ln(t,e){if(!e||$n(t)||In(t,e))return!1;try{let n=typeof location!="undefined"&&location.href?location.href:"http://localhost/",o=new URL(t,n);return typeof location!="undefined"?o.origin!==location.origin:!0}catch(n){return!!e}}function Nn(t,e){if(!e)return t;if(e.includes("{url}"))return e.replace("{urlRaw}",dt(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}${dt(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function Ae(t){return new Promise((e,n)=>{let o=new FileReader;o.onload=()=>e(String(o.result||"")),o.onerror=()=>n(new Error("read_failed")),o.readAsDataURL(t)})}function Rn(t,e){var n,o;return[e.as||"blob",(n=e.timeout)!=null?n:3e3,e.useProxy||"",(o=e.errorTTL)!=null?o:8e3,t].join("|")}function X(n){return k(this,arguments,function*(t,e={}){var y,w,C;let o=(y=e.as)!=null?y:"blob",s=(w=e.timeout)!=null?w:3e3,r=e.useProxy||"",a=(C=e.errorTTL)!=null?C:8e3,f=e.headers||{},i=!!e.silent;if(/^data:/i.test(t))try{if(o==="text")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1};if(o==="dataURL")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1,mime:String(t).slice(5).split(";")[0]||""};let[,S="",v=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],E=/;base64/i.test(S)?atob(v):decodeURIComponent(v),A=new Uint8Array([...E].map(L=>L.charCodeAt(0))),N=new Blob([A],{type:(S||"").split(";")[0]||""});return{ok:!0,data:N,status:200,url:t,fromCache:!1,mime:N.type||""}}catch(S){return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let S=yield fetch(t);if(!S.ok)return{ok:!1,data:null,status:S.status,url:t,fromCache:!1,reason:"http_error"};let v=yield S.blob(),b=v.type||S.headers.get("content-type")||"";return o==="dataURL"?{ok:!0,data:yield Ae(v),status:S.status,url:t,fromCache:!1,mime:b}:o==="text"?{ok:!0,data:yield v.text(),status:S.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:v,status:S.status,url:t,fromCache:!1,mime:b}}catch(S){return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return o==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:o==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let l=Rn(t,{as:o,timeout:s,useProxy:r,errorTTL:a}),h=Tt.get(l);if(h&&h.until>Date.now())return W($({},h.result),{fromCache:!0});h&&Tt.delete(l);let d=Jt.get(l);if(d)return d;let p=Ln(t,r)?Nn(t,r):t,u=e.credentials;if(!u)try{let S=typeof location!="undefined"&&location.href?location.href:"http://localhost/",v=new URL(t,S);u=typeof location!="undefined"&&v.origin===location.origin?"include":"omit"}catch(S){u="omit"}let g=new AbortController,c=setTimeout(()=>g.abort("timeout"),s),m=k(null,null,function*(){var S,v;try{let b=yield fetch(p,{signal:g.signal,credentials:u,headers:f});if(!b.ok){let N={ok:!1,data:null,status:b.status,url:p,fromCache:!1,reason:"http_error"};if(a>0&&Tt.set(l,{until:Date.now()+a,result:N}),!i){let L=`${b.status} ${b.statusText||""}`.trim();ke.warnOnce(`http:${b.status}:${o}:${new URL(t,(S=location==null?void 0:location.href)!=null?S:"http://localhost/").origin}`,`HTTP error ${L} while fetching ${o} ${t}`)}return e.onError&&e.onError(N),N}if(o==="text")return{ok:!0,data:yield b.text(),status:b.status,url:p,fromCache:!1};let E=yield b.blob(),A=E.type||b.headers.get("content-type")||"";return o==="dataURL"?{ok:!0,data:yield Ae(E),status:b.status,url:p,fromCache:!1,mime:A}:{ok:!0,data:E,status:b.status,url:p,fromCache:!1,mime:A}}catch(b){let E=b&&typeof b=="object"&&"name"in b&&b.name==="AbortError"?String(b.message||"").includes("timeout")?"timeout":"abort":"network",A={ok:!1,data:null,status:0,url:p,fromCache:!1,reason:E};if(!/^blob:/i.test(t)&&a>0&&Tt.set(l,{until:Date.now()+a,result:A}),!i){let N=`${E}:${o}:${new URL(t,(v=location==null?void 0:location.href)!=null?v:"http://localhost/").origin}`,L=E==="timeout"?`Timeout after ${s}ms. Consider increasing timeout or using a proxy for ${t}`:E==="abort"?`Request aborted while fetching ${o} ${t}`:`Network/CORS issue while fetching ${o} ${t}. A proxy may be required`;ke.errorOnce(N,L)}return e.onError&&e.onError(A),A}finally{clearTimeout(c),Jt.delete(l)}});return Jt.set(l,m),m})}function pt(n){return k(this,arguments,function*(t,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let s=ht(t);if(!s)return t;let r=dt(s);if(x.background.has(r)){let a=x.background.get(r);return a?`url("${a}")`:"none"}try{let a=yield X(r,{as:"dataURL",useProxy:e.useProxy});return a.ok?(x.background.set(r,a.data),`url("${a.data}")`):(x.background.set(r,null),"none")}catch(a){return x.background.set(r,null),"none"}})}var Pt=new Set(["meta","script","noscript","title","link","template"]),xt=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),Tn=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];function Zt(){for(let t of Tn){let e=String(t).toLowerCase();Pt.has(e)||xt.has(e)||te(e)}}function te(t){if(t=String(t).toLowerCase(),xt.has(t)){let r={};return x.defaultStyle.set(t,r),r}if(x.defaultStyle.has(t))return x.defaultStyle.get(t);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t);n.style.all="initial",e.appendChild(n);let o=getComputedStyle(n),s={};for(let r of o){if(Me(r))continue;let a=o.getPropertyValue(r);s[r]=a}return e.removeChild(n),x.defaultStyle.set(t,s),s}var Pn=/(?:^|-)(animation|transition)(?:-|$)/i,_n=/^(--|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,Wn=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"]);function Me(t){let e=String(t).toLowerCase();return!!(Wn.has(e)||_n.test(e)||Pn.test(e))}function St(t,e){if(e=String(e||"").toLowerCase(),xt.has(e))return"";let n=[],o=te(e);for(let[s,r]of Object.entries(t)){if(Me(s))continue;let a=o[s];r&&r!==a&&n.push(`${s}:${r}`)}return n.sort(),n.join(";")}function ee(t){let e=new Set;return t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(t.tagName&&e.add(t.tagName.toLowerCase()),typeof t.querySelectorAll=="function"&&t.querySelectorAll("*").forEach(n=>e.add(n.tagName.toLowerCase())),Array.from(e))}function ne(t){let e=new Map;for(let o of t){let s=x.defaultStyle.get(o);if(!s)continue;let r=Object.entries(s).map(([a,f])=>`${a}:${f};`).sort().join("");r&&(e.has(r)||e.set(r,[]),e.get(r).push(o))}let n="";for(let[o,s]of e.entries())n+=`${s.join(",")} { ${o} }
|
|
2
|
-
`;return n}function
|
|
3
|
-
`});let n=t.adoptedStyleSheets||[];for(let
|
|
4
|
-
`}catch(s){}}catch(n){}return e}function
|
|
5
|
-
`:""}function so(t){t&&(t.nodeType===Node.ELEMENT_NODE&&t.setAttribute("data-sd-slotted",""),t.querySelectorAll&&t.querySelectorAll("*").forEach(e=>e.setAttribute("data-sd-slotted","")))}function ao(t,e=3){return k(this,null,function*(){let n=()=>{var r;try{return t.contentDocument||((r=t.contentWindow)==null?void 0:r.document)||null}catch(a){return null}},o=n(),s=0;for(;s<e&&(!o||!o.body&&!o.documentElement);)yield new Promise(r=>setTimeout(r,0)),o=n(),s++;return o&&(o.body||o.documentElement)?o:null})}function io(t){let e=t.getBoundingClientRect(),n=0,o=0,s=0,r=0;try{let i=getComputedStyle(t);n=parseFloat(i.borderLeftWidth)||0,o=parseFloat(i.borderRightWidth)||0,s=parseFloat(i.borderTopWidth)||0,r=parseFloat(i.borderBottomWidth)||0}catch(i){}let a=Math.max(0,Math.round(e.width-(n+o))),f=Math.max(0,Math.round(e.height-(s+r)));return{contentWidth:a,contentHeight:f,rect:e}}function co(t,e,n){let o=t.createElement("style");return o.setAttribute("data-sd-iframe-pin",""),o.textContent=`html, body {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;}`,(t.head||t.documentElement).appendChild(o),()=>{try{o.remove()}catch(s){}}}function lo(t,e,n){return k(this,null,function*(){let o=yield ao(t,3);if(!o)throw new Error("iframe document not accessible/ready");let{contentWidth:s,contentHeight:r,rect:a}=io(t),f=n==null?void 0:n.snap;if(!f||typeof f.toPng!="function")throw new Error("snapdom.toPng not available in iframe or window");let i=W($({},n),{scale:1}),l=co(o,s,r),h;try{h=yield f.toPng(o.documentElement,i)}finally{l()}h.style.display="block",h.style.width=`${s}px`,h.style.height=`${r}px`;let d=document.createElement("div");return e.nodeMap.set(d,t),yt(t,d,e,n),d.style.overflow="hidden",d.style.display="block",d.style.width||(d.style.width=`${Math.round(a.width)}px`),d.style.height||(d.style.height=`${Math.round(a.height)}px`),d.appendChild(h),d})}function Et(t,e,n){return k(this,null,function*(){var l,h,d,p,u,g;if(!t)throw new Error("Invalid node");let o=new Set,s=null,r=null;if(t.nodeType===Node.ELEMENT_NODE){let c=(t.localName||t.tagName||"").toLowerCase();if(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox")||Pt.has(c))return null}if(t.nodeType===Node.TEXT_NODE||t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide"){let c=document.createElement("div"),m=t.getBoundingClientRect();return c.style.cssText=`display:inline-block;width:${m.width}px;height:${m.height}px;visibility:hidden;`,c}else if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let c of n.exclude)try{if((l=t.matches)!=null&&l.call(t,c)){if(n.excludeMode==="hide"){let m=document.createElement("div"),y=t.getBoundingClientRect();return m.style.cssText=`display:inline-block;width:${y.width}px;height:${y.height}px;visibility:hidden;`,m}else if(n.excludeMode==="remove")return null}}catch(m){console.warn(`Invalid selector in exclude option: ${c}`,m)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide"){let c=document.createElement("div"),m=t.getBoundingClientRect();return c.style.cssText=`display:inline-block;width:${m.width}px;height:${m.height}px;visibility:hidden;`,c}else if(n.filterMode==="remove")return null}}catch(c){console.warn("Error in filter function:",c)}if(t.tagName==="IFRAME"){let c=!1;try{c=!!(t.contentDocument||(h=t.contentWindow)!=null&&h.document)}catch(m){c=!1}if(c)try{return yield lo(t,e,n)}catch(m){console.warn("[SnapDOM] iframe rasterization failed, fallback:",m)}if(n.placeholders){let m=document.createElement("div");return m.style.cssText=`width:${t.offsetWidth}px;height:${t.offsetHeight}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;`,yt(t,m,e,n),m}else{let m=t.getBoundingClientRect(),y=document.createElement("div");return y.style.cssText=`display:inline-block;width:${m.width}px;height:${m.height}px;visibility:hidden;`,yt(t,y,e,n),y}}if(t.getAttribute("data-capture")==="placeholder"){let c=t.cloneNode(!1);e.nodeMap.set(c,t),yt(t,c,e,n);let m=document.createElement("div");return m.textContent=t.getAttribute("data-placeholder-text")||"",m.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",c.appendChild(m),c}if(t.tagName==="CANVAS"){let c="";try{let y=t.getContext("2d",{willReadFrequently:!0});try{y&&y.getImageData(0,0,1,1)}catch(w){}if(yield new Promise(w=>requestAnimationFrame(w)),c=t.toDataURL("image/png"),!c||c==="data:,"){try{y&&y.getImageData(0,0,1,1)}catch(w){}if(yield new Promise(w=>requestAnimationFrame(w)),c=t.toDataURL("image/png"),!c||c==="data:,"){let w=document.createElement("canvas");w.width=t.width,w.height=t.height;let C=w.getContext("2d");C&&(C.drawImage(t,0,0),c=w.toDataURL("image/png"))}}}catch(y){}let m=document.createElement("img");try{m.decoding="sync",m.loading="eager"}catch(y){}c&&(m.src=c),m.width=t.width,m.height=t.height;try{let y=getComputedStyle(t);y.width&&(m.style.width=y.width),y.height&&(m.style.height=y.height)}catch(y){}return e.nodeMap.set(m,t),yt(t,m,e,n),m}let a;try{if(a=t.cloneNode(!1),Le(t,a),e.nodeMap.set(a,t),t.tagName==="IMG"){eo(t,a);try{let c=t.getBoundingClientRect(),m=Math.round(c.width||0),y=Math.round(c.height||0);if(!m||!y){let w=window.getComputedStyle(t),C=parseFloat(w.width)||0,S=parseFloat(w.height)||0,v=parseInt(t.getAttribute("width")||"",10)||0,b=parseInt(t.getAttribute("height")||"",10)||0,E=t.width||t.naturalWidth||0,A=t.height||t.naturalHeight||0;m=Math.round(m||C||v||E||0),y=Math.round(y||S||b||A||0)}m&&(a.dataset.snapdomWidth=String(m)),y&&(a.dataset.snapdomHeight=String(y))}catch(c){}}}catch(c){throw console.error("[Snapdom] Failed to clone node:",t,c),c}if(t instanceof HTMLTextAreaElement){let c=t.getBoundingClientRect();a.style.width=`${c.width}px`,a.style.height=`${c.height}px`}if(t instanceof HTMLInputElement&&(a.value=t.value,a.setAttribute("value",t.value),t.checked!==void 0&&(a.checked=t.checked,t.checked&&a.setAttribute("checked",""),t.indeterminate&&(a.indeterminate=t.indeterminate))),t instanceof HTMLSelectElement&&(s=t.value),t instanceof HTMLTextAreaElement&&(r=t.value),yt(t,a,e,n),t.shadowRoot){let b=function(A,N){if(A.nodeType===Node.ELEMENT_NODE&&A.tagName==="STYLE")return N(null);Et(A,e,n).then(L=>{N(L||null)}).catch(()=>{N(null)})};try{let A=t.shadowRoot.querySelectorAll("slot");for(let N of A){let L=[];try{L=((d=N.assignedNodes)==null?void 0:d.call(N,{flatten:!0}))||((p=N.assignedNodes)==null?void 0:p.call(N))||[]}catch(O){L=((u=N.assignedNodes)==null?void 0:u.call(N))||[]}for(let O of L)o.add(O)}}catch(A){}let c=Jn(e),m=`[data-sd="${c}"]`;try{a.setAttribute("data-sd",c)}catch(A){}let y=Zn(t.shadowRoot),w=Qn(y,m),C=no(y),S=ro(t,C,m);to(a,S+w,c);let v=document.createDocumentFragment(),E=yield ae(Array.from(t.shadowRoot.childNodes),b,n.fast);v.append(...E.filter(A=>!!A)),a.appendChild(v)}if(t.tagName==="SLOT"){let w=function(S,v){Et(S,e,n).then(b=>{b&&so(b),v(b||null)}).catch(()=>{v(null)})},c=((g=t.assignedNodes)==null?void 0:g.call(t,{flatten:!0}))||[],m=c.length>0?c:Array.from(t.childNodes),y=document.createDocumentFragment(),C=yield ae(Array.from(m),w,n.fast);return y.append(...C.filter(S=>!!S)),y}function f(c,m){if(o.has(c))return m(null);Et(c,e,n).then(y=>{m(y||null)}).catch(()=>{m(null)})}let i=yield ae(Array.from(t.childNodes),f,n.fast);if(a.append(...i.filter(c=>!!c)),s!==null&&a instanceof HTMLSelectElement){a.value=s;for(let c of a.options)c.value===s?c.setAttribute("selected",""):c.removeAttribute("selected")}return r!==null&&a instanceof HTMLTextAreaElement&&(a.textContent=r),a})}var fo=[/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],Ct=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!="undefined"&&window.__SNAPDOM_ICON_FONTS__||{}),ie=[];function Re(t){let e=Array.isArray(t)?t:[t];for(let n of e)n instanceof RegExp?ie.push(n):typeof n=="string"?ie.push(new RegExp(n,"i")):console.warn("[snapdom] Ignored invalid iconFont value:",n)}function nt(t){let e=typeof t=="string"?t:"",n=[...fo,...ie];for(let o of n)if(o instanceof RegExp&&o.test(e))return!0;return!!(/icon/i.test(e)||/glyph/i.test(e)||/symbols/i.test(e)||/feather/i.test(e)||/fontawesome/i.test(e))}function uo(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var Ne=new Map;function mo(t=""){let e=Object.create(null),n=String(t||""),o=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,s;for(;s=o.exec(n);)e[s[1].toUpperCase()]=Number(s[2]);return e}function ho(t,e,n){return k(this,null,function*(){var p;let o=String(t||""),s=o.toLowerCase(),r=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(s)&&!/\bsymbols\b/.test(s))return{familyForMeasure:o,familyForCanvas:o};if(!/\bmaterial\s*symbols\b/.test(s))return{familyForMeasure:o,familyForCanvas:o};let f=n&&((p=n.FILL)!=null?p:n.fill),i="outlined";/\brounded\b/.test(r)||/\bround\b/.test(r)?i="rounded":/\bsharp\b/.test(r)?i="sharp":/\boutlined\b/.test(r)&&(i="outlined");let l=f===1,h=null;if(l&&(i==="outlined"&&Ct.materialIconsFilled?h={url:Ct.materialIconsFilled,alias:"snapdom-mi-filled"}:i==="rounded"&&Ct.materialIconsRound?h={url:Ct.materialIconsRound,alias:"snapdom-mi-round"}:i==="sharp"&&Ct.materialIconsSharp&&(h={url:Ct.materialIconsSharp,alias:"snapdom-mi-sharp"})),!h)return{familyForMeasure:o,familyForCanvas:o};if(!Ne.has(h.alias))try{let u=new FontFace(h.alias,`url(${h.url})`,{style:"normal",weight:"400"});document.fonts.add(u),yield u.load(),Ne.set(h.alias,!0)}catch(u){return{familyForMeasure:o,familyForCanvas:o}}let d=`"${h.alias}"`;return{familyForMeasure:d,familyForCanvas:d}})}function po(t="Material Icons",e=24){return k(this,null,function*(){try{yield Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),document.fonts.ready])}catch(n){}})}function go(t){var s,r;let e=((s=t.getPropertyValue("-webkit-text-fill-color"))==null?void 0:s.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=(r=t.color)==null?void 0:r.trim();return o&&o!=="inherit"?o:"#000"}function yo(f){return k(this,arguments,function*(t,{family:e="Material Icons",weight:n="normal",fontSize:o=32,color:s="#000",variation:r="",className:a=""}={}){let i=String(e||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,h=mo(r),{familyForMeasure:d,familyForCanvas:p}=yield ho(i,a,h);yield po(p.replace(/^["']+|["']+$/g,""),o);let u=document.createElement("span");u.textContent=t,u.style.position="absolute",u.style.visibility="hidden",u.style.left="-99999px",u.style.whiteSpace="nowrap",u.style.fontFamily=d,u.style.fontWeight=String(n||"normal"),u.style.fontSize=`${o}px`,u.style.lineHeight="1",u.style.margin="0",u.style.padding="0",u.style.fontFeatureSettings="'liga' 1",u.style.fontVariantLigatures="normal",u.style.color=s,document.body.appendChild(u);let g=u.getBoundingClientRect(),c=Math.max(1,Math.ceil(g.width)),m=Math.max(1,Math.ceil(g.height));document.body.removeChild(u);let y=document.createElement("canvas");y.width=c*l,y.height=m*l;let w=y.getContext("2d");w.scale(l,l),w.font=`${n?`${n} `:""}${o}px ${p}`,w.textAlign="left",w.textBaseline="top",w.fillStyle=s;try{w.fontKerning="normal"}catch(C){}return w.fillText(t,0,0),{dataUrl:y.toDataURL(),width:c,height:m}})}function Te(t,e){return k(this,null,function*(){if(!(t instanceof Element))return 0;let n='.material-icons, [class*="material-symbols"]',o=Array.from(t.querySelectorAll(n)).filter(a=>a&&a.textContent&&a.textContent.trim());if(o.length===0)return 0;let s=e instanceof Element?Array.from(e.querySelectorAll(n)).filter(a=>a&&a.textContent&&a.textContent.trim()):[],r=0;for(let a=0;a<o.length;a++){let f=o[a],i=s[a]||null;try{let l=getComputedStyle(i||f),h=l.fontFamily||"Material Icons";if(!uo(h))continue;let d=(i||f).textContent.trim();if(!d)continue;let p=parseInt(l.fontSize,10)||24,u=l.fontWeight&&l.fontWeight!=="normal"?l.fontWeight:"normal",g=go(l),c=l.fontVariationSettings&&l.fontVariationSettings!=="normal"?l.fontVariationSettings:"",m=(i||f).className||"",{dataUrl:y,width:w,height:C}=yield yo(d,{family:h,weight:u,fontSize:p,color:g,variation:c,className:m});f.textContent="";let S=f.ownerDocument.createElement("img");S.src=y,S.alt=d,S.style.height=`${p}px`,S.style.width=`${Math.max(1,Math.round(w/C*p))}px`,S.style.objectFit="contain",S.style.verticalAlign=getComputedStyle(f).verticalAlign||"baseline",f.appendChild(S),r++}catch(l){}}return r})}function We(t,e,n,o=32,s="#000"){return k(this,null,function*(){e=e.replace(/^['"]+|['"]+$/g,"");let r=window.devicePixelRatio||1;try{yield document.fonts.ready}catch(p){}let a=document.createElement("span");a.textContent=t,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${e}"`,a.style.fontWeight=n||"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 f=a.getBoundingClientRect(),i=Math.ceil(f.width),l=Math.ceil(f.height);document.body.removeChild(a);let h=document.createElement("canvas");h.width=Math.max(1,i*r),h.height=Math.max(1,l*r);let d=h.getContext("2d");return d.scale(r,r),d.font=n?`${n} ${o}px "${e}"`:`${o}px "${e}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=s,d.fillText(t,0,0),{dataUrl:h.toDataURL(),width:i,height:l}})}var wo=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]);function Ut(t){if(!t)return"";for(let e of t.split(",")){let n=e.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!wo.has(n.toLowerCase()))return n}return""}function Wt(t){let e=String(t!=null?t:"400").trim().toLowerCase();if(e==="normal")return 400;if(e==="bold")return 700;let n=parseInt(e,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function ce(t){let e=String(t!=null?t:"normal").trim().toLowerCase();return e.startsWith("italic")?"italic":e.startsWith("oblique")?"oblique":"normal"}function bo(t){let e=String(t!=null?t:"100%").match(/(\d+(?:\.\d+)?)\s*%/);return e?Math.max(50,Math.min(200,parseFloat(e[1]))):100}function xo(t){let e=String(t||"400").trim(),n=e.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let s=Wt(n[1]),r=Wt(n[2]);return{min:Math.min(s,r),max:Math.max(s,r)}}let o=Wt(e);return{min:o,max:o}}function So(t){let e=String(t||"normal").trim().toLowerCase();return e==="italic"?{kind:"italic"}:e.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function Co(t){let e=String(t||"100%").trim(),n=e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let r=parseFloat(n[1]),a=parseFloat(n[2]);return{min:Math.min(r,a),max:Math.max(r,a)}}let o=e.match(/(\d+(?:\.\d+)?)\s*%/),s=o?parseFloat(o[1]):100;return{min:s,max:s}}function ko(t,e){if(!t)return!1;try{let n=new URL(t,location.href);if(n.origin===location.origin)return!0;let s=n.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com"].some(f=>s.endsWith(f)))return!0;let a=(n.pathname+n.search).toLowerCase();if(/\bfont(s)?\b/.test(a)||/\.woff2?(\b|$)/.test(a))return!0;for(let f of e){let i=f.toLowerCase().replace(/\s+/g,"+"),l=f.toLowerCase().replace(/\s+/g,"-");if(a.includes(i)||a.includes(l))return!0}return!1}catch(n){return!1}}function Ao(t){var n;let e=new Set;for(let o of t||[]){let s=(n=String(o).split("__")[0])==null?void 0:n.trim();s&&e.add(s)}return e}function Pe(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,o,s)=>{let r=(s||"").trim();if(!r||/^data:|^blob:|^https?:|^file:|^about:/i.test(r))return n;let a=r;try{a=new URL(r,e||location.href).href}catch(f){}return`url("${a}")`})}var le=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,Ot=4;function Mo(t,e,n){return k(this,null,function*(){if(!t)return t;let o=new Set;function s(f,i){try{return new URL(f,i||location.href).href}catch(l){return f}}function r(f,i,l=0){return k(this,null,function*(){if(l>Ot)return console.warn(`[snapDOM] @import depth exceeded (${Ot}) at ${i}`),f;let h="",d=0,p;for(;p=le.exec(f);){h+=f.slice(d,p.index),d=le.lastIndex;let u=(p[2]||p[4]||"").trim(),g=s(u,i);if(o.has(g)){console.warn(`[snapDOM] Skipping circular @import: ${g}`);continue}o.add(g);let c="";try{let m=yield X(g,{as:"text",useProxy:n,silent:!0});m.ok&&typeof m.data=="string"&&(c=m.data)}catch(m){}c?(c=Pe(c,g),c=yield r(c,g,l+1),h+=`
|
|
6
|
-
/* inlined: ${
|
|
7
|
-
${
|
|
8
|
-
`):h+=p[0]}return h+=f.slice(d),h})}let a=Pe(t,e||location.href);return a=yield r(a,e||location.href,0),a})}var Oe=/url\((["']?)([^"')]+)\1\)/g,vo=/@font-face[^{}]*\{[^}]*\}/g;function Ue(t){if(!t)return[];let e=[],n=t.split(",").map(o=>o.trim()).filter(Boolean);for(let o of n){let s=o.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!s)continue;let r=s[1],a=s[2],f=i=>{if(!i.includes("?"))return parseInt(i,16);let l=parseInt(i.replace(/\?/g,"0"),16),h=parseInt(i.replace(/\?/g,"F"),16);return[l,h]};if(a){let i=f(r),l=f(a),h=Array.isArray(i)?i[0]:i,d=Array.isArray(l)?l[1]:l;e.push([Math.min(h,d),Math.max(h,d)])}else{let i=f(r);Array.isArray(i)?e.push([i[0],i[1]]):e.push([i,i])}}return e}function Be(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[o,s]of e)if(n>=o&&n<=s)return!0;return!1}function fe(t,e){let n=[];if(!t)return n;for(let o of t.matchAll(Oe)){let s=(o[2]||"").trim();if(!(!s||s.startsWith("data:"))){if(!/^https?:/i.test(s))try{s=new URL(s,e||location.href).href}catch(r){}n.push(s)}}return n}function De(t,e,n=""){return k(this,null,function*(){var s,r,a,f,i;let o=t;for(let l of t.matchAll(Oe)){let h=ht(l[0]);if(!h)continue;let d=h;if(!d.startsWith("http")&&!d.startsWith("data:"))try{d=new URL(d,e||location.href).href}catch(p){}if(!nt(d)){if((s=x.resource)!=null&&s.has(d)){(r=x.font)==null||r.add(d),o=o.replace(l[0],`url(${x.resource.get(d)})`);continue}if(!((a=x.font)!=null&&a.has(d)))try{let p=yield X(d,{as:"dataURL",useProxy:n,silent:!0});if(p.ok&&typeof p.data=="string"){let u=p.data;(f=x.resource)==null||f.set(d,u),(i=x.font)==null||i.add(d),o=o.replace(l[0],`url(${u})`)}}catch(p){console.warn("[snapDOM] Failed to fetch font resource:",d)}}}return o})}function Eo(t){if(!t.length)return null;let e=(f,i)=>t.some(([l,h])=>!(h<f||l>i)),n=e(0,255)||e(305,305),o=e(256,591)||e(7680,7935),s=e(880,1023),r=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":r?"cyrillic":s?"greek":o?"latin-ext":n?"latin":null}function _e(t={}){let e=new Set((t.families||[]).map(s=>String(s).toLowerCase())),n=new Set((t.domains||[]).map(s=>String(s).toLowerCase())),o=new Set((t.subsets||[]).map(s=>String(s).toLowerCase()));return(s,r)=>{if(e.size&&e.has(s.family.toLowerCase()))return!0;if(n.size)for(let a of s.srcUrls)try{if(n.has(new URL(a).host.toLowerCase()))return!0}catch(f){}if(o.size){let a=Eo(r);if(a&&o.has(a))return!0}return!1}}function Fo(t){var r,a,f,i,l,h;if(!t)return t;let e=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,o=[];for(let d of t.match(e)||[]){let p=((r=d.match(/font-family:\s*([^;]+);/i))==null?void 0:r[1])||"",u=Ut(p),g=(((a=d.match(/font-weight:\s*([^;]+);/i))==null?void 0:a[1])||"400").trim(),c=(((f=d.match(/font-style:\s*([^;]+);/i))==null?void 0:f[1])||"normal").trim(),m=(((i=d.match(/font-stretch:\s*([^;]+);/i))==null?void 0:i[1])||"100%").trim(),y=(((l=d.match(/unicode-range:\s*([^;]+);/i))==null?void 0:l[1])||"").trim(),w=(((h=d.match(/src\s*:\s*([^;}]+)[;}]/i))==null?void 0:h[1])||"").trim(),C=fe(w,location.href),S=C.length?C.map(b=>String(b).toLowerCase()).sort().join("|"):w.toLowerCase(),v=[String(u||"").toLowerCase(),g,c,m,y.toLowerCase(),S].join("|");n.has(v)||(n.add(v),o.push(d))}if(o.length===0)return t;let s=0;return t.replace(e,()=>o[s++]||"")}function $o(t,e,n,o){let s=Array.from(t||[]).sort().join("|"),r=e?JSON.stringify({families:(e.families||[]).map(i=>String(i).toLowerCase()).sort(),domains:(e.domains||[]).map(i=>String(i).toLowerCase()).sort(),subsets:(e.subsets||[]).map(i=>String(i).toLowerCase()).sort()}):"",a=(n||[]).map(i=>`${(i.family||"").toLowerCase()}::${i.weight||"normal"}::${i.style||"normal"}::${i.src||""}`).sort().join("|");return`fonts-embed-css::req=${s}::ex=${r}::lf=${a}::px=${o||""}`}function He(t,e,n,o){return k(this,null,function*(){let s;try{s=t.cssRules||[]}catch(a){return}let r=(a,f)=>{try{return new URL(a,f||location.href).href}catch(i){return a}};for(let a of s){if(a.type===CSSRule.IMPORT_RULE&&a.styleSheet){let f=a.href?r(a.href,e):e;if(o.depth>=Ot){console.warn(`[snapDOM] CSSOM import depth exceeded (${Ot}) at ${f}`);continue}if(f&&o.visitedSheets.has(f)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${f}`);continue}f&&o.visitedSheets.add(f);let i=W($({},o),{depth:(o.depth||0)+1});yield He(a.styleSheet,f,n,i);continue}if(a.type===CSSRule.FONT_FACE_RULE){let f=(a.style.getPropertyValue("font-family")||"").trim(),i=Ut(f);if(!i||nt(i))continue;let l=(a.style.getPropertyValue("font-weight")||"400").trim(),h=(a.style.getPropertyValue("font-style")||"normal").trim(),d=(a.style.getPropertyValue("font-stretch")||"100%").trim(),p=(a.style.getPropertyValue("src")||"").trim(),u=(a.style.getPropertyValue("unicode-range")||"").trim();if(!o.faceMatchesRequired(i,h,l,d))continue;let g=Ue(u);if(!Be(o.usedCodepoints,g))continue;let c={family:i,weightSpec:l,styleSpec:h,stretchSpec:d,unicodeRange:u,srcRaw:p,srcUrls:fe(p,e||location.href),href:e||location.href};if(o.simpleExcluder&&o.simpleExcluder(c,g))continue;if(/url\(/i.test(p)){let m=yield De(p,e||location.href,o.useProxy);yield n(`@font-face{font-family:${i};src:${m};font-style:${h};font-weight:${l};font-stretch:${d};${u?`unicode-range:${u};`:""}}`)}else yield n(`@font-face{font-family:${i};src:${p};font-style:${h};font-weight:${l};font-stretch:${d};${u?`unicode-range:${u};`:""}}`)}}})}function Bt(){return k(this,arguments,function*({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:o=[],useProxy:s=""}={}){var c,m,y,w,C,S,v,b,E,A,N,L,O,q,V,K,ft,Z;t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let r=new Map;for(let F of t){let[M,T,U,D]=String(F).split("__");if(!M)continue;let _=r.get(M)||[];_.push({w:parseInt(T,10),s:U,st:parseInt(D,10)}),r.set(M,_)}function a(F,M,T,U){if(!r.has(F))return!1;let D=r.get(F),_=xo(T),R=So(M),P=Co(U),j=_.min!==_.max,z=_.min,G=H=>R.kind==="normal"&&H==="normal"||R.kind!=="normal"&&(H==="italic"||H==="oblique"),Q=!1;for(let H of D){let J=j?H.w>=_.min&&H.w<=_.max:H.w===z,ot=G(ce(H.s)),ut=H.st>=P.min&&H.st<=P.max;if(J&&ot&&ut){Q=!0;break}}if(Q)return!0;if(!j)for(let H of D){let J=G(ce(H.s)),ot=H.st>=P.min&&H.st<=P.max;if(Math.abs(z-H.w)<=300&&J&&ot)return!0}return!1}let f=_e(n),i=$o(t,n,o,s);if((c=x.resource)!=null&&c.has(i))return x.resource.get(i);let l=Ao(t),h=[],d=le;for(let F of document.querySelectorAll("style")){let M=F.textContent||"";for(let T of M.matchAll(d)){let U=(T[2]||T[4]||"").trim();if(!U||nt(U))continue;!!document.querySelector(`link[rel="stylesheet"][href="${U}"]`)||h.push(U)}}h.length&&(yield Promise.all(h.map(F=>new Promise(M=>{if(document.querySelector(`link[rel="stylesheet"][href="${F}"]`))return M(null);let T=document.createElement("link");T.rel="stylesheet",T.href=F,T.setAttribute("data-snapdom","injected-import"),T.onload=()=>M(T),T.onerror=()=>M(null),document.head.appendChild(T)}))));let p="",u=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).filter(F=>!!F.href);for(let F of u)try{if(nt(F.href))continue;let M="",T=!1;try{T=new URL(F.href,location.href).origin===location.origin}catch(D){}if(!T&&!ko(F.href,l))continue;if(T){let D=Array.from(document.styleSheets).find(_=>_.href===F.href);if(D)try{let _=D.cssRules||[];M=Array.from(_).map(R=>R.cssText).join("")}catch(_){}}if(!M&&(M=(yield X(F.href,{as:"text",useProxy:s})).data,nt(F.href)))continue;M=yield Mo(M,F.href,s);let U="";for(let D of M.match(vo)||[]){let _=(((m=D.match(/font-family:\s*([^;]+);/i))==null?void 0:m[1])||"").trim(),R=Ut(_);if(!R||nt(R))continue;let P=(((y=D.match(/font-weight:\s*([^;]+);/i))==null?void 0:y[1])||"400").trim(),j=(((w=D.match(/font-style:\s*([^;]+);/i))==null?void 0:w[1])||"normal").trim(),z=(((C=D.match(/font-stretch:\s*([^;]+);/i))==null?void 0:C[1])||"100%").trim(),G=(((S=D.match(/unicode-range:\s*([^;]+);/i))==null?void 0:S[1])||"").trim(),Q=(((v=D.match(/src\s*:\s*([^;}]+)[;}]/i))==null?void 0:v[1])||"").trim(),H=fe(Q,F.href);if(!a(R,j,P,z))continue;let J=Ue(G);if(!Be(e,J))continue;let ot={family:R,weightSpec:P,styleSpec:j,stretchSpec:z,unicodeRange:G,srcRaw:Q,srcUrls:H,href:F.href};if(n&&f(ot,J))continue;let ut=/url\(/i.test(Q)?yield De(D,F.href,s):D;U+=ut}U.trim()&&(p+=U)}catch(M){console.warn("[snapDOM] Failed to process stylesheet:",F.href)}let g={requiredIndex:r,usedCodepoints:e,faceMatchesRequired:a,simpleExcluder:n?_e(n):null,useProxy:s,visitedSheets:new Set,depth:0};for(let F of document.styleSheets)if(!(F.href&&u.some(M=>M.href===F.href)))try{let M=F.href||location.href;M&&g.visitedSheets.add(M),yield He(F,M,T=>k(null,null,function*(){p+=T}),g)}catch(M){}try{for(let F of document.fonts||[]){if(!F||!F.family||F.status!=="loaded"||!F._snapdomSrc)continue;let M=String(F.family).replace(/^['"]+|['"]+$/g,"");if(nt(M)||!r.has(M)||n!=null&&n.families&&n.families.some(U=>String(U).toLowerCase()===M.toLowerCase()))continue;let T=F._snapdomSrc;if(!String(T).startsWith("data:")){if((b=x.resource)!=null&&b.has(F._snapdomSrc))T=x.resource.get(F._snapdomSrc),(E=x.font)==null||E.add(F._snapdomSrc);else if(!((A=x.font)!=null&&A.has(F._snapdomSrc)))try{let U=yield X(F._snapdomSrc,{as:"dataURL",useProxy:s,silent:!0});if(U.ok&&typeof U.data=="string")T=U.data,(N=x.resource)==null||N.set(F._snapdomSrc,T),(L=x.font)==null||L.add(F._snapdomSrc);else continue}catch(U){console.warn("[snapDOM] Failed to fetch dynamic font src:",F._snapdomSrc);continue}}p+=`@font-face{font-family:'${M}';src:url(${T});font-style:${F.style||"normal"};font-weight:${F.weight||"normal"};}`}}catch(F){}for(let F of o){if(!F||typeof F!="object")continue;let M=String(F.family||"").replace(/^['"]+|['"]+$/g,"");if(!M||nt(M)||!r.has(M)||n!=null&&n.families&&n.families.some(P=>String(P).toLowerCase()===M.toLowerCase()))continue;let T=F.weight!=null?String(F.weight):"normal",U=F.style!=null?String(F.style):"normal",D=F.stretchPct!=null?`${F.stretchPct}%`:"100%",_=String(F.src||""),R=_;if(!R.startsWith("data:")){if((O=x.resource)!=null&&O.has(_))R=x.resource.get(_),(q=x.font)==null||q.add(_);else if(!((V=x.font)!=null&&V.has(_)))try{let P=yield X(_,{as:"dataURL",useProxy:s,silent:!0});if(P.ok&&typeof P.data=="string")R=P.data,(K=x.resource)==null||K.set(_,R),(ft=x.font)==null||ft.add(_);else continue}catch(P){console.warn("[snapDOM] Failed to fetch localFonts src:",_);continue}}p+=`@font-face{font-family:'${M}';src:url(${R});font-style:${U};font-weight:${T};font-stretch:${D};}`}return p&&(p=Fo(p),(Z=x.resource)==null||Z.set(i,p)),p})}function Dt(t){let e=new Set;if(!t)return e;let n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,null),o=a=>{let f=Ut(a.fontFamily);if(!f)return;let i=(l,h,d)=>`${f}__${Wt(l)}__${ce(h)}__${bo(d)}`;e.add(i(a.fontWeight,a.fontStyle,a.fontStretch))};o(getComputedStyle(t));let s=getComputedStyle(t,"::before");s&&s.content&&s.content!=="none"&&o(s);let r=getComputedStyle(t,"::after");for(r&&r.content&&r.content!=="none"&&o(r);n.nextNode();){let a=n.currentNode,f=getComputedStyle(a);o(f);let i=getComputedStyle(a,"::before");i&&i.content&&i.content!=="none"&&o(i);let l=getComputedStyle(a,"::after");l&&l.content&&l.content!=="none"&&o(l)}return e}function Ht(t){let e=new Set,n=s=>{if(s)for(let r of s)e.add(r.codePointAt(0))},o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;o.nextNode();){let s=o.currentNode;if(s.nodeType===Node.TEXT_NODE)n(s.nodeValue||"");else if(s.nodeType===Node.ELEMENT_NODE){let r=s;for(let a of["::before","::after"]){let f=getComputedStyle(r,a),i=f==null?void 0:f.getPropertyValue("content");if(!(!i||i==="none"))if(/^"/.test(i)||/^'/.test(i))n(i.slice(1,-1));else{let l=i.match(/\\[0-9A-Fa-f]{1,6}/g);if(l)for(let h of l)try{e.add(parseInt(h.slice(1),16))}catch(d){}}}}}return e}function qt(t,e=2){return k(this,null,function*(){try{yield document.fonts.ready}catch(s){}let n=Array.from(t||[]).filter(Boolean);if(n.length===0)return;let o=()=>{let s=document.createElement("div");s.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let r of n){let a=document.createElement("span");a.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",a.style.fontFamily=`"${r}"`,a.style.fontWeight="700",a.style.fontStyle="italic",a.style.fontSize="32px",a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.margin="0",a.style.padding="0",s.appendChild(a)}document.body.appendChild(s),s.offsetWidth,document.body.removeChild(s)};for(let s=0;s<Math.max(1,e);s++)o(),yield new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r)))})}function Ve(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function Io(t){return(t||"").replace(/"([^"]*)"/g,"$1")}function qe(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 je(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)),s="";for(let[r,a]of n)for(;o>=r;)s+=a,o-=r;return e?s:s.toLowerCase()}function ze(t,e){switch((e||"decimal").toLowerCase()){case"decimal":return String(Math.max(0,t));case"decimal-leading-zero":return(t<10?"0":"")+String(Math.max(0,t));case"lower-alpha":return qe(t,!1);case"upper-alpha":return qe(t,!0);case"lower-roman":return je(t,!1);case"upper-roman":return je(t,!0);default:return String(Math.max(0,t))}}function Xe(t){let e=()=>{var p,u,g;return(g=(u=(p=x)==null?void 0:p.session)==null?void 0:u.__counterEpoch)!=null?g:0},n=e(),o=new WeakMap,s=t instanceof Document?t.documentElement:t,r=p=>p&&p.tagName==="LI",a=p=>{let u=0,g=p==null?void 0:p.parentElement;if(!g)return 0;for(let c of g.children){if(c===p)break;c.tagName==="LI"&&u++}return u},f=p=>{let u=new Map;for(let[g,c]of p)u.set(g,c.slice());return u},i=(p,u,g)=>{var w,C;let c=f(p),m;try{m=((w=g.style)==null?void 0:w.counterReset)||getComputedStyle(g).counterReset}catch(S){}if(m&&m!=="none")for(let S of m.split(",")){let v=S.trim().split(/\s+/),b=v[0],E=Number.isFinite(Number(v[1]))?Number(v[1]):0;if(!b)continue;let A=u.get(b);if(A&&A.length){let N=A.slice();N.push(E),c.set(b,N)}else c.set(b,[E])}let y;try{y=((C=g.style)==null?void 0:C.counterIncrement)||getComputedStyle(g).counterIncrement}catch(S){}if(y&&y!=="none")for(let S of y.split(",")){let v=S.trim().split(/\s+/),b=v[0],E=Number.isFinite(Number(v[1]))?Number(v[1]):1;if(!b)continue;let A=c.get(b)||[];A.length===0&&A.push(0),A[A.length-1]+=E,c.set(b,A)}try{if(getComputedStyle(g).display==="list-item"&&r(g)){let v=g.parentElement,b=1;if(v&&v.tagName==="OL"){let A=v.getAttribute("start"),N=Number.isFinite(Number(A))?Number(A):1,L=a(g),O=g.getAttribute("value");b=Number.isFinite(Number(O))?Number(O):N+L}else b=1+a(g);let E=c.get("list-item")||[];E.length===0&&E.push(0),E[E.length-1]=b,c.set("list-item",E)}}catch(S){}return c},l=(p,u,g)=>{let c=i(g,u,p);o.set(p,c);let m=c;for(let y of p.children)m=l(y,c,m);return c},h=new Map;l(s,h,h);function d(){let p=e();if(p!==n){n=p;let u=new Map;l(s,u,u)}}return{get(p,u){var c;d();let g=(c=o.get(p))==null?void 0:c.get(u);return g&&g.length?g[g.length-1]:0},getStack(p,u){var c;d();let g=(c=o.get(p))==null?void 0:c.get(u);return g?g.slice():[]}}}function Ye(t,e,n){if(!t||t==="none")return t;try{let o=/\b(counter|counters)\s*\(([^)]+)\)/g,s=t.replace(o,(r,a,f)=>{var l,h,d,p;let i=String(f).split(",").map(u=>u.trim());if(a==="counter"){let u=(l=i[0])==null?void 0:l.replace(/^["']|["']$/g,""),g=(i[1]||"decimal").toLowerCase(),c=n.get(e,u);return ze(c,g)}else{let u=(h=i[0])==null?void 0:h.replace(/^["']|["']$/g,""),g=(p=(d=i[1])==null?void 0:d.replace(/^["']|["']$/g,""))!=null?p:"",c=(i[2]||"decimal").toLowerCase(),m=n.getStack(e,u);return m.length?m.map(w=>ze(w,c)).join(g):""}});return Io(s)}catch(o){return"- "}}var kt=new WeakMap,Ke=-1;function Lo(t){return(t||"").replace(/"([^"]*)"/g,"$1")}function No(t){if(!t)return"";let e=[],n=/"([^"]*)"/g,o;for(;o=n.exec(t);)e.push(o[1]);return e.length?e.join(""):Lo(t)}function ue(t,e){let n=t.parentElement,o=n?kt.get(n):null;return o?{get(s,r){let a=e.get(s,r),f=o.get(r);return typeof f=="number"?Math.max(a,f):a},getStack(s,r){let a=e.getStack(s,r);if(!a.length)return a;let f=o.get(r);if(typeof f=="number"){let i=a.slice();return i[i.length-1]=Math.max(i[i.length-1],f),i}return a}}:e}function de(t,e,n){let o=new Map;function s(i){let l=[];if(!i||i==="none")return l;for(let h of String(i).split(",")){let d=h.trim().split(/\s+/),p=d[0],u=Number.isFinite(Number(d[1]))?Number(d[1]):void 0;p&&l.push({name:p,num:u})}return l}let r=s(e==null?void 0:e.counterReset),a=s(e==null?void 0:e.counterIncrement);function f(i){if(o.has(i))return o.get(i).slice();let l=n.getStack(t,i);l=l.length?l.slice():[];let h=r.find(p=>p.name===i);if(h){let p=Number.isFinite(h.num)?h.num:0;l=l.length?[...l,p]:[p]}let d=a.find(p=>p.name===i);if(d){let p=Number.isFinite(d.num)?d.num:1;l.length===0&&(l=[0]),l[l.length-1]+=p}return o.set(i,l.slice()),l}return{get(i,l){let h=f(l);return h.length?h[h.length-1]:0},getStack(i,l){return f(l)},__incs:a}}function Ro(t,e,n){let o;try{o=getComputedStyle(t,e)}catch(l){}let s=o==null?void 0:o.content;if(!s||s==="none"||s==="normal")return{text:"",incs:[]};let r=ue(t,n),a=de(t,o,r),f=Ve(s)?Ye(s,t,a):s;return{text:No(f),incs:a.__incs||[]}}function me(t,e,n,o){return k(this,null,function*(){var i,l,h,d;if(!(t instanceof Element)||!(e instanceof Element))return;let s=(h=(l=(i=x)==null?void 0:i.session)==null?void 0:l.__counterEpoch)!=null?h:0;if(Ke!==s&&(kt=new WeakMap,n&&(n.__counterCtx=null),Ke=s),!n.__counterCtx)try{n.__counterCtx=Xe(t.ownerDocument||document)}catch(p){}let r=n.__counterCtx;for(let p of["::before","::after","::first-letter"])try{let u=gt(t,p);if(!u||typeof u[Symbol.iterator]!="function"||u.content==="none"&&u.backgroundImage==="none"&&u.backgroundColor==="transparent"&&(u.borderStyle==="none"||parseFloat(u.borderWidth)===0)&&(!u.transform||u.transform==="none")&&u.display==="inline")continue;if(p==="::first-letter"){let R=getComputedStyle(t);if(!(u.color!==R.color||u.fontSize!==R.fontSize||u.fontWeight!==R.fontWeight))continue;let j=Array.from(e.childNodes).find(tt=>{var et;return tt.nodeType===Node.TEXT_NODE&&((et=tt.textContent)==null?void 0:et.trim().length)>0});if(!j)continue;let z=j.textContent,G=z.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u),Q=G==null?void 0:G[0],H=z.slice((Q==null?void 0:Q.length)||0);if(!Q||/[\uD800-\uDFFF]/.test(Q))continue;let J=document.createElement("span");J.textContent=Q,J.dataset.snapdomPseudo="::first-letter";let ot=_t(u),ut=St(ot,"span");n.styleMap.set(J,ut);let Vt=document.createTextNode(H);e.replaceChild(Vt,j),e.insertBefore(J,Vt);continue}let c=u.content,{text:m,incs:y}=Ro(t,p,r),w=u.backgroundImage,C=u.backgroundColor,S=u.fontFamily,v=parseInt(u.fontSize)||32,b=parseInt(u.fontWeight)||!1,E=u.color||"#000",A=u.borderStyle,N=parseFloat(u.borderWidth),L=u.transform,O=nt(S),q=c!=="none"&&m!=="",V=w&&w!=="none",K=C&&C!=="transparent"&&C!=="rgba(0, 0, 0, 0)",ft=A&&A!=="none"&&N>0,Z=L&&L!=="none";if(!(q||V||K||ft||Z)){if(y&&y.length&&t.parentElement){let R=kt.get(t.parentElement)||new Map;for(let{name:P}of y){if(!P)continue;let j=ue(t,r),G=de(t,getComputedStyle(t,p),j).get(t,P);R.set(P,G)}kt.set(t.parentElement,R)}continue}let M=document.createElement("span");M.dataset.snapdomPseudo=p,M.style.display="inline",M.style.verticalAlign="baseline",M.style.pointerEvents="none";let T=_t(u),U=St(T,"span");if(n.styleMap.set(M,U),O&&m&&m.length===1){let{dataUrl:R,width:P,height:j}=yield We(m,S,b,v,E),z=document.createElement("img");z.src=R,z.style=`height:${v}px;width:${P/j*v}px;object-fit:contain;`,M.appendChild(z),e.dataset.snapdomHasIcon="true"}else if(m&&m.startsWith("url(")){let R=ht(m);if(R!=null&&R.trim())try{let P=document.createElement("img"),j=yield X(dt(R),{as:"dataURL",useProxy:o.useProxy});P.src=j.data,P.style=`width:${v}px;height:auto;object-fit:contain;`,M.appendChild(P)}catch(P){console.error(`[snapdom] Error in pseudo ${p} for`,t,P)}}else!O&&q&&(M.textContent=m);M.style.backgroundImage="none","maskImage"in M.style&&(M.style.maskImage="none"),"webkitMaskImage"in M.style&&(M.style.webkitMaskImage="none");try{M.style.backgroundRepeat=u.backgroundRepeat,M.style.backgroundSize=u.backgroundSize,u.backgroundPositionX&&u.backgroundPositionY?(M.style.backgroundPositionX=u.backgroundPositionX,M.style.backgroundPositionY=u.backgroundPositionY):M.style.backgroundPosition=u.backgroundPosition,M.style.backgroundOrigin=u.backgroundOrigin,M.style.backgroundClip=u.backgroundClip,M.style.backgroundAttachment=u.backgroundAttachment,M.style.backgroundBlendMode=u.backgroundBlendMode}catch(R){}if(V)try{let R=Mt(w),P=yield Promise.all(R.map(pt));M.style.backgroundImage=P.join(", ")}catch(R){console.warn(`[snapdom] Failed to inline background-image for ${p}`,R)}K&&(M.style.backgroundColor=C);let _=M.childNodes.length>0||((d=M.textContent)==null?void 0:d.trim())!==""||V||K||ft||Z;if(y&&y.length&&t.parentElement){let R=kt.get(t.parentElement)||new Map,P=ue(t,r),j=de(t,getComputedStyle(t,p),P);for(let{name:z}of y){if(!z)continue;let G=j.get(t,z);R.set(z,G)}kt.set(t.parentElement,R)}if(!_)continue;p==="::before"?e.insertBefore(M,e.firstChild):e.appendChild(M)}catch(u){console.warn(`[snapdom] Failed to capture ${p} for`,t,u)}let a=Array.from(t.children),f=Array.from(e.children).filter(p=>!p.dataset.snapdomPseudo);for(let p=0;p<Math.min(a.length,f.length);p++)yield me(a[p],f[p],n,o)})}function Ge(t,e){var w,C,S,v;if(!t||!(t instanceof Element))return;let n=t.ownerDocument||document,o=e||n,s=t instanceof SVGSVGElement?[t]:Array.from(t.querySelectorAll("svg"));if(s.length===0)return;let r=/url\(\s*#([^)]+)\)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],f=b=>window.CSS&&CSS.escape?CSS.escape(b):b.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),i=new Set(Array.from(t.querySelectorAll("[id]")).map(b=>b.id)),l=new Set,h=!1,d=b=>{if(!b)return;r.lastIndex=0;let E;for(;E=r.exec(b);){h=!0;let A=(E[1]||"").trim();A&&!i.has(A)&&l.add(A)}},p=b=>{let E=b.querySelectorAll('use[href^="#"], use[xlink\\:href^="#"]');for(let L of E){let O=L.getAttribute("href")||L.getAttribute("xlink:href");if(!O||!O.startsWith("#"))continue;h=!0;let q=O.slice(1).trim();q&&!i.has(q)&&l.add(q)}let N=b.querySelectorAll('*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("], *[clip-path^="url("],*[mask^="url("],*[marker^="url("], *[marker-start^="url("],*[marker-mid^="url("], *[marker-end^="url("]');for(let L of N){d(L.getAttribute("style")||"");for(let O of a)d(L.getAttribute(O))}};for(let b of s)p(b);if(!h)return;let u=t.querySelector("svg.inline-defs-container");u||(u=n.createElementNS("http://www.w3.org/2000/svg","svg"),u.classList.add("inline-defs-container"),u.setAttribute("aria-hidden","true"),u.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(u,t.firstChild||null));let g=u.querySelector("defs")||null,c=b=>{if(!b||i.has(b))return null;let E=f(b),A=N=>{let L=o.querySelector(N);return L&&!t.contains(L)?L:null};return A(`svg defs > *#${E}`)||A(`svg > symbol#${E}`)||A(`*#${E}`)};if(!l.size)return;let m=new Set(l),y=new Set;for(;m.size;){let b=m.values().next().value;if(m.delete(b),!b||i.has(b)||y.has(b))continue;let E=c(b);if(!E){y.add(b);continue}g||(g=n.createElementNS("http://www.w3.org/2000/svg","defs"),u.appendChild(g));let A=E.cloneNode(!0);A.id||A.setAttribute("id",b),g.appendChild(A),y.add(b),i.add(b);let N=[A,...A.querySelectorAll("*")];for(let L of N){let O=((w=L.getAttribute)==null?void 0:w.call(L,"href"))||((C=L.getAttribute)==null?void 0:C.call(L,"xlink:href"));if(O&&O.startsWith("#")){let V=O.slice(1).trim();V&&!i.has(V)&&!y.has(V)&&m.add(V)}let q=((S=L.getAttribute)==null?void 0:S.call(L,"style"))||"";q&&d(q);for(let V of a){let K=(v=L.getAttribute)==null?void 0:v.call(L,V);K&&d(K)}}}}function Je(t,e){var f;if(!t||!e)return;let n=t.scrollTop||0;if(!n)return;getComputedStyle(e).position==="static"&&(e.style.position="relative");let o=t.getBoundingClientRect(),s=t.clientHeight,r="data-snap-ph",a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;a.nextNode();){let i=a.currentNode,l=getComputedStyle(i),h=l.position;if(h!=="sticky"&&h!=="-webkit-sticky")continue;let d=Qe(l.top),p=Qe(l.bottom);if(d==null&&p==null)continue;let u=To(i,t),g=Po(e,u,r);if(!g)continue;let c=i.getBoundingClientRect(),m=c.width,y=c.height,w=c.left-o.left;if(!(m>0&&y>0)||!Number.isFinite(w))continue;let C=d!=null?d+n:n+(s-y-p);if(!Number.isFinite(C))continue;let S=Number.parseInt(l.zIndex,10),v=Number.isFinite(S),b=v?Math.max(S,1)+1:2,E=v?S-1:0,A=g.cloneNode(!1);A.setAttribute(r,"1"),A.style.position="sticky",A.style.left=`${w}px`,A.style.top=`${C}px`,A.style.width=`${m}px`,A.style.height=`${y}px`,A.style.visibility="hidden",A.style.zIndex=String(E),A.style.overflow="hidden",A.style.background="transparent",A.style.boxShadow="none",A.style.filter="none",(f=g.parentElement)==null||f.insertBefore(A,g),g.style.position="absolute",g.style.left=`${w}px`,g.style.top=`${C}px`,g.style.bottom="auto",g.style.zIndex=String(b),g.style.pointerEvents="none"}}function Qe(t){if(!t||t==="auto")return null;let e=Number.parseFloat(t);return Number.isFinite(e)?e:null}function To(t,e){let n=[];for(let o=t;o&&o!==e;){let s=o.parentElement;if(!s)break;n.push(Array.prototype.indexOf.call(s.children,o)),o=s}return n.reverse()}function Po(t,e,n){let o=t;for(let s=0;s<e.length;s++)if(o=_o(o,n)[e[s]],!o)return null;return o instanceof HTMLElement?o:null}function _o(t,e){let n=[],o=t.children;for(let s=0;s<o.length;s++){let r=o[s];r.hasAttribute(e)||n.push(r)}return n}function tn(n){return k(this,arguments,function*(t,e={}){var l,h;let o={styleMap:x.session.styleMap,styleCache:x.session.styleCache,nodeMap:x.session.nodeMap},s,r="",a="";Wo(t);try{Ge(t)}catch(d){console.warn("inlineExternal defs or symbol failed:",d)}try{s=yield Et(t,o,e,t)}catch(d){throw console.warn("deepClone failed:",d),d}try{yield me(t,s,o,e)}catch(d){console.warn("inlinePseudoElements failed:",d)}yield Do(s);try{let d=s.querySelectorAll("style[data-sd]");for(let p of d)a+=p.textContent||"",p.remove()}catch(d){}let f=oe(o.styleMap);r=Array.from(f.entries()).map(([d,p])=>`.${p}{${d}}`).join(""),r=a+r;for(let[d,p]of o.styleMap.entries()){if(d.tagName==="STYLE")continue;if(d.getRootNode&&d.getRootNode()instanceof ShadowRoot){d.setAttribute("style",p.replace(/;/g,"; "));continue}let u=f.get(p);u&&d.classList.add(u);let g=(l=d.style)==null?void 0:l.backgroundImage,c=(h=d.dataset)==null?void 0:h.snapdomHasIcon;g&&g!=="none"&&(d.style.backgroundImage=g),c&&(d.style.verticalAlign="middle",d.style.display="inline")}for(let[d,p]of o.nodeMap.entries()){let u=p.scrollLeft,g=p.scrollTop;if((u||g)&&d instanceof HTMLElement){d.style.overflow="hidden",d.style.scrollbarWidth="none",d.style.msOverflowStyle="none";let m=document.createElement("div");for(m.style.transform=`translate(${-u}px, ${-g}px)`,m.style.willChange="transform",m.style.display="inline-block",m.style.width="100%";d.firstChild;)m.appendChild(d.firstChild);d.appendChild(m)}}let i=s instanceof HTMLElement&&s.firstElementChild instanceof HTMLElement?s.firstElementChild:s;if(Je(t,i),t===o.nodeMap.get(s)){let d=o.styleCache.get(t)||window.getComputedStyle(t);o.styleCache.set(t,d);let p=Qt(d.transform);s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=p||""}for(let[d,p]of o.nodeMap.entries())p.tagName==="PRE"&&(d.style.marginTop="0",d.style.marginBlockStart="0");return{clone:s,classCSS:r,styleCache:o.styleCache}})}function Wo(t){let e=getComputedStyle(t),n=e.outlineStyle,o=e.outlineWidth,s=e.borderStyle,r=e.borderWidth,a=n!=="none"&&parseFloat(o)>0,f=s==="none"||parseFloat(r)===0;a&&f&&(t.style.border=`${o} solid transparent`)}var Ft=new Map;function $t(t){return k(this,null,function*(){var n;if((n=x.resource)!=null&&n.has(t))return x.resource.get(t);if(Ft.has(t))return Ft.get(t);let e=k(null,null,function*(){var s;let o=yield X(t,{as:"dataURL",silent:!0});if(!o.ok||typeof o.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${t}`);return(s=x.resource)==null||s.set(t,o.data),o.data});Ft.set(t,e);try{let o=yield e;return Ft.set(t,o),o}catch(o){throw Ft.delete(t),o}})}var Oo=/\bblob:[^)"'\s]+/g;function Ze(t){return k(this,null,function*(){if(!t||t.indexOf("blob:")===-1)return t;let e=Array.from(new Set(t.match(Oo)||[]));if(e.length===0)return t;let n=t;for(let o of e)try{let s=yield $t(o);n=n.split(o).join(s)}catch(s){}return n})}function jt(t){return typeof t=="string"&&t.startsWith("blob:")}function Uo(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 Bo(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function Do(t){return k(this,null,function*(){var a,f;if(!t)return;let e=t.querySelectorAll?t.querySelectorAll("img"):[];for(let i of e)try{let h=i.getAttribute("src")||i.currentSrc||"";if(jt(h)){let p=yield $t(h);i.setAttribute("src",p)}let d=i.getAttribute("srcset");if(d&&d.includes("blob:")){let p=Uo(d),u=!1;for(let g of p)if(jt(g.url))try{g.url=yield $t(g.url),u=!0}catch(c){}u&&i.setAttribute("srcset",Bo(p))}}catch(l){}let n=t.querySelectorAll?t.querySelectorAll("image"):[];for(let i of n)try{let l="http://www.w3.org/1999/xlink",h=i.getAttribute("href")||((a=i.getAttributeNS)==null?void 0:a.call(i,l,"href"));if(jt(h)){let d=yield $t(h);i.setAttribute("href",d),(f=i.removeAttributeNS)==null||f.call(i,l,"href")}}catch(l){}let o=t.querySelectorAll?t.querySelectorAll("[style*='blob:']"):[];for(let i of o)try{let l=i.getAttribute("style");if(l&&l.includes("blob:")){let h=yield Ze(l);i.setAttribute("style",h)}}catch(l){}let s=t.querySelectorAll?t.querySelectorAll("style"):[];for(let i of s)try{let l=i.textContent||"";l.includes("blob:")&&(i.textContent=yield Ze(l))}catch(l){}let r=["poster"];for(let i of r){let l=t.querySelectorAll?t.querySelectorAll(`[${i}^='blob:']`):[];for(let h of l)try{let d=h.getAttribute(i);jt(d)&&h.setAttribute(i,yield $t(d))}catch(d){}}})}function en(n){return k(this,arguments,function*(t,e={}){let o=Array.from(t.querySelectorAll("img")),s=r=>k(null,null,function*(){var d,p,u,g;if(!r.getAttribute("src")){let c=r.currentSrc||r.src||"";c&&r.setAttribute("src",c)}r.removeAttribute("srcset"),r.removeAttribute("sizes");let a=r.src||"";if(!a)return;let f=yield X(a,{as:"dataURL",useProxy:e.useProxy});if(f.ok&&typeof f.data=="string"&&f.data.startsWith("data:")){r.src=f.data,r.width||(r.width=r.naturalWidth||100),r.height||(r.height=r.naturalHeight||100);return}let{fallbackURL:i}=e||{};if(i)try{let c=parseInt(((d=r.dataset)==null?void 0:d.snapdomWidth)||"",10)||0,m=parseInt(((p=r.dataset)==null?void 0:p.snapdomHeight)||"",10)||0,y=parseInt(r.getAttribute("width")||"",10)||0,w=parseInt(r.getAttribute("height")||"",10)||0,C=parseFloat(((u=r.style)==null?void 0:u.width)||"")||0,S=parseFloat(((g=r.style)==null?void 0:g.height)||"")||0,v=c||C||y||r.width||void 0,b=m||S||w||r.height||void 0,E=typeof i=="function"?yield i({width:v,height:b,src:a,element:r}):i;if(E){let A=yield X(E,{as:"dataURL",useProxy:e.useProxy});r.src=A.data,!r.width&&v&&(r.width=v),!r.height&&b&&(r.height=b),r.width||(r.width=r.naturalWidth||100),r.height||(r.height=r.naturalHeight||100);return}}catch(c){}let l=r.width||r.naturalWidth||100,h=r.height||r.naturalHeight||100;if(e.placeholders!==!1){let c=document.createElement("div");c.style.cssText=[`width:${l}px`,`height:${h}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${h}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),c.textContent="img",r.replaceWith(c)}else{let c=document.createElement("div");c.style.cssText=`display:inline-block;width:${l}px;height:${h}px;visibility:hidden;`,r.replaceWith(c)}});for(let r=0;r<o.length;r+=4){let a=o.slice(r,r+4).map(s);yield Promise.allSettled(a)}})}function zt(s,r,a){return k(this,arguments,function*(t,e,n,o={}){let f=[[t,e]],i=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],l=["mask-position","mask-size","mask-repeat","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],h=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],d=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];for(;f.length;){let[p,u]=f.shift(),g=n.get(p)||gt(p);n.has(p)||n.set(p,g);let c=(()=>{let w=g.getPropertyValue("border-image"),C=g.getPropertyValue("border-image-source");return w&&w!=="none"||C&&C!=="none"})();for(let w of h){let C=g.getPropertyValue(w);C&&u.style.setProperty(w,C)}for(let w of i){let C=g.getPropertyValue(w);if(!C||C==="none")continue;let S=Mt(C),v=yield Promise.all(S.map(b=>pt(b,o)));v.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&u.style.setProperty(w,v.join(", "))}for(let w of l){let C=g.getPropertyValue(w);!C||C==="initial"||u.style.setProperty(w,C)}if(c)for(let w of d){let C=g.getPropertyValue(w);!C||C==="initial"||u.style.setProperty(w,C)}let m=Array.from(p.children),y=Array.from(u.children).filter(w=>!(w.dataset&&w.dataset.snapdomPseudo));for(let w=0;w<Math.min(m.length,y.length);w++)f.push([m[w],y[w]])}})}function nn(t){var l;if(!t)return()=>{};let e=Ho(t);if(e<=0)return()=>{};if(!zo(t))return()=>{};let n=getComputedStyle(t),o=Math.round(qo(n)*e+jo(n)),s=(l=t.textContent)!=null?l:"",r=s;if(t.scrollHeight<=o+.5)return()=>{};let a=0,f=s.length,i=-1;for(;a<=f;){let h=a+f>>1;t.textContent=s.slice(0,h)+"\u2026",t.scrollHeight<=o+.5?(i=h,a=h+1):f=h-1}return t.textContent=(i>=0?s.slice(0,i):"")+"\u2026",()=>{t.textContent=r}}function Ho(t){let e=getComputedStyle(t),n=e.getPropertyValue("-webkit-line-clamp")||e.getPropertyValue("line-clamp");n=(n||"").trim();let o=parseInt(n,10);return Number.isFinite(o)&&o>0?o:0}function qo(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 jo(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function zo(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var It=[];function on(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 he(...t){let e=t.flat();for(let n of e){let o=on(n);o&&(It.some(s=>s&&s.name&&o.name&&s.name===o.name)||It.push(o))}}function rn(t){return(t&&Array.isArray(t.plugins)?t.plugins:It)||It}function st(t,e,n){return k(this,null,function*(){let o=n,s=rn(e);for(let r of s){let a=r&&typeof r[t]=="function"?r[t]:null;if(!a)continue;let f=yield a(e,o);typeof f!="undefined"&&(o=f)}return o})}function sn(t,e,n){return k(this,null,function*(){let o=[],s=rn(e);for(let r of s){let a=r&&typeof r[t]=="function"?r[t]:null;if(!a)continue;let f=yield a(e,n);typeof f!="undefined"&&o.push(f)}return o})}function Vo(t){let e=[];if(Array.isArray(t))for(let n of t){let o=on(n);if(!o||!o.name)continue;let s=e.findIndex(r=>r&&r.name===o.name);s>=0&&e.splice(s,1),e.push(o)}for(let n of It)n&&n.name&&!e.some(o=>o.name===n.name)&&e.push(n);return Object.freeze(e)}function an(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=Vo(e)),t}function Xo(t,e){if(!t||!e||!e.style)return;let n=getComputedStyle(t);try{e.style.boxShadow="none"}catch(r){}try{e.style.textShadow="none"}catch(r){}try{e.style.outline="none"}catch(r){}let s=(n.filter||"").replace(/\bblur\([^()]*\)\s*/gi,"").replace(/\bdrop-shadow\([^()]*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=s.length?s:"none"}catch(r){}}function Yo(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT),n=[];for(;e.nextNode();)n.push(e.currentNode);for(let o of n)o.remove()}function Ko(t,e={}){let{stripFrameworkDirectives:n=!0}=e,o=new Set(["xml","xlink"]),s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;s.nextNode();){let r=s.currentNode;for(let a of Array.from(r.attributes)){let f=a.name;if(f.includes("@")){r.removeAttribute(f);continue}if(f.includes(":")){let i=f.split(":",1)[0];if(!o.has(i)){r.removeAttribute(f);continue}}if(n&&(f.startsWith("x-")||f.startsWith("v-")||f.startsWith(":")||f.startsWith("on:")||f.startsWith("bind:")||f.startsWith("let:")||f.startsWith("class:"))){r.removeAttribute(f);continue}}}}function Go(t,e={}){t&&(Ko(t,e),Yo(t))}function ge(t,e){return k(this,null,function*(){var w;if(!t)throw new Error("Element cannot be null or undefined");Rt(e.cache);let n=e.fast,o=e.outerTransforms!==!1,s=!!e.outerShadows,r={element:t,options:e,plugins:e.plugins},a,f,i,l="",h="",d,p,u=null;yield st("beforeSnap",r),yield st("beforeClone",r);let g=nn(r.element);try{({clone:a,classCSS:f,styleCache:i}=yield tn(r.element,r.options)),!o&&a&&(u=nr(r.element,a)),!s&&a&&Xo(r.element,a)}finally{g()}if(r=$({clone:a,classCSS:f,styleCache:i},r),yield st("afterClone",r),Go(r.clone),((w=r.options)==null?void 0:w.excludeMode)==="remove")try{tr(r.element,r.clone,r.styleCache)}catch(C){console.warn("[snapdom] shrink pass failed:",C)}try{yield Te(r.clone,r.element)}catch(C){}yield new Promise(C=>{ct(()=>k(null,null,function*(){yield en(r.clone,r.options),C()}),{fast:n})}),yield new Promise(C=>{ct(()=>k(null,null,function*(){yield zt(r.element,r.clone,r.styleCache,r.options),C()}),{fast:n})}),e.embedFonts&&(yield new Promise(C=>{ct(()=>k(null,null,function*(){let S=Dt(r.element),v=Ht(r.element);if(Y()){let b=new Set(Array.from(S).map(E=>String(E).split("__")[0]).filter(Boolean));yield qt(b,1)}l=yield Bt({required:S,usedCodepoints:v,preCached:!1,exclude:r.options.excludeFonts,useProxy:r.options.useProxy}),C()}),{fast:n})}));let c=ee(r.clone).sort(),m=c.join(",");x.baseStyle.has(m)?h=x.baseStyle.get(m):yield new Promise(C=>{ct(()=>{h=ne(c),x.baseStyle.set(m,h),C()},{fast:n})}),r=$({fontsCSS:l,baseCSS:h},r),yield st("beforeRender",r),yield new Promise(C=>{ct(()=>{var xe;let S=getComputedStyle(r.element),v=r.element.getBoundingClientRect(),b=Math.max(1,I(r.element.offsetWidth||parseFloat(S.width)||v.width||1)),E=Math.max(1,I(r.element.offsetHeight||parseFloat(S.height)||v.height||1));if(((xe=r.options)==null?void 0:xe.excludeMode)==="remove"){let rt=hr(r.element,r.options);Number.isFinite(rt)&&rt>0&&(E=Math.max(1,Math.min(E,I(rt+1))))}let A=(rt,it=NaN)=>{let bt=typeof rt=="string"?parseFloat(rt):rt;return Number.isFinite(bt)?bt:it},N=A(r.options.width),L=A(r.options.height),O=b,q=E,V=Number.isFinite(N),K=Number.isFinite(L),ft=E>0?b/E:1;V&&K?(O=Math.max(1,I(N)),q=Math.max(1,I(L))):V?(O=Math.max(1,I(N)),q=Math.max(1,I(O/(ft||1)))):K?(q=Math.max(1,I(L)),O=Math.max(1,I(q*(ft||1)))):(O=b,q=E);let Z=0,F=0,M=b,T=E;if(!o&&u&&Number.isFinite(u.a)){let rt={a:u.a,b:u.b||0,c:u.c||0,d:u.d||1,e:0,f:0},it=cn(b,E,rt,0,0);Z=I(it.minX),F=I(it.minY),M=I(it.maxX),T=I(it.maxY)}else if(o&&ar(r.element)){let it=S.transform&&S.transform!=="none"?S.transform:"",bt=ir(r.element),Kt=ur({baseTransform:it,rotate:bt.rotate||"0deg",scale:bt.scale,translate:bt.translate}),{ox:xn,oy:Sn}=lr(S,b,E),Cn=Kt.is2D?Kt:new DOMMatrix(Kt.toString()),Nt=cn(b,E,Cn,xn,Sn);Z=I(Nt.minX),F=I(Nt.minY),M=I(Nt.maxX),T=I(Nt.maxY)}let U=or(S),D=rr(S),_=sr(S),R=er(S),P=s?{top:I(U.top+D.top+_.top+R.bleed.top),right:I(U.right+D.right+_.right+R.bleed.right),bottom:I(U.bottom+D.bottom+_.bottom+R.bleed.bottom),left:I(U.left+D.left+_.left+R.bleed.left)}:{top:0,right:0,bottom:0,left:0};Z=I(Z-P.left),F=I(F-P.top),M=I(M+P.right),T=I(T+P.bottom);let j=Math.max(1,I(M-Z)),z=Math.max(1,I(T-F)),G=V||K?I(O/b):1,Q=K||V?I(q/E):1,H=Math.max(1,I(j*G)),J=Math.max(1,I(z*Q)),ot="http://www.w3.org/2000/svg",ut=Y()?1:0,tt=I(ut+(o?0:1)),et=document.createElementNS(ot,"foreignObject"),pn=I(Z),gn=I(F);et.setAttribute("x",String(I(-(pn-tt)))),et.setAttribute("y",String(I(-(gn-tt)))),et.setAttribute("width",String(I(b+tt*2))),et.setAttribute("height",String(I(E+tt*2))),et.style.overflow="visible";let we=document.createElement("style");we.textContent=r.baseCSS+r.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+r.classCSS,et.appendChild(we);let wt=document.createElement("div");wt.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),wt.style.width=`${I(b)}px`,wt.style.height=`${I(E)}px`,wt.style.overflow="visible",r.clone.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),wt.appendChild(r.clone),et.appendChild(wt);let yn=new XMLSerializer().serializeToString(et),Xt=I(j+tt*2),Yt=I(z+tt*2),be=V||K;e.meta={w0:b,h0:E,vbW:Xt,vbH:Yt,targetW:O,targetH:q};let wn=Y()&&be?Xt:I(H+tt*2),bn=Y()&&be?Yt:I(J+tt*2);p=`<svg xmlns="${ot}" width="${wn}" height="${bn}" viewBox="0 0 ${Xt} ${Yt}">`+yn+"</svg>",d=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,r=$({svgString:p,dataURL:d},r),C()},{fast:n})}),yield st("afterRender",r);let y=document.getElementById("snapdom-sandbox");return y&&y.style.position==="absolute"&&y.remove(),r.dataURL})}function Qo(t){var e;try{let n=((e=t.getAttribute)==null?void 0:e.call(t,"style"))||"";return/\b(height|width|block-size|inline-size)\s*:/.test(n)}catch(n){return!1}}function Jo(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof HTMLIFrameElement||t instanceof SVGElement||t instanceof HTMLObjectElement||t instanceof HTMLEmbedElement}function Zo(t,e){if(!(t instanceof Element)||Qo(t)||Jo(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 tr(t,e,n=new Map){function o(s,r){if(!(s instanceof Element)||!(r instanceof Element))return;let a=s.childElementCount>r.childElementCount,f=n.get(s)||getComputedStyle(s);if(n.has(s)||n.set(s,f),a&&Zo(s,f)){r.style.height||(r.style.height="auto"),r.style.width||(r.style.width="auto"),r.style.removeProperty("block-size"),r.style.removeProperty("inline-size"),r.style.minHeight||(r.style.minHeight="0"),r.style.minWidth||(r.style.minWidth="0"),r.style.maxHeight||(r.style.maxHeight="none"),r.style.maxWidth||(r.style.maxWidth="none");let h=f.overflowY||f.overflowBlock||"visible",d=f.overflowX||f.overflowInline||"visible";(h!=="visible"||d!=="visible")&&(r.style.overflow="visible")}let i=Array.from(s.children),l=Array.from(r.children);for(let h=0;h<Math.min(i.length,l.length);h++)o(i[h],l[h])}o(t,e)}var I=(t,e=3)=>Number.isFinite(t)?Math.round(t*Gt(10,e))/Gt(10,e):t;function er(t){var i;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,s=0,r=0,a=0,f=!1;for(let l of n){f=!0;let h=((i=l.match(/-?\d+(?:\.\d+)?px/gi))==null?void 0:i.map(m=>parseFloat(m)))||[],[d=0,p=0,u=0]=h,g=Math.abs(d)+u,c=Math.abs(p)+u;s=Math.max(s,g+Math.max(d,0)),a=Math.max(a,g+Math.max(-d,0)),r=Math.max(r,c+Math.max(p,0)),o=Math.max(o,c+Math.max(-p,0))}return{bleed:{top:I(o),right:I(s),bottom:I(r),left:I(a)},has:f}}function nr(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch(r){}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch(r){}let o=n.transform||"none";if(!o||o==="none")try{let r=ln(t);if(r.a===1&&r.b===0&&r.c===0&&r.d===1)return e.style.transform="none",{a:1,b:0,c:0,d:1}}catch(r){}let s=o.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let r=s[1].split(",").map(a=>parseFloat(a.trim()));if(r.length===6&&r.every(Number.isFinite)){let[a,f,i,l]=r,h=Math.sqrt(a*a+f*f)||0,d=0,p=0,u=0,g=0,c=0,m=0;h>0&&(d=a/h,p=f/h,u=d*i+p*l,g=i-d*u,c=l-p*u,m=Math.sqrt(g*g+c*c)||0,m>0?u=u/m:u=0);let y=h,w=0,C=u*m,S=m;try{e.style.transform=`matrix(${y}, ${w}, ${C}, ${S}, 0, 0)`}catch(v){}return{a:y,b:w,c:C,d:S}}}try{let r=String(o).trim();return e.style.transform=r+" translate(0px, 0px) rotate(0deg)",null}catch(r){return null}}function or(t){var f;let e=t.boxShadow||"";if(!e||e==="none")return{top:0,right:0,bottom:0,left:0};let n=e.split(/\),(?=(?:[^()]*\([^()]*\))*[^()]*$)/).map(i=>i.trim()),o=0,s=0,r=0,a=0;for(let i of n){let l=((f=i.match(/-?\d+(\.\d+)?px/g))==null?void 0:f.map(m=>parseFloat(m)))||[];if(l.length<2)continue;let[h,d,p=0,u=0]=l,g=Math.abs(h)+p+u,c=Math.abs(d)+p+u;s=Math.max(s,g+Math.max(h,0)),a=Math.max(a,g+Math.max(-h,0)),r=Math.max(r,c+Math.max(d,0)),o=Math.max(o,c+Math.max(-d,0))}return{top:Math.ceil(o),right:Math.ceil(s),bottom:Math.ceil(r),left:Math.ceil(a)}}function rr(t){let e=(t.filter||"").match(/blur\(\s*([0-9.]+)px\s*\)/),n=e?Math.ceil(parseFloat(e[1])||0):0;return{top:n,right:n,bottom:n,left:n}}function sr(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0);return{top:e,right:e,bottom:e,left:e}}function cn(t,e,n,o,s){let r=n.a,a=n.b,f=n.c,i=n.d,l=n.e||0,h=n.f||0;function d(y,w){let C=y-o,S=w-s,v=r*C+f*S,b=a*C+i*S;return v+=o+l,b+=s+h,[v,b]}let p=[d(0,0),d(t,0),d(0,e),d(t,e)],u=1/0,g=1/0,c=-1/0,m=-1/0;for(let[y,w]of p)y<u&&(u=y),w<g&&(g=w),y>c&&(c=y),w>m&&(m=w);return{minX:u,minY:g,maxX:c,maxY:m,width:c-u,height:m-g}}function ar(t){return cr(t)}function ln(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch(n){return new WebKitCSSMatrix(e)}}function ir(t){var s,r,a,f,i,l,h,d;let e={rotate:"0deg",scale:null,translate:null},n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null;if(n){let p=m=>{try{return typeof n.has=="function"&&!n.has(m)||typeof n.get!="function"?null:n.get(m)}catch(y){return null}},u=p("rotate");if(u)if(u.angle){let m=u.angle;e.rotate=m.unit==="rad"?m.value*180/Math.PI+"deg":m.value+m.unit}else u.unit?e.rotate=u.unit==="rad"?u.value*180/Math.PI+"deg":u.value+u.unit:e.rotate=String(u);else{let m=getComputedStyle(t);e.rotate=m.rotate&&m.rotate!=="none"?m.rotate:"0deg"}let g=p("scale");if(g){let m="x"in g&&((s=g.x)==null?void 0:s.value)!=null?g.x.value:Array.isArray(g)?(r=g[0])==null?void 0:r.value:Number(g)||1,y="y"in g&&((a=g.y)==null?void 0:a.value)!=null?g.y.value:Array.isArray(g)?(f=g[1])==null?void 0:f.value:m;e.scale=`${m} ${y}`}else{let m=getComputedStyle(t);e.scale=m.scale&&m.scale!=="none"?m.scale:null}let c=p("translate");if(c){let m="x"in c&&"value"in c.x?c.x.value:Array.isArray(c)?(i=c[0])==null?void 0:i.value:0,y="y"in c&&"value"in c.y?c.y.value:Array.isArray(c)?(l=c[1])==null?void 0:l.value:0,w="x"in c&&((h=c.x)!=null&&h.unit)?c.x.unit:"px",C="y"in c&&((d=c.y)!=null&&d.unit)?c.y.unit:"px";e.translate=`${m}${w} ${y}${C}`}else{let m=getComputedStyle(t);e.translate=m.translate&&m.translate!=="none"?m.translate:null}return 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 cr(t){let e=getComputedStyle(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 s=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",r=e.scale&&e.scale!=="none"&&e.scale!=="1",a=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(s||r||a)}function lr(t,e,n){let o=(t.transformOrigin||"0 0").trim().split(/\s+/),[s,r]=[o[0]||"0",o[1]||"0"],a=(f,i)=>{let l=f.toLowerCase();return l==="left"||l==="top"?0:l==="center"?i/2:l==="right"||l==="bottom"?i:l.endsWith("px")?parseFloat(l)||0:l.endsWith("%")?(parseFloat(l)||0)*i/100:/^-?\d+(\.\d+)?$/.test(l)&&parseFloat(l)||0};return{ox:a(s,e),oy:a(r,n)}}var pe=null;function fr(){if(pe)return pe;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),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),pe=t,t}function ur(t){let e=fr(),n=document.createElement("div");n.style.transformOrigin="0 0",t.baseTransform&&(n.style.transform=t.baseTransform),t.rotate&&(n.style.rotate=t.rotate),t.scale&&(n.style.scale=t.scale),t.translate&&(n.style.translate=t.translate),e.appendChild(n);let o=ln(n);return e.removeChild(n),o}function dr(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed"||e.position==="sticky"||(e.cssFloat||e.float||"none")!=="none"||e.transform&&e.transform!=="none")}function mr(t,e){if(!(t instanceof Element))return!1;if(t.getAttribute("data-capture")==="exclude"&&(e==null?void 0:e.excludeMode)==="remove")return!0;if(Array.isArray(e==null?void 0:e.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(o){}return!1}function hr(t,e){let n=getComputedStyle(t),o=t.getBoundingClientRect(),s=1/0,r=-1/0,a=!1,f=Array.from(t.children);for(let u of f){if(mr(u,e)||!dr(u))continue;let g=u.getBoundingClientRect(),c=g.top-o.top,m=g.bottom-o.top;m<=c||(c<s&&(s=c),m>r&&(r=m),a=!0)}let i=a?Math.max(0,r-s):0,l=parseFloat(n.borderTopWidth)||0,h=parseFloat(n.borderBottomWidth)||0,d=parseFloat(n.paddingTop)||0,p=parseFloat(n.paddingBottom)||0;return l+h+d+p+i}function pr(t){if(typeof t=="string"){let e=t.toLowerCase().trim();if(e==="disabled"||e==="full"||e==="auto"||e==="soft")return e}return"soft"}function fn(t={}){var o,s,r,a,f,i,l,h,d,p,u,g,c,m,y,w,C,S,v,b;let e=(o=t.format)!=null?o:"png";e==="jpg"&&(e="jpeg");let n=pr(t.cache);return{debug:(s=t.debug)!=null?s:!1,fast:(r=t.fast)!=null?r:!0,scale:(a=t.scale)!=null?a:1,exclude:(f=t.exclude)!=null?f:[],excludeMode:(i=t.excludeMode)!=null?i:"hide",filter:(l=t.filter)!=null?l:null,filterMode:(h=t.filterMode)!=null?h:"hide",placeholders:t.placeholders!==!1,embedFonts:(d=t.embedFonts)!=null?d:!1,iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:(p=t.excludeFonts)!=null?p:void 0,fallbackURL:(u=t.fallbackURL)!=null?u:void 0,cache:n,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:(g=t.width)!=null?g:null,height:(c=t.height)!=null?c:null,format:e,type:(m=t.type)!=null?m:"svg",quality:(y=t.quality)!=null?y:.92,dpr:(w=t.dpr)!=null?w:window.devicePixelRatio||1,backgroundColor:(C=t.backgroundColor)!=null?C:["jpeg","webp"].includes(e)?"#ffffff":null,filename:(S=t.filename)!=null?S:"snapDOM",outerTransforms:(v=t.outerTransforms)!=null?v:!0,outerShadows:(b=t.outerShadows)!=null?b:!1}}function gr(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function yr(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function wr(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function br(t){let e=[],n="",o=0;for(let s=0;s<t.length;s++){let r=t[s];r==="("&&o++,r===")"&&(o=Math.max(0,o-1)),r===";"&&o===0?(e.push(n),n=""):n+=r}return n.trim()&&e.push(n),e.map(s=>s.trim()).filter(Boolean)}function xr(t){let e=[],n="",o=0;for(let r=0;r<t.length;r++){let a=t[r];a==="("&&o++,a===")"&&(o=Math.max(0,o-1)),a===","&&o===0?(e.push(n.trim()),n=""):n+=a}n.trim()&&e.push(n.trim());let s=[];for(let r of e){if(/\binset\b/i.test(r))continue;let a=r.match(/-?\d+(?:\.\d+)?px/gi)||[],[f="0px",i="0px",l="0px"]=a,h=r.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),d=!!h&&h!==",";s.push(`drop-shadow(${f} ${i} ${l}${d?` ${h}`:""})`)}return s.join(" ")}function un(t){let e=br(t),n=null,o=null,s=null,r=[];for(let f of e){let i=f.indexOf(":");if(i<0)continue;let l=f.slice(0,i).trim().toLowerCase(),h=f.slice(i+1).trim();l==="box-shadow"?s=h:l==="filter"?n=h:l==="-webkit-filter"?o=h:r.push([l,h])}if(s){let f=xr(s);f&&(n=n?`${n} ${f}`:f,o=o?`${o} ${f}`:f)}let a=[...r];return n&&a.push(["filter",n]),o&&a.push(["-webkit-filter",o]),a.map(([f,i])=>`${f}:${i}`).join(";")}function Sr(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,o)=>`${n}{${un(o)}}`)}function Cr(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,Sr(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,o)=>`style=${n}${un(o)}${n}`),t}function kr(t){if(!Y()||!gr(t))return t;try{let e=yr(t),n=Cr(e);return wr(n)}catch(e){return t}}function lt(t,e){return k(this,null,function*(){let{width:n,height:o,scale:s=1,dpr:r=1,meta:a={},backgroundColor:f}=e;t=kr(t);let i=new Image;i.loading="eager",i.decoding="sync",i.crossOrigin="anonymous",i.src=t,yield i.decode();let l=i.naturalWidth,h=i.naturalHeight,d=Number.isFinite(a.w0)?a.w0:l,p=Number.isFinite(a.h0)?a.h0:h,u,g,c=Number.isFinite(n),m=Number.isFinite(o);if(c&&m)u=Math.max(1,n),g=Math.max(1,o);else if(c){let C=n/Math.max(1,d);u=n,g=p*C}else if(m){let C=o/Math.max(1,p);g=o,u=d*C}else u=l,g=h;u=u*s,g=g*s;let y=document.createElement("canvas");y.width=u*r,y.height=g*r,y.style.width=`${u}px`,y.style.height=`${g}px`;let w=y.getContext("2d");return r!==1&&w.scale(r,r),f&&(w.save(),w.fillStyle=f,w.fillRect(0,0,u,g),w.restore()),w.drawImage(i,0,0,u,g),y})}function at(t,e){return k(this,null,function*(){let n=yield lt(t,e),o=new Image;return o.src=n.toDataURL(`image/${e.format}`,e.quality),yield o.decode(),o.style.width=`${n.width/e.dpr}px`,o.style.height=`${n.height/e.dpr}px`,o})}function At(t,e){return k(this,null,function*(){let{scale:n=1,width:o,height:s,meta:r={}}=e,a=Number.isFinite(o),f=Number.isFinite(s),i=Number.isFinite(n)&&n!==1||a||f;if(Y()&&i)return yield at(t,W($({},e),{format:"png",quality:1,meta:r}));let l=new Image;if(l.decoding="sync",l.loading="eager",l.src=t,yield l.decode(),a&&f)l.style.width=`${o}px`,l.style.height=`${s}px`;else if(a){let h=Number.isFinite(r.w0)?r.w0:l.naturalWidth,d=Number.isFinite(r.h0)?r.h0:l.naturalHeight,p=o/Math.max(1,h);l.style.width=`${o}px`,l.style.height=`${Math.round(d*p)}px`}else if(f){let h=Number.isFinite(r.w0)?r.w0:l.naturalWidth,d=Number.isFinite(r.h0)?r.h0:l.naturalHeight,p=s/Math.max(1,d);l.style.height=`${s}px`,l.style.width=`${Math.round(h*p)}px`}else{let h=Math.round(l.naturalWidth*n),d=Math.round(l.naturalHeight*n);if(l.style.width=`${h}px`,l.style.height=`${d}px`,typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let u=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${h}"`).replace(/height="[^"]*"/,`height="${d}"`);t=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(u)}`,l.src=t}catch(p){}}return l})}function Lt(t,e){return k(this,null,function*(){let n=e.type;if(n==="svg"){let s=decodeURIComponent(t.split(",")[1]);return new Blob([s],{type:"image/svg+xml"})}let o=yield lt(t,e);return new Promise(s=>o.toBlob(r=>s(r),`image/${n}`,e.quality))})}function dn(t,e){return k(this,null,function*(){if(e.dpr=1,e.format==="svg"){let s=yield Lt(t,W($({},e),{type:"svg"})),r=URL.createObjectURL(s),a=document.createElement("a");a.href=r,a.download=e.filename,a.click(),URL.revokeObjectURL(r);return}let n=yield lt(t,e),o=document.createElement("a");o.href=n.toDataURL(`image/${e.format}`,e.quality),o.download=e.filename,o.click()})}B.plugins=(...t)=>(he(...t),B);var mn=Symbol("snapdom.internal"),mt=Symbol("snapdom.internal.silent"),ye=!1;function B(t,e){return k(this,null,function*(){if(!t)throw new Error("Element cannot be null or undefined");let n=fn(e);if(an(n,e&&e.plugins),Y()&&(n.embedFonts===!0||Mr(t)))for(let o=0;o<3;o++)try{yield Ar(t,e),console.log("safariWarmup:",o),ye=!1}catch(s){}return n.iconFonts&&n.iconFonts.length>0&&Re(n.iconFonts),n.snap||(n.snap={toPng:(o,s)=>B.toPng(o,s),toSvg:(o,s)=>B.toSvg(o,s)}),B.capture(t,n,mn)})}B.plugins=(...t)=>(he(...t),B);B.capture=(t,e,n)=>k(null,null,function*(){if(n!==mn)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");let o=yield ge(t,e),s={img:(c,m)=>k(null,null,function*(){return At(o,$($({},c),m||{}))}),svg:(c,m)=>k(null,null,function*(){return At(o,$($({},c),m||{}))}),canvas:(c,m)=>k(null,null,function*(){return lt(o,$($({},c),m||{}))}),blob:(c,m)=>k(null,null,function*(){return Lt(o,$($({},c),m||{}))}),png:(c,m)=>k(null,null,function*(){return at(o,W($($({},c),m||{}),{format:"png"}))}),jpeg:(c,m)=>k(null,null,function*(){return at(o,W($($({},c),m||{}),{format:"jpeg"}))}),webp:(c,m)=>k(null,null,function*(){return at(o,W($($({},c),m||{}),{format:"webp"}))}),download:(c,m)=>k(null,null,function*(){return dn(o,$($({},c),m||{}))})},r={svg:c=>At(o,W($($({},e),c||{}),{[mt]:!0})),canvas:c=>lt(o,W($($({},e),c||{}),{[mt]:!0})),png:c=>at(o,W($($({},e),c||{}),{format:"png",[mt]:!0})),jpeg:c=>at(o,W($($({},e),c||{}),{format:"jpeg",[mt]:!0})),jpg:c=>at(o,W($($({},e),c||{}),{format:"jpeg",[mt]:!0})),webp:c=>at(o,W($($({},e),c||{}),{format:"webp",[mt]:!0})),blob:c=>Lt(o,W($($({},e),c||{}),{[mt]:!0})),img:c=>At(o,W($($({},e),c||{}),{[mt]:!0}))},a=W($({},e),{export:{url:o},exports:r}),f=yield sn("defineExports",a),i=Object.assign({},...f.filter(c=>c&&typeof c=="object")),l=$($({},s),i);l.jpeg&&!l.jpg&&(l.jpg=(c,m)=>l.jpeg(c,m));function h(c,m){let y=$($({},e),m||{});return(c==="jpeg"||c==="jpg")&&(y.backgroundColor==null||y.backgroundColor==="transparent")&&(y.backgroundColor="#ffffff"),y}let d=!1,p=Promise.resolve();function u(c,m){return k(this,null,function*(){let y=()=>k(null,null,function*(){let w=l[c];if(!w)throw new Error(`[snapdom] Unknown export type: ${c}`);let C=h(c,m),S=W($({},e),{export:{type:c,options:C,url:o}});yield st("beforeExport",S);let v=yield w(S,C);return yield st("afterExport",S,v),d||(d=!0,yield st("afterSnap",e)),v});return p=p.then(y)})}let g={url:o,toRaw:()=>o,to:(c,m)=>u(c,m),toImg:c=>u("img",c),toSvg:c=>u("svg",c),toCanvas:c=>u("canvas",c),toBlob:c=>u("blob",c),toPng:c=>u("png",c),toJpg:c=>u("jpg",c),toWebp:c=>u("webp",c),download:c=>u("download",c)};for(let c of Object.keys(l)){let m="to"+c.charAt(0).toUpperCase()+c.slice(1);g[m]||(g[m]=y=>u(c,y))}return g});B.toRaw=(t,e)=>B(t,e).then(n=>n.toRaw());B.toImg=(t,e)=>B(t,e).then(n=>n.toImg());B.toSvg=(t,e)=>B(t,e).then(n=>n.toSvg());B.toCanvas=(t,e)=>B(t,e).then(n=>n.toCanvas());B.toBlob=(t,e)=>B(t,e).then(n=>n.toBlob());B.toPng=(t,e)=>B(t,W($({},e),{format:"png"})).then(n=>n.toPng());B.toJpg=(t,e)=>B(t,W($({},e),{format:"jpeg"})).then(n=>n.toJpg());B.toWebp=(t,e)=>B(t,W($({},e),{format:"webp"})).then(n=>n.toWebp());B.download=(t,e)=>B(t,e).then(n=>n.download());function Ar(t,e){return k(this,null,function*(){if(ye)return;let n=W($({},e),{fast:!0,embedFonts:!0,scale:.2}),o;try{o=yield ge(t,n)}catch(s){}yield new Promise(s=>requestAnimationFrame(()=>requestAnimationFrame(s))),o&&(yield new Promise(s=>{let r=new Image;try{r.decoding="sync",r.loading="eager"}catch(a){}r.style.cssText="position:fixed;left:0px;top:0px;width:10px;height:10px;opacity:0.01;pointer-events:none;",r.src=o,document.body.appendChild(r),k(null,null,function*(){try{typeof r.decode=="function"&&(yield r.decode())}catch(f){}let a=performance.now();for(;!(r.complete&&r.naturalWidth>0)&&performance.now()-a<900;)yield new Promise(f=>setTimeout(f,50));yield new Promise(f=>requestAnimationFrame(f));try{r.remove()}catch(f){}s()})})),t.querySelectorAll("canvas").forEach(s=>{try{let r=s.getContext("2d",{willReadFrequently:!0});r&&r.getImageData(0,0,1,1)}catch(r){}}),ye=!0})}function Mr(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();){let n=e.currentNode,o=getComputedStyle(n),s=o.backgroundImage&&o.backgroundImage!=="none",r=o.maskImage&&o.maskImage!=="none"||o.webkitMaskImage&&o.webkitMaskImage!=="none";if(s||r||n.tagName==="CANVAS")return!0}return!1}function hn(){return k(this,arguments,function*(t=document,e={}){var i,l,h,d,p,u;let{embedFonts:n=!0,useProxy:o=""}=e,s=(l=(i=e.cache)!=null?i:e.cacheOpt)!=null?l:"full";Rt(s);try{yield(h=document.fonts)==null?void 0:h.ready}catch(g){}try{Zt()}catch(g){}x.session=x.session||{},x.session.styleCache||(x.session.styleCache=new WeakMap),x.image=x.image||new Map,x.background=x.background||new Map;try{yield zt(t,void 0,x.session.styleCache,{useProxy:o})}catch(g){}let r=[],a=[];try{if(t&&t.nodeType===1){let g=t.querySelectorAll?Array.from(t.querySelectorAll("*")):[];a=[t,...g],r=[],t.tagName==="IMG"&&t.getAttribute("src")&&r.push(t),r.push(...Array.from(((d=t.querySelectorAll)==null?void 0:d.call(t,"img[src]"))||[]))}else t!=null&&t.querySelectorAll&&(r=Array.from(t.querySelectorAll("img[src]")),a=Array.from(t.querySelectorAll("*")))}catch(g){}let f=[];for(let g of r){let c=(g==null?void 0:g.currentSrc)||(g==null?void 0:g.src);if(c&&!x.image.has(c)){let m=Promise.resolve().then(()=>k(null,null,function*(){let y=yield X(c,{as:"dataURL",useProxy:o});y!=null&&y.ok&&typeof y.data=="string"&&x.image.set(c,y.data)})).catch(()=>{});f.push(m)}}for(let g of a){let c="";try{c=((p=g==null?void 0:g.style)==null?void 0:p.backgroundImage)||"",(!c||c==="none")&&(c=gt(g).backgroundImage)}catch(m){}if(c&&c!=="none"){let m=c.match(/url\((?:[^()"']+|"(?:[^"]*)"|'(?:[^']*)')\)/gi)||[];for(let y of m){let w=Promise.resolve().then(()=>pt(y,W($({},e),{useProxy:o}))).catch(()=>{});f.push(w)}}}if(n)try{let g=Dt(t),c=Ht(t);if(typeof Y=="function"?Y():!!Y){let y=new Set(Array.from(g).map(w=>String(w).split("__")[0]).filter(Boolean));yield qt(y,3)}yield Bt({required:g,usedCodepoints:c,exclude:e.excludeFonts,localFonts:e.localFonts,useProxy:(u=e.useProxy)!=null?u:o})}catch(g){}yield Promise.allSettled(f)})}typeof window!="undefined"&&(window.snapdom=B,window.preCache=hn);})();
|
|
1
|
+
(()=>{var Zn=Object.defineProperty,tr=Object.defineProperties;var er=Object.getOwnPropertyDescriptors;var ve=Object.getOwnPropertySymbols;var nr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable;var ee=Math.pow,Ee=(t,e,n)=>e in t?Zn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F=(t,e)=>{for(var n in e||(e={}))nr.call(e,n)&&Ee(t,n,e[n]);if(ve)for(var n of ve(e))rr.call(e,n)&&Ee(t,n,e[n]);return t},O=(t,e)=>tr(t,er(e));var k=(t,e,n)=>new Promise((r,s)=>{var o=c=>{try{u(n.next(c))}catch(l){s(l)}},i=c=>{try{u(n.throw(c))}catch(l){s(l)}},u=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,i);u((n=n.apply(t,e)).next())});var x={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}};function Ot(t="soft"){switch(x.session.__counterEpoch=(x.session.__counterEpoch||0)+1,t){case"auto":{x.session.styleMap=new Map,x.session.nodeMap=new Map;return}case"soft":{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap,x.computedStyle=new WeakMap,x.baseStyle=new Map,x.defaultStyle=new Map,x.image=new Map,x.background=new Map,x.resource=new Map,x.font=new Set;return}default:{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap;return}}}function ht(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function ne(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let s=r.split(",").map(o=>o.trim());return s.length!==6?`matrix(${r})`:(s[4]="0",s[5]="0",`matrix(${s.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let s=r.split(",").map(o=>o.trim());return s.length!==16?`matrix3d(${r})`:(s[12]="0",s[13]="0",`matrix3d(${s.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function dt(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch(e){return t}}function or(t="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let r=new Map,s=0;function o(i,u,c){if(s>=n)return;let l=Date.now();(r.get(u)||0)>l||(r.set(u,l+e),s++,i==="warn"&&console&&console.warn?console.warn(`${t} ${c}`):console&&console.error&&console.error(`${t} ${c}`))}return{warnOnce(i,u){o("warn",i,u)},errorOnce(i,u){o("error",i,u)},reset(){r.clear(),s=0}}}var Fe=or("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),re=new Map,Ut=new Map;function sr(t){return/^data:|^blob:|^about:blank$/i.test(t)}function ir(t,e){try{let n=typeof location!="undefined"&&location.href?location.href:"http://localhost/",r=e.includes("{url}")?e.split("{url}")[0]:e,s=new URL(r||".",n),o=new URL(t,n);if(o.origin===s.origin)return!0;let i=o.searchParams;if(i&&(i.has("url")||i.has("target")))return!0}catch(n){}return!1}function ar(t,e){if(!e||sr(t)||ir(t,e))return!1;try{let n=typeof location!="undefined"&&location.href?location.href:"http://localhost/",r=new URL(t,n);return typeof location!="undefined"?r.origin!==location.origin:!0}catch(n){return!!e}}function cr(t,e){if(!e)return t;if(e.includes("{url}"))return e.replace("{urlRaw}",dt(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}${dt(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function $e(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(t)})}function lr(t,e){var n,r;return[e.as||"blob",(n=e.timeout)!=null?n:3e3,e.useProxy||"",(r=e.errorTTL)!=null?r:8e3,t].join("|")}function Y(n){return k(this,arguments,function*(t,e={}){var y,w,C;let r=(y=e.as)!=null?y:"blob",s=(w=e.timeout)!=null?w:3e3,o=e.useProxy||"",i=(C=e.errorTTL)!=null?C:8e3,u=e.headers||{},c=!!e.silent;if(/^data:/i.test(t))try{if(r==="text")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1};if(r==="dataURL")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1,mime:String(t).slice(5).split(";")[0]||""};let[,S="",v=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],E=/;base64/i.test(S)?atob(v):decodeURIComponent(v),A=new Uint8Array([...E].map(R=>R.charCodeAt(0))),N=new Blob([A],{type:(S||"").split(";")[0]||""});return{ok:!0,data:N,status:200,url:t,fromCache:!1,mime:N.type||""}}catch(S){return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let S=yield fetch(t);if(!S.ok)return{ok:!1,data:null,status:S.status,url:t,fromCache:!1,reason:"http_error"};let v=yield S.blob(),b=v.type||S.headers.get("content-type")||"";return r==="dataURL"?{ok:!0,data:yield $e(v),status:S.status,url:t,fromCache:!1,mime:b}:r==="text"?{ok:!0,data:yield v.text(),status:S.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:v,status:S.status,url:t,fromCache:!1,mime:b}}catch(S){return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return r==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:r==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let l=lr(t,{as:r,timeout:s,useProxy:o,errorTTL:i}),d=Ut.get(l);if(d&&d.until>Date.now())return O(F({},d.result),{fromCache:!0});d&&Ut.delete(l);let f=re.get(l);if(f)return f;let h=ar(t,o)?cr(t,o):t,g=e.credentials;if(!g)try{let S=typeof location!="undefined"&&location.href?location.href:"http://localhost/",v=new URL(t,S);g=typeof location!="undefined"&&v.origin===location.origin?"include":"omit"}catch(S){g="omit"}let m=new AbortController,a=setTimeout(()=>m.abort("timeout"),s),p=k(null,null,function*(){var S,v;try{let b=yield fetch(h,{signal:m.signal,credentials:g,headers:u});if(!b.ok){let N={ok:!1,data:null,status:b.status,url:h,fromCache:!1,reason:"http_error"};if(i>0&&Ut.set(l,{until:Date.now()+i,result:N}),!c){let R=`${b.status} ${b.statusText||""}`.trim();Fe.warnOnce(`http:${b.status}:${r}:${new URL(t,(S=location==null?void 0:location.href)!=null?S:"http://localhost/").origin}`,`HTTP error ${R} while fetching ${r} ${t}`)}return e.onError&&e.onError(N),N}if(r==="text")return{ok:!0,data:yield b.text(),status:b.status,url:h,fromCache:!1};let E=yield b.blob(),A=E.type||b.headers.get("content-type")||"";return r==="dataURL"?{ok:!0,data:yield $e(E),status:b.status,url:h,fromCache:!1,mime:A}:{ok:!0,data:E,status:b.status,url:h,fromCache:!1,mime:A}}catch(b){let E=b&&typeof b=="object"&&"name"in b&&b.name==="AbortError"?String(b.message||"").includes("timeout")?"timeout":"abort":"network",A={ok:!1,data:null,status:0,url:h,fromCache:!1,reason:E};if(!/^blob:/i.test(t)&&i>0&&Ut.set(l,{until:Date.now()+i,result:A}),!c){let N=`${E}:${r}:${new URL(t,(v=location==null?void 0:location.href)!=null?v:"http://localhost/").origin}`,R=E==="timeout"?`Timeout after ${s}ms. Consider increasing timeout or using a proxy for ${t}`:E==="abort"?`Request aborted while fetching ${r} ${t}`:`Network/CORS issue while fetching ${r} ${t}. A proxy may be required`;Fe.errorOnce(N,R)}return e.onError&&e.onError(A),A}finally{clearTimeout(a),re.delete(l)}});return re.set(l,p),p})}function gt(n){return k(this,arguments,function*(t,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let s=ht(t);if(!s)return t;let o=dt(s);if(x.background.has(o)){let i=x.background.get(o);return i?`url("${i}")`:"none"}try{let i=yield Y(o,{as:"dataURL",useProxy:e.useProxy});return i.ok?(x.background.set(o,i.data),`url("${i.data}")`):(x.background.set(o,null),"none")}catch(i){return x.background.set(o,null),"none"}})}var Bt=new Set(["meta","script","noscript","title","link","template"]),xt=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),ur=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];function oe(){for(let t of ur){let e=String(t).toLowerCase();Bt.has(e)||xt.has(e)||se(e)}}function se(t){if(t=String(t).toLowerCase(),xt.has(t)){let o={};return x.defaultStyle.set(t,o),o}if(x.defaultStyle.has(t))return x.defaultStyle.get(t);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t);n.style.all="initial",e.appendChild(n);let r=getComputedStyle(n),s={};for(let o of r){if(Ie(o))continue;let i=r.getPropertyValue(o);s[o]=i}return e.removeChild(n),x.defaultStyle.set(t,s),s}var fr=/(?:^|-)(animation|transition)(?:-|$)/i,dr=/^(--|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,mr=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"]);function Ie(t){let e=String(t).toLowerCase();return!!(mr.has(e)||dr.test(e)||fr.test(e))}function St(t,e){if(e=String(e||"").toLowerCase(),xt.has(e))return"";let n=[],r=se(e);for(let[s,o]of Object.entries(t)){if(Ie(s))continue;let i=r[s];o&&o!==i&&n.push(`${s}:${o}`)}return n.sort(),n.join(";")}function ie(t){let e=new Set;return t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(t.tagName&&e.add(t.tagName.toLowerCase()),typeof t.querySelectorAll=="function"&&t.querySelectorAll("*").forEach(n=>e.add(n.tagName.toLowerCase())),Array.from(e))}function ae(t){let e=new Map;for(let r of t){let s=x.defaultStyle.get(r);if(!s)continue;let o=Object.entries(s).map(([i,u])=>`${i}:${u};`).sort().join("");o&&(e.has(o)||e.set(o,[]),e.get(o).push(r))}let n="";for(let[r,s]of e.entries())n+=`${s.join(",")} { ${r} }
|
|
2
|
+
`;return n}function ce(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,r=1;for(let s of e)n.set(s,`c${r++}`);return n}function yt(t,e=null){if(!(t instanceof Element))return window.getComputedStyle(t,e);let n=x.computedStyle.get(t);if(n||(n=new Map,x.computedStyle.set(t,n)),!n.has(e)){let r=window.getComputedStyle(t,e);n.set(e,r)}return n.get(e)}function Dt(t){let e={};for(let n of t)e[n]=t.getPropertyValue(n);return e}function Ft(t){let e=[],n=0,r=0;for(let s=0;s<t.length;s++){let o=t[s];o==="("&&n++,o===")"&&n--,o===","&&n===0&&(e.push(t.slice(r,s).trim()),r=s+1)}return e.push(t.slice(r).trim()),e}function ct(t,{fast:e=!1}={}){if(e)return t();"requestIdleCallback"in window?requestIdleCallback(t,{timeout:50}):setTimeout(t,1)}function G(){if(typeof navigator=="undefined")return!1;let t=navigator.userAgent||"",e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),r=/applewebkit/i.test(t),s=/mobile/i.test(t),o=!/safari/i.test(t),i=r&&s&&o,u=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),c=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),l=/ipad|iphone|ipod/.test(e)&&r;return n||i||u||c||l}var Le=new WeakMap,le=new Map,ue=0;function $t(){ue++}var Re=!1;function pr(t=document.documentElement){var e,n;if(!Re){Re=!0;try{new MutationObserver(()=>$t()).observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch(r){}try{new MutationObserver(()=>$t()).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch(r){}try{let r=document.fonts;r&&((e=r.addEventListener)==null||e.call(r,"loadingdone",$t),(n=r.ready)==null||n.then(()=>$t()).catch(()=>{}))}catch(r){}}}function hr(t,e={}){let n={},r=t.getPropertyValue("visibility");for(let o=0;o<t.length;o++){let i=t[o],u=t.getPropertyValue(i);(i==="background-image"||i==="content")&&u.includes("url(")&&!u.includes("data:")&&(u="none"),n[i]=u}let s=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let o of s)if(!n[o])try{let i=t.getPropertyValue(o);i&&(n[o]=i)}catch(i){}if(e.embedFonts){let o=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let i of o)if(!n[i])try{let u=t.getPropertyValue(i);u&&(n[i]=u)}catch(u){}}return r==="hidden"&&(n.opacity="0"),n}var Ne=new WeakMap;function gr(t){let e=Ne.get(t);return e||(e=Object.entries(t).sort((r,s)=>r[0]<s[0]?-1:r[0]>s[0]?1:0).map(([r,s])=>`${r}:${s}`).join(";"),Ne.set(t,e),e)}function yr(t,e=null,n={}){let r=Le.get(t);if(r&&r.epoch===ue)return r.snapshot;let s=e||getComputedStyle(t),o=hr(s,n);return kr(t,s,o),Le.set(t,{epoch:ue,snapshot:o}),o}function br(t,e){return t&&t.session&&t.persist?t:t&&(t.styleMap||t.styleCache||t.nodeMap)?{session:t,persist:{snapshotKeyCache:le,defaultStyle:x.defaultStyle,baseStyle:x.baseStyle,image:x.image,resource:x.resource,background:x.background,font:x.font},options:e||{}}:{session:x.session,persist:{snapshotKeyCache:le,defaultStyle:x.defaultStyle,baseStyle:x.baseStyle,image:x.image,resource:x.resource,background:x.background,font:x.font},options:t||e||{}}}function mt(t,e,n,r){return k(this,null,function*(){var h,g,m;if(t.tagName==="STYLE")return;let s=br(n,r),o=s.options&&s.options.cache||"auto";if(o!=="disabled"&&pr(document.documentElement),o==="disabled"&&!s.session.__bumpedForDisabled&&($t(),le.clear(),s.session.__bumpedForDisabled=!0),xt.has((h=t.tagName)==null?void 0:h.toLowerCase())){let a=(g=t.getAttribute)==null?void 0:g.call(t,"style");a&&e.setAttribute("style",a)}let{session:i,persist:u}=s;i.styleCache.has(t)||i.styleCache.set(t,getComputedStyle(t));let c=i.styleCache.get(t),l=yr(t,c,s.options),d=gr(l),f=u.snapshotKeyCache.get(d);if(!f){let a=((m=t.tagName)==null?void 0:m.toLowerCase())||"div";f=St(l,a),u.snapshotKeyCache.set(d,f)}i.styleMap.set(e,f)})}function wr(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof HTMLIFrameElement||t instanceof SVGElement||t instanceof HTMLObjectElement||t instanceof HTMLEmbedElement}function xr(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"}function Sr(t){let e=t.parentElement;if(!e)return!1;let n=getComputedStyle(e).display||"";return n.includes("flex")||n.includes("grid")}function Cr(t,e){if(t.textContent&&/\S/.test(t.textContent))return!0;let n=t.firstElementChild,r=t.lastElementChild;if(n&&n.tagName==="BR"||r&&r.tagName==="BR")return!0;let s=t.scrollHeight;if(s===0)return!1;let o=parseFloat(e.paddingTop)||0,i=parseFloat(e.paddingBottom)||0;return s>o+i}function kr(t,e,n){if(t instanceof HTMLElement&&t.style&&t.style.height)return;let r=e.display||"";if(r.includes("flex")||r.includes("grid")||wr(t))return;let s=e.position;s==="absolute"||s==="fixed"||s==="sticky"||e.transform==="none"&&(xr(e)||Sr(t)||Cr(t,e)&&(delete n.height,delete n["block-size"]))}var Pe=["fill","stroke","color","background-color","stop-color"],Te=new Map;function Ar(t,e){let n=e+"::"+t.toLowerCase(),r=Te.get(n);if(r)return r;let s=document,o=e==="http://www.w3.org/2000/svg"?s.createElementNS(e,t):s.createElement(t),i=s.createElement("div");i.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",i.appendChild(o),s.documentElement.appendChild(i);let u=getComputedStyle(o),c={};for(let l of Pe)c[l]=u.getPropertyValue(l)||"";return i.remove(),Te.set(n,c),c}function _e(t,e){var o,i,u;if(!(t instanceof Element)||!(e instanceof Element))return;let n=(o=t.getAttribute)==null?void 0:o.call(t,"style"),r=!!(n&&n.includes("var("));if(!r&&((i=t.attributes)!=null&&i.length)){let c=t.attributes;for(let l=0;l<c.length;l++){let d=c[l];if(d&&typeof d.value=="string"&&d.value.includes("var(")){r=!0;break}}}let s=null;if(r)try{s=getComputedStyle(t)}catch(c){}if(r){let c=t.style;if(c&&c.length)for(let l=0;l<c.length;l++){let d=c[l],f=c.getPropertyValue(d);if(!f||!f.includes("var("))continue;let h=s&&s.getPropertyValue(d);if(h)try{e.style.setProperty(d,h.trim(),c.getPropertyPriority(d))}catch(g){}}}if(r&&((u=t.attributes)!=null&&u.length)){let c=t.attributes;for(let l=0;l<c.length;l++){let d=c[l];if(!d||typeof d.value!="string"||!d.value.includes("var("))continue;let f=d.name,h=s&&s.getPropertyValue(f);if(h)try{e.style.setProperty(f,h.trim())}catch(g){}}}if(!r){if(!s)try{s=getComputedStyle(t)}catch(d){s=null}if(!s)return;let c=t.namespaceURI||"html",l=Ar(t.tagName,c);for(let d of Pe){let f=s.getPropertyValue(d)||"",h=l[d]||"";if(f&&f!==h)try{e.style.setProperty(d,f.trim())}catch(g){}}}}function qt(t,e,n){return Promise.all(t.map(r=>new Promise(s=>{function o(){ct(i=>{(i&&typeof i.timeRemaining=="function"?i.timeRemaining()>0:!0)?e(r,s):o()},{fast:n})}o()})))}function Mr(t){return t=t.trim(),!t||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(t)?t:`${t}:not([data-sd-slotted])`}function vr(t,e,n=!0){return t.split(",").map(r=>r.trim()).filter(Boolean).map(r=>{if(r.startsWith(":where(")||r.startsWith("@"))return r;let s=n?Mr(r):r;return`:where(${e} ${s})`}).join(", ")}function Oe(t,e){return t?(t=t.replace(/:host\(([^)]+)\)/g,(n,r)=>`:where(${e}:is(${r.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/:host-context\(([^)]+)\)/g,(n,r)=>`:where(:where(${r.trim()}) ${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(n,r)=>`:where(${e} ${r.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(n,r,s,o)=>{let i=vr(o,e,!0);return`${r}${s}${i}{`}),t):""}function Ue(t){return t.shadowScopeSeq=(t.shadowScopeSeq||0)+1,`s${t.shadowScopeSeq}`}function Be(t){let e="";try{t.querySelectorAll("style").forEach(r=>{e+=(r.textContent||"")+`
|
|
3
|
+
`});let n=t.adoptedStyleSheets||[];for(let r of n)try{if(r&&r.cssRules)for(let s of r.cssRules)e+=s.cssText+`
|
|
4
|
+
`}catch(s){}}catch(n){}return e}function De(t,e,n){if(!e)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=e,t.insertBefore(r,t.firstChild||null)}function He(t,e){try{let n=t.currentSrc||t.src||"";if(!n)return;e.setAttribute("src",n),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch(n){}}function qe(t){let e=new Set;if(!t)return e;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,r;for(;r=n.exec(t);)e.add(r[1]);return e}function Er(t,e){try{let r=getComputedStyle(t).getPropertyValue(e).trim();if(r)return r}catch(n){}try{let r=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(r)return r}catch(n){}return""}function ze(t,e,n){let r=[];for(let s of e){let o=Er(t,s);o&&r.push(`${s}: ${o};`)}return r.length?`${n}{${r.join("")}}
|
|
5
|
+
`:""}function je(t){t&&(t.nodeType===Node.ELEMENT_NODE&&t.setAttribute("data-sd-slotted",""),t.querySelectorAll&&t.querySelectorAll("*").forEach(e=>e.setAttribute("data-sd-slotted","")))}function Fr(t,e=3){return k(this,null,function*(){let n=()=>{var o;try{return t.contentDocument||((o=t.contentWindow)==null?void 0:o.document)||null}catch(i){return null}},r=n(),s=0;for(;s<e&&(!r||!r.body&&!r.documentElement);)yield new Promise(o=>setTimeout(o,0)),r=n(),s++;return r&&(r.body||r.documentElement)?r:null})}function $r(t){let e=t.getBoundingClientRect(),n=0,r=0,s=0,o=0;try{let c=getComputedStyle(t);n=parseFloat(c.borderLeftWidth)||0,r=parseFloat(c.borderRightWidth)||0,s=parseFloat(c.borderTopWidth)||0,o=parseFloat(c.borderBottomWidth)||0}catch(c){}let i=Math.max(0,Math.round(e.width-(n+r))),u=Math.max(0,Math.round(e.height-(s+o)));return{contentWidth:i,contentHeight:u,rect:e}}function Ir(t,e,n){let r=t.createElement("style");return r.setAttribute("data-sd-iframe-pin",""),r.textContent=`html, body {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;}`,(t.head||t.documentElement).appendChild(r),()=>{try{r.remove()}catch(s){}}}function Ve(t,e,n){return k(this,null,function*(){let r=yield Fr(t,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:s,contentHeight:o,rect:i}=$r(t),u=n==null?void 0:n.snap;if(!u||typeof u.toPng!="function")throw new Error("snapdom.toPng not available in iframe or window");let c=O(F({},n),{scale:1}),l=Ir(r,s,o),d;try{d=yield u.toPng(r.documentElement,c)}finally{l()}d.style.display="block",d.style.width=`${s}px`,d.style.height=`${o}px`;let f=document.createElement("div");return e.nodeMap.set(f,t),mt(t,f,e,n),f.style.overflow="hidden",f.style.display="block",f.style.width||(f.style.width=`${Math.round(i.width)}px`),f.style.height||(f.style.height=`${Math.round(i.height)}px`),f.appendChild(d),f})}var It=new Map;function Lt(t){return k(this,null,function*(){var n;if((n=x.resource)!=null&&n.has(t))return x.resource.get(t);if(It.has(t))return It.get(t);let e=k(null,null,function*(){var s;let r=yield Y(t,{as:"dataURL",silent:!0});if(!r.ok||typeof r.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${t}`);return(s=x.resource)==null||s.set(t,r.data),r.data});It.set(t,e);try{let r=yield e;return It.set(t,r),r}catch(r){throw It.delete(t),r}})}var Lr=/\bblob:[^)"'\s]+/g;function We(t){return k(this,null,function*(){if(!t||t.indexOf("blob:")===-1)return t;let e=Array.from(new Set(t.match(Lr)||[]));if(e.length===0)return t;let n=t;for(let r of e)try{let s=yield Lt(r);n=n.split(r).join(s)}catch(s){}return n})}function Ht(t){return typeof t=="string"&&t.startsWith("blob:")}function Rr(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 Nr(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function Xe(t){return k(this,null,function*(){var i,u;if(!t)return;let e=t.querySelectorAll?t.querySelectorAll("img"):[];for(let c of e)try{let d=c.getAttribute("src")||c.currentSrc||"";if(Ht(d)){let h=yield Lt(d);c.setAttribute("src",h)}let f=c.getAttribute("srcset");if(f&&f.includes("blob:")){let h=Rr(f),g=!1;for(let m of h)if(Ht(m.url))try{m.url=yield Lt(m.url),g=!0}catch(a){}g&&c.setAttribute("srcset",Nr(h))}}catch(l){}let n=t.querySelectorAll?t.querySelectorAll("image"):[];for(let c of n)try{let l="http://www.w3.org/1999/xlink",d=c.getAttribute("href")||((i=c.getAttributeNS)==null?void 0:i.call(c,l,"href"));if(Ht(d)){let f=yield Lt(d);c.setAttribute("href",f),(u=c.removeAttributeNS)==null||u.call(c,l,"href")}}catch(l){}let r=t.querySelectorAll?t.querySelectorAll("[style*='blob:']"):[];for(let c of r)try{let l=c.getAttribute("style");if(l&&l.includes("blob:")){let d=yield We(l);c.setAttribute("style",d)}}catch(l){}let s=t.querySelectorAll?t.querySelectorAll("style"):[];for(let c of s)try{let l=c.textContent||"";l.includes("blob:")&&(c.textContent=yield We(l))}catch(l){}let o=["poster"];for(let c of o){let l=t.querySelectorAll?t.querySelectorAll(`[${c}^='blob:']`):[];for(let d of l)try{let f=d.getAttribute(c);Ht(f)&&d.setAttribute(c,yield Lt(f))}catch(f){}}})}function Rt(t,e,n){return k(this,null,function*(){var l,d,f,h,g,m;if(!t)throw new Error("Invalid node");let r=new Set,s=null,o=null;if(t.nodeType===Node.ELEMENT_NODE){let a=(t.localName||t.tagName||"").toLowerCase();if(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox")||Bt.has(a))return null}if(t.nodeType===Node.TEXT_NODE||t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide"){let a=document.createElement("div"),p=t.getBoundingClientRect();return a.style.cssText=`display:inline-block;width:${p.width}px;height:${p.height}px;visibility:hidden;`,a}else if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let a of n.exclude)try{if((l=t.matches)!=null&&l.call(t,a)){if(n.excludeMode==="hide"){let p=document.createElement("div"),y=t.getBoundingClientRect();return p.style.cssText=`display:inline-block;width:${y.width}px;height:${y.height}px;visibility:hidden;`,p}else if(n.excludeMode==="remove")return null}}catch(p){console.warn(`Invalid selector in exclude option: ${a}`,p)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide"){let a=document.createElement("div"),p=t.getBoundingClientRect();return a.style.cssText=`display:inline-block;width:${p.width}px;height:${p.height}px;visibility:hidden;`,a}else if(n.filterMode==="remove")return null}}catch(a){console.warn("Error in filter function:",a)}if(t.tagName==="IFRAME"){let a=!1;try{a=!!(t.contentDocument||(d=t.contentWindow)!=null&&d.document)}catch(p){a=!1}if(a)try{return yield Ve(t,e,n)}catch(p){console.warn("[SnapDOM] iframe rasterization failed, fallback:",p)}if(n.placeholders){let p=document.createElement("div");return p.style.cssText=`width:${t.offsetWidth}px;height:${t.offsetHeight}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;`,mt(t,p,e,n),p}else{let p=t.getBoundingClientRect(),y=document.createElement("div");return y.style.cssText=`display:inline-block;width:${p.width}px;height:${p.height}px;visibility:hidden;`,mt(t,y,e,n),y}}if(t.getAttribute("data-capture")==="placeholder"){let a=t.cloneNode(!1);e.nodeMap.set(a,t),mt(t,a,e,n);let p=document.createElement("div");return p.textContent=t.getAttribute("data-placeholder-text")||"",p.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",a.appendChild(p),a}if(t.tagName==="CANVAS"){let a="";try{let y=t.getContext("2d",{willReadFrequently:!0});try{y&&y.getImageData(0,0,1,1)}catch(w){}if(yield new Promise(w=>requestAnimationFrame(w)),a=t.toDataURL("image/png"),!a||a==="data:,"){try{y&&y.getImageData(0,0,1,1)}catch(w){}if(yield new Promise(w=>requestAnimationFrame(w)),a=t.toDataURL("image/png"),!a||a==="data:,"){let w=document.createElement("canvas");w.width=t.width,w.height=t.height;let C=w.getContext("2d");C&&(C.drawImage(t,0,0),a=w.toDataURL("image/png"))}}}catch(y){}let p=document.createElement("img");try{p.decoding="sync",p.loading="eager"}catch(y){}a&&(p.src=a),p.width=t.width,p.height=t.height;try{let y=getComputedStyle(t);y.width&&(p.style.width=y.width),y.height&&(p.style.height=y.height)}catch(y){}return e.nodeMap.set(p,t),mt(t,p,e,n),p}let i;try{if(i=t.cloneNode(!1),_e(t,i),e.nodeMap.set(i,t),t.tagName==="IMG"){He(t,i);try{let a=t.getBoundingClientRect(),p=Math.round(a.width||0),y=Math.round(a.height||0);if(!p||!y){let w=window.getComputedStyle(t),C=parseFloat(w.width)||0,S=parseFloat(w.height)||0,v=parseInt(t.getAttribute("width")||"",10)||0,b=parseInt(t.getAttribute("height")||"",10)||0,E=t.width||t.naturalWidth||0,A=t.height||t.naturalHeight||0;p=Math.round(p||C||v||E||0),y=Math.round(y||S||b||A||0)}p&&(i.dataset.snapdomWidth=String(p)),y&&(i.dataset.snapdomHeight=String(y))}catch(a){}}}catch(a){throw console.error("[Snapdom] Failed to clone node:",t,a),a}if(t instanceof HTMLTextAreaElement){let a=t.getBoundingClientRect();i.style.width=`${a.width}px`,i.style.height=`${a.height}px`}if(t instanceof HTMLInputElement&&(i.value=t.value,i.setAttribute("value",t.value),t.checked!==void 0&&(i.checked=t.checked,t.checked&&i.setAttribute("checked",""),t.indeterminate&&(i.indeterminate=t.indeterminate))),t instanceof HTMLSelectElement&&(s=t.value),t instanceof HTMLTextAreaElement&&(o=t.value),mt(t,i,e,n),t.shadowRoot){let b=function(A,N){if(A.nodeType===Node.ELEMENT_NODE&&A.tagName==="STYLE")return N(null);Rt(A,e,n).then(R=>{N(R||null)}).catch(()=>{N(null)})};try{let A=t.shadowRoot.querySelectorAll("slot");for(let N of A){let R=[];try{R=((f=N.assignedNodes)==null?void 0:f.call(N,{flatten:!0}))||((h=N.assignedNodes)==null?void 0:h.call(N))||[]}catch(U){R=((g=N.assignedNodes)==null?void 0:g.call(N))||[]}for(let U of R)r.add(U)}}catch(A){}let a=Ue(e),p=`[data-sd="${a}"]`;try{i.setAttribute("data-sd",a)}catch(A){}let y=Be(t.shadowRoot),w=Oe(y,p),C=qe(y),S=ze(t,C,p);De(i,S+w,a);let v=document.createDocumentFragment(),E=yield qt(Array.from(t.shadowRoot.childNodes),b,n.fast);v.append(...E.filter(A=>!!A)),i.appendChild(v)}if(t.tagName==="SLOT"){let w=function(S,v){Rt(S,e,n).then(b=>{b&&je(b),v(b||null)}).catch(()=>{v(null)})},a=((m=t.assignedNodes)==null?void 0:m.call(t,{flatten:!0}))||[],p=a.length>0?a:Array.from(t.childNodes),y=document.createDocumentFragment(),C=yield qt(Array.from(p),w,n.fast);return y.append(...C.filter(S=>!!S)),y}function u(a,p){if(r.has(a))return p(null);Rt(a,e,n).then(y=>{p(y||null)}).catch(()=>{p(null)})}let c=yield qt(Array.from(t.childNodes),u,n.fast);if(i.append(...c.filter(a=>!!a)),s!==null&&i instanceof HTMLSelectElement){i.value=s;for(let a of i.options)a.value===s?a.setAttribute("selected",""):a.removeAttribute("selected")}return o!==null&&i instanceof HTMLTextAreaElement&&(i.textContent=o),i})}var Tr=[/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],Ct=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!="undefined"&&window.__SNAPDOM_ICON_FONTS__||{}),fe=[];function Ke(t){let e=Array.isArray(t)?t:[t];for(let n of e)n instanceof RegExp?fe.push(n):typeof n=="string"?fe.push(new RegExp(n,"i")):console.warn("[snapdom] Ignored invalid iconFont value:",n)}function tt(t){let e=typeof t=="string"?t:"",n=[...Tr,...fe];for(let r of n)if(r instanceof RegExp&&r.test(e))return!0;return!!(/icon/i.test(e)||/glyph/i.test(e)||/symbols/i.test(e)||/feather/i.test(e)||/fontawesome/i.test(e))}function Pr(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var Ye=new Map;function _r(t=""){let e=Object.create(null),n=String(t||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,s;for(;s=r.exec(n);)e[s[1].toUpperCase()]=Number(s[2]);return e}function Wr(t,e,n){return k(this,null,function*(){var h;let r=String(t||""),s=r.toLowerCase(),o=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(s)&&!/\bsymbols\b/.test(s))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(s))return{familyForMeasure:r,familyForCanvas:r};let u=n&&((h=n.FILL)!=null?h:n.fill),c="outlined";/\brounded\b/.test(o)||/\bround\b/.test(o)?c="rounded":/\bsharp\b/.test(o)?c="sharp":/\boutlined\b/.test(o)&&(c="outlined");let l=u===1,d=null;if(l&&(c==="outlined"&&Ct.materialIconsFilled?d={url:Ct.materialIconsFilled,alias:"snapdom-mi-filled"}:c==="rounded"&&Ct.materialIconsRound?d={url:Ct.materialIconsRound,alias:"snapdom-mi-round"}:c==="sharp"&&Ct.materialIconsSharp&&(d={url:Ct.materialIconsSharp,alias:"snapdom-mi-sharp"})),!d)return{familyForMeasure:r,familyForCanvas:r};if(!Ye.has(d.alias))try{let g=new FontFace(d.alias,`url(${d.url})`,{style:"normal",weight:"400"});document.fonts.add(g),yield g.load(),Ye.set(d.alias,!0)}catch(g){return{familyForMeasure:r,familyForCanvas:r}}let f=`"${d.alias}"`;return{familyForMeasure:f,familyForCanvas:f}})}function Or(t="Material Icons",e=24){return k(this,null,function*(){try{yield Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),document.fonts.ready])}catch(n){}})}function Ur(t){var s,o;let e=((s=t.getPropertyValue("-webkit-text-fill-color"))==null?void 0:s.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 r=(o=t.color)==null?void 0:o.trim();return r&&r!=="inherit"?r:"#000"}function Br(u){return k(this,arguments,function*(t,{family:e="Material Icons",weight:n="normal",fontSize:r=32,color:s="#000",variation:o="",className:i=""}={}){let c=String(e||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,d=_r(o),{familyForMeasure:f,familyForCanvas:h}=yield Wr(c,i,d);yield Or(h.replace(/^["']+|["']+$/g,""),r);let g=document.createElement("span");g.textContent=t,g.style.position="absolute",g.style.visibility="hidden",g.style.left="-99999px",g.style.whiteSpace="nowrap",g.style.fontFamily=f,g.style.fontWeight=String(n||"normal"),g.style.fontSize=`${r}px`,g.style.lineHeight="1",g.style.margin="0",g.style.padding="0",g.style.fontFeatureSettings="'liga' 1",g.style.fontVariantLigatures="normal",g.style.color=s,document.body.appendChild(g);let m=g.getBoundingClientRect(),a=Math.max(1,Math.ceil(m.width)),p=Math.max(1,Math.ceil(m.height));document.body.removeChild(g);let y=document.createElement("canvas");y.width=a*l,y.height=p*l;let w=y.getContext("2d");w.scale(l,l),w.font=`${n?`${n} `:""}${r}px ${h}`,w.textAlign="left",w.textBaseline="top",w.fillStyle=s;try{w.fontKerning="normal"}catch(C){}return w.fillText(t,0,0),{dataUrl:y.toDataURL(),width:a,height:p}})}function Ge(t,e){return k(this,null,function*(){if(!(t instanceof Element))return 0;let n='.material-icons, [class*="material-symbols"]',r=Array.from(t.querySelectorAll(n)).filter(i=>i&&i.textContent&&i.textContent.trim());if(r.length===0)return 0;let s=e instanceof Element?Array.from(e.querySelectorAll(n)).filter(i=>i&&i.textContent&&i.textContent.trim()):[],o=0;for(let i=0;i<r.length;i++){let u=r[i],c=s[i]||null;try{let l=getComputedStyle(c||u),d=l.fontFamily||"Material Icons";if(!Pr(d))continue;let f=(c||u).textContent.trim();if(!f)continue;let h=parseInt(l.fontSize,10)||24,g=l.fontWeight&&l.fontWeight!=="normal"?l.fontWeight:"normal",m=Ur(l),a=l.fontVariationSettings&&l.fontVariationSettings!=="normal"?l.fontVariationSettings:"",p=(c||u).className||"",{dataUrl:y,width:w,height:C}=yield Br(f,{family:d,weight:g,fontSize:h,color:m,variation:a,className:p});u.textContent="";let S=u.ownerDocument.createElement("img");S.src=y,S.alt=f,S.style.height=`${h}px`,S.style.width=`${Math.max(1,Math.round(w/C*h))}px`,S.style.objectFit="contain",S.style.verticalAlign=getComputedStyle(u).verticalAlign||"baseline",u.appendChild(S),o++}catch(l){}}return o})}function Ze(t,e,n,r=32,s="#000"){return k(this,null,function*(){e=e.replace(/^['"]+|['"]+$/g,"");let o=window.devicePixelRatio||1;try{yield document.fonts.ready}catch(h){}let i=document.createElement("span");i.textContent=t,i.style.position="absolute",i.style.visibility="hidden",i.style.fontFamily=`"${e}"`,i.style.fontWeight=n||"normal",i.style.fontSize=`${r}px`,i.style.lineHeight="1",i.style.whiteSpace="nowrap",i.style.padding="0",i.style.margin="0",document.body.appendChild(i);let u=i.getBoundingClientRect(),c=Math.ceil(u.width),l=Math.ceil(u.height);document.body.removeChild(i);let d=document.createElement("canvas");d.width=Math.max(1,c*o),d.height=Math.max(1,l*o);let f=d.getContext("2d");return f.scale(o,o),f.font=n?`${n} ${r}px "${e}"`:`${r}px "${e}"`,f.textAlign="left",f.textBaseline="top",f.fillStyle=s,f.fillText(t,0,0),{dataUrl:d.toDataURL(),width:c,height:l}})}var Dr=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]);function Vt(t){if(!t)return"";for(let e of t.split(",")){let n=e.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!Dr.has(n.toLowerCase()))return n}return""}function zt(t){let e=String(t!=null?t:"400").trim().toLowerCase();if(e==="normal")return 400;if(e==="bold")return 700;let n=parseInt(e,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function de(t){let e=String(t!=null?t:"normal").trim().toLowerCase();return e.startsWith("italic")?"italic":e.startsWith("oblique")?"oblique":"normal"}function Hr(t){let e=String(t!=null?t:"100%").match(/(\d+(?:\.\d+)?)\s*%/);return e?Math.max(50,Math.min(200,parseFloat(e[1]))):100}function qr(t){let e=String(t||"400").trim(),n=e.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let s=zt(n[1]),o=zt(n[2]);return{min:Math.min(s,o),max:Math.max(s,o)}}let r=zt(e);return{min:r,max:r}}function zr(t){let e=String(t||"normal").trim().toLowerCase();return e==="italic"?{kind:"italic"}:e.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function jr(t){let e=String(t||"100%").trim(),n=e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let o=parseFloat(n[1]),i=parseFloat(n[2]);return{min:Math.min(o,i),max:Math.max(o,i)}}let r=e.match(/(\d+(?:\.\d+)?)\s*%/),s=r?parseFloat(r[1]):100;return{min:s,max:s}}function Vr(t,e){if(!t)return!1;try{let n=new URL(t,location.href);if(n.origin===location.origin)return!0;let s=n.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com"].some(u=>s.endsWith(u)))return!0;let i=(n.pathname+n.search).toLowerCase();if(/\bfont(s)?\b/.test(i)||/\.woff2?(\b|$)/.test(i))return!0;for(let u of e){let c=u.toLowerCase().replace(/\s+/g,"+"),l=u.toLowerCase().replace(/\s+/g,"-");if(i.includes(c)||i.includes(l))return!0}return!1}catch(n){return!1}}function Xr(t){var n;let e=new Set;for(let r of t||[]){let s=(n=String(r).split("__")[0])==null?void 0:n.trim();s&&e.add(s)}return e}function Qe(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,s)=>{let o=(s||"").trim();if(!o||/^data:|^blob:|^https?:|^file:|^about:/i.test(o))return n;let i=o;try{i=new URL(o,e||location.href).href}catch(u){}return`url("${i}")`})}var me=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,jt=4;function Yr(t,e,n){return k(this,null,function*(){if(!t)return t;let r=new Set;function s(u,c){try{return new URL(u,c||location.href).href}catch(l){return u}}function o(u,c,l=0){return k(this,null,function*(){if(l>jt)return console.warn(`[snapDOM] @import depth exceeded (${jt}) at ${c}`),u;let d="",f=0,h;for(;h=me.exec(u);){d+=u.slice(f,h.index),f=me.lastIndex;let g=(h[2]||h[4]||"").trim(),m=s(g,c);if(r.has(m)){console.warn(`[snapDOM] Skipping circular @import: ${m}`);continue}r.add(m);let a="";try{let p=yield Y(m,{as:"text",useProxy:n,silent:!0});p.ok&&typeof p.data=="string"&&(a=p.data)}catch(p){}a?(a=Qe(a,m),a=yield o(a,m,l+1),d+=`
|
|
6
|
+
/* inlined: ${m} */
|
|
7
|
+
${a}
|
|
8
|
+
`):d+=h[0]}return d+=u.slice(f),d})}let i=Qe(t,e||location.href);return i=yield o(i,e||location.href,0),i})}var tn=/url\((["']?)([^"')]+)\1\)/g,Kr=/@font-face[^{}]*\{[^}]*\}/g;function en(t){if(!t)return[];let e=[],n=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let s=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!s)continue;let o=s[1],i=s[2],u=c=>{if(!c.includes("?"))return parseInt(c,16);let l=parseInt(c.replace(/\?/g,"0"),16),d=parseInt(c.replace(/\?/g,"F"),16);return[l,d]};if(i){let c=u(o),l=u(i),d=Array.isArray(c)?c[0]:c,f=Array.isArray(l)?l[1]:l;e.push([Math.min(d,f),Math.max(d,f)])}else{let c=u(o);Array.isArray(c)?e.push([c[0],c[1]]):e.push([c,c])}}return e}function nn(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[r,s]of e)if(n>=r&&n<=s)return!0;return!1}function pe(t,e){let n=[];if(!t)return n;for(let r of t.matchAll(tn)){let s=(r[2]||"").trim();if(!(!s||s.startsWith("data:"))){if(!/^https?:/i.test(s))try{s=new URL(s,e||location.href).href}catch(o){}n.push(s)}}return n}function rn(t,e,n=""){return k(this,null,function*(){var s,o,i,u,c;let r=t;for(let l of t.matchAll(tn)){let d=ht(l[0]);if(!d)continue;let f=d;if(!f.startsWith("http")&&!f.startsWith("data:"))try{f=new URL(f,e||location.href).href}catch(h){}if(!tt(f)){if((s=x.resource)!=null&&s.has(f)){(o=x.font)==null||o.add(f),r=r.replace(l[0],`url(${x.resource.get(f)})`);continue}if(!((i=x.font)!=null&&i.has(f)))try{let h=yield Y(f,{as:"dataURL",useProxy:n,silent:!0});if(h.ok&&typeof h.data=="string"){let g=h.data;(u=x.resource)==null||u.set(f,g),(c=x.font)==null||c.add(f),r=r.replace(l[0],`url(${g})`)}}catch(h){console.warn("[snapDOM] Failed to fetch font resource:",f)}}}return r})}function Gr(t){if(!t.length)return null;let e=(u,c)=>t.some(([l,d])=>!(d<u||l>c)),n=e(0,255)||e(305,305),r=e(256,591)||e(7680,7935),s=e(880,1023),o=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":o?"cyrillic":s?"greek":r?"latin-ext":n?"latin":null}function Je(t={}){let e=new Set((t.families||[]).map(s=>String(s).toLowerCase())),n=new Set((t.domains||[]).map(s=>String(s).toLowerCase())),r=new Set((t.subsets||[]).map(s=>String(s).toLowerCase()));return(s,o)=>{if(e.size&&e.has(s.family.toLowerCase()))return!0;if(n.size)for(let i of s.srcUrls)try{if(n.has(new URL(i).host.toLowerCase()))return!0}catch(u){}if(r.size){let i=Gr(o);if(i&&r.has(i))return!0}return!1}}function Qr(t){var o,i,u,c,l,d;if(!t)return t;let e=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let f of t.match(e)||[]){let h=((o=f.match(/font-family:\s*([^;]+);/i))==null?void 0:o[1])||"",g=Vt(h),m=(((i=f.match(/font-weight:\s*([^;]+);/i))==null?void 0:i[1])||"400").trim(),a=(((u=f.match(/font-style:\s*([^;]+);/i))==null?void 0:u[1])||"normal").trim(),p=(((c=f.match(/font-stretch:\s*([^;]+);/i))==null?void 0:c[1])||"100%").trim(),y=(((l=f.match(/unicode-range:\s*([^;]+);/i))==null?void 0:l[1])||"").trim(),w=(((d=f.match(/src\s*:\s*([^;}]+)[;}]/i))==null?void 0:d[1])||"").trim(),C=pe(w,location.href),S=C.length?C.map(b=>String(b).toLowerCase()).sort().join("|"):w.toLowerCase(),v=[String(g||"").toLowerCase(),m,a,p,y.toLowerCase(),S].join("|");n.has(v)||(n.add(v),r.push(f))}if(r.length===0)return t;let s=0;return t.replace(e,()=>r[s++]||"")}function Jr(t,e,n,r){let s=Array.from(t||[]).sort().join("|"),o=e?JSON.stringify({families:(e.families||[]).map(c=>String(c).toLowerCase()).sort(),domains:(e.domains||[]).map(c=>String(c).toLowerCase()).sort(),subsets:(e.subsets||[]).map(c=>String(c).toLowerCase()).sort()}):"",i=(n||[]).map(c=>`${(c.family||"").toLowerCase()}::${c.weight||"normal"}::${c.style||"normal"}::${c.src||""}`).sort().join("|");return`fonts-embed-css::req=${s}::ex=${o}::lf=${i}::px=${r||""}`}function on(t,e,n,r){return k(this,null,function*(){let s;try{s=t.cssRules||[]}catch(i){return}let o=(i,u)=>{try{return new URL(i,u||location.href).href}catch(c){return i}};for(let i of s){if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){let u=i.href?o(i.href,e):e;if(r.depth>=jt){console.warn(`[snapDOM] CSSOM import depth exceeded (${jt}) at ${u}`);continue}if(u&&r.visitedSheets.has(u)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${u}`);continue}u&&r.visitedSheets.add(u);let c=O(F({},r),{depth:(r.depth||0)+1});yield on(i.styleSheet,u,n,c);continue}if(i.type===CSSRule.FONT_FACE_RULE){let u=(i.style.getPropertyValue("font-family")||"").trim(),c=Vt(u);if(!c||tt(c))continue;let l=(i.style.getPropertyValue("font-weight")||"400").trim(),d=(i.style.getPropertyValue("font-style")||"normal").trim(),f=(i.style.getPropertyValue("font-stretch")||"100%").trim(),h=(i.style.getPropertyValue("src")||"").trim(),g=(i.style.getPropertyValue("unicode-range")||"").trim();if(!r.faceMatchesRequired(c,d,l,f))continue;let m=en(g);if(!nn(r.usedCodepoints,m))continue;let a={family:c,weightSpec:l,styleSpec:d,stretchSpec:f,unicodeRange:g,srcRaw:h,srcUrls:pe(h,e||location.href),href:e||location.href};if(r.simpleExcluder&&r.simpleExcluder(a,m))continue;if(/url\(/i.test(h)){let p=yield rn(h,e||location.href,r.useProxy);yield n(`@font-face{font-family:${c};src:${p};font-style:${d};font-weight:${l};font-stretch:${f};${g?`unicode-range:${g};`:""}}`)}else yield n(`@font-face{font-family:${c};src:${h};font-style:${d};font-weight:${l};font-stretch:${f};${g?`unicode-range:${g};`:""}}`)}}})}function Xt(){return k(this,arguments,function*({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:r=[],useProxy:s=""}={}){var a,p,y,w,C,S,v,b,E,A,N,R,U,V,X,J,ut,Z;t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let o=new Map;for(let M of t){let[L,T,D,$]=String(M).split("__");if(!L)continue;let P=o.get(L)||[];P.push({w:parseInt(T,10),s:D,st:parseInt($,10)}),o.set(L,P)}function i(M,L,T,D){if(!o.has(M))return!1;let $=o.get(M),P=qr(T),q=zr(L),z=jr(D),et=P.min!==P.max,W=P.min,H=_=>q.kind==="normal"&&_==="normal"||q.kind!=="normal"&&(_==="italic"||_==="oblique"),j=!1;for(let _ of $){let K=et?_.w>=P.min&&_.w<=P.max:_.w===W,Q=H(de(_.s)),ft=_.st>=z.min&&_.st<=z.max;if(K&&Q&&ft){j=!0;break}}if(j)return!0;if(!et)for(let _ of $){let K=H(de(_.s)),Q=_.st>=z.min&&_.st<=z.max;if(Math.abs(W-_.w)<=300&&K&&Q)return!0}return!1}let u=Je(n),c=Jr(t,n,r,s);if((a=x.resource)!=null&&a.has(c))return x.resource.get(c);let l=Xr(t),d=[],f=me;for(let M of document.querySelectorAll("style")){let L=M.textContent||"";for(let T of L.matchAll(f)){let D=(T[2]||T[4]||"").trim();if(!D||tt(D))continue;!!document.querySelector(`link[rel="stylesheet"][href="${D}"]`)||d.push(D)}}d.length&&(yield Promise.all(d.map(M=>new Promise(L=>{if(document.querySelector(`link[rel="stylesheet"][href="${M}"]`))return L(null);let T=document.createElement("link");T.rel="stylesheet",T.href=M,T.setAttribute("data-snapdom","injected-import"),T.onload=()=>L(T),T.onerror=()=>L(null),document.head.appendChild(T)}))));let h="",g=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).filter(M=>!!M.href);for(let M of g)try{if(tt(M.href))continue;let L="",T=!1;try{T=new URL(M.href,location.href).origin===location.origin}catch($){}if(!T&&!Vr(M.href,l))continue;if(T){let $=Array.from(document.styleSheets).find(P=>P.href===M.href);if($)try{let P=$.cssRules||[];L=Array.from(P).map(q=>q.cssText).join("")}catch(P){}}if(!L&&(L=(yield Y(M.href,{as:"text",useProxy:s})).data,tt(M.href)))continue;L=yield Yr(L,M.href,s);let D="";for(let $ of L.match(Kr)||[]){let P=(((p=$.match(/font-family:\s*([^;]+);/i))==null?void 0:p[1])||"").trim(),q=Vt(P);if(!q||tt(q))continue;let z=(((y=$.match(/font-weight:\s*([^;]+);/i))==null?void 0:y[1])||"400").trim(),et=(((w=$.match(/font-style:\s*([^;]+);/i))==null?void 0:w[1])||"normal").trim(),W=(((C=$.match(/font-stretch:\s*([^;]+);/i))==null?void 0:C[1])||"100%").trim(),H=(((S=$.match(/unicode-range:\s*([^;]+);/i))==null?void 0:S[1])||"").trim(),j=(((v=$.match(/src\s*:\s*([^;}]+)[;}]/i))==null?void 0:v[1])||"").trim(),_=pe(j,M.href);if(!i(q,et,z,W))continue;let K=en(H);if(!nn(e,K))continue;let Q={family:q,weightSpec:z,styleSpec:et,stretchSpec:W,unicodeRange:H,srcRaw:j,srcUrls:_,href:M.href};if(n&&u(Q,K))continue;let ft=/url\(/i.test(j)?yield rn($,M.href,s):$;D+=ft}D.trim()&&(h+=D)}catch(L){console.warn("[snapDOM] Failed to process stylesheet:",M.href)}let m={requiredIndex:o,usedCodepoints:e,faceMatchesRequired:i,simpleExcluder:n?Je(n):null,useProxy:s,visitedSheets:new Set,depth:0};for(let M of document.styleSheets)if(!(M.href&&g.some(L=>L.href===M.href)))try{let L=M.href||location.href;L&&m.visitedSheets.add(L),yield on(M,L,T=>k(null,null,function*(){h+=T}),m)}catch(L){}try{for(let M of document.fonts||[]){if(!M||!M.family||M.status!=="loaded"||!M._snapdomSrc)continue;let L=String(M.family).replace(/^['"]+|['"]+$/g,"");if(tt(L)||!o.has(L)||n!=null&&n.families&&n.families.some(D=>String(D).toLowerCase()===L.toLowerCase()))continue;let T=M._snapdomSrc;if(!String(T).startsWith("data:")){if((b=x.resource)!=null&&b.has(M._snapdomSrc))T=x.resource.get(M._snapdomSrc),(E=x.font)==null||E.add(M._snapdomSrc);else if(!((A=x.font)!=null&&A.has(M._snapdomSrc)))try{let D=yield Y(M._snapdomSrc,{as:"dataURL",useProxy:s,silent:!0});if(D.ok&&typeof D.data=="string")T=D.data,(N=x.resource)==null||N.set(M._snapdomSrc,T),(R=x.font)==null||R.add(M._snapdomSrc);else continue}catch(D){console.warn("[snapDOM] Failed to fetch dynamic font src:",M._snapdomSrc);continue}}h+=`@font-face{font-family:'${L}';src:url(${T});font-style:${M.style||"normal"};font-weight:${M.weight||"normal"};}`}}catch(M){}for(let M of r){if(!M||typeof M!="object")continue;let L=String(M.family||"").replace(/^['"]+|['"]+$/g,"");if(!L||tt(L)||!o.has(L)||n!=null&&n.families&&n.families.some(z=>String(z).toLowerCase()===L.toLowerCase()))continue;let T=M.weight!=null?String(M.weight):"normal",D=M.style!=null?String(M.style):"normal",$=M.stretchPct!=null?`${M.stretchPct}%`:"100%",P=String(M.src||""),q=P;if(!q.startsWith("data:")){if((U=x.resource)!=null&&U.has(P))q=x.resource.get(P),(V=x.font)==null||V.add(P);else if(!((X=x.font)!=null&&X.has(P)))try{let z=yield Y(P,{as:"dataURL",useProxy:s,silent:!0});if(z.ok&&typeof z.data=="string")q=z.data,(J=x.resource)==null||J.set(P,q),(ut=x.font)==null||ut.add(P);else continue}catch(z){console.warn("[snapDOM] Failed to fetch localFonts src:",P);continue}}h+=`@font-face{font-family:'${L}';src:url(${q});font-style:${D};font-weight:${T};font-stretch:${$};}`}return h&&(h=Qr(h),(Z=x.resource)==null||Z.set(c,h)),h})}function Yt(t){let e=new Set;if(!t)return e;let n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,null),r=i=>{let u=Vt(i.fontFamily);if(!u)return;let c=(l,d,f)=>`${u}__${zt(l)}__${de(d)}__${Hr(f)}`;e.add(c(i.fontWeight,i.fontStyle,i.fontStretch))};r(getComputedStyle(t));let s=getComputedStyle(t,"::before");s&&s.content&&s.content!=="none"&&r(s);let o=getComputedStyle(t,"::after");for(o&&o.content&&o.content!=="none"&&r(o);n.nextNode();){let i=n.currentNode,u=getComputedStyle(i);r(u);let c=getComputedStyle(i,"::before");c&&c.content&&c.content!=="none"&&r(c);let l=getComputedStyle(i,"::after");l&&l.content&&l.content!=="none"&&r(l)}return e}function Kt(t){let e=new Set,n=s=>{if(s)for(let o of s)e.add(o.codePointAt(0))},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;r.nextNode();){let s=r.currentNode;if(s.nodeType===Node.TEXT_NODE)n(s.nodeValue||"");else if(s.nodeType===Node.ELEMENT_NODE){let o=s;for(let i of["::before","::after"]){let u=getComputedStyle(o,i),c=u==null?void 0:u.getPropertyValue("content");if(!(!c||c==="none"))if(/^"/.test(c)||/^'/.test(c))n(c.slice(1,-1));else{let l=c.match(/\\[0-9A-Fa-f]{1,6}/g);if(l)for(let d of l)try{e.add(parseInt(d.slice(1),16))}catch(f){}}}}}return e}function Gt(t,e=2){return k(this,null,function*(){try{yield document.fonts.ready}catch(s){}let n=Array.from(t||[]).filter(Boolean);if(n.length===0)return;let r=()=>{let s=document.createElement("div");s.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let o of n){let i=document.createElement("span");i.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",i.style.fontFamily=`"${o}"`,i.style.fontWeight="700",i.style.fontStyle="italic",i.style.fontSize="32px",i.style.lineHeight="1",i.style.whiteSpace="nowrap",i.style.margin="0",i.style.padding="0",s.appendChild(i)}document.body.appendChild(s),s.offsetWidth,document.body.removeChild(s)};for(let s=0;s<Math.max(1,e);s++)r(),yield new Promise(o=>requestAnimationFrame(()=>requestAnimationFrame(o)))})}function ln(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function Zr(t){return(t||"").replace(/"([^"]*)"/g,"$1")}function sn(t,e=!1){let n="",r=Math.max(1,t);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return e?n.toUpperCase():n}function an(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"]],r=Math.max(1,Math.min(3999,t)),s="";for(let[o,i]of n)for(;r>=o;)s+=i,r-=o;return e?s:s.toLowerCase()}function cn(t,e){switch((e||"decimal").toLowerCase()){case"decimal":return String(Math.max(0,t));case"decimal-leading-zero":return(t<10?"0":"")+String(Math.max(0,t));case"lower-alpha":return sn(t,!1);case"upper-alpha":return sn(t,!0);case"lower-roman":return an(t,!1);case"upper-roman":return an(t,!0);default:return String(Math.max(0,t))}}function un(t){let e=()=>{var h,g,m;return(m=(g=(h=x)==null?void 0:h.session)==null?void 0:g.__counterEpoch)!=null?m:0},n=e(),r=new WeakMap,s=t instanceof Document?t.documentElement:t,o=h=>h&&h.tagName==="LI",i=h=>{let g=0,m=h==null?void 0:h.parentElement;if(!m)return 0;for(let a of m.children){if(a===h)break;a.tagName==="LI"&&g++}return g},u=h=>{let g=new Map;for(let[m,a]of h)g.set(m,a.slice());return g},c=(h,g,m)=>{var w,C;let a=u(h),p;try{p=((w=m.style)==null?void 0:w.counterReset)||getComputedStyle(m).counterReset}catch(S){}if(p&&p!=="none")for(let S of p.split(",")){let v=S.trim().split(/\s+/),b=v[0],E=Number.isFinite(Number(v[1]))?Number(v[1]):0;if(!b)continue;let A=g.get(b);if(A&&A.length){let N=A.slice();N.push(E),a.set(b,N)}else a.set(b,[E])}let y;try{y=((C=m.style)==null?void 0:C.counterIncrement)||getComputedStyle(m).counterIncrement}catch(S){}if(y&&y!=="none")for(let S of y.split(",")){let v=S.trim().split(/\s+/),b=v[0],E=Number.isFinite(Number(v[1]))?Number(v[1]):1;if(!b)continue;let A=a.get(b)||[];A.length===0&&A.push(0),A[A.length-1]+=E,a.set(b,A)}try{if(getComputedStyle(m).display==="list-item"&&o(m)){let v=m.parentElement,b=1;if(v&&v.tagName==="OL"){let A=v.getAttribute("start"),N=Number.isFinite(Number(A))?Number(A):1,R=i(m),U=m.getAttribute("value");b=Number.isFinite(Number(U))?Number(U):N+R}else b=1+i(m);let E=a.get("list-item")||[];E.length===0&&E.push(0),E[E.length-1]=b,a.set("list-item",E)}}catch(S){}return a},l=(h,g,m)=>{let a=c(m,g,h);r.set(h,a);let p=a;for(let y of h.children)p=l(y,a,p);return a},d=new Map;l(s,d,d);function f(){let h=e();if(h!==n){n=h;let g=new Map;l(s,g,g)}}return{get(h,g){var a;f();let m=(a=r.get(h))==null?void 0:a.get(g);return m&&m.length?m[m.length-1]:0},getStack(h,g){var a;f();let m=(a=r.get(h))==null?void 0:a.get(g);return m?m.slice():[]}}}function fn(t,e,n){if(!t||t==="none")return t;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g,s=t.replace(r,(o,i,u)=>{var l,d,f,h;let c=String(u).split(",").map(g=>g.trim());if(i==="counter"){let g=(l=c[0])==null?void 0:l.replace(/^["']|["']$/g,""),m=(c[1]||"decimal").toLowerCase(),a=n.get(e,g);return cn(a,m)}else{let g=(d=c[0])==null?void 0:d.replace(/^["']|["']$/g,""),m=(h=(f=c[1])==null?void 0:f.replace(/^["']|["']$/g,""))!=null?h:"",a=(c[2]||"decimal").toLowerCase(),p=n.getStack(e,g);return p.length?p.map(w=>cn(w,a)).join(m):""}});return Zr(s)}catch(r){return"- "}}var kt=new WeakMap,dn=300;function to(t,e){let n=gn(t);return e?(e.__pseudoPreflightFp!==n&&(e.__pseudoPreflight=pn(t),e.__pseudoPreflightFp=n),!!e.__pseudoPreflight):pn(t)}function he(t){try{return t&&t.cssRules?t.cssRules:null}catch(e){return null}}function gn(t){let e=t.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${e.length}|`,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.tagName==="STYLE"){let u=i.textContent?i.textContent.length:0;n+=`S${u}|`;let c=i.sheet,l=c?he(c):null;l&&(r+=l.length)}else{let u=i.getAttribute("href")||"",c=i.getAttribute("media")||"all";n+=`L${u}|m:${c}|`;let l=i.sheet,d=l?he(l):null;d&&(r+=d.length)}}let s=t.adoptedStyleSheets;return n+=`ass:${Array.isArray(s)?s.length:0}|tr:${r}`,n}function mn(t,e,n){let r=he(t);if(!r)return!1;for(let s=0;s<r.length;s++){if(n.budget<=0)return!1;let o=r[s],i=o&&o.cssText?o.cssText:"";n.budget--;for(let u of e)if(i.includes(u))return!0;if(o&&o.cssRules&&o.cssRules.length)for(let u=0;u<o.cssRules.length&&n.budget>0;u++){let c=o.cssRules[u],l=c&&c.cssText?c.cssText:"";n.budget--;for(let d of e)if(l.includes(d))return!0}if(n.budget<=0)return!1}return!1}function pn(t=document){let e=gn(t),n=kt.get(t);if(n&&n.fingerprint===e)return n.result;let r=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],s=t.querySelectorAll("style");for(let i=0;i<s.length;i++){let u=s[i].textContent||"";for(let c of r)if(u.includes(c))return kt.set(t,{fingerprint:e,result:!0}),!0}let o=t.adoptedStyleSheets;if(Array.isArray(o)&&o.length){let i={budget:dn};try{for(let u of o)if(mn(u,r,i))return kt.set(t,{fingerprint:e,result:!0}),!0}catch(u){}}{let i=t.querySelectorAll('style,link[rel~="stylesheet"]'),u={budget:dn};for(let c=0;c<i.length&&u.budget>0;c++){let l=i[c],d=null;if(l.tagName,d=l.sheet||null,d&&mn(d,r,u))return kt.set(t,{fingerprint:e,result:!0}),!0}}return t.querySelector('[style*="counter("], [style*="counters("]')?(kt.set(t,{fingerprint:e,result:!0}),!0):(kt.set(t,{fingerprint:e,result:!1}),!1)}var At=new WeakMap,hn=-1;function eo(t){return(t||"").replace(/"([^"]*)"/g,"$1")}function no(t){if(!t)return"";let e=[],n=/"([^"]*)"/g,r;for(;r=n.exec(t);)e.push(r[1]);return e.length?e.join(""):eo(t)}function ge(t,e){let n=t.parentElement,r=n?At.get(n):null;return r?{get(s,o){let i=e.get(s,o),u=r.get(o);return typeof u=="number"?Math.max(i,u):i},getStack(s,o){let i=e.getStack(s,o);if(!i.length)return i;let u=r.get(o);if(typeof u=="number"){let c=i.slice();return c[c.length-1]=Math.max(c[c.length-1],u),c}return i}}:e}function ye(t,e,n){let r=new Map;function s(c){let l=[];if(!c||c==="none")return l;for(let d of String(c).split(",")){let f=d.trim().split(/\s+/),h=f[0],g=Number.isFinite(Number(f[1]))?Number(f[1]):void 0;h&&l.push({name:h,num:g})}return l}let o=s(e==null?void 0:e.counterReset),i=s(e==null?void 0:e.counterIncrement);function u(c){if(r.has(c))return r.get(c).slice();let l=n.getStack(t,c);l=l.length?l.slice():[];let d=o.find(h=>h.name===c);if(d){let h=Number.isFinite(d.num)?d.num:0;l=l.length?[...l,h]:[h]}let f=i.find(h=>h.name===c);if(f){let h=Number.isFinite(f.num)?f.num:1;l.length===0&&(l=[0]),l[l.length-1]+=h}return r.set(c,l.slice()),l}return{get(c,l){let d=u(l);return d.length?d[d.length-1]:0},getStack(c,l){return u(l)},__incs:i}}function ro(t,e,n){let r;try{r=getComputedStyle(t,e)}catch(l){}let s=r==null?void 0:r.content;if(!s||s==="none"||s==="normal")return{text:"",incs:[]};let o=ge(t,n),i=ye(t,r,o),u=ln(s)?fn(s,t,i):s;return{text:no(u),incs:i.__incs||[]}}function be(t,e,n,r){return k(this,null,function*(){var l,d,f,h,g;if(!(t instanceof Element)||!(e instanceof Element))return;let s=t.ownerDocument||document;if(!to(s,n))return;let o=(f=(d=(l=x)==null?void 0:l.session)==null?void 0:d.__counterEpoch)!=null?f:0;if(hn!==o&&(At=new WeakMap,n&&(n.__counterCtx=null),hn=o),!n.__counterCtx)try{n.__counterCtx=un(t.ownerDocument||document)}catch(m){}let i=n.__counterCtx;for(let m of["::before","::after","::first-letter"])try{let a=yt(t,m);if(!a||a.content==="none"&&a.backgroundImage==="none"&&a.backgroundColor==="transparent"&&(a.borderStyle==="none"||parseFloat(a.borderWidth)===0)&&(!a.transform||a.transform==="none")&&a.display==="inline")continue;if(m==="::first-letter"){let W=getComputedStyle(t);if(!(a.color!==W.color||a.fontSize!==W.fontSize||a.fontWeight!==W.fontWeight))continue;let j=Array.from(e.childNodes).find(_t=>{var Et;return _t.nodeType===Node.TEXT_NODE&&((Et=_t.textContent)==null?void 0:Et.trim().length)>0});if(!j)continue;let _=j.textContent,K=_.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u),Q=K==null?void 0:K[0],ft=_.slice((Q==null?void 0:Q.length)||0);if(!Q||/[\uD800-\uDFFF]/.test(Q))continue;let vt=document.createElement("span");vt.textContent=Q,vt.dataset.snapdomPseudo="::first-letter";let nt=Dt(a),rt=St(nt,"span");n.styleMap.set(vt,rt);let Pt=document.createTextNode(ft);e.replaceChild(Pt,j),e.insertBefore(vt,Pt);continue}let y=(h=a.content)!=null?h:"",w=y===""||y==="none"||y==="normal",{text:C,incs:S}=ro(t,m,i),v=a.backgroundImage,b=a.backgroundColor,E=a.fontFamily,A=parseInt(a.fontSize)||32,N=parseInt(a.fontWeight)||!1,R=a.color||"#000",U=a.borderStyle,V=parseFloat(a.borderWidth),X=a.transform,J=tt(E),ut=!w&&C!=="",Z=v&&v!=="none",M=b&&b!=="transparent"&&b!=="rgba(0, 0, 0, 0)",L=U&&U!=="none"&&V>0,T=X&&X!=="none";if(!(ut||Z||M||L||T)){if(S&&S.length&&t.parentElement){let W=At.get(t.parentElement)||new Map;for(let{name:H}of S){if(!H)continue;let j=ge(t,i),K=ye(t,getComputedStyle(t,m),j).get(t,H);W.set(H,K)}At.set(t.parentElement,W)}continue}let $=document.createElement("span");$.dataset.snapdomPseudo=m,$.style.pointerEvents="none";let P=Dt(a),q=St(P,"span");if(n.styleMap.set($,q),J&&C&&C.length===1){let{dataUrl:W,width:H,height:j}=yield Ze(C,E,N,A,R),_=document.createElement("img");_.src=W,_.style=`height:${A}px;width:${H/j*A}px;object-fit:contain;`,$.appendChild(_),e.dataset.snapdomHasIcon="true"}else if(C&&C.startsWith("url(")){let W=ht(C);if(W!=null&&W.trim())try{let H=document.createElement("img"),j=yield Y(dt(W),{as:"dataURL",useProxy:r.useProxy});H.src=j.data,H.style=`width:${A}px;height:auto;object-fit:contain;`,$.appendChild(H)}catch(H){console.error(`[snapdom] Error in pseudo ${m} for`,t,H)}}else!J&&ut&&($.textContent=C);$.style.backgroundImage="none","maskImage"in $.style&&($.style.maskImage="none"),"webkitMaskImage"in $.style&&($.style.webkitMaskImage="none");try{$.style.backgroundRepeat=a.backgroundRepeat,$.style.backgroundSize=a.backgroundSize,a.backgroundPositionX&&a.backgroundPositionY?($.style.backgroundPositionX=a.backgroundPositionX,$.style.backgroundPositionY=a.backgroundPositionY):$.style.backgroundPosition=a.backgroundPosition,$.style.backgroundOrigin=a.backgroundOrigin,$.style.backgroundClip=a.backgroundClip,$.style.backgroundAttachment=a.backgroundAttachment,$.style.backgroundBlendMode=a.backgroundBlendMode}catch(W){}if(Z)try{let W=Ft(v),H=yield Promise.all(W.map(gt));$.style.backgroundImage=H.join(", ")}catch(W){console.warn(`[snapdom] Failed to inline background-image for ${m}`,W)}M&&($.style.backgroundColor=b);let et=$.childNodes.length>0||((g=$.textContent)==null?void 0:g.trim())!==""||Z||M||L||T;if(S&&S.length&&t.parentElement){let W=At.get(t.parentElement)||new Map,H=ge(t,i),j=ye(t,getComputedStyle(t,m),H);for(let{name:_}of S){if(!_)continue;let K=j.get(t,_);W.set(_,K)}At.set(t.parentElement,W)}if(!et)continue;m==="::before"?e.insertBefore($,e.firstChild):e.appendChild($)}catch(a){console.warn(`[snapdom] Failed to capture ${m} for`,t,a)}let u=Array.from(t.children),c=Array.from(e.children).filter(m=>!m.dataset.snapdomPseudo);for(let m=0;m<Math.min(u.length,c.length);m++)yield be(u[m],c[m],n,r)})}function yn(t,e){var w,C,S,v;if(!t||!(t instanceof Element))return;let n=t.ownerDocument||document,r=e||n,s=t instanceof SVGSVGElement?[t]:Array.from(t.querySelectorAll("svg"));if(s.length===0)return;let o=/url\(\s*#([^)]+)\)/g,i=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],u=b=>window.CSS&&CSS.escape?CSS.escape(b):b.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),c=new Set(Array.from(t.querySelectorAll("[id]")).map(b=>b.id)),l=new Set,d=!1,f=b=>{if(!b)return;o.lastIndex=0;let E;for(;E=o.exec(b);){d=!0;let A=(E[1]||"").trim();A&&!c.has(A)&&l.add(A)}},h=b=>{let E=b.querySelectorAll('use[href^="#"], use[xlink\\:href^="#"]');for(let R of E){let U=R.getAttribute("href")||R.getAttribute("xlink:href");if(!U||!U.startsWith("#"))continue;d=!0;let V=U.slice(1).trim();V&&!c.has(V)&&l.add(V)}let N=b.querySelectorAll('*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("], *[clip-path^="url("],*[mask^="url("],*[marker^="url("], *[marker-start^="url("],*[marker-mid^="url("], *[marker-end^="url("]');for(let R of N){f(R.getAttribute("style")||"");for(let U of i)f(R.getAttribute(U))}};for(let b of s)h(b);if(!d)return;let g=t.querySelector("svg.inline-defs-container");g||(g=n.createElementNS("http://www.w3.org/2000/svg","svg"),g.classList.add("inline-defs-container"),g.setAttribute("aria-hidden","true"),g.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(g,t.firstChild||null));let m=g.querySelector("defs")||null,a=b=>{if(!b||c.has(b))return null;let E=u(b),A=N=>{let R=r.querySelector(N);return R&&!t.contains(R)?R:null};return A(`svg defs > *#${E}`)||A(`svg > symbol#${E}`)||A(`*#${E}`)};if(!l.size)return;let p=new Set(l),y=new Set;for(;p.size;){let b=p.values().next().value;if(p.delete(b),!b||c.has(b)||y.has(b))continue;let E=a(b);if(!E){y.add(b);continue}m||(m=n.createElementNS("http://www.w3.org/2000/svg","defs"),g.appendChild(m));let A=E.cloneNode(!0);A.id||A.setAttribute("id",b),m.appendChild(A),y.add(b),c.add(b);let N=[A,...A.querySelectorAll("*")];for(let R of N){let U=((w=R.getAttribute)==null?void 0:w.call(R,"href"))||((C=R.getAttribute)==null?void 0:C.call(R,"xlink:href"));if(U&&U.startsWith("#")){let X=U.slice(1).trim();X&&!c.has(X)&&!y.has(X)&&p.add(X)}let V=((S=R.getAttribute)==null?void 0:S.call(R,"style"))||"";V&&f(V);for(let X of i){let J=(v=R.getAttribute)==null?void 0:v.call(R,X);J&&f(J)}}}}function wn(t,e){var u;if(!t||!e)return;let n=t.scrollTop||0;if(!n)return;getComputedStyle(e).position==="static"&&(e.style.position="relative");let r=t.getBoundingClientRect(),s=t.clientHeight,o="data-snap-ph",i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;i.nextNode();){let c=i.currentNode,l=getComputedStyle(c),d=l.position;if(d!=="sticky"&&d!=="-webkit-sticky")continue;let f=bn(l.top),h=bn(l.bottom);if(f==null&&h==null)continue;let g=oo(c,t),m=so(e,g,o);if(!m)continue;let a=c.getBoundingClientRect(),p=a.width,y=a.height,w=a.left-r.left;if(!(p>0&&y>0)||!Number.isFinite(w))continue;let C=f!=null?f+n:n+(s-y-h);if(!Number.isFinite(C))continue;let S=Number.parseInt(l.zIndex,10),v=Number.isFinite(S),b=v?Math.max(S,1)+1:2,E=v?S-1:0,A=m.cloneNode(!1);A.setAttribute(o,"1"),A.style.position="sticky",A.style.left=`${w}px`,A.style.top=`${C}px`,A.style.width=`${p}px`,A.style.height=`${y}px`,A.style.visibility="hidden",A.style.zIndex=String(E),A.style.overflow="hidden",A.style.background="transparent",A.style.boxShadow="none",A.style.filter="none",(u=m.parentElement)==null||u.insertBefore(A,m),m.style.position="absolute",m.style.left=`${w}px`,m.style.top=`${C}px`,m.style.bottom="auto",m.style.zIndex=String(b),m.style.pointerEvents="none"}}function bn(t){if(!t||t==="auto")return null;let e=Number.parseFloat(t);return Number.isFinite(e)?e:null}function oo(t,e){let n=[];for(let r=t;r&&r!==e;){let s=r.parentElement;if(!s)break;n.push(Array.prototype.indexOf.call(s.children,r)),r=s}return n.reverse()}function so(t,e,n){let r=t;for(let s=0;s<e.length;s++)if(r=io(r,n)[e[s]],!r)return null;return r instanceof HTMLElement?r:null}function io(t,e){let n=[],r=t.children;for(let s=0;s<r.length;s++){let o=r[s];o.hasAttribute(e)||n.push(o)}return n}function xn(t){let e=getComputedStyle(t),n=e.outlineStyle,r=e.outlineWidth,s=e.borderStyle,o=e.borderWidth,i=n!=="none"&&parseFloat(r)>0,u=s==="none"||parseFloat(o)===0;i&&u&&(t.style.border=`${r} solid transparent`)}function Sn(n){return k(this,arguments,function*(t,e={}){var l,d;let r={styleMap:x.session.styleMap,styleCache:x.session.styleCache,nodeMap:x.session.nodeMap},s,o="",i="";xn(t);try{yn(t)}catch(f){console.warn("inlineExternal defs or symbol failed:",f)}try{s=yield Rt(t,r,e,t)}catch(f){throw console.warn("deepClone failed:",f),f}try{yield be(t,s,r,e)}catch(f){console.warn("inlinePseudoElements failed:",f)}yield Xe(s);try{let f=s.querySelectorAll("style[data-sd]");for(let h of f)i+=h.textContent||"",h.remove()}catch(f){}let u=ce(r.styleMap);o=Array.from(u.entries()).map(([f,h])=>`.${h}{${f}}`).join(""),o=i+o;for(let[f,h]of r.styleMap.entries()){if(f.tagName==="STYLE")continue;if(f.getRootNode&&f.getRootNode()instanceof ShadowRoot){f.setAttribute("style",h.replace(/;/g,"; "));continue}let g=u.get(h);g&&f.classList.add(g);let m=(l=f.style)==null?void 0:l.backgroundImage,a=(d=f.dataset)==null?void 0:d.snapdomHasIcon;m&&m!=="none"&&(f.style.backgroundImage=m),a&&(f.style.verticalAlign="middle",f.style.display="inline")}for(let[f,h]of r.nodeMap.entries()){let g=h.scrollLeft,m=h.scrollTop;if((g||m)&&f instanceof HTMLElement){f.style.overflow="hidden",f.style.scrollbarWidth="none",f.style.msOverflowStyle="none";let p=document.createElement("div");for(p.style.transform=`translate(${-g}px, ${-m}px)`,p.style.willChange="transform",p.style.display="inline-block",p.style.width="100%";f.firstChild;)p.appendChild(f.firstChild);f.appendChild(p)}}let c=s instanceof HTMLElement&&s.firstElementChild instanceof HTMLElement?s.firstElementChild:s;if(wn(t,c),t===r.nodeMap.get(s)){let f=r.styleCache.get(t)||window.getComputedStyle(t);r.styleCache.set(t,f);let h=ne(f.transform);s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=h||""}for(let[f,h]of r.nodeMap.entries())h.tagName==="PRE"&&(f.style.marginTop="0",f.style.marginBlockStart="0");return{clone:s,classCSS:o,styleCache:r.styleCache}})}function ao(t){var l,d,f,h;let e=parseInt(((l=t.dataset)==null?void 0:l.snapdomWidth)||"",10)||0,n=parseInt(((d=t.dataset)==null?void 0:d.snapdomHeight)||"",10)||0,r=parseInt(t.getAttribute("width")||"",10)||0,s=parseInt(t.getAttribute("height")||"",10)||0,o=parseFloat(((f=t.style)==null?void 0:f.width)||"")||0,i=parseFloat(((h=t.style)==null?void 0:h.height)||"")||0,u=e||o||r||t.width||t.naturalWidth||100,c=n||i||s||t.height||t.naturalHeight||100;return{width:u,height:c}}function Cn(n){return k(this,arguments,function*(t,e={}){let r=Array.from(t.querySelectorAll("img")),s=o=>k(null,null,function*(){if(!o.getAttribute("src")){let f=o.currentSrc||o.src||"";f&&o.setAttribute("src",f)}o.removeAttribute("srcset"),o.removeAttribute("sizes");let i=o.src||"";if(!i)return;let u=yield Y(i,{as:"dataURL",useProxy:e.useProxy});if(u.ok&&typeof u.data=="string"&&u.data.startsWith("data:")){o.src=u.data,o.width||(o.width=o.naturalWidth||100),o.height||(o.height=o.naturalHeight||100);return}let{width:c,height:l}=ao(o),{fallbackURL:d}=e||{};if(d)try{let f=typeof d=="function"?yield d({width:c,height:l,src:i,element:o}):d;if(f){let h=yield Y(f,{as:"dataURL",useProxy:e.useProxy});o.src=h.data,o.width||(o.width=c),o.height||(o.height=l);return}}catch(f){}if(e.placeholders!==!1){let f=document.createElement("div");f.style.cssText=[`width:${c}px`,`height:${l}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${l}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),f.textContent="img",o.replaceWith(f)}else{let f=document.createElement("div");f.style.cssText=`display:inline-block;width:${c}px;height:${l}px;visibility:hidden;`,o.replaceWith(f)}});for(let o=0;o<r.length;o+=4){let i=r.slice(o,o+4).map(s);yield Promise.allSettled(i)}})}function Qt(s,o,i){return k(this,arguments,function*(t,e,n,r={}){let u=[[t,e]],c=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],l=["mask-position","mask-size","mask-repeat","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],d=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],f=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];for(;u.length;){let[h,g]=u.shift(),m=n.get(h)||yt(h);n.has(h)||n.set(h,m);let a=(()=>{let w=m.getPropertyValue("border-image"),C=m.getPropertyValue("border-image-source");return w&&w!=="none"||C&&C!=="none"})();for(let w of d){let C=m.getPropertyValue(w);C&&g.style.setProperty(w,C)}for(let w of c){let C=m.getPropertyValue(w);if(!C||C==="none")continue;let S=Ft(C),v=yield Promise.all(S.map(b=>gt(b,r)));v.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&g.style.setProperty(w,v.join(", "))}for(let w of l){let C=m.getPropertyValue(w);!C||C==="initial"||g.style.setProperty(w,C)}if(a)for(let w of f){let C=m.getPropertyValue(w);!C||C==="initial"||g.style.setProperty(w,C)}let p=Array.from(h.children),y=Array.from(g.children).filter(w=>!(w.dataset&&w.dataset.snapdomPseudo));for(let w=0;w<Math.min(p.length,y.length);w++)u.push([p[w],y[w]])}})}function kn(t){var l;if(!t)return()=>{};let e=co(t);if(e<=0)return()=>{};if(!fo(t))return()=>{};let n=getComputedStyle(t),r=Math.round(lo(n)*e+uo(n)),s=(l=t.textContent)!=null?l:"",o=s;if(t.scrollHeight<=r+.5)return()=>{};let i=0,u=s.length,c=-1;for(;i<=u;){let d=i+u>>1;t.textContent=s.slice(0,d)+"\u2026",t.scrollHeight<=r+.5?(c=d,i=d+1):u=d-1}return t.textContent=(c>=0?s.slice(0,c):"")+"\u2026",()=>{t.textContent=o}}function co(t){let e=getComputedStyle(t),n=e.getPropertyValue("-webkit-line-clamp")||e.getPropertyValue("line-clamp");n=(n||"").trim();let r=parseInt(n,10);return Number.isFinite(r)&&r>0?r:0}function lo(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 uo(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function fo(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var Nt=[];function An(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 we(...t){let e=t.flat();for(let n of e){let r=An(n);r&&(Nt.some(s=>s&&s.name&&r.name&&s.name===r.name)||Nt.push(r))}}function Mn(t){return(t&&Array.isArray(t.plugins)?t.plugins:Nt)||Nt}function st(t,e,n){return k(this,null,function*(){let r=n,s=Mn(e);for(let o of s){let i=o&&typeof o[t]=="function"?o[t]:null;if(!i)continue;let u=yield i(e,r);typeof u!="undefined"&&(r=u)}return r})}function vn(t,e,n){return k(this,null,function*(){let r=[],s=Mn(e);for(let o of s){let i=o&&typeof o[t]=="function"?o[t]:null;if(!i)continue;let u=yield i(e,n);typeof u!="undefined"&&r.push(u)}return r})}function mo(t){let e=[];if(Array.isArray(t))for(let n of t){let r=An(n);if(!r||!r.name)continue;let s=e.findIndex(o=>o&&o.name===r.name);s>=0&&e.splice(s,1),e.push(r)}for(let n of Nt)n&&n.name&&!e.some(r=>r.name===n.name)&&e.push(n);return Object.freeze(e)}function En(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=mo(e)),t}function Fn(t,e){if(!t||!e||!e.style)return;let n=getComputedStyle(t);try{e.style.boxShadow="none"}catch(o){}try{e.style.textShadow="none"}catch(o){}try{e.style.outline="none"}catch(o){}let s=(n.filter||"").replace(/\bblur\([^()]*\)\s*/gi,"").replace(/\bdrop-shadow\([^()]*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=s.length?s:"none"}catch(o){}}function po(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT),n=[];for(;e.nextNode();)n.push(e.currentNode);for(let r of n)r.remove()}function ho(t,e={}){let{stripFrameworkDirectives:n=!0}=e,r=new Set(["xml","xlink"]),s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;s.nextNode();){let o=s.currentNode;for(let i of Array.from(o.attributes)){let u=i.name;if(u.includes("@")){o.removeAttribute(u);continue}if(u.includes(":")){let c=u.split(":",1)[0];if(!r.has(c)){o.removeAttribute(u);continue}}if(n&&(u.startsWith("x-")||u.startsWith("v-")||u.startsWith(":")||u.startsWith("on:")||u.startsWith("bind:")||u.startsWith("let:")||u.startsWith("class:"))){o.removeAttribute(u);continue}}}}function $n(t,e={}){t&&(ho(t,e),po(t))}function go(t){var e;try{let n=((e=t.getAttribute)==null?void 0:e.call(t,"style"))||"";return/\b(height|width|block-size|inline-size)\s*:/.test(n)}catch(n){return!1}}function yo(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof HTMLIFrameElement||t instanceof SVGElement||t instanceof HTMLObjectElement||t instanceof HTMLEmbedElement}function bo(t,e){if(!(t instanceof Element)||go(t)||yo(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=e.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||e.transform&&e.transform!=="none")}function In(t,e,n=new Map){function r(s,o){if(!(s instanceof Element)||!(o instanceof Element))return;let i=s.childElementCount>o.childElementCount,u=n.get(s)||getComputedStyle(s);if(n.has(s)||n.set(s,u),i&&bo(s,u)){o.style.height||(o.style.height="auto"),o.style.width||(o.style.width="auto"),o.style.removeProperty("block-size"),o.style.removeProperty("inline-size"),o.style.minHeight||(o.style.minHeight="0"),o.style.minWidth||(o.style.minWidth="0"),o.style.maxHeight||(o.style.maxHeight="none"),o.style.maxWidth||(o.style.maxWidth="none");let d=u.overflowY||u.overflowBlock||"visible",f=u.overflowX||u.overflowInline||"visible";(d!=="visible"||f!=="visible")&&(o.style.overflow="visible")}let c=Array.from(s.children),l=Array.from(o.children);for(let d=0;d<Math.min(c.length,l.length);d++)r(c[d],l[d])}r(t,e)}function wo(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed"||e.position==="sticky"||(e.cssFloat||e.float||"none")!=="none"||e.transform&&e.transform!=="none")}function xo(t,e){if(!(t instanceof Element))return!1;if(t.getAttribute("data-capture")==="exclude"&&(e==null?void 0:e.excludeMode)==="remove")return!0;if(Array.isArray(e==null?void 0:e.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(r){}return!1}function Ln(t,e){let n=getComputedStyle(t),r=t.getBoundingClientRect(),s=1/0,o=-1/0,i=!1,u=Array.from(t.children);for(let g of u){if(xo(g,e)||!wo(g))continue;let m=g.getBoundingClientRect(),a=m.top-r.top,p=m.bottom-r.top;p<=a||(a<s&&(s=a),p>o&&(o=p),i=!0)}let c=i?Math.max(0,o-s):0,l=parseFloat(n.borderTopWidth)||0,d=parseFloat(n.borderBottomWidth)||0,f=parseFloat(n.paddingTop)||0,h=parseFloat(n.paddingBottom)||0;return l+d+f+h+c}var I=(t,e=3)=>Number.isFinite(t)?Math.round(t*ee(10,e))/ee(10,e):t;function Rn(t){var u;let e=t.boxShadow||"";if(!e||e==="none")return{top:0,right:0,bottom:0,left:0};let n=e.split(/\),(?=(?:[^()]*\([^()]*\))*[^()]*$)/).map(c=>c.trim()),r=0,s=0,o=0,i=0;for(let c of n){let l=((u=c.match(/-?\d+(\.\d+)?px/g))==null?void 0:u.map(p=>parseFloat(p)))||[];if(l.length<2)continue;let[d,f,h=0,g=0]=l,m=Math.abs(d)+h+g,a=Math.abs(f)+h+g;s=Math.max(s,m+Math.max(d,0)),i=Math.max(i,m+Math.max(-d,0)),o=Math.max(o,a+Math.max(f,0)),r=Math.max(r,a+Math.max(-f,0))}return{top:Math.ceil(r),right:Math.ceil(s),bottom:Math.ceil(o),left:Math.ceil(i)}}function Nn(t){let e=(t.filter||"").match(/blur\(\s*([0-9.]+)px\s*\)/),n=e?Math.ceil(parseFloat(e[1])||0):0;return{top:n,right:n,bottom:n,left:n}}function Tn(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0);return{top:e,right:e,bottom:e,left:e}}function Pn(t){var c;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)||[],r=0,s=0,o=0,i=0,u=!1;for(let l of n){u=!0;let d=((c=l.match(/-?\d+(?:\.\d+)?px/gi))==null?void 0:c.map(p=>parseFloat(p)))||[],[f=0,h=0,g=0]=d,m=Math.abs(f)+g,a=Math.abs(h)+g;s=Math.max(s,m+Math.max(f,0)),i=Math.max(i,m+Math.max(-f,0)),o=Math.max(o,a+Math.max(h,0)),r=Math.max(r,a+Math.max(-h,0))}return{bleed:{top:I(r),right:I(s),bottom:I(o),left:I(i)},has:u}}function _n(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch(o){}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch(o){}let r=n.transform||"none";if(!r||r==="none")try{let o=Dn(t);if(o.a===1&&o.b===0&&o.c===0&&o.d===1)return e.style.transform="none",{a:1,b:0,c:0,d:1}}catch(o){}let s=r.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let o=s[1].split(",").map(i=>parseFloat(i.trim()));if(o.length===6&&o.every(Number.isFinite)){let[i,u,c,l]=o,d=Math.sqrt(i*i+u*u)||0,f=0,h=0,g=0,m=0,a=0,p=0;d>0&&(f=i/d,h=u/d,g=f*c+h*l,m=c-f*g,a=l-h*g,p=Math.sqrt(m*m+a*a)||0,p>0?g=g/p:g=0);let y=d,w=0,C=g*p,S=p;try{e.style.transform=`matrix(${y}, ${w}, ${C}, ${S}, 0, 0)`}catch(v){}return{a:y,b:w,c:C,d:S}}}try{let o=String(r).trim();return e.style.transform=o+" translate(0px, 0px) rotate(0deg)",null}catch(o){return null}}function Se(t,e,n,r,s){let o=n.a,i=n.b,u=n.c,c=n.d,l=n.e||0,d=n.f||0;function f(y,w){let C=y-r,S=w-s,v=o*C+u*S,b=i*C+c*S;return v+=r+l,b+=s+d,[v,b]}let h=[f(0,0),f(t,0),f(0,e),f(t,e)],g=1/0,m=1/0,a=-1/0,p=-1/0;for(let[y,w]of h)y<g&&(g=y),w<m&&(m=w),y>a&&(a=y),w>p&&(p=w);return{minX:g,minY:m,maxX:a,maxY:p,width:a-g,height:p-m}}function Wn(t,e,n){let r=(t.transformOrigin||"0 0").trim().split(/\s+/),[s,o]=[r[0]||"0",r[1]||"0"],i=(u,c)=>{let l=u.toLowerCase();return l==="left"||l==="top"?0:l==="center"?c/2:l==="right"||l==="bottom"?c:l.endsWith("px")?parseFloat(l)||0:l.endsWith("%")?(parseFloat(l)||0)*c/100:/^-?\d+(\.\d+)?$/.test(l)&&parseFloat(l)||0};return{ox:i(s,e),oy:i(o,n)}}function On(t){var s,o,i,u,c,l,d,f;let e={rotate:"0deg",scale:null,translate:null},n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null;if(n){let h=p=>{try{return typeof n.has=="function"&&!n.has(p)||typeof n.get!="function"?null:n.get(p)}catch(y){return null}},g=h("rotate");if(g)if(g.angle){let p=g.angle;e.rotate=p.unit==="rad"?p.value*180/Math.PI+"deg":p.value+p.unit}else g.unit?e.rotate=g.unit==="rad"?g.value*180/Math.PI+"deg":g.value+g.unit:e.rotate=String(g);else{let p=getComputedStyle(t);e.rotate=p.rotate&&p.rotate!=="none"?p.rotate:"0deg"}let m=h("scale");if(m){let p="x"in m&&((s=m.x)==null?void 0:s.value)!=null?m.x.value:Array.isArray(m)?(o=m[0])==null?void 0:o.value:Number(m)||1,y="y"in m&&((i=m.y)==null?void 0:i.value)!=null?m.y.value:Array.isArray(m)?(u=m[1])==null?void 0:u.value:p;e.scale=`${p} ${y}`}else{let p=getComputedStyle(t);e.scale=p.scale&&p.scale!=="none"?p.scale:null}let a=h("translate");if(a){let p="x"in a&&"value"in a.x?a.x.value:Array.isArray(a)?(c=a[0])==null?void 0:c.value:0,y="y"in a&&"value"in a.y?a.y.value:Array.isArray(a)?(l=a[1])==null?void 0:l.value:0,w="x"in a&&((d=a.x)!=null&&d.unit)?a.x.unit:"px",C="y"in a&&((f=a.y)!=null&&f.unit)?a.y.unit:"px";e.translate=`${p}${w} ${y}${C}`}else{let p=getComputedStyle(t);e.translate=p.translate&&p.translate!=="none"?p.translate:null}return e}let r=getComputedStyle(t);return e.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",e.scale=r.scale&&r.scale!=="none"?r.scale:null,e.translate=r.translate&&r.translate!=="none"?r.translate:null,e}var xe=null;function So(){if(xe)return xe;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),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),xe=t,t}function Un(t){let e=So(),n=document.createElement("div");n.style.transformOrigin="0 0",t.baseTransform&&(n.style.transform=t.baseTransform),t.rotate&&(n.style.rotate=t.rotate),t.scale&&(n.style.scale=t.scale),t.translate&&(n.style.translate=t.translate),e.appendChild(n);let r=Dn(n);return e.removeChild(n),r}function Bn(t){let e=getComputedStyle(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 s=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",o=e.scale&&e.scale!=="none"&&e.scale!=="1",i=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(s||o||i)}function Dn(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch(n){return new WebKitCSSMatrix(e)}}function Ce(t,e){return k(this,null,function*(){var w;if(!t)throw new Error("Element cannot be null or undefined");Ot(e.cache);let n=e.fast,r=e.outerTransforms!==!1,s=!!e.outerShadows,o={element:t,options:e,plugins:e.plugins},i,u,c,l="",d="",f,h,g=null;yield st("beforeSnap",o),yield st("beforeClone",o);let m=kn(o.element);try{({clone:i,classCSS:u,styleCache:c}=yield Sn(o.element,o.options)),!r&&i&&(g=_n(o.element,i)),!s&&i&&Fn(o.element,i)}finally{m()}if(o=F({clone:i,classCSS:u,styleCache:c},o),yield st("afterClone",o),$n(o.clone),((w=o.options)==null?void 0:w.excludeMode)==="remove")try{In(o.element,o.clone,o.styleCache)}catch(C){console.warn("[snapdom] shrink pass failed:",C)}try{yield Ge(o.clone,o.element)}catch(C){}yield new Promise(C=>{ct(()=>k(null,null,function*(){yield Cn(o.clone,o.options),C()}),{fast:n})}),yield new Promise(C=>{ct(()=>k(null,null,function*(){yield Qt(o.element,o.clone,o.styleCache,o.options),C()}),{fast:n})}),e.embedFonts&&(yield new Promise(C=>{ct(()=>k(null,null,function*(){let S=Yt(o.element),v=Kt(o.element);if(G()){let b=new Set(Array.from(S).map(E=>String(E).split("__")[0]).filter(Boolean));yield Gt(b,1)}l=yield Xt({required:S,usedCodepoints:v,preCached:!1,exclude:o.options.excludeFonts,useProxy:o.options.useProxy}),C()}),{fast:n})}));let a=ie(o.clone).sort(),p=a.join(",");x.baseStyle.has(p)?d=x.baseStyle.get(p):yield new Promise(C=>{ct(()=>{d=ae(a),x.baseStyle.set(p,d),C()},{fast:n})}),o=F({fontsCSS:l,baseCSS:d},o),yield st("beforeRender",o),yield new Promise(C=>{ct(()=>{var Me;let S=getComputedStyle(o.element),v=o.element.getBoundingClientRect(),b=Math.max(1,I(o.element.offsetWidth||parseFloat(S.width)||v.width||1)),E=Math.max(1,I(o.element.offsetHeight||parseFloat(S.height)||v.height||1));if(((Me=o.options)==null?void 0:Me.excludeMode)==="remove"){let ot=Ln(o.element,o.options);Number.isFinite(ot)&&ot>0&&(E=Math.max(1,Math.min(E,I(ot+1))))}let A=(ot,at=NaN)=>{let wt=typeof ot=="string"?parseFloat(ot):ot;return Number.isFinite(wt)?wt:at},N=A(o.options.width),R=A(o.options.height),U=b,V=E,X=Number.isFinite(N),J=Number.isFinite(R),ut=E>0?b/E:1;X&&J?(U=Math.max(1,I(N)),V=Math.max(1,I(R))):X?(U=Math.max(1,I(N)),V=Math.max(1,I(U/(ut||1)))):J?(V=Math.max(1,I(R)),U=Math.max(1,I(V*(ut||1)))):(U=b,V=E);let Z=0,M=0,L=b,T=E;if(!r&&g&&Number.isFinite(g.a)){let ot={a:g.a,b:g.b||0,c:g.c||0,d:g.d||1,e:0,f:0},at=Se(b,E,ot,0,0);Z=I(at.minX),M=I(at.minY),L=I(at.maxX),T=I(at.maxY)}else if(r&&Co(o.element)){let at=S.transform&&S.transform!=="none"?S.transform:"",wt=On(o.element),te=Un({baseTransform:at,rotate:wt.rotate||"0deg",scale:wt.scale,translate:wt.translate}),{ox:Gn,oy:Qn}=Wn(S,b,E),Jn=te.is2D?te:new DOMMatrix(te.toString()),Wt=Se(b,E,Jn,Gn,Qn);Z=I(Wt.minX),M=I(Wt.minY),L=I(Wt.maxX),T=I(Wt.maxY)}let D=Rn(S),$=Nn(S),P=Tn(S),q=Pn(S),z=s?{top:I(D.top+$.top+P.top+q.bleed.top),right:I(D.right+$.right+P.right+q.bleed.right),bottom:I(D.bottom+$.bottom+P.bottom+q.bleed.bottom),left:I(D.left+$.left+P.left+q.bleed.left)}:{top:0,right:0,bottom:0,left:0};Z=I(Z-z.left),M=I(M-z.top),L=I(L+z.right),T=I(T+z.bottom);let et=Math.max(1,I(L-Z)),W=Math.max(1,I(T-M)),H=X||J?I(U/b):1,j=J||X?I(V/E):1,_=Math.max(1,I(et*H)),K=Math.max(1,I(W*j)),Q="http://www.w3.org/2000/svg",ft=G()?1:0,nt=I(ft+(r?0:1)),rt=document.createElementNS(Q,"foreignObject"),Pt=I(Z),_t=I(M);rt.setAttribute("x",String(I(-(Pt-nt)))),rt.setAttribute("y",String(I(-(_t-nt)))),rt.setAttribute("width",String(I(b+nt*2))),rt.setAttribute("height",String(I(E+nt*2))),rt.style.overflow="visible";let Et=document.createElement("style");Et.textContent=o.baseCSS+o.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+o.classCSS,rt.appendChild(Et);let bt=document.createElement("div");bt.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),bt.style.width=`${I(b)}px`,bt.style.height=`${I(E)}px`,bt.style.overflow="visible",o.clone.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),bt.appendChild(o.clone),rt.appendChild(bt);let Xn=new XMLSerializer().serializeToString(rt),Jt=I(et+nt*2),Zt=I(W+nt*2),Ae=X||J;e.meta={w0:b,h0:E,vbW:Jt,vbH:Zt,targetW:U,targetH:V};let Yn=G()&&Ae?Jt:I(_+nt*2),Kn=G()&&Ae?Zt:I(K+nt*2);h=`<svg xmlns="${Q}" width="${Yn}" height="${Kn}" viewBox="0 0 ${Jt} ${Zt}">`+Xn+"</svg>",f=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(h)}`,o=F({svgString:h,dataURL:f},o),C()},{fast:n})}),yield st("afterRender",o);let y=document.getElementById("snapdom-sandbox");return y&&y.style.position==="absolute"&&y.remove(),o.dataURL})}function Co(t){return Bn(t)}function ko(t){if(typeof t=="string"){let e=t.toLowerCase().trim();if(e==="disabled"||e==="full"||e==="auto"||e==="soft")return e}return"soft"}function Hn(t={}){var r,s,o,i,u,c,l,d,f,h,g,m,a,p,y,w,C,S,v,b;let e=(r=t.format)!=null?r:"png";e==="jpg"&&(e="jpeg");let n=ko(t.cache);return{debug:(s=t.debug)!=null?s:!1,fast:(o=t.fast)!=null?o:!0,scale:(i=t.scale)!=null?i:1,exclude:(u=t.exclude)!=null?u:[],excludeMode:(c=t.excludeMode)!=null?c:"hide",filter:(l=t.filter)!=null?l:null,filterMode:(d=t.filterMode)!=null?d:"hide",placeholders:t.placeholders!==!1,embedFonts:(f=t.embedFonts)!=null?f:!1,iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:(h=t.excludeFonts)!=null?h:void 0,fallbackURL:(g=t.fallbackURL)!=null?g:void 0,cache:n,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:(m=t.width)!=null?m:null,height:(a=t.height)!=null?a:null,format:e,type:(p=t.type)!=null?p:"svg",quality:(y=t.quality)!=null?y:.92,dpr:(w=t.dpr)!=null?w:window.devicePixelRatio||1,backgroundColor:(C=t.backgroundColor)!=null?C:["jpeg","webp"].includes(e)?"#ffffff":null,filename:(S=t.filename)!=null?S:"snapDOM",outerTransforms:(v=t.outerTransforms)!=null?v:!0,outerShadows:(b=t.outerShadows)!=null?b:!1}}function Ao(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function Mo(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function vo(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function Eo(t){let e=[],n="",r=0;for(let s=0;s<t.length;s++){let o=t[s];o==="("&&r++,o===")"&&(r=Math.max(0,r-1)),o===";"&&r===0?(e.push(n),n=""):n+=o}return n.trim()&&e.push(n),e.map(s=>s.trim()).filter(Boolean)}function Fo(t){let e=[],n="",r=0;for(let o=0;o<t.length;o++){let i=t[o];i==="("&&r++,i===")"&&(r=Math.max(0,r-1)),i===","&&r===0?(e.push(n.trim()),n=""):n+=i}n.trim()&&e.push(n.trim());let s=[];for(let o of e){if(/\binset\b/i.test(o))continue;let i=o.match(/-?\d+(?:\.\d+)?px/gi)||[],[u="0px",c="0px",l="0px"]=i,d=o.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),f=!!d&&d!==",";s.push(`drop-shadow(${u} ${c} ${l}${f?` ${d}`:""})`)}return s.join(" ")}function qn(t){let e=Eo(t),n=null,r=null,s=null,o=[];for(let u of e){let c=u.indexOf(":");if(c<0)continue;let l=u.slice(0,c).trim().toLowerCase(),d=u.slice(c+1).trim();l==="box-shadow"?s=d:l==="filter"?n=d:l==="-webkit-filter"?r=d:o.push([l,d])}if(s){let u=Fo(s);u&&(n=n?`${n} ${u}`:u,r=r?`${r} ${u}`:u)}let i=[...o];return n&&i.push(["filter",n]),r&&i.push(["-webkit-filter",r]),i.map(([u,c])=>`${u}:${c}`).join(";")}function $o(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,r)=>`${n}{${qn(r)}}`)}function Io(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,$o(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,r)=>`style=${n}${qn(r)}${n}`),t}function Lo(t){if(!G()||!Ao(t))return t;try{let e=Mo(t),n=Io(e);return vo(n)}catch(e){return t}}function lt(t,e){return k(this,null,function*(){let{width:n,height:r,scale:s=1,dpr:o=1,meta:i={},backgroundColor:u}=e;t=Lo(t);let c=new Image;c.loading="eager",c.decoding="sync",c.crossOrigin="anonymous",c.src=t,yield c.decode();let l=c.naturalWidth,d=c.naturalHeight,f=Number.isFinite(i.w0)?i.w0:l,h=Number.isFinite(i.h0)?i.h0:d,g,m,a=Number.isFinite(n),p=Number.isFinite(r);if(a&&p)g=Math.max(1,n),m=Math.max(1,r);else if(a){let C=n/Math.max(1,f);g=n,m=h*C}else if(p){let C=r/Math.max(1,h);m=r,g=f*C}else g=l,m=d;g=g*s,m=m*s;let y=document.createElement("canvas");y.width=g*o,y.height=m*o,y.style.width=`${g}px`,y.style.height=`${m}px`;let w=y.getContext("2d");return o!==1&&w.scale(o,o),u&&(w.save(),w.fillStyle=u,w.fillRect(0,0,g,m),w.restore()),w.drawImage(c,0,0,g,m),y})}function it(t,e){return k(this,null,function*(){let n=yield lt(t,e),r=new Image;return r.src=n.toDataURL(`image/${e.format}`,e.quality),yield r.decode(),r.style.width=`${n.width/e.dpr}px`,r.style.height=`${n.height/e.dpr}px`,r})}function Mt(t,e){return k(this,null,function*(){let{scale:n=1,width:r,height:s,meta:o={}}=e,i=Number.isFinite(r),u=Number.isFinite(s),c=Number.isFinite(n)&&n!==1||i||u;if(G()&&c)return yield it(t,O(F({},e),{format:"png",quality:1,meta:o}));let l=new Image;if(l.decoding="sync",l.loading="eager",l.src=t,yield l.decode(),i&&u)l.style.width=`${r}px`,l.style.height=`${s}px`;else if(i){let d=Number.isFinite(o.w0)?o.w0:l.naturalWidth,f=Number.isFinite(o.h0)?o.h0:l.naturalHeight,h=r/Math.max(1,d);l.style.width=`${r}px`,l.style.height=`${Math.round(f*h)}px`}else if(u){let d=Number.isFinite(o.w0)?o.w0:l.naturalWidth,f=Number.isFinite(o.h0)?o.h0:l.naturalHeight,h=s/Math.max(1,f);l.style.height=`${s}px`,l.style.width=`${Math.round(d*h)}px`}else{let d=Math.round(l.naturalWidth*n),f=Math.round(l.naturalHeight*n);if(l.style.width=`${d}px`,l.style.height=`${f}px`,typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let g=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${d}"`).replace(/height="[^"]*"/,`height="${f}"`);t=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g)}`,l.src=t}catch(h){}}return l})}function Tt(t,e){return k(this,null,function*(){let n=e.type;if(n==="svg"){let s=decodeURIComponent(t.split(",")[1]);return new Blob([s],{type:"image/svg+xml"})}let r=yield lt(t,e);return new Promise(s=>r.toBlob(o=>s(o),`image/${n}`,e.quality))})}function zn(t,e){return k(this,null,function*(){if(e.dpr=1,e.format==="svg"){let s=yield Tt(t,O(F({},e),{type:"svg"})),o=URL.createObjectURL(s),i=document.createElement("a");i.href=o,i.download=e.filename,i.click(),URL.revokeObjectURL(o);return}let n=yield lt(t,e),r=document.createElement("a");r.href=n.toDataURL(`image/${e.format}`,e.quality),r.download=e.filename,r.click()})}B.plugins=(...t)=>(we(...t),B);var jn=Symbol("snapdom.internal"),pt=Symbol("snapdom.internal.silent"),ke=!1;function B(t,e){return k(this,null,function*(){if(!t)throw new Error("Element cannot be null or undefined");let n=Hn(e);if(En(n,e&&e.plugins),G()&&(n.embedFonts===!0||No(t)))for(let r=0;r<3;r++)try{yield Ro(t,e),console.log("safariWarmup:",r),ke=!1}catch(s){}return n.iconFonts&&n.iconFonts.length>0&&Ke(n.iconFonts),n.snap||(n.snap={toPng:(r,s)=>B.toPng(r,s),toSvg:(r,s)=>B.toSvg(r,s)}),B.capture(t,n,jn)})}B.plugins=(...t)=>(we(...t),B);B.capture=(t,e,n)=>k(null,null,function*(){if(n!==jn)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");let r=yield Ce(t,e),s={img:(a,p)=>k(null,null,function*(){return Mt(r,F(F({},a),p||{}))}),svg:(a,p)=>k(null,null,function*(){return Mt(r,F(F({},a),p||{}))}),canvas:(a,p)=>k(null,null,function*(){return lt(r,F(F({},a),p||{}))}),blob:(a,p)=>k(null,null,function*(){return Tt(r,F(F({},a),p||{}))}),png:(a,p)=>k(null,null,function*(){return it(r,O(F(F({},a),p||{}),{format:"png"}))}),jpeg:(a,p)=>k(null,null,function*(){return it(r,O(F(F({},a),p||{}),{format:"jpeg"}))}),webp:(a,p)=>k(null,null,function*(){return it(r,O(F(F({},a),p||{}),{format:"webp"}))}),download:(a,p)=>k(null,null,function*(){return zn(r,F(F({},a),p||{}))})},o={svg:a=>Mt(r,O(F(F({},e),a||{}),{[pt]:!0})),canvas:a=>lt(r,O(F(F({},e),a||{}),{[pt]:!0})),png:a=>it(r,O(F(F({},e),a||{}),{format:"png",[pt]:!0})),jpeg:a=>it(r,O(F(F({},e),a||{}),{format:"jpeg",[pt]:!0})),jpg:a=>it(r,O(F(F({},e),a||{}),{format:"jpeg",[pt]:!0})),webp:a=>it(r,O(F(F({},e),a||{}),{format:"webp",[pt]:!0})),blob:a=>Tt(r,O(F(F({},e),a||{}),{[pt]:!0})),img:a=>Mt(r,O(F(F({},e),a||{}),{[pt]:!0}))},i=O(F({},e),{export:{url:r},exports:o}),u=yield vn("defineExports",i),c=Object.assign({},...u.filter(a=>a&&typeof a=="object")),l=F(F({},s),c);l.jpeg&&!l.jpg&&(l.jpg=(a,p)=>l.jpeg(a,p));function d(a,p){let y=F(F({},e),p||{});return(a==="jpeg"||a==="jpg")&&(y.backgroundColor==null||y.backgroundColor==="transparent")&&(y.backgroundColor="#ffffff"),y}let f=!1,h=Promise.resolve();function g(a,p){return k(this,null,function*(){let y=()=>k(null,null,function*(){let w=l[a];if(!w)throw new Error(`[snapdom] Unknown export type: ${a}`);let C=d(a,p),S=O(F({},e),{export:{type:a,options:C,url:r}});yield st("beforeExport",S);let v=yield w(S,C);return yield st("afterExport",S,v),f||(f=!0,yield st("afterSnap",e)),v});return h=h.then(y)})}let m={url:r,toRaw:()=>r,to:(a,p)=>g(a,p),toImg:a=>g("img",a),toSvg:a=>g("svg",a),toCanvas:a=>g("canvas",a),toBlob:a=>g("blob",a),toPng:a=>g("png",a),toJpg:a=>g("jpg",a),toWebp:a=>g("webp",a),download:a=>g("download",a)};for(let a of Object.keys(l)){let p="to"+a.charAt(0).toUpperCase()+a.slice(1);m[p]||(m[p]=y=>g(a,y))}return m});B.toRaw=(t,e)=>B(t,e).then(n=>n.toRaw());B.toImg=(t,e)=>B(t,e).then(n=>n.toImg());B.toSvg=(t,e)=>B(t,e).then(n=>n.toSvg());B.toCanvas=(t,e)=>B(t,e).then(n=>n.toCanvas());B.toBlob=(t,e)=>B(t,e).then(n=>n.toBlob());B.toPng=(t,e)=>B(t,O(F({},e),{format:"png"})).then(n=>n.toPng());B.toJpg=(t,e)=>B(t,O(F({},e),{format:"jpeg"})).then(n=>n.toJpg());B.toWebp=(t,e)=>B(t,O(F({},e),{format:"webp"})).then(n=>n.toWebp());B.download=(t,e)=>B(t,e).then(n=>n.download());function Ro(t,e){return k(this,null,function*(){if(ke)return;let n=O(F({},e),{fast:!0,embedFonts:!0,scale:.2}),r;try{r=yield Ce(t,n)}catch(s){}yield new Promise(s=>requestAnimationFrame(()=>requestAnimationFrame(s))),r&&(yield new Promise(s=>{let o=new Image;try{o.decoding="sync",o.loading="eager"}catch(i){}o.style.cssText="position:fixed;left:0px;top:0px;width:10px;height:10px;opacity:0.01;pointer-events:none;",o.src=r,document.body.appendChild(o),k(null,null,function*(){try{typeof o.decode=="function"&&(yield o.decode())}catch(u){}let i=performance.now();for(;!(o.complete&&o.naturalWidth>0)&&performance.now()-i<900;)yield new Promise(u=>setTimeout(u,50));yield new Promise(u=>requestAnimationFrame(u));try{o.remove()}catch(u){}s()})})),t.querySelectorAll("canvas").forEach(s=>{try{let o=s.getContext("2d",{willReadFrequently:!0});o&&o.getImageData(0,0,1,1)}catch(o){}}),ke=!0})}function No(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();){let n=e.currentNode,r=getComputedStyle(n),s=r.backgroundImage&&r.backgroundImage!=="none",o=r.maskImage&&r.maskImage!=="none"||r.webkitMaskImage&&r.webkitMaskImage!=="none";if(s||o||n.tagName==="CANVAS")return!0}return!1}function Vn(){return k(this,arguments,function*(t=document,e={}){var c,l,d,f,h,g;let{embedFonts:n=!0,useProxy:r=""}=e,s=(l=(c=e.cache)!=null?c:e.cacheOpt)!=null?l:"full";Ot(s);try{yield(d=document.fonts)==null?void 0:d.ready}catch(m){}try{oe()}catch(m){}x.session=x.session||{},x.session.styleCache||(x.session.styleCache=new WeakMap),x.image=x.image||new Map,x.background=x.background||new Map;try{yield Qt(t,void 0,x.session.styleCache,{useProxy:r})}catch(m){}let o=[],i=[];try{if(t&&t.nodeType===1){let m=t.querySelectorAll?Array.from(t.querySelectorAll("*")):[];i=[t,...m],o=[],t.tagName==="IMG"&&t.getAttribute("src")&&o.push(t),o.push(...Array.from(((f=t.querySelectorAll)==null?void 0:f.call(t,"img[src]"))||[]))}else t!=null&&t.querySelectorAll&&(o=Array.from(t.querySelectorAll("img[src]")),i=Array.from(t.querySelectorAll("*")))}catch(m){}let u=[];for(let m of o){let a=(m==null?void 0:m.currentSrc)||(m==null?void 0:m.src);if(a&&!x.image.has(a)){let p=Promise.resolve().then(()=>k(null,null,function*(){let y=yield Y(a,{as:"dataURL",useProxy:r});y!=null&&y.ok&&typeof y.data=="string"&&x.image.set(a,y.data)})).catch(()=>{});u.push(p)}}for(let m of i){let a="";try{a=((h=m==null?void 0:m.style)==null?void 0:h.backgroundImage)||"",(!a||a==="none")&&(a=yt(m).backgroundImage)}catch(p){}if(a&&a!=="none"){let p=a.match(/url\((?:[^()"']+|"(?:[^"]*)"|'(?:[^']*)')\)/gi)||[];for(let y of p){let w=Promise.resolve().then(()=>gt(y,O(F({},e),{useProxy:r}))).catch(()=>{});u.push(w)}}}if(n)try{let m=Yt(t),a=Kt(t);if(typeof G=="function"?G():!!G){let y=new Set(Array.from(m).map(w=>String(w).split("__")[0]).filter(Boolean));yield Gt(y,3)}yield Xt({required:m,usedCodepoints:a,exclude:e.excludeFonts,localFonts:e.localFonts,useProxy:(g=e.useProxy)!=null?g:r})}catch(m){}yield Promise.allSettled(u)})}typeof window!="undefined"&&(window.snapdom=B,window.preCache=Vn);})();
|