smbls 3.14.589 → 3.14.595

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # smbls
2
2
 
3
+ ## 3.14.595
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated cross-repo patch release.
8
+
3
9
  ## 3.14.589
4
10
 
5
11
  ### Patch Changes
package/dist/smbls.cjs CHANGED
@@ -37,7 +37,7 @@ FROM ${a}${l}`},NS=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
37
37
  font-display: ${n.fontDisplay};`:""}
38
38
  src: ${i};`},je=(t,e,r,n)=>`@font-face {${Ko(t,e,r,n)}
39
39
  }`,_r=(t,e,r)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[o],f=Array.isArray(s)?s.map(u=>Vt(u,r)||u):Vt(s,r)||s;return Ko(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),Ru=t=>Object.keys(t).map(r=>_r(r,t[r].value)),xa=(t,e,r)=>{if(e&&e.isVariable){let s=Vt(e.url,r)||e.url;return Kr(s)?Yr(s):je(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return _r(t,e,r).map(ba);let o=Array.isArray(e.url)?e.url.map(s=>Vt(s,r)||s):Vt(e.url,r)||e.url;return je(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Yo=(t,e)=>Object.keys(t).map(n=>xa(n,t[n].value,e));R();R();R();var Xr={};I(Xr,{animation:()=>qu,breakpoints:()=>Hu,class:()=>Zu,color:()=>Nu,devices:()=>Gu,document:()=>Bg,font:()=>Iu,fontFace:()=>Du,fontFamily:()=>$u,fontFamilyTypes:()=>Fu,gradient:()=>ju,grid:()=>Ju,icons:()=>Uu,media:()=>Lu,reset:()=>Vg,semanticIcons:()=>zu,sequence:()=>we,shadow:()=>Vu,sizes:()=>tp,spacing:()=>Mu,svg:()=>Ku,svgData:()=>Yu,templates:()=>Xu,theme:()=>Bu,timing:()=>Wu,typography:()=>Xo,unit:()=>Pu,vars:()=>Qu});var we={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var Pu={default:"em"};var ew={browserDefault:16,base:16,type:"font-size",ratio:we["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Xo=ew;var Iu={};var $u={},Fu={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Du={};var Lu={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var rw={base:Xo.base,type:"spacing",ratio:we.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Mu=rw;var Nu={},ju={};var Bu={};var Vu={};var Uu={},zu={};var nw={default:150,base:150,type:"timing",ratio:we["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Wu=nw;var Bg={};var Hu={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Gu={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var qu={};var Ku={},Yu={};var Xu={};var ow={},Ju=ow;var Zu={};var Vg={},Qu={},tp={};var wa={},ka={},_a=Xr,Sa={},Zo=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in _a){let e=t.toLowerCase();Sa[e]=_a[t];let r=Zo(e);r!==e&&(Sa[r]=_a[t]),e!==t&&(Sa[t]=_a[t])}var Qo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:wa,cssMediaVars:ka,CSS_VARS:wa,CSS_MEDIA_VARS:ka,_scratchConfig:!0,...Sa},Ug=Q(Qo),fe={active:"0",0:Qo},zg=t=>(vt(t)&&(fe.active=t),fe[t||fe.active]),Jo=[],ot=t=>{t&&t._scratchConfig&&Jo.push(t)},tt=()=>{Jo.pop()},A=t=>Jo.length?Jo[Jo.length-1]:fe[t||fe.active]||Qo,va=t=>{if(w(t))return fe.active="1",fe[1]=H(t,Q(Ug)),t},sw=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],iw=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],aw=t=>{for(let e of iw){let r;for(let n of e){let o=t[n];w(o)&&(r=r?H(o,r):o)}if(r)for(let n of e)w(t[n])&&(t[n]=r)}},Ca=(t,e,{cleanBase:r=!1}={})=>{let n=r?null:A(),o=Q(!r&&n&&n._scratchConfig?n:Ug);for(let i of sw)delete o[i];let s=H(e||{},o);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,aw(s),t&&(fe[t]=s),s};var ue={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},ep=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=Wg.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},ke=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},Wg=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),ts=(t,e)=>{let{base:r,type:n,unit:o}=e,s=Wg.has(o)?"rem":o,i=(ar(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=ue[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=ue[t+1],u=Math.abs(t),p=Math.pow(Hg,2*u),d=ue[u];return d?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${d}) / ${p.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Aa=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},es=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]},rs=(t,e)=>es(t,e).map(r=>r/t),ns=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,p,d]=es(o,s);l>16?f=[u,p,d]:f=[u,d],f.forEach((h,g)=>{let m=~~(h/n*1e3)/1e3,y=i+(g+1),b=a+(g+1)/10,x=Aa(g+1,f,i,e),_={key:r+(g+1),variable:y,value:h,scaling:m,scalingVariable:x,index:b};ep(_,e)})},Hg=1.618,cw=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(Hg,2*n);return Math.max(o,s)},Ot=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=ue[f],p=cw(f,r,n),d=~~(p/r*100)/100,h=c+u,g=ts(f,t),m={key:u,variable:h,value:p,base:r,scaling:d,scalingVariable:g,ratio:n,index:f};ep(m,t),s&&ns(m,t)}return t},rp=(t,e=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=t,i=S(e)?e:ue[e],a=S(e)?Object.entries(ue).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=n*Math.pow(o,a),f=~~(l/n*100)/100,d="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,h=ts(a,t),g={key:i,variable:d,value:l,base:n,scaling:f,scalingVariable:h,ratio:o,index:a};return ep(g,c),s&&ns(g,c),c},os=(t="A",e)=>{let r=A(),{unit:n}=r;if(S(t)&&st(t))return`var(${t})`;if(S(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;let{sequence:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(cr.some(_=>t.includes(_))||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let p=`--${e.varPrefix?e.varPrefix+"-":""}${Ho(e.type.replace(".","-"))}-`,d=t.toUpperCase(),h=d.slice(0,1)==="-"?"-":"",g=h?d.slice(1):d,m="";g.includes("_")&&(m="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let y=_=>a.test(_)?`var(${p}${_}${m})`:_;if(g.includes("+")){let[_,E]=g.split("+"),C=`${y(_)} + ${y(E)}`;return h?`calc((${C}) * -1)`:`calc(${C})`}else if(g.includes("*")){let[_,E]=g.split("*"),C=`${y(_)} * ${y(E)}`;return h?`calc((${C}) * -1)`:`calc(${C})`}else if(g.includes("-")){let[_,E]=g.split("-"),C=`${y(_)} - ${y(E)}`;return h?`calc((${C}) * -1)`:`calc(${C})`}let b=r.sizes;if(b){let _=b[t]||b[t.toLowerCase()];if(_!==void 0)return h?`calc(${_} * -1)`:_}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let _=`var(${p}${g}${m})`;return h?`calc(${_} * -1)`:_}let x=o?o[g]:null;return x?s==="ms"||s==="s"?h+x.val+s:h+x.scaling+s:console.warn("can't find",o,g)},Ea=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:os(i,e)}).join("")},pe=(t,e,r,n)=>{if(typeof t!="string")return A().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=ke(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Ea(t,r):t=os(t,r),{[e]:n?`${n}(${t})`:t}},Ta=(t,e)=>ue[t-e],ss=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((n,o)=>{let s=Ta(e,o);return r[s]})};R();var np=(t,e)=>{let r=A(),{cssVars:n}=r;B(t.value)||(n[t.var]=t.value)},is=(t,e,r)=>{let n=A(),{unit:o}=n,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[p,d,h]=rs(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${p/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${h/a})`},Gg=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),ve=(t,e={})=>{let r=A(),{unit:n,timing:o,cssVars:s}=r,i=t.unit||n.default,a=Gg.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||is(s,t,e);for(let u in l){let p=l[u],d=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[p.variable+"_default"]=d,s[p.variable]=p.scalingVariable;continue}e.useDefault===!1?s[p.variable]=d:(s[p.variable+"_default"]=d,s[p.variable]=`var(${p.variable+"_default"})`)}},Be=(t,e,r={})=>{let n=A(),{unit:o,media:s,cssVars:i}=n,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=Gg.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:p,scales:d}=c,h=s[a];if(!h&&n.verbose&&console.warn("Can't find media query ",h),!u){let g=i[`@media ${h}`];g||(g=i[`@media ${h}`]={}),is(g,c,r);let m=t.unit||o.default;if(f!==m&&p)for(let y in p){let b=p[y],x=d[y]+f;g[b.variable+"_default"]=x,g[b.variable]=x}return}for(let g in p){let m=p[g],y=(ar(f)?d[g]:p[g].val)+f;!h&&n.verbose&&console.warn("Can't find query ",h);let b=i[`@media ${h}`];b||(b=i[`@media ${h}`]={}),b[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};R();var Kg=hr(),Jr=t=>{let e=A(),r="";for(let n in t)e.__svgCache[n]||(e.__svgCache[n]=!0,r+=t[n]);return r},lw=t=>{let e=t&&(t.default||t);if(!S(e))return Kg&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let o=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},fw=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return t;let n=t;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;n=n.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return n},qg=new Set,as=(t,e)=>{let r=e&&e.default?e.default:e;if(!S(r))return Kg&&!qg.has(t)&&(qg.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let n=lw(e),{width:o,height:s}=n,i=n.viewBox||`0 0 ${o||24} ${s||24}`,l=fw(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${i}"`);return l=l.replace(/width="[^"]*"/,""),l=l.replace(/height="[^"]*"/,""),l=l.replace("</svg","</symbol"),l=dw(l),l},uw="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",pw=new RegExp(`<(${uw})\\b([^>]*?)\\s*/>`,"g"),dw=t=>t.replace(pw,"<$1$2></$1>");var tn={};I(tn,{appendSVGSprite:()=>ws,appendSvgIconsSprite:()=>vs,applyDocument:()=>Ss,applyHeadings:()=>Pa,applyReset:()=>Cs,applySpacingSequence:()=>ys,applyTimingSequence:()=>_s,applyTypographySequence:()=>hs,checkIfBoxSize:()=>ms,getColor:()=>J,getFontFamily:()=>ds,getFontSizeByKey:()=>gs,getMediaColor:()=>mt,getMediaTheme:()=>Ut,getShadow:()=>xs,getSpacingBasedOnRatio:()=>te,getSpacingByKey:()=>ut,getTheme:()=>ls,getTimingByKey:()=>It,getTimingFunction:()=>zt,runThroughMedia:()=>Ra,setColor:()=>Ue,setFont:()=>ps,setFontFamily:()=>Zr,setGradient:()=>ze,setMediaTheme:()=>us,setSVG:()=>Qr,setShadow:()=>We,setSvgIcon:()=>ks,setTheme:()=>fs,splitSpacedValue:()=>bs});R();var J=(t,e,r)=>{let n=r||A();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(st(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(T(t))[o,s,i]=t;else{let u=_e(t);if(!u){let{color:p,gradient:d}=n,h=d[t]||p[t];return h?(e&&h[e]&&(h=h[e]),n.useVariable?`var(${h.var})`:h.value):t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=n,l=a[o]||c[o];if(!l)return n.verbose&&console.warn("Can't find color ",o),t;e&&(l[e]?l=l[e]:n.verbose&&console.warn(t," - does not have ",e));let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;if(s&&u){let p=Math.round(parseFloat(s)*100);return`color-mix(in srgb, ${u} ${p}%, transparent)`}return u}return i&&!l[i]&&(f=Ne(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`},mt=(t,e,r)=>{let n=r||A();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(st(t))return`var(${t})`;let o,s,i;if(T(t))o=t[0];else{let u=_e(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=n,l=a[o]||c[o],f=w(l);if(f&&l.value)return J(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?J(t,null,r):`var(${l.var})`;if(e)return J(t,`@${e}`,r);{let u={};for(let p in l){if(p.charCodeAt(0)!==64)continue;let d=n.media[p.slice(1)];if(!d)continue;let h="@media "+(d==="print"?`${d}`:`screen and ${d}`);u[h]=J(t,p,r)}return u}}else return n.verbose&&console.warn("Can't find color",t),t},Ue=(t,e,r)=>{let n=A();if(S(t)&&st(t)){let g=t.slice(2);if(t=J(g),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=g.split(" "),y=n.color[m[0]];if(y&&!y.value&&!y.rgb&&(S(y)||T(y)||w(y))&&(n.color[m[0]]=Ue(y,m[0]),y=n.color[m[0]]),y&&y.value){let b=y.rgb,x=m[1]!==void 0?m[1]:"1",_=m[2];_&&(b=Ne(b,_)),t=`rgba(${b}, ${x})`}else{let b=m[2],x=m[1]!==void 0?m[1]:"1";if(b)try{let _=ce(m[0]);_&&_.length>=3?t=`rgba(${Ne(_.slice(0,3).join(", "),b)}, ${x})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(T(t)&&(t={"@light":t[0],"@dark":t[1]}),w(t)){let g={};for(let m in t)g[m]=Ue(t[m],e,m.slice(0,1)==="@"?m.slice(1):m);if(n.useVariable){let y=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`,b,x={};for(let _ in g){if(_.charCodeAt(0)!==64)continue;let E=_.slice(1),C=g[_],P=C&&(C.value||C);!P||typeof P!="string"||(x[E]=P,(E==="light"||b===void 0)&&(b=P))}if(b!==void 0){n.cssVars[y]=b,n.cssMediaVars||(n.cssMediaVars={});for(let _ in x){let E=`[data-theme="${_}"]`;if(n.cssMediaVars[E]||(n.cssMediaVars[E]={}),n.cssMediaVars[E][y]=x[_],_==="light"||_==="dark"){let C=`@media (prefers-color-scheme: ${_})`;n.cssMediaVars[C]||(n.cssMediaVars[C]={}),n.cssMediaVars[C][y]=x[_]}}g.var=y}}return g}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(S(i)&&i.includes(".")&&!i.includes("(")){let[g,m]=i.split("."),y=n.color[g];y&&y.rgb&&(i=`rgba(${y.rgb}, ${parseFloat("0."+m)||1})`)}if(S(i)&&!i.includes("(")&&!i.startsWith("#")){let g=_e(i);if(g&&g.name&&!g.passthrough&&!g.cssVar){let m=n.color[g.name];m&&!m.value&&!m.rgb&&(S(m)||T(m)||w(m))&&(n.color[g.name]=Ue(m,g.name));let y=n.color[g.name];if(y&&y.rgb){let b=y.rgb;g.tone&&(b=Ne(b,g.tone));let x=g.alpha?parseFloat(g.alpha):1;i=`rgba(${b}, ${x})`}}}let a=ce(i),[c,l,f,u=1]=a,p=parseFloat(u.toFixed(2)),d=`${c}, ${l}, ${f}`,h=`rgba(${d}, ${p})`;return n.useVariable&&(n.cssVars[s]=h),{var:s,rgb:d,alpha:p,value:h}},ze=(t,e,r)=>{let n=A();if(S(t)&&st(t)&&(t=J(t.slice(2))),T(t))return{"@light":ze(t[0],e,"light"),"@dark":ze(t[0],e,"dark")};if(w(t)){let i={};for(let a in t)i[a]=ze(t[a],e,a.slice(0,1)==="@"?a.slice(1):a);return i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=t.value||t),{var:s,value:t.value||t}};R();var hw=new Set(["black","white","red","green","blue","yellow","orange","purple","pink","brown","gray","grey","cyan","magenta","lime","olive","navy","teal","aqua","maroon","silver","fuchsia","transparent","currentColor","currentcolor","inherit","initial","unset","none","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","rebeccapurple"]),Yg=["color","Color","background","Background","fill","Fill","stroke","Stroke"],gw=t=>{for(let e=0;e<Yg.length;e++)if(t.includes(Yg[e]))return!0;return!1},Oa=t=>{let e={},{state:r,media:n,helpers:o,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?J(t[a]):t[a]}),e},cs=t=>(t.value||(t.value=Oa(t)),t.value),ls=(t,e)=>{let r=A();if(r.useVariable)return Ut(t,e);let n=r.theme;if(S(t)){let[o,s]=t.split(" "),i=n[o];if(i){if(!s&&!e)return cs(i);t=[o,s||e]}}if(B(t)&&t[1]){let o=t[0],s=t[1],{helpers:i,media:a,state:c}=n[o];if(a&&a[s])return cs(a[s]);if(i&&i[s])return cs(i[s]);if(c&&c[s])return cs(c[s])}else if(w(t))return Oa(t)},mw=(t,e,r)=>{if(w(e))t.variants.inverse.value=Oa(e);else if(e===!0){let{color:n,background:o}=r;t.variants.inverse={value:{color:o,background:n}}}},yw=(t,e,r,n)=>{let o=ls(r);n[`&:${e}`]=o,w(r)&&!r.value&&(r.value=o)},bw=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return yw(t,o,s,e),t}),t):void 0},xw=(t,e,r,n)=>{let o=ls(r);n[`@media (prefers-color-scheme: ${e})`]=o,w(r)&&!r.value&&(r.value=o)},_w=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return(o==="dark"||o==="light")&&xw(t,o,s,e),o==="inverse"&&mw(t,s,e),t}),t):void 0},Sw=(t,e)=>{let r=A(),{helpers:n}=t;return n?(Object.keys(n).map(s=>{let i=n[s];return S(i)?n[s]=r.theme[i]:cs(n[s]),t}),t):void 0},fs=(t,e)=>{let r=A();if(r.useVariable)return us(t,e);let{state:n,media:o,helpers:s}=t,i=Oa(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return bw(t,i),_w(t,i),Sw(t,i),{var:c,value:i,state:n,media:o,helpers:s}};var op=(t,e,r)=>{let{cssVars:n}=r;r.cssMediaVars||(r.cssMediaVars={});let o=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&gw(l))for(let u in t){if(c.has(u))continue;let p=t[u]?.[l];if(p===void 0)continue;let d=J(p,`@${u}`);d!==void 0&&S(d)&&/^[a-z][a-zA-Z]+$/.test(d)&&!hw.has(d)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(p=>B(p?.[l]));if(f==="."&&u){let p=l.slice(1),d={};for(let h in t)B(t[h]?.[l])&&(d[h]=t[h][l]);i[l]=op(d,`${e}-${p}`,r)}else if(f===":"&&u){let p=l.replace(/^:+/,""),d={};for(let h in t)B(t[h]?.[l])&&(d[h]=t[h][l]);i[l]=op(d,`${e}-${p}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let d=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,h=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,g;for(let m in t){if(c.has(m))continue;let y=t[m]?.[l];if(y===void 0)continue;let b=J(y,`@${m}`);if(b===void 0)continue;(h&&m===h||!h&&(m==="light"||g===void 0))&&(g=b);let x=`[data-theme="${m}"]`;if(o[x]||(o[x]={}),o[x][d]=b,m==="dark"||m==="light"){let _=`@media (prefers-color-scheme: ${m})`;o[_]||(o[_]={}),o[_][d]=b}}g!==void 0&&(n[d]=g),i[l]=`var(${d})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},us=(t,e,r,n)=>{let o=A(),{cssVars:s}=o,i={value:t},a=!r&&!n;if(B(t)){if(a&&o.useVariable){let c={};for(let l in t)l.startsWith("@")&&B(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=op(c,e,o);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=us(f,e,c,n||u)}else if(!a){let u=J(f,n),p=[...new Set([n,r].filter(m=>m).map(m=>m.slice(1)))],d=p.length?"-"+p.join("-"):"",g=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${d}-${c}`;o.useVariable?(o.useThemeSuffixedVars&&(s[g]=u),i[c]=`var(${g})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(S(t)&&st(t)){let l=o.theme[t.slice(2)];return Ut(l,n)}return i},sp=t=>{let e=A(),r={};for(let n in t){let o=n.slice(0,1);if(B(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=sp(t[n]):o==="."&&(r[`&${n}`]=sp(t[n]))}else r[n]=t[n]}return r},Jg=(t,e)=>{let r=e.shift();return t[r]?Jg(t[r],e):t},Xg=(t,e)=>T(e)?Jg(t,e):S(e)&&t[e]?t[e]:t;var Ut=(t,e)=>{let r=A();if(S(t)&&st(t)&&(t=Ut(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=T(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=Xg(s,o):s&&e&&(s=Xg(s,e)),sp(s)};R();R();var ps=(t,e)=>{let r=A(),n=`--font-${e}`;if(!t||T(t)&&!t[0])return;let o;if(t.isVariable){let s=Vt(t.url,r.files)||t.url;Kr(s)?o=Yr(s):o=je(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])o=_r(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>Vt(i,r.files)||i):Vt(t.url,r.files)||t.url;o=je(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:n,value:t,fontFace:o}},ds=(t,e)=>{let r=A(),{fontFamily:n}=r;return xr(e||n,t)},Zr=(t,e)=>{let r=A(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!n.default)&&(n.default=e),w(s)&&(s=br(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i}};R();var Ra=t=>{let e=A(),{typography:r,media:n}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:p,subSequence:d,h1Matches:h,unit:g}=t;nt(i,{type:l,base:f,ratio:u,range:p,subSequence:d,h1Matches:h,unit:g});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||g,b=!i.unit&&m.has(g)?"rem":y,x=n[c],_="@media "+(x==="print"?`${x}`:`screen and ${x}`);if(r.templates[_]={fontSize:i.base/r.browserDefault+b},!a){nt(i,{sequence:{},scales:{},vars:{}}),Ot(i),Be(t,o);continue}nt(i,{sequence:{},scales:{},templates:{},vars:{}}),Ot(i),Be(t,o)}},Pa=t=>{let e=A();if(t.h1Matches){let r=t.unit,n=ss(t),{templates:o}=t;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${n[s]?.variable})`:`${n[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},hs=()=>{let t=A(),{typography:e}=t;Ot(e),Pa(e),ve(e),Ra(e)},gs=t=>{let e=A(),{typography:r}=e;return pe(t,"fontSize",r)};R();R();var ww=t=>{let r=A().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return Ot(o),o},kw=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;nt(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Ot(r),Be(t,e)}},ms=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n},ys=()=>{let t=A(),{spacing:e}=t;Ot(e),ve(e),kw(e)},vw=t=>{let e=A(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Ot(t)},ut=(t,e="padding",r,n)=>{let o=vw(r);if(S(t)&&!n&&t.includes("(")){let i=ke(t);n=i[0],t=i[1]}let s=n?[t]:br(t);if(T(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>pe(s[f],e+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return pe(t,e,o,n)}},te=(t,e,r,n)=>{let o=A(),{spacing:s}=o,i=r||t[e];if(!n&&S(i)&&i.includes("(")){let a=ke(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=ww(t);return ut(i,e,a,n)}return ut(i,e,s,n)},bs=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=cr.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};R();var We=(t,e,r,n)=>{let o=A();if(T(t))return{"@light":We(t[0],e,"light"),"@dark":We(t[1],e,"dark")};if(w(t)){let a={};for(let c in t)a[c]=We(t[c],e,c.startsWith("@")?c.slice(1):c);return a}S(t)&&!Qt.test(t)&&(t=Se(t).map(a=>(a=a.trim(),a.split(/\s+/).map(c=>{if(c=c.trim(),!c)return"";if(c.startsWith("--"))return`var(${c})`;let l=J(c);if(le(l))return l;if(/^\d/.test(c)||c==="0"||c.includes("px")||c.slice(-2)==="em"||c==="inset"||c==="none")return c;let f=ut(c,"shadow");return f&&f.shadow?f.shadow:c}).join(" "))).join(", "));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},xs=(t,e)=>{let r=A();if(e||(e=r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(st(t))return`var(${t})`;let[n]=T(t)?t:t.split(" "),s=r.shadow[n],i=w(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(s[e])return s[e].value;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){let l=r.media[c.slice(1)],f="@media "+(l==="print"?`${l}`:`screen and ${l}`);a[f]=s.value}return a}return r.verbose&&console.warn("Can't find color",t),t};R();var _s=()=>{let t=A(),{timing:e}=t;Ot(e),ve(e)},zt=t=>{let e=A(),{timing:r}=e;return r[t]||r[Wo(t)]||t},It=(t,e="timing")=>{let r=A(),{timing:n}=r;return pe(t,e,n)};R();var Ss=()=>{let t=A(),{document:e,fontFamily:r,theme:n,typography:o}=t;return nt(e,{theme:n.document,fontFamily:xr(r),fontSize:o.base,lineHeight:o.lineHeight})};R();var ap={document:q},Qr=(t,e)=>{let r=A();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?as(e,t):t},ws=(t,e=ap)=>{let r=A(),n=Object.keys(t).length?{}:r.svg;for(let o in t)n[o]=t[o];Qg(n,e)},ks=(t,e)=>{let r=A();return r.useIconSprite&&!r.semanticIcons?.[e]?Qr(t,e):t},vs=(t,e=ap)=>{let r=A(),n=Object.keys(t).length?{}:r.icons;for(let o in t)n[o]=t[o];Qg(n,e)},ip=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let r=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(r.setAttribute("aria-hidden","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("style","position:absolute"),r.setAttribute("id","svgSprite")),r},Cw=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},Zg=(t,e,r)=>{for(;e.firstChild;){let n=e.firstChild;r.appendChild(t.importNode(n,!0)),n.remove()}},Qg=(t,e=ap)=>{let r=A(),n=e.document||q;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Jr(t);let o=n.querySelector("#svgSprite"),s=Jr(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=Cw(n,s);if(o)if(a)Zg(n,a,o);else if(n.body.insertAdjacentHTML)o.insertAdjacentHTML("beforeend",s);else{let c=ip(n,{isRoot:!1});c.innerHTML=s,o.append(...c.children)}else if(a){let c=ip(n);c&&c.nodeType&&(Zg(n,a,c),n.body.prepend(c))}else if(n.body.insertAdjacentHTML)n.body.insertAdjacentHTML("afterbegin",i);else{let c=ip(n);c&&c.nodeType&&(c.innerHTML=s,n.body.prepend(c))}};R();var Cs=(t={})=>{let e=A(),{reset:r,typography:n,document:o}=e;if(r){if(r[":root"]){let c=r,l=n.templates;c.body={...e.useDocumentTheme?Ut("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=n.templates,a=e.useDocumentTheme?Ut("document"):{};if(r.html&&At(r.html,a),n.unit){let{media:c}=e;for(let l in n){if(l.charAt(0)!=="@")continue;let f=n[l];if(!f||f.unit===n.unit||!f.unit)continue;let u=f.unit,p=f.base||n.base,d=f.browserDefault||n.browserDefault,h=l.slice(1),g=c[h];if(!g)continue;let m="@media "+(g==="print"?g:"screen and "+g);r[m]||(r[m]={}),r[m].html||(r[m].html={}),r[m].html.fontSize=p/d+u}}return H(nt(r,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",scrollBehavior:"smooth",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:n.unit?"1"+e.unit.default:n.base/n.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}})}};R();var Aw=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),Ew=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),Tw=t=>Aw.has(t),de=t=>{let e=t+"";if(Qt.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(st(o))return`var(${o})`;if(Tw(o)||/^\d/.test(o)||o==="0")return o;let s=J(o);if(le(s))return s;let i=ut(o,"border");return i&&i.border?i.border:o}).join(" ")},Ia=t=>Qt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(st(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=J(e);return le(r)?r:e}).join(" "),$a=(t,e)=>xs(t,e),As=(t,e)=>Qt.test(t)?t:Se(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(st(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=J(n);if(le(o)){let i=mt(n,e);return w(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=ut(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),Es=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=Se(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||Ew.has(f)||f==="transparent"||Qt.test(f))return f;let u=J(f);return le(u)?u:f}).join(" ")));return n+a.join(", ")+s},Fa=(t,e)=>{let r=A();return Se(t).map(n=>{let o=n.trim();return st(o)?`var(${o})`:/^var\(/.test(o)||o.includes("url")?o:o.includes("gradient")?Es(o,e):r.gradient[t]?{backgroundImage:mt(t,e||r.globalTheme)}:o.includes("/")||o.startsWith("http")||o.includes(".")&&!_e(o)?`url(${o})`:o}).join(", ")},Da=t=>S(t)&&t.split(" ").map(e=>ut(e,"gap").gap).join(" "),cp=t=>{let e=t.split(" ");return e.length?e.map(r=>st(r)?`var(${r})`:r.length<3||r.includes("ms")?It(r).timing||r:zt(r)?zt(r):r).join(" "):t},Ts=(t,e,r)=>{if(S(t))return t.split(",").map(n=>It(n).timing||n).join(",")},La=t=>{let e=t.split(",");if(e.length)return e.map(cp).join(",")};function it(t,e,r={},n={}){let o=K.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(o.includes("(")){let c=ke(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=ms(t);!i&&a&&!n.ratio&&(o=bs(o))}return n.ratio?te(r,t,o,s):ut(o,t,void 0,s)}var j=(t,e=null,r)=>it(t,e,r,{ratio:!0}),Os=(t,e,r)=>{if(S(t))return{borderRadius:t.split(" ").map((n,o)=>te(e,r,n)[r]).join(" ")}};R();var Ow=(t,e)=>{let r=A(),{cssVars:n}=r,o=e.startsWith("--")?e:`--${e}`;return n[o]=t,t},$t=t=>t,Ma={color:Ue,gradient:ze,font:ps,fontFamily:Zr,fontfamily:Zr,theme:fs,icons:ks,semanticIcons:$t,semanticicons:$t,svg:Qr,svgData:$t,typography:$t,shadow:We,spacing:$t,media:$t,grid:$t,class:$t,timing:$t,reset:$t,unit:$t,animation:$t,vars:Ow,sizes:$t},lp=(t,e,r)=>{let n=A(),o=Zo(t),s=o.toLowerCase(),i=n[o]||n[s]||n[t],a=Ma[o]||Ma[s];if(a)try{let c=a(e,r);return i&&(i[r]=c),i}catch(c){n.verbose&&console.warn("Error setting",s,"value",e,r,c)}n.verbose&&console.warn("Can not find",s,"method in scratch")},fp=(t,e)=>{let r=A(),n=t.toLowerCase();return Object.keys(e).sort((s,i)=>{let a=w(e[s])||T(e[s])?1:0,c=w(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return lp(n,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",e[s],s,i)}}),r[n]||r[t]},Na=(t,e)=>{let r=e||A();r.globalTheme=t;let o=(r.document&&r.document.documentElement?r.document:null)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=r.themeRoot||o.documentElement;if(t&&t!=="auto")a.setAttribute("data-theme",t),t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{a.setAttribute("data-theme",u.matches?"dark":"light")},f=s.matchMedia("(prefers-color-scheme: dark)");if(l(f),a.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=l;try{f.addEventListener("change",l)}catch{f.addListener(l)}}}else a.setAttribute("data-theme","light"),a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(o&&r.cssVars){let a=r.scopeSelector||":root",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let p in r.cssVars)f[u].style.setProperty(p,r.cssVars[p]);return r}}catch{}}return r},Rw={},Sr=(t,e=Rw)=>{let r=e.config||A(),{version:n,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:p,useDefaultConfig:d,semanticIcons:h,files:g,assets:m,...y}=t;e.newConfig&&(r=va(e.newConfig)),g!==void 0&&(r.files=g),m!==void 0&&(r.assets=m),o!==void 0&&(r.verbose=o),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),p!==void 0&&(r.useDocumentTheme=p),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),d!==void 0&&(r.useDefaultConfig=d),h!==void 0&&(r.semanticIcons=h),r.verbose&&console.log(r);let x=(r.document&&r.document.documentElement?r.document:null)||(typeof document<"u"?document:null),_=x&&x.defaultView||(typeof window<"u"?window:null),E=x&&(r.themeRoot||x.documentElement);if(E&&typeof E.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")E.setAttribute("data-theme",r.globalTheme),r.globalTheme==="dark"||r.globalTheme==="light"?E.style.colorScheme=r.globalTheme:E.style.colorScheme="light dark";else if(_&&_.matchMedia){let $=W=>{E.setAttribute("data-theme",W.matches?"dark":"light")},lt=_.matchMedia("(prefers-color-scheme: dark)");if($(lt),E.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=$;try{lt.addEventListener("change",$)}catch{lt.addListener($)}}}else E.setAttribute("data-theme","light"),E.style.colorScheme="light";r.__svgCache||(r.__svgCache={});let C=Object.keys(y),P=new Set(C);if(C.forEach(O=>{let $=O.toLowerCase();$!==O&&P.has($)&&H(y[$],y[O])}),C.map(O=>{let $=O.toLowerCase();if(!($!==O&&P.has($)))return fp(O,y[O])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),y.typography)try{hs()}catch(O){r.verbose&&console.warn("Error applying typography sequence",O)}if(y.spacing)try{ys()}catch(O){r.verbose&&console.warn("Error applying spacing sequence",O)}if(y.timing)try{_s()}catch(O){r.verbose&&console.warn("Error applying timing sequence",O)}Ss();let L=Cs();return L&&(r.reset=L),r};var wr=new Map,nm=null,dp=null,Pw=null;function Rs(t){t.batchAtomicCss&&(dp=t.batchAtomicCss),t.compoundCssClass&&(Pw=t.compoundCssClass)}var Iw=new Set;function hp(t){try{let e=A();e&&(e.document=t)}catch{}t&&Iw.add(t)}function Ba(){try{let t=A();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var $w={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function kr(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function ja(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function Fw(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():ja(e)}function tm(t,e,r){let n=(r?r+"":"")+t+":"+e,o=wr.get(n),s=o?null:kr(t);if(!o){let a=$w[t]||ja(t),c=Fw(e);o=r?`_${r}_${a}-${c}`:`_${a}-${c}`,wr.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||kr(t)}:${e}}`;return Wt(i),o}var em=new WeakMap;function Wt(t,e){let r=om(e);if(!r)return;let n=em.get(r);if(n||(n=new Set,em.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var rm=new WeakMap;function om(t){let e=t||Ba();if(!e||!e.head)return null;let r=rm.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return rm.set(e,o),nm=o,o}var Dw=8;function he(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):dp?(n||(n=[]),n.push(c,String(l)),o++):s.push(tm(c,String(l),r)))}if(n&&o>=Dw){let c=n.join("\0"),l=dp(c),f=l.indexOf("\0"),u=l.substring(0,f),p=l.substring(f+1);if(p){let d=p.split(`
40
- `);for(let h=0;h<d.length;h++)d[h]&&Wt(d[h])}s.push(u)}else if(n)for(let c=0;c<n.length;c+=2)s.push(tm(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(Lw(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var pp=new Map;function Lw(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=wr.get(n);if(o){let p=pp.get(o);if(p)for(let d=0;d<p.length;d++)Wt(p[d]);return o}o=r?`_${r}_c${ja(n)}`:`_c${ja(n)}`;let s="",i=[],a=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),c=(p,d)=>{let h="";for(let g in d){let m=d[g];if(m!=null)if(typeof m=="object")c([...p,g],m);else{if(a(m))continue;h+=`${kr(g)}:${m};`}}h&&(p.length===0?s+=h:i.push({chain:p,body:h}))};c([],e);let l=p=>{if(!p.length)return`.${o}`;let d=p[0].split(",").map(h=>h.trim()).map(h=>h.includes("&")?h.replace(/&/g,`.${o}`):h.startsWith(":")?`.${o}${h}`:`.${o} ${h}`);for(let h=1;h<p.length;h++){let g=p[h].split(",").map(y=>y.trim()),m=[];for(let y of d)for(let b of g)b.includes("&")?m.push(b.replace(/&/g,y)):b.startsWith(":")?m.push(y+b):m.push(y+" "+b);d=m}return d.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let p=`${t}{.${o}{${s}}}`;f.push(p),Wt(p)}for(let p of i){let d=l(p.chain),h=`${t}{${d}{${p.body}}}`;f.push(h),Wt(h)}return pp.set(o,f),wr.set(n,o),o}let u=l([t]);if(s){let p=`${u}{${s}}`;f.push(p),Wt(p)}for(let p of i){let h=`${l([t,...p.chain])}{${p.body}}`;f.push(h),Wt(h)}return pp.set(o,f),wr.set(n,o),o}function ct(t){if(om(),typeof t=="string"){Wt(t);return}let e=Object.keys(t),r=n=>{let o=n.match(/max-width:\s*(\d+)/);return o?parseInt(o[1]):0};e.sort((n,o)=>{let s=n.startsWith("@media"),i=o.startsWith("@media");return!s&&!i?0:s?i?r(o)-r(n):1:-1});for(let n of e){let o=t[n];if(n.startsWith("@media")||n.startsWith("@supports"))for(let s in o){let i=o[s];if(typeof i=="object"&&i!==null){let a="";for(let c in i){let l=c.startsWith("--")?c:kr(c);a+=`${l}:${i[c]};`}Wt(`${n}{${s}{${a}}}`)}else{let a=s.startsWith("--")?s:kr(s);Wt(`${n}{${a}:${i};}`)}}else{let s="",i=!1;for(let a in o){let c=o[a];if(typeof c=="object"&&c!==null)i=!0;else{let l=a.startsWith("--")?a:kr(a);s+=`${l}:${c};`}}if(s&&Wt(`${n}{${s}}`),i){let a=[],c=[];for(let l in o)typeof o[l]=="object"&&o[l]!==null&&(l.startsWith("@media")||l.startsWith("@supports")?a.push(l):c.push(l));a.sort((l,f)=>{let u=p=>{let d=p.match(/max-width:\s*(\d+)/);return d?parseInt(d[1]):0};return u(f)-u(l)});for(let l of c)ct({[`${n} ${l}`]:o[l]});for(let l of a)ct({[l]:{[n]:o[l]}})}}}}function en(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${kr(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return Wt(`@keyframes ${t}{${r}}`),t}function sm(){wr.clear(),nm=null}function gp(){return wr.size}R();var Xp={};I(Xp,{DELEGATED_EVENTS:()=>an,LIFECYCLE_EVENTS:()=>qe,MIXINS:()=>Va,NON_BUBBLING_EVENTS:()=>Ua,REGISTRY:()=>_t,SVG_TAGS:()=>on,addDelegatedEvent:()=>Ps,addMethods:()=>pn,applyExtends:()=>ln,cacheNode:()=>Ge,create:()=>Ht,createHTMLNode:()=>nn,detectTag:()=>He,dispose:()=>Ke,isSvgTag:()=>sn,isValidTag:()=>rn,registerEvent:()=>cn,remove:()=>un,removeDelegatedEvent:()=>Is,update:()=>fn});var yp="http://www.w3.org/2000/svg",on=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),Mw=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function rn(t){return Mw.has(t)||on.has(t)}function sn(t){return on.has(t)}function He(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&rn(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),rn(o)&&!n.has(o)?o:"div"}var im={};function nn(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(sn(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===yp)return r.createElementNS(yp,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Ge(t){let e=t.tag=He(t),n=sn(e)&&(e==="svg"||t.parent?.node?.namespaceURI===yp)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=im[n];if(s||(s=im[n]=nn(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?nn(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var _t=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),Va={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},qe=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),Ua=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),am=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),an=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var bp=new WeakMap,Nw={passive:!0},jw={passive:!0,capture:!0},xp=(t,e)=>am.has(t)?e?jw:Nw:e||!1;function lm(t){let e=bp.get(t);return e||(e={handlers:new Map,installed:new Set},bp.set(t,e)),e}function Bw(t,e){let r=lm(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},xp(t,n))}function Ps(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=lm(n);Bw(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Is(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=bp.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function cm(t){return an.has(t)&&!qe.has(t)}function cn(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=c=>{s&&ot(s);try{let l=r.call(e,c,e,e.state,o);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&tt()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&tt()},a=Ua.has(t);if(!a&&cm(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Ps(t,n,i,c)}else n.addEventListener(t,i,xp(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!a&&cm(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Is(t,n,c)}else n.removeEventListener(t,i,xp(t,!1))})}function fm(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function ln(t,e,r){let n=fm(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=um(n[i],s);a&&a!==e&&pm(t,a,r,new Set([e]))}}function um(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function pm(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=fm(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=um(o[a],i);c&&pm(t,c,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=dm(t[s],i):t[s]=i}}function dm(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=dm(o,s):r[n]=s}return r}Mr();function fn(t={},e={}){let r=this,n=r.__ref;if(!n)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;let o=!t||Object.keys(t).length===0;if(ye(()=>{if(t.state&&rt(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,i===!0?"":i)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(_t.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&Ht(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&o&&n.__effects&&n.__effects.length)for(let s=0;s<n.__effects.length;s++){let i=n.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&n.__conditionalRunners)for(let s of n.__conditionalRunners)s();return Nt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Ke(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&Ke(o)}e.__children.length=0}if(t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function un(){Ke(this)}R();R();var Vw=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],Uw=["none","forwards","backwards","both"],zw=["normal","reverse","alternate","alternate-reverse"],Ww=["running","paused"],Hw=t=>/^[\d.]+m?s$/.test(t),Gw=0,hm=new Map,_p=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(w(t)){let o=JSON.stringify(t),s=hm.get(o);if(s)return s;let i=`smbls-anim-${Gw++}`,a=en(i,t);return hm.set(o,a),a}let n=r&&r[t];return w(n)?en(t,n):t},qw=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:Hw(u)?s.push(u):Vw.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):zw.includes(u)?c=u:Uw.includes(u)?l=u:Ww.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Sp={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=qw(t,e);return{animationName:_p(r.name||t,e),animationDuration:r.durations[0]||It(e.animationDuration||"A").timing,animationDelay:r.durations[1]||It(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||zt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:_p(t,e),animationDuration:It(e.animationDuration||"A").timing,animationDelay:It(e.animationDelay||"0s").timing,animationTimingFunction:zt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:_p(t,e)}),animationDuration:t=>({animationDuration:It(t).timing}),animationDelay:t=>({animationDelay:It(t).timing}),animationTimingFunction:t=>({animationTimingFunction:zt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var wp={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>j("height",t,e),width:(t,e)=>j("width",t,e),boxSizing:t=>ht(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("height",e),...it("width",r||e)}},inlineSize:(t,e)=>j("inlineSize",t,e),blockSize:(t,e)=>j("blockSize",t,e),minWidth:(t,e)=>j("minWidth",t,e),maxWidth:(t,e)=>j("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("minWidth",e),...it("maxWidth",r||e)}},minHeight:(t,e)=>j("minHeight",t,e),maxHeight:(t,e)=>j("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("minHeight",e),...it("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...j("inlineSize",e),...j("blockSize",r||e)}},minBlockSize:(t,e)=>j("minBlockSize",t,e),minInlineSize:(t,e)=>j("minInlineSize",t,e),maxBlockSize:(t,e)=>j("maxBlockSize",t,e),maxInlineSize:(t,e)=>j("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("minInlineSize",e),...it("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("maxInlineSize",e),...it("maxBlockSize",r||e)}},borderWidth:(t,e)=>j("borderWidth",t,e),padding:(t,e)=>j("padding",t,e),scrollPadding:(t,e)=>j("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("paddingInlineStart",e),...it("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("paddingBlockStart",e),...it("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>j("paddingBlockStart",t,e),paddingBottom:(t,e)=>j("paddingBlockEnd",t,e),paddingLeft:(t,e)=>j("paddingInlineStart",t,e),paddingRight:(t,e)=>j("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>j("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>j("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>j("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>j("paddingInlineEnd",t,e),margin:(t,e)=>j("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("marginInlineStart",e),...it("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...it("marginBlockStart",r),...it("marginBlockEnd",n||r)}},marginTop:(t,e)=>j("marginBlockStart",t,e),marginBottom:(t,e)=>j("marginBlockEnd",t,e),marginLeft:(t,e)=>j("marginInlineStart",t,e),marginRight:(t,e)=>j("marginInlineEnd",t,e),marginInlineStart:(t,e)=>j("marginInlineStart",t,e),marginInlineEnd:(t,e)=>j("marginInlineEnd",t,e),marginBlockStart:(t,e)=>j("marginBlockStart",t,e),marginBlockEnd:(t,e)=>j("marginBlockEnd",t,e),gap:t=>({gap:Da(t)}),columnGap:(t,e)=>te(e,"columnGap",t),rowGap:(t,e)=>te(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>Os(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Os(t??e.round,e,"borderRadius")};var kp={fontSize:t=>gs(t)||t,fontFamily:t=>({fontFamily:ds(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t})};var vp={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var Cp={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>ut(r,"k").k).join(" ")}},left:t=>ut(t,"left"),top:t=>ut(t,"top"),right:t=>ut(t,"right"),bottom:t=>ut(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>ut(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>ut(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var Gt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},Ap={theme:(t,e)=>{if(t)return e.themeModifier?Ut(t,`@${e.themeModifier}`):Ut(t)},color:(t,e)=>{let r=Gt(e);if(t)return{color:mt(t,r)}},background:(t,e)=>{let r=Gt(e);if(t)return S(t)&&t.includes("gradient")?{background:Es(t,r)}:{background:mt(t,r)}},backgroundColor:(t,e)=>{let r=Gt(e);if(t)return{backgroundColor:mt(t,r)}},backgroundImage:(t,e,r,n)=>{let o=Gt(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:Fa(t,o)}},textStroke:t=>({WebkitTextStroke:Ia(t)}),outline:t=>({outline:de(t)}),outlineOffset:(t,e)=>j("outlineOffset",t,e),border:t=>({border:de(t)}),borderColor:(t,e)=>{let r=Gt(e);if(t)return{borderColor:mt(t,r)}},borderTopColor:(t,e)=>{let r=Gt(e);if(t)return{borderTopColor:mt(t,r)}},borderBottomColor:(t,e)=>{let r=Gt(e);if(t)return{borderBottomColor:mt(t,r)}},borderLeftColor:(t,e)=>{let r=Gt(e);if(t)return{borderLeftColor:mt(t,r)}},borderRightColor:(t,e)=>{let r=Gt(e);if(t)return{borderRightColor:mt(t,r)}},borderLeft:t=>({borderLeft:de(t)}),borderTop:t=>({borderTop:de(t)}),borderRight:t=>({borderRight:de(t)}),borderBottom:t=>({borderBottom:de(t)}),shadow:(t,e)=>{let r=Gt(e);if(t)return{boxShadow:$a(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=Gt(e),s=n?" !important":"";return{boxShadow:As(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:As(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:de(t)})};var $s={transition:t=>({transition:La(t)}),transitionDuration:t=>({transitionDuration:Ts(t)}),transitionDelay:t=>({transitionDelay:Ts(t)}),transitionTimingFunction:t=>({transitionTimingFunction:zt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var Ep={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var Tp={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var pt={...Sp,...wp,...kp,...vp,...Cp,...Ap,...$s,...Ep,...Tp};var yt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var Kw=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,Yw=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=Ft(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(Kw),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},gm=(t,e,r)=>({[t]:Ft(e,r)}),Fs=(t,e,r)=>{let n=`&${t}`,o=Ft(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},Op=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return v(r)?r.call(e,e):!!r},Xw=(t,e,r)=>{let n=t.slice(1),o=Op(n,r);if(o===void 0&&(o=!!r[n]),!!o)return Ft(e,r)},Jw=(t,e,r)=>({[t]:e}),Zw=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Op(n,r);s!==void 0&&(o=s)}if(o)return Ft(e,r)},Qw=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Op(n,r);s!==void 0&&(o=s)}if(!o)return Ft(e,r)},Rp=(t,e)=>Ft(t,e),Pp={"@":Yw,":":Fs,"[":Fs,"*":Fs,"+":Fs,"~":Fs,"&":gm,">":gm,$:Xw,"-":Jw,".":Zw,"!":Qw};var Ip=Pe(),mm=(t,e,r)=>{let n=e?.context?.designSystem;n&&ot(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((p,d)=>nt(p,f[d]),{});o.designSystemClass=u}}else if(a==="true"){let l=K(c,e);nt(o,Rp(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=v(l)?l(e,e.state,e.context):l;f&&i(a,f),!Ip&&w(o[a])&&(o[a].label=a)}else if(pt[a]){let l=K(c,e);T(l)&&(l=l.reduce((u,p)=>nt(u,p),{}));let f=pt[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((u,p)=>nt(u,p),{})),f&&i(a,f),!Ip&&w(o[a])&&(o[a].label=a)}else if(yt.has(a)){let l=K(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),i(a,{[a]:l}),!Ip&&w(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&tt()}},ym=(t,e)=>{let r={};for(let n in t){let o=Pp[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?At(r[i],s[i]):r[i]=s[i])}}return r},Ft=(t,e,r={unpack:!0})=>{let[n,o]=mm(t,e,r),s=ym(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Yn(n,s);n._selectors=s}return n},t0=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};R();var bm=t=>{if(w(t))return Ft(t,t)},e0=(t,e)=>{let r=bm(t);return typeof e=="function"?e(r):he(r)};R();function Sm(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}function r0(...t){return Sm(this,"warn",t),Do.apply(this,t)}function n0(...t){return Sm(this,"error",t),yr.apply(this,t)}var xm={update:fn,remove:un,getDB:jo,getQuery:Bo,getRootData:Io,getChildren:Eo,getPath:To,nextElement:Lo,previousElement:Mo,verbose:Ur,warn:r0,error:n0,variables:No,spotByPath:Ao,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Po,getRootState:Ro,getRootContext:$o,getContext:Fo,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},_m=new WeakMap;function o0(t){if(!t)return xm;let e=_m.get(t);if(e)return e;e=Object.create(xm);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return _m.set(t,e),e}function pn(t){let e=o0(t.context);Object.setPrototypeOf(t,e)}R();Mr();var Mp={};I(Mp,{STATE_METHODS:()=>wm,applyInitialState:()=>za,applyStateMethods:()=>Dt,createState:()=>Fp,isTracking:()=>Lp,useHostState:()=>Dp});var wm=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),s0=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Dt=(t,e)=>{if(rt(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value:function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(e);return e.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=e;for(;a?.parent&&rt(a.parent);)a=a.parent;return a.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=rt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,rt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&s0(e,o,n[o])};var Fp=function(t,e,r){return t.state=za(t,e,r),t.state},za=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return Dt(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",i0(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=Pt({value:o});return s.__element=t,e?.state&&(s.parent=e.state),Dt(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!rt(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=Pt({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),Dt(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return rt(o)?(o.__element=t,o):e?.state||{}};function $p(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function i0(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?$p(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?$p(o,s):o??{}}let n=$p(r.state,t);if(n&&typeof n=="object"&&!rt(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var Dp=(t,e)=>{if(!t)return vm;let r=c0(t,e);return!r||!r.state?vm:f0(r.state)},Lp=()=>sr()!=null,a0=128;function c0(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<a0&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var l0={get(t,e){return t[e]}},km=new WeakMap,f0=t=>{let e=km.get(t);return e||(e=new Proxy(t,l0),km.set(t,e)),e},vm=new Proxy(Object.create(null),{get(){},has(){return!1}});R();var u0=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],Wa={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]},Am=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],Bp=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,Xe=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Bp(e)||Wa.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Wa,t)?Wa[t].includes(e):!1,Vp=t=>{if(!S(t))return!1;let e=t.toLowerCase();return Am.includes(e)},p0=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])vt(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(vt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=Xe(t,o),i=Vp(o);if(vt(e[o])&&(s||i)){let a=Bp(o)||o;n[a]=e[o]}}return n},d0=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},Ye=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Np=(t,e)=>{let r=(t.preSrc||"")+(Ye(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},jp={src:t=>Np(t,t.src),href:t=>Ye(t,t.href),action:t=>Ye(t,t.action),poster:t=>Np(t,t.poster),data:t=>Ye(t,t.data)},Up=t=>{let e=t.tag||"div",r={};for(let n in jp)if(t[n]!==void 0&&Xe(e,n)){let o=jp[n](t);o!==void 0&&(r[n]=o)}return r},Cm=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return v(r)?r.call(e,e):!!r},h0=(t,e,r)=>{if(t==="$"){let o=Cm(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=Cm(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},g0=new Set(["$",".","!"]),m0=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(h0(a,c,f))return v(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!g0.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let d in a[l])o("aria-"+d,a[l][d],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let d in a[l]){let h=d.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+h,a[l][d],i,c)}continue}let f=Xe(e,l),u=Vp(l);if(!f&&!u)continue;let p=Bp(l)||l;o(p,a[l],i,c)}}return n};var y0=1;function hn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function b0(t){return t.charAt(2).toLowerCase()+t.slice(3)}function x0(t){return t.toLowerCase()}function Em(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Ds(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ds(o,s):r[n]=s}return r}function Ht(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${y0++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=Ht);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let m=r.substring(0,g),y=s.context?.components;y&&(y[m]||y["smbls."+m])&&(t={...t,extends:m})}}ln(s,t,n);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let g in t){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let m=t[g],y=s[g],b=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";b&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=Ds(y,m):b&&a.has(g)?s[g]={...y,...m}:b&&Em(g)?s[g]=Ds(y,m):s[g]=m}function l(g){for(let m in g){let y=g[m],b=s[m],x=b&&y&&typeof b=="object"&&typeof y=="object"&&!Array.isArray(b)&&!Array.isArray(y)&&typeof b!="function"&&typeof y!="function";x&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Ds(b,y):x&&a.has(m)?s[m]={...b,...y}:x&&Em(m)?s[m]=Ds(b,y):s[m]=y}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,p=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,d=u||p||null;if(t.scope!==void 0||f){let g={};f&&Object.assign(g,f),t.scope!==void 0&&Object.assign(g,t.scope),s.scope=$n(g,d)}else d&&(s.scope=d);if(t.if!==void 0&&(s.if=t.if),pn(s),_0(s,e,t),s.if!=null){let g;if(typeof s.if=="function")try{g=s.if(s,s.state,s.context)}catch(m){if(g=!1,i.__ifError=m,typeof console<"u"&&console.warn){let y=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${y} \u2014 treating as false:`,m?.message||m)}}else g=s.if;i.__if=!!g}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof t.if=="function"&&Gp(s,{if:t.if}),s;s.tag||(s.tag=He(s)),Je("Init",s,n);let h=s.node=Ge(s);if(!h)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");h.appendChild(m),i.__fragmentAnchor=m}Je("AttachNode",s,n),h.setAttribute&&s.key&&h.setAttribute("data-key",s.key),h.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&h.setAttribute("data-smbls-app",s.context.key),s.id&&h.setAttribute&&(h.id=s.id),$m(s,n),Gp(s,t),qp(s),Pm(s),T0(s);try{Fm(s,n)}catch(g){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,g?.message||g,g?.stack?`
40
+ `);for(let h=0;h<d.length;h++)d[h]&&Wt(d[h])}s.push(u)}else if(n)for(let c=0;c<n.length;c+=2)s.push(tm(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(Lw(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var pp=new Map;function Lw(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=wr.get(n);if(o){let p=pp.get(o);if(p)for(let d=0;d<p.length;d++)Wt(p[d]);return o}o=r?`_${r}_c${ja(n)}`:`_c${ja(n)}`;let s="",i=[],a=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),c=(p,d)=>{let h="";for(let g in d){let m=d[g];if(m!=null)if(typeof m=="object")c([...p,g],m);else{if(a(m))continue;h+=`${kr(g)}:${m};`}}h&&(p.length===0?s+=h:i.push({chain:p,body:h}))};c([],e);let l=p=>{if(!p.length)return`.${o}`;let d=p[0].split(",").map(h=>h.trim()).map(h=>h.includes("&")?h.replace(/&/g,`.${o}`):h.startsWith(":")?`.${o}${h}`:`.${o} ${h}`);for(let h=1;h<p.length;h++){let g=p[h].split(",").map(y=>y.trim()),m=[];for(let y of d)for(let b of g)b.includes("&")?m.push(b.replace(/&/g,y)):b.startsWith(":")?m.push(y+b):m.push(y+" "+b);d=m}return d.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let p=`${t}{.${o}{${s}}}`;f.push(p),Wt(p)}for(let p of i){let d=l(p.chain),h=`${t}{${d}{${p.body}}}`;f.push(h),Wt(h)}return pp.set(o,f),wr.set(n,o),o}let u=l([t]);if(s){let p=`${u}{${s}}`;f.push(p),Wt(p)}for(let p of i){let h=`${l([t,...p.chain])}{${p.body}}`;f.push(h),Wt(h)}return pp.set(o,f),wr.set(n,o),o}function ct(t){if(om(),typeof t=="string"){Wt(t);return}let e=Object.keys(t),r=n=>{let o=n.match(/max-width:\s*(\d+)/);return o?parseInt(o[1]):0};e.sort((n,o)=>{let s=n.startsWith("@media"),i=o.startsWith("@media");return!s&&!i?0:s?i?r(o)-r(n):1:-1});for(let n of e){let o=t[n];if(n.startsWith("@media")||n.startsWith("@supports"))for(let s in o){let i=o[s];if(typeof i=="object"&&i!==null){let a="";for(let c in i){let l=c.startsWith("--")?c:kr(c);a+=`${l}:${i[c]};`}Wt(`${n}{${s}{${a}}}`)}else{let a=s.startsWith("--")?s:kr(s);Wt(`${n}{${a}:${i};}`)}}else{let s="",i=!1;for(let a in o){let c=o[a];if(typeof c=="object"&&c!==null)i=!0;else{let l=a.startsWith("--")?a:kr(a);s+=`${l}:${c};`}}if(s&&Wt(`${n}{${s}}`),i){let a=[],c=[];for(let l in o)typeof o[l]=="object"&&o[l]!==null&&(l.startsWith("@media")||l.startsWith("@supports")?a.push(l):c.push(l));a.sort((l,f)=>{let u=p=>{let d=p.match(/max-width:\s*(\d+)/);return d?parseInt(d[1]):0};return u(f)-u(l)});for(let l of c)ct({[`${n} ${l}`]:o[l]});for(let l of a)ct({[l]:{[n]:o[l]}})}}}}function en(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${kr(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return Wt(`@keyframes ${t}{${r}}`),t}function sm(){wr.clear(),nm=null}function gp(){return wr.size}R();var Xp={};I(Xp,{DELEGATED_EVENTS:()=>an,LIFECYCLE_EVENTS:()=>qe,MIXINS:()=>Va,NON_BUBBLING_EVENTS:()=>Ua,REGISTRY:()=>_t,SVG_TAGS:()=>on,addDelegatedEvent:()=>Ps,addMethods:()=>pn,applyExtends:()=>ln,cacheNode:()=>Ge,create:()=>Ht,createHTMLNode:()=>nn,detectTag:()=>He,dispose:()=>Ke,isSvgTag:()=>sn,isValidTag:()=>rn,registerEvent:()=>cn,remove:()=>un,removeDelegatedEvent:()=>Is,update:()=>fn});var yp="http://www.w3.org/2000/svg",on=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),Mw=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function rn(t){return Mw.has(t)||on.has(t)}function sn(t){return on.has(t)}function He(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&rn(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),rn(o)&&!n.has(o)?o:"div"}var im={};function nn(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(sn(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===yp)return r.createElementNS(yp,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Ge(t){let e=t.tag=He(t),n=sn(e)&&(e==="svg"||t.parent?.node?.namespaceURI===yp)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=im[n];if(s||(s=im[n]=nn(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?nn(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var _t=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),Va={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},qe=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),Ua=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),am=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),an=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var bp=new WeakMap,Nw={passive:!0},jw={passive:!0,capture:!0},xp=(t,e)=>am.has(t)?e?jw:Nw:e||!1;function lm(t){let e=bp.get(t);return e||(e={handlers:new Map,installed:new Set},bp.set(t,e)),e}function Bw(t,e){let r=lm(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},xp(t,n))}function Ps(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=lm(n);Bw(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Is(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=bp.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function cm(t){return an.has(t)&&!qe.has(t)}function cn(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=c=>{s&&ot(s);try{let l=r.call(e,c,e,e.state,o);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&tt()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&tt()},a=Ua.has(t);if(!a&&cm(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Ps(t,n,i,c)}else n.addEventListener(t,i,xp(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!a&&cm(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Is(t,n,c)}else n.removeEventListener(t,i,xp(t,!1))})}function fm(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function ln(t,e,r){let n=fm(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=um(n[i],s);a&&a!==e&&pm(t,a,r,new Set([e]))}}function um(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function pm(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=fm(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=um(o[a],i);c&&pm(t,c,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=dm(t[s],i):t[s]=i}}function dm(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=dm(o,s):r[n]=s}return r}Mr();function fn(t={},e={}){let r=this,n=r.__ref;if(!n)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;let o=!t||Object.keys(t).length===0;if(ye(()=>{if(t.state&&rt(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,i===!0?"":i)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(_t.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&Ht(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&o&&n.__effects&&n.__effects.length)for(let s=0;s<n.__effects.length;s++){let i=n.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&n.__conditionalRunners)for(let s of n.__conditionalRunners)s();return Nt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Ke(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&Ke(o)}e.__children.length=0}if(t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function un(){Ke(this)}R();R();var Vw=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],Uw=["none","forwards","backwards","both"],zw=["normal","reverse","alternate","alternate-reverse"],Ww=["running","paused"],Hw=t=>/^[\d.]+m?s$/.test(t),Gw=0,hm=new Map,_p=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(w(t)){let o=JSON.stringify(t),s=hm.get(o);if(s)return s;let i=`smbls-anim-${Gw++}`,a=en(i,t);return hm.set(o,a),a}let n=r&&r[t];return w(n)?en(t,n):t},qw=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:Hw(u)?s.push(u):Vw.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):zw.includes(u)?c=u:Uw.includes(u)?l=u:Ww.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Sp={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=qw(t,e);return{animationName:_p(r.name||t,e),animationDuration:r.durations[0]||It(e.animationDuration||"A").timing,animationDelay:r.durations[1]||It(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||zt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:_p(t,e),animationDuration:It(e.animationDuration||"A").timing,animationDelay:It(e.animationDelay||"0s").timing,animationTimingFunction:zt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:_p(t,e)}),animationDuration:t=>({animationDuration:It(t).timing}),animationDelay:t=>({animationDelay:It(t).timing}),animationTimingFunction:t=>({animationTimingFunction:zt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var wp={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>j("height",t,e),width:(t,e)=>j("width",t,e),boxSizing:t=>ht(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("height",e),...it("width",r||e)}},inlineSize:(t,e)=>j("inlineSize",t,e),blockSize:(t,e)=>j("blockSize",t,e),minWidth:(t,e)=>j("minWidth",t,e),maxWidth:(t,e)=>j("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("minWidth",e),...it("maxWidth",r||e)}},minHeight:(t,e)=>j("minHeight",t,e),maxHeight:(t,e)=>j("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("minHeight",e),...it("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...j("inlineSize",e),...j("blockSize",r||e)}},minBlockSize:(t,e)=>j("minBlockSize",t,e),minInlineSize:(t,e)=>j("minInlineSize",t,e),maxBlockSize:(t,e)=>j("maxBlockSize",t,e),maxInlineSize:(t,e)=>j("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("minInlineSize",e),...it("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("maxInlineSize",e),...it("maxBlockSize",r||e)}},borderWidth:(t,e)=>j("borderWidth",t,e),padding:(t,e)=>j("padding",t,e),scrollPadding:(t,e)=>j("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("paddingInlineStart",e),...it("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("paddingBlockStart",e),...it("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>j("paddingBlockStart",t,e),paddingBottom:(t,e)=>j("paddingBlockEnd",t,e),paddingLeft:(t,e)=>j("paddingInlineStart",t,e),paddingRight:(t,e)=>j("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>j("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>j("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>j("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>j("paddingInlineEnd",t,e),margin:(t,e)=>j("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...it("marginInlineStart",e),...it("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...it("marginBlockStart",r),...it("marginBlockEnd",n||r)}},marginTop:(t,e)=>j("marginBlockStart",t,e),marginBottom:(t,e)=>j("marginBlockEnd",t,e),marginLeft:(t,e)=>j("marginInlineStart",t,e),marginRight:(t,e)=>j("marginInlineEnd",t,e),marginInlineStart:(t,e)=>j("marginInlineStart",t,e),marginInlineEnd:(t,e)=>j("marginInlineEnd",t,e),marginBlockStart:(t,e)=>j("marginBlockStart",t,e),marginBlockEnd:(t,e)=>j("marginBlockEnd",t,e),gap:t=>({gap:Da(t)}),columnGap:(t,e)=>te(e,"columnGap",t),rowGap:(t,e)=>te(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>Os(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Os(t??e.round,e,"borderRadius")};var kp={fontSize:t=>gs(t)||t,fontFamily:t=>({fontFamily:ds(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var vp={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var Cp={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>ut(r,"k").k).join(" ")}},left:t=>ut(t,"left"),top:t=>ut(t,"top"),right:t=>ut(t,"right"),bottom:t=>ut(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>ut(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>ut(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var Gt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},Ap={theme:(t,e)=>{if(t)return e.themeModifier?Ut(t,`@${e.themeModifier}`):Ut(t)},color:(t,e)=>{let r=Gt(e);if(t)return{color:mt(t,r)}},background:(t,e)=>{let r=Gt(e);if(t)return S(t)&&t.includes("gradient")?{background:Es(t,r)}:{background:mt(t,r)}},backgroundColor:(t,e)=>{let r=Gt(e);if(t)return{backgroundColor:mt(t,r)}},backgroundImage:(t,e,r,n)=>{let o=Gt(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:Fa(t,o)}},textStroke:t=>({WebkitTextStroke:Ia(t)}),outline:t=>({outline:de(t)}),outlineOffset:(t,e)=>j("outlineOffset",t,e),border:t=>({border:de(t)}),borderColor:(t,e)=>{let r=Gt(e);if(t)return{borderColor:mt(t,r)}},borderTopColor:(t,e)=>{let r=Gt(e);if(t)return{borderTopColor:mt(t,r)}},borderBottomColor:(t,e)=>{let r=Gt(e);if(t)return{borderBottomColor:mt(t,r)}},borderLeftColor:(t,e)=>{let r=Gt(e);if(t)return{borderLeftColor:mt(t,r)}},borderRightColor:(t,e)=>{let r=Gt(e);if(t)return{borderRightColor:mt(t,r)}},borderLeft:t=>({borderLeft:de(t)}),borderTop:t=>({borderTop:de(t)}),borderRight:t=>({borderRight:de(t)}),borderBottom:t=>({borderBottom:de(t)}),shadow:(t,e)=>{let r=Gt(e);if(t)return{boxShadow:$a(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=Gt(e),s=n?" !important":"";return{boxShadow:As(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:As(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:de(t)})};var $s={transition:t=>({transition:La(t)}),transitionDuration:t=>({transitionDuration:Ts(t)}),transitionDelay:t=>({transitionDelay:Ts(t)}),transitionTimingFunction:t=>({transitionTimingFunction:zt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var Ep={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var Tp={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var pt={...Sp,...wp,...kp,...vp,...Cp,...Ap,...$s,...Ep,...Tp};var yt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var Kw=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,Yw=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=Ft(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(Kw),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},gm=(t,e,r)=>({[t]:Ft(e,r)}),Fs=(t,e,r)=>{let n=`&${t}`,o=Ft(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},Op=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return v(r)?r.call(e,e):!!r},Xw=(t,e,r)=>{let n=t.slice(1),o=Op(n,r);if(o===void 0&&(o=!!r[n]),!!o)return Ft(e,r)},Jw=(t,e,r)=>({[t]:e}),Zw=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Op(n,r);s!==void 0&&(o=s)}if(o)return Ft(e,r)},Qw=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Op(n,r);s!==void 0&&(o=s)}if(!o)return Ft(e,r)},Rp=(t,e)=>Ft(t,e),Pp={"@":Yw,":":Fs,"[":Fs,"*":Fs,"+":Fs,"~":Fs,"&":gm,">":gm,$:Xw,"-":Jw,".":Zw,"!":Qw};var Ip=Pe(),mm=(t,e,r)=>{let n=e?.context?.designSystem;n&&ot(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((p,d)=>nt(p,f[d]),{});o.designSystemClass=u}}else if(a==="true"){let l=K(c,e);nt(o,Rp(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=v(l)?l(e,e.state,e.context):l;f&&i(a,f),!Ip&&w(o[a])&&(o[a].label=a)}else if(pt[a]){let l=K(c,e);T(l)&&(l=l.reduce((u,p)=>nt(u,p),{}));let f=pt[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((u,p)=>nt(u,p),{})),f&&i(a,f),!Ip&&w(o[a])&&(o[a].label=a)}else if(yt.has(a)){let l=K(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),i(a,{[a]:l}),!Ip&&w(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&tt()}},ym=(t,e)=>{let r={};for(let n in t){let o=Pp[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?At(r[i],s[i]):r[i]=s[i])}}return r},Ft=(t,e,r={unpack:!0})=>{let[n,o]=mm(t,e,r),s=ym(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Yn(n,s);n._selectors=s}return n},t0=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};R();var bm=t=>{if(w(t))return Ft(t,t)},e0=(t,e)=>{let r=bm(t);return typeof e=="function"?e(r):he(r)};R();function Sm(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}function r0(...t){return Sm(this,"warn",t),Do.apply(this,t)}function n0(...t){return Sm(this,"error",t),yr.apply(this,t)}var xm={update:fn,remove:un,getDB:jo,getQuery:Bo,getRootData:Io,getChildren:Eo,getPath:To,nextElement:Lo,previousElement:Mo,verbose:Ur,warn:r0,error:n0,variables:No,spotByPath:Ao,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Po,getRootState:Ro,getRootContext:$o,getContext:Fo,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},_m=new WeakMap;function o0(t){if(!t)return xm;let e=_m.get(t);if(e)return e;e=Object.create(xm);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return _m.set(t,e),e}function pn(t){let e=o0(t.context);Object.setPrototypeOf(t,e)}R();Mr();var Mp={};I(Mp,{STATE_METHODS:()=>wm,applyInitialState:()=>za,applyStateMethods:()=>Dt,createState:()=>Fp,isTracking:()=>Lp,useHostState:()=>Dp});var wm=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),s0=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Dt=(t,e)=>{if(rt(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value:function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(e);return e.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=e;for(;a?.parent&&rt(a.parent);)a=a.parent;return a.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=rt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,rt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&s0(e,o,n[o])};var Fp=function(t,e,r){return t.state=za(t,e,r),t.state},za=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return Dt(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",i0(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=Pt({value:o});return s.__element=t,e?.state&&(s.parent=e.state),Dt(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!rt(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=Pt({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),Dt(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return rt(o)?(o.__element=t,o):e?.state||{}};function $p(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function i0(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?$p(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?$p(o,s):o??{}}let n=$p(r.state,t);if(n&&typeof n=="object"&&!rt(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var Dp=(t,e)=>{if(!t)return vm;let r=c0(t,e);return!r||!r.state?vm:f0(r.state)},Lp=()=>sr()!=null,a0=128;function c0(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<a0&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var l0={get(t,e){return t[e]}},km=new WeakMap,f0=t=>{let e=km.get(t);return e||(e=new Proxy(t,l0),km.set(t,e)),e},vm=new Proxy(Object.create(null),{get(){},has(){return!1}});R();var u0=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],Wa={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]},Am=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],Bp=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,Xe=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Bp(e)||Wa.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Wa,t)?Wa[t].includes(e):!1,Vp=t=>{if(!S(t))return!1;let e=t.toLowerCase();return Am.includes(e)},p0=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])vt(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(vt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=Xe(t,o),i=Vp(o);if(vt(e[o])&&(s||i)){let a=Bp(o)||o;n[a]=e[o]}}return n},d0=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},Ye=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Np=(t,e)=>{let r=(t.preSrc||"")+(Ye(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},jp={src:t=>Np(t,t.src),href:t=>Ye(t,t.href),action:t=>Ye(t,t.action),poster:t=>Np(t,t.poster),data:t=>Ye(t,t.data)},Up=t=>{let e=t.tag||"div",r={};for(let n in jp)if(t[n]!==void 0&&Xe(e,n)){let o=jp[n](t);o!==void 0&&(r[n]=o)}return r},Cm=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return v(r)?r.call(e,e):!!r},h0=(t,e,r)=>{if(t==="$"){let o=Cm(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=Cm(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},g0=new Set(["$",".","!"]),m0=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(h0(a,c,f))return v(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!g0.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let d in a[l])o("aria-"+d,a[l][d],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let d in a[l]){let h=d.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+h,a[l][d],i,c)}continue}let f=Xe(e,l),u=Vp(l);if(!f&&!u)continue;let p=Bp(l)||l;o(p,a[l],i,c)}}return n};var y0=1;function hn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function b0(t){return t.charAt(2).toLowerCase()+t.slice(3)}function x0(t){return t.toLowerCase()}function Em(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Ds(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ds(o,s):r[n]=s}return r}function Ht(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${y0++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=Ht);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let m=r.substring(0,g),y=s.context?.components;y&&(y[m]||y["smbls."+m])&&(t={...t,extends:m})}}ln(s,t,n);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let g in t){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let m=t[g],y=s[g],b=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";b&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=Ds(y,m):b&&a.has(g)?s[g]={...y,...m}:b&&Em(g)?s[g]=Ds(y,m):s[g]=m}function l(g){for(let m in g){let y=g[m],b=s[m],x=b&&y&&typeof b=="object"&&typeof y=="object"&&!Array.isArray(b)&&!Array.isArray(y)&&typeof b!="function"&&typeof y!="function";x&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Ds(b,y):x&&a.has(m)?s[m]={...b,...y}:x&&Em(m)?s[m]=Ds(b,y):s[m]=y}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,p=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,d=u||p||null;if(t.scope!==void 0||f){let g={};f&&Object.assign(g,f),t.scope!==void 0&&Object.assign(g,t.scope),s.scope=$n(g,d)}else d&&(s.scope=d);if(t.if!==void 0&&(s.if=t.if),pn(s),_0(s,e,t),s.if!=null){let g;if(typeof s.if=="function")try{g=s.if(s,s.state,s.context)}catch(m){if(g=!1,i.__ifError=m,typeof console<"u"&&console.warn){let y=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${y} \u2014 treating as false:`,m?.message||m)}}else g=s.if;i.__if=!!g}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof t.if=="function"&&Gp(s,{if:t.if}),s;s.tag||(s.tag=He(s)),Je("Init",s,n);let h=s.node=Ge(s);if(!h)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");h.appendChild(m),i.__fragmentAnchor=m}Je("AttachNode",s,n),h.setAttribute&&s.key&&h.setAttribute("data-key",s.key),h.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&h.setAttribute("data-smbls-app",s.context.key),s.id&&h.setAttribute&&(h.id=s.id),$m(s,n),Gp(s,t),qp(s),Pm(s),T0(s);try{Fm(s,n)}catch(g){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,g?.message||g,g?.stack?`
41
41
  `+g.stack.split(`
42
42
  `).slice(0,6).join(`
43
43
  `):"")}}if(Yp(s,e,o),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let g=s.context?.designSystem;g&&ot(g);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{g&&tt()}}if(Je("Create",s,n),Je("Complete",s,n),Je("Render",s,n),Je("RenderRouter",s,n),typeof s.onFrame=="function"){let g=s.onFrame,m=s.context?.designSystem,y=()=>{if(s.node){if(s.node.isConnected){m&&ot(m);try{g(s,s.state,s.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{m&&tt()}}requestAnimationFrame(y)}};requestAnimationFrame(y)}return s}function _0(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!rt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Dt(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=a.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let d in u)c[d]===void 0&&(c[d]=u[d]);let p=new Set(l.languages||[]);for(let d in l.translations)!p.has(d)&&c[d]===void 0&&(c[d]=l.translations[d])}t.state=rt(c)?c:Pt(c),t.state.__element=t,t.state.root=t.state,Dt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Dt(t,t.state);return}if(typeof i=="string"){if(t.state=Rm(i,e),t.state&&typeof t.state=="object"&&!rt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}Dt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=rt(a)?a:Pt(a||{})}else rt(i)?t.state=i:t.state=Pt({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,Dt(t,t.state)}function zp(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function Rm(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?zp(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?zp(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=zp(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function S0(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||_t.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||hn(a)||pt[a]||yt&&yt.has(a)||Xe(r,a)||o.push({prop:a,fn:t[a]})}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&ot(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&tt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Gp(t,e){let r=t.__ref;if(S0(t),typeof t.text=="function"){let o=t.text,s=et(()=>{if(!r.contentManaged)try{let i=o(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=lr.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){let o=t.text,s=et(()=>{if(r.contentManaged)return;let i=lr.call(t,o,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!_t.has(o)&&!hn(o)&&!r.__exec[o]){if(pt[o]){let s=t[o],i=o,a,c=et(()=>{let l=t.context?.designSystem;l&&ot(l);try{let f=s(t,t.state,t.context),u=pt[i](f,t,t.state,t.context);if(u&&t.node){let p=Tm(u);(p===null||p!==a)&&(a=p,dn(t.node,u))}else t.node&&(i==="show"||i==="hide")&&(a=void 0,t.node.style.display="")}finally{l&&tt()}},{depth:r.path.length});r.__effects.push(c),r.__exec[o]=s}else if(yt&&yt.has(o)){let s=t[o],i=o,a,c=et(()=>{let l=t.context?.designSystem;l&&ot(l);try{let f=s(t,t.state,t.context);if(t.node)if(f!=null){let u=i+":"+String(f);u!==a&&(a=u,dn(t.node,{[i]:f}))}else a=void 0,t.node.style[i]=""}finally{l&&tt()}},{depth:r.path.length});r.__effects.push(c),r.__exec[o]=s}}if(typeof e.html=="function"){let o=e.html,s=et(()=>{let i=t.context?.designSystem;i&&ot(i);try{let a=o(t,t.state,t.context);t.node&&a!=null&&typeof a!="function"&&(t.node.innerHTML=a)}finally{i&&tt()}},{depth:r.path.length});r.__effects.push(s),r.__exec.html=o}if(typeof e.value=="function"){let o=e.value,s=et(()=>{try{let i=o(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let a=i==null?"":String(i);if(t.node.value===a)return;let c=typeof document<"u"&&document.activeElement===t.node,l=c&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,f=c&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=a,c&&l!=null&&f!=null)try{t.node.setSelectionRange(l,f)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.value=o}if(typeof e.style=="function"){let o=e.style,s,i=et(()=>{let a=o(t,t.state,t.context),c=Tm(a);(c===null||c!==s)&&(s=c,dn(t.node,a))},{depth:r.path.length});r.__effects.push(i),r.__exec.style=o}else if(t.style&&typeof t.style=="object")for(let o in t.style){let s=t.style[o];if(typeof s!="function")continue;let i,a=et(()=>{try{let c=s(t,t.state,t.context);if(t.node){let l=o+":"+String(c);l!==i&&(i=l,dn(t.node,{[o]:c}))}}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.attr&&typeof t.attr=="object"){for(let o in t.attr)if(typeof t.attr[o]=="function"){let s=t.attr[o],i=o,a=et(()=>{try{let c=s(t,t.state,t.context);t.node?.setAttribute&&(c==null||c===!1?t.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&t.node.setAttribute(i,c===!0?"":c))}catch{}},{depth:r.path.length});r.__effects.push(a)}}if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s!="function")continue;let i="aria-"+o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=et(()=>{try{let c=s(t,t.state,t.context);if(!t.node?.setAttribute)return;c==null||c===!1?t.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&t.node.setAttribute(i,c===!0?"":c)}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.data&&typeof t.data=="object")for(let o in t.data){let s=t.data[o];if(typeof s!="function")continue;let a="data-"+o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=et(()=>{try{let l=s(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null||l===!1?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(c)}let n=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(n)for(let o in n){let s=n[o];if(typeof s!="function")continue;let i=et(()=>{try{let a=s(t,t.state,t.context);if(!t.node?.classList)return;typeof a=="string"?t.node.classList.add(a):a?t.node.classList.add(o):t.node.classList.remove(o)}catch{}},{depth:r.path.length});r.__effects.push(i)}if(typeof e.if=="function"){let o=e.if,s=et(()=>{let i;try{i=o(t,t.state,t.context)}catch(c){if(i=!1,r.__ifError=c,typeof console<"u"&&console.warn){let l=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${l} \u2014 treating as false:`,c?.message||c)}return}let a=r.__if;if(r.__if=!!i,a&&!r.__if&&t.node)t.node.remove();else if(!a&&r.__if)if(r.__ifInitialized){t.node||(t.node=Ge(t)),t.node&&(t.node.ref=t);let c=t.parent,l=c?.node;if(l&&t.node){let f=null,u=Object.keys(c),p=u.indexOf(t.key);for(let d=p+1;d<u.length;d++){let h=c[u[d]];if(h?.node?.parentNode===l){f=h.node;break}}f?l.insertBefore(t.node,f):l.appendChild(t.node)}else Yp(t,t.parent);qp(t)}else{if(r.__ifInitialized=!0,t.tag||(t.tag=He(t)),Je("Init",t,{}),t.node||(t.node=Ge(t)),!t.node)return;if(t.tag==="fragment"&&!r.__fragmentAnchor){let f=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(f),r.__fragmentAnchor=f}Je("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),$m(t,{});let c=e.if;delete e.if;try{Gp(t,e)}finally{e.if=c}qp(t),Pm(t),Fm(t,{}),Yp(t,t.parent)}},{depth:r.path.length});r.__effects.push(s)}for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||_t.has(o)||typeof t[o]!="function")continue;let s=o.charCodeAt(0);if(s>=65&&s<=90||hn(o))continue;let i=t[o];r.__exec[o]=i;let a=t.tag||"div";if(Xe(a,o)&&!pt[o]&&!(yt&&yt.has(o))){let c=o,l=et(()=>{try{let f=i(t,t.state,t.context);t.node?.setAttribute&&(f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&(c==="src"&&"src"in t.node?t.node.src=f:t.node.setAttribute(c,f===!0?"":f)))}catch{}},{depth:r.path.length});r.__effects.push(l)}}v0(t),C0(t)}function qp(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),E0(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&dn(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.setAttribute&&e.setAttribute(r,n===!0?"":n)}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function Tm(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function dn(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&k0(t,r)}var w0=0;function k0(t,e){let r=`_ds${w0++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let p in l){let d=l[p];if(typeof d=="object"){let h=p.includes("&")?c.split(", ").map(m=>p.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${p}`).join(", "),g="";for(let m in d)g+=`${m.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${d[m]};`;u+=`${h} { ${g} }