smbls 3.14.820 → 3.14.821

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/smbls.cjs CHANGED
@@ -1,36 +1,36 @@
1
- "use strict";var BA=Object.create;var nl=Object.defineProperty;var VA=Object.getOwnPropertyDescriptor;var UA=Object.getOwnPropertyNames;var zA=Object.getPrototypeOf,HA=Object.prototype.hasOwnProperty;var V=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var op=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},$=(t,e)=>{for(var n in e)nl(t,n,{get:e[n],enumerable:!0})},vx=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of UA(e))!HA.call(t,o)&&o!==n&&nl(t,o,{get:()=>e[o],enumerable:!(r=VA(e,o))||r.enumerable});return t};var WA=(t,e,n)=>(n=t!=null?BA(zA(t)):{},vx(e||!t||!t.__esModule?nl(n,"default",{value:t,enumerable:!0}):n,t)),qA=t=>vx(nl({},"__esModule",{value:!0}),t);var kp,vp,C,nt,ii=V(()=>{"use strict";kp=globalThis,vp=globalThis,C=globalThis,nt=C.document});var pn,ai,Zt,ci=V(()=>{"use strict";ii();pn=t=>(typeof Node=="object"?t instanceof C.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,ai=t=>(typeof HTMLElement=="object"?t instanceof C.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Zt=t=>typeof C<"u"&&(C.Node&&t instanceof C.Node||C.Window&&t instanceof C.Window||t===C||nt!==void 0&&t===nt)});var v,S,Ke,O,pl,hl,R,gl,j,Rt,Dt,li,Jt,Cp,It=V(()=>{"use strict";ci();v=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,S=t=>typeof t=="string",Ke=t=>typeof t=="number",O=t=>typeof t=="function",pl=t=>t===!0||t===!1,hl=t=>t===null,R=t=>Array.isArray(t),gl=t=>t instanceof Date,j=t=>t===null?!1:typeof t=="object",Rt=t=>t!==void 0,Dt=t=>t===void 0,li={boolean:pl,array:R,object:v,string:S,date:gl,number:Ke,null:hl,function:O,objectLike:j,node:pn,htmlElement:ai,defined:Rt},Jt=t=>(...e)=>e.some(n=>li[n](t)),Cp=t=>(...e)=>!e.some(n=>li[n](t))});var Ep,Ap,Tp,Op,ko,fi,Rp,Pp,ui,Dp,Ip,Lp,$p,Mp,Fp,Np,vo,di,Co=V(()=>{"use strict";hn();It();Ep=(t,e)=>e.every(n=>t.includes(n)),Ap=(t,e)=>{let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n},Tp=(t,e)=>{if(S(e)&&(e=parseInt(e)),Ke(e)){if(e<0||e>=t.length||isNaN(e))throw new Error("Invalid index");t.splice(e,1)}else throw new Error("Invalid index");return t},Op=(t,e,n)=>{e<0||n<0||e>=t.length||n>=t.length||([t[e],t[n]]=[t[n],t[e]])},ko=(...t)=>[].concat(...t),fi=(t,e=[])=>t.reduce((n,r)=>ot(n,it(r,{exclude:e}),e),{}),Rp=(t,e)=>{let n=t.indexOf(e);return n!==-1?t.slice(0,n):t},Pp=(t,e)=>{if(!R(t))return;let n=t.indexOf(e);return n!==-1?t.slice(n+1):t},ui=(t,e)=>{let n=t.indexOf(e);if(n>-1){let r=[...t];return r.splice(n,1),r}return t},Dp=(t,e)=>t.filter(n=>n!==e),Ip=(t,e)=>{let n=[];for(let r=0;r<t.length;r++)n.push(t[r]),r<t.length-1&&n.push(e);return n},Lp=(t,e,n)=>{let r=[...t],o=r.indexOf(e),s=r.indexOf(n);if(o!==-1&&s!==-1){let i=r.splice(o,1)[0],a=s<o?s:s+1;r.splice(a,0,i)}return r},$p=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},Mp=(t,e)=>t.filter(n=>!e.includes(n)),Fp=(t,e)=>{let n=new Set(e);return t.filter(r=>!n.has(r))},Np=(t,e)=>{if(!t)return 0;let n=0;for(let r=0;r<e.length;r++)t.includes(e[r])&&n++;return n},vo=t=>R(t)?[...new Set(t)]:t,di=(t,e)=>{for(let n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!1,configurable:!0,writable:!0})}});function Mt(t,e,n={}){let{bracketsLength:r=2}=n,o=r===3?"{{{":"{{";if(!t.includes(o)||!fT(this,t))return t;let s=lT[r],i=e||this.state||{},a=this;return t.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let h=a?.context,p=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||a?.[u];if(p&&typeof p=="function")try{return String(p.call(a,d)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,p=i;for(let m=0;m<h;m++){if(!p||!p.parent)return"";p=p.parent}if(d==="parent")return String(p.value??"");let g=pi(p,d);return g!=null&&typeof g=="object"?"":String(g??"")}else{let h=pi(i,d);if(h!=null&&typeof h!="object")return String(h);let p=a?.context?.polyglot;if(p?.translations){let g=i?.root?.lang||i?.lang||a?.context?.state?.lang||p.defaultLang||"en",m=p.translations[g];if(m){let x=pi(m,d);if(x!=null&&typeof x!="object")return String(x);for(let b in m){let _=m[b];if(_&&typeof _=="object"&&!Array.isArray(_)){let w=pi(_,d);if(w!=null&&typeof w!="object")return String(w)}}}let y=pi(p.translations,d);if(y!=null&&typeof y!="object")return String(y)}return""}})}var hi,jp,lT,pi,fT,wr,Bp,uT,Vp,Up,zp,dT,Hp,Wp,gi=V(()=>{"use strict";hi=(t,e)=>{for(let n of e)if(t.includes(n))return!0;return!1},jp=(t,e)=>{let n=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(n,"")},lT={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},pi=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),fT=(t,e)=>{if(!t||!t.__ref)return!0;let n=t;for(;n;){if(n.allowRuntimeTemplates===!0)return!0;let r=n.__ref&&n.__ref.__authoredTemplates;if(r&&r.has(e))return!0;n=n.parent}return!1};wr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Bp=(t,e)=>{let n=t.split(`
2
- `),r=-1,o=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<n.length;f++)if(a.test(n[f])&&!l){if(l=!0,r=f+1,s=n[f].indexOf(e)+1,n[f].includes("{}")){o=r,i=n[f].indexOf("{}")+3;break}let u=n[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=f+1,i=n[f].length+1;break}}else if(l&&(c+=(n[f].match(/{/g)||[]).length,c+=(n[f].match(/\[/g)||[]).length,c-=(n[f].match(/}/g)||[]).length,c-=(n[f].match(/]/g)||[]).length,c===0)){o=f+1,i=n[f].lastIndexOf("}")!==-1?n[f].lastIndexOf("}")+2:n[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:r,endLineNumber:o}},uT=/\\([0-7]{1,3})/g,Vp=t=>t.replace(uT,(e,n)=>String.fromCharCode(parseInt(n,8))),Up=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),zp=t=>t.replace(/\/\/\/\/\/n/g,`
3
- `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),dT=/[^a-zA-Z0-9\s]/g,Hp=t=>t.replace(dT,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Wp=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var Fn,mi,qp,Sr,Nn,jn,Kp,Eo,kr,yi,Gp,vr=V(()=>{"use strict";Fn=new Set(["attr","style","text","html","content","data","classlist","state","scope","root","deps","extend","extends","$router","routes","children","childExtend","childExtends","childExtendRecursive","childExtendsRecursive","props","if","define","__name","__ref","__hash","__text","key","tag","query","parent","node","variables","on","fetch","component","context","preventContentUpdate","preventContentRecreate"]),mi=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),qp=["ref","parent","__element","__depends","__ref","__children","root"],Sr=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),Nn=new Set(["update","__element"]),jn=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),Kp=t=>jn.has(t),Eo=new Set(["log","warn","error","verbose"]),kr=t=>jn.has(t)&&!Eo.has(t),yi=new Set(["node","context","extends","__element","__ref",...jn,...Sr,...Nn]),Gp=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});function AT(){let t=Cr.get(this);return t?t.src.trim():Function.prototype.toString.call(this)}var Mx,Er,ut,Xp,bt,ot,Hx,Zp,it,_i,pT,hT,Fx,xi,gT,mT,yT,Ge,Wx,bT,ml,qx,Yp,Cr,_T,xT,wT,ST,kT,Nx,vT,jx,CT,Bx,yl,ET,TT,OT,RT,Vx,Jp,Ie,Ar,PT,DT,_e,Kx,Gx,Yx,Xx,Zx,Ux,bi,zx,wi,Qp,th,bl,eh,nh,Si,Tr,Wt,_l,IT,rh,oh,xl,sh,ih,ah,ch,lh,fh,uh,hn=V(()=>{"use strict";ii();It();Co();gi();ci();vr();Mx="production",Er=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ut=(t,e,n,r)=>{if(O(t))return e?typeof t.call!="function"?t:t.call(e,e,n||e.state,r||e.context):void 0;if(t!=null&&e?.context?.plugins&&(R(t)||v(t)&&!Zt(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ut(i,e,n,r)}}return t},Xp=(t,e,n)=>{for(let r in e)t[r]=ut(e[r],n)},bt=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(Er(o)||(r?n.has(o):n.includes(o))||t[o]===void 0&&(t[o]=e[o]));return t},ot=(t,e,n=yi)=>Hx(t,e,n,null),Hx=(t,e,n,r)=>{if(t===e)return t;if(r){for(let s=0;s<r.length;s+=2)if(r[s]===t&&r[s+1]===e)return t}let o=n instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||Er(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],a=e[s];if(j(i)&&j(a)){let c=r||[];c.push(t,e),Hx(i,a,n,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Zp=(t,e=[])=>{let n=e instanceof Set,r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(Er(o)||(n?e.has(o):e.includes(o))||(r[o]=t[o]));return r},it=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!j(t)||Zt(t))return t;if(s.has(t))return s.get(t);let a=n instanceof Set?n:n.length>3?new Set(n):null,c=u=>a?a.has(u):n.includes(u),l=R(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||Er(h)||h==="__proto__"||c(h))continue;let p=u[h];if(!(r&&p===void 0)&&!(o&&p===null)){if(Zt(p)){d[h]=p;continue}if(i&&h==="extends"&&R(p)){d[h]=fi(p,n);continue}if(O(p)){d[h]=p;continue}if(j(p))if(s.has(p))d[h]=s.get(p);else{let g=R(p)?[]:{};s.set(p,g),d[h]=g,f.push([p,g])}else d[h]=p}}}return l},_i=(t,e={})=>{(t.node||t.__ref||t.parent||t.__element||t.parse)&&((t.__element||t.parent?.__element).warn("Trying to clone element or state at",t),t=t.parse?.());for(let n in t){let r=t[n];if(O(r))e[n]=r.toString();else if(v(r))e[n]={},_i(r,e[n]);else if(R(r)){let o=e[n]=[];for(let s=0;s<r.length;s++){let i=r[s];v(i)?(o[s]={},_i(i,o[s])):O(i)?o[s]=i.toString():o[s]=i}}else e[n]=r}return e},pT=/^[A-Za-z_$][A-Za-z0-9_$]*$/,hT=t=>`'${String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,Fx=t=>{let e=String(t);return hi(e,[`
1
+ "use strict";var VA=Object.create;var nl=Object.defineProperty;var UA=Object.getOwnPropertyDescriptor;var zA=Object.getOwnPropertyNames;var HA=Object.getPrototypeOf,WA=Object.prototype.hasOwnProperty;var V=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var op=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},$=(t,e)=>{for(var n in e)nl(t,n,{get:e[n],enumerable:!0})},Cx=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of zA(e))!WA.call(t,o)&&o!==n&&nl(t,o,{get:()=>e[o],enumerable:!(r=UA(e,o))||r.enumerable});return t};var qA=(t,e,n)=>(n=t!=null?VA(HA(t)):{},Cx(e||!t||!t.__esModule?nl(n,"default",{value:t,enumerable:!0}):n,t)),KA=t=>Cx(nl({},"__esModule",{value:!0}),t);var kp,vp,C,nt,ii=V(()=>{"use strict";kp=globalThis,vp=globalThis,C=globalThis,nt=C.document});var pn,ai,Zt,ci=V(()=>{"use strict";ii();pn=t=>(typeof Node=="object"?t instanceof C.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,ai=t=>(typeof HTMLElement=="object"?t instanceof C.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Zt=t=>typeof C<"u"&&(C.Node&&t instanceof C.Node||C.Window&&t instanceof C.Window||t===C||nt!==void 0&&t===nt)});var v,k,Ge,O,pl,hl,R,gl,j,Rt,Dt,li,Jt,Cp,Lt=V(()=>{"use strict";ci();v=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,k=t=>typeof t=="string",Ge=t=>typeof t=="number",O=t=>typeof t=="function",pl=t=>t===!0||t===!1,hl=t=>t===null,R=t=>Array.isArray(t),gl=t=>t instanceof Date,j=t=>t===null?!1:typeof t=="object",Rt=t=>t!==void 0,Dt=t=>t===void 0,li={boolean:pl,array:R,object:v,string:k,date:gl,number:Ge,null:hl,function:O,objectLike:j,node:pn,htmlElement:ai,defined:Rt},Jt=t=>(...e)=>e.some(n=>li[n](t)),Cp=t=>(...e)=>!e.some(n=>li[n](t))});var Ep,Ap,Tp,Op,ko,fi,Rp,Pp,ui,Dp,Lp,Ip,$p,Mp,Fp,Np,vo,di,Co=V(()=>{"use strict";hn();Lt();Ep=(t,e)=>e.every(n=>t.includes(n)),Ap=(t,e)=>{let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n},Tp=(t,e)=>{if(k(e)&&(e=parseInt(e)),Ge(e)){if(e<0||e>=t.length||isNaN(e))throw new Error("Invalid index");t.splice(e,1)}else throw new Error("Invalid index");return t},Op=(t,e,n)=>{e<0||n<0||e>=t.length||n>=t.length||([t[e],t[n]]=[t[n],t[e]])},ko=(...t)=>[].concat(...t),fi=(t,e=[])=>t.reduce((n,r)=>ot(n,it(r,{exclude:e}),e),{}),Rp=(t,e)=>{let n=t.indexOf(e);return n!==-1?t.slice(0,n):t},Pp=(t,e)=>{if(!R(t))return;let n=t.indexOf(e);return n!==-1?t.slice(n+1):t},ui=(t,e)=>{let n=t.indexOf(e);if(n>-1){let r=[...t];return r.splice(n,1),r}return t},Dp=(t,e)=>t.filter(n=>n!==e),Lp=(t,e)=>{let n=[];for(let r=0;r<t.length;r++)n.push(t[r]),r<t.length-1&&n.push(e);return n},Ip=(t,e,n)=>{let r=[...t],o=r.indexOf(e),s=r.indexOf(n);if(o!==-1&&s!==-1){let i=r.splice(o,1)[0],a=s<o?s:s+1;r.splice(a,0,i)}return r},$p=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},Mp=(t,e)=>t.filter(n=>!e.includes(n)),Fp=(t,e)=>{let n=new Set(e);return t.filter(r=>!n.has(r))},Np=(t,e)=>{if(!t)return 0;let n=0;for(let r=0;r<e.length;r++)t.includes(e[r])&&n++;return n},vo=t=>R(t)?[...new Set(t)]:t,di=(t,e)=>{for(let n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!1,configurable:!0,writable:!0})}});function Mt(t,e,n={}){let{bracketsLength:r=2,authored:o=!1}=n,s=r===3?"{{{":"{{";if(!t.includes(s)||o!==!0&&!uT(this,t))return t;let i=fT[r],a=e||this.state||{},c=this;return t.replace(i,(l,f,u,d)=>{let h=u.trim();if(d){let p=c?.context,g=p?.functions?.[d]||p?.utils?.[d]||p?.methods?.[d]||p?.snippets?.[d]||c?.[d];if(g&&typeof g=="function")try{return String(g.call(c,h)??"")}catch{return""}return""}if(f){let p=(f.match(/\.\.\//g)||[]).length,g=a;for(let y=0;y<p;y++){if(!g||!g.parent)return"";g=g.parent}if(h==="parent")return String(g.value??"");let m=pi(g,h);return m!=null&&typeof m=="object"?"":String(m??"")}else{let p=pi(a,h);if(p!=null&&typeof p!="object")return String(p);let g=c?.context?.polyglot;if(g?.translations){let m=a?.root?.lang||a?.lang||c?.context?.state?.lang||g.defaultLang||"en",y=g.translations[m];if(y){let b=pi(y,h);if(b!=null&&typeof b!="object")return String(b);for(let _ in y){let w=y[_];if(w&&typeof w=="object"&&!Array.isArray(w)){let S=pi(w,h);if(S!=null&&typeof S!="object")return String(S)}}}let x=pi(g.translations,h);if(x!=null&&typeof x!="object")return String(x)}return""}})}var hi,jp,fT,pi,uT,wr,Bp,dT,Vp,Up,zp,pT,Hp,Wp,gi=V(()=>{"use strict";hi=(t,e)=>{for(let n of e)if(t.includes(n))return!0;return!1},jp=(t,e)=>{let n=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(n,"")},fT={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},pi=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),uT=(t,e)=>{if(!t||!t.__ref)return!0;let n=t;for(;n;){if(n.allowRuntimeTemplates===!0)return!0;let r=n.__ref&&n.__ref.__authoredTemplates;if(r&&r.has(e))return!0;n=n.parent}return!1};wr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Bp=(t,e)=>{let n=t.split(`
2
+ `),r=-1,o=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<n.length;f++)if(a.test(n[f])&&!l){if(l=!0,r=f+1,s=n[f].indexOf(e)+1,n[f].includes("{}")){o=r,i=n[f].indexOf("{}")+3;break}let u=n[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=f+1,i=n[f].length+1;break}}else if(l&&(c+=(n[f].match(/{/g)||[]).length,c+=(n[f].match(/\[/g)||[]).length,c-=(n[f].match(/}/g)||[]).length,c-=(n[f].match(/]/g)||[]).length,c===0)){o=f+1,i=n[f].lastIndexOf("}")!==-1?n[f].lastIndexOf("}")+2:n[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:r,endLineNumber:o}},dT=/\\([0-7]{1,3})/g,Vp=t=>t.replace(dT,(e,n)=>String.fromCharCode(parseInt(n,8))),Up=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),zp=t=>t.replace(/\/\/\/\/\/n/g,`
3
+ `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),pT=/[^a-zA-Z0-9\s]/g,Hp=t=>t.replace(pT,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Wp=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var Fn,mi,qp,Sr,Nn,jn,Kp,Eo,kr,yi,Gp,vr=V(()=>{"use strict";Fn=new Set(["attr","style","text","html","content","data","classlist","state","scope","root","deps","extend","extends","$router","routes","children","childExtend","childExtends","childExtendRecursive","childExtendsRecursive","props","if","define","__name","__ref","__hash","__text","key","tag","query","parent","node","variables","on","fetch","component","context","preventContentUpdate","preventContentRecreate"]),mi=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),qp=["ref","parent","__element","__depends","__ref","__children","root"],Sr=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),Nn=new Set(["update","__element"]),jn=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),Kp=t=>jn.has(t),Eo=new Set(["log","warn","error","verbose"]),kr=t=>jn.has(t)&&!Eo.has(t),yi=new Set(["node","context","extends","__element","__ref",...jn,...Sr,...Nn]),Gp=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});function TT(){let t=Cr.get(this);return t?t.src.trim():Function.prototype.toString.call(this)}var Fx,Er,ut,Xp,bt,ot,Wx,Zp,it,_i,hT,gT,Nx,xi,mT,yT,bT,Le,qx,_T,ml,Kx,Yp,Cr,xT,wT,ST,kT,vT,jx,CT,Bx,ET,Vx,yl,AT,OT,RT,PT,Ux,Jp,Ie,Ar,DT,LT,_e,Gx,Yx,Xx,Zx,Jx,zx,bi,Hx,wi,Qp,th,bl,eh,nh,Si,Tr,Wt,_l,IT,rh,oh,xl,sh,ih,ah,ch,lh,fh,uh,hn=V(()=>{"use strict";ii();Lt();Co();gi();ci();vr();Fx="production",Er=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ut=(t,e,n,r)=>{if(O(t))return e?typeof t.call!="function"?t:t.call(e,e,n||e.state,r||e.context):void 0;if(t!=null&&e?.context?.plugins&&(R(t)||v(t)&&!Zt(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ut(i,e,n,r)}}return t},Xp=(t,e,n)=>{for(let r in e)t[r]=ut(e[r],n)},bt=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(Er(o)||(r?n.has(o):n.includes(o))||t[o]===void 0&&(t[o]=e[o]));return t},ot=(t,e,n=yi)=>Wx(t,e,n,null),Wx=(t,e,n,r)=>{if(t===e)return t;if(r){for(let s=0;s<r.length;s+=2)if(r[s]===t&&r[s+1]===e)return t}let o=n instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||Er(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],a=e[s];if(j(i)&&j(a)){let c=r||[];c.push(t,e),Wx(i,a,n,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Zp=(t,e=[])=>{let n=e instanceof Set,r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(Er(o)||(n?e.has(o):e.includes(o))||(r[o]=t[o]));return r},it=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!j(t)||Zt(t))return t;if(s.has(t))return s.get(t);let a=n instanceof Set?n:n.length>3?new Set(n):null,c=u=>a?a.has(u):n.includes(u),l=R(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||Er(h)||h==="__proto__"||c(h))continue;let p=u[h];if(!(r&&p===void 0)&&!(o&&p===null)){if(Zt(p)){d[h]=p;continue}if(i&&h==="extends"&&R(p)){d[h]=fi(p,n);continue}if(O(p)){d[h]=p;continue}if(j(p))if(s.has(p))d[h]=s.get(p);else{let g=R(p)?[]:{};s.set(p,g),d[h]=g,f.push([p,g])}else d[h]=p}}}return l},_i=(t,e={})=>{(t.node||t.__ref||t.parent||t.__element||t.parse)&&((t.__element||t.parent?.__element).warn("Trying to clone element or state at",t),t=t.parse?.());for(let n in t){let r=t[n];if(O(r))e[n]=r.toString();else if(v(r))e[n]={},_i(r,e[n]);else if(R(r)){let o=e[n]=[];for(let s=0;s<r.length;s++){let i=r[s];v(i)?(o[s]={},_i(i,o[s])):O(i)?o[s]=i.toString():o[s]=i}}else e[n]=r}return e},hT=/^[A-Za-z_$][A-Za-z0-9_$]*$/,gT=t=>`'${String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,Nx=t=>{let e=String(t);return hi(e,[`
4
4
  `,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},xi=(t={},e=0)=>{if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let n=!1;for(let s in t){n=!0;break}if(!n)return"{}";let r=" ".repeat(e),o=`{
5
- `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=pT.test(s)?s:hT(s);if(o+=`${r} ${a}: `,i instanceof RegExp)o+=String(i);else if(R(i)){o+=`[
5
+ `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=hT.test(s)?s:gT(s);if(o+=`${r} ${a}: `,i instanceof RegExp)o+=String(i);else if(R(i)){o+=`[
6
6
  `;for(let c of i)c instanceof RegExp?o+=`${r} ${String(c)},
7
7
  `:j(c)&&c!==null?o+=`${r} ${xi(c,e+2)},
8
- `:S(c)?o+=`${r} ${Fx(c)},
8
+ `:k(c)?o+=`${r} ${Nx(c)},
9
9
  `:o+=`${r} ${c},
10
- `;o+=`${r} ]`}else j(i)?o+=xi(i,e+1):S(i)?o+=Fx(i):o+=i;o+=`,
11
- `}return o+=`${r}}`,o},gT=[/^\(\s*\{[^}]*\}\s*\)\s*=>/,/^(\([^)]*\)|[^=]*)\s*=>/,/^function[\s(]/,/^async\s+/,/^\(\s*function/,/^[a-zA-Z_$][a-zA-Z0-9_$]*\s*=>/,/^(?:\*\s*)?[a-zA-Z_$][\w$]*\s*\((?:[^()]|\([^()]*\))*\)\s*\{[\s\S]*\}$/],mT=/^["[{]/,yT=/^(export|import)\s/,Ge=t=>{if(!t)return!1;let e=t.trim();if(e===""||e==="{}"||e==="[]")return!1;let n=e.includes("=>");if(!n&&e.charCodeAt(0)!==40&&!e.startsWith("function")&&!e.startsWith("async")&&!(e.charCodeAt(e.length-1)===125&&e.includes("("))||yT.test(e)||!gT.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0);return!(o===123&&!n||o===91||mT.test(e)&&!n)},Wx=t=>(0,eval)(t),bT=(t,e)=>{let n=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!n)return null;let r=n[0].length,o=[],s=r,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
10
+ `;o+=`${r} ]`}else j(i)?o+=xi(i,e+1):k(i)?o+=Nx(i):o+=i;o+=`,
11
+ `}return o+=`${r}}`,o},mT=[/^\(\s*\{[^}]*\}\s*\)\s*=>/,/^(\([^)]*\)|[^=]*)\s*=>/,/^function[\s(]/,/^async\s+/,/^\(\s*function/,/^[a-zA-Z_$][a-zA-Z0-9_$]*\s*=>/,/^(?:\*\s*)?[a-zA-Z_$][\w$]*\s*\((?:[^()]|\([^()]*\))*\)\s*\{[\s\S]*\}$/],yT=/^["[{]/,bT=/^(export|import)\s/,Le=t=>{if(!t)return!1;let e=t.trim();if(e===""||e==="{}"||e==="[]")return!1;let n=e.includes("=>");if(!n&&e.charCodeAt(0)!==40&&!e.startsWith("function")&&!e.startsWith("async")&&!(e.charCodeAt(e.length-1)===125&&e.includes("("))||bT.test(e)||!mT.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0);return!(o===123&&!n||o===91||yT.test(e)&&!n)},qx=t=>(0,eval)(t),_T=(t,e)=>{let n=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!n)return null;let r=n[0].length,o=[],s=r,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
12
12
  `,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let h=1;for(;s<c&&h>0;)t[s]==="{"?h++:t[s]==="}"&&h--,s++;continue}s++}continue}if(u==="{"){i++,s++;continue}if(u==="}"){i--,s++;continue}if(i===1&&l.test(t.slice(s))){let d=s,h=0,p=s;for(;p<c;){let g=t[p];if(g==='"'||g==="'"||g==="`"){let m=g;for(p++;p<c;){if(t[p]==="\\"){p+=2;continue}if(t[p]===m){p++;break}p++}continue}if(g==="("||g==="["||g==="{"){h++,p++;continue}if(g===")"||g==="]"||g==="}"){if(h===0)break;h--,p++;continue}if(h===0&&(g===";"||g===`
13
- `)){p++;break}p++}o.push([d,p]),s=p;continue}s++}if(!o.length)return null;let f=t;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},ml=(t,e,n,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return n.window.eval(`(${t})`)}catch(s){let i=s&&s.message?s.message:String(s),a=/await is only valid in async/.test(i),c=/Identifier '([^']+)' has already been declared/.exec(i),l=null;if(a){let f=String(t).trim();if(/^function[\s(]/.test(f))try{l=n.window.eval("(async "+f+")")}catch{}}else if(c){let f=String(t),u=c[1];for(let d=0;d<5;d++){let h=bT(f,u);if(!h||h===f)break;f=h;try{l=n.window.eval("("+f+")");break}catch(p){let g=/Identifier '([^']+)' has already been declared/.exec(p&&p.message||String(p));if(!g||g[1]!==u)break}}}if(!l&&/Unexpected (token '\{'|identifier)/.test(i))try{let f=n.window.eval("({"+t+"})");if(f&&typeof f=="object"){let u=Object.keys(f);u.length===1&&typeof f[u[0]]=="function"&&(l=f[u[0]])}}catch{}return l||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 `+(r?"revived lazily, so its source compiled on this first use; it acts as the string it replaces (a call returns the source text, el.call treats it as not callable). Reason: ":"value will be left as a string. Reason: ")+i+`.
14
- First 200 chars of source: `+String(t).slice(0,200)),t)}},qx=1,Yp=2,Cr=new WeakMap,_T=/^(async\s+)?function(?![\w$])\s*(\*)?\s*([A-Za-z_$][\w$]*)?\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,xT=/^(async\s+)?[A-Za-z_$][\w$]*\s*=>/,wT=/^(async\s*)?\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*=>/,ST=/^(async\s+)?([A-Za-z_$][\w$]*)\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,kT=new Set(["if","for","while","switch","catch","with","do","return","typeof","void","delete","new","in","of","instanceof","function","class","const","let","var","await","yield","import","export","try","else","throw","case","default","break","continue","debugger","finally","super","this","null","true","false","async","get","set","static"]),Nx=t=>t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===36||t===95,vT=(t,e,n)=>{let r=t.indexOf(e,n);for(;r!==-1;){let o=r+e.length;if((r===0||!Nx(t.charCodeAt(r-1)))&&(o>=t.length||!Nx(t.charCodeAt(o))))return!0;r=t.indexOf(e,o)}return!1},jx=t=>{let e=t.length-1;for(;e>=0&&t.charCodeAt(e)<=32;)e--;return e<0?-1:t.charCodeAt(e)},CT=t=>{let e=t,n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;n&&(e=e.slice(n));let r=_T.exec(e);if(r){if(r[2]||jx(e)!==125)return null;let o=r[3]||"";return o&&vT(e,o,r[0].indexOf("("))||e.indexOf("arguments.callee")!==-1?null:{src:t,name:o,kind:r[1]?Yp:qx,async:!!r[1],fn:void 0}}return r=xT.exec(e)||wT.exec(e),r?{src:t,name:"",kind:Yp,async:!!r[1],fn:void 0}:(r=ST.exec(e),r&&!kT.has(r[2])&&jx(e)===125?e.indexOf("arguments.callee")!==-1?null:{src:t,name:r[2],kind:Yp,async:!!r[1],fn:void 0}:null)},Bx=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,yl=t=>{let e=ml(t.src,Bx(t),t.opts,!0),n=null;return typeof e=="function"?n=e:(t.value=e,typeof e!="string"&&typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: ${Bx(t)} did not evaluate to a function \u2014 the lazily revived function returns that value.
15
- First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n},ET=(t,e,n)=>Reflect.construct(t,e,n);TT={length:{get(){let t=Cr.get(this);if(!t)return 0;let e=t.fn===void 0?yl(t):t.fn;return e?e.length:0},configurable:!0},name:{get(){let t=Cr.get(this);return t?t.name:""},configurable:!0},toString:{value:AT,writable:!0,configurable:!0}},OT=Object.getPrototypeOf(async function(){}),RT=t=>{let e;return t.kind===qx?e=function(){let n=t.fn===void 0?yl(t):t.fn;return n===null?t.value:new.target?ET(n,arguments,new.target):n.apply(this,arguments)}:e={lazy(){let n=t.fn===void 0?yl(t):t.fn;return n===null?t.value:n.apply(this,arguments)}}.lazy,Cr.set(e,t),Object.defineProperties(e,TT),t.async&&Object.setPrototypeOf(e,OT),e},Vx=(t,e,n,r)=>{let o=CT(t);return o?(o.key=e,o.index=n,o.opts=r,RT(o)):ml(t,n===-1?`"${e}"`:`array index ${n} (prop "${e}")`,r)},Jp=t=>typeof t=="function"&&Cr.has(t),Ie=t=>{let e=Cr.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},Ar=t=>{let e=typeof t=="function"?Cr.get(t):void 0;return e?(e.fn===void 0?yl(e):e.fn)===null:!1},PT=new Set(["components","pages","functions","methods","snippets","app","globalScope"]),DT={window:{eval:Wx}},_e=(t,e={},n=DT)=>{if(!t||typeof t!="object")return e;(!n||!n.window||typeof n.window.eval!="function")&&(n={...n,window:{eval:Wx}});let r=n.lazy===!0,o=n.lazy==="context",s=(a,c,l)=>r||o&&(a===t?PT.has(c):l),i=[[t,e,r]];for(;i.length;){let[a,c,l]=i.pop();for(let f in a){if(!Object.prototype.hasOwnProperty.call(a,f))continue;let u=a[f];if(S(u))Ge(u)?c[f]=l?Vx(u,f,-1,n):ml(u,`"${f}"`,n):c[f]=u;else if(R(u)){let d=c[f]=[],h=s(a,f,l);for(let p=0;p<u.length;p++){let g=u[p];if(S(g))d.push(Ge(g)?h?Vx(g,f,p,n):ml(g,`array index ${p} (prop "${f}")`,n):g);else if(v(g)){let m=zx(g);if(m)d.push(m);else{let y={};d.push(y),i.push([g,y,h])}}else d.push(g)}}else if(v(u)){let d=zx(u);if(d){c[f]=d;continue}let h=c[f]&&typeof c[f]=="object"&&!R(c[f])?c[f]:c[f]={};i.push([u,h,s(a,f,l)])}else c[f]=u}}return e},Kx="Set",Gx="Map",Yx="RegExp",Xx="WeakMap",Zx="WeakSet",Ux=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},bi=(t,e)=>{if(!t||typeof t!="object")return t;let n=s=>bi(s,e||(e=new WeakMap));if(t.__type===Kx&&R(t.values))return new Set(t.values.map(n));if(t.__type===Gx&&R(t.entries))return new Map(t.entries.map(s=>R(s)?[n(s[0]),n(s[1])]:s));if(t.__type===Xx&&Ux(t))return new WeakMap;if(t.__type===Zx&&Ux(t))return new WeakSet;if(t.__type===Yx&&S(t.source))try{return new RegExp(t.source,S(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let r=!1;if(R(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=bi(t[i],e),s[i]!==t[i]&&(r=!0);return r||e.set(t,t),r?s:t}let o={};e.set(t,o);for(let s of Object.keys(t))o[s]=bi(t[s],e),o[s]!==t[s]&&(r=!0);return r||e.set(t,t),r?o:t},zx=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==Yx&&e!==Kx&&e!==Gx&&e!==Xx&&e!==Zx)return null;let n=bi(t);return n===t?null:n},wi=t=>{if(!t||typeof t!="object")return t;let e={},n=[];for(let i of Object.keys(t)){let a=t[i];S(a)&&Ge(a)?n.push([i,a]):e[i]=bi(a)}if(n.length===0)return e;let r=i=>/^[A-Za-z_$][\w$]*$/.test(i),o=n.filter(([i])=>r(i)),s=Object.keys(e).filter(r).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
13
+ `)){p++;break}p++}o.push([d,p]),s=p;continue}s++}if(!o.length)return null;let f=t;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},ml=(t,e,n,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return n.window.eval(`(${t})`)}catch(s){let i=s&&s.message?s.message:String(s),a=/await is only valid in async/.test(i),c=/Identifier '([^']+)' has already been declared/.exec(i),l=null;if(a){let f=String(t).trim();if(/^function[\s(]/.test(f))try{l=n.window.eval("(async "+f+")")}catch{}}else if(c){let f=String(t),u=c[1];for(let d=0;d<5;d++){let h=_T(f,u);if(!h||h===f)break;f=h;try{l=n.window.eval("("+f+")");break}catch(p){let g=/Identifier '([^']+)' has already been declared/.exec(p&&p.message||String(p));if(!g||g[1]!==u)break}}}if(!l&&/Unexpected (token '\{'|identifier)/.test(i))try{let f=n.window.eval("({"+t+"})");if(f&&typeof f=="object"){let u=Object.keys(f);u.length===1&&typeof f[u[0]]=="function"&&(l=f[u[0]])}}catch{}return l||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 `+(r?"revived lazily, so its source compiled on this first use; it acts as the string it replaces (a call returns the source text, el.call treats it as not callable). Reason: ":"value will be left as a string. Reason: ")+i+`.
14
+ First 200 chars of source: `+String(t).slice(0,200)),t)}},Kx=1,Yp=2,Cr=new WeakMap,xT=/^(async\s+)?function(?![\w$])\s*(\*)?\s*([A-Za-z_$][\w$]*)?\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,wT=/^(async\s+)?[A-Za-z_$][\w$]*\s*=>/,ST=/^(async\s*)?\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*=>/,kT=/^(async\s+)?([A-Za-z_$][\w$]*)\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,vT=new Set(["if","for","while","switch","catch","with","do","return","typeof","void","delete","new","in","of","instanceof","function","class","const","let","var","await","yield","import","export","try","else","throw","case","default","break","continue","debugger","finally","super","this","null","true","false","async","get","set","static"]),jx=t=>t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===36||t===95,CT=(t,e,n)=>{let r=t.indexOf(e,n);for(;r!==-1;){let o=r+e.length;if((r===0||!jx(t.charCodeAt(r-1)))&&(o>=t.length||!jx(t.charCodeAt(o))))return!0;r=t.indexOf(e,o)}return!1},Bx=t=>{let e=t.length-1;for(;e>=0&&t.charCodeAt(e)<=32;)e--;return e<0?-1:t.charCodeAt(e)},ET=t=>{let e=t,n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;n&&(e=e.slice(n));let r=xT.exec(e);if(r){if(r[2]||Bx(e)!==125)return null;let o=r[3]||"";return o&&CT(e,o,r[0].indexOf("("))||e.indexOf("arguments.callee")!==-1?null:{src:t,name:o,kind:r[1]?Yp:Kx,async:!!r[1],fn:void 0}}return r=wT.exec(e)||ST.exec(e),r?{src:t,name:"",kind:Yp,async:!!r[1],fn:void 0}:(r=kT.exec(e),r&&!vT.has(r[2])&&Bx(e)===125?e.indexOf("arguments.callee")!==-1?null:{src:t,name:r[2],kind:Yp,async:!!r[1],fn:void 0}:null)},Vx=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,yl=t=>{let e=ml(t.src,Vx(t),t.opts,!0),n=null;return typeof e=="function"?n=e:(t.value=e,typeof e!="string"&&typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: ${Vx(t)} did not evaluate to a function \u2014 the lazily revived function returns that value.
15
+ First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n},AT=(t,e,n)=>Reflect.construct(t,e,n);OT={length:{get(){let t=Cr.get(this);if(!t)return 0;let e=t.fn===void 0?yl(t):t.fn;return e?e.length:0},configurable:!0},name:{get(){let t=Cr.get(this);return t?t.name:""},configurable:!0},toString:{value:TT,writable:!0,configurable:!0}},RT=Object.getPrototypeOf(async function(){}),PT=t=>{let e;return t.kind===Kx?e=function(){let n=t.fn===void 0?yl(t):t.fn;return n===null?t.value:new.target?AT(n,arguments,new.target):n.apply(this,arguments)}:e={lazy(){let n=t.fn===void 0?yl(t):t.fn;return n===null?t.value:n.apply(this,arguments)}}.lazy,Cr.set(e,t),Object.defineProperties(e,OT),t.async&&Object.setPrototypeOf(e,RT),e},Ux=(t,e,n,r)=>{let o=ET(t);return o?(o.key=e,o.index=n,o.opts=r,PT(o)):ml(t,n===-1?`"${e}"`:`array index ${n} (prop "${e}")`,r)},Jp=t=>typeof t=="function"&&Cr.has(t),Ie=t=>{let e=Cr.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},Ar=t=>{let e=typeof t=="function"?Cr.get(t):void 0;return e?(e.fn===void 0?yl(e):e.fn)===null:!1},DT=new Set(["components","pages","functions","methods","snippets","app","globalScope"]),LT={window:{eval:qx}},_e=(t,e={},n=LT)=>{if(!t||typeof t!="object")return e;(!n||!n.window||typeof n.window.eval!="function")&&(n={...n,window:{eval:qx}});let r=n.lazy===!0,o=n.lazy==="context",s=(a,c,l)=>r||o&&(a===t?DT.has(c):l),i=[[t,e,r]];for(;i.length;){let[a,c,l]=i.pop();for(let f in a){if(!Object.prototype.hasOwnProperty.call(a,f))continue;let u=a[f];if(k(u))Le(u)?c[f]=l?Ux(u,f,-1,n):ml(u,`"${f}"`,n):c[f]=u;else if(R(u)){let d=c[f]=[],h=s(a,f,l);for(let p=0;p<u.length;p++){let g=u[p];if(k(g))d.push(Le(g)?h?Ux(g,f,p,n):ml(g,`array index ${p} (prop "${f}")`,n):g);else if(v(g)){let m=Hx(g);if(m)d.push(m);else{let y={};d.push(y),i.push([g,y,h])}}else d.push(g)}}else if(v(u)){let d=Hx(u);if(d){c[f]=d;continue}let h=c[f]&&typeof c[f]=="object"&&!R(c[f])?c[f]:c[f]={};i.push([u,h,s(a,f,l)])}else c[f]=u}}return e},Gx="Set",Yx="Map",Xx="RegExp",Zx="WeakMap",Jx="WeakSet",zx=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},bi=(t,e)=>{if(!t||typeof t!="object")return t;let n=s=>bi(s,e||(e=new WeakMap));if(t.__type===Gx&&R(t.values))return new Set(t.values.map(n));if(t.__type===Yx&&R(t.entries))return new Map(t.entries.map(s=>R(s)?[n(s[0]),n(s[1])]:s));if(t.__type===Zx&&zx(t))return new WeakMap;if(t.__type===Jx&&zx(t))return new WeakSet;if(t.__type===Xx&&k(t.source))try{return new RegExp(t.source,k(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let r=!1;if(R(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=bi(t[i],e),s[i]!==t[i]&&(r=!0);return r||e.set(t,t),r?s:t}let o={};e.set(t,o);for(let s of Object.keys(t))o[s]=bi(t[s],e),o[s]!==t[s]&&(r=!0);return r||e.set(t,t),r?o:t},Hx=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==Xx&&e!==Gx&&e!==Yx&&e!==Zx&&e!==Jx)return null;let n=bi(t);return n===t?null:n},wi=t=>{if(!t||typeof t!="object")return t;let e={},n=[];for(let i of Object.keys(t)){let a=t[i];k(a)&&Le(a)?n.push([i,a]):e[i]=bi(a)}if(n.length===0)return e;let r=i=>/^[A-Za-z_$][\w$]*$/.test(i),o=n.filter(([i])=>r(i)),s=Object.keys(e).filter(r).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
16
16
  `);try{let i=o.map(([l,f])=>`var ${l} = (${f});`).join(`
17
17
  `),a="{ "+o.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=C.eval(`(function(__gs__) { ${s}
18
18
  ${i}
19
19
  return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of o)try{let l=Object.keys(e).filter(r).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
20
20
  `);e[a]=C.eval(`(function(__gs__) { ${l}
21
- return (${c}); })`)(e)}catch{try{e[a]=C.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of n)if(!r(i))try{e[i]=C.eval(`(${a})`)}catch{e[i]=a}return e},Qp=(t,e={verbose:!0})=>{try{return t?C.eval("("+t+")"):{}}catch(n){e.verbose&&console.warn(n)}},th=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),bl=t=>{for(let e in t)return!1;return!0},eh=t=>v(t)&&bl(t),nh=()=>Object.create(null),Si=(t,e,n={})=>{let r=n.exclude||[],o=n.preventUnderscore;for(let s in e)r.includes(s)||!o&&Er(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},Tr=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Er(o)||o==="constructor"||o==="prototype"||(r?n.has(o):n.includes(o))||(t[o]=e[o]);return t},Wt=(t,e,n={},r=new WeakMap)=>{if(!j(t)||!j(e)||Zt(t)||Zt(e))return e;if(r.has(t))return r.get(t);r.set(t,t);let o=n.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!n.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&Er(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Zt(l)?t[a]=l:j(c)&&j(l)?t[a]=Wt(c,l,n,r):l!==void 0&&(t[a]=l)}return t},_l=(t,e,n=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s=0;s<r.length;s++){let i=r[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!_l(t[i],e[i],n))return!1}return!0},IT=new Set(["node","__ref"]),rh=(t,e,n=IT)=>{if(t===e)return!0;if(!j(t)||!j(e)||Zt(t)||Zt(e))return t===e;let r=n instanceof Set?n:new Set(n),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||r.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Zt(l)||Zt(f)){if(l!==f)return!1}else if(j(l)&&j(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},oh=(t,e)=>{if(e==null)return t;if(Jt(e)("string","number"))delete t[e];else if(R(e))for(let n=0;n<e.length;n++)delete t[e[n]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},xl=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=xl(t[n]));return e},sh=(t,e)=>{if(t.length===0)return e;let n={},r=n;for(let o=0;o<t.length;o++)o===t.length-1&&e?r[t[o]]=e:(r[t[o]]={},r=r[t[o]]);return n},ih=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++){if(n[e[o]]===void 0)return;n=n[e[o]]}let r=e[e.length-1];n&&Object.prototype.hasOwnProperty.call(n,r)&&delete n[r]},ah=(t,e,n)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++)(!r[e[o]]||typeof r[e[o]]!="object")&&(r[e[o]]={}),r=r[e[o]];return r[e[e.length-1]]=n,t},ch=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let r=0;r<e.length;r++){if(n==null)return;n=n[e[r]]}return n},lh=t=>{let n=[],r=0;for(let o=0;o<t.length;o++)if(n.length<2)n.push(t[o]);else if(t[o]===n[o%2]?r++:(n=[t[o-1],t[o]],r=1),r>=20)return(Mx==="test"||Mx==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",n),!0},fh=t=>{let e=new WeakSet;function n(r){if(r&&typeof r=="object"){if(e.has(r))return!0;e.add(r);for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&n(r[o]))return console.log(r,"cycle at "+o),!0}return!1}return n(t)},uh=(t,e)=>{let n=e instanceof Set?e:new Set(e),r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!n.has(o)&&(r[o]=t[o]);return r}});var ki,vi,Ci,wl=V(()=>{"use strict";hn();ki=(function(){let t=0;function e(){return t++,t}return e})(),vi=ki,Ci=(t,e,n)=>(ut(n,t)||n||t.key||ki()).toString()});var Le,dh,Bn,Sl,ph,hh,gh,Vn,mh,Or,ht,kl=V(()=>{"use strict";Le="production",dh=Le,Bn=(t=Le)=>t==="production",Sl=(t=Le)=>t==="testing"||t==="test",ph=Sl,hh=(t=Le)=>t==="staging",gh=(t=Le)=>t==="local",Vn=(t=Le)=>t==="development"||t==="dev"||t==="local",mh=(t,e=Le)=>e[t],Or=(t=Le)=>!Bn(t),ht=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let n=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof n=="string"&&n?n==="localhost"||n==="127.0.0.1"||n.endsWith(".localhost"):!1}});function Ei(t,e,n){let r;return function(){let o=this,s=arguments,i=function(){r=null,n||t.apply(o,s)},a=n&&!r;clearTimeout(r),r=setTimeout(i,e),a&&t.apply(o,s)}}function _h(t,e=window){let n=function(){return t.apply(e,arguments)};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var yh,bh,LT,Ai,Ao,To,Pt,Rr=V(()=>{"use strict";yh=(t,e,n=300)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(t,o)},n)}},bh=t=>{let e={};return(...n)=>{let r=n[0];if(r in e)return e[r];{let o=t(r);return e[r]=o,o}}},LT=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,Ai=t=>LT.test(t),Ao=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let n of e)if(n.resolveHandler)return!0;return!1},To=(t,e)=>{if(typeof t=="function")return t;let n=e?.context?.plugins;if(!n)return t;for(let r of n)if(r.resolveHandler){let o=r.resolveHandler(t,e);if(typeof o=="function")return o}return t},Pt=(t,e,...n)=>{let r=e?.context?.plugins;if(!r)return!1;let o=!1;for(let s of r)typeof s[t]=="function"&&(s[t](e,...n),o=!0);return o}});var xh,Jx=V(()=>{"use strict";It();hn();xh=(t,e)=>{let{__ref:n}=t,r=t.if;if(O(r)){let o;try{o=r(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete n.__if;return}o?n.__if=!0:delete n.__if}else r!=null&&typeof r=="object"?ut(r,t)?n.__if=!0:delete n.__if:n.__if=!0}});var wh,Sh,Qx=V(()=>{"use strict";wh=(t,...e)=>{t&&e.map(n=>console.log(n))},Sh=(t,e,...n)=>{t&&(console.group(e),n.map(r=>console.log(r)),console.groupEnd(e))}});function Ah(t){let e;try{if(!window.localStorage)return;e=window.localStorage.getItem(t)}catch{return}if(e!==null)try{return JSON.parse(e)}catch{return}}function Th(t,e){if(e!=null)try{if(!window.localStorage)return;let n=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,n)}catch{}}var kh,vh,Ch,Eh,tw=V(()=>{"use strict";It();ii();kh=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),vh=(t,e,n=365)=>{if(Dt(nt)||Dt(nt.cookie))return;let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let o=`expires=${r.toUTCString()}`;nt.cookie=`${t}=${e};${o};path=/`},Ch=t=>{if(Dt(nt)||Dt(nt.cookie))return;let e=`${t}=`,r=decodeURIComponent(nt.cookie).split(";");for(let o=0;o<r.length;o++){let s=r[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Eh=t=>{Dt(nt)||Dt(nt.cookie)||(nt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Oo,ew,Oh,Rh=V(()=>{"use strict";Oo={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},ew=new Set(["svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"]),Oh=t=>Oo.body.has(t)});var Ph,nw,Ro,xe,Po,Ri,Ye,Dh,vl,Pi,Ih,Di,Cl,El,Ii,Al,Do,$T,Xe,rw,Ti,Li,Lh,Oi,$h,Mh,Tl,Ol,Rl,Pl,Dl,Il,ow,Ll=V(()=>{"use strict";Co();Fh();hn();It();Ph="production",nw=t=>t.sourcemap!==!1&&Ph!=="production",Ro=t=>{if(!t)return[];let e=[],n=t.extends;n&&(R(n)?e.push(...n):e.push(n));let r=t.extend;return r&&(R(r)?e.push(...r):e.push(r)),e},xe=t=>{if(!R(t))return t;let e=[];for(let n=t.length-1;n>=0;n--){let r=t[n];e.push(R(r)?xe(r):r)}return e},Po=t=>{if(t.includes("+"))return t.split("+").filter(Ze);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Ze(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Ri=(t,e,n)=>{let r=[],o=Po(n);o&&(r=[...o]);let s=xe(Ro(t));return s.length&&(r=[...r,...s]),r},Ye=(t,e)=>{let{__ref:n}=e,{__extends:r}=n;if(!t)return r;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return r.includes(t)||(r=Array.isArray(t)?[...r,...t]:[...r,t],n.__extends=r),r},Dh=(t,e)=>{if(!t)return e;let{extends:n}=e,r=R(n)?n:[n],o=R(t)?t:[t];return{...e,extends:ko(o,r)}},vl=()=>Math.random().toString(36).substring(2),Pi={},Ih={},Di=t=>Pi[t.__hash],Cl=(t,e)=>{let n=vl();return S(t)||(t.__hash=n),n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(Pi[n]=e),e},El=(t,e)=>t.__hash?e.concat(Di(t)):Cl(t,e),Ii=(t,e,n,r=new Set,o,s)=>{for(let i of t)R(i)?Ii(i,e,n,r,o,s):Do(i,e,n,r,o,void 0,s);return e},Al=(t,e,n,r=new Set,o,s,i)=>{let a=Ro(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&Do(xe(a),e,n,r,o,s,i),e},Do=(t,e,n,r=new Set,o,s,i)=>{if(!t||r.has(t))return e;if(R(t))return Ii(t,e,n,r,o,i);let a=s;return S(t)?(a=t,t=Li(t,n)):i&&v(t)&&i.has(t)&&(a=i.get(t)),r.has(t)||(r.add(t),t?.extends||t?.extend?Al(t,e,n,r,o,a,i):t&&(e.push(t),o&&o.push(a))),e},$T=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),Xe=(t,e,n,r,o)=>{e=it(e);for(let s in e){if($T.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,n&&r?v(a)&&!R(a)?(n[s]=n[s]||{},rw(n[s],a,r)):n[s]=r:n&&o?.[s]&&(n[s]=o[s]);else if(v(i)&&v(a)){let c=n?n[s]=n[s]||{}:void 0,l=o?.[s];Ze(s)?t[s]=Xe(i,a,c,r,l):Xe(i,a,c,r,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(R(i)&&R(a))t[s]=i.concat(a);else if(R(i)&&v(a)){let c=Xe({},i);t[s]=Xe(c,a)}}}}return t},rw=(t,e,n,r)=>{if(r||(r=new WeakSet),!r.has(e)){r.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];v(s)&&!R(s)?(t[o]=t[o]||{},rw(t[o],s,n,r)):t[o]=n}}},Ti=(t,e,n)=>t.reduce((r,o,s)=>{let i=it(o),a=n?n[s]:void 0;return Xe(r,i,e,a)},{}),Li=(t,e,n={},r)=>{let o=e?.components||n.components,s=e?.pages||n.pages;if(S(t)){let i=o&&(o[t+"."+r]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;n.verbose&&(Ph==="test"||Ph==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Lh=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Oi=(t,e,n,r)=>{if(!t)return[];if(t.__hash)return Di(t)||[];let s=Do(t,[],e,new Set,n,void 0,r);return n?s:El(t,s)},$h=(t,e)=>{if(!t)return e;let n=R(t)?t:[t];return ko(n,e)},Mh=t=>{let e=[];function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(Ze(o)&&e.push(o),o==="extends"&&(typeof r[o]=="string"?e.push(r[o]):Array.isArray(r[o])&&(e=e.concat(r[o]))),typeof r[o]=="object"&&r[o]!==null&&n(r[o]))}return n(t),e},Tl=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=Ro(t);if(i.length){let a=xe(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?Ye([f,...l],t):Ye(a,t)}return Ol(t,e,n),Rl(t,e,n),Pl(t,e,n),t.component&&Ye(xe(ut(t.component,t)),t),o.defaultExtends&&Ye(xe(o.defaultExtends),t),vo(r.__extends)},Ol=(t,e,n={})=>{let{__ref:r}=t;return n.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Ye(xe(e.childProps.extends),t),r.__extends},Rl=(t,e,n={})=>{let{__ref:r}=t,o=n.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&Ye(xe(s),t),r.__extends},Pl=(t,e,n={})=>{let{__ref:r}=t,o=e.childExtendsRecursive,s=n.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&Ye(xe(o),t),r.__extends},Dl=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=nw(n),a=i?[...r.__extends]:null,c=vo(r.__extends.map((l,f)=>Li(l,o,n,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let h=c[d],p=a[d];h&&v(h)&&S(p)&&l.set(h,p)}let f=[],u=Oi(c,o,f,l);r.__extendsStack=u,r.__extendsNames=f}else{let l=Oi(c,o);r.__extendsStack=l}return r.__extendsStack},Il=(t,e,n={})=>{let{__ref:r}=t,{__extendsStack:o}=r;if(nw(n)){let s={},i=r.__extendsNames||[],a=Ti(o,s,i),c={};Xe(t,a,c,void 0,s),r.__sourcemap=c}else{let s=Ti(o);Xe(t,s)}return t},ow=(t,e,n={})=>(Tl(t,e,n),Dl(t,e,n),Il(t,e,n),t)});function Nh(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function jh(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Bh(t,e,n){let{context:r}=e||{},[o]=Po(n),s=n||o;return r?.components?.[s]||r?.pages?.[s]}var Ze,Fh=V(()=>{"use strict";Ll();It();Ze=t=>{if(!S(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function sw(t,e){let{props:n,on:r}=e,o=wr(t.split("on")[1]),s=r[o],i=n[t];O(s)?r[o]=(...a)=>{if(s(...a)!==!1&&O(i))return i(...a)}:r[o]=i}var iw=V(()=>{"use strict";gi();It()});function $l(t,e={}){let n=e.cachedKeys||[];for(let r in t){let o=t[r];if(r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r[2]===r[2].toUpperCase()&&(O(o)||o!=null&&Ao(this.context))){let p=wr(r.slice(2));t.on&&(t.on[p]=o),delete t[r];continue}if(r==="childProps"){t.props[r]=o,delete t[r],n.push(r);continue}let a=this.define?.[r],c=this.context?.define?.[r],l=v(a)||O(a),f=v(c)||O(c);if(l||f)continue;let u=r.charAt(0);if(cw.has(u)){t.props[r]=o,delete t[r],n.push(r);continue}let d=Vh.test(r)||aw.test(r)||FT(o),h=Fn.has(r);!d&&!h&&(r in t.props||(t.props[r]=o),delete t[r],n.push(r))}return t}function Ml(t=this,e){let n=e.cachedKeys||[];for(let r in t.props){let o=t.props[r],s=r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110,i=O(o)||o!=null&&Ao(this.context);if(s&&i){sw(r,t),delete t.props[r];continue}if(n.includes(r)||r==="childProps")continue;let a=r.charAt(0);if(cw.has(a))continue;let c=this.define?.[r],l=this.context?.define?.[r],f=v(c)||O(c),u=v(l)||O(l),d=Vh.test(r)||aw.test(r),h=Fn.has(r);(d||h||f||u)&&(t[r]===void 0||o===null)&&(t[r]=o,t.props&&delete t.props[r])}return t}function Fl(t=this){let e=[];return $l.call(this,t,{cachedKeys:e}),Ml.call(this,t,{cachedKeys:e}),t}function Uh(t={}){return t.on||(t.on={}),t.props||(t.props={}),Fl.call(this,t)}function Hh(t,e){this.__element.update({props:t},e)}function ji(t){let e={update:Hh.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Vh,aw,cw,MT,FT,Fi,$i,zh,Ni,Bi,Vi,Nl,Mi,Wh,qh,Kh=V(()=>{"use strict";vr();iw();hn();It();gi();Rr();Vh=/^[A-Z]/,aw=/^\d+$/,cw=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),MT=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),FT=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(MT.has(e)||Vh.test(e))return!0;return!1},Fi=(t,e,n)=>{let{props:r,__ref:o}=t;if(o.__propsStack=[],r)o.__initialProps=r;else return{};return j(r)?{...r}:(o.__propsStack.push(r),{})};$i=t=>Jt(t)("string","number")?{inheritedString:t}:t,zh=(t,e)=>!t||!e.length?!1:e.includes(t),Ni=(t,e)=>{let{__ref:n}=t,r=n.__propsStack||[],o=e.props;if(!o)return r;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=$i(i);r.unshift(c)}if(s){let c=$i(s);r.unshift(c)}return r};Bi=t=>{let e=new Set;return t.filter(n=>!n||Nn.has(n)||e.has(n)?!1:(e.add(n),!0))},Vi=(t,e,n)=>(e.props=t.reduce((r,o)=>{if(Nn.has(o))return r;for(;O(o);)o=ut(o,e);return ot(r,it(o,{exclude:Nn}))},{}),ji(e),e.props),Nl=(t,e)=>{let{props:n,__ref:r}=t,o=r.__propsStack||[];if(e?.props&&(o=[...Ni(t,e)]),v(n)?o.push(n):n==="inherit"&&e?.props?o.push(e.props):n&&o.push(n),R(r.__extendsStack))for(let s=0;s<r.__extendsStack.length;s++){let i=r.__extendsStack[s];i.props&&i.props!==n&&o.push(i.props)}return r.__propsStack=Bi(o),r.__propsStack},Mi=(t,e)=>{let{__ref:n}=t,r=Nl(t,e);r.length?Vi(r,t):(n.__propsStack=[],t.props={})},Wh=function(t,e,n){let{__ref:r}=t;if(r.__if)Mi(t,e);else try{Mi(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",r.path?.join("."),o),t.props={},r.__propsStack=[]}return ji(t),t},qh=(t,e,n)=>{let{__ref:r}=e,s=[...r.__propsStack||[]],i=Ni(e,n);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),r.__propsStack=Bi(s),r.__propsStack.length&&Vi(r.__propsStack,e),e}});var lw,jl,Bl,Vl,Ul,Gh,zl,Hl,Wl,Yh,fw=V(()=>{"use strict";Ll();wl();ci();Kh();Rh();It();lw="production",jl=(t,e,n)=>{let r=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=Oo.body.has(n)&&n;return{text:t,tag:r||o||s||"string"}},Bl=(t,e,n)=>{if(t===void 0)return(lw==="test"||lw==="development")&&console.warn(n,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Jt(t)("string","number")?jl(t,e,n):O(t)?{props:t}:t},Vl=(t,e)=>{let n={};return n.origin=t,n.parent=e,n},Ul=(t,e,n,r,o)=>{if(!e)return o;if(pn(e)){let s={key:":root",node:e};return o[`${n}_parent`]=s,s}return e},Gh=(t,e)=>{let{__ref:n}=t,{__ref:r}=e,o=e&&e.key===":root";n?.root||(n.root=o?t:r?.root)},zl=(t,e,n)=>{let{__ref:r}=e;return r||(r=e.ref={}),r.path||(r.path=[]),r.path.concat(n)},Hl=(t,e,n,r,o)=>(r.context&&!o.context&&!t.context&&(o.context=r.context),r.context||e.context||o.context||t.context),Wl=(t,e,n)=>{let r=Vl(t,e);return t.__ref=r,r.__defineCache||(r.__defineCache={}),r.__exec||(r.__exec={}),r.__execProps||(r.__execProps={}),r.__class||(r.__class={}),r.__classNames||(r.__classNames={}),r.__attr||(r.__attr={}),r.__changes||(r.__changes=[]),r.__children||(r.__children=[]),r.__extends=Ri(t,e,n),r.path=zl(t,e,n),r},Yh=(t,e,n,r,o)=>{let i=t?.__hash?{extends:[t]}:Bl(t,e,n);if(!i)return;let a=Ul(i,e,n,r,o),c=Ci(i,a,n);Wl(i,a,c);let l=Fi(i,a,c),f=Hl(i,a,c,r,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Xh,ql,Kl,Gl,Yl,Zh,Xl,Jh,Qh,tg,eg,uw,Io,Pr,dw,pw,hw,Ui,Je,gw=V(()=>{"use strict";Co();vr();hn();It();Xh=t=>{let{state:e,props:n,__ref:r}=t,o=n?.state||e;return Jt(o)("string","number")?(r.__state=o,{value:o}):o===!0?(r.__state=t.key,{}):o?(r.__hasRootState=!0,o):!1},ql=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Kl=(t,e)=>{if(!t.includes("../"))return;let r=t.split("../").length-1;for(let o=0;o<r;o++){if(!e.parent)return null;e=e.parent}return e},Gl=(t,e,n={})=>{let r=S(t)?t.split("/"):[t],o=r.length-1;for(let s=0;s<o;s++){let i=r[s],a=r[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return n.returnParent?e:e[t]},Yl=(t,e,n={})=>{let o=t.__ref.__state;if(!Xl(t))return;let s=ql(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=Kl(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return Gl(o,i,n)},Zh=(t,e)=>{let n=t.__ref,r=Yl(t,e);if(r===void 0)return t.state;if(Jt(r)("object","array"))return it(r);if(Jt(r)("string","number","boolean"))return n.__stateType=typeof r,{value:r};console.warn(n.__state,"is not present. Replacing with",{})},Xl=t=>{let{__ref:e}=t,n=e?.__state;return!!(n&&Jt(n)("number","string","boolean"))},Jh=function(t){return j(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},Qh=(t,e)=>{if(!t)return e||{};let n=t.split("/"),r={},o=r,s=n.length-1;for(let i=0;i<=s;i++)o[n[i]]=i===s?e||{}:{},o=o[n[i]];return r},tg=(t,e)=>{let{__element:n}=e,r=n?.state;if(!r)return;let o=it(r,Sr),s={[t.key]:o},i=v(r.__depends)?{...r.__depends,...s}:s;return Array.isArray(r)?di(r,{...Object.getPrototypeOf(r),__depends:i}):Object.setPrototypeOf(r,{...Object.getPrototypeOf(r),__depends:i}),o},eg=(t,e,n={})=>{let{overwrite:r}=n;if(!r)return;let o=r==="shallow";if(r==="merge"){ot(t,e,Sr);return}(o?Tr:Wt)(t,e,Sr)},uw="__polyglotSeededKeys",Io=t=>{if(!v(t))return new Set;let e=t[uw];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,uw,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Pr=(t,e,n)=>Io(t).has(e)?!0:!v(n)||n[e]===void 0,dw="__polyglotSeededValues",pw=t=>{if(!v(t))return new Map;let e=t[dw];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,dw,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},hw=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},Ui=(t,e,n)=>{if(!Io(t).has(e))return!1;let r=pw(t);if(!r.has(e))return!0;let o=v(n)||Array.isArray(n)?n[e]:void 0,s=hw(o);return s!==null&&s===r.get(e)},Je=(t,e,...n)=>(Io(t).add(e),n.length&&pw(t).set(e,hw(n[0])),e)});var NT,ng,mw=V(()=>{"use strict";NT=(t,e)=>{let n=e;for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1},ng=(t,e)=>{let{__ref:n}=t,r=t.context||e.context||n.root?.context;r&&!r.globalScope&&(r.globalScope={});let o=e.scope||n.root?.scope,s=r?.globalScope;if(!t.scope)o?t.scope=o:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=o||s;i&&!NT(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var yw,Zl,gn,Jl,rg,og=V(()=>{"use strict";It();Rr();yw=(t,e)=>{let n="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[n]},Zl=(t,e,n,r,o)=>{if(t=To(t,e),!!O(t))try{let s=t.call(e,e,n||e.state,r||e.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},gn=(t,e,n)=>{if(!e)throw new Error("Element is required");Pt(t,e,n);let r=yw(t,e);if(r){let{state:o,context:s}=e;return Zl(r,e,o,s,n)}},Jl=(t,e,n,r,o,s)=>{if(t=To(t,n),!!O(t))try{let i=t.call(n,e,n,r||n.state,o||n.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{n.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(n.error=i,console.error("[DOMQL] Event update error:",i),n.context?.strictMode)throw i}},rg=(t,e,n,r)=>{Pt(t,n,e,r);let o=yw(t,n);if(o){let{state:s,context:i}=n;return Jl(o,e,n,s,i,r)}}});var sg,zi,ig=V(()=>{"use strict";sg={},zi={}});var Sw={};$(Sw,{restAdapter:()=>ww,setup:()=>GT});var jT,xw,bw,BT,VT,UT,_w,mn,zT,HT,WT,ag,qT,KT,GT,ww,kw=V(()=>{"use strict";jT=(t,e,n)=>{let r=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${r}${e}`);if(n)for(let s in n){let i=n[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},xw=t=>Object.prototype.toString.call(t).slice(8,-1),bw=["auto","json","text","blob","arrayBuffer","stream","response"],BT={json:async t=>{let e=await t.text();return e?JSON.parse(e):null},text:t=>t.text(),blob:t=>t.blob(),arrayBuffer:t=>t.arrayBuffer(),stream:t=>t.body,response:t=>t},VT=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},UT=async t=>{let e=await t.text(),n=t.headers.get("content-type");if(e&&n&&n.includes("json"))try{return JSON.parse(e)}catch{}return e},_w=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,mn=async(t,e,n)=>{let r=n??"auto";if(!bw.includes(r))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${r}" \u2014 use one of: ${bw.join(", ")}`);let o=await globalThis.fetch(t,e);if(r==="auto"){let s=await VT(o);return{data:s,error:o.ok?null:_w(s,o),status:o.status}}if(!o.ok){let s=await UT(r==="response"?o.clone():o);return{data:r==="response"?o:s,error:_w(s,o),status:o.status}}return{data:await BT[r](o),error:null,status:o.status}},zT=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],HT=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||zT.includes(xw(t))),WT=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),ag=(...t)=>{let e={},n=new Map;for(let r of t)if(r)for(let[o,s]of WT(r)){let i=o.toLowerCase();if(n.has(i)&&delete e[n.get(i)],s==null){n.delete(i);continue}n.set(i,o),e[o]=s}return e},qT={"Content-Type":"application/json"},KT={"Content-Type":void 0},GT=async({url:t,headers:e,auth:n,fetchOptions:r})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return ww(t,e,n,r)},ww=(t,e={},n,r={})=>{let o=n?.token||null,s=()=>o?{Authorization:`Bearer ${o}`}:null,i=u=>ag(e,s(),u),a=u=>({...r,...u}),c=(u,d,h)=>{if(!HT(d))return a({method:u,headers:ag(e,s(),qT,h),body:JSON.stringify(d)});let p={method:u,headers:ag(e,s(),KT,h),body:d};return xw(d)==="ReadableStream"&&(p.duplex="half"),a(p)},l=(u,d)=>{let h=d||t;if(u&&(u.startsWith("http://")||u.startsWith("https://")))return u;let p=u&&!u.startsWith("/")?"/":"";return`${h}${p}${u||""}`};return{name:"rest",setToken:u=>{o=u},getSession:async()=>{if(!n?.sessionUrl)return o?{token:o}:null;let u=await mn(l(n.sessionUrl,n.baseUrl),a({headers:i()}));return u.error?null:u.data},signIn:async u=>{if(!n?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let d=await mn(l(n.signInUrl,n.baseUrl),c("POST",u));return d.data?.token&&(o=d.data.token),d},signOut:async()=>(n?.signOutUrl&&await mn(l(n.signOutUrl,n.baseUrl),a({method:"POST",headers:i()})),o=null,{error:null}),select:({from:u,params:d,select:h,limit:p,offset:g,order:m,single:y,headers:x,baseUrl:b,responseType:_})=>{let w={...d};return h&&(w.select=h),p&&(w.limit=p),g&&(w.offset=g),y&&(w.single=!0),m&&(typeof m=="string"?w.order=m:Array.isArray(m)?w.order=m.map(k=>`${k.by}:${k.asc===!1?"desc":"asc"}`).join(","):m.by&&(w.order=`${m.by}:${m.asc===!1?"desc":"asc"}`)),mn(jT(b||t,u||"",w),a({headers:i(x)}),_)},rpc:({from:u,params:d,headers:h,baseUrl:p,responseType:g})=>mn(l(`rpc/${u}`,p),c("POST",d,h),g),insert:({from:u,data:d,headers:h,baseUrl:p,responseType:g})=>mn(l(u,p),c("POST",d,h),g),update:({from:u,data:d,params:h,method:p,headers:g,baseUrl:m,responseType:y})=>{let x=h?.id||d?.id,b=x?`${u}/${x}`:u;return mn(l(b,m),c(p||"PATCH",d,g),y)},upsert:({from:u,data:d,params:h,method:p,headers:g,baseUrl:m,responseType:y})=>{let x=h?.id||d?.id,b=x?`${u}/${x}`:u;return mn(l(b,m),c(p||"PUT",d,g),y)},delete:({from:u,params:d,headers:h,baseUrl:p,responseType:g})=>{let m=d?.id,y=m?`${u}/${m}`:u;return mn(l(y,p),a({method:"DELETE",headers:i(h)}),g)}}}});var Cw={};$(Cw,{localAdapter:()=>vw,setup:()=>XT});var Ql,YT,XT,vw,Ew=V(()=>{"use strict";Ql=(t,e)=>{if(!e)return!0;for(let n in e){let r=e[n];if(r===null){if(t[n]!==null&&t[n]!==void 0)return!1}else if(Array.isArray(r)){if(!r.includes(t[n]))return!1}else if(typeof r=="object"){for(let o in r)if(o==="gt"&&!(t[n]>r[o])||o==="gte"&&!(t[n]>=r[o])||o==="lt"&&!(t[n]<r[o])||o==="lte"&&!(t[n]<=r[o])||o==="neq"&&t[n]===r[o]||o==="like"&&!String(t[n]).includes(r[o]))return!1}else if(t[n]!==r)return!1}return!0},YT=(t,{order:e,limit:n,offset:r,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return r&&(s=s.slice(r)),n&&(s=s.slice(0,n)),o?{data:s[0]||null,error:null}:{data:s,error:null}},XT=async({data:t,...e})=>vw(t,e),vw=(t={},e={})=>{let n={},r={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!n[f])if(o)try{let u=localStorage.getItem(s+f);n[f]=u?JSON.parse(u):t[f]||[]}catch{n[f]=t[f]||[]}else n[f]=t[f]||[];return n[f]},a=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(n[f]))}catch{}},c=(f,u,d,h)=>{let p=r[f];if(p)for(let g of p)g(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:n,select:async({from:f,params:u,...d})=>{let p=i(f).filter(g=>Ql(g,u));return YT(p,d)},insert:async({from:f,data:u})=>{let d=i(f),p=(Array.isArray(u)?u:[u]).map(g=>{let m={id:g.id||++l,...g};return d.push(m),m});a(f);for(let g of p)c(f,"INSERT",g,null);return{data:Array.isArray(u)?p:p[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),p=[];for(let g=0;g<h.length;g++)if(Ql(h[g],d)){let m={...h[g]};Object.assign(h[g],u),p.push(h[g]),c(f,"UPDATE",h[g],m)}return a(f),{data:p,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),p=Array.isArray(u)?u:[u],g=[];for(let m of p){let y=d||(m.id!==void 0?{id:m.id}:null),x=y?h.findIndex(b=>Ql(b,y)):-1;if(x>-1){let b={...h[x]};Object.assign(h[x],m),g.push(h[x]),c(f,"UPDATE",h[x],b)}else{let b={id:m.id||++l,...m};h.push(b),g.push(b),c(f,"INSERT",b,null)}}return a(f),{data:Array.isArray(u)?g:g[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let p=d.length-1;p>=0;p--)Ql(d[p],u)&&(h.push(d[p]),d.splice(p,1),c(f,"DELETE",null,h[h.length-1]));return a(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{r[f]||(r[f]=[]);let h=(p,g,m)=>{u&&u!=="*"&&u!==m.event||d(p,g,m)};return r[f].push(h),()=>{let p=r[f].indexOf(h);p>-1&&r[f].splice(p,1)}}}}});var af={};$(af,{createAdapter:()=>nO,default:()=>pO,executeFetch:()=>Xi,fetchPlugin:()=>mg,initAdapterAuth:()=>of,parseDuration:()=>Wi,queryClient:()=>dO,registerAdapter:()=>eO,resolveDb:()=>Rw});var ZT,JT,tf,Hi,ef,fg,QT,tO,eO,nO,Rw,Wi,qt,Pw,Lo,rO,Yi,qi,Ki,nf,pg,rf,oO,Aw,cg,Dw,Iw,$o,Tw,sO,Ow,iO,sf,ug,Lw,of,hg,we,$e,Gi,gg,aO,dg,Dr,Qe,Un,cO,lO,fO,lg,uO,Xi,dO,mg,pO,Zi=V(()=>{"use strict";D();ZT=["select","rpc","insert","update","upsert","delete","subscribe"],JT={rest:()=>Promise.resolve().then(()=>(kw(),Sw)),local:()=>Promise.resolve().then(()=>(Ew(),Cw))},tf=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Hi=(()=>{if(typeof globalThis<"u"&&globalThis[tf])return globalThis[tf];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,tf,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[tf]}catch{}return t})(),ef=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),fg=(()=>{if(typeof globalThis<"u"&&globalThis[ef])return globalThis[ef];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,ef,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[ef]}catch{}return t})(),QT=5e3,tO=t=>new Promise(e=>{if(Hi[t])return e(Hi[t]);let n=fg[t]||=[],r=!1,o=()=>{r||(r=!0,e(Hi[t]||null))};n.push(o),setTimeout(o,QT)}),eO=(t,e)=>{Hi[t]=e;let n=fg[t];if(n&&n.length){fg[t]=[];for(let r of n)r()}},nO=t=>{let e={};for(let n of ZT)t[n]&&(e[n]=t[n]);return e.name=t.name||"custom",e},Rw=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...n}=t,r=typeof e=="string"?e:typeof t=="string"?t:null;if(!r)return null;let o=Hi[r]||JT[r];if(!o&&(o=await tO(r),!o))throw new Error(`Unknown db adapter: "${r}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${r}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(n)},Wi=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let n=parseInt(e[1]),r=e[2];return r==="ms"?n:r==="s"?n*1e3:r==="m"?n*6e4:r==="h"?n*36e5:0},qt=new Map,Pw=new Map,Lo=new Map,rO=(t,e,n)=>{if(t.cache?.key)return t.cache.key;let r=iO(t.params),o=n?`${n}:`:"",s=`${t.from}:${t.method}:${o}${JSON.stringify(r||"")}`;return e?`${s}:${e}`:s},Yi=t=>qt.get(t)||null,qi=(t,e,n)=>{let r=qt.get(t),o={data:e,error:n,time:Date.now(),stale:!1};qt.set(t,o);let s=Pw.get(t);if(s)for(let i of s)O(i)&&i(o);return o},Ki=t=>{if(t){let e=qt.get(t);e&&(e.stale=!0);return}for(let[,e]of qt)e.stale=!0},nf=t=>{if(t){qt.delete(t);return}qt.clear()},pg=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:S(t)?{staleTime:Wi(t),gcTime:3e5}:{staleTime:Wi(t.stale||t.staleTime)||6e4,gcTime:Wi(t.gc||t.gcTime||t.expire)||3e5,key:t.key},rf=null,oO=()=>{rf||(rf=setInterval(()=>{let t=Date.now();for(let[e,n]of qt){let r=Pw.get(e);!(r&&r.size>0)&&t-n.time>(n.gcTime||3e5)&&qt.delete(e)}},3e4),rf.unref&&rf.unref())};oO();Aw=3,cg=t=>Math.min(1e3*2**t,3e4),Dw=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:Aw,delay:cg}:typeof e=="number"?{count:e,delay:cg}:{count:e.count??Aw,delay:O(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:cg}},Iw=async(t,e)=>{let{count:n,delay:r}=e,o;for(let s=0;s<=n;s++)try{let i=await t();if(i?.error){if(o=i.error,s<n){let a=O(r)?r(s,o):r;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<n){let a=O(r)?r(s,i):r;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},$o={focus:new Set,online:new Set},Tw=!1,sO=()=>{if(Tw||typeof window>"u")return;Tw=!0;let t=()=>{for(let n of $o.focus)n()},e=()=>{for(let n of $o.online)n()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Ow=(t,e)=>{let n=e.__ref;if(t===!0)return{from:n.__state||e.key,method:"select",query:!0,on:"create"};if(S(t))return{from:t,method:"select",query:!0,on:"create"};if(v(t)){let r={...t};return r.from=r.from||n.__state||e.key,r.method=r.method||"select",r.on=r.on||"create",r.query===void 0&&(r.query=!0),r}return null},iO=t=>(!t||O(t),t),sf=(t,e)=>{let n=t?.state?.root||e?.state?.root;if(n?.lang)return n.lang},ug=(t,e)=>{let r=(t?.state?.root||e?.state?.root)?.__fetchScope;return r?String(r):void 0},Lw=(t,e,n)=>{let r;if(!t)r=void 0;else if(O(t))r=t(e,e.state);else{r={};for(let o in t){let s=t[o];r[o]=O(s)?s(e,e.state):s}}return r},of=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let n=(r,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:r,session:o,loading:!1}})};try{let r=await t.getSession();n(r?.user||null,r)}catch(r){console.warn("[fetch] Failed to restore auth session:",r.message)}t.onAuthStateChange&&t.onAuthStateChange((r,o)=>{n(o?.user||null,o)})},hg=async(t,e)=>{if(O(t.select))return t.auth!==!1&&await of(t,e),t;if(t.__resolved)return t.auth!==!1&&await of(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=Rw(t);let n=await t.__resolving;return delete t.__resolving,n?(n.auth=t.auth,n.url=t.url,n.key=t.key,t.__resolved=n,e.fetch=n,t.auth!==!1&&await of(n,e),n):null},we=(t,e,...n)=>{let r=O(t[e])?t[e]:null;r&&r.call(t,...n,t,t.state,t.context)},$e=(t,e,n,...r)=>{let o=t&&O(t[n])?t[n]:null;o&&o.call(e,...r,e,e.state,e.context)},Gi=t=>{let e={},n=t.node;if(!n)return e;if(n.tagName==="FORM"){let o=new FormData(n);for(let[s,i]of o.entries())e[s]=i;return e}let r=n.querySelectorAll("input, textarea, select");for(let o=0;o<r.length;o++){let s=r[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},gg=t=>t.responseType==="stream"||t.responseType==="response",aO=["Blob","File","ArrayBuffer","ReadableStream","Response"],dg=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||aO.includes(Object.prototype.toString.call(t).slice(8,-1))),Dr=(t,e,n,r={})=>{if(!n&&dg(e))return;let o=n&&n.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=n.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&!dg(e)&&i in e?s.update(e,{preventFetch:!0,...r}):s.update({[i]:e},{preventFetch:!0,...r})}else{let i=n?{[n]:e}:e;s.update(i,{preventFetch:!0,...r})}},Qe=(t,e)=>{let n=t?.__ref;n&&(n.__fetchStatus=e,n.__fetching=e.isFetching,n.__fetchError=e.error)},Un=async(t,e,n,r={})=>{let o=n?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=ug(e,n);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&ug(e,n)===i;if(t.enabled===!1||O(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||O(t.skip)&&t.skip(e,e.state))return;let l=await hg(o,n);if(!l||!c())return;let{from:f,method:u,query:d,params:h,cache:p,transform:g,single:m,auth:y,fields:x,as:b,limit:_,offset:w,order:k,headers:A,baseUrl:P,responseType:I,page:E,cursor:M,getNextPageParam:X,getPreviousPageParam:vt,infinite:Ct,placeholderData:at,initialData:N,select:H,keepPreviousData:mt}=t,B=S(H)?H:void 0;if(d&&O(e.getQuery)){let ft=e.getQuery(l.name||"paths");ft&&(B=ft.select||ft.length&&ft.join(",")||B)}let gt=Lw(h,e,n),F=gg(t)?null:pg(p),q=Dw(t),yt=sf(e,n),Z=yt?`:${yt}`:"",Y=i?`${i}:`:"",U=F?p?.key||`${f}:${u}:${Y}${JSON.stringify(gt||"")}${Ct?":infinite":""}${E?":p"+JSON.stringify(E):""}${Z}`:null;if(!s.__fetchInitialized&&U&&(s.__fetchInitialized=!0,N!==void 0)){let ft=O(N)?N():N;qi(U,ft,null)}if((u==="select"||u==="rpc")&&U&&F){let ft=Yi(U);if(ft&&!ft.error){let tt=Date.now()-ft.time,Et=ft.stale||tt>(F.staleTime||0),K=ft.data;if(O(H)&&(K=H(K,e,e.state)),g&&(K=g(K,e,e.state)),!c())return;if(Dr(e,K,b),!Et){Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(at!==void 0){let tt=O(at)?at(e,e.state):at;tt!==void 0&&Dr(e,tt,b)}}if(U&&Lo.has(U)&&!r.force){let ft=Lo.get(U);try{let tt=await Promise.race([ft,new Promise((Et,K)=>setTimeout(()=>K("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(tt?.data!==void 0){let Et=tt.data;if(O(H)&&(Et=H(Et,e,e.state)),g&&(Et=g(Et,e,e.state)),!c())return;Dr(e,Et,b),we(e,"onFetchComplete",Et),$e(t,e,"onFetchComplete",Et)}}catch{if(!c())return}return}let Ot=!Yi(U)?.data;Qe(e,{isFetching:!0,isLoading:Ot,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),we(e,"onFetchStart"),$e(t,e,"onFetchStart");let Bt=n?.analyze?.emitNetwork,mo=Bt?typeof performance<"u"?performance.now():Date.now():0;Bt&&Bt({phase:"start",mode:"query",from:f,method:u,cacheKey:U,lang:yt});let Qs=Iw(async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let K=await l.getSession();if(!c())return;if(y===!0&&!K){let zt={message:"Not authenticated"};return Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:zt,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",zt),$e(t,e,"onFetchError",zt),{data:null,error:zt}}}let ft=l[u];if(!O(ft))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let tt={from:f,select:B,params:gt,single:m,limit:_,offset:w,order:k,headers:A,baseUrl:P};I!==void 0&&(tt.responseType=I);let Et=sf(e,n);if(Et&&(tt.headers={...tt.headers,"Accept-Language":Et}),E!==void 0){if(v(E))E.offset!==void 0&&(tt.offset=E.offset),E.limit!==void 0&&(tt.limit=E.limit),E.cursor!==void 0&&(tt.params={...tt.params,cursor:E.cursor});else if(typeof E=="number"){let K=t.pageSize||_||20;tt.offset=(E-1)*K,tt.limit=K}}if(M!==void 0&&(tt.params={...tt.params,cursor:M}),u==="insert"||u==="update"||u==="upsert"){let K;if(x===!0||t.on==="submit")K=Gi(e);else if(R(x)){let zt=Gi(e);K={};for(let rp of x)K[rp]=zt[rp]}else e.state?.parse?K=e.state.parse():v(e.state)&&(K={...e.state});g&&(K=g(K,e,e.state)),tt.data=K}if(u==="rpc"){let K=gt;if(t.on==="submit"){let zt=Gi(e);K=t.transformParams?t.transformParams(zt,e,e.state):zt}tt.params=K}if(u==="subscribe"){let K=l.subscribe({from:f,params:gt,on:t.subscribeOn},(zt,rp,j$)=>{c()&&(Dr(e,zt,b),we(e,"onFetchComplete",zt),$e(t,e,"onFetchComplete",zt))});return c()?(s.__unsubscribe=K,{data:null,error:null,subscribed:!0}):(O(K)&&K(),{data:null,error:null,subscribed:!0})}return ft(tt)},q);U&&Lo.set(U,Qs);try{let ft=await Qs;if(!c()||ft?.subscribed)return;let{data:tt,error:Et}=ft||{};if(Et){U&&qi(U,null,Et),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Et,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",Et),$e(t,e,"onFetchError",Et),Bt&&Bt({phase:"error",mode:"query",from:f,method:u,cacheKey:U,error:Et.message||Et,durationMs:(typeof performance<"u"?performance.now():Date.now())-mo});return}if(tt!==void 0){if((u==="select"||u==="rpc")&&U){let zt=qi(U,tt,null);zt.gcTime=F?.gcTime||3e5}let K=tt;if(Ct&&R(tt)&&(s.__pages||(s.__pages=[]),r.direction==="previous"?s.__pages.unshift(tt):s.__pages.push(tt),K=s.__pages.flat(),X&&(s.__nextPageParam=X(tt,s.__pages),s.__hasNextPage=s.__nextPageParam!=null),vt&&(s.__prevPageParam=vt(tt,s.__pages),s.__hasPreviousPage=s.__prevPageParam!=null)),O(H)&&(K=H(K,e,e.state)),g&&(K=g(K,e,e.state)),!c())return;(!mt||K!==void 0)&&Dr(e,K,b),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),we(e,"onFetchComplete",K),$e(t,e,"onFetchComplete",K),Bt&&Bt({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:U,durationMs:(typeof performance<"u"?performance.now():Date.now())-mo})}}catch(ft){if(!c())return;Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ft,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",ft),$e(t,e,"onFetchError",ft),Bt&&Bt({phase:"error",mode:"query",from:f,method:u,cacheKey:U,error:ft.message||String(ft),durationMs:(typeof performance<"u"?performance.now():Date.now())-mo})}finally{U&&Lo.get(U)===Qs&&Lo.delete(U)}},cO=(t,e,n)=>{let r=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||Un;if(r==="submit"){let i=c=>{c.preventDefault(),s(t,e,n)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(r==="click"){let i=()=>s(t,e,n),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else r==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,n))},lO=(t,e,n)=>{let r=e.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),sO();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:Wi(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Un(t,e,n,{force:!0})},c);r.__fetchCleanups.push(()=>clearInterval(l))}}let s=gg(t),i=t.refetchOnWindowFocus===void 0?!s:t.refetchOnWindowFocus!==!1,a=t.refetchOnReconnect===void 0?!s:t.refetchOnReconnect!==!1;if(i){let c=()=>{let l=sf(e,n),f=ug(e,n),u=rO(t,l,f),d=Yi(u),h=pg(t.cache);(!d||d.stale||Date.now()-d.time>(h?.staleTime||0))&&Un(t,e,n,{force:!0})};$o.focus.add(c),r.__fetchCleanups.push(()=>$o.focus.delete(c))}if(a){let c=()=>Un(t,e,n,{force:!0});$o.online.add(c),r.__fetchCleanups.push(()=>$o.online.delete(c))}},fO=(t,e,n)=>{if(!e.optimistic)return null;let r=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():v(t.state)?{...t.state}:t.state;r.__optimisticSnapshot=s;let i=O(e.optimistic)?e.optimistic(n,s,t):e.optimistic;return i!==void 0&&Dr(t,i,o),s},lg=(t,e)=>{let n=t.__ref,r=n.__optimisticSnapshot;r!==void 0&&(Dr(t,r,e.as),delete n.__optimisticSnapshot)},uO=async(t,e,n)=>{let r=n?.fetch;if(!r)return;let o=await hg(r,n);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:p,responseType:g,invalidates:m,optimistic:y,onMutate:x,onSuccess:b,onError:_,onSettled:w}=t,k;if(c===!0||u==="submit")k=Gi(e);else if(R(c)){let E=Gi(e);k={};for(let M of c)k[M]=E[M]}else e.state?.parse?k=e.state.parse():v(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),O(x)&&x(k,e,e.state);let A=y?fO(e,t,k):null;s.__fetching=!0,Qe(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),we(e,"onFetchStart"),$e(t,e,"onFetchStart");let P=n?.analyze?.emitNetwork,I=P?typeof performance<"u"?performance.now():Date.now():0;P&&P({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let H=await o.getSession();if(d===!0&&!H){A!==void 0&&lg(e,t);let mt={message:"Not authenticated"};we(e,"onFetchError",mt),$e(t,e,"onFetchError",mt);return}}let E=o[i];if(!O(E))return;let M={from:a,data:k,headers:h,baseUrl:p};g!==void 0&&(M.responseType=g),t.params&&(M.params=Lw(t.params,e,n));let X=sf(e,n);X&&(M.headers={...M.headers,"Accept-Language":X});let vt=Dw(t),Ct=await Iw(()=>E(M),vt),{data:at,error:N}=Ct||{};if(N){A!==void 0&&lg(e,t),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:N,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",N),O(_)&&_(N,k,e),O(w)&&w(null,N,k,e),P&&P({phase:"error",mode:"mutation",from:a,method:i,error:N.message||String(N),durationMs:(typeof performance<"u"?performance.now():Date.now())-I});return}if(delete s.__optimisticSnapshot,at!==void 0&&(f||!dg(at))){let H=f?{[f]:at}:at;e.state?.update&&e.state.update(H,{preventFetch:!0})}if(Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),we(e,"onFetchComplete",at),$e(t,e,"onFetchComplete",at),O(b)&&b(at,k,e),O(w)&&w(at,null,k,e),P&&P({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-I}),m){let H=R(m)?m:[m];for(let mt of H)if(mt===!0||mt==="*")for(let[B]of qt)B.startsWith(a+":")&&Ki(B);else Ki(mt)}}catch(E){A!==void 0&&lg(e,t),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:E,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",E),$e(t,e,"onFetchError",E),O(_)&&_(E,k,e),O(w)&&w(null,E,k,e),P&&P({phase:"error",mode:"mutation",from:a,method:i,error:E.message||String(E),durationMs:(typeof performance<"u"?performance.now():Date.now())-I})}finally{s.__fetching=!1}},Xi=(t,e,n,r)=>{if(!t||!r?.fetch)return;let s=ut(t,e);if(!s)return;let i=R(s)?s.map(c=>Ow(ut(c,e),e)).filter(Boolean):[Ow(s,e)].filter(Boolean);for(let c of i){let l=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",f=l?uO:Un;c.on==="create"?f(c,e,r):Promise.resolve().then(()=>{cO({...c,__runner:f},e,r)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&lO(c,e,r)}let a=e.__ref;a.refetch=c=>{for(let l of i)Un(l,e,r,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};Un(f,e,r,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};Un(f,e,r,{direction:"previous",force:!0})}},dO={invalidateQueries:t=>{if(!t){Ki();return}if(S(t))for(let[e]of qt)(e.startsWith(t)||e.includes(t))&&Ki(e);else if(R(t)){let e=t.join(":");for(let[n]of qt)n.includes(e)&&Ki(n)}},removeQueries:t=>{if(!t){nf();return}if(S(t))for(let[e]of qt)(e.startsWith(t)||e.includes(t))&&nf(e)},getQueryData:t=>Yi(t)?.data??void 0,setQueryData:(t,e)=>{let n=Yi(t),r=O(e)?e(n?.data):e;qi(t,r,null)},prefetchQuery:async(t,e)=>{let n=e?.fetch;if(!n)return;let r=await hg(n,e);if(!r)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=r[t.method||"select"];if(!O(s))return;let i={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};t.responseType!==void 0&&(i.responseType=t.responseType);let a=await s(i);if(a?.data!==void 0&&!a?.error&&!gg(t)){let c=qi(o,a.data,null);c.gcTime=pg(t.cache)?.gcTime||3e5}return a},getCache:()=>qt,clear:()=>nf(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[n]of qt)n.match(/:([a-z]{2,3})$/i)&&(n.endsWith(e)||nf(n))}},mg={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Lo.clear(),Xi(e,t,t.state,t.context))}},pO=Xi});function Qi(t){let e=this,{__ref:n}=e,r=[].concat(t),o=n.root[r[0]];if(!r||!r.length)return console.log(r,"on",e.key,"is undefined");for(;o.key===r[0]&&(r.shift(),!!r.length);)if(o=o[r[0]],!o)return;return o}function bg(t){let e=this,{parent:n}=e;if(O(t))return n.state&&t(n,n.state,n.context)?n:n.parent?n.lookup(t):void 0;if(e[t])return e[t];for(;n.param!==t;){if(n[t])return n[t];if(n=n.parent,!n)return}return n}function _g(t){let e=this,{__ref:n}=e,r=n?.__children;if(r)for(let o=0;o<r.length;o++){let s=r[o],i=e[s];if(s===t)return i;if(O(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function xg(t,e=[]){let n=this,{__ref:r}=n,o=r?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=n[i];if(i===t)e.push(a);else if(O(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function ff(t={}){let e=this;if(e.node?.style){for(let n in t){let r=t[n],o=e[n];if(v(r)&&o)ff.call(o,r);else if(r!=null){let s=n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(r).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function Mw(t){let e=this;if(gn("beforeRemove",e,t)===!1)return e;O(e.node.remove)?e.node.remove():Bn()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=ui(e.parent.__ref.__children,e.key)),gn("remove",e,t)}function wg(t){return this[t]}function Sg(t,e){let n=this;if(t)return n.update(t,e),n}function kg(t){return t?this.__ref&&this.__ref[t]:this.__ref}function vg(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function ta(){return this.getRef().path}function na(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=$w();else if(n(this))e=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=O(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=$w()),t?e?.[t]:e}function ra(t){let e=this?.__ref?.root||this.getRootState()?.__element;if(!e)throw new Error(`[smbls] getRoot() could not resolve a root element for "${this?.key||"<unknown>"}" \u2014 it has no __ref (never went through create()) and no root state is registered. Answering undefined here used to no-op silently for every caller.`);return Object.keys(e).length>0&&t?e[t]:e}function oa(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function sa(t){let e=this.getRoot()?.context;return t?e[t]:e}function ia(t){let e=this.context;return t?e[t]:e}function uf(){let t=this,e=[];for(let n in t)!Object.prototype.hasOwnProperty.call(t,n)||Fn.has(n)&&!mi.has(n)||e.push(n);return e}function df(t=[]){let e=this,n={},r=uf.call(e),o=r.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<r.length;i++){let a=r[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=O(c&&c.parse)?c.parse():c;n[a]=O(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;n[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];n[a]=u}else Rt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=c)}return n}function Ji(t=[],e=new WeakSet){let n=this;if(e.has(n))return;e.add(n);let r=df.call(n,t),o=t.length?new Set(t):null;for(let s in r){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(n,s))continue;let i=r[s];Array.isArray(i)?r[s]=i.map(a=>j(a)?Ji.call(a,t,e):a):j(i)&&(r[s]=Ji.call(i,t,e))}return r}function Fo(...t){if(zn!=="test"&&zn!=="development")return;let e=this,{__ref:n}=e;return console.groupCollapsed(e.key),t.length?t.forEach(r=>console.log(`%c${r}:
22
- `,"font-weight: bold",e[r])):(console.log(n.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Eg(...t){(zn==="test"||zn==="development")&&console.log(...t)}function aa(...t){(zn==="test"||zn==="development")&&console.warn(...t)}function Ir(...t){if(zn==="test"||zn==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Fo.call(this),new Error(...t)}}function ca(){let t=this,{key:e,parent:n}=t,{__children:r}=n.__ref,o=r.indexOf(e),s=r[o+1];return n[s]}function la(t){let e=t||this,{key:n,parent:r}=e,{__children:o}=r.__ref;if(!o)return;let s=o.indexOf(n);return r[o[s-1]]}function fa(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let n=e.data.varCaches,r={},o;for(let s in t)t[s]!==n[s]&&(o=!0,r[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(r,it(n));for(let a in r)n[a]=r[a];return i},timeout:(s,i)=>{if(!o)return;let a=setTimeout(()=>{s(r),clearTimeout(a)},i)}}}function Ag(t,...e){let n=this.context,r=n.utils?.[t]||n.functions?.[t]||n.methods?.[t]||n.snippets?.[t];if(r&&!Ar(r))try{let o=r.call(this,...e);return o&&typeof o.then=="function"&&o.catch(s=>{Ir.call(this,s)}),o}catch(o){if(Ir.call(this,o),n?.strictMode)throw o}}async function ua(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:o}=await cf();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await cf();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let n=cf().then(({resolveDb:o})=>o(e));e.__resolving=n;let r=await n;if(e.__resolved=r,t.context.fetch=r,delete e.__resolving,r?.getSession){let{initAdapterAuth:o}=await cf();await o(r,t.context)}return r}function da(t){let e=this,n=t||zi.useStateQuery||e.context?.useStateQuery;if(!n)return null;let r={};if(yg(e,r),n===!0)return r;let o=wO[n];return o?o(r):r}function Tg(t,e){return!!(jn.has(t)||e?.context?.methods?.[t])}var zn,lf,ea,Mo,$w,Cg,hO,cf,yg,gO,Fw,mO,yO,bO,_O,xO,wO,Nw=V(()=>{"use strict";og();vr();It();hn();kl();Co();ig();zn="production";lf=null,ea=t=>{lf=t||null},Mo=(t,e)=>{t&&e&&lf===t&&(lf=e)},$w=()=>lf||null;Cg=(t,e,n,r)=>Object.defineProperty(t,e,{get:n,set:r});hO="[smbls] getDB needs @symbo.ls/fetch, which the smbls embed bundle does not include: add @symbo.ls/fetch to the page's importmap (the runtime import then resolves) or use the full smbls bundle.",cf=()=>Promise.resolve().then(()=>(Zi(),af)).catch(t=>{throw new Error(hO,{cause:t})});yg=(t,e)=>{let n=t.__ref;if(!n)return;let r=n.__state;r&&typeof r=="string"&&gO(e,r);let o=n.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&yg(c,e)}let s=n.contentElementKey||"content",i=t[s];i&&i.__ref&&yg(i,e)},gO=(t,e)=>{let r=e.replaceAll("../","").replaceAll("~/","").split("/"),o=t;for(let s=0;s<r.length;s++){let i=r[s];s===r.length-1?o[i]||(o[i]=!0):(o[i]===!0&&(o[i]={}),o[i]||(o[i]={}),o=o[i])}},Fw=(t,e=0)=>{let n=" ".repeat(e),r=Object.entries(t);return r.length?r.map(([s,i])=>i===!0?`${n}${s}`:`${n}${s} {
23
- ${Fw(i,e+1)}
21
+ return (${c}); })`)(e)}catch{try{e[a]=C.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of n)if(!r(i))try{e[i]=C.eval(`(${a})`)}catch{e[i]=a}return e},Qp=(t,e={verbose:!0})=>{try{return t?C.eval("("+t+")"):{}}catch(n){e.verbose&&console.warn(n)}},th=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),bl=t=>{for(let e in t)return!1;return!0},eh=t=>v(t)&&bl(t),nh=()=>Object.create(null),Si=(t,e,n={})=>{let r=n.exclude||[],o=n.preventUnderscore;for(let s in e)r.includes(s)||!o&&Er(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},Tr=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Er(o)||o==="constructor"||o==="prototype"||(r?n.has(o):n.includes(o))||(t[o]=e[o]);return t},Wt=(t,e,n={},r=new WeakMap)=>{if(!j(t)||!j(e)||Zt(t)||Zt(e))return e;if(r.has(t))return r.get(t);r.set(t,t);let o=n.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!n.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&Er(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Zt(l)?t[a]=l:j(c)&&j(l)?t[a]=Wt(c,l,n,r):l!==void 0&&(t[a]=l)}return t},_l=(t,e,n=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s=0;s<r.length;s++){let i=r[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!_l(t[i],e[i],n))return!1}return!0},IT=new Set(["node","__ref"]),rh=(t,e,n=IT)=>{if(t===e)return!0;if(!j(t)||!j(e)||Zt(t)||Zt(e))return t===e;let r=n instanceof Set?n:new Set(n),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||r.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Zt(l)||Zt(f)){if(l!==f)return!1}else if(j(l)&&j(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},oh=(t,e)=>{if(e==null)return t;if(Jt(e)("string","number"))delete t[e];else if(R(e))for(let n=0;n<e.length;n++)delete t[e[n]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},xl=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=xl(t[n]));return e},sh=(t,e)=>{if(t.length===0)return e;let n={},r=n;for(let o=0;o<t.length;o++)o===t.length-1&&e?r[t[o]]=e:(r[t[o]]={},r=r[t[o]]);return n},ih=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++){if(n[e[o]]===void 0)return;n=n[e[o]]}let r=e[e.length-1];n&&Object.prototype.hasOwnProperty.call(n,r)&&delete n[r]},ah=(t,e,n)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++)(!r[e[o]]||typeof r[e[o]]!="object")&&(r[e[o]]={}),r=r[e[o]];return r[e[e.length-1]]=n,t},ch=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let r=0;r<e.length;r++){if(n==null)return;n=n[e[r]]}return n},lh=t=>{let n=[],r=0;for(let o=0;o<t.length;o++)if(n.length<2)n.push(t[o]);else if(t[o]===n[o%2]?r++:(n=[t[o-1],t[o]],r=1),r>=20)return(Fx==="test"||Fx==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",n),!0},fh=t=>{let e=new WeakSet;function n(r){if(r&&typeof r=="object"){if(e.has(r))return!0;e.add(r);for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&n(r[o]))return console.log(r,"cycle at "+o),!0}return!1}return n(t)},uh=(t,e)=>{let n=e instanceof Set?e:new Set(e),r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!n.has(o)&&(r[o]=t[o]);return r}});var ki,vi,Ci,wl=V(()=>{"use strict";hn();ki=(function(){let t=0;function e(){return t++,t}return e})(),vi=ki,Ci=(t,e,n)=>(ut(n,t)||n||t.key||ki()).toString()});var $e,dh,Bn,Sl,ph,hh,gh,Vn,mh,Or,ht,kl=V(()=>{"use strict";$e="production",dh=$e,Bn=(t=$e)=>t==="production",Sl=(t=$e)=>t==="testing"||t==="test",ph=Sl,hh=(t=$e)=>t==="staging",gh=(t=$e)=>t==="local",Vn=(t=$e)=>t==="development"||t==="dev"||t==="local",mh=(t,e=$e)=>e[t],Or=(t=$e)=>!Bn(t),ht=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let n=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof n=="string"&&n?n==="localhost"||n==="127.0.0.1"||n.endsWith(".localhost"):!1}});function Ei(t,e,n){let r;return function(){let o=this,s=arguments,i=function(){r=null,n||t.apply(o,s)},a=n&&!r;clearTimeout(r),r=setTimeout(i,e),a&&t.apply(o,s)}}function _h(t,e=window){let n=function(){return t.apply(e,arguments)};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var yh,bh,$T,Ai,Ao,To,Pt,Rr=V(()=>{"use strict";yh=(t,e,n=300)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(t,o)},n)}},bh=t=>{let e={};return(...n)=>{let r=n[0];if(r in e)return e[r];{let o=t(r);return e[r]=o,o}}},$T=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,Ai=t=>$T.test(t),Ao=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let n of e)if(n.resolveHandler)return!0;return!1},To=(t,e)=>{if(typeof t=="function")return t;let n=e?.context?.plugins;if(!n)return t;for(let r of n)if(r.resolveHandler){let o=r.resolveHandler(t,e);if(typeof o=="function")return o}return t},Pt=(t,e,...n)=>{let r=e?.context?.plugins;if(!r)return!1;let o=!1;for(let s of r)typeof s[t]=="function"&&(s[t](e,...n),o=!0);return o}});var xh,Qx=V(()=>{"use strict";Lt();hn();xh=(t,e)=>{let{__ref:n}=t,r=t.if;if(O(r)){let o;try{o=r(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete n.__if;return}o?n.__if=!0:delete n.__if}else r!=null&&typeof r=="object"?ut(r,t)?n.__if=!0:delete n.__if:n.__if=!0}});var wh,Sh,tw=V(()=>{"use strict";wh=(t,...e)=>{t&&e.map(n=>console.log(n))},Sh=(t,e,...n)=>{t&&(console.group(e),n.map(r=>console.log(r)),console.groupEnd(e))}});function Ah(t){let e;try{if(!window.localStorage)return;e=window.localStorage.getItem(t)}catch{return}if(e!==null)try{return JSON.parse(e)}catch{return}}function Th(t,e){if(e!=null)try{if(!window.localStorage)return;let n=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,n)}catch{}}var kh,vh,Ch,Eh,ew=V(()=>{"use strict";Lt();ii();kh=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),vh=(t,e,n=365)=>{if(Dt(nt)||Dt(nt.cookie))return;let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let o=`expires=${r.toUTCString()}`;nt.cookie=`${t}=${e};${o};path=/`},Ch=t=>{if(Dt(nt)||Dt(nt.cookie))return;let e=`${t}=`,r=decodeURIComponent(nt.cookie).split(";");for(let o=0;o<r.length;o++){let s=r[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Eh=t=>{Dt(nt)||Dt(nt.cookie)||(nt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Oo,nw,Oh,Rh=V(()=>{"use strict";Oo={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},nw=new Set(["svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"]),Oh=t=>Oo.body.has(t)});var Ph,rw,Ro,xe,Po,Ri,Ye,Dh,vl,Pi,Lh,Di,Cl,El,Li,Al,Do,MT,Xe,ow,Ti,Ii,Ih,Oi,$h,Mh,Tl,Ol,Rl,Pl,Dl,Ll,sw,Il=V(()=>{"use strict";Co();Fh();hn();Lt();Ph="production",rw=t=>t.sourcemap!==!1&&Ph!=="production",Ro=t=>{if(!t)return[];let e=[],n=t.extends;n&&(R(n)?e.push(...n):e.push(n));let r=t.extend;return r&&(R(r)?e.push(...r):e.push(r)),e},xe=t=>{if(!R(t))return t;let e=[];for(let n=t.length-1;n>=0;n--){let r=t[n];e.push(R(r)?xe(r):r)}return e},Po=t=>{if(t.includes("+"))return t.split("+").filter(Ze);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Ze(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Ri=(t,e,n)=>{let r=[],o=Po(n);o&&(r=[...o]);let s=xe(Ro(t));return s.length&&(r=[...r,...s]),r},Ye=(t,e)=>{let{__ref:n}=e,{__extends:r}=n;if(!t)return r;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return r.includes(t)||(r=Array.isArray(t)?[...r,...t]:[...r,t],n.__extends=r),r},Dh=(t,e)=>{if(!t)return e;let{extends:n}=e,r=R(n)?n:[n],o=R(t)?t:[t];return{...e,extends:ko(o,r)}},vl=()=>Math.random().toString(36).substring(2),Pi={},Lh={},Di=t=>Pi[t.__hash],Cl=(t,e)=>{let n=vl();return k(t)||(t.__hash=n),n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(Pi[n]=e),e},El=(t,e)=>t.__hash?e.concat(Di(t)):Cl(t,e),Li=(t,e,n,r=new Set,o,s)=>{for(let i of t)R(i)?Li(i,e,n,r,o,s):Do(i,e,n,r,o,void 0,s);return e},Al=(t,e,n,r=new Set,o,s,i)=>{let a=Ro(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&Do(xe(a),e,n,r,o,s,i),e},Do=(t,e,n,r=new Set,o,s,i)=>{if(!t||r.has(t))return e;if(R(t))return Li(t,e,n,r,o,i);let a=s;return k(t)?(a=t,t=Ii(t,n)):i&&v(t)&&i.has(t)&&(a=i.get(t)),r.has(t)||(r.add(t),t?.extends||t?.extend?Al(t,e,n,r,o,a,i):t&&(e.push(t),o&&o.push(a))),e},MT=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),Xe=(t,e,n,r,o)=>{e=it(e);for(let s in e){if(MT.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,n&&r?v(a)&&!R(a)?(n[s]=n[s]||{},ow(n[s],a,r)):n[s]=r:n&&o?.[s]&&(n[s]=o[s]);else if(v(i)&&v(a)){let c=n?n[s]=n[s]||{}:void 0,l=o?.[s];Ze(s)?t[s]=Xe(i,a,c,r,l):Xe(i,a,c,r,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(R(i)&&R(a))t[s]=i.concat(a);else if(R(i)&&v(a)){let c=Xe({},i);t[s]=Xe(c,a)}}}}return t},ow=(t,e,n,r)=>{if(r||(r=new WeakSet),!r.has(e)){r.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];v(s)&&!R(s)?(t[o]=t[o]||{},ow(t[o],s,n,r)):t[o]=n}}},Ti=(t,e,n)=>t.reduce((r,o,s)=>{let i=it(o),a=n?n[s]:void 0;return Xe(r,i,e,a)},{}),Ii=(t,e,n={},r)=>{let o=e?.components||n.components,s=e?.pages||n.pages;if(k(t)){let i=o&&(o[t+"."+r]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;n.verbose&&(Ph==="test"||Ph==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Ih=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Oi=(t,e,n,r)=>{if(!t)return[];if(t.__hash)return Di(t)||[];let s=Do(t,[],e,new Set,n,void 0,r);return n?s:El(t,s)},$h=(t,e)=>{if(!t)return e;let n=R(t)?t:[t];return ko(n,e)},Mh=t=>{let e=[];function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(Ze(o)&&e.push(o),o==="extends"&&(typeof r[o]=="string"?e.push(r[o]):Array.isArray(r[o])&&(e=e.concat(r[o]))),typeof r[o]=="object"&&r[o]!==null&&n(r[o]))}return n(t),e},Tl=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=Ro(t);if(i.length){let a=xe(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?Ye([f,...l],t):Ye(a,t)}return Ol(t,e,n),Rl(t,e,n),Pl(t,e,n),t.component&&Ye(xe(ut(t.component,t)),t),o.defaultExtends&&Ye(xe(o.defaultExtends),t),vo(r.__extends)},Ol=(t,e,n={})=>{let{__ref:r}=t;return n.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Ye(xe(e.childProps.extends),t),r.__extends},Rl=(t,e,n={})=>{let{__ref:r}=t,o=n.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&Ye(xe(s),t),r.__extends},Pl=(t,e,n={})=>{let{__ref:r}=t,o=e.childExtendsRecursive,s=n.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&Ye(xe(o),t),r.__extends},Dl=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=rw(n),a=i?[...r.__extends]:null,c=vo(r.__extends.map((l,f)=>Ii(l,o,n,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let h=c[d],p=a[d];h&&v(h)&&k(p)&&l.set(h,p)}let f=[],u=Oi(c,o,f,l);r.__extendsStack=u,r.__extendsNames=f}else{let l=Oi(c,o);r.__extendsStack=l}return r.__extendsStack},Ll=(t,e,n={})=>{let{__ref:r}=t,{__extendsStack:o}=r;if(rw(n)){let s={},i=r.__extendsNames||[],a=Ti(o,s,i),c={};Xe(t,a,c,void 0,s),r.__sourcemap=c}else{let s=Ti(o);Xe(t,s)}return t},sw=(t,e,n={})=>(Tl(t,e,n),Dl(t,e,n),Ll(t,e,n),t)});function Nh(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function jh(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Bh(t,e,n){let{context:r}=e||{},[o]=Po(n),s=n||o;return r?.components?.[s]||r?.pages?.[s]}var Ze,Fh=V(()=>{"use strict";Il();Lt();Ze=t=>{if(!k(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function iw(t,e){let{props:n,on:r}=e,o=wr(t.split("on")[1]),s=r[o],i=n[t];O(s)?r[o]=(...a)=>{if(s(...a)!==!1&&O(i))return i(...a)}:r[o]=i}var aw=V(()=>{"use strict";gi();Lt()});function $l(t,e={}){let n=e.cachedKeys||[];for(let r in t){let o=t[r];if(r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r[2]===r[2].toUpperCase()&&(O(o)||o!=null&&Ao(this.context))){let p=wr(r.slice(2));t.on&&(t.on[p]=o),delete t[r];continue}if(r==="childProps"){t.props[r]=o,delete t[r],n.push(r);continue}let a=this.define?.[r],c=this.context?.define?.[r],l=v(a)||O(a),f=v(c)||O(c);if(l||f)continue;let u=r.charAt(0);if(lw.has(u)){t.props[r]=o,delete t[r],n.push(r);continue}let d=Vh.test(r)||cw.test(r)||NT(o),h=Fn.has(r);!d&&!h&&(r in t.props||(t.props[r]=o),delete t[r],n.push(r))}return t}function Ml(t=this,e){let n=e.cachedKeys||[];for(let r in t.props){let o=t.props[r],s=r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110,i=O(o)||o!=null&&Ao(this.context);if(s&&i){iw(r,t),delete t.props[r];continue}if(n.includes(r)||r==="childProps")continue;let a=r.charAt(0);if(lw.has(a))continue;let c=this.define?.[r],l=this.context?.define?.[r],f=v(c)||O(c),u=v(l)||O(l),d=Vh.test(r)||cw.test(r),h=Fn.has(r);(d||h||f||u)&&(t[r]===void 0||o===null)&&(t[r]=o,t.props&&delete t.props[r])}return t}function Fl(t=this){let e=[];return $l.call(this,t,{cachedKeys:e}),Ml.call(this,t,{cachedKeys:e}),t}function Uh(t={}){return t.on||(t.on={}),t.props||(t.props={}),Fl.call(this,t)}function Hh(t,e){this.__element.update({props:t},e)}function ji(t){let e={update:Hh.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Vh,cw,lw,FT,NT,Fi,$i,zh,Ni,Bi,Vi,Nl,Mi,Wh,qh,Kh=V(()=>{"use strict";vr();aw();hn();Lt();gi();Rr();Vh=/^[A-Z]/,cw=/^\d+$/,lw=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),FT=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),NT=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(FT.has(e)||Vh.test(e))return!0;return!1},Fi=(t,e,n)=>{let{props:r,__ref:o}=t;if(o.__propsStack=[],r)o.__initialProps=r;else return{};return j(r)?{...r}:(o.__propsStack.push(r),{})};$i=t=>Jt(t)("string","number")?{inheritedString:t}:t,zh=(t,e)=>!t||!e.length?!1:e.includes(t),Ni=(t,e)=>{let{__ref:n}=t,r=n.__propsStack||[],o=e.props;if(!o)return r;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=$i(i);r.unshift(c)}if(s){let c=$i(s);r.unshift(c)}return r};Bi=t=>{let e=new Set;return t.filter(n=>!n||Nn.has(n)||e.has(n)?!1:(e.add(n),!0))},Vi=(t,e,n)=>(e.props=t.reduce((r,o)=>{if(Nn.has(o))return r;for(;O(o);)o=ut(o,e);return ot(r,it(o,{exclude:Nn}))},{}),ji(e),e.props),Nl=(t,e)=>{let{props:n,__ref:r}=t,o=r.__propsStack||[];if(e?.props&&(o=[...Ni(t,e)]),v(n)?o.push(n):n==="inherit"&&e?.props?o.push(e.props):n&&o.push(n),R(r.__extendsStack))for(let s=0;s<r.__extendsStack.length;s++){let i=r.__extendsStack[s];i.props&&i.props!==n&&o.push(i.props)}return r.__propsStack=Bi(o),r.__propsStack},Mi=(t,e)=>{let{__ref:n}=t,r=Nl(t,e);r.length?Vi(r,t):(n.__propsStack=[],t.props={})},Wh=function(t,e,n){let{__ref:r}=t;if(r.__if)Mi(t,e);else try{Mi(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",r.path?.join("."),o),t.props={},r.__propsStack=[]}return ji(t),t},qh=(t,e,n)=>{let{__ref:r}=e,s=[...r.__propsStack||[]],i=Ni(e,n);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),r.__propsStack=Bi(s),r.__propsStack.length&&Vi(r.__propsStack,e),e}});var fw,jl,Bl,Vl,Ul,Gh,zl,Hl,Wl,Yh,uw=V(()=>{"use strict";Il();wl();ci();Kh();Rh();Lt();fw="production",jl=(t,e,n)=>{let r=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=Oo.body.has(n)&&n;return{text:t,tag:r||o||s||"string"}},Bl=(t,e,n)=>{if(t===void 0)return(fw==="test"||fw==="development")&&console.warn(n,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Jt(t)("string","number")?jl(t,e,n):O(t)?{props:t}:t},Vl=(t,e)=>{let n={};return n.origin=t,n.parent=e,n},Ul=(t,e,n,r,o)=>{if(!e)return o;if(pn(e)){let s={key:":root",node:e};return o[`${n}_parent`]=s,s}return e},Gh=(t,e)=>{let{__ref:n}=t,{__ref:r}=e,o=e&&e.key===":root";n?.root||(n.root=o?t:r?.root)},zl=(t,e,n)=>{let{__ref:r}=e;return r||(r=e.ref={}),r.path||(r.path=[]),r.path.concat(n)},Hl=(t,e,n,r,o)=>(r.context&&!o.context&&!t.context&&(o.context=r.context),r.context||e.context||o.context||t.context),Wl=(t,e,n)=>{let r=Vl(t,e);return t.__ref=r,r.__defineCache||(r.__defineCache={}),r.__exec||(r.__exec={}),r.__execProps||(r.__execProps={}),r.__class||(r.__class={}),r.__classNames||(r.__classNames={}),r.__attr||(r.__attr={}),r.__changes||(r.__changes=[]),r.__children||(r.__children=[]),r.__extends=Ri(t,e,n),r.path=zl(t,e,n),r},Yh=(t,e,n,r,o)=>{let i=t?.__hash?{extends:[t]}:Bl(t,e,n);if(!i)return;let a=Ul(i,e,n,r,o),c=Ci(i,a,n);Wl(i,a,c);let l=Fi(i,a,c),f=Hl(i,a,c,r,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Xh,ql,Kl,Gl,Yl,Zh,Xl,Jh,Qh,tg,eg,dw,Lo,Pr,pw,hw,gw,Ui,Je,mw=V(()=>{"use strict";Co();vr();hn();Lt();Xh=t=>{let{state:e,props:n,__ref:r}=t,o=n?.state||e;return Jt(o)("string","number")?(r.__state=o,{value:o}):o===!0?(r.__state=t.key,{}):o?(r.__hasRootState=!0,o):!1},ql=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Kl=(t,e)=>{if(!t.includes("../"))return;let r=t.split("../").length-1;for(let o=0;o<r;o++){if(!e.parent)return null;e=e.parent}return e},Gl=(t,e,n={})=>{let r=k(t)?t.split("/"):[t],o=r.length-1;for(let s=0;s<o;s++){let i=r[s],a=r[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return n.returnParent?e:e[t]},Yl=(t,e,n={})=>{let o=t.__ref.__state;if(!Xl(t))return;let s=ql(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=Kl(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return Gl(o,i,n)},Zh=(t,e)=>{let n=t.__ref,r=Yl(t,e);if(r===void 0)return t.state;if(Jt(r)("object","array"))return it(r);if(Jt(r)("string","number","boolean"))return n.__stateType=typeof r,{value:r};console.warn(n.__state,"is not present. Replacing with",{})},Xl=t=>{let{__ref:e}=t,n=e?.__state;return!!(n&&Jt(n)("number","string","boolean"))},Jh=function(t){return j(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},Qh=(t,e)=>{if(!t)return e||{};let n=t.split("/"),r={},o=r,s=n.length-1;for(let i=0;i<=s;i++)o[n[i]]=i===s?e||{}:{},o=o[n[i]];return r},tg=(t,e)=>{let{__element:n}=e,r=n?.state;if(!r)return;let o=it(r,Sr),s={[t.key]:o},i=v(r.__depends)?{...r.__depends,...s}:s;return Array.isArray(r)?di(r,{...Object.getPrototypeOf(r),__depends:i}):Object.setPrototypeOf(r,{...Object.getPrototypeOf(r),__depends:i}),o},eg=(t,e,n={})=>{let{overwrite:r}=n;if(!r)return;let o=r==="shallow";if(r==="merge"){ot(t,e,Sr);return}(o?Tr:Wt)(t,e,Sr)},dw="__polyglotSeededKeys",Lo=t=>{if(!v(t))return new Set;let e=t[dw];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,dw,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Pr=(t,e,n)=>Lo(t).has(e)?!0:!v(n)||n[e]===void 0,pw="__polyglotSeededValues",hw=t=>{if(!v(t))return new Map;let e=t[pw];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,pw,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},gw=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},Ui=(t,e,n)=>{if(!Lo(t).has(e))return!1;let r=hw(t);if(!r.has(e))return!0;let o=v(n)||Array.isArray(n)?n[e]:void 0,s=gw(o);return s!==null&&s===r.get(e)},Je=(t,e,...n)=>(Lo(t).add(e),n.length&&hw(t).set(e,gw(n[0])),e)});var jT,ng,yw=V(()=>{"use strict";jT=(t,e)=>{let n=e;for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1},ng=(t,e)=>{let{__ref:n}=t,r=t.context||e.context||n.root?.context;r&&!r.globalScope&&(r.globalScope={});let o=e.scope||n.root?.scope,s=r?.globalScope;if(!t.scope)o?t.scope=o:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=o||s;i&&!jT(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var bw,Zl,gn,Jl,rg,og=V(()=>{"use strict";Lt();Rr();bw=(t,e)=>{let n="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[n]},Zl=(t,e,n,r,o)=>{if(t=To(t,e),!!O(t))try{let s=t.call(e,e,n||e.state,r||e.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},gn=(t,e,n)=>{if(!e)throw new Error("Element is required");Pt(t,e,n);let r=bw(t,e);if(r){let{state:o,context:s}=e;return Zl(r,e,o,s,n)}},Jl=(t,e,n,r,o,s)=>{if(t=To(t,n),!!O(t))try{let i=t.call(n,e,n,r||n.state,o||n.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{n.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(n.error=i,console.error("[DOMQL] Event update error:",i),n.context?.strictMode)throw i}},rg=(t,e,n,r)=>{Pt(t,n,e,r);let o=bw(t,n);if(o){let{state:s,context:i}=n;return Jl(o,e,n,s,i,r)}}});var sg,zi,ig=V(()=>{"use strict";sg={},zi={}});var kw={};$(kw,{restAdapter:()=>Sw,setup:()=>YT});var BT,ww,_w,VT,UT,zT,xw,mn,HT,WT,qT,ag,KT,GT,YT,Sw,vw=V(()=>{"use strict";BT=(t,e,n)=>{let r=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${r}${e}`);if(n)for(let s in n){let i=n[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},ww=t=>Object.prototype.toString.call(t).slice(8,-1),_w=["auto","json","text","blob","arrayBuffer","stream","response"],VT={json:async t=>{let e=await t.text();return e?JSON.parse(e):null},text:t=>t.text(),blob:t=>t.blob(),arrayBuffer:t=>t.arrayBuffer(),stream:t=>t.body,response:t=>t},UT=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},zT=async t=>{let e=await t.text(),n=t.headers.get("content-type");if(e&&n&&n.includes("json"))try{return JSON.parse(e)}catch{}return e},xw=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,mn=async(t,e,n)=>{let r=n??"auto";if(!_w.includes(r))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${r}" \u2014 use one of: ${_w.join(", ")}`);let o=await globalThis.fetch(t,e);if(r==="auto"){let s=await UT(o);return{data:s,error:o.ok?null:xw(s,o),status:o.status}}if(!o.ok){let s=await zT(r==="response"?o.clone():o);return{data:r==="response"?o:s,error:xw(s,o),status:o.status}}return{data:await VT[r](o),error:null,status:o.status}},HT=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],WT=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||HT.includes(ww(t))),qT=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),ag=(...t)=>{let e={},n=new Map;for(let r of t)if(r)for(let[o,s]of qT(r)){let i=o.toLowerCase();if(n.has(i)&&delete e[n.get(i)],s==null){n.delete(i);continue}n.set(i,o),e[o]=s}return e},KT={"Content-Type":"application/json"},GT={"Content-Type":void 0},YT=async({url:t,headers:e,auth:n,fetchOptions:r})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return Sw(t,e,n,r)},Sw=(t,e={},n,r={})=>{let o=n?.token||null,s=()=>o?{Authorization:`Bearer ${o}`}:null,i=u=>ag(e,s(),u),a=u=>({...r,...u}),c=(u,d,h)=>{if(!WT(d))return a({method:u,headers:ag(e,s(),KT,h),body:JSON.stringify(d)});let p={method:u,headers:ag(e,s(),GT,h),body:d};return ww(d)==="ReadableStream"&&(p.duplex="half"),a(p)},l=(u,d)=>{let h=d||t;if(u&&(u.startsWith("http://")||u.startsWith("https://")))return u;let p=u&&!u.startsWith("/")?"/":"";return`${h}${p}${u||""}`};return{name:"rest",setToken:u=>{o=u},getSession:async()=>{if(!n?.sessionUrl)return o?{token:o}:null;let u=await mn(l(n.sessionUrl,n.baseUrl),a({headers:i()}));return u.error?null:u.data},signIn:async u=>{if(!n?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let d=await mn(l(n.signInUrl,n.baseUrl),c("POST",u));return d.data?.token&&(o=d.data.token),d},signOut:async()=>(n?.signOutUrl&&await mn(l(n.signOutUrl,n.baseUrl),a({method:"POST",headers:i()})),o=null,{error:null}),select:({from:u,params:d,select:h,limit:p,offset:g,order:m,single:y,headers:x,baseUrl:b,responseType:_})=>{let w={...d};return h&&(w.select=h),p&&(w.limit=p),g&&(w.offset=g),y&&(w.single=!0),m&&(typeof m=="string"?w.order=m:Array.isArray(m)?w.order=m.map(S=>`${S.by}:${S.asc===!1?"desc":"asc"}`).join(","):m.by&&(w.order=`${m.by}:${m.asc===!1?"desc":"asc"}`)),mn(BT(b||t,u||"",w),a({headers:i(x)}),_)},rpc:({from:u,params:d,headers:h,baseUrl:p,responseType:g})=>mn(l(`rpc/${u}`,p),c("POST",d,h),g),insert:({from:u,data:d,headers:h,baseUrl:p,responseType:g})=>mn(l(u,p),c("POST",d,h),g),update:({from:u,data:d,params:h,method:p,headers:g,baseUrl:m,responseType:y})=>{let x=h?.id||d?.id,b=x?`${u}/${x}`:u;return mn(l(b,m),c(p||"PATCH",d,g),y)},upsert:({from:u,data:d,params:h,method:p,headers:g,baseUrl:m,responseType:y})=>{let x=h?.id||d?.id,b=x?`${u}/${x}`:u;return mn(l(b,m),c(p||"PUT",d,g),y)},delete:({from:u,params:d,headers:h,baseUrl:p,responseType:g})=>{let m=d?.id,y=m?`${u}/${m}`:u;return mn(l(y,p),a({method:"DELETE",headers:i(h)}),g)}}}});var Ew={};$(Ew,{localAdapter:()=>Cw,setup:()=>ZT});var Ql,XT,ZT,Cw,Aw=V(()=>{"use strict";Ql=(t,e)=>{if(!e)return!0;for(let n in e){let r=e[n];if(r===null){if(t[n]!==null&&t[n]!==void 0)return!1}else if(Array.isArray(r)){if(!r.includes(t[n]))return!1}else if(typeof r=="object"){for(let o in r)if(o==="gt"&&!(t[n]>r[o])||o==="gte"&&!(t[n]>=r[o])||o==="lt"&&!(t[n]<r[o])||o==="lte"&&!(t[n]<=r[o])||o==="neq"&&t[n]===r[o]||o==="like"&&!String(t[n]).includes(r[o]))return!1}else if(t[n]!==r)return!1}return!0},XT=(t,{order:e,limit:n,offset:r,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return r&&(s=s.slice(r)),n&&(s=s.slice(0,n)),o?{data:s[0]||null,error:null}:{data:s,error:null}},ZT=async({data:t,...e})=>Cw(t,e),Cw=(t={},e={})=>{let n={},r={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!n[f])if(o)try{let u=localStorage.getItem(s+f);n[f]=u?JSON.parse(u):t[f]||[]}catch{n[f]=t[f]||[]}else n[f]=t[f]||[];return n[f]},a=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(n[f]))}catch{}},c=(f,u,d,h)=>{let p=r[f];if(p)for(let g of p)g(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:n,select:async({from:f,params:u,...d})=>{let p=i(f).filter(g=>Ql(g,u));return XT(p,d)},insert:async({from:f,data:u})=>{let d=i(f),p=(Array.isArray(u)?u:[u]).map(g=>{let m={id:g.id||++l,...g};return d.push(m),m});a(f);for(let g of p)c(f,"INSERT",g,null);return{data:Array.isArray(u)?p:p[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),p=[];for(let g=0;g<h.length;g++)if(Ql(h[g],d)){let m={...h[g]};Object.assign(h[g],u),p.push(h[g]),c(f,"UPDATE",h[g],m)}return a(f),{data:p,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),p=Array.isArray(u)?u:[u],g=[];for(let m of p){let y=d||(m.id!==void 0?{id:m.id}:null),x=y?h.findIndex(b=>Ql(b,y)):-1;if(x>-1){let b={...h[x]};Object.assign(h[x],m),g.push(h[x]),c(f,"UPDATE",h[x],b)}else{let b={id:m.id||++l,...m};h.push(b),g.push(b),c(f,"INSERT",b,null)}}return a(f),{data:Array.isArray(u)?g:g[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let p=d.length-1;p>=0;p--)Ql(d[p],u)&&(h.push(d[p]),d.splice(p,1),c(f,"DELETE",null,h[h.length-1]));return a(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{r[f]||(r[f]=[]);let h=(p,g,m)=>{u&&u!=="*"&&u!==m.event||d(p,g,m)};return r[f].push(h),()=>{let p=r[f].indexOf(h);p>-1&&r[f].splice(p,1)}}}}});var af={};$(af,{createAdapter:()=>rO,default:()=>hO,executeFetch:()=>Xi,fetchPlugin:()=>mg,initAdapterAuth:()=>of,parseDuration:()=>Wi,queryClient:()=>pO,registerAdapter:()=>nO,resolveDb:()=>Pw});var JT,QT,tf,Hi,ef,fg,tO,eO,nO,rO,Pw,Wi,qt,Dw,Io,oO,Yi,qi,Ki,nf,pg,rf,sO,Tw,cg,Lw,Iw,$o,Ow,iO,Rw,aO,sf,ug,$w,of,hg,we,Me,Gi,gg,cO,dg,Dr,Qe,Un,lO,fO,uO,lg,dO,Xi,pO,mg,hO,Zi=V(()=>{"use strict";D();JT=["select","rpc","insert","update","upsert","delete","subscribe"],QT={rest:()=>Promise.resolve().then(()=>(vw(),kw)),local:()=>Promise.resolve().then(()=>(Aw(),Ew))},tf=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Hi=(()=>{if(typeof globalThis<"u"&&globalThis[tf])return globalThis[tf];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,tf,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[tf]}catch{}return t})(),ef=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),fg=(()=>{if(typeof globalThis<"u"&&globalThis[ef])return globalThis[ef];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,ef,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[ef]}catch{}return t})(),tO=5e3,eO=t=>new Promise(e=>{if(Hi[t])return e(Hi[t]);let n=fg[t]||=[],r=!1,o=()=>{r||(r=!0,e(Hi[t]||null))};n.push(o),setTimeout(o,tO)}),nO=(t,e)=>{Hi[t]=e;let n=fg[t];if(n&&n.length){fg[t]=[];for(let r of n)r()}},rO=t=>{let e={};for(let n of JT)t[n]&&(e[n]=t[n]);return e.name=t.name||"custom",e},Pw=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...n}=t,r=typeof e=="string"?e:typeof t=="string"?t:null;if(!r)return null;let o=Hi[r]||QT[r];if(!o&&(o=await eO(r),!o))throw new Error(`Unknown db adapter: "${r}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${r}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(n)},Wi=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let n=parseInt(e[1]),r=e[2];return r==="ms"?n:r==="s"?n*1e3:r==="m"?n*6e4:r==="h"?n*36e5:0},qt=new Map,Dw=new Map,Io=new Map,oO=(t,e,n)=>{if(t.cache?.key)return t.cache.key;let r=aO(t.params),o=n?`${n}:`:"",s=`${t.from}:${t.method}:${o}${JSON.stringify(r||"")}`;return e?`${s}:${e}`:s},Yi=t=>qt.get(t)||null,qi=(t,e,n)=>{let r=qt.get(t),o={data:e,error:n,time:Date.now(),stale:!1};qt.set(t,o);let s=Dw.get(t);if(s)for(let i of s)O(i)&&i(o);return o},Ki=t=>{if(t){let e=qt.get(t);e&&(e.stale=!0);return}for(let[,e]of qt)e.stale=!0},nf=t=>{if(t){qt.delete(t);return}qt.clear()},pg=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:k(t)?{staleTime:Wi(t),gcTime:3e5}:{staleTime:Wi(t.stale||t.staleTime)||6e4,gcTime:Wi(t.gc||t.gcTime||t.expire)||3e5,key:t.key},rf=null,sO=()=>{rf||(rf=setInterval(()=>{let t=Date.now();for(let[e,n]of qt){let r=Dw.get(e);!(r&&r.size>0)&&t-n.time>(n.gcTime||3e5)&&qt.delete(e)}},3e4),rf.unref&&rf.unref())};sO();Tw=3,cg=t=>Math.min(1e3*2**t,3e4),Lw=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:Tw,delay:cg}:typeof e=="number"?{count:e,delay:cg}:{count:e.count??Tw,delay:O(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:cg}},Iw=async(t,e)=>{let{count:n,delay:r}=e,o;for(let s=0;s<=n;s++)try{let i=await t();if(i?.error){if(o=i.error,s<n){let a=O(r)?r(s,o):r;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<n){let a=O(r)?r(s,i):r;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},$o={focus:new Set,online:new Set},Ow=!1,iO=()=>{if(Ow||typeof window>"u")return;Ow=!0;let t=()=>{for(let n of $o.focus)n()},e=()=>{for(let n of $o.online)n()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Rw=(t,e)=>{let n=e.__ref;if(t===!0)return{from:n.__state||e.key,method:"select",query:!0,on:"create"};if(k(t))return{from:t,method:"select",query:!0,on:"create"};if(v(t)){let r={...t};return r.from=r.from||n.__state||e.key,r.method=r.method||"select",r.on=r.on||"create",r.query===void 0&&(r.query=!0),r}return null},aO=t=>(!t||O(t),t),sf=(t,e)=>{let n=t?.state?.root||e?.state?.root;if(n?.lang)return n.lang},ug=(t,e)=>{let r=(t?.state?.root||e?.state?.root)?.__fetchScope;return r?String(r):void 0},$w=(t,e,n)=>{let r;if(!t)r=void 0;else if(O(t))r=t(e,e.state);else{r={};for(let o in t){let s=t[o];r[o]=O(s)?s(e,e.state):s}}return r},of=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let n=(r,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:r,session:o,loading:!1}})};try{let r=await t.getSession();n(r?.user||null,r)}catch(r){console.warn("[fetch] Failed to restore auth session:",r.message)}t.onAuthStateChange&&t.onAuthStateChange((r,o)=>{n(o?.user||null,o)})},hg=async(t,e)=>{if(O(t.select))return t.auth!==!1&&await of(t,e),t;if(t.__resolved)return t.auth!==!1&&await of(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=Pw(t);let n=await t.__resolving;return delete t.__resolving,n?(n.auth=t.auth,n.url=t.url,n.key=t.key,t.__resolved=n,e.fetch=n,t.auth!==!1&&await of(n,e),n):null},we=(t,e,...n)=>{let r=O(t[e])?t[e]:null;r&&r.call(t,...n,t,t.state,t.context)},Me=(t,e,n,...r)=>{let o=t&&O(t[n])?t[n]:null;o&&o.call(e,...r,e,e.state,e.context)},Gi=t=>{let e={},n=t.node;if(!n)return e;if(n.tagName==="FORM"){let o=new FormData(n);for(let[s,i]of o.entries())e[s]=i;return e}let r=n.querySelectorAll("input, textarea, select");for(let o=0;o<r.length;o++){let s=r[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},gg=t=>t.responseType==="stream"||t.responseType==="response",cO=["Blob","File","ArrayBuffer","ReadableStream","Response"],dg=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||cO.includes(Object.prototype.toString.call(t).slice(8,-1))),Dr=(t,e,n,r={})=>{if(!n&&dg(e))return;let o=n&&n.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=n.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&!dg(e)&&i in e?s.update(e,{preventFetch:!0,...r}):s.update({[i]:e},{preventFetch:!0,...r})}else{let i=n?{[n]:e}:e;s.update(i,{preventFetch:!0,...r})}},Qe=(t,e)=>{let n=t?.__ref;n&&(n.__fetchStatus=e,n.__fetching=e.isFetching,n.__fetchError=e.error)},Un=async(t,e,n,r={})=>{let o=n?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=ug(e,n);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&ug(e,n)===i;if(t.enabled===!1||O(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||O(t.skip)&&t.skip(e,e.state))return;let l=await hg(o,n);if(!l||!c())return;let{from:f,method:u,query:d,params:h,cache:p,transform:g,single:m,auth:y,fields:x,as:b,limit:_,offset:w,order:S,headers:A,baseUrl:P,responseType:L,page:E,cursor:M,getNextPageParam:X,getPreviousPageParam:vt,infinite:Ct,placeholderData:at,initialData:N,select:H,keepPreviousData:mt}=t,B=k(H)?H:void 0;if(d&&O(e.getQuery)){let ft=e.getQuery(l.name||"paths");ft&&(B=ft.select||ft.length&&ft.join(",")||B)}let gt=$w(h,e,n),F=gg(t)?null:pg(p),q=Lw(t),yt=sf(e,n),Z=yt?`:${yt}`:"",Y=i?`${i}:`:"",U=F?p?.key||`${f}:${u}:${Y}${JSON.stringify(gt||"")}${Ct?":infinite":""}${E?":p"+JSON.stringify(E):""}${Z}`:null;if(!s.__fetchInitialized&&U&&(s.__fetchInitialized=!0,N!==void 0)){let ft=O(N)?N():N;qi(U,ft,null)}if((u==="select"||u==="rpc")&&U&&F){let ft=Yi(U);if(ft&&!ft.error){let tt=Date.now()-ft.time,Et=ft.stale||tt>(F.staleTime||0),K=ft.data;if(O(H)&&(K=H(K,e,e.state)),g&&(K=g(K,e,e.state)),!c())return;if(Dr(e,K,b),!Et){Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(at!==void 0){let tt=O(at)?at(e,e.state):at;tt!==void 0&&Dr(e,tt,b)}}if(U&&Io.has(U)&&!r.force){let ft=Io.get(U);try{let tt=await Promise.race([ft,new Promise((Et,K)=>setTimeout(()=>K("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(tt?.data!==void 0){let Et=tt.data;if(O(H)&&(Et=H(Et,e,e.state)),g&&(Et=g(Et,e,e.state)),!c())return;Dr(e,Et,b),we(e,"onFetchComplete",Et),Me(t,e,"onFetchComplete",Et)}}catch{if(!c())return}return}let Ot=!Yi(U)?.data;Qe(e,{isFetching:!0,isLoading:Ot,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),we(e,"onFetchStart"),Me(t,e,"onFetchStart");let Bt=n?.analyze?.emitNetwork,mo=Bt?typeof performance<"u"?performance.now():Date.now():0;Bt&&Bt({phase:"start",mode:"query",from:f,method:u,cacheKey:U,lang:yt});let Qs=Iw(async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let K=await l.getSession();if(!c())return;if(y===!0&&!K){let zt={message:"Not authenticated"};return Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:zt,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",zt),Me(t,e,"onFetchError",zt),{data:null,error:zt}}}let ft=l[u];if(!O(ft))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let tt={from:f,select:B,params:gt,single:m,limit:_,offset:w,order:S,headers:A,baseUrl:P};L!==void 0&&(tt.responseType=L);let Et=sf(e,n);if(Et&&(tt.headers={...tt.headers,"Accept-Language":Et}),E!==void 0){if(v(E))E.offset!==void 0&&(tt.offset=E.offset),E.limit!==void 0&&(tt.limit=E.limit),E.cursor!==void 0&&(tt.params={...tt.params,cursor:E.cursor});else if(typeof E=="number"){let K=t.pageSize||_||20;tt.offset=(E-1)*K,tt.limit=K}}if(M!==void 0&&(tt.params={...tt.params,cursor:M}),u==="insert"||u==="update"||u==="upsert"){let K;if(x===!0||t.on==="submit")K=Gi(e);else if(R(x)){let zt=Gi(e);K={};for(let rp of x)K[rp]=zt[rp]}else e.state?.parse?K=e.state.parse():v(e.state)&&(K={...e.state});g&&(K=g(K,e,e.state)),tt.data=K}if(u==="rpc"){let K=gt;if(t.on==="submit"){let zt=Gi(e);K=t.transformParams?t.transformParams(zt,e,e.state):zt}tt.params=K}if(u==="subscribe"){let K=l.subscribe({from:f,params:gt,on:t.subscribeOn},(zt,rp,B$)=>{c()&&(Dr(e,zt,b),we(e,"onFetchComplete",zt),Me(t,e,"onFetchComplete",zt))});return c()?(s.__unsubscribe=K,{data:null,error:null,subscribed:!0}):(O(K)&&K(),{data:null,error:null,subscribed:!0})}return ft(tt)},q);U&&Io.set(U,Qs);try{let ft=await Qs;if(!c()||ft?.subscribed)return;let{data:tt,error:Et}=ft||{};if(Et){U&&qi(U,null,Et),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Et,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",Et),Me(t,e,"onFetchError",Et),Bt&&Bt({phase:"error",mode:"query",from:f,method:u,cacheKey:U,error:Et.message||Et,durationMs:(typeof performance<"u"?performance.now():Date.now())-mo});return}if(tt!==void 0){if((u==="select"||u==="rpc")&&U){let zt=qi(U,tt,null);zt.gcTime=F?.gcTime||3e5}let K=tt;if(Ct&&R(tt)&&(s.__pages||(s.__pages=[]),r.direction==="previous"?s.__pages.unshift(tt):s.__pages.push(tt),K=s.__pages.flat(),X&&(s.__nextPageParam=X(tt,s.__pages),s.__hasNextPage=s.__nextPageParam!=null),vt&&(s.__prevPageParam=vt(tt,s.__pages),s.__hasPreviousPage=s.__prevPageParam!=null)),O(H)&&(K=H(K,e,e.state)),g&&(K=g(K,e,e.state)),!c())return;(!mt||K!==void 0)&&Dr(e,K,b),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),we(e,"onFetchComplete",K),Me(t,e,"onFetchComplete",K),Bt&&Bt({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:U,durationMs:(typeof performance<"u"?performance.now():Date.now())-mo})}}catch(ft){if(!c())return;Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ft,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",ft),Me(t,e,"onFetchError",ft),Bt&&Bt({phase:"error",mode:"query",from:f,method:u,cacheKey:U,error:ft.message||String(ft),durationMs:(typeof performance<"u"?performance.now():Date.now())-mo})}finally{U&&Io.get(U)===Qs&&Io.delete(U)}},lO=(t,e,n)=>{let r=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||Un;if(r==="submit"){let i=c=>{c.preventDefault(),s(t,e,n)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(r==="click"){let i=()=>s(t,e,n),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else r==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,n))},fO=(t,e,n)=>{let r=e.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),iO();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:Wi(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Un(t,e,n,{force:!0})},c);r.__fetchCleanups.push(()=>clearInterval(l))}}let s=gg(t),i=t.refetchOnWindowFocus===void 0?!s:t.refetchOnWindowFocus!==!1,a=t.refetchOnReconnect===void 0?!s:t.refetchOnReconnect!==!1;if(i){let c=()=>{let l=sf(e,n),f=ug(e,n),u=oO(t,l,f),d=Yi(u),h=pg(t.cache);(!d||d.stale||Date.now()-d.time>(h?.staleTime||0))&&Un(t,e,n,{force:!0})};$o.focus.add(c),r.__fetchCleanups.push(()=>$o.focus.delete(c))}if(a){let c=()=>Un(t,e,n,{force:!0});$o.online.add(c),r.__fetchCleanups.push(()=>$o.online.delete(c))}},uO=(t,e,n)=>{if(!e.optimistic)return null;let r=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():v(t.state)?{...t.state}:t.state;r.__optimisticSnapshot=s;let i=O(e.optimistic)?e.optimistic(n,s,t):e.optimistic;return i!==void 0&&Dr(t,i,o),s},lg=(t,e)=>{let n=t.__ref,r=n.__optimisticSnapshot;r!==void 0&&(Dr(t,r,e.as),delete n.__optimisticSnapshot)},dO=async(t,e,n)=>{let r=n?.fetch;if(!r)return;let o=await hg(r,n);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:p,responseType:g,invalidates:m,optimistic:y,onMutate:x,onSuccess:b,onError:_,onSettled:w}=t,S;if(c===!0||u==="submit")S=Gi(e);else if(R(c)){let E=Gi(e);S={};for(let M of c)S[M]=E[M]}else e.state?.parse?S=e.state.parse():v(e.state)&&(S={...e.state});l&&(S=l(S,e,e.state)),O(x)&&x(S,e,e.state);let A=y?uO(e,t,S):null;s.__fetching=!0,Qe(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),we(e,"onFetchStart"),Me(t,e,"onFetchStart");let P=n?.analyze?.emitNetwork,L=P?typeof performance<"u"?performance.now():Date.now():0;P&&P({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let H=await o.getSession();if(d===!0&&!H){A!==void 0&&lg(e,t);let mt={message:"Not authenticated"};we(e,"onFetchError",mt),Me(t,e,"onFetchError",mt);return}}let E=o[i];if(!O(E))return;let M={from:a,data:S,headers:h,baseUrl:p};g!==void 0&&(M.responseType=g),t.params&&(M.params=$w(t.params,e,n));let X=sf(e,n);X&&(M.headers={...M.headers,"Accept-Language":X});let vt=Lw(t),Ct=await Iw(()=>E(M),vt),{data:at,error:N}=Ct||{};if(N){A!==void 0&&lg(e,t),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:N,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",N),O(_)&&_(N,S,e),O(w)&&w(null,N,S,e),P&&P({phase:"error",mode:"mutation",from:a,method:i,error:N.message||String(N),durationMs:(typeof performance<"u"?performance.now():Date.now())-L});return}if(delete s.__optimisticSnapshot,at!==void 0&&(f||!dg(at))){let H=f?{[f]:at}:at;e.state?.update&&e.state.update(H,{preventFetch:!0})}if(Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),we(e,"onFetchComplete",at),Me(t,e,"onFetchComplete",at),O(b)&&b(at,S,e),O(w)&&w(at,null,S,e),P&&P({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-L}),m){let H=R(m)?m:[m];for(let mt of H)if(mt===!0||mt==="*")for(let[B]of qt)B.startsWith(a+":")&&Ki(B);else Ki(mt)}}catch(E){A!==void 0&&lg(e,t),Qe(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:E,status:"error",fetchStatus:"idle"}),we(e,"onFetchError",E),Me(t,e,"onFetchError",E),O(_)&&_(E,S,e),O(w)&&w(null,E,S,e),P&&P({phase:"error",mode:"mutation",from:a,method:i,error:E.message||String(E),durationMs:(typeof performance<"u"?performance.now():Date.now())-L})}finally{s.__fetching=!1}},Xi=(t,e,n,r)=>{if(!t||!r?.fetch)return;let s=ut(t,e);if(!s)return;let i=R(s)?s.map(c=>Rw(ut(c,e),e)).filter(Boolean):[Rw(s,e)].filter(Boolean);for(let c of i){let l=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",f=l?dO:Un;c.on==="create"?f(c,e,r):Promise.resolve().then(()=>{lO({...c,__runner:f},e,r)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&fO(c,e,r)}let a=e.__ref;a.refetch=c=>{for(let l of i)Un(l,e,r,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};Un(f,e,r,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};Un(f,e,r,{direction:"previous",force:!0})}},pO={invalidateQueries:t=>{if(!t){Ki();return}if(k(t))for(let[e]of qt)(e.startsWith(t)||e.includes(t))&&Ki(e);else if(R(t)){let e=t.join(":");for(let[n]of qt)n.includes(e)&&Ki(n)}},removeQueries:t=>{if(!t){nf();return}if(k(t))for(let[e]of qt)(e.startsWith(t)||e.includes(t))&&nf(e)},getQueryData:t=>Yi(t)?.data??void 0,setQueryData:(t,e)=>{let n=Yi(t),r=O(e)?e(n?.data):e;qi(t,r,null)},prefetchQuery:async(t,e)=>{let n=e?.fetch;if(!n)return;let r=await hg(n,e);if(!r)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=r[t.method||"select"];if(!O(s))return;let i={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};t.responseType!==void 0&&(i.responseType=t.responseType);let a=await s(i);if(a?.data!==void 0&&!a?.error&&!gg(t)){let c=qi(o,a.data,null);c.gcTime=pg(t.cache)?.gcTime||3e5}return a},getCache:()=>qt,clear:()=>nf(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[n]of qt)n.match(/:([a-z]{2,3})$/i)&&(n.endsWith(e)||nf(n))}},mg={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Io.clear(),Xi(e,t,t.state,t.context))}},hO=Xi});function Qi(t){let e=this,{__ref:n}=e,r=[].concat(t),o=n.root[r[0]];if(!r||!r.length)return console.log(r,"on",e.key,"is undefined");for(;o.key===r[0]&&(r.shift(),!!r.length);)if(o=o[r[0]],!o)return;return o}function bg(t){let e=this,{parent:n}=e;if(O(t))return n.state&&t(n,n.state,n.context)?n:n.parent?n.lookup(t):void 0;if(e[t])return e[t];for(;n.param!==t;){if(n[t])return n[t];if(n=n.parent,!n)return}return n}function _g(t){let e=this,{__ref:n}=e,r=n?.__children;if(r)for(let o=0;o<r.length;o++){let s=r[o],i=e[s];if(s===t)return i;if(O(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function xg(t,e=[]){let n=this,{__ref:r}=n,o=r?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=n[i];if(i===t)e.push(a);else if(O(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function ff(t={}){let e=this;if(e.node?.style){for(let n in t){let r=t[n],o=e[n];if(v(r)&&o)ff.call(o,r);else if(r!=null){let s=n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(r).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function Fw(t){let e=this;if(gn("beforeRemove",e,t)===!1)return e;O(e.node.remove)?e.node.remove():Bn()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=ui(e.parent.__ref.__children,e.key)),gn("remove",e,t)}function wg(t){return this[t]}function Sg(t,e){let n=this;if(t)return n.update(t,e),n}function kg(t){return t?this.__ref&&this.__ref[t]:this.__ref}function vg(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function ta(){return this.getRef().path}function na(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=Mw();else if(n(this))e=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=O(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=Mw()),t?e?.[t]:e}function ra(t){let e=this?.__ref?.root||this.getRootState()?.__element;if(!e)throw new Error(`[smbls] getRoot() could not resolve a root element for "${this?.key||"<unknown>"}" \u2014 it has no __ref (never went through create()) and no root state is registered. Answering undefined here used to no-op silently for every caller.`);return Object.keys(e).length>0&&t?e[t]:e}function oa(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function sa(t){let e=this.getRoot()?.context;return t?e[t]:e}function ia(t){let e=this.context;return t?e[t]:e}function uf(){let t=this,e=[];for(let n in t)!Object.prototype.hasOwnProperty.call(t,n)||Fn.has(n)&&!mi.has(n)||e.push(n);return e}function df(t=[]){let e=this,n={},r=uf.call(e),o=r.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<r.length;i++){let a=r[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=O(c&&c.parse)?c.parse():c;n[a]=O(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;n[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];n[a]=u}else Rt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=c)}return n}function Ji(t=[],e=new WeakSet){let n=this;if(e.has(n))return;e.add(n);let r=df.call(n,t),o=t.length?new Set(t):null;for(let s in r){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(n,s))continue;let i=r[s];Array.isArray(i)?r[s]=i.map(a=>j(a)?Ji.call(a,t,e):a):j(i)&&(r[s]=Ji.call(i,t,e))}return r}function Fo(...t){if(zn!=="test"&&zn!=="development")return;let e=this,{__ref:n}=e;return console.groupCollapsed(e.key),t.length?t.forEach(r=>console.log(`%c${r}:
22
+ `,"font-weight: bold",e[r])):(console.log(n.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Eg(...t){(zn==="test"||zn==="development")&&console.log(...t)}function aa(...t){(zn==="test"||zn==="development")&&console.warn(...t)}function Lr(...t){if(zn==="test"||zn==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Fo.call(this),new Error(...t)}}function ca(){let t=this,{key:e,parent:n}=t,{__children:r}=n.__ref,o=r.indexOf(e),s=r[o+1];return n[s]}function la(t){let e=t||this,{key:n,parent:r}=e,{__children:o}=r.__ref;if(!o)return;let s=o.indexOf(n);return r[o[s-1]]}function fa(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let n=e.data.varCaches,r={},o;for(let s in t)t[s]!==n[s]&&(o=!0,r[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(r,it(n));for(let a in r)n[a]=r[a];return i},timeout:(s,i)=>{if(!o)return;let a=setTimeout(()=>{s(r),clearTimeout(a)},i)}}}function Ag(t,...e){let n=this.context,r=n.utils?.[t]||n.functions?.[t]||n.methods?.[t]||n.snippets?.[t];if(r&&!Ar(r))try{let o=r.call(this,...e);return o&&typeof o.then=="function"&&o.catch(s=>{Lr.call(this,s)}),o}catch(o){if(Lr.call(this,o),n?.strictMode)throw o}}async function ua(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:o}=await cf();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await cf();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let n=cf().then(({resolveDb:o})=>o(e));e.__resolving=n;let r=await n;if(e.__resolved=r,t.context.fetch=r,delete e.__resolving,r?.getSession){let{initAdapterAuth:o}=await cf();await o(r,t.context)}return r}function da(t){let e=this,n=t||zi.useStateQuery||e.context?.useStateQuery;if(!n)return null;let r={};if(yg(e,r),n===!0)return r;let o=SO[n];return o?o(r):r}function Tg(t,e){return!!(jn.has(t)||e?.context?.methods?.[t])}var zn,lf,ea,Mo,Mw,Cg,gO,cf,yg,mO,Nw,yO,bO,_O,xO,wO,SO,jw=V(()=>{"use strict";og();vr();Lt();hn();kl();Co();ig();zn="production";lf=null,ea=t=>{lf=t||null},Mo=(t,e)=>{t&&e&&lf===t&&(lf=e)},Mw=()=>lf||null;Cg=(t,e,n,r)=>Object.defineProperty(t,e,{get:n,set:r});gO="[smbls] getDB needs @symbo.ls/fetch, which the smbls embed bundle does not include: add @symbo.ls/fetch to the page's importmap (the runtime import then resolves) or use the full smbls bundle.",cf=()=>Promise.resolve().then(()=>(Zi(),af)).catch(t=>{throw new Error(gO,{cause:t})});yg=(t,e)=>{let n=t.__ref;if(!n)return;let r=n.__state;r&&typeof r=="string"&&mO(e,r);let o=n.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&yg(c,e)}let s=n.contentElementKey||"content",i=t[s];i&&i.__ref&&yg(i,e)},mO=(t,e)=>{let r=e.replaceAll("../","").replaceAll("~/","").split("/"),o=t;for(let s=0;s<r.length;s++){let i=r[s];s===r.length-1?o[i]||(o[i]=!0):(o[i]===!0&&(o[i]={}),o[i]||(o[i]={}),o=o[i])}},Nw=(t,e=0)=>{let n=" ".repeat(e),r=Object.entries(t);return r.length?r.map(([s,i])=>i===!0?`${n}${s}`:`${n}${s} {
23
+ ${Nw(i,e+1)}
24
24
  ${n}}`).join(`
25
- `):""},mO=t=>`{
26
- ${Fw(t,1)}
27
- }`,yO=t=>{let e={fields:{},include:[]},n=(r,o)=>{let s=[];for(let i in r)if(r[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),n(r[i],a)}s.length&&(e.fields[o||"_root"]=s)};return n(t,""),e},bO=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=e(s[c]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),a.push(f.length?`${c}(${f.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:n,expand:r}=e(t),o=[];return n&&o.push(`$select=${n}`),r&&o.push(`$expand=${r}`),o.join("&")},_O=(t,e)=>{let n=[],r=[],o=new Set,s=(f,u,d)=>{o.add(u),d&&r.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?n.push(`${u}.${h}`):s(f[h],h,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...o][0]||"_root",c=n.length?n.join(", "):"*",l=r.length?`
25
+ `):""},yO=t=>`{
26
+ ${Nw(t,1)}
27
+ }`,bO=t=>{let e={fields:{},include:[]},n=(r,o)=>{let s=[];for(let i in r)if(r[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),n(r[i],a)}s.length&&(e.fields[o||"_root"]=s)};return n(t,""),e},_O=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=e(s[c]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),a.push(f.length?`${c}(${f.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:n,expand:r}=e(t),o=[];return n&&o.push(`$select=${n}`),r&&o.push(`$expand=${r}`),o.join("&")},xO=(t,e)=>{let n=[],r=[],o=new Set,s=(f,u,d)=>{o.add(u),d&&r.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?n.push(`${u}.${h}`):s(f[h],h,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...o][0]||"_root",c=n.length?n.join(", "):"*",l=r.length?`
28
28
  `+r.join(`
29
29
  `):"";return`SELECT ${c}
30
- FROM ${a}${l}`},xO=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;r[s]===!0?e.push(i):n(r[s],i)}};return n(t,""),e},wO={graphql:mO,"json-api":yO,odata:bO,sql:_O,paths:xO}});var SO,Og,jw=V(()=>{"use strict";wl();SO={snapshotId:vi},Og=(t,e)=>{let n=t.__ref,{currentSnapshot:r,calleeElement:o}=e;if(!o||o===t){let a=SO.snapshotId();return n.__currentSnapshot=a,[a,t]}let i=o.__ref.__currentSnapshot;return r<i?[i,o,!0]:[i,o]}});var pf,Rg,Bw=V(()=>{pf=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Rg=t=>typeof t=="string"&&pf.has(t)});async function Pg(t){if(document.fullscreenElement)await document.exitFullscreen();else try{await(this.node||document).requestFullscreen()}catch(e){console.warn(`Error attempting to enable fullscreen mode: ${e.message} (${e.name})`)}}var Vw=V(()=>{"use strict"});var No,jo,pa,Se,Hn,Bo,ha,Me,hf,kO,Wn,vO,Lr,$r,Dg,Uw=V(()=>{"use strict";No=t=>t!=="latest"?`@${t}`:"",jo=t=>t?`/${t}`:"",pa=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let n=e.split("/"),r=e.startsWith("@")?2:1;return{name:n.slice(0,r).join("/"),subpath:n.slice(r).join("/")}},Se={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,n)=>`${Se.skypack.url}/${t}${No(e)}${jo(n)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,n)=>`${Se.esmsh.url}/${t}${No(e)}${jo(n)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,n)=>`${Se.unpkg.url}/${t}${No(e)}${jo(n)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,n)=>`${Se.jsdelivr.url}/${t}${No(e)}${jo(n)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,n)=>`${Se.symbols.url}/${t}${No(e)}${jo(n)}/+esm`}},Hn={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},Bo=(t={})=>{let{packageManager:e}=t;return Hn[e]||null},ha=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Me=(t,e="latest",n="esmsh")=>{let r=Se[n]||Se.esmsh,{name:o,subpath:s}=pa(t);return r.formatUrl(o||t,ha(e),s)},hf=(t,e="latest",n="esmsh")=>{let r=Se[n]||Se.esmsh,o=ha(e),{name:s,subpath:i}=pa(t);return`${r.url}/${s||t}${No(o)}${jo(i)}/`},kO=/^node:|^@symbo-ls\//,Wn=t=>typeof t=="string"&&kO.test(t),vO=/[<>…]/,Lr=t=>typeof t=="string"&&vO.test(t),$r=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Dg=(t,e="skypack",n={})=>{let r=t.dependencies;if(!$r(r))return"";let o=Object.keys(r);if(!o.length)return"";let s=n.pin||{},i={};for(let f of o){if(Wn(f)||Lr(f))continue;let u=s[f]||r[f]||"latest";i[f]=Me(f,u,e),f.endsWith("/")||(i[f+"/"]=hf(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
30
+ FROM ${a}${l}`},wO=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;r[s]===!0?e.push(i):n(r[s],i)}};return n(t,""),e},SO={graphql:yO,"json-api":bO,odata:_O,sql:xO,paths:wO}});var kO,Og,Bw=V(()=>{"use strict";wl();kO={snapshotId:vi},Og=(t,e)=>{let n=t.__ref,{currentSnapshot:r,calleeElement:o}=e;if(!o||o===t){let a=kO.snapshotId();return n.__currentSnapshot=a,[a,t]}let i=o.__ref.__currentSnapshot;return r<i?[i,o,!0]:[i,o]}});var pf,Rg,Vw=V(()=>{pf=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Rg=t=>typeof t=="string"&&pf.has(t)});async function Pg(t){if(document.fullscreenElement)await document.exitFullscreen();else try{await(this.node||document).requestFullscreen()}catch(e){console.warn(`Error attempting to enable fullscreen mode: ${e.message} (${e.name})`)}}var Uw=V(()=>{"use strict"});var No,jo,pa,Se,Hn,Bo,ha,Fe,hf,vO,Wn,CO,Ir,$r,Dg,zw=V(()=>{"use strict";No=t=>t!=="latest"?`@${t}`:"",jo=t=>t?`/${t}`:"",pa=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let n=e.split("/"),r=e.startsWith("@")?2:1;return{name:n.slice(0,r).join("/"),subpath:n.slice(r).join("/")}},Se={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,n)=>`${Se.skypack.url}/${t}${No(e)}${jo(n)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,n)=>`${Se.esmsh.url}/${t}${No(e)}${jo(n)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,n)=>`${Se.unpkg.url}/${t}${No(e)}${jo(n)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,n)=>`${Se.jsdelivr.url}/${t}${No(e)}${jo(n)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,n)=>`${Se.symbols.url}/${t}${No(e)}${jo(n)}/+esm`}},Hn={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},Bo=(t={})=>{let{packageManager:e}=t;return Hn[e]||null},ha=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Fe=(t,e="latest",n="esmsh")=>{let r=Se[n]||Se.esmsh,{name:o,subpath:s}=pa(t);return r.formatUrl(o||t,ha(e),s)},hf=(t,e="latest",n="esmsh")=>{let r=Se[n]||Se.esmsh,o=ha(e),{name:s,subpath:i}=pa(t);return`${r.url}/${s||t}${No(o)}${jo(i)}/`},vO=/^node:|^@symbo-ls\//,Wn=t=>typeof t=="string"&&vO.test(t),CO=/[<>…]/,Ir=t=>typeof t=="string"&&CO.test(t),$r=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Dg=(t,e="skypack",n={})=>{let r=t.dependencies;if(!$r(r))return"";let o=Object.keys(r);if(!o.length)return"";let s=n.pin||{},i={};for(let f of o){if(Wn(f)||Ir(f))continue;let u=s[f]||r[f]||"latest";i[f]=Fe(f,u,e),f.endsWith("/")||(i[f+"/"]=hf(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
31
31
  "imports": ${JSON.stringify(i,null,2)}
32
- }`;return`${a}${l}${c}`}});var Ig,zw=V(()=>{"use strict";Ig=t=>{if(!t)return"";let e=new Date(t),n=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),r=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${r}, ${n}`}});var Lg,Hw=V(()=>{"use strict";Lg=(t,e)=>{let n=setTimeout(()=>{let{props:r}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(r.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(n)})}});var $g,Ww=V(()=>{"use strict";$g=function(e){let n=[0,1];for(let r=2;r<=e;r++)n[r]=n[r-1]+n[r-2];return n[e]}});var Mg,qw=V(()=>{"use strict";Mg=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Vo(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=r.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},r.head.appendChild(a)})}async function Ug(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=r.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},r.head.appendChild(a)})}var Fg,Ng,jg,Bg,Vg,Kw=V(()=>{"use strict";Fg=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("script");i.type=r,i.async=e,i.src=t,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),n.body.appendChild(i)}catch(i){s(i)}}),Ng=(t,e=document,n="text/javascript")=>new Promise((r,o)=>{let s=e.createElement("script");s.type=n,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),r()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),jg=(t,e=document,n,r="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=r,s.text=o.responseText,e.body.appendChild(s),typeof n=="function"&&n()}else throw new Error(`Failed to load the script ${t}`)},Bg=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),n.head.appendChild(i)}catch(i){s(i)}}),Vg=(t,e=!1,n=document,r="text/javascript",o="smbls-script")=>{try{let s=n.createElement("script");s.type=r,s.async=e,s.id=o,s.innerHTML=t,n.body.appendChild(s)}catch(s){console.warn(s)}}});function TO(t,e){if(!e||typeof e!="object")return t;let n=o=>{if(!AO(o))return o;let s=e[o];return s?.src?s.src:o},r={...t};for(let[o,s]of Object.entries(r))typeof s=="string"?r[o]=n(s):Array.isArray(s)&&(r[o]=s.map(i=>typeof i=="string"?n(i):i));return r}function gf(t,e){if(!t||!e)return;let n=e.split("."),r=t;for(let o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}function OO(t,e,n){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=n?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=n?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,p)=>{let g=h.trim();if(p==="polyglot")return a[g]??gf(a,g)??d;if(p==="getLocalStateLang")return gf(c,g+s)??d;let m=gf(c,g);return m!==void 0?m:a[g]??gf(a,g)??d}));return l}function Gw(t){if(!v(t))return{};let e={...t};for(let[n,r]of Object.entries(e))if(typeof r=="function"){let o=r.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[n]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[n]=`{{ ${a[1]} }}`;continue}delete e[n]}else if(typeof r=="string"){let o=r.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[n]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=r.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | polyglot }}`;continue}if(r.includes("=>")&&r.includes("s.")){let i=r.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[n]=`{{ ${i[1]} }}`;continue}}Ai(r)&&delete e[n]}return e}function Hg(t,e,n,{isProduction:r=!1,channel:o="production"}={}){let s=t.pages?.[e],i=v(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=Gw(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=Gw(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let g=t.name||t.key;g?r?d.title=g:o==="development"?d.title=`${g} / dev:symbo.ls`:o==="staging"?d.title=`${g} / staging:symbo.ls`:d.title=`${g} / symbo.ls`:d.title="Symbols demo"}d=OO(d,t,n),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let h=n?.actualPathname||e;if(d["og:url"]||d.url){let g=(d["og:url"]||d.url||"").replace(/\/$/,"");if(g&&h&&h!=="/"){let m=h.startsWith("/")?h:"/"+h;d["og:url"]=g+m}}d=TO(d,t.files);let p=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[g,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let y=m.replace(/\{\{[^}]*\}\}/g,"").trim();y?d[g]=y:g==="title"?d[g]=p:delete d[g]}return d}var Lt,CO,Uo,EO,mf,zg,AO,Yw=V(()=>{"use strict";It();Rr();Lt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,n=>e[n])},CO=t=>Object.entries(t||{}).filter(([e,n])=>n!==void 0).map(([e,n])=>`${e}="${Lt(n)}"`).join(" "),Uo=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},EO=new Set(["jsonLd","styles","scripts"]),mf=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let r=typeof n=="string"?n:JSON.stringify(n),o=String(r).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Uo(r)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let r=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Uo(r)}">${r}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let r=typeof n=="string",o=r?n:n.src;if(!o&&!n.body)continue;let s=[];o&&s.push(`src="${Lt(o)}"`),r||(n.type&&s.push(`type="${Lt(n.type)}"`),n.async&&s.push("async"),n.defer&&s.push("defer"),n.integrity&&s.push(`integrity="${Lt(n.integrity)}"`),n.crossorigin&&s.push(`crossorigin="${Lt(n.crossorigin)}"`),n.referrerpolicy&&s.push(`referrerpolicy="${Lt(n.referrerpolicy)}"`),n.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Lt(o||Uo(n.body||""))}"`;if(!r&&n.body){let a=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},zg=(t,e)=>{e||(t={...t,robots:"noindex"});let n=Object.entries(t).reduce((r,[o,s])=>{if(!s&&s!==0&&s!==!1||EO.has(o))return r;if(o==="title")return r.push(`<title>${Lt(s)}</title>`),r;if(o==="canonical")return r.push(`<link rel="canonical" href="${Lt(s)}">`),r;if(o==="manifest")return r.push(`<link rel="manifest" href="${Lt(s)}">`),r;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")r.push(`<link rel="icon" href="${Lt(f)}">`);else if(typeof f=="object"){let u=CO(f);/rel=/.test(u)?r.push(`<link ${u}>`):r.push(`<link rel="icon" ${u}>`)}}),r;if(o==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Lt(h)}"`).join(" ");r.push(`<link rel="alternate" ${u}>`)}}),r;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")r.push(`<meta ${u}="${Lt(l)}" content="${Lt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")r.push(`<meta ${u}="${Lt(l)}" content="${Lt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([p,g])=>g!==void 0).map(([p,g])=>`${p}="${Lt(g)}"`).join(" ");r.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,p])=>p!==void 0).map(([h,p])=>`${h}="${Lt(p)}"`).join(" ");r.push(`<meta ${d}>`)}};if(o.startsWith("http-equiv:")){let l=o.replace("http-equiv:","");return i(l,s,"http-equiv"),r}if(o.startsWith("itemprop:")){let l=o.replace("itemprop:","");return i(l,s,"itemprop"),r}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>o.startsWith(l));if(c){let l=o.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),r}if(o.startsWith("apple:")||o.startsWith("msapplication:")){let l=o.startsWith("apple:")?"apple-":"msapplication-",f=o.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),r}return i(o,s),r},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return n.push(...mf(t)),n.join(`
33
- `)},AO=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var yf,Wg,Xw=V(()=>{"use strict";It();yf=(t,e)=>(R(e)?e:Object.values(e)).reduce((n,r)=>Math.abs(r-t)<Math.abs(n-t)?r:n),Wg=(t,e)=>(t=parseFloat(t),v(e)&&(e=Object.values(e)),yf(t,e))});function zo(t){let e=String(t||"").trim();if(!e)return{owner:Zw,key:"",full:""};let n=null,r=e;if(e.includes("/")){let s=e.indexOf("/");n=e.slice(0,s),r=e.slice(s+1)}r=r.replace(/\.symbo\.ls$/iu,""),n||(n=Zw);let o=r?`${n}/${r}`:"";return{owner:n,key:r,full:o}}async function bf(t,e={}){if((e.provider||"kv")==="api")return Qw(t,e);let r=await VO(t,e);return r||Qw(t,e)}async function VO(t,e={}){let n=e.kvBaseUrl||RO,r=e.env||"production",o=`${n}/kv/${encodeURIComponent(t)}?env=${r}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function Qw(t,e={}){let n=e.apiBaseUrl||PO,{key:r}=zo(t);try{let o=`${n}/core/projects/libraries/available?search=${encodeURIComponent(r)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:p}=zo(h?.key);return p.toLowerCase()===r.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${n}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function tS(t,e={}){if(v(t))return t;if(S(t)){let{full:n}=zo(t);if(!n)return null;try{let r=await bf(n,e);return r||console.warn(`[smbls] Shared library "${n}" not found`),r}catch(r){return console.warn(`[smbls] Failed to fetch shared library "${n}":`,r.message),null}}return null}async function Yg(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async r=>{if(tn(r)){let o=await tS(rS(r),e);return o?{library:o,ignoreList:r.ignoreList}:null}return tS(r,e)}))).filter(Boolean)}var Zw,RO,PO,ga,eS,DO,IO,Jw,nS,LO,$O,MO,qn,Kg,tn,rS,qg,Gg,FO,NO,jO,BO,ma,oS=V(()=>{"use strict";It();vr();kl();Zw="system",RO="https://smbls-kv.nika-980.workers.dev",PO="https://api.symbols.app";ga=(t,e,n,r)=>{for(let o in e){let s=r?`${r}/${o}`:o;n&&n.has(s)||(o in t?v(t[o])&&v(e[o])&&ga(t[o],e[o],n,s):t[o]=e[o])}},eS=(t,e,n)=>{if(!v(t)||!e.size)return t;let r=`${n}/`,o=!1;for(let i of e)if(i.startsWith(r)){o=!0;break}if(!o)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${n}/${i}`;e.has(a)||(s[i]=eS(t[i],e,a))}return s},DO=new Set,IO=new Set(["components","pages","functions","snippets","methods"]),Jw=(t,e)=>e===""&&IO.has(t),nS=["fontFamily","fontfamily","font_family","FONT_FAMILY"],LO=t=>{let e=new Map;if(!v(t))return e;for(let n of nS){let r=t[n];if(v(r))for(let o in r)!v(r[o])||!r[o].isDefault||(e.has(n)||e.set(n,new Set),e.get(n).add(o))}return e},$O=(t,e)=>{for(let n of nS){let r=t[n];if(!v(r))continue;let o=e.get(n),s=null;for(let i in r){let a=r[i];if(!v(a)||!a.isDefault||o&&o.has(i))continue;let c={...a};delete c.isDefault,s||(s={...r}),s[i]=c}s&&(t[n]=s)}},MO=t=>t.replace(/\.js$/iu,""),qn=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let n of t){if(!S(n))continue;let r=n.split("/").map(o=>MO(o.trim())).filter(Boolean).join("/");r&&e.add(r)}return e},Kg=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),tn=t=>v(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),rS=t=>t.library!==void 0?t.library:t.key??t.name,qg=new Set,Gg=()=>{qg.clear()},FO=(t,e)=>{let n=e.filter(r=>!qg.has(r));if(n.length){for(let r of n)qg.add(r);ht()&&console.warn(`[smbls] shared library "${t}" ships ${n.map(r=>`methods.${r}`).join(", ")} \u2014 named like a built-in element method. Refused: the built-in wins; a library cannot replace an element method on the consuming app. If the app wants this version, declare it in the app's OWN methods.`)}},NO=(t,e,n)=>{let r=null;for(let o in t)if(kr(o)&&(e.has(`methods/${o}`)||n.push(o),!r)){r={};for(let s in t)kr(s)||(r[s]=t[s])}return r||t},jO=(t,e,n,r="library")=>{let o=qn(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let s=o.size?new Set([...n,...o]):n,i=[];for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&!(a==="sharePages"||a==="sharedLibIgnore")&&a!=="app"&&!s.has(a)){if(v(e[a])&&v(t[a])){if(a==="designSystem")ga(t[a],e[a],s,a);else for(let c in e[a])if(!s.has(`${a}/${c}`)){if(a==="methods"&&kr(c)){c in t[a]||i.push(c);continue}c in t[a]?Jw(a,t[a][c])&&!Jw(a,e[a][c])&&(t[a][c]=e[a][c]):t[a][c]=e[a][c]}}else if(!(a in t)){let c=e[a],l=a==="methods"&&c&&typeof c=="object"?NO(c,s,i):c;t[a]=eS(l,s,a)}}i.length&&FO(r,i)},BO=(t,e,n)=>{if(t!==e){let r=rS(t);if(S(r)&&r)return r;if(t.key||t.name)return t.key||t.name}return e&&(e.key||e.name)||`sharedLibraries[${n}]`},ma=(t,e)=>{if(!e||!e.length)return;let n=LO(t.designSystem);for(let r=0;r<e.length;r++){let o=e[r],s=o,i=DO;tn(s)&&(i=qn(s.ignoreList),s=s.library),v(s)&&jO(t,s,i,BO(o,s,r))}n.size&&$O(t.designSystem,n)}});var Xg,Zg,Jg,ya,Qg,ba,tm,Mr,sS=V(()=>{"use strict";It();Xg=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Zg=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),n=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([n]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},Jg=t=>t.replace(/[^a-zA-Z0-9_]/g,""),ya=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,n){return n===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),Qg=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),ba=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),tm=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},Mr=t=>{if(R(t))return t;if(S(t))return t.split(" ");if(v(t))return Object.values(t);if(Ke(t))return[t]}});var em,iS=V(()=>{"use strict";em=()=>{let t=document.styleSheets[0],e="";if(t)try{let n=t.cssRules||t.rules;for(let r=0;r<n.length;r++)e+=n[r].cssText}catch(n){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",n)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Qt,Ho,_a,xa,aS=V(()=>{"use strict";Qt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let n=t.context;if(!n)return null;let r=n.assets&&n.assets[e]||n.files&&n.files[e];if(!r)return null;if(typeof r=="string")return{src:r,type:null,variants:null};if(typeof r=="object"){if(typeof r.src=="string")return r;let o=r.content,s=o&&o.src;if(typeof s=="string")return{...r,src:s,type:r.type??o.type??null,variants:r.variants??o.variants??null}}return null},Ho=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let n=t.some(o=>typeof o.width=="number"),r=[];for(let o of t)n&&typeof o.width=="number"?r.push(`${o.src} ${o.width}w`):n||(o.scale===1&&e?r.push(o.src):o.scale&&o.scale!==1&&r.push(`${o.src} ${o.scale}x`));return r.join(", ")},_a=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(n=>n.format===t.type);return Ho(e,{keepOneX:!1})},xa=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let n=new Map;for(let a of t.variants)n.has(a.format)||n.set(a.format,[]),n.get(a.format).push(a);let r=[];for(let[a,c]of n)a!==t.type&&r.push({tag:"source",attr:{type:a,srcset:Ho(c,{keepOneX:!0})}});let o=n.get(t.type)||[],s=Ho(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...r,{tag:"img",attr:i}]}});var Wo={};$(Wo,{CDN_PROVIDERS:()=>Se,DOMQL_EVENTS:()=>Gp,DOMQ_PROPERTIES:()=>Fn,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Eo,ENV:()=>dh,HTML_TAGS:()=>Oo,METHODS:()=>jn,METHODS_EXL:()=>yi,NODE_ENV:()=>Le,OPTIONS:()=>zi,PACKAGE_MANAGER_TO_CDN:()=>Hn,PARSED_DOMQ_PROPERTIES:()=>mi,PROPS_METHODS:()=>Nn,STATE_METHODS:()=>Sr,STATE_PROPERTIES:()=>qp,SVG_TAGS:()=>ew,TYPES:()=>li,UNIVERSAL_RESERVED_KEYS:()=>pf,__resetBuiltinMethodWarnings:()=>Gg,addCaching:()=>Wl,addContext:()=>Hl,addExtend:()=>$h,addExtends:()=>Ye,addItemAfterEveryElement:()=>Ip,addProtoToArray:()=>di,addRef:()=>Vl,applyDependentState:()=>tg,applyEvent:()=>Zl,applyEventUpdate:()=>Jl,applyExtends:()=>ow,applyProps:()=>Mi,arrayContainsOtherArray:()=>Ep,arraysEqual:()=>$p,arrayzeValue:()=>Mr,buildImgSrcset:()=>_a,buildSourcesAndImg:()=>xa,cache:()=>sg,call:()=>Ag,captureSnapshot:()=>Og,checkForStateTypes:()=>Xh,checkIfInherits:()=>Xl,checkIfStringIsInArray:()=>Np,clone:()=>Zp,cloneAndMergeArrayExtend:()=>Ti,cloneFunction:()=>_h,collectExtendsList:()=>Ro,concatAddExtends:()=>Dh,copyJavaScriptToClipboard:()=>Zg,copyStringToClipboard:()=>Xg,createBasedOnType:()=>Bl,createElement:()=>Yh,createElementExtends:()=>Tl,createExtends:()=>Ri,createExtendsFromKeys:()=>Po,createExtendsStack:()=>Dl,createIfConditionFlag:()=>xh,createInheritedState:()=>Zh,createKey:()=>Ci,createNestedObject:()=>sh,createNestedObjectByKeyPath:()=>Qh,createObjectWithoutPrototype:()=>xl,createParent:()=>Ul,createPath:()=>zl,createProps:()=>Fi,createPropsStack:()=>Nl,createRoot:()=>Gh,createScope:()=>ng,createSnapshotId:()=>vi,customDecodeURIComponent:()=>Wp,customEncodeURIComponent:()=>Hp,cutArrayAfterValue:()=>Pp,cutArrayBeforeValue:()=>Rp,debounce:()=>Ei,debounceOnContext:()=>yh,decodeNewlines:()=>zp,deepClone:()=>it,deepContains:()=>rh,deepDefaults:()=>ga,deepDestringifyFunctions:()=>_e,deepExtend:()=>Al,deepMerge:()=>ot,deepMergeExtends:()=>Xe,deepStringifyFunctions:()=>_i,defineSetter:()=>Cg,destringifyGlobalScope:()=>wi,detectHeightOnInit:()=>Lg,detectInfiniteLoop:()=>lh,document:()=>nt,encodeNewlines:()=>Up,error:()=>Ir,excludeKeysFromObject:()=>uh,exec:()=>ut,extendCachedRegistry:()=>Ih,extendStackRegistry:()=>Pi,extractArrayExtend:()=>Ii,fetchLibraryData:()=>bf,fibonacciNumberByIndex:()=>$g,filterArrays:()=>Mp,filterArraysFast:()=>Fp,finalizeExtends:()=>Il,findClosestNumber:()=>yf,findClosestNumberInFactory:()=>Wg,findInheritedState:()=>Yl,findKeyPosition:()=>Bp,flattenExtend:()=>Do,formatDate:()=>Ig,generateHash:()=>vl,generateHeadArrayTags:()=>mf,generateKey:()=>ki,generateMetaTags:()=>zg,get:()=>wg,getCDNDirUrl:()=>hf,getCDNUrl:()=>Me,getCapitalCaseKeys:()=>Nh,getCdnProviderFromConfig:()=>Bo,getChildStateInKey:()=>Gl,getChildren:()=>vg,getContext:()=>ia,getCookie:()=>Ch,getDB:()=>ua,getEmotionStylesheet:()=>em,getExtendsInElement:()=>Mh,getExtendsStack:()=>Oi,getExtendsStackRegistry:()=>El,getFrequencyInArray:()=>Ap,getFunctionSource:()=>Ie,getHashedExtend:()=>Di,getImportMapScript:()=>Dg,getInObjectByPath:()=>ch,getLocalStorage:()=>Ah,getNev:()=>mh,getPageMetadata:()=>Hg,getParentStateInKey:()=>Kl,getPath:()=>ta,getQuery:()=>da,getRef:()=>kg,getRoot:()=>ra,getRootContext:()=>sa,getRootData:()=>oa,getRootState:()=>na,getRootStateInKey:()=>ql,getSpreadChildren:()=>jh,global:()=>kp,hasFunction:()=>Ge,hasHandlerPlugin:()=>Ao,hasOwnProperty:()=>th,hashContent:()=>Uo,inheritChildExtends:()=>Rl,inheritChildPropsExtends:()=>Ol,inheritParentProps:()=>Ni,inheritRecursiveChildExtends:()=>Pl,initProps:()=>Wh,is:()=>Jt,isArray:()=>R,isBoolean:()=>pl,isBuiltinElementMethod:()=>Kp,isContextComponent:()=>Bh,isCyclic:()=>fh,isDOMNode:()=>Zt,isDate:()=>gl,isDefined:()=>Rt,isDevelopment:()=>Vn,isEmpty:()=>bl,isEmptyObject:()=>eh,isEqualDeep:()=>_l,isFailedRevival:()=>Ar,isFunction:()=>O,isHtmlElement:()=>ai,isLazyFunction:()=>Jp,isLocal:()=>gh,isLoudDevRuntime:()=>ht,isMalformedDependency:()=>Lr,isMethod:()=>Tg,isMobile:()=>kh,isNode:()=>pn,isNot:()=>Cp,isNotProduction:()=>Or,isNull:()=>hl,isNumber:()=>Ke,isObject:()=>v,isObjectLike:()=>j,isPhoto:()=>Mg,isPolyglotRetranslatableKey:()=>Ui,isPolyglotWritableKey:()=>Pr,isProduction:()=>Bn,isProtectedElementMethod:()=>kr,isStaging:()=>hh,isState:()=>Jh,isString:()=>S,isStringFunction:()=>Ai,isTest:()=>Sl,isTesting:()=>ph,isUndefined:()=>Dt,isUniversallyReservedKey:()=>Rg,isUnresolvableDependency:()=>Wn,isValidDependencyMap:()=>$r,isValidHtmlTag:()=>Oh,isWrappedLibrary:()=>tn,joinArrays:()=>ko,jointStacks:()=>Lh,keys:()=>uf,loadCssFile:()=>Bg,loadJavascript:()=>Vg,loadJavascriptFile:()=>Fg,loadJavascriptFileEmbedSync:()=>jg,loadJavascriptFileSync:()=>Ng,loadRemoteCSS:()=>Ug,loadRemoteScript:()=>Vo,log:()=>Eg,logGroupIf:()=>Sh,logIf:()=>wh,lookdown:()=>_g,lookdownAll:()=>xg,lookup:()=>bg,lowercaseFirstLetter:()=>wr,makeObjectWithoutPrototype:()=>nh,map:()=>Xp,mapStringsWithContextComponents:()=>Li,markPolyglotSeeded:()=>Je,matchesComponentNaming:()=>Ze,memoize:()=>bh,merge:()=>bt,mergeSharedLibraries:()=>ma,nextElement:()=>ca,normalizeIgnoreList:()=>qn,normalizeLibraryKey:()=>zo,objectToString:()=>xi,objectizeStringProperty:()=>$i,overwrite:()=>Si,overwriteDeep:()=>Wt,overwriteShallow:()=>Tr,overwriteState:()=>eg,parse:()=>df,parseDeep:()=>Ji,pickupElementFromProps:()=>Ml,pickupPropsFromElement:()=>$l,polyglotSeededKeys:()=>Io,previousElement:()=>la,promoteActiveRootState:()=>Mo,propExists:()=>zh,propertizeElement:()=>Fl,propertizeUpdate:()=>Uh,remove:()=>Mw,removeChars:()=>Jg,removeCookie:()=>Eh,removeDuplicateProps:()=>Bi,removeDuplicatesInArray:()=>vo,removeFromArray:()=>Tp,removeFromObject:()=>oh,removeNestedKeyByPath:()=>ih,removeValueFromArray:()=>ui,removeValueFromArrayAll:()=>Dp,reorderArrayByValues:()=>Lp,replaceLiteralsWithObjectFields:()=>Mt,replaceOctalEscapeSequences:()=>Vp,resolveAsset:()=>Qt,resolveHandler:()=>To,resolveSharedLibraries:()=>Yg,returnValueAsText:()=>jl,runPluginHook:()=>Pt,self:()=>vp,setActiveRootState:()=>ea,setCookie:()=>vh,setHashedExtend:()=>Cl,setInObjectByPath:()=>ah,setLocalStorage:()=>Th,setNodeStyles:()=>ff,setProps:()=>Sg,setPropsPrototype:()=>ji,sharedLibrary:()=>Kg,splitPackageSpecifier:()=>pa,spotByPath:()=>Qi,srcsetFor:()=>Ho,stringIncludesAny:()=>hi,stringToObject:()=>Qp,stripVersionRangePrefix:()=>ha,swapItemsInArray:()=>Op,syncProps:()=>Vi,toCamelCase:()=>ya,toDashCase:()=>ba,toDescriptionCase:()=>tm,toPriorityOrder:()=>xe,toTitleCase:()=>Qg,toggleFullscreen:()=>Pg,triggerEventOn:()=>gn,triggerEventOnUpdate:()=>rg,trimStringFromSymbols:()=>jp,unstackArrayOfObjects:()=>fi,update:()=>Hh,updateProps:()=>qh,variables:()=>fa,verbose:()=>Fo,warn:()=>aa,window:()=>C});var D=V(()=>{"use strict";wl();kl();It();hn();Rr();Co();ci();Jx();Qx();gi();ii();tw();Rh();Fh();Kh();Ll();fw();gw();vr();mw();Nw();ig();jw();og();Bw();Vw();Uw();zw();Hw();Ww();qw();Kw();Yw();Xw();oS();sS();iS();aS()});var zE=op((gz,UE)=>{var zs=1e3,Hs=zs*60,Ws=Hs*60,po=Ws*24,$L=po*7,ML=po*365.25;UE.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return FL(t);if(n==="number"&&isFinite(t))return e.long?jL(t):NL(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function FL(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*ML;case"weeks":case"week":case"w":return n*$L;case"days":case"day":case"d":return n*po;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ws;case"minutes":case"minute":case"mins":case"min":case"m":return n*Hs;case"seconds":case"second":case"secs":case"sec":case"s":return n*zs;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function NL(t){var e=Math.abs(t);return e>=po?Math.round(t/po)+"d":e>=Ws?Math.round(t/Ws)+"h":e>=Hs?Math.round(t/Hs)+"m":e>=zs?Math.round(t/zs)+"s":t+"ms"}function jL(t){var e=Math.abs(t);return e>=po?Ad(t,e,po,"day"):e>=Ws?Ad(t,e,Ws,"hour"):e>=Hs?Ad(t,e,Hs,"minute"):e>=zs?Ad(t,e,zs,"second"):t+" ms"}function Ad(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var WE=op((mz,HE)=>{function BL(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=zE(),n.destroy=l,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return n.colors[Math.abs(u)%n.colors.length]}n.selectColor=e;function n(f){let u,d=null,h,p;function g(...m){if(!g.enabled)return;let y=g,x=Number(new Date),b=x-(u||x);y.diff=b,y.prev=u,y.curr=x,u=x,m[0]=n.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let _=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(k,A)=>{if(k==="%%")return"%";_++;let P=n.formatters[A];if(typeof P=="function"){let I=m[_];k=P.call(y,I),m.splice(_,1),_--}return k}),n.formatArgs.call(y,m),(y.log||n.log).apply(y,m)}return g.namespace=f,g.useColors=n.useColors(),g.color=n.selectColor(f),g.extend=r,g.destroy=n.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==n.namespaces&&(h=n.namespaces,p=n.enabled(f)),p),set:m=>{d=m}}),typeof n.init=="function"&&n.init(g),g}function r(f,u){let d=n(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?n.skips.push(d.slice(1)):n.names.push(d)}function s(f,u){let d=0,h=0,p=-1,g=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(p=h,g=d,h++):(d++,h++);else if(p!==-1)h=p+1,g++,d=g;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function i(){let f=[...n.names,...n.skips.map(u=>"-"+u)].join(",");return n.enable(""),f}function a(f){for(let u of n.skips)if(s(f,u))return!1;for(let u of n.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}HE.exports=BL});var qE=op((ce,Td)=>{ce.formatArgs=UL;ce.save=zL;ce.load=HL;ce.useColors=VL;ce.storage=WL();ce.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ce.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function VL(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function UL(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Td.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}ce.log=console.debug||console.log||(()=>{});function zL(t){try{t?ce.storage.setItem("debug",t):ce.storage.removeItem("debug")}catch{}}function HL(){let t;try{t=ce.storage.getItem("debug")||ce.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function WL(){try{return localStorage}catch{}}Td.exports=WE()(ce);var{formatters:qL}=Td.exports;qL.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var kx={};$(kx,{ANIMATION_PROPS:()=>vy,ARIA_ROLES:()=>dP,ATTR_TRANSFORMS:()=>Qr,BLOCK_PROPS:()=>Cy,CDN_PROVIDERS:()=>Se,COMPOUND_CSS_KEYWORDS:()=>Nr,CONFIG:()=>Ur,CONFIG_MERGE_EXL:()=>de,CSS_NAMED_COLOR_HEX:()=>_f,CSS_NATIVE_COLOR_REGEX:()=>fe,CSS_PROPS_REGISTRY:()=>wt,CSS_UNITS:()=>So,DEFAULT_CONFIG:()=>_c,DEFAULT_CSS_PROPERTIES_LIST:()=>Tt,DELEGATED_EVENTS:()=>gs,DESIGN_SYSTEM_OPTIONS:()=>a_,DOMQL_EVENTS:()=>Gp,DOMQ_PROPERTIES:()=>Fn,DOM_EVENTS:()=>b0,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Eo,ENV:()=>dh,FACTORY:()=>ue,FLEX_PROPS:()=>Ry,FONT_PROPS:()=>Ey,GRID_PROPS:()=>Py,HOST_REGISTERED_PACKAGES:()=>K1,HTML_ATTRIBUTES:()=>uu,HTML_TAGS:()=>Oo,LIFECYCLE_EVENTS:()=>or,METHODS:()=>jn,METHODS_EXL:()=>yi,MISC_PROPS:()=>Ay,MIXINS:()=>au,NODE_ENV:()=>Le,OPTIONS:()=>zi,PACKAGE_MANAGER_TO_CDN:()=>Hn,PARSED_DOMQ_PROPERTIES:()=>mi,POSITION_PROPS:()=>Ty,PROPS_METHODS:()=>Nn,REGISTRY:()=>Ut,RESERVED_STORE_METHODS:()=>Ix,ROUTER_OPTIONS:()=>Yu,SIGNAL_ENGINE_KEY:()=>xo,SIGNAL_INSTANCES_KEY:()=>bo,STANDARD_SCHEME_QUERIES:()=>Uf,STATE_PROPERTIES:()=>qp,STORE_METHOD_NAMES:()=>Dx,SVG_TAGS:()=>ps,THEME_PROPS:()=>Oy,TIMING_PROPS:()=>cc,TYPES:()=>li,UNIVERSAL_RESERVED_KEYS:()=>pf,VALUE_TRANSFORMERS:()=>Jf,VERSION:()=>$x,__resetBuiltinMethodWarnings:()=>Gg,__resetSignalEngine:()=>xp,__resetSignalInstances:()=>_p,__resetSkinWarnings:()=>Jm,__resetStateShadowWarnings:()=>Lx,activateConfig:()=>dS,addCaching:()=>Wl,addContext:()=>Hl,addDelegatedEvent:()=>ic,addExtend:()=>$h,addExtends:()=>Ye,addItemAfterEveryElement:()=>Ip,addMethods:()=>ws,addProtoToArray:()=>di,addRef:()=>Vl,aliasCaseVariants:()=>ts,animation:()=>Em,appendSVGSprite:()=>Ja,appendSvgIconsSprite:()=>Gr,applyAttrTransforms:()=>wy,applyCSS:()=>t_,applyDependentState:()=>tg,applyDocument:()=>Za,applyEvent:()=>Zl,applyEventUpdate:()=>Jl,applyExtends:()=>ys,applyHeadings:()=>Wf,applyInitialState:()=>ku,applyMediaSequenceVars:()=>Gn,applyProps:()=>Mi,applyReset:()=>Qa,applySequenceGlobalVars:()=>Ma,applySequenceVars:()=>xn,applySkins:()=>tc,applySpacingSequence:()=>Ba,applyStateMethods:()=>ye,applyTimingSequence:()=>Xa,applyTrueProps:()=>Iy,applyTypographySequence:()=>Ka,arrayContainsOtherArray:()=>Ep,arraysEqual:()=>$p,arrayzeValue:()=>Mr,assertEmitIntegrity:()=>fy,batch:()=>fl,breakpoints:()=>vm,buildImgSrcset:()=>_a,buildSkinVarStyles:()=>Yr,buildSourcesAndImg:()=>xa,buildThemeVarStyles:()=>Ku,cache:()=>sg,cacheNode:()=>rr,call:()=>Ag,callStateMethod:()=>fc,camelToAttr:()=>sn,camelToLowerAttr:()=>_0,captureSnapshot:()=>Og,changeGlobalTheme:()=>Qf,changeLightness:()=>am,checkAttributeByTagName:()=>Oe,checkEventFunctions:()=>xy,checkForStateTypes:()=>Xh,checkIfBoxSize:()=>ja,checkIfInherits:()=>Xl,checkIfStringIsInArray:()=>Np,class:()=>Pm,clone:()=>Zp,cloneAndMergeArrayExtend:()=>Ti,cloneFunction:()=>_h,collectExtendsList:()=>Ro,color:()=>ym,colorStringToRgbaArray:()=>ke,components:()=>Ts,compositeOverBackdrop:()=>jr,concatAddExtends:()=>Dh,contrastRatio:()=>Go,convertSvgToSymbol:()=>Na,copyJavaScriptToClipboard:()=>Zg,copyStringToClipboard:()=>Xg,create:()=>Sx,createAsync:()=>M$,createBasedOnType:()=>Bl,createComputed:()=>Rx,createConfig:()=>Oa,createDefine:()=>QC,createEffect:()=>G,createElement:()=>Yh,createElementExtends:()=>Tl,createExtends:()=>Ri,createExtendsFromKeys:()=>Po,createExtendsStack:()=>Dl,createHTMLNode:()=>ds,createIfConditionFlag:()=>xh,createInheritedState:()=>Zh,createKey:()=>Ci,createNestedObject:()=>sh,createNestedObjectByKeyPath:()=>Qh,createObjectWithoutPrototype:()=>xl,createParent:()=>Ul,createPath:()=>zl,createProps:()=>Fi,createPropsStack:()=>Nl,createRoot:()=>Gh,createScope:()=>ng,createScopeStore:()=>ul,createSignal:()=>oi,createSkeleton:()=>N$,createSnapshotId:()=>vi,createState:()=>zy,createStore:()=>fn,createSync:()=>F$,css:()=>ge,cssMediaVars:()=>Ff,cssVars:()=>Mf,customDecodeURIComponent:()=>Wp,customEncodeURIComponent:()=>Hp,cutArrayAfterValue:()=>Pp,cutArrayBeforeValue:()=>Rp,debounce:()=>Ei,debounceOnContext:()=>yh,decodeNewlines:()=>zp,deepClone:()=>it,deepContains:()=>rh,deepDefaults:()=>ga,deepDestringifyFunctions:()=>_e,deepExtend:()=>Al,deepMerge:()=>ot,deepMergeExtends:()=>Xe,deepStringifyFunctions:()=>_i,defaultDefine:()=>Is,defineResolvedThemeSignal:()=>Qo,defineSetter:()=>Cg,defineThemeSignal:()=>Jo,destringifyGlobalScope:()=>wi,destroy:()=>Cc,detectHeightOnInit:()=>Lg,detectInfiniteLoop:()=>lh,detectTag:()=>nr,devices:()=>Cm,dispose:()=>vn,encodeNewlines:()=>Up,error:()=>Ir,excludeKeysFromObject:()=>uh,exec:()=>ut,executeAttr:()=>mP,exetuteClassPerComponent:()=>GP,extendCachedRegistry:()=>Ih,extendStackRegistry:()=>Pi,extractArrayExtend:()=>Ii,extractConditionalAttrs:()=>_P,fetchLibraryData:()=>bf,fibonacciNumberByIndex:()=>$g,filterArrays:()=>Mp,filterArraysFast:()=>Fp,filterAttributesByTagName:()=>gP,finalizeExtends:()=>Il,findClosestNumber:()=>yf,findClosestNumberInFactory:()=>Wg,findHeadingLetter:()=>Bf,findHeadings:()=>$a,findInheritedState:()=>Yl,findKeyPosition:()=>Bp,flattenExtend:()=>Do,font:()=>um,fontFace:()=>hm,fontFamily:()=>dm,fontFamilyTypes:()=>pm,formatDate:()=>Ig,generateHash:()=>vl,generateHeadArrayTags:()=>mf,generateKey:()=>ki,generateMetaTags:()=>zg,generateSequence:()=>te,generateSequencePosition:()=>Nm,generateSprite:()=>Fa,generateSubSequence:()=>Ia,get:()=>wg,getActiveConfig:()=>T,getActiveDocument:()=>Jr,getActiveLang:()=>ur,getCDNDirUrl:()=>hf,getCDNUrl:()=>Me,getCacheSize:()=>dy,getCapitalCaseKeys:()=>Nh,getCdnProviderFromConfig:()=>Bo,getChildStateInKey:()=>Gl,getChildren:()=>vg,getColor:()=>et,getColorShade:()=>vf,getContext:()=>ia,getCookie:()=>Ch,getDB:()=>ua,getDefaultOrFirstKey:()=>Br,getEmitStats:()=>su,getEmotionStylesheet:()=>em,getExtendsInElement:()=>Mh,getExtendsStack:()=>Oi,getExtendsStackRegistry:()=>El,getFnPrefixAndValue:()=>_n,getFontFace:()=>lm,getFontFaceEach:()=>Vr,getFontFaceEachString:()=>Df,getFontFaceString:()=>Ca,getFontFamily:()=>qa,getFontFormat:()=>Rf,getFontSizeByKey:()=>Ga,getFrequencyInArray:()=>Ap,getFunctionSource:()=>Ie,getHashedExtend:()=>Di,getImportMapScript:()=>Dg,getInObjectByPath:()=>ch,getLanguages:()=>Ac,getLocalStateLang:()=>Dc,getLocalStorage:()=>Ah,getMediaColor:()=>$t,getMediaTheme:()=>Ae,getNev:()=>mh,getObserver:()=>Ln,getPageMetadata:()=>Hg,getParentStateInKey:()=>Kl,getPath:()=>ta,getQuery:()=>da,getRef:()=>kg,getResolvedThemeSignal:()=>uS,getRgbTone:()=>en,getRoot:()=>ra,getRootContext:()=>sa,getRootData:()=>oa,getRootState:()=>na,getRootStateInKey:()=>ql,getSafeInk:()=>zf,getSafeInkInfo:()=>Um,getSequenceValue:()=>zr,getSequenceValueBySymbols:()=>La,getSequenceValuePropertyPair:()=>rn,getShadow:()=>Ua,getShapeByKey:()=>Ya,getSignals:()=>Px,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>At,getSpreadChildren:()=>jh,getSubratio:()=>Da,getSubratioDifference:()=>Pa,getSystemGlobalTheme:()=>me,getTheme:()=>qm,getThemeSignal:()=>fS,getTimingByKey:()=>he,getTimingFunction:()=>Te,global:()=>kp,gradient:()=>bm,grid:()=>Rm,hasFunction:()=>Ge,hasHandlerPlugin:()=>Ao,hasOwnProperty:()=>th,hashContent:()=>Uo,hexToRgb:()=>rm,hexToRgbArray:()=>xf,hexToRgba:()=>sm,hslToRgb:()=>kf,icons:()=>wm,inheritChildExtends:()=>Rl,inheritChildPropsExtends:()=>Ol,inheritParentProps:()=>Ni,inheritRecursiveChildExtends:()=>Pl,init:()=>An,initPolyglot:()=>Ju,initProps:()=>Wh,injectGlobal:()=>xt,is:()=>Jt,isArray:()=>R,isBoolean:()=>pl,isBuiltinElementMethod:()=>Kp,isCSSVar:()=>_t,isContextComponent:()=>Bh,isCyclic:()=>fh,isDOMNode:()=>Zt,isDate:()=>gl,isDefined:()=>Rt,isDevelopment:()=>Vn,isDomDocument:()=>un,isEmpty:()=>bl,isEmptyObject:()=>eh,isEnumeratedTrueFalseAttr:()=>an,isEqualDeep:()=>_l,isFailedRevival:()=>Ar,isFunction:()=>O,isGoogleFontsUrl:()=>Yo,isHostObject:()=>dn,isHtmlElement:()=>ai,isLazyFunction:()=>Jp,isLocal:()=>gh,isLoudDevRuntime:()=>ht,isMalformedDependency:()=>Lr,isMethod:()=>Tg,isMobile:()=>kh,isNode:()=>pn,isNot:()=>Cp,isNotProduction:()=>Or,isNull:()=>hl,isNumber:()=>Ke,isObject:()=>v,isObjectLike:()=>j,isPhoto:()=>Mg,isPlainColor:()=>Zn,isPolyglotRetranslatableKey:()=>Ui,isPolyglotWritableKey:()=>Pr,isProduction:()=>Bn,isProtectedElementMethod:()=>kr,isRawUnitValue:()=>si,isResolvedColor:()=>Fe,isScalingUnit:()=>xr,isStaging:()=>hh,isState:()=>Jh,isStore:()=>St,isString:()=>S,isStringFunction:()=>Ai,isSvgTag:()=>hs,isTest:()=>Sl,isTesting:()=>ph,isTracking:()=>Wy,isUndefined:()=>Dt,isUniversallyReservedKey:()=>Rg,isUnresolvableDependency:()=>Wn,isValidDependencyMap:()=>$r,isValidHtmlTag:()=>Oh,isValidTag:()=>us,isWasmLoaded:()=>NC,isWrappedLibrary:()=>tn,isWritableFamilyBucket:()=>Sp,joinArrays:()=>ko,jointStacks:()=>Lh,keyframes:()=>fs,keys:()=>uf,linearChannelToSrgb:()=>Af,loadCssFile:()=>Bg,loadJavascript:()=>Vg,loadJavascriptFile:()=>Fg,loadJavascriptFileEmbedSync:()=>jg,loadJavascriptFileSync:()=>Ng,loadRemoteCSS:()=>Ug,loadRemoteScript:()=>Vo,loadTranslations:()=>Oc,loadWasm:()=>FC,log:()=>Eg,logGroupIf:()=>Sh,logIf:()=>wh,lookdown:()=>_g,lookdownAll:()=>xg,lookup:()=>bg,lowercaseFirstLetter:()=>wr,makeObjectWithoutPrototype:()=>nh,map:()=>Xp,mapStringsWithContextComponents:()=>Li,markPolyglotSeeded:()=>Je,matchesComponentNaming:()=>Ze,media:()=>gm,memoize:()=>bh,merge:()=>bt,mergeSharedLibraries:()=>ma,mixTwoColors:()=>nm,mixTwoRgb:()=>im,mixTwoRgba:()=>Cf,nextElement:()=>ca,normalizeIgnoreList:()=>qn,normalizeLibraryKey:()=>zo,numToLetterMap:()=>nn,objectToString:()=>xi,objectizeStringProperty:()=>$i,oklabToLinearSrgb:()=>Tf,oklabToOklch:()=>Sa,oklchToGamutSafeSrgb:()=>ka,oklchToOklab:()=>Of,opacify:()=>Ko,overwrite:()=>Si,overwriteDeep:()=>Wt,overwriteShallow:()=>Tr,overwriteState:()=>eg,parkHostObject:()=>Mn,parse:()=>df,parseColorToken:()=>Vt,parseDeep:()=>Ji,pickupElementFromProps:()=>Ml,pickupPropsFromElement:()=>$l,polyglotFunctions:()=>Hc,polyglotPlugin:()=>$s,polyglotSeededKeys:()=>Io,popConfig:()=>rt,popStaticCssPass:()=>gu,previousElement:()=>la,promoteActiveRootState:()=>Mo,propExists:()=>zh,propertizeElement:()=>Fl,propertizeUpdate:()=>Uh,pushConfig:()=>st,pushStaticCssPass:()=>hu,quietColorProbe:()=>Hr,refreshContextProto:()=>bu,registerEvent:()=>ms,registerHostPackages:()=>G1,registerSignalInstance:()=>_o,reinit:()=>Qb,relativeLuminance:()=>Fr,remove:()=>xs,removeChars:()=>Jg,removeCookie:()=>Eh,removeDelegatedEvent:()=>ac,removeDuplicateProps:()=>Bi,removeDuplicatesInArray:()=>vo,removeFromArray:()=>Tp,removeFromObject:()=>oh,removeNestedKeyByPath:()=>ih,removeValueFromArray:()=>ui,removeValueFromArrayAll:()=>Dp,reorderArrayByValues:()=>Lp,replaceLiteralsWithObjectFields:()=>Mt,replaceOctalEscapeSequences:()=>Vp,resetEmitStats:()=>ly,resolveAsset:()=>Qt,resolveBorderValue:()=>pe,resolveColorRgb:()=>Wr,resolveColorsInGradient:()=>nc,resolveConfigDocument:()=>wo,resolveDesignSystemClass:()=>P0,resolveFileSource:()=>_y,resolveFileUrl:()=>ve,resolveGridTracks:()=>E0,resolveHandler:()=>To,resolvePropValue:()=>sr,resolveShadowValue:()=>qr,resolveSharedLibraries:()=>Yg,returnSubThemeOrDefault:()=>cm,returnValueAsText:()=>jl,rgbArrayToHex:()=>wf,rgbToHSL:()=>Sf,rgbToHex:()=>om,runPluginHook:()=>Pt,runThroughMedia:()=>Hf,schemeGuardSelector:()=>Qn,schemeMediaQuery:()=>Jn,scratchDefaultConfig:()=>Zo,scratchSystem:()=>ss,scratchUtils:()=>Yn,self:()=>vp,semanticIcons:()=>Sm,sequence:()=>bn,serializeAttrValue:()=>ne,set:()=>Xr,setActiveConfig:()=>Nf,setActiveDocument:()=>cy,setActiveRootState:()=>ea,setAdaptiveSchemeVar:()=>tr,setClass:()=>bD,setClassname:()=>YP,setColor:()=>Xn,setCookie:()=>vh,setCssEngineHook:()=>qu,setCustomFont:()=>va,setCustomFontMedia:()=>Kn,setEach:()=>ey,setFont:()=>Wa,setFontFamily:()=>rs,setFontImport:()=>Xo,setGradient:()=>es,setHashedExtend:()=>Cl,setInCustomFontMedia:()=>Pf,setInObjectByPath:()=>ah,setLang:()=>Rc,setLocalStorage:()=>Th,setMediaTheme:()=>ns,setNodeStyles:()=>ff,setObserver:()=>$n,setProps:()=>Sg,setPropsPrototype:()=>ji,setSVG:()=>os,setScalingVar:()=>Ra,setShadow:()=>er,setSubScalingVar:()=>jf,setSvgIcon:()=>Kr,setTheme:()=>Ha,setValue:()=>ty,setVariables:()=>jm,setWasmEngine:()=>sc,shadow:()=>xm,shape:()=>Lm,sharedLibrary:()=>Kg,sizes:()=>Im,skins:()=>$m,spacing:()=>mm,splitPackageSpecifier:()=>pa,splitSpacedValue:()=>Va,splitTopLevelCommas:()=>yn,splitTopLevelSpaces:()=>dt,splitTransition:()=>Zf,spotByPath:()=>Qi,srcsetFor:()=>Ho,srgbChannelToLinear:()=>Ef,srgbToOklab:()=>wa,stringIncludesAny:()=>hi,stringToObject:()=>Qp,stripVersionRangePrefix:()=>ha,svg:()=>Am,svgData:()=>Tm,swapItemsInArray:()=>Op,syncProps:()=>Vi,templates:()=>Om,theme:()=>_m,timing:()=>km,toCamel:()=>Ta,toCamelCase:()=>ya,toDashCase:()=>ba,toDescriptionCase:()=>tm,toLinearChannel:()=>qo,toPriorityOrder:()=>xe,toTitleCase:()=>Qg,toggleFullscreen:()=>Pg,transformBackgroundImage:()=>Gf,transformBorder:()=>on,transformBorderRadius:()=>wn,transformBoxShadow:()=>ec,transformClassname:()=>I0,transformDuration:()=>rc,transformGridTemplate:()=>Xf,transformShadow:()=>Kf,transformSize:()=>kt,transformSizeRatio:()=>L,transformTextStroke:()=>qf,transformTransition:()=>Qm,transformersByPrefix:()=>Ly,transfromGap:()=>Yf,translate:()=>Tc,triggerEventOn:()=>gn,triggerEventOnUpdate:()=>rg,trimStringFromSymbols:()=>jp,typography:()=>Ea,unit:()=>fm,unstackArrayOfObjects:()=>fi,update:()=>bs,updateProps:()=>qh,updateVars:()=>yD,upsertTranslation:()=>Pc,useCssInProps:()=>se,useHostState:()=>Hy,usePropsAsCSS:()=>R0,useSelectorsAsCSS:()=>D0,variables:()=>fa,vars:()=>Dm,verbose:()=>Fo,warn:()=>aa,warnStateKeyShadowsMethod:()=>dl,window:()=>C,wrapHoverRule:()=>Sn});module.exports=qA(kx);var wp={};$(wp,{RESERVED_STORE_METHODS:()=>Ix,SIGNAL_ENGINE_KEY:()=>xo,SIGNAL_INSTANCES_KEY:()=>bo,STORE_METHOD_NAMES:()=>Dx,VERSION:()=>$x,__resetSignalEngine:()=>xp,__resetSignalInstances:()=>_p,__resetStateShadowWarnings:()=>Lx,batch:()=>fl,createComputed:()=>Rx,createEffect:()=>G,createScopeStore:()=>ul,createSignal:()=>oi,createStore:()=>fn,getObserver:()=>Ln,getSignals:()=>Px,isStore:()=>St,registerSignalInstance:()=>_o,setObserver:()=>$n,warnStateKeyShadowsMethod:()=>dl});var up={};$(up,{WRITE_JOURNAL:()=>ti,batch:()=>ni,createComputed:()=>GA,createEffect:()=>YA,createSignal:()=>We,getObserver:()=>lp,journalWrite:()=>ei,setObserver:()=>KA});var Xt=null,rl=0,ol=[],lp=()=>Xt,KA=t=>{Xt=t},sl=0,sp=[];function We(t){let e=new Set;function n(){return Xt&&(e.add(Xt),Xt._sources.add(s)),t}function r(i){i!==t&&(t=i,eT(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function GA(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){cp(o);let s=Xt;Xt=o;try{e=t(),n=!1}finally{Xt=s}},_notify(){n=!0,r.size>0&&Tx(r)},get(){return Xt&&(r.add(Xt),Xt._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}var De=new Set,ip=!1,ti=[];function ei(t){ti.push(t),ti.length>32&&ti.shift()}function YA(t,e){let n=e?.depth??0,r={_sources:new Set,_type:"effect",_depth:n,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(r._disposed)return;cp(r);let o=Xt;Xt=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Xt=o}},_notify(){r._disposed||(rl>0?ol.push(r):sl>0?sp.push(r):fp(r))},dispose(){r._disposed=!0,cp(r)}};return r._execute(),r}function ni(t){rl++;try{t()}finally{rl--,rl===0&&tT()}}var ap=!1,Cx=1e3,XA=8,ZA=256,JA=4;function Ex(){return typeof performance<"u"?performance.now():Date.now()}function fp(t){De.add(t),!ap&&(ip||(ip=!0,queueMicrotask(Ax)))}var yo=[];function QA(){if(De.size===1){let[e]=De;return De.clear(),e._disposed?0:(e._execute(),1)}yo.length=0;for(let e of De)yo.push(e);De.clear(),yo.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<yo.length;e++){let n=yo[e];n._disposed||(n._execute(),t++)}return yo.length=0,t}function Ax(t=0,e=0){if(ip=!1,De.size===0)return;ap=!0;let n=Ex(),r=!1;try{for(;De.size>0;){if(++t>Cx){let o=new Map;for(let c of De){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of ti)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",Cx,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),De.clear();break}if(e+=QA(),De.size>0&&(e>=ZA||t>=JA)&&Ex()-n>XA){r=!0,setTimeout(()=>Ax(t,e),0);break}}}finally{r||(ap=!1)}}function tT(){for(let t=0;t<ol.length;t++)fp(ol[t]);ol.length=0}function Tx(t){sl++;try{for(let e of t)e._notify()}finally{if(sl--,sl===0&&sp.length>0){let e=sp.splice(0);for(let n=0;n<e.length;n++)fp(e[n])}}}function eT(t){Tx(t)}function cp(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var bp={};$(bp,{RESERVED_STORE_METHODS:()=>ri,STORE_METHOD_NAMES:()=>yp,__resetStateShadowWarnings:()=>nT,createScopeStore:()=>iT,createStore:()=>il,getSignals:()=>sT,isStore:()=>oT,warnStateKeyShadowsMethod:()=>mp});var qe=Symbol("store"),al=Symbol("signals"),yp=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ri=new Set(yp),gp=new Set,dp=(t,e)=>t?t+"."+e:String(e);function mp(t,e){let n=(e||"")+"::"+t;if(gp.has(n))return;gp.add(n);let r=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${r}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${r}.${t}(\u2026)" no longer reaches the store method on this node. Use "${r}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${yp.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function nT(){gp.clear()}var pp=t=>!t||typeof t!="object"||Array.isArray(t)||t[qe]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!cl(t),rT=12,cl=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function ll(t,e,n){if(t===e)return!0;if(n>rT)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!ll(t[r],e[r],n+1))return!1;return!0}if(cl(t)&&cl(e)){let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s of r)if(!Object.prototype.hasOwnProperty.call(e,s)||!ll(t[s],e[s],n+1))return!1;return!0}return!1}function il(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r="");let o={},s={},i=b=>Object.prototype.hasOwnProperty.call(o,b)&&Object.prototype.hasOwnProperty.call(s,b),a=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let b in t){if(b==="__proto__"||!Object.prototype.hasOwnProperty.call(t,b))continue;if(b.startsWith("__")){s[b]=t[b];continue}ri.has(b)&&mp(b,r);let _=t[b];n<a&&_&&typeof _=="object"&&!pp(_)?(s[b]=_,o[b]=We(il(_,e,n+1,dp(r,b)))):(s[b]=_,o[b]=We(_))}let c=new Proxy(s,{get(b,_){if(_===qe)return!0;if(_===al)return o;if(_==="__raw")return b;if(_==="$update")return l;if(_==="$parse")return u;if(_==="$clean")return d;if(_==="$keys")return h;if(_==="$values")return p;if(_==="$replace")return g;if(_==="$add")return m;if(_==="$remove")return y;if(_==="$destroy")return x;if(_==="$quietUpdate")return f;if(ri.has(_)&&!Object.prototype.hasOwnProperty.call(o,_))switch(_){case"update":return l;case"parse":return u;case"clean":return d;case"keys":return h;case"values":return p;case"replace":return g;case"add":return m;case"remove":return y;case"destroy":return x;case"quietUpdate":return f}if(_==="__element")return b.__element;if(_==="parent")return b.parent;if(_==="root")return b.root;if(Object.prototype.hasOwnProperty.call(o,_)){let k=o[_].get();if(k!==void 0||!(_!=="root"&&b.root&&b.root!==c))return k}if(b[_]!==void 0)return b[_];let w=typeof _=="string"&&!_.startsWith("__")&&_!=="then"&&_!=="constructor"&&lp()!=null;if(_!=="root"&&b.root&&b.root!==c){let k=b.root[_];return w&&!Object.prototype.hasOwnProperty.call(o,_)&&(o[_]=We(void 0),o[_].get()),k}if(w)return o[_]=We(void 0),o[_].get()},set(b,_,w){if(_==="__proto__")return!1;if(_==="__element"||_==="parent"||_==="root"||typeof _=="string"&&_.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,_))return b[_]=w,!0;ri.has(_)&&mp(_,r);let k=dp(r,_);if(Object.prototype.hasOwnProperty.call(o,_))if(w&&typeof w=="object"&&!pp(w)){if(w===b[_])return!0;let A=o[_].peek(),P=A&&A[qe]?A.$parse():A;if(ll(w,P,0))return!0;b[_]=w,ei(k),o[_].set(il(w,e,n+1,k))}else{if(Array.isArray(w)&&w!==b[_]&&Array.isArray(o[_].peek())&&ll(w,o[_].peek(),0))return!0;o[_].peek()!==w&&ei(k),b[_]=w,o[_].set(w)}else b[_]=w,w&&typeof w=="object"&&!pp(w)?o[_]=We(il(w,e,n+1,k)):o[_]=We(w);return!0},has(b,_){return typeof _=="string"&&_.charCodeAt(0)===36&&ri.has(_.slice(1))?!0:_ in b},ownKeys(b){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(b,_){return i(_)?{enumerable:!0,configurable:!0,value:o[_].peek()}:Object.getOwnPropertyDescriptor(b,_)},deleteProperty(b,_){return o[_]&&(o[_].peek()!==void 0&&ei(dp(r,_)),o[_].set(void 0),delete o[_]),delete b[_],!0}});function l(b,_){ni(()=>{for(let k in b)k!=="__proto__"&&(c[k]=b[k])});let w=s.__element;return w&&w.onUpdate&&!_?.quiet&&w.onUpdate(w,c,w.context),c}function f(b){return l(b,{quiet:!0})}function u(b){if(b||(b=new Set),b.has(c))return"[Circular]";b.add(c);let _={};for(let w in o){if(w==="parent"||w==="root"||w.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,w))continue;let k=o[w].peek();k&&k[qe]?_[w]=k.$parse(b):_[w]=k}return _}function d(){return ni(()=>{for(let b in o)delete c[b]}),c}function h(){return Object.keys(o).filter(i)}function p(){return Object.keys(o).filter(i).map(b=>o[b].peek())}function g(b){return ni(()=>{for(let _ in o)_ in b||delete c[_];for(let _ in b)_!=="__proto__"&&(c[_]=b[_])}),c}function m(b,_){let w=Object.prototype.hasOwnProperty.call(o,b)?o[b].peek():s[b];if(Array.isArray(w))return c[b]=[...w,_],c;if(w&&typeof w=="object"&&!Array.isArray(w)){if(cl(_))w[qe]?w.$update(_):c[b]={...w,..._};else{let k=String(Object.keys(w).length);w[qe]?w.$update({[k]:_}):c[b]={...w,[k]:_}}return c}return c[b]=_,c}function y(b){return delete c[b],c}function x(){d(),s.__element=null,s.parent=null}return c}function oT(t){return t&&t[qe]===!0}function sT(t){return t[al]}function iT(t,e){let n={},r={};if(t&&typeof t=="object")for(let i in t)r[i]=t[i],n[i]=We(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(n,i))return n;let a=e;for(;a;){let c=a[al];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[qe]?a[hp]:null}return null};return new Proxy(r,{get(i,a){return a===qe?!0:a===al?n:a===hp?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(n,a)?n[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=o(a);return l?(l===n&&(i[a]=c),l[a].set(c),!0):(i[a]=c,n[a]=We(c),!0)},has(i,a){if(a in n||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[qe]?c[hp]:null}return!1},ownKeys(){return Object.keys(n)},getOwnPropertyDescriptor(i,a){return a in n?{enumerable:!0,configurable:!0,value:n[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var hp=Symbol("scope.parent");var _r="3.14.785";var bo="__SMBLS_SIGNAL_INSTANCES__",_o=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[bo]||(r[bo]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||_r),n||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),o},_p=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[bo]};var xo="__SMBLS_SIGNAL_ENGINE__",Ox=(t,e,n)=>{let r=e||_r,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[xo];return s&&s.engine&&s.version===r?(_o(r,o,!0),s.engine):(s||(o[xo]={version:r,engine:t}),_o(r,o,!1),t)},xp=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[xo]};var Ht=Ox({...up,...bp,VERSION:_r},_r),oi=Ht.createSignal,Rx=Ht.createComputed,G=Ht.createEffect,fl=Ht.batch,Ln=Ht.getObserver,$n=Ht.setObserver,fn=Ht.createStore,ul=Ht.createScopeStore,St=Ht.isStore,Px=Ht.getSignals,Dx=Ht.STORE_METHOD_NAMES,Ix=Ht.RESERVED_STORE_METHODS,dl=Ht.warnStateKeyShadowsMethod,Lx=Ht.__resetStateShadowWarnings,$x=Ht.VERSION;var py={};$(py,{assertEmitIntegrity:()=>fy,css:()=>ge,getActiveDocument:()=>Jr,getCacheSize:()=>dy,getEmitStats:()=>su,injectGlobal:()=>xt,keyframes:()=>fs,reset:()=>a0,resetEmitStats:()=>ly,setActiveDocument:()=>cy,setWasmEngine:()=>sc,wrapHoverRule:()=>Sn});var ny={};$(ny,{COMPOUND_CSS_KEYWORDS:()=>Nr,CONFIG:()=>Ur,CONFIG_MERGE_EXL:()=>de,CSS_NAMED_COLOR_HEX:()=>_f,CSS_NATIVE_COLOR_REGEX:()=>fe,CSS_UNITS:()=>So,FACTORY:()=>ue,STANDARD_SCHEME_QUERIES:()=>Uf,VALUE_TRANSFORMERS:()=>Jf,__resetSkinWarnings:()=>Jm,activateConfig:()=>dS,aliasCaseVariants:()=>ts,animation:()=>Em,appendSVGSprite:()=>Ja,appendSvgIconsSprite:()=>Gr,applyDocument:()=>Za,applyHeadings:()=>Wf,applyMediaSequenceVars:()=>Gn,applyReset:()=>Qa,applySequenceGlobalVars:()=>Ma,applySequenceVars:()=>xn,applySkins:()=>tc,applySpacingSequence:()=>Ba,applyTimingSequence:()=>Xa,applyTypographySequence:()=>Ka,breakpoints:()=>vm,buildSkinVarStyles:()=>Yr,changeGlobalTheme:()=>Qf,changeLightness:()=>am,checkIfBoxSize:()=>ja,class:()=>Pm,color:()=>ym,colorStringToRgbaArray:()=>ke,compositeOverBackdrop:()=>jr,contrastRatio:()=>Go,convertSvgToSymbol:()=>Na,createConfig:()=>Oa,cssMediaVars:()=>Ff,cssVars:()=>Mf,defineResolvedThemeSignal:()=>Qo,defineThemeSignal:()=>Jo,devices:()=>Cm,document:()=>cS,findHeadingLetter:()=>Bf,findHeadings:()=>$a,font:()=>um,fontFace:()=>hm,fontFamily:()=>dm,fontFamilyTypes:()=>pm,generateSequence:()=>te,generateSequencePosition:()=>Nm,generateSprite:()=>Fa,generateSubSequence:()=>Ia,getActiveConfig:()=>T,getColor:()=>et,getColorShade:()=>vf,getDefaultOrFirstKey:()=>Br,getFnPrefixAndValue:()=>_n,getFontFace:()=>lm,getFontFaceEach:()=>Vr,getFontFaceEachString:()=>Df,getFontFaceString:()=>Ca,getFontFamily:()=>qa,getFontFormat:()=>Rf,getFontSizeByKey:()=>Ga,getMediaColor:()=>$t,getMediaTheme:()=>Ae,getResolvedThemeSignal:()=>uS,getRgbTone:()=>en,getSafeInk:()=>zf,getSafeInkInfo:()=>Um,getSequenceValue:()=>zr,getSequenceValueBySymbols:()=>La,getSequenceValuePropertyPair:()=>rn,getShadow:()=>Ua,getShapeByKey:()=>Ya,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>At,getSubratio:()=>Da,getSubratioDifference:()=>Pa,getTheme:()=>qm,getThemeSignal:()=>fS,getTimingByKey:()=>he,getTimingFunction:()=>Te,gradient:()=>bm,grid:()=>Rm,hexToRgb:()=>rm,hexToRgbArray:()=>xf,hexToRgba:()=>sm,hslToRgb:()=>kf,icons:()=>wm,isCSSVar:()=>_t,isDomDocument:()=>un,isGoogleFontsUrl:()=>Yo,isHostObject:()=>dn,isPlainColor:()=>Zn,isRawUnitValue:()=>si,isResolvedColor:()=>Fe,isScalingUnit:()=>xr,isWritableFamilyBucket:()=>Sp,linearChannelToSrgb:()=>Af,media:()=>gm,mixTwoColors:()=>nm,mixTwoRgb:()=>im,mixTwoRgba:()=>Cf,numToLetterMap:()=>nn,oklabToLinearSrgb:()=>Tf,oklabToOklch:()=>Sa,oklchToGamutSafeSrgb:()=>ka,oklchToOklab:()=>Of,opacify:()=>Ko,parkHostObject:()=>Mn,parseColorToken:()=>Vt,popConfig:()=>rt,pushConfig:()=>st,quietColorProbe:()=>Hr,relativeLuminance:()=>Fr,reset:()=>lS,resolveBorderValue:()=>pe,resolveColorRgb:()=>Wr,resolveColorsInGradient:()=>nc,resolveConfigDocument:()=>wo,resolveFileUrl:()=>ve,resolveShadowValue:()=>qr,returnSubThemeOrDefault:()=>cm,rgbArrayToHex:()=>wf,rgbToHSL:()=>Sf,rgbToHex:()=>om,runThroughMedia:()=>Hf,schemeGuardSelector:()=>Qn,schemeMediaQuery:()=>Jn,scratchDefaultConfig:()=>Zo,scratchSystem:()=>ss,scratchUtils:()=>Yn,semanticIcons:()=>Sm,sequence:()=>bn,set:()=>Xr,setActiveConfig:()=>Nf,setAdaptiveSchemeVar:()=>tr,setColor:()=>Xn,setCustomFont:()=>va,setCustomFontMedia:()=>Kn,setEach:()=>ey,setFont:()=>Wa,setFontFamily:()=>rs,setFontImport:()=>Xo,setGradient:()=>es,setInCustomFontMedia:()=>Pf,setMediaTheme:()=>ns,setSVG:()=>os,setScalingVar:()=>Ra,setShadow:()=>er,setSubScalingVar:()=>jf,setSvgIcon:()=>Kr,setTheme:()=>Ha,setValue:()=>ty,setVariables:()=>jm,shadow:()=>xm,shape:()=>Lm,sizes:()=>Im,skins:()=>$m,spacing:()=>mm,splitSpacedValue:()=>Va,splitTopLevelCommas:()=>yn,splitTopLevelSpaces:()=>dt,splitTransition:()=>Zf,srgbChannelToLinear:()=>Ef,srgbToOklab:()=>wa,svg:()=>Am,svgData:()=>Tm,templates:()=>Om,theme:()=>_m,timing:()=>km,toCamel:()=>Ta,toLinearChannel:()=>qo,transformBackgroundImage:()=>Gf,transformBorder:()=>on,transformBorderRadius:()=>wn,transformBoxShadow:()=>ec,transformDuration:()=>rc,transformGridTemplate:()=>Xf,transformShadow:()=>Kf,transformSize:()=>kt,transformSizeRatio:()=>L,transformTextStroke:()=>qf,transformTransition:()=>Qm,transfromGap:()=>Yf,typography:()=>Ea,unit:()=>fm,vars:()=>Dm});var Yn={};$(Yn,{COMPOUND_CSS_KEYWORDS:()=>Nr,CSS_NAMED_COLOR_HEX:()=>_f,CSS_NATIVE_COLOR_REGEX:()=>fe,CSS_UNITS:()=>So,applyMediaSequenceVars:()=>Gn,applySequenceGlobalVars:()=>Ma,applySequenceVars:()=>xn,changeLightness:()=>am,colorStringToRgbaArray:()=>ke,compositeOverBackdrop:()=>jr,contrastRatio:()=>Go,convertSvgToSymbol:()=>Na,findHeadingLetter:()=>Bf,findHeadings:()=>$a,generateSequence:()=>te,generateSequencePosition:()=>Nm,generateSprite:()=>Fa,generateSubSequence:()=>Ia,getColorShade:()=>vf,getDefaultOrFirstKey:()=>Br,getFnPrefixAndValue:()=>_n,getFontFace:()=>lm,getFontFaceEach:()=>Vr,getFontFaceEachString:()=>Df,getFontFaceString:()=>Ca,getFontFormat:()=>Rf,getRgbTone:()=>en,getSequenceValue:()=>zr,getSequenceValueBySymbols:()=>La,getSequenceValuePropertyPair:()=>rn,getSubratio:()=>Da,getSubratioDifference:()=>Pa,hexToRgb:()=>rm,hexToRgbArray:()=>xf,hexToRgba:()=>sm,hslToRgb:()=>kf,isCSSVar:()=>_t,isDomDocument:()=>un,isGoogleFontsUrl:()=>Yo,isHostObject:()=>dn,isRawUnitValue:()=>si,isResolvedColor:()=>Fe,isScalingUnit:()=>xr,isWritableFamilyBucket:()=>Sp,linearChannelToSrgb:()=>Af,mixTwoColors:()=>nm,mixTwoRgb:()=>im,mixTwoRgba:()=>Cf,numToLetterMap:()=>nn,oklabToLinearSrgb:()=>Tf,oklabToOklch:()=>Sa,oklchToGamutSafeSrgb:()=>ka,oklchToOklab:()=>Of,opacify:()=>Ko,parkHostObject:()=>Mn,parseColorToken:()=>Vt,relativeLuminance:()=>Fr,resolveConfigDocument:()=>wo,resolveFileUrl:()=>ve,returnSubThemeOrDefault:()=>cm,rgbArrayToHex:()=>wf,rgbToHSL:()=>Sf,rgbToHex:()=>om,setCustomFont:()=>va,setCustomFontMedia:()=>Kn,setFontImport:()=>Xo,setInCustomFontMedia:()=>Pf,setScalingVar:()=>Ra,setSubScalingVar:()=>jf,setVariables:()=>jm,splitTopLevelCommas:()=>yn,splitTopLevelSpaces:()=>dt,srgbChannelToLinear:()=>Ef,srgbToOklab:()=>wa,toLinearChannel:()=>qo});var un=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),dn=t=>{if(t===null||typeof t!="object")return!1;let e=Object.prototype.toString.call(t);return!!(e!=="[object Object]"&&e!=="[object Array]"||typeof t.nodeType=="number"||t.defaultView||t.window===t||t.self===t)},Sp=t=>t!==null&&typeof t=="object"&&!dn(t),Mn=(t,e,n)=>{if(!t)return;if(un(n)){t.__domDocument||(t.__domDocument=n);return}let r=`__host_${e}`;t[r]||(t[r]=n)},wo=t=>t?un(t.__domDocument)?t.__domDocument:un(t.document)?t.document:null:null;var xr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",So=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"],aT=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),cT=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${So.filter(t=>t!=="auto").map(aT).join("|")})$`),si=t=>cT.test(String(t).trim());D();var _f={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},ke=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=_f[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&nt&&C){let n=nt.body.appendChild(nt.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){nt.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return nt.body.removeChild(n),[0,0,0,0];t=C.getComputedStyle(n).color,nt.body.removeChild(n)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(n=>+n)):[0,0,0,0]},nm=(t,e,n=.5)=>(t=ke(t),e=ke(e),Cf(t,e,n)),rm=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${n},${r},${o})`},xf=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]},om=(t,e,n)=>"#"+(1<<24|t<<16|e<<8|n).toString(16).slice(1),wf=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1),sm=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${n},${r},${o},${e})`},im=(t,e,n=.5)=>{let r=[];for(let o=0;o<3;o++)r[o]=~~(t[o]+(e[o]-t[o])*n);return`rgb(${r})`},am=(t,e)=>{let[n,r,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[n,r,s]},Sf=(t,e,n)=>{let r=Math.max(t,e,n),o=r-Math.min(t,e,n),s=1-Math.abs(r+r-o-1),i=o&&(r==t?(e-n)/o:r==e?2+(n-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(r+r-o)/2]},kf=(t,e,n,r=e*Math.min(n,1-n),o=(s,i=(s+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],vf=(t,e)=>{let n=parseInt(t,16),r=(n>>16)+e;r>255?r=255:r<0&&(r=0);let o=(n>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(n&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|r<<16)+16777216).toString(16).slice(1)},Cf=(t,e,n=.5)=>{let r=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;r[o]=s(t[o]+(e[o]-t[o])*n)}return`rgba(${r})`},Ko=(t,e)=>{let n=ke(t);if(!n){Or()&&console.warn(t+" color is not rgba");return}return n[3]=e,`rgba(${n})`},_t=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Nr=new Set(["currentcolor","transparent","thin","medium","thick"]),fe=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,UO=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Vt=t=>{if(!S(t))return null;if(fe.test(t))return{passthrough:t};if(_t(t))return{cssVar:t};let e=t.match(UO);if(!e)return null;let[,n,r,o]=e,s=r!==void 0?`0.${r}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:n,alpha:s,tone:i}},Fe=t=>S(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),yn=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),o===","&&r===0){e.push(n),n="";continue}n+=o}return(n.length||!e.length)&&e.push(n),e},dt=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),r===0&&/\s/.test(o)){n.length&&e.push(n),n="";continue}n+=o}return n.length&&e.push(n),e},qo=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Fr=t=>.2126*qo(t[0])+.7152*qo(t[1])+.0722*qo(t[2]),Go=(t,e)=>{let n=Fr(t)+.05,r=Fr(e)+.05;return n>r?n/r:r/n},Ef=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Af=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,wa=([t,e,n])=>{let[r,o,s]=[t,e,n].map(Ef),i=.4122214708*r+.5363325363*o+.0514459929*s,a=.2119034982*r+.6806995451*o+.1073969566*s,c=.0883024619*r+.2817188376*o+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},Tf=([t,e,n])=>{let r=t+.3963377774*e+.2158037573*n,o=t-.1055613458*e-.0638541728*n,s=t-.0894841775*e-1.291485548*n,i=r**3,a=o**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Sa=([t,e,n])=>{let r=Math.atan2(n,e)*180/Math.PI;return r<0&&(r+=360),[t,Math.sqrt(e*e+n*n),r]},Of=([t,e,n])=>{let r=n*Math.PI/180;return[t,e*Math.cos(r),e*Math.sin(r)]},ka=(t,e,n,r=24)=>{let o=a=>Tf(Of([t,a,n])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<r;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>Af(Math.max(0,Math.min(1,a))))},jr=(t,e=1,n=[255,255,255])=>e>=1?t:t.map((r,o)=>r*e+n[o]*(1-e)),en=(t,e)=>{S(t)&&t.includes("rgb")&&(t=ke(t).join(", ")),S(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Ke(e)&&(e+="");let n=wf(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=vf(n,parseFloat(e));return xf(o).join(", ")}else{let[o,s,i]=t,[a,c]=Sf(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return kf(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var cm=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var ve=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let n=e[t];return n?n.content&&n.content.src:null},Br=(t,e)=>{if(t[e])return t[e].value;let n=()=>Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value&&!t[o].isSystemFallback);if(t.default){let o=t[t.default];if(o&&o.isSystemFallback){let s=n();if(s)return t[s].value}if(o)return o.value}let r=n()||Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value);return r&&t[r]&&t[r].value},Rf=t=>{if(typeof t!="string"||!t)return null;let e=t.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(e)?e:null},Yo=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),Xo=t=>`@import url('${t}');`,Pf=t=>`@font-face { ${t} }`,va=(t,e,n,r={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Rf(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
32
+ }`;return`${a}${l}${c}`}});var Lg,Hw=V(()=>{"use strict";Lg=t=>{if(!t)return"";let e=new Date(t),n=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),r=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${r}, ${n}`}});var Ig,Ww=V(()=>{"use strict";Ig=(t,e)=>{let n=setTimeout(()=>{let{props:r}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(r.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(n)})}});var $g,qw=V(()=>{"use strict";$g=function(e){let n=[0,1];for(let r=2;r<=e;r++)n[r]=n[r-1]+n[r-2];return n[e]}});var Mg,Kw=V(()=>{"use strict";Mg=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Vo(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=r.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},r.head.appendChild(a)})}async function Ug(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=r.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},r.head.appendChild(a)})}var Fg,Ng,jg,Bg,Vg,Gw=V(()=>{"use strict";Fg=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("script");i.type=r,i.async=e,i.src=t,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),n.body.appendChild(i)}catch(i){s(i)}}),Ng=(t,e=document,n="text/javascript")=>new Promise((r,o)=>{let s=e.createElement("script");s.type=n,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),r()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),jg=(t,e=document,n,r="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=r,s.text=o.responseText,e.body.appendChild(s),typeof n=="function"&&n()}else throw new Error(`Failed to load the script ${t}`)},Bg=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),n.head.appendChild(i)}catch(i){s(i)}}),Vg=(t,e=!1,n=document,r="text/javascript",o="smbls-script")=>{try{let s=n.createElement("script");s.type=r,s.async=e,s.id=o,s.innerHTML=t,n.body.appendChild(s)}catch(s){console.warn(s)}}});function OO(t,e){if(!e||typeof e!="object")return t;let n=o=>{if(!TO(o))return o;let s=e[o];return s?.src?s.src:o},r={...t};for(let[o,s]of Object.entries(r))typeof s=="string"?r[o]=n(s):Array.isArray(s)&&(r[o]=s.map(i=>typeof i=="string"?n(i):i));return r}function gf(t,e){if(!t||!e)return;let n=e.split("."),r=t;for(let o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}function RO(t,e,n){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=n?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=n?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,p)=>{let g=h.trim();if(p==="polyglot")return a[g]??gf(a,g)??d;if(p==="getLocalStateLang")return gf(c,g+s)??d;let m=gf(c,g);return m!==void 0?m:a[g]??gf(a,g)??d}));return l}function Yw(t){if(!v(t))return{};let e={...t};for(let[n,r]of Object.entries(e))if(typeof r=="function"){let o=r.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[n]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[n]=`{{ ${a[1]} }}`;continue}delete e[n]}else if(typeof r=="string"){let o=r.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[n]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=r.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | polyglot }}`;continue}if(r.includes("=>")&&r.includes("s.")){let i=r.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[n]=`{{ ${i[1]} }}`;continue}}Ai(r)&&delete e[n]}return e}function Hg(t,e,n,{isProduction:r=!1,channel:o="production"}={}){let s=t.pages?.[e],i=v(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=Yw(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=Yw(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let g=t.name||t.key;g?r?d.title=g:o==="development"?d.title=`${g} / dev:symbo.ls`:o==="staging"?d.title=`${g} / staging:symbo.ls`:d.title=`${g} / symbo.ls`:d.title="Symbols demo"}d=RO(d,t,n),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let h=n?.actualPathname||e;if(d["og:url"]||d.url){let g=(d["og:url"]||d.url||"").replace(/\/$/,"");if(g&&h&&h!=="/"){let m=h.startsWith("/")?h:"/"+h;d["og:url"]=g+m}}d=OO(d,t.files);let p=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[g,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let y=m.replace(/\{\{[^}]*\}\}/g,"").trim();y?d[g]=y:g==="title"?d[g]=p:delete d[g]}return d}var It,EO,Uo,AO,mf,zg,TO,Xw=V(()=>{"use strict";Lt();Rr();It=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,n=>e[n])},EO=t=>Object.entries(t||{}).filter(([e,n])=>n!==void 0).map(([e,n])=>`${e}="${It(n)}"`).join(" "),Uo=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},AO=new Set(["jsonLd","styles","scripts"]),mf=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let r=typeof n=="string"?n:JSON.stringify(n),o=String(r).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Uo(r)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let r=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Uo(r)}">${r}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let r=typeof n=="string",o=r?n:n.src;if(!o&&!n.body)continue;let s=[];o&&s.push(`src="${It(o)}"`),r||(n.type&&s.push(`type="${It(n.type)}"`),n.async&&s.push("async"),n.defer&&s.push("defer"),n.integrity&&s.push(`integrity="${It(n.integrity)}"`),n.crossorigin&&s.push(`crossorigin="${It(n.crossorigin)}"`),n.referrerpolicy&&s.push(`referrerpolicy="${It(n.referrerpolicy)}"`),n.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${It(o||Uo(n.body||""))}"`;if(!r&&n.body){let a=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},zg=(t,e)=>{e||(t={...t,robots:"noindex"});let n=Object.entries(t).reduce((r,[o,s])=>{if(!s&&s!==0&&s!==!1||AO.has(o))return r;if(o==="title")return r.push(`<title>${It(s)}</title>`),r;if(o==="canonical")return r.push(`<link rel="canonical" href="${It(s)}">`),r;if(o==="manifest")return r.push(`<link rel="manifest" href="${It(s)}">`),r;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")r.push(`<link rel="icon" href="${It(f)}">`);else if(typeof f=="object"){let u=EO(f);/rel=/.test(u)?r.push(`<link ${u}>`):r.push(`<link rel="icon" ${u}>`)}}),r;if(o==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${It(h)}"`).join(" ");r.push(`<link rel="alternate" ${u}>`)}}),r;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")r.push(`<meta ${u}="${It(l)}" content="${It(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")r.push(`<meta ${u}="${It(l)}" content="${It(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([p,g])=>g!==void 0).map(([p,g])=>`${p}="${It(g)}"`).join(" ");r.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,p])=>p!==void 0).map(([h,p])=>`${h}="${It(p)}"`).join(" ");r.push(`<meta ${d}>`)}};if(o.startsWith("http-equiv:")){let l=o.replace("http-equiv:","");return i(l,s,"http-equiv"),r}if(o.startsWith("itemprop:")){let l=o.replace("itemprop:","");return i(l,s,"itemprop"),r}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>o.startsWith(l));if(c){let l=o.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),r}if(o.startsWith("apple:")||o.startsWith("msapplication:")){let l=o.startsWith("apple:")?"apple-":"msapplication-",f=o.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),r}return i(o,s),r},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return n.push(...mf(t)),n.join(`
33
+ `)},TO=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var yf,Wg,Zw=V(()=>{"use strict";Lt();yf=(t,e)=>(R(e)?e:Object.values(e)).reduce((n,r)=>Math.abs(r-t)<Math.abs(n-t)?r:n),Wg=(t,e)=>(t=parseFloat(t),v(e)&&(e=Object.values(e)),yf(t,e))});function zo(t){let e=String(t||"").trim();if(!e)return{owner:Jw,key:"",full:""};let n=null,r=e;if(e.includes("/")){let s=e.indexOf("/");n=e.slice(0,s),r=e.slice(s+1)}r=r.replace(/\.symbo\.ls$/iu,""),n||(n=Jw);let o=r?`${n}/${r}`:"";return{owner:n,key:r,full:o}}async function bf(t,e={}){if((e.provider||"kv")==="api")return tS(t,e);let r=await UO(t,e);return r||tS(t,e)}async function UO(t,e={}){let n=e.kvBaseUrl||PO,r=e.env||"production",o=`${n}/kv/${encodeURIComponent(t)}?env=${r}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function tS(t,e={}){let n=e.apiBaseUrl||DO,{key:r}=zo(t);try{let o=`${n}/core/projects/libraries/available?search=${encodeURIComponent(r)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:p}=zo(h?.key);return p.toLowerCase()===r.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${n}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function eS(t,e={}){if(v(t))return t;if(k(t)){let{full:n}=zo(t);if(!n)return null;try{let r=await bf(n,e);return r||console.warn(`[smbls] Shared library "${n}" not found`),r}catch(r){return console.warn(`[smbls] Failed to fetch shared library "${n}":`,r.message),null}}return null}async function Yg(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async r=>{if(tn(r)){let o=await eS(oS(r),e);return o?{library:o,ignoreList:r.ignoreList}:null}return eS(r,e)}))).filter(Boolean)}var Jw,PO,DO,ga,nS,LO,IO,Qw,rS,$O,MO,FO,qn,Kg,tn,oS,qg,Gg,NO,jO,BO,VO,ma,sS=V(()=>{"use strict";Lt();vr();kl();Jw="system",PO="https://smbls-kv.nika-980.workers.dev",DO="https://api.symbols.app";ga=(t,e,n,r)=>{for(let o in e){let s=r?`${r}/${o}`:o;n&&n.has(s)||(o in t?v(t[o])&&v(e[o])&&ga(t[o],e[o],n,s):t[o]=e[o])}},nS=(t,e,n)=>{if(!v(t)||!e.size)return t;let r=`${n}/`,o=!1;for(let i of e)if(i.startsWith(r)){o=!0;break}if(!o)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${n}/${i}`;e.has(a)||(s[i]=nS(t[i],e,a))}return s},LO=new Set,IO=new Set(["components","pages","functions","snippets","methods"]),Qw=(t,e)=>e===""&&IO.has(t),rS=["fontFamily","fontfamily","font_family","FONT_FAMILY"],$O=t=>{let e=new Map;if(!v(t))return e;for(let n of rS){let r=t[n];if(v(r))for(let o in r)!v(r[o])||!r[o].isDefault||(e.has(n)||e.set(n,new Set),e.get(n).add(o))}return e},MO=(t,e)=>{for(let n of rS){let r=t[n];if(!v(r))continue;let o=e.get(n),s=null;for(let i in r){let a=r[i];if(!v(a)||!a.isDefault||o&&o.has(i))continue;let c={...a};delete c.isDefault,s||(s={...r}),s[i]=c}s&&(t[n]=s)}},FO=t=>t.replace(/\.js$/iu,""),qn=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let n of t){if(!k(n))continue;let r=n.split("/").map(o=>FO(o.trim())).filter(Boolean).join("/");r&&e.add(r)}return e},Kg=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),tn=t=>v(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),oS=t=>t.library!==void 0?t.library:t.key??t.name,qg=new Set,Gg=()=>{qg.clear()},NO=(t,e)=>{let n=e.filter(r=>!qg.has(r));if(n.length){for(let r of n)qg.add(r);ht()&&console.warn(`[smbls] shared library "${t}" ships ${n.map(r=>`methods.${r}`).join(", ")} \u2014 named like a built-in element method. Refused: the built-in wins; a library cannot replace an element method on the consuming app. If the app wants this version, declare it in the app's OWN methods.`)}},jO=(t,e,n)=>{let r=null;for(let o in t)if(kr(o)&&(e.has(`methods/${o}`)||n.push(o),!r)){r={};for(let s in t)kr(s)||(r[s]=t[s])}return r||t},BO=(t,e,n,r="library")=>{let o=qn(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let s=o.size?new Set([...n,...o]):n,i=[];for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&!(a==="sharePages"||a==="sharedLibIgnore")&&a!=="app"&&!s.has(a)){if(v(e[a])&&v(t[a])){if(a==="designSystem")ga(t[a],e[a],s,a);else for(let c in e[a])if(!s.has(`${a}/${c}`)){if(a==="methods"&&kr(c)){c in t[a]||i.push(c);continue}c in t[a]?Qw(a,t[a][c])&&!Qw(a,e[a][c])&&(t[a][c]=e[a][c]):t[a][c]=e[a][c]}}else if(!(a in t)){let c=e[a],l=a==="methods"&&c&&typeof c=="object"?jO(c,s,i):c;t[a]=nS(l,s,a)}}i.length&&NO(r,i)},VO=(t,e,n)=>{if(t!==e){let r=oS(t);if(k(r)&&r)return r;if(t.key||t.name)return t.key||t.name}return e&&(e.key||e.name)||`sharedLibraries[${n}]`},ma=(t,e)=>{if(!e||!e.length)return;let n=$O(t.designSystem);for(let r=0;r<e.length;r++){let o=e[r],s=o,i=LO;tn(s)&&(i=qn(s.ignoreList),s=s.library),v(s)&&BO(t,s,i,VO(o,s,r))}n.size&&MO(t.designSystem,n)}});var Xg,Zg,Jg,ya,Qg,ba,tm,Mr,iS=V(()=>{"use strict";Lt();Xg=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Zg=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),n=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([n]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},Jg=t=>t.replace(/[^a-zA-Z0-9_]/g,""),ya=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,n){return n===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),Qg=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),ba=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),tm=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},Mr=t=>{if(R(t))return t;if(k(t))return t.split(" ");if(v(t))return Object.values(t);if(Ge(t))return[t]}});var em,aS=V(()=>{"use strict";em=()=>{let t=document.styleSheets[0],e="";if(t)try{let n=t.cssRules||t.rules;for(let r=0;r<n.length;r++)e+=n[r].cssText}catch(n){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",n)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Qt,Ho,_a,xa,cS=V(()=>{"use strict";Qt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let n=t.context;if(!n)return null;let r=n.assets&&n.assets[e]||n.files&&n.files[e];if(!r)return null;if(typeof r=="string")return{src:r,type:null,variants:null};if(typeof r=="object"){if(typeof r.src=="string")return r;let o=r.content,s=o&&o.src;if(typeof s=="string")return{...r,src:s,type:r.type??o.type??null,variants:r.variants??o.variants??null}}return null},Ho=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let n=t.some(o=>typeof o.width=="number"),r=[];for(let o of t)n&&typeof o.width=="number"?r.push(`${o.src} ${o.width}w`):n||(o.scale===1&&e?r.push(o.src):o.scale&&o.scale!==1&&r.push(`${o.src} ${o.scale}x`));return r.join(", ")},_a=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(n=>n.format===t.type);return Ho(e,{keepOneX:!1})},xa=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let n=new Map;for(let a of t.variants)n.has(a.format)||n.set(a.format,[]),n.get(a.format).push(a);let r=[];for(let[a,c]of n)a!==t.type&&r.push({tag:"source",attr:{type:a,srcset:Ho(c,{keepOneX:!0})}});let o=n.get(t.type)||[],s=Ho(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...r,{tag:"img",attr:i}]}});var Wo={};$(Wo,{CDN_PROVIDERS:()=>Se,DOMQL_EVENTS:()=>Gp,DOMQ_PROPERTIES:()=>Fn,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Eo,ENV:()=>dh,HTML_TAGS:()=>Oo,METHODS:()=>jn,METHODS_EXL:()=>yi,NODE_ENV:()=>$e,OPTIONS:()=>zi,PACKAGE_MANAGER_TO_CDN:()=>Hn,PARSED_DOMQ_PROPERTIES:()=>mi,PROPS_METHODS:()=>Nn,STATE_METHODS:()=>Sr,STATE_PROPERTIES:()=>qp,SVG_TAGS:()=>nw,TYPES:()=>li,UNIVERSAL_RESERVED_KEYS:()=>pf,__resetBuiltinMethodWarnings:()=>Gg,addCaching:()=>Wl,addContext:()=>Hl,addExtend:()=>$h,addExtends:()=>Ye,addItemAfterEveryElement:()=>Lp,addProtoToArray:()=>di,addRef:()=>Vl,applyDependentState:()=>tg,applyEvent:()=>Zl,applyEventUpdate:()=>Jl,applyExtends:()=>sw,applyProps:()=>Mi,arrayContainsOtherArray:()=>Ep,arraysEqual:()=>$p,arrayzeValue:()=>Mr,buildImgSrcset:()=>_a,buildSourcesAndImg:()=>xa,cache:()=>sg,call:()=>Ag,captureSnapshot:()=>Og,checkForStateTypes:()=>Xh,checkIfInherits:()=>Xl,checkIfStringIsInArray:()=>Np,clone:()=>Zp,cloneAndMergeArrayExtend:()=>Ti,cloneFunction:()=>_h,collectExtendsList:()=>Ro,concatAddExtends:()=>Dh,copyJavaScriptToClipboard:()=>Zg,copyStringToClipboard:()=>Xg,createBasedOnType:()=>Bl,createElement:()=>Yh,createElementExtends:()=>Tl,createExtends:()=>Ri,createExtendsFromKeys:()=>Po,createExtendsStack:()=>Dl,createIfConditionFlag:()=>xh,createInheritedState:()=>Zh,createKey:()=>Ci,createNestedObject:()=>sh,createNestedObjectByKeyPath:()=>Qh,createObjectWithoutPrototype:()=>xl,createParent:()=>Ul,createPath:()=>zl,createProps:()=>Fi,createPropsStack:()=>Nl,createRoot:()=>Gh,createScope:()=>ng,createSnapshotId:()=>vi,customDecodeURIComponent:()=>Wp,customEncodeURIComponent:()=>Hp,cutArrayAfterValue:()=>Pp,cutArrayBeforeValue:()=>Rp,debounce:()=>Ei,debounceOnContext:()=>yh,decodeNewlines:()=>zp,deepClone:()=>it,deepContains:()=>rh,deepDefaults:()=>ga,deepDestringifyFunctions:()=>_e,deepExtend:()=>Al,deepMerge:()=>ot,deepMergeExtends:()=>Xe,deepStringifyFunctions:()=>_i,defineSetter:()=>Cg,destringifyGlobalScope:()=>wi,detectHeightOnInit:()=>Ig,detectInfiniteLoop:()=>lh,document:()=>nt,encodeNewlines:()=>Up,error:()=>Lr,excludeKeysFromObject:()=>uh,exec:()=>ut,extendCachedRegistry:()=>Lh,extendStackRegistry:()=>Pi,extractArrayExtend:()=>Li,fetchLibraryData:()=>bf,fibonacciNumberByIndex:()=>$g,filterArrays:()=>Mp,filterArraysFast:()=>Fp,finalizeExtends:()=>Ll,findClosestNumber:()=>yf,findClosestNumberInFactory:()=>Wg,findInheritedState:()=>Yl,findKeyPosition:()=>Bp,flattenExtend:()=>Do,formatDate:()=>Lg,generateHash:()=>vl,generateHeadArrayTags:()=>mf,generateKey:()=>ki,generateMetaTags:()=>zg,get:()=>wg,getCDNDirUrl:()=>hf,getCDNUrl:()=>Fe,getCapitalCaseKeys:()=>Nh,getCdnProviderFromConfig:()=>Bo,getChildStateInKey:()=>Gl,getChildren:()=>vg,getContext:()=>ia,getCookie:()=>Ch,getDB:()=>ua,getEmotionStylesheet:()=>em,getExtendsInElement:()=>Mh,getExtendsStack:()=>Oi,getExtendsStackRegistry:()=>El,getFrequencyInArray:()=>Ap,getFunctionSource:()=>Ie,getHashedExtend:()=>Di,getImportMapScript:()=>Dg,getInObjectByPath:()=>ch,getLocalStorage:()=>Ah,getNev:()=>mh,getPageMetadata:()=>Hg,getParentStateInKey:()=>Kl,getPath:()=>ta,getQuery:()=>da,getRef:()=>kg,getRoot:()=>ra,getRootContext:()=>sa,getRootData:()=>oa,getRootState:()=>na,getRootStateInKey:()=>ql,getSpreadChildren:()=>jh,global:()=>kp,hasFunction:()=>Le,hasHandlerPlugin:()=>Ao,hasOwnProperty:()=>th,hashContent:()=>Uo,inheritChildExtends:()=>Rl,inheritChildPropsExtends:()=>Ol,inheritParentProps:()=>Ni,inheritRecursiveChildExtends:()=>Pl,initProps:()=>Wh,is:()=>Jt,isArray:()=>R,isBoolean:()=>pl,isBuiltinElementMethod:()=>Kp,isContextComponent:()=>Bh,isCyclic:()=>fh,isDOMNode:()=>Zt,isDate:()=>gl,isDefined:()=>Rt,isDevelopment:()=>Vn,isEmpty:()=>bl,isEmptyObject:()=>eh,isEqualDeep:()=>_l,isFailedRevival:()=>Ar,isFunction:()=>O,isHtmlElement:()=>ai,isLazyFunction:()=>Jp,isLocal:()=>gh,isLoudDevRuntime:()=>ht,isMalformedDependency:()=>Ir,isMethod:()=>Tg,isMobile:()=>kh,isNode:()=>pn,isNot:()=>Cp,isNotProduction:()=>Or,isNull:()=>hl,isNumber:()=>Ge,isObject:()=>v,isObjectLike:()=>j,isPhoto:()=>Mg,isPolyglotRetranslatableKey:()=>Ui,isPolyglotWritableKey:()=>Pr,isProduction:()=>Bn,isProtectedElementMethod:()=>kr,isStaging:()=>hh,isState:()=>Jh,isString:()=>k,isStringFunction:()=>Ai,isTest:()=>Sl,isTesting:()=>ph,isUndefined:()=>Dt,isUniversallyReservedKey:()=>Rg,isUnresolvableDependency:()=>Wn,isValidDependencyMap:()=>$r,isValidHtmlTag:()=>Oh,isWrappedLibrary:()=>tn,joinArrays:()=>ko,jointStacks:()=>Ih,keys:()=>uf,loadCssFile:()=>Bg,loadJavascript:()=>Vg,loadJavascriptFile:()=>Fg,loadJavascriptFileEmbedSync:()=>jg,loadJavascriptFileSync:()=>Ng,loadRemoteCSS:()=>Ug,loadRemoteScript:()=>Vo,log:()=>Eg,logGroupIf:()=>Sh,logIf:()=>wh,lookdown:()=>_g,lookdownAll:()=>xg,lookup:()=>bg,lowercaseFirstLetter:()=>wr,makeObjectWithoutPrototype:()=>nh,map:()=>Xp,mapStringsWithContextComponents:()=>Ii,markPolyglotSeeded:()=>Je,matchesComponentNaming:()=>Ze,memoize:()=>bh,merge:()=>bt,mergeSharedLibraries:()=>ma,nextElement:()=>ca,normalizeIgnoreList:()=>qn,normalizeLibraryKey:()=>zo,objectToString:()=>xi,objectizeStringProperty:()=>$i,overwrite:()=>Si,overwriteDeep:()=>Wt,overwriteShallow:()=>Tr,overwriteState:()=>eg,parse:()=>df,parseDeep:()=>Ji,pickupElementFromProps:()=>Ml,pickupPropsFromElement:()=>$l,polyglotSeededKeys:()=>Lo,previousElement:()=>la,promoteActiveRootState:()=>Mo,propExists:()=>zh,propertizeElement:()=>Fl,propertizeUpdate:()=>Uh,remove:()=>Fw,removeChars:()=>Jg,removeCookie:()=>Eh,removeDuplicateProps:()=>Bi,removeDuplicatesInArray:()=>vo,removeFromArray:()=>Tp,removeFromObject:()=>oh,removeNestedKeyByPath:()=>ih,removeValueFromArray:()=>ui,removeValueFromArrayAll:()=>Dp,reorderArrayByValues:()=>Ip,replaceLiteralsWithObjectFields:()=>Mt,replaceOctalEscapeSequences:()=>Vp,resolveAsset:()=>Qt,resolveHandler:()=>To,resolveSharedLibraries:()=>Yg,returnValueAsText:()=>jl,runPluginHook:()=>Pt,self:()=>vp,setActiveRootState:()=>ea,setCookie:()=>vh,setHashedExtend:()=>Cl,setInObjectByPath:()=>ah,setLocalStorage:()=>Th,setNodeStyles:()=>ff,setProps:()=>Sg,setPropsPrototype:()=>ji,sharedLibrary:()=>Kg,splitPackageSpecifier:()=>pa,spotByPath:()=>Qi,srcsetFor:()=>Ho,stringIncludesAny:()=>hi,stringToObject:()=>Qp,stripVersionRangePrefix:()=>ha,swapItemsInArray:()=>Op,syncProps:()=>Vi,toCamelCase:()=>ya,toDashCase:()=>ba,toDescriptionCase:()=>tm,toPriorityOrder:()=>xe,toTitleCase:()=>Qg,toggleFullscreen:()=>Pg,triggerEventOn:()=>gn,triggerEventOnUpdate:()=>rg,trimStringFromSymbols:()=>jp,unstackArrayOfObjects:()=>fi,update:()=>Hh,updateProps:()=>qh,variables:()=>fa,verbose:()=>Fo,warn:()=>aa,window:()=>C});var D=V(()=>{"use strict";wl();kl();Lt();hn();Rr();Co();ci();Qx();tw();gi();ii();ew();Rh();Fh();Kh();Il();uw();mw();vr();yw();jw();ig();Bw();og();Vw();Uw();zw();Hw();Ww();qw();Kw();Gw();Xw();Zw();sS();iS();aS();cS()});var H1=op((mz,z1)=>{var zs=1e3,Hs=zs*60,Ws=Hs*60,po=Ws*24,MI=po*7,FI=po*365.25;z1.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return NI(t);if(n==="number"&&isFinite(t))return e.long?BI(t):jI(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function NI(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*FI;case"weeks":case"week":case"w":return n*MI;case"days":case"day":case"d":return n*po;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ws;case"minutes":case"minute":case"mins":case"min":case"m":return n*Hs;case"seconds":case"second":case"secs":case"sec":case"s":return n*zs;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function jI(t){var e=Math.abs(t);return e>=po?Math.round(t/po)+"d":e>=Ws?Math.round(t/Ws)+"h":e>=Hs?Math.round(t/Hs)+"m":e>=zs?Math.round(t/zs)+"s":t+"ms"}function BI(t){var e=Math.abs(t);return e>=po?Ad(t,e,po,"day"):e>=Ws?Ad(t,e,Ws,"hour"):e>=Hs?Ad(t,e,Hs,"minute"):e>=zs?Ad(t,e,zs,"second"):t+" ms"}function Ad(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var q1=op((yz,W1)=>{function VI(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=H1(),n.destroy=l,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return n.colors[Math.abs(u)%n.colors.length]}n.selectColor=e;function n(f){let u,d=null,h,p;function g(...m){if(!g.enabled)return;let y=g,x=Number(new Date),b=x-(u||x);y.diff=b,y.prev=u,y.curr=x,u=x,m[0]=n.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let _=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(S,A)=>{if(S==="%%")return"%";_++;let P=n.formatters[A];if(typeof P=="function"){let L=m[_];S=P.call(y,L),m.splice(_,1),_--}return S}),n.formatArgs.call(y,m),(y.log||n.log).apply(y,m)}return g.namespace=f,g.useColors=n.useColors(),g.color=n.selectColor(f),g.extend=r,g.destroy=n.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==n.namespaces&&(h=n.namespaces,p=n.enabled(f)),p),set:m=>{d=m}}),typeof n.init=="function"&&n.init(g),g}function r(f,u){let d=n(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?n.skips.push(d.slice(1)):n.names.push(d)}function s(f,u){let d=0,h=0,p=-1,g=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(p=h,g=d,h++):(d++,h++);else if(p!==-1)h=p+1,g++,d=g;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function i(){let f=[...n.names,...n.skips.map(u=>"-"+u)].join(",");return n.enable(""),f}function a(f){for(let u of n.skips)if(s(f,u))return!1;for(let u of n.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}W1.exports=VI});var K1=op((ce,Td)=>{ce.formatArgs=zI;ce.save=HI;ce.load=WI;ce.useColors=UI;ce.storage=qI();ce.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ce.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function UI(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function zI(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Td.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}ce.log=console.debug||console.log||(()=>{});function HI(t){try{t?ce.storage.setItem("debug",t):ce.storage.removeItem("debug")}catch{}}function WI(){let t;try{t=ce.storage.getItem("debug")||ce.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function qI(){try{return localStorage}catch{}}Td.exports=q1()(ce);var{formatters:KI}=Td.exports;KI.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var vx={};$(vx,{ANIMATION_PROPS:()=>vy,ARIA_ROLES:()=>pP,ATTR_TRANSFORMS:()=>Qr,BLOCK_PROPS:()=>Cy,CDN_PROVIDERS:()=>Se,COMPOUND_CSS_KEYWORDS:()=>Nr,CONFIG:()=>Ur,CONFIG_MERGE_EXL:()=>de,CSS_NAMED_COLOR_HEX:()=>_f,CSS_NATIVE_COLOR_REGEX:()=>fe,CSS_PROPS_REGISTRY:()=>wt,CSS_UNITS:()=>So,DEFAULT_CONFIG:()=>_c,DEFAULT_CSS_PROPERTIES_LIST:()=>Tt,DELEGATED_EVENTS:()=>gs,DESIGN_SYSTEM_OPTIONS:()=>c_,DOMQL_EVENTS:()=>Gp,DOMQ_PROPERTIES:()=>Fn,DOM_EVENTS:()=>_0,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Eo,ENV:()=>dh,FACTORY:()=>ue,FLEX_PROPS:()=>Ry,FONT_PROPS:()=>Ey,GRID_PROPS:()=>Py,HOST_REGISTERED_PACKAGES:()=>GE,HTML_ATTRIBUTES:()=>uu,HTML_TAGS:()=>Oo,LIFECYCLE_EVENTS:()=>or,METHODS:()=>jn,METHODS_EXL:()=>yi,MISC_PROPS:()=>Ay,MIXINS:()=>au,NODE_ENV:()=>$e,OPTIONS:()=>zi,PACKAGE_MANAGER_TO_CDN:()=>Hn,PARSED_DOMQ_PROPERTIES:()=>mi,POSITION_PROPS:()=>Ty,PROPS_METHODS:()=>Nn,REGISTRY:()=>Ut,RESERVED_STORE_METHODS:()=>Ix,ROUTER_OPTIONS:()=>Yu,SIGNAL_ENGINE_KEY:()=>xo,SIGNAL_INSTANCES_KEY:()=>bo,STANDARD_SCHEME_QUERIES:()=>Uf,STATE_PROPERTIES:()=>qp,STORE_METHOD_NAMES:()=>Lx,SVG_TAGS:()=>ps,THEME_PROPS:()=>Oy,TIMING_PROPS:()=>cc,TYPES:()=>li,UNIVERSAL_RESERVED_KEYS:()=>pf,VALUE_TRANSFORMERS:()=>Jf,VERSION:()=>Mx,__resetBuiltinMethodWarnings:()=>Gg,__resetSignalEngine:()=>xp,__resetSignalInstances:()=>_p,__resetSkinWarnings:()=>Jm,__resetStateShadowWarnings:()=>$x,activateConfig:()=>pS,addCaching:()=>Wl,addContext:()=>Hl,addDelegatedEvent:()=>ic,addExtend:()=>$h,addExtends:()=>Ye,addItemAfterEveryElement:()=>Lp,addMethods:()=>ws,addProtoToArray:()=>di,addRef:()=>Vl,aliasCaseVariants:()=>ts,animation:()=>Em,appendSVGSprite:()=>Ja,appendSvgIconsSprite:()=>Gr,applyAttrTransforms:()=>wy,applyCSS:()=>t_,applyDependentState:()=>tg,applyDocument:()=>Za,applyEvent:()=>Zl,applyEventUpdate:()=>Jl,applyExtends:()=>ys,applyHeadings:()=>Wf,applyInitialState:()=>ku,applyMediaSequenceVars:()=>Gn,applyProps:()=>Mi,applyReset:()=>Qa,applySequenceGlobalVars:()=>Ma,applySequenceVars:()=>xn,applySkins:()=>tc,applySpacingSequence:()=>Ba,applyStateMethods:()=>ye,applyTimingSequence:()=>Xa,applyTrueProps:()=>Ly,applyTypographySequence:()=>Ka,arrayContainsOtherArray:()=>Ep,arraysEqual:()=>$p,arrayzeValue:()=>Mr,assertEmitIntegrity:()=>fy,batch:()=>fl,breakpoints:()=>vm,buildImgSrcset:()=>_a,buildSkinVarStyles:()=>Yr,buildSourcesAndImg:()=>xa,buildThemeVarStyles:()=>Ku,cache:()=>sg,cacheNode:()=>rr,call:()=>Ag,callStateMethod:()=>fc,camelToAttr:()=>sn,camelToLowerAttr:()=>x0,captureSnapshot:()=>Og,changeGlobalTheme:()=>Qf,changeLightness:()=>am,checkAttributeByTagName:()=>Oe,checkEventFunctions:()=>xy,checkForStateTypes:()=>Xh,checkIfBoxSize:()=>ja,checkIfInherits:()=>Xl,checkIfStringIsInArray:()=>Np,class:()=>Pm,clone:()=>Zp,cloneAndMergeArrayExtend:()=>Ti,cloneFunction:()=>_h,collectExtendsList:()=>Ro,color:()=>ym,colorStringToRgbaArray:()=>ke,components:()=>Ts,compositeOverBackdrop:()=>jr,concatAddExtends:()=>Dh,contrastRatio:()=>Go,convertSvgToSymbol:()=>Na,copyJavaScriptToClipboard:()=>Zg,copyStringToClipboard:()=>Xg,create:()=>kx,createAsync:()=>F$,createBasedOnType:()=>Bl,createComputed:()=>Px,createConfig:()=>Oa,createDefine:()=>tE,createEffect:()=>G,createElement:()=>Yh,createElementExtends:()=>Tl,createExtends:()=>Ri,createExtendsFromKeys:()=>Po,createExtendsStack:()=>Dl,createHTMLNode:()=>ds,createIfConditionFlag:()=>xh,createInheritedState:()=>Zh,createKey:()=>Ci,createNestedObject:()=>sh,createNestedObjectByKeyPath:()=>Qh,createObjectWithoutPrototype:()=>xl,createParent:()=>Ul,createPath:()=>zl,createProps:()=>Fi,createPropsStack:()=>Nl,createRoot:()=>Gh,createScope:()=>ng,createScopeStore:()=>ul,createSignal:()=>oi,createSkeleton:()=>j$,createSnapshotId:()=>vi,createState:()=>zy,createStore:()=>fn,createSync:()=>N$,css:()=>ge,cssMediaVars:()=>Ff,cssVars:()=>Mf,customDecodeURIComponent:()=>Wp,customEncodeURIComponent:()=>Hp,cutArrayAfterValue:()=>Pp,cutArrayBeforeValue:()=>Rp,debounce:()=>Ei,debounceOnContext:()=>yh,decodeNewlines:()=>zp,deepClone:()=>it,deepContains:()=>rh,deepDefaults:()=>ga,deepDestringifyFunctions:()=>_e,deepExtend:()=>Al,deepMerge:()=>ot,deepMergeExtends:()=>Xe,deepStringifyFunctions:()=>_i,defaultDefine:()=>Ls,defineResolvedThemeSignal:()=>Qo,defineSetter:()=>Cg,defineThemeSignal:()=>Jo,destringifyGlobalScope:()=>wi,destroy:()=>Cc,detectHeightOnInit:()=>Ig,detectInfiniteLoop:()=>lh,detectTag:()=>nr,devices:()=>Cm,dispose:()=>vn,encodeNewlines:()=>Up,error:()=>Lr,excludeKeysFromObject:()=>uh,exec:()=>ut,executeAttr:()=>yP,exetuteClassPerComponent:()=>YP,extendCachedRegistry:()=>Lh,extendStackRegistry:()=>Pi,extractArrayExtend:()=>Li,extractConditionalAttrs:()=>xP,fetchLibraryData:()=>bf,fibonacciNumberByIndex:()=>$g,filterArrays:()=>Mp,filterArraysFast:()=>Fp,filterAttributesByTagName:()=>mP,finalizeExtends:()=>Ll,findClosestNumber:()=>yf,findClosestNumberInFactory:()=>Wg,findHeadingLetter:()=>Bf,findHeadings:()=>$a,findInheritedState:()=>Yl,findKeyPosition:()=>Bp,flattenExtend:()=>Do,font:()=>um,fontFace:()=>hm,fontFamily:()=>dm,fontFamilyTypes:()=>pm,formatDate:()=>Lg,generateHash:()=>vl,generateHeadArrayTags:()=>mf,generateKey:()=>ki,generateMetaTags:()=>zg,generateSequence:()=>te,generateSequencePosition:()=>Nm,generateSprite:()=>Fa,generateSubSequence:()=>La,get:()=>wg,getActiveConfig:()=>T,getActiveDocument:()=>Jr,getActiveLang:()=>ur,getCDNDirUrl:()=>hf,getCDNUrl:()=>Fe,getCacheSize:()=>dy,getCapitalCaseKeys:()=>Nh,getCdnProviderFromConfig:()=>Bo,getChildStateInKey:()=>Gl,getChildren:()=>vg,getColor:()=>et,getColorShade:()=>vf,getContext:()=>ia,getCookie:()=>Ch,getDB:()=>ua,getDefaultOrFirstKey:()=>Br,getEmitStats:()=>su,getEmotionStylesheet:()=>em,getExtendsInElement:()=>Mh,getExtendsStack:()=>Oi,getExtendsStackRegistry:()=>El,getFnPrefixAndValue:()=>_n,getFontFace:()=>lm,getFontFaceEach:()=>Vr,getFontFaceEachString:()=>Df,getFontFaceString:()=>Ca,getFontFamily:()=>qa,getFontFormat:()=>Rf,getFontSizeByKey:()=>Ga,getFrequencyInArray:()=>Ap,getFunctionSource:()=>Ie,getHashedExtend:()=>Di,getImportMapScript:()=>Dg,getInObjectByPath:()=>ch,getLanguages:()=>Ac,getLocalStateLang:()=>Dc,getLocalStorage:()=>Ah,getMediaColor:()=>$t,getMediaTheme:()=>Ae,getNev:()=>mh,getObserver:()=>In,getPageMetadata:()=>Hg,getParentStateInKey:()=>Kl,getPath:()=>ta,getQuery:()=>da,getRef:()=>kg,getResolvedThemeSignal:()=>dS,getRgbTone:()=>en,getRoot:()=>ra,getRootContext:()=>sa,getRootData:()=>oa,getRootState:()=>na,getRootStateInKey:()=>ql,getSafeInk:()=>zf,getSafeInkInfo:()=>Um,getSequenceValue:()=>zr,getSequenceValueBySymbols:()=>Ia,getSequenceValuePropertyPair:()=>rn,getShadow:()=>Ua,getShapeByKey:()=>Ya,getSignals:()=>Dx,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>At,getSpreadChildren:()=>jh,getSubratio:()=>Da,getSubratioDifference:()=>Pa,getSystemGlobalTheme:()=>me,getTheme:()=>qm,getThemeSignal:()=>uS,getTimingByKey:()=>he,getTimingFunction:()=>Te,global:()=>kp,gradient:()=>bm,grid:()=>Rm,hasFunction:()=>Le,hasHandlerPlugin:()=>Ao,hasOwnProperty:()=>th,hashContent:()=>Uo,hexToRgb:()=>rm,hexToRgbArray:()=>xf,hexToRgba:()=>sm,hslToRgb:()=>kf,icons:()=>wm,inheritChildExtends:()=>Rl,inheritChildPropsExtends:()=>Ol,inheritParentProps:()=>Ni,inheritRecursiveChildExtends:()=>Pl,init:()=>An,initPolyglot:()=>Ju,initProps:()=>Wh,injectGlobal:()=>xt,is:()=>Jt,isArray:()=>R,isBoolean:()=>pl,isBuiltinElementMethod:()=>Kp,isCSSVar:()=>_t,isContextComponent:()=>Bh,isCyclic:()=>fh,isDOMNode:()=>Zt,isDate:()=>gl,isDefined:()=>Rt,isDevelopment:()=>Vn,isDomDocument:()=>un,isEmpty:()=>bl,isEmptyObject:()=>eh,isEnumeratedTrueFalseAttr:()=>an,isEqualDeep:()=>_l,isFailedRevival:()=>Ar,isFunction:()=>O,isGoogleFontsUrl:()=>Yo,isHostObject:()=>dn,isHtmlElement:()=>ai,isLazyFunction:()=>Jp,isLocal:()=>gh,isLoudDevRuntime:()=>ht,isMalformedDependency:()=>Ir,isMethod:()=>Tg,isMobile:()=>kh,isNode:()=>pn,isNot:()=>Cp,isNotProduction:()=>Or,isNull:()=>hl,isNumber:()=>Ge,isObject:()=>v,isObjectLike:()=>j,isPhoto:()=>Mg,isPlainColor:()=>Zn,isPolyglotRetranslatableKey:()=>Ui,isPolyglotWritableKey:()=>Pr,isProduction:()=>Bn,isProtectedElementMethod:()=>kr,isRawUnitValue:()=>si,isResolvedColor:()=>Ne,isScalingUnit:()=>xr,isStaging:()=>hh,isState:()=>Jh,isStore:()=>St,isString:()=>k,isStringFunction:()=>Ai,isSvgTag:()=>hs,isTest:()=>Sl,isTesting:()=>ph,isTracking:()=>Wy,isUndefined:()=>Dt,isUniversallyReservedKey:()=>Rg,isUnresolvableDependency:()=>Wn,isValidDependencyMap:()=>$r,isValidHtmlTag:()=>Oh,isValidTag:()=>us,isWasmLoaded:()=>jC,isWrappedLibrary:()=>tn,isWritableFamilyBucket:()=>Sp,joinArrays:()=>ko,jointStacks:()=>Ih,keyframes:()=>fs,keys:()=>uf,linearChannelToSrgb:()=>Af,loadCssFile:()=>Bg,loadJavascript:()=>Vg,loadJavascriptFile:()=>Fg,loadJavascriptFileEmbedSync:()=>jg,loadJavascriptFileSync:()=>Ng,loadRemoteCSS:()=>Ug,loadRemoteScript:()=>Vo,loadTranslations:()=>Oc,loadWasm:()=>NC,log:()=>Eg,logGroupIf:()=>Sh,logIf:()=>wh,lookdown:()=>_g,lookdownAll:()=>xg,lookup:()=>bg,lowercaseFirstLetter:()=>wr,makeObjectWithoutPrototype:()=>nh,map:()=>Xp,mapStringsWithContextComponents:()=>Ii,markPolyglotSeeded:()=>Je,matchesComponentNaming:()=>Ze,media:()=>gm,memoize:()=>bh,merge:()=>bt,mergeSharedLibraries:()=>ma,mixTwoColors:()=>nm,mixTwoRgb:()=>im,mixTwoRgba:()=>Cf,nextElement:()=>ca,normalizeIgnoreList:()=>qn,normalizeLibraryKey:()=>zo,numToLetterMap:()=>nn,objectToString:()=>xi,objectizeStringProperty:()=>$i,oklabToLinearSrgb:()=>Tf,oklabToOklch:()=>Sa,oklchToGamutSafeSrgb:()=>ka,oklchToOklab:()=>Of,opacify:()=>Ko,overwrite:()=>Si,overwriteDeep:()=>Wt,overwriteShallow:()=>Tr,overwriteState:()=>eg,parkHostObject:()=>Mn,parse:()=>df,parseColorToken:()=>Vt,parseDeep:()=>Ji,pickupElementFromProps:()=>Ml,pickupPropsFromElement:()=>$l,polyglotFunctions:()=>Hc,polyglotPlugin:()=>$s,polyglotSeededKeys:()=>Lo,popConfig:()=>rt,popStaticCssPass:()=>gu,previousElement:()=>la,promoteActiveRootState:()=>Mo,propExists:()=>zh,propertizeElement:()=>Fl,propertizeUpdate:()=>Uh,pushConfig:()=>st,pushStaticCssPass:()=>hu,quietColorProbe:()=>Hr,refreshContextProto:()=>bu,registerEvent:()=>ms,registerHostPackages:()=>YE,registerSignalInstance:()=>_o,reinit:()=>Qb,relativeLuminance:()=>Fr,remove:()=>xs,removeChars:()=>Jg,removeCookie:()=>Eh,removeDelegatedEvent:()=>ac,removeDuplicateProps:()=>Bi,removeDuplicatesInArray:()=>vo,removeFromArray:()=>Tp,removeFromObject:()=>oh,removeNestedKeyByPath:()=>ih,removeValueFromArray:()=>ui,removeValueFromArrayAll:()=>Dp,reorderArrayByValues:()=>Ip,replaceLiteralsWithObjectFields:()=>Mt,replaceOctalEscapeSequences:()=>Vp,resetEmitStats:()=>ly,resolveAsset:()=>Qt,resolveBorderValue:()=>pe,resolveColorRgb:()=>Wr,resolveColorsInGradient:()=>nc,resolveConfigDocument:()=>wo,resolveDesignSystemClass:()=>D0,resolveFileSource:()=>_y,resolveFileUrl:()=>ve,resolveGridTracks:()=>A0,resolveHandler:()=>To,resolvePropValue:()=>sr,resolveShadowValue:()=>qr,resolveSharedLibraries:()=>Yg,returnSubThemeOrDefault:()=>cm,returnValueAsText:()=>jl,rgbArrayToHex:()=>wf,rgbToHSL:()=>Sf,rgbToHex:()=>om,runPluginHook:()=>Pt,runThroughMedia:()=>Hf,schemeGuardSelector:()=>Qn,schemeMediaQuery:()=>Jn,scratchDefaultConfig:()=>Zo,scratchSystem:()=>ss,scratchUtils:()=>Yn,self:()=>vp,semanticIcons:()=>Sm,sequence:()=>bn,serializeAttrValue:()=>ne,set:()=>Xr,setActiveConfig:()=>Nf,setActiveDocument:()=>cy,setActiveRootState:()=>ea,setAdaptiveSchemeVar:()=>tr,setClass:()=>_D,setClassname:()=>XP,setColor:()=>Xn,setCookie:()=>vh,setCssEngineHook:()=>qu,setCustomFont:()=>va,setCustomFontMedia:()=>Kn,setEach:()=>ey,setFont:()=>Wa,setFontFamily:()=>rs,setFontImport:()=>Xo,setGradient:()=>es,setHashedExtend:()=>Cl,setInCustomFontMedia:()=>Pf,setInObjectByPath:()=>ah,setLang:()=>Rc,setLocalStorage:()=>Th,setMediaTheme:()=>ns,setNodeStyles:()=>ff,setObserver:()=>$n,setProps:()=>Sg,setPropsPrototype:()=>ji,setSVG:()=>os,setScalingVar:()=>Ra,setShadow:()=>er,setSubScalingVar:()=>jf,setSvgIcon:()=>Kr,setTheme:()=>Ha,setValue:()=>ty,setVariables:()=>jm,setWasmEngine:()=>sc,shadow:()=>xm,shape:()=>Im,sharedLibrary:()=>Kg,sizes:()=>Lm,skins:()=>$m,spacing:()=>mm,splitPackageSpecifier:()=>pa,splitSpacedValue:()=>Va,splitTopLevelCommas:()=>yn,splitTopLevelSpaces:()=>dt,splitTransition:()=>Zf,spotByPath:()=>Qi,srcsetFor:()=>Ho,srgbChannelToLinear:()=>Ef,srgbToOklab:()=>wa,stringIncludesAny:()=>hi,stringToObject:()=>Qp,stripVersionRangePrefix:()=>ha,svg:()=>Am,svgData:()=>Tm,swapItemsInArray:()=>Op,syncProps:()=>Vi,templates:()=>Om,theme:()=>_m,timing:()=>km,toCamel:()=>Ta,toCamelCase:()=>ya,toDashCase:()=>ba,toDescriptionCase:()=>tm,toLinearChannel:()=>qo,toPriorityOrder:()=>xe,toTitleCase:()=>Qg,toggleFullscreen:()=>Pg,transformBackgroundImage:()=>Gf,transformBorder:()=>on,transformBorderRadius:()=>wn,transformBoxShadow:()=>ec,transformClassname:()=>I0,transformDuration:()=>rc,transformGridTemplate:()=>Xf,transformShadow:()=>Kf,transformSize:()=>kt,transformSizeRatio:()=>I,transformTextStroke:()=>qf,transformTransition:()=>Qm,transformersByPrefix:()=>Iy,transfromGap:()=>Yf,translate:()=>Tc,triggerEventOn:()=>gn,triggerEventOnUpdate:()=>rg,trimStringFromSymbols:()=>jp,typography:()=>Ea,unit:()=>fm,unstackArrayOfObjects:()=>fi,update:()=>bs,updateProps:()=>qh,updateVars:()=>bD,upsertTranslation:()=>Pc,useCssInProps:()=>se,useHostState:()=>Hy,usePropsAsCSS:()=>P0,useSelectorsAsCSS:()=>L0,variables:()=>fa,vars:()=>Dm,verbose:()=>Fo,warn:()=>aa,warnStateKeyShadowsMethod:()=>dl,window:()=>C,wrapHoverRule:()=>Sn});module.exports=KA(vx);var wp={};$(wp,{RESERVED_STORE_METHODS:()=>Ix,SIGNAL_ENGINE_KEY:()=>xo,SIGNAL_INSTANCES_KEY:()=>bo,STORE_METHOD_NAMES:()=>Lx,VERSION:()=>Mx,__resetSignalEngine:()=>xp,__resetSignalInstances:()=>_p,__resetStateShadowWarnings:()=>$x,batch:()=>fl,createComputed:()=>Px,createEffect:()=>G,createScopeStore:()=>ul,createSignal:()=>oi,createStore:()=>fn,getObserver:()=>In,getSignals:()=>Dx,isStore:()=>St,registerSignalInstance:()=>_o,setObserver:()=>$n,warnStateKeyShadowsMethod:()=>dl});var up={};$(up,{WRITE_JOURNAL:()=>ti,batch:()=>ni,createComputed:()=>YA,createEffect:()=>XA,createSignal:()=>qe,getObserver:()=>lp,journalWrite:()=>ei,setObserver:()=>GA});var Xt=null,rl=0,ol=[],lp=()=>Xt,GA=t=>{Xt=t},sl=0,sp=[];function qe(t){let e=new Set;function n(){return Xt&&(e.add(Xt),Xt._sources.add(s)),t}function r(i){i!==t&&(t=i,nT(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function YA(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){cp(o);let s=Xt;Xt=o;try{e=t(),n=!1}finally{Xt=s}},_notify(){n=!0,r.size>0&&Ox(r)},get(){return Xt&&(r.add(Xt),Xt._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}var De=new Set,ip=!1,ti=[];function ei(t){ti.push(t),ti.length>32&&ti.shift()}function XA(t,e){let n=e?.depth??0,r={_sources:new Set,_type:"effect",_depth:n,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(r._disposed)return;cp(r);let o=Xt;Xt=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Xt=o}},_notify(){r._disposed||(rl>0?ol.push(r):sl>0?sp.push(r):fp(r))},dispose(){r._disposed=!0,cp(r)}};return r._execute(),r}function ni(t){rl++;try{t()}finally{rl--,rl===0&&eT()}}var ap=!1,Ex=1e3,ZA=8,JA=256,QA=4;function Ax(){return typeof performance<"u"?performance.now():Date.now()}function fp(t){De.add(t),!ap&&(ip||(ip=!0,queueMicrotask(Tx)))}var yo=[];function tT(){if(De.size===1){let[e]=De;return De.clear(),e._disposed?0:(e._execute(),1)}yo.length=0;for(let e of De)yo.push(e);De.clear(),yo.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<yo.length;e++){let n=yo[e];n._disposed||(n._execute(),t++)}return yo.length=0,t}function Tx(t=0,e=0){if(ip=!1,De.size===0)return;ap=!0;let n=Ax(),r=!1;try{for(;De.size>0;){if(++t>Ex){let o=new Map;for(let c of De){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of ti)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",Ex,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),De.clear();break}if(e+=tT(),De.size>0&&(e>=JA||t>=QA)&&Ax()-n>ZA){r=!0,setTimeout(()=>Tx(t,e),0);break}}}finally{r||(ap=!1)}}function eT(){for(let t=0;t<ol.length;t++)fp(ol[t]);ol.length=0}function Ox(t){sl++;try{for(let e of t)e._notify()}finally{if(sl--,sl===0&&sp.length>0){let e=sp.splice(0);for(let n=0;n<e.length;n++)fp(e[n])}}}function nT(t){Ox(t)}function cp(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var bp={};$(bp,{RESERVED_STORE_METHODS:()=>ri,STORE_METHOD_NAMES:()=>yp,__resetStateShadowWarnings:()=>rT,createScopeStore:()=>aT,createStore:()=>il,getSignals:()=>iT,isStore:()=>sT,warnStateKeyShadowsMethod:()=>mp});var Ke=Symbol("store"),al=Symbol("signals"),yp=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ri=new Set(yp),gp=new Set,dp=(t,e)=>t?t+"."+e:String(e);function mp(t,e){let n=(e||"")+"::"+t;if(gp.has(n))return;gp.add(n);let r=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${r}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${r}.${t}(\u2026)" no longer reaches the store method on this node. Use "${r}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${yp.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function rT(){gp.clear()}var pp=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ke]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!cl(t),oT=12,cl=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function ll(t,e,n){if(t===e)return!0;if(n>oT)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!ll(t[r],e[r],n+1))return!1;return!0}if(cl(t)&&cl(e)){let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s of r)if(!Object.prototype.hasOwnProperty.call(e,s)||!ll(t[s],e[s],n+1))return!1;return!0}return!1}function il(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r="");let o={},s={},i=b=>Object.prototype.hasOwnProperty.call(o,b)&&Object.prototype.hasOwnProperty.call(s,b),a=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let b in t){if(b==="__proto__"||!Object.prototype.hasOwnProperty.call(t,b))continue;if(b.startsWith("__")){s[b]=t[b];continue}ri.has(b)&&mp(b,r);let _=t[b];n<a&&_&&typeof _=="object"&&!pp(_)?(s[b]=_,o[b]=qe(il(_,e,n+1,dp(r,b)))):(s[b]=_,o[b]=qe(_))}let c=new Proxy(s,{get(b,_){if(_===Ke)return!0;if(_===al)return o;if(_==="__raw")return b;if(_==="$update")return l;if(_==="$parse")return u;if(_==="$clean")return d;if(_==="$keys")return h;if(_==="$values")return p;if(_==="$replace")return g;if(_==="$add")return m;if(_==="$remove")return y;if(_==="$destroy")return x;if(_==="$quietUpdate")return f;if(ri.has(_)&&!Object.prototype.hasOwnProperty.call(o,_))switch(_){case"update":return l;case"parse":return u;case"clean":return d;case"keys":return h;case"values":return p;case"replace":return g;case"add":return m;case"remove":return y;case"destroy":return x;case"quietUpdate":return f}if(_==="__element")return b.__element;if(_==="parent")return b.parent;if(_==="root")return b.root;if(Object.prototype.hasOwnProperty.call(o,_)){let S=o[_].get();if(S!==void 0||!(_!=="root"&&b.root&&b.root!==c))return S}if(b[_]!==void 0)return b[_];let w=typeof _=="string"&&!_.startsWith("__")&&_!=="then"&&_!=="constructor"&&lp()!=null;if(_!=="root"&&b.root&&b.root!==c){let S=b.root[_];return w&&!Object.prototype.hasOwnProperty.call(o,_)&&(o[_]=qe(void 0),o[_].get()),S}if(w)return o[_]=qe(void 0),o[_].get()},set(b,_,w){if(_==="__proto__")return!1;if(_==="__element"||_==="parent"||_==="root"||typeof _=="string"&&_.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,_))return b[_]=w,!0;ri.has(_)&&mp(_,r);let S=dp(r,_);if(Object.prototype.hasOwnProperty.call(o,_))if(w&&typeof w=="object"&&!pp(w)){if(w===b[_])return!0;let A=o[_].peek(),P=A&&A[Ke]?A.$parse():A;if(ll(w,P,0))return!0;b[_]=w,ei(S),o[_].set(il(w,e,n+1,S))}else{if(Array.isArray(w)&&w!==b[_]&&Array.isArray(o[_].peek())&&ll(w,o[_].peek(),0))return!0;o[_].peek()!==w&&ei(S),b[_]=w,o[_].set(w)}else b[_]=w,w&&typeof w=="object"&&!pp(w)?o[_]=qe(il(w,e,n+1,S)):o[_]=qe(w);return!0},has(b,_){return typeof _=="string"&&_.charCodeAt(0)===36&&ri.has(_.slice(1))?!0:_ in b},ownKeys(b){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(b,_){return i(_)?{enumerable:!0,configurable:!0,value:o[_].peek()}:Object.getOwnPropertyDescriptor(b,_)},deleteProperty(b,_){return o[_]&&(o[_].peek()!==void 0&&ei(dp(r,_)),o[_].set(void 0),delete o[_]),delete b[_],!0}});function l(b,_){ni(()=>{for(let S in b)S!=="__proto__"&&(c[S]=b[S])});let w=s.__element;return w&&w.onUpdate&&!_?.quiet&&w.onUpdate(w,c,w.context),c}function f(b){return l(b,{quiet:!0})}function u(b){if(b||(b=new Set),b.has(c))return"[Circular]";b.add(c);let _={};for(let w in o){if(w==="parent"||w==="root"||w.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,w))continue;let S=o[w].peek();S&&S[Ke]?_[w]=S.$parse(b):_[w]=S}return _}function d(){return ni(()=>{for(let b in o)delete c[b]}),c}function h(){return Object.keys(o).filter(i)}function p(){return Object.keys(o).filter(i).map(b=>o[b].peek())}function g(b){return ni(()=>{for(let _ in o)_ in b||delete c[_];for(let _ in b)_!=="__proto__"&&(c[_]=b[_])}),c}function m(b,_){let w=Object.prototype.hasOwnProperty.call(o,b)?o[b].peek():s[b];if(Array.isArray(w))return c[b]=[...w,_],c;if(w&&typeof w=="object"&&!Array.isArray(w)){if(cl(_))w[Ke]?w.$update(_):c[b]={...w,..._};else{let S=String(Object.keys(w).length);w[Ke]?w.$update({[S]:_}):c[b]={...w,[S]:_}}return c}return c[b]=_,c}function y(b){return delete c[b],c}function x(){d(),s.__element=null,s.parent=null}return c}function sT(t){return t&&t[Ke]===!0}function iT(t){return t[al]}function aT(t,e){let n={},r={};if(t&&typeof t=="object")for(let i in t)r[i]=t[i],n[i]=qe(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(n,i))return n;let a=e;for(;a;){let c=a[al];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Ke]?a[hp]:null}return null};return new Proxy(r,{get(i,a){return a===Ke?!0:a===al?n:a===hp?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(n,a)?n[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=o(a);return l?(l===n&&(i[a]=c),l[a].set(c),!0):(i[a]=c,n[a]=qe(c),!0)},has(i,a){if(a in n||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[Ke]?c[hp]:null}return!1},ownKeys(){return Object.keys(n)},getOwnPropertyDescriptor(i,a){return a in n?{enumerable:!0,configurable:!0,value:n[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var hp=Symbol("scope.parent");var _r="3.14.785";var bo="__SMBLS_SIGNAL_INSTANCES__",_o=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[bo]||(r[bo]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||_r),n||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),o},_p=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[bo]};var xo="__SMBLS_SIGNAL_ENGINE__",Rx=(t,e,n)=>{let r=e||_r,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[xo];return s&&s.engine&&s.version===r?(_o(r,o,!0),s.engine):(s||(o[xo]={version:r,engine:t}),_o(r,o,!1),t)},xp=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[xo]};var Ht=Rx({...up,...bp,VERSION:_r},_r),oi=Ht.createSignal,Px=Ht.createComputed,G=Ht.createEffect,fl=Ht.batch,In=Ht.getObserver,$n=Ht.setObserver,fn=Ht.createStore,ul=Ht.createScopeStore,St=Ht.isStore,Dx=Ht.getSignals,Lx=Ht.STORE_METHOD_NAMES,Ix=Ht.RESERVED_STORE_METHODS,dl=Ht.warnStateKeyShadowsMethod,$x=Ht.__resetStateShadowWarnings,Mx=Ht.VERSION;var py={};$(py,{assertEmitIntegrity:()=>fy,css:()=>ge,getActiveDocument:()=>Jr,getCacheSize:()=>dy,getEmitStats:()=>su,injectGlobal:()=>xt,keyframes:()=>fs,reset:()=>c0,resetEmitStats:()=>ly,setActiveDocument:()=>cy,setWasmEngine:()=>sc,wrapHoverRule:()=>Sn});var ny={};$(ny,{COMPOUND_CSS_KEYWORDS:()=>Nr,CONFIG:()=>Ur,CONFIG_MERGE_EXL:()=>de,CSS_NAMED_COLOR_HEX:()=>_f,CSS_NATIVE_COLOR_REGEX:()=>fe,CSS_UNITS:()=>So,FACTORY:()=>ue,STANDARD_SCHEME_QUERIES:()=>Uf,VALUE_TRANSFORMERS:()=>Jf,__resetSkinWarnings:()=>Jm,activateConfig:()=>pS,aliasCaseVariants:()=>ts,animation:()=>Em,appendSVGSprite:()=>Ja,appendSvgIconsSprite:()=>Gr,applyDocument:()=>Za,applyHeadings:()=>Wf,applyMediaSequenceVars:()=>Gn,applyReset:()=>Qa,applySequenceGlobalVars:()=>Ma,applySequenceVars:()=>xn,applySkins:()=>tc,applySpacingSequence:()=>Ba,applyTimingSequence:()=>Xa,applyTypographySequence:()=>Ka,breakpoints:()=>vm,buildSkinVarStyles:()=>Yr,changeGlobalTheme:()=>Qf,changeLightness:()=>am,checkIfBoxSize:()=>ja,class:()=>Pm,color:()=>ym,colorStringToRgbaArray:()=>ke,compositeOverBackdrop:()=>jr,contrastRatio:()=>Go,convertSvgToSymbol:()=>Na,createConfig:()=>Oa,cssMediaVars:()=>Ff,cssVars:()=>Mf,defineResolvedThemeSignal:()=>Qo,defineThemeSignal:()=>Jo,devices:()=>Cm,document:()=>lS,findHeadingLetter:()=>Bf,findHeadings:()=>$a,font:()=>um,fontFace:()=>hm,fontFamily:()=>dm,fontFamilyTypes:()=>pm,generateSequence:()=>te,generateSequencePosition:()=>Nm,generateSprite:()=>Fa,generateSubSequence:()=>La,getActiveConfig:()=>T,getColor:()=>et,getColorShade:()=>vf,getDefaultOrFirstKey:()=>Br,getFnPrefixAndValue:()=>_n,getFontFace:()=>lm,getFontFaceEach:()=>Vr,getFontFaceEachString:()=>Df,getFontFaceString:()=>Ca,getFontFamily:()=>qa,getFontFormat:()=>Rf,getFontSizeByKey:()=>Ga,getMediaColor:()=>$t,getMediaTheme:()=>Ae,getResolvedThemeSignal:()=>dS,getRgbTone:()=>en,getSafeInk:()=>zf,getSafeInkInfo:()=>Um,getSequenceValue:()=>zr,getSequenceValueBySymbols:()=>Ia,getSequenceValuePropertyPair:()=>rn,getShadow:()=>Ua,getShapeByKey:()=>Ya,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>At,getSubratio:()=>Da,getSubratioDifference:()=>Pa,getTheme:()=>qm,getThemeSignal:()=>uS,getTimingByKey:()=>he,getTimingFunction:()=>Te,gradient:()=>bm,grid:()=>Rm,hexToRgb:()=>rm,hexToRgbArray:()=>xf,hexToRgba:()=>sm,hslToRgb:()=>kf,icons:()=>wm,isCSSVar:()=>_t,isDomDocument:()=>un,isGoogleFontsUrl:()=>Yo,isHostObject:()=>dn,isPlainColor:()=>Zn,isRawUnitValue:()=>si,isResolvedColor:()=>Ne,isScalingUnit:()=>xr,isWritableFamilyBucket:()=>Sp,linearChannelToSrgb:()=>Af,media:()=>gm,mixTwoColors:()=>nm,mixTwoRgb:()=>im,mixTwoRgba:()=>Cf,numToLetterMap:()=>nn,oklabToLinearSrgb:()=>Tf,oklabToOklch:()=>Sa,oklchToGamutSafeSrgb:()=>ka,oklchToOklab:()=>Of,opacify:()=>Ko,parkHostObject:()=>Mn,parseColorToken:()=>Vt,popConfig:()=>rt,pushConfig:()=>st,quietColorProbe:()=>Hr,relativeLuminance:()=>Fr,reset:()=>fS,resolveBorderValue:()=>pe,resolveColorRgb:()=>Wr,resolveColorsInGradient:()=>nc,resolveConfigDocument:()=>wo,resolveFileUrl:()=>ve,resolveShadowValue:()=>qr,returnSubThemeOrDefault:()=>cm,rgbArrayToHex:()=>wf,rgbToHSL:()=>Sf,rgbToHex:()=>om,runThroughMedia:()=>Hf,schemeGuardSelector:()=>Qn,schemeMediaQuery:()=>Jn,scratchDefaultConfig:()=>Zo,scratchSystem:()=>ss,scratchUtils:()=>Yn,semanticIcons:()=>Sm,sequence:()=>bn,set:()=>Xr,setActiveConfig:()=>Nf,setAdaptiveSchemeVar:()=>tr,setColor:()=>Xn,setCustomFont:()=>va,setCustomFontMedia:()=>Kn,setEach:()=>ey,setFont:()=>Wa,setFontFamily:()=>rs,setFontImport:()=>Xo,setGradient:()=>es,setInCustomFontMedia:()=>Pf,setMediaTheme:()=>ns,setSVG:()=>os,setScalingVar:()=>Ra,setShadow:()=>er,setSubScalingVar:()=>jf,setSvgIcon:()=>Kr,setTheme:()=>Ha,setValue:()=>ty,setVariables:()=>jm,shadow:()=>xm,shape:()=>Im,sizes:()=>Lm,skins:()=>$m,spacing:()=>mm,splitSpacedValue:()=>Va,splitTopLevelCommas:()=>yn,splitTopLevelSpaces:()=>dt,splitTransition:()=>Zf,srgbChannelToLinear:()=>Ef,srgbToOklab:()=>wa,svg:()=>Am,svgData:()=>Tm,templates:()=>Om,theme:()=>_m,timing:()=>km,toCamel:()=>Ta,toLinearChannel:()=>qo,transformBackgroundImage:()=>Gf,transformBorder:()=>on,transformBorderRadius:()=>wn,transformBoxShadow:()=>ec,transformDuration:()=>rc,transformGridTemplate:()=>Xf,transformShadow:()=>Kf,transformSize:()=>kt,transformSizeRatio:()=>I,transformTextStroke:()=>qf,transformTransition:()=>Qm,transfromGap:()=>Yf,typography:()=>Ea,unit:()=>fm,vars:()=>Dm});var Yn={};$(Yn,{COMPOUND_CSS_KEYWORDS:()=>Nr,CSS_NAMED_COLOR_HEX:()=>_f,CSS_NATIVE_COLOR_REGEX:()=>fe,CSS_UNITS:()=>So,applyMediaSequenceVars:()=>Gn,applySequenceGlobalVars:()=>Ma,applySequenceVars:()=>xn,changeLightness:()=>am,colorStringToRgbaArray:()=>ke,compositeOverBackdrop:()=>jr,contrastRatio:()=>Go,convertSvgToSymbol:()=>Na,findHeadingLetter:()=>Bf,findHeadings:()=>$a,generateSequence:()=>te,generateSequencePosition:()=>Nm,generateSprite:()=>Fa,generateSubSequence:()=>La,getColorShade:()=>vf,getDefaultOrFirstKey:()=>Br,getFnPrefixAndValue:()=>_n,getFontFace:()=>lm,getFontFaceEach:()=>Vr,getFontFaceEachString:()=>Df,getFontFaceString:()=>Ca,getFontFormat:()=>Rf,getRgbTone:()=>en,getSequenceValue:()=>zr,getSequenceValueBySymbols:()=>Ia,getSequenceValuePropertyPair:()=>rn,getSubratio:()=>Da,getSubratioDifference:()=>Pa,hexToRgb:()=>rm,hexToRgbArray:()=>xf,hexToRgba:()=>sm,hslToRgb:()=>kf,isCSSVar:()=>_t,isDomDocument:()=>un,isGoogleFontsUrl:()=>Yo,isHostObject:()=>dn,isRawUnitValue:()=>si,isResolvedColor:()=>Ne,isScalingUnit:()=>xr,isWritableFamilyBucket:()=>Sp,linearChannelToSrgb:()=>Af,mixTwoColors:()=>nm,mixTwoRgb:()=>im,mixTwoRgba:()=>Cf,numToLetterMap:()=>nn,oklabToLinearSrgb:()=>Tf,oklabToOklch:()=>Sa,oklchToGamutSafeSrgb:()=>ka,oklchToOklab:()=>Of,opacify:()=>Ko,parkHostObject:()=>Mn,parseColorToken:()=>Vt,relativeLuminance:()=>Fr,resolveConfigDocument:()=>wo,resolveFileUrl:()=>ve,returnSubThemeOrDefault:()=>cm,rgbArrayToHex:()=>wf,rgbToHSL:()=>Sf,rgbToHex:()=>om,setCustomFont:()=>va,setCustomFontMedia:()=>Kn,setFontImport:()=>Xo,setInCustomFontMedia:()=>Pf,setScalingVar:()=>Ra,setSubScalingVar:()=>jf,setVariables:()=>jm,splitTopLevelCommas:()=>yn,splitTopLevelSpaces:()=>dt,srgbChannelToLinear:()=>Ef,srgbToOklab:()=>wa,toLinearChannel:()=>qo});var un=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),dn=t=>{if(t===null||typeof t!="object")return!1;let e=Object.prototype.toString.call(t);return!!(e!=="[object Object]"&&e!=="[object Array]"||typeof t.nodeType=="number"||t.defaultView||t.window===t||t.self===t)},Sp=t=>t!==null&&typeof t=="object"&&!dn(t),Mn=(t,e,n)=>{if(!t)return;if(un(n)){t.__domDocument||(t.__domDocument=n);return}let r=`__host_${e}`;t[r]||(t[r]=n)},wo=t=>t?un(t.__domDocument)?t.__domDocument:un(t.document)?t.document:null:null;var xr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",So=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"],cT=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),lT=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${So.filter(t=>t!=="auto").map(cT).join("|")})$`),si=t=>lT.test(String(t).trim());D();var _f={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},ke=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=_f[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&nt&&C){let n=nt.body.appendChild(nt.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){nt.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return nt.body.removeChild(n),[0,0,0,0];t=C.getComputedStyle(n).color,nt.body.removeChild(n)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(n=>+n)):[0,0,0,0]},nm=(t,e,n=.5)=>(t=ke(t),e=ke(e),Cf(t,e,n)),rm=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${n},${r},${o})`},xf=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]},om=(t,e,n)=>"#"+(1<<24|t<<16|e<<8|n).toString(16).slice(1),wf=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1),sm=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${n},${r},${o},${e})`},im=(t,e,n=.5)=>{let r=[];for(let o=0;o<3;o++)r[o]=~~(t[o]+(e[o]-t[o])*n);return`rgb(${r})`},am=(t,e)=>{let[n,r,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[n,r,s]},Sf=(t,e,n)=>{let r=Math.max(t,e,n),o=r-Math.min(t,e,n),s=1-Math.abs(r+r-o-1),i=o&&(r==t?(e-n)/o:r==e?2+(n-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(r+r-o)/2]},kf=(t,e,n,r=e*Math.min(n,1-n),o=(s,i=(s+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],vf=(t,e)=>{let n=parseInt(t,16),r=(n>>16)+e;r>255?r=255:r<0&&(r=0);let o=(n>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(n&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|r<<16)+16777216).toString(16).slice(1)},Cf=(t,e,n=.5)=>{let r=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;r[o]=s(t[o]+(e[o]-t[o])*n)}return`rgba(${r})`},Ko=(t,e)=>{let n=ke(t);if(!n){Or()&&console.warn(t+" color is not rgba");return}return n[3]=e,`rgba(${n})`},_t=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Nr=new Set(["currentcolor","transparent","thin","medium","thick"]),fe=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,zO=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Vt=t=>{if(!k(t))return null;if(fe.test(t))return{passthrough:t};if(_t(t))return{cssVar:t};let e=t.match(zO);if(!e)return null;let[,n,r,o]=e,s=r!==void 0?`0.${r}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:n,alpha:s,tone:i}},Ne=t=>k(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),yn=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),o===","&&r===0){e.push(n),n="";continue}n+=o}return(n.length||!e.length)&&e.push(n),e},dt=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),r===0&&/\s/.test(o)){n.length&&e.push(n),n="";continue}n+=o}return n.length&&e.push(n),e},qo=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Fr=t=>.2126*qo(t[0])+.7152*qo(t[1])+.0722*qo(t[2]),Go=(t,e)=>{let n=Fr(t)+.05,r=Fr(e)+.05;return n>r?n/r:r/n},Ef=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Af=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,wa=([t,e,n])=>{let[r,o,s]=[t,e,n].map(Ef),i=.4122214708*r+.5363325363*o+.0514459929*s,a=.2119034982*r+.6806995451*o+.1073969566*s,c=.0883024619*r+.2817188376*o+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},Tf=([t,e,n])=>{let r=t+.3963377774*e+.2158037573*n,o=t-.1055613458*e-.0638541728*n,s=t-.0894841775*e-1.291485548*n,i=r**3,a=o**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Sa=([t,e,n])=>{let r=Math.atan2(n,e)*180/Math.PI;return r<0&&(r+=360),[t,Math.sqrt(e*e+n*n),r]},Of=([t,e,n])=>{let r=n*Math.PI/180;return[t,e*Math.cos(r),e*Math.sin(r)]},ka=(t,e,n,r=24)=>{let o=a=>Tf(Of([t,a,n])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<r;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>Af(Math.max(0,Math.min(1,a))))},jr=(t,e=1,n=[255,255,255])=>e>=1?t:t.map((r,o)=>r*e+n[o]*(1-e)),en=(t,e)=>{k(t)&&t.includes("rgb")&&(t=ke(t).join(", ")),k(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Ge(e)&&(e+="");let n=wf(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=vf(n,parseFloat(e));return xf(o).join(", ")}else{let[o,s,i]=t,[a,c]=Sf(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return kf(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var cm=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var ve=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let n=e[t];return n?n.content&&n.content.src:null},Br=(t,e)=>{if(t[e])return t[e].value;let n=()=>Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value&&!t[o].isSystemFallback);if(t.default){let o=t[t.default];if(o&&o.isSystemFallback){let s=n();if(s)return t[s].value}if(o)return o.value}let r=n()||Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value);return r&&t[r]&&t[r].value},Rf=t=>{if(typeof t!="string"||!t)return null;let e=t.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(e)?e:null},Yo=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),Xo=t=>`@import url('${t}');`,Pf=t=>`@font-face { ${t} }`,va=(t,e,n,r={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Rf(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
34
34
  `);return`
35
35
  font-family: '${t}';
36
36
  font-style: ${r.fontStyle||"normal"};${n?`
@@ -39,23 +39,23 @@ FROM ${a}${l}`},xO=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;
39
39
  font-display: ${r.fontDisplay};`:""}${r.unicodeRange?`
40
40
  unicode-range: ${r.unicodeRange};`:""}
41
41
  src: ${i};`},Kn=(t,e,n,r)=>`@font-face {${va(t,e,n,r)}
42
- }`,Vr=(t,e,n)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>ve(d,n)||d):ve(s,n)||s;return va(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),lm=t=>Object.keys(t).map(n=>Vr(n,t[n].value)),Df=(t,e,n)=>{if(e&&e.isVariable){let s=ve(e.url,n)||e.url;return Yo(s)?Xo(s):Kn(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return Vr(t,e,n).map(Pf);let o=Array.isArray(e.url)?e.url.map(s=>ve(s,n)||s):ve(e.url,n)||e.url;return Kn(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Ca=(t,e)=>Object.keys(t).map(r=>Df(r,t[r].value,e));D();D();D();D();var Zo={};$(Zo,{animation:()=>Em,breakpoints:()=>vm,class:()=>Pm,color:()=>ym,devices:()=>Cm,document:()=>cS,font:()=>um,fontFace:()=>hm,fontFamily:()=>dm,fontFamilyTypes:()=>pm,gradient:()=>bm,grid:()=>Rm,icons:()=>wm,media:()=>gm,reset:()=>lS,semanticIcons:()=>Sm,sequence:()=>bn,shadow:()=>xm,shape:()=>Lm,sizes:()=>Im,skins:()=>$m,spacing:()=>mm,svg:()=>Am,svgData:()=>Tm,templates:()=>Om,theme:()=>_m,timing:()=>km,typography:()=>Ea,unit:()=>fm,vars:()=>Dm});var bn={"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 fm={default:"em"};var zO={browserDefault:16,base:16,type:"font-size",ratio:bn["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Ea=zO;var um={};var dm={},pm={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},hm={};var gm={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var HO={base:Ea.base,type:"spacing",ratio:bn.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},mm=HO;var ym={},bm={};var _m={};var xm={};var wm={},Sm={};var WO={default:150,base:150,type:"timing",ratio:bn["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},km=WO;var cS={};var vm={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Cm={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 Em={};var Am={},Tm={};var Om={};var qO={},Rm=qO;var Pm={};var lS={},Dm={},Im={},Lm={},$m={};var Mf={},Ff={},de=new Set,If=Zo,Lf={},Ta=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in If){let e=t.toLowerCase();Lf[e]=If[t];let n=Ta(e);n!==e&&(Lf[n]=If[t]),e!==t&&(Lf[t]=If[t])}var Ur={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Mf,cssMediaVars:Ff,CSS_VARS:Mf,CSS_MEDIA_VARS:Ff,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...Lf},Jo=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return Rt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=Rt(e)?e:t.globalTheme,r=oi(Rt(n)?n:"auto");return Object.defineProperty(t,"globalTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r},fS=t=>t?Jo(t):null,Qo=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return Rt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=Rt(e)?e:t.resolvedTheme,r=oi(Rt(n)?n:null);return Object.defineProperty(t,"resolvedTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r},uS=t=>t?Qo(t):null;Jo(Ur);Qo(Ur);var $f=it(Ur),ue={active:"0",0:Ur},dS=t=>(Rt(t)&&(ue.active=t),ue[t||ue.active]),Aa=[],st=t=>{t&&t._scratchConfig&&Aa.push(t)},rt=()=>{Aa.pop()},T=t=>Aa.length?Aa[Aa.length-1]:ue[t||ue.active]||Ur,Nf=t=>{if(v(t))return ue.active="1",ue[1]=ot(t,it($f),de),ts(ue[1]),Jo(ue[1]),Qo(ue[1]),t},KO=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],GO=["useVariable","globalTheme","verbose"],YO=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],ts=t=>{for(let e of YO){let n;for(let r of e){let o=t[r];v(o)&&(n=n?ot(n,o,de):o)}if(n)for(let r of e)v(t[r])&&(t[r]=n)}},Oa=(t,e,{cleanBase:n=!1}={})=>{let r=n?null:T(),o=it(!n&&r&&r._scratchConfig?r:$f);for(let i of KO)delete o[i];for(let i of GO)Object.prototype.hasOwnProperty.call($f,i)?o[i]=$f[i]:delete o[i];let s=ot(e||{},o,de);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s.cssSkinVars={},s.cssSkinFallback={},s._scratchConfig=!0,ts(s),Jo(s),Qo(s),t&&(ue[t]=s),s};var nn={"-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"},Fm=(t,e)=>{let{key:n,variable:r,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[n]={key:n,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:r},e.scales[n]=s;let c=pS.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},_n=t=>{if(!t.includes("("))return t;let e=t.trim(),n=e.indexOf("("),r=e.slice(0,n),o=0,s=-1;for(let i=n;i<e.length;i++){let a=e[i];if(a==="(")o++;else if(a===")"&&(o--,o===0)){s=i;break}}return s===-1||/\s/.test(r)||e.slice(s+1).trim()!==""?[void 0,t]:[r,e.slice(n+1,s)]},Mm="\0",XO=(t,e)=>{let n="",r=0,o="";for(let s of t){if(r===0&&s!=="("){n+=s;continue}o+=s,s==="("?r++:s===")"&&(r--,r===0&&(n+=Mm+e.length+Mm,e.push(o),o=""))}return n+o},ZO=(t,e)=>t.indexOf(Mm)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),JO=/^(calc|min|max|clamp)\((.*)\)$/,QO=(t,e)=>{let n=JO.exec(t);return n?`${n[1]}(${La(n[2],e)})`:t.indexOf("(")!==-1?t:zr(t,e)},pS=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ra=(t,e)=>{let{base:n,type:r,unit:o}=e,s=pS.has(o)?"rem":o,i=(xr(s)?1:n)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=nn[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=nn[t+1],u=Math.abs(t),d=Math.pow(hS,2*u),h=nn[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},jf=(t,e,n,r)=>{let{type:o}=r,i=t===2&&e.length===2?t+1:t,l=`${"--"+(r.varPrefix?r.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${n}) * var(${l+i}))`},Pa=(t,e)=>{let r=(t*e-t)/1.618,o=t*e-r,s=t+r,i=(o+s)/2;return[o,i,s]},Da=(t,e)=>Pa(t,e).map(n=>n/t),Ia=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,h]=Pa(o,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((p,g)=>{let m=~~(p/r*1e3)/1e3,y=i+(g+1),x=a+(g+1)/10,b=jf(g+1,f,i,e),_={key:n+(g+1),variable:y,value:p,scaling:m,scalingVariable:b,index:x};Fm(_,e)})},hS=1.618,tR=(t,e,n)=>{if(t>=0)return e*Math.pow(n,t);let r=Math.abs(t),o=e*Math.pow(n,t),s=e*Math.pow(n,r)/Math.pow(hS,2*r);return Math.max(o,s)},te=t=>{let{type:e,base:n,ratio:r,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=nn[f],d=tR(f,n,r),h=~~(d/n*100)/100,p=c+u,g=Ra(f,t),m={key:u,variable:p,value:d,base:n,scaling:h,scalingVariable:g,ratio:r,index:f};Fm(m,t),s&&Ia(m,t)}return t},Nm=(t,e=0)=>{let{type:n,base:r,ratio:o,subSequence:s}=t,i=S(e)?e:nn[e],a=S(e)?Object.entries(nn).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=r*Math.pow(o,a),f=~~(l/r*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(n&&n.replace(".","-"))+"-"+i,p=Ra(a,t),g={key:i,variable:h,value:l,base:r,scaling:f,scalingVariable:p,ratio:o,index:a};return Fm(g,c),s&&Ia(g,c),c},zr=(t="A",e)=>{let n=T(),{unit:r}=n;if(S(t)&&_t(t))return`var(${t})`;if(S(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(S(t)){let b=n.sizes;if(b){let _=b[t]||b[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:o,unit:s=r.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(si(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${ba(e.type.replace(".","-"))}-`,h=t.toUpperCase(),p=h.slice(0,1)==="-"?"-":"",g=p?h.slice(1):h,m="";g.includes("_")&&(m="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let y=b=>a.test(b)?`var(${d}${b}${m})`:b;if(g.includes("+")){let[b,_]=g.split("+"),w=`${y(b)} + ${y(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("*")){let[b,_]=g.split("*"),w=`${y(b)} * ${y(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("-")){let[b,_]=g.split("-"),w=`${y(b)} - ${y(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}if(!o[g]&&g.length===2&&(n.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||n.useVariable){let b=`var(${d}${g}${m})`;return p?`calc(${b} * -1)`:b}let x=o?o[g]:null;if(!x){if(console.warn("can't find",o,g),ht())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?p+x.val+s:p+x.scaling+s},La=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return XO(t,o).split(r).map(i=>{let a=ZO(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:QO(c,e)}).join("")},rn=(t,e,n,r)=>{if(typeof t!="string")return T().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!r&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=_n(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=La(t,n):t=zr(t,n),{[e]:r?`${r}(${t})`:t}},Bf=(t,e)=>nn[t-e],$a=t=>{let{h1Matches:e,sequence:n}=t;return new Array(6).fill(null).map((r,o)=>{let s=Bf(e,o);return n[s]})};D();var jm=(t,e)=>{let n=T(),{cssVars:r}=n;j(t.value)||(r[t.var]=t.value)},Ma=(t,e,n)=>{let r=T(),{unit:o}=r,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[d,h,p]=Da(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${h/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${p/a})`},gS=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),xn=(t,e={})=>{let n=T(),{unit:r,timing:o,cssVars:s}=n,i=t.unit||r.default,a=gS.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Ma(s,t,e);for(let u in l){let d=l[u],h=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=h,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=h:(s[d.variable+"_default"]=h,s[d.variable]=`var(${d.variable+"_default"})`)}},Gn=(t,e,n={})=>{let r=T(),{unit:o,media:s,cssVars:i}=r,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=gS.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,p=s[a];if(!p&&r.verbose&&console.warn("Can't find media query ",p),!u){let g=i[`@media ${p}`];g||(g=i[`@media ${p}`]={}),Ma(g,c,n);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let x=d[y],b=h[y]+f;g[x.variable+"_default"]=b,g[x.variable]=b}return}for(let g in d){let m=d[g],y=(xr(f)?h[g]:d[g].val)+f;!p&&r.verbose&&console.warn("Can't find query ",p);let x=i[`@media ${p}`];x||(x=i[`@media ${p}`]={}),x[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};D();var yS=Or(),Fa=t=>{let e=T(),n="";for(let r in t)e.__svgCache[r]||(e.__svgCache[r]=!0,n+=t[r]);return n},eR=t=>{let e=t&&(t.default||t);if(!S(e))return yS&&console.warn("parseRootAttributes:",e,"is not a string"),{};let n=e.match(/<svg\s+(.*?)>/);if(!n||!n[1])return{};let o=n[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},{}):{}},nR=(t,e)=>{let n=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(n.push(s),o)),!n.length)return t;let r=t;for(let o of n){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;r=r.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 r},mS=new Set,Na=(t,e)=>{let n=e&&e.default?e.default:e;if(!S(n))return yS&&!mS.has(t)&&(mS.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=n;let r=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(r){let u=r[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=eR(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=nR(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=sR(f),f},rR="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",oR=new RegExp(`<(${rR})\\b([^>]*?)\\s*/>`,"g"),sR=t=>t.replace(oR,"<$1$2></$1>");var ss={};$(ss,{STANDARD_SCHEME_QUERIES:()=>Uf,__resetSkinWarnings:()=>Jm,appendSVGSprite:()=>Ja,appendSvgIconsSprite:()=>Gr,applyDocument:()=>Za,applyHeadings:()=>Wf,applyReset:()=>Qa,applySkins:()=>tc,applySpacingSequence:()=>Ba,applyTimingSequence:()=>Xa,applyTypographySequence:()=>Ka,buildSkinVarStyles:()=>Yr,checkIfBoxSize:()=>ja,getColor:()=>et,getFontFamily:()=>qa,getFontSizeByKey:()=>Ga,getMediaColor:()=>$t,getMediaTheme:()=>Ae,getSafeInk:()=>zf,getSafeInkInfo:()=>Um,getShadow:()=>Ua,getShapeByKey:()=>Ya,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>At,getTheme:()=>qm,getTimingByKey:()=>he,getTimingFunction:()=>Te,isPlainColor:()=>Zn,quietColorProbe:()=>Hr,resolveBorderValue:()=>pe,resolveColorRgb:()=>Wr,resolveShadowValue:()=>qr,runThroughMedia:()=>Hf,schemeGuardSelector:()=>Qn,schemeMediaQuery:()=>Jn,setAdaptiveSchemeVar:()=>tr,setColor:()=>Xn,setFont:()=>Wa,setFontFamily:()=>rs,setGradient:()=>es,setMediaTheme:()=>ns,setSVG:()=>os,setShadow:()=>er,setSvgIcon:()=>Kr,setTheme:()=>Ha,splitSpacedValue:()=>Va});D();var Uf={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Jn=(t,e)=>{let n=e.media&&e.media[t]||Uf[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},Qn=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},Ce=new Set,wS=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","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","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","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","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),iR=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,aR=/gradient\(|url\(|image-set\(|var\(/i,cR=new Set(["transparent","currentColor","currentcolor"]),Zn=t=>{if(!S(t))return!1;let e=t.trim();return aR.test(e)?!1:iR.test(e)?!0:wS.has(e)||cR.has(e)},Vf=new Set,bS=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(v(e)&&Object.keys(e).length||v(n)&&Object.keys(n).length)},_S=new Set,Bm=0,Hr=t=>{Bm++;try{return t()}finally{Bm--}},lR=(t,e)=>{if(!S(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=Vt(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},Vm=(t,e,n)=>{let r=lR(t,n);if(r){if(!_S.has(t)){_S.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${r}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let o=Vt(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&bS(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!Bm&&!Vf.has(t)){Vf.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=S(e)?e.toLowerCase():"";if(!wS.has(s)||!bS(n))return t;if(!Vf.has(s)){Vf.add(s);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${i}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},SS=(t,e,n)=>{let r=e!==void 0?e:1;if(!n)return`rgb(from ${t} r g b / ${r})`;if(n.charCodeAt(0)===43||n.charCodeAt(0)===45){let s=parseFloat(n),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${r})`}return`hsl(from ${t} h s ${n}% / ${r})`},et=(t,e,n)=>{let r=n||T();if(!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(_t(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(R(t))[o,s,i]=t;else{let u=Vt(t);if(!u){let{color:d,gradient:h}=r,p=h[t]||d[t];return p?(e&&p[e]&&(p=p[e]),r.useVariable?`var(${p.var})`:p.value):Vm(t,t,r)}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}=r,l=a[o]||c[o];if(!l)return Vm(t,o,r);if(e)if(l[e]!==void 0)l=l[e];else if(R(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&r.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else r.verbose&&console.warn(t," - does not have ",e);if(S(l)){if(Ce.has(o))return l;Ce.add(o);try{return et(l,null,n)}finally{Ce.delete(o)}}let f=l.rgb;if(!f){let u=r.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?SS(u,s,i):u}return i&&!l[i]&&(f=en(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, ${l.alpha!==void 0?l.alpha:1})`:r.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},xS=t=>{let e=ke(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},fR=(t,e)=>{if(!e)return t;let n=t.rgb;if(e.tone){let o=en(n,e.tone);n=S(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let r=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:n,alpha:r}},Wr=(t,e,n)=>{let r=e||T();if(!S(t))return null;let o=Vt(t);if(o){if(o.passthrough){let d=ke(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=r,c=i[s]||a[s];if(!c)return xS(t);if(S(c)){let d;if(Ce.has(s))d=xS(c);else{Ce.add(s);try{d=Wr(c,r,n)}finally{Ce.delete(s)}}return d?fR(d,o):null}if(c.rgb===void 0&&v(c)){let d=`@${n||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;o&&o.tone&&(l=en(l,o.tone));let f=S(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},kS=t=>v(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),vS=t=>{if(!v(t)||t.value!==void 0)return null;let e=[];for(let n in t)if(n!=="var"){if(n.charCodeAt(0)!==64||!kS(t[n]))return null;e.push(n.slice(1))}return e.length?e:null},uR=t=>S(t&&t.var)&&vS(t)!==null,dR=(t,e,n,r,o)=>{let s=vS(e);if(!s)return;if(S(e.var)){let c=`var(${e.var})`;return n||r?SS(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=et(t,"@light",o),a=et(t,"@dark",o);if(!(!Zn(i)||!Zn(a)))return i===a?i:`light-dark(${i}, ${a})`},$t=(t,e,n)=>{let r=n||T();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(_t(t))return`var(${t})`;let o,s,i;if(R(t))o=t[0];else{let u=Vt(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}=r,l=a[o]||c[o],f=v(l);if(f&&l.value)return et(t,`@${e}`,n);if(f){if(r.useVariable&&l.var)return s||i?et(t,null,n):`var(${l.var})`;if(e){if(!r.useVariable&&a[o]===l){let u=dR(t,l,s,i,n);if(u!==void 0)return u}return et(t,`@${e}`,n)}else{let u={},d=Qn(r);for(let h in l){if(h.charCodeAt(0)!==64)continue;let p=h.slice(1),g=et(t,h,n);if(g!==void 0&&(u[`[data-theme="${p}"] &`]=g,p==="light"||p==="dark")){let m=Jn(p,r);if(!m)continue;u[m]={[d]:g}}}return u}}else return Vm(t,o,r)},tr=(t,e,n,r)=>{let s=`--${r.varPrefix?r.varPrefix+"-":""}${e}-${n}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){r.cssVars[s]=i,r.cssMediaVars||(r.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(r.cssMediaVars[l]||(r.cssMediaVars[l]={}),r.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;r.cssMediaVars[f]||(r.cssMediaVars[f]={}),r.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Xn=(t,e,n)=>{let r=T();if(kS(t))return r.useVariable&&t.var&&(r.cssVars[t.var]=t.value),t;if(!r.useVariable&&uR(t))return t;if(S(t)&&_t(t)){let g=t.slice(2);if(t=et(g),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=g.split(" "),y=r.color[m[0]];if(y&&!y.value&&!y.rgb&&(S(y)||R(y)||v(y))&&!Ce.has(m[0])){Ce.add(m[0]);try{r.color[m[0]]=Xn(y,m[0])}finally{Ce.delete(m[0])}y=r.color[m[0]]}if(y&&y.value){let x=y.rgb,b=m[1]!==void 0?m[1]:"1",_=m[2];_&&(x=en(x,_)),t=`rgba(${x}, ${b})`}else{let x=m[2],b=m[1]!==void 0?m[1]:"1";if(x)try{let _=ke(m[0]);_&&_.length>=3?t=`rgba(${en(_.slice(0,3).join(", "),x)}, ${b})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(R(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),v(t)){let g={};for(let m in t)m!=="var"&&(g[m]=Xn(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return r.useVariable&&tr(g,"color",e,r),g}let s=`--${r.varPrefix?r.varPrefix+"-":""}color-${e}`+(n?`-${n}`:""),i=t.value||t;if(S(i)&&!i.includes("(")&&!i.startsWith("#")){let g=Vt(i);if(g&&g.name&&!g.passthrough&&!g.cssVar){let m=r.color[g.name];if(m&&!m.value&&!m.rgb&&(S(m)||R(m)||v(m))&&!Ce.has(g.name)){Ce.add(g.name);try{r.color[g.name]=Xn(m,g.name)}finally{Ce.delete(g.name)}}let y=r.color[g.name];if(y&&y.rgb){let x=y.rgb;g.tone&&(x=en(x,g.tone));let b=g.alpha!==void 0?parseFloat(g.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${x}, ${b})`}}}let a=ke(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,p=`rgba(${h}, ${d})`;return r.useVariable&&(r.cssVars[s]=p),{var:s,rgb:h,alpha:d,value:p}},es=(t,e,n)=>{let r=T();if(v(t)&&t.value!==void 0&&t.var!==void 0)return r.useVariable&&(r.cssVars[t.var]=t.value),t;if(S(t)&&_t(t)&&(t=et(t.slice(2))),R(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),v(t)){let i={};for(let a in t)a!=="var"&&(i[a]=es(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return r.useVariable&&tr(i,"gradient",e,r),i}let s=`--${r.varPrefix?r.varPrefix+"-":""}gradient-${e}`+(n?`-${n}`:"");return r.useVariable&&(r.cssVars[s]=t.value||t),{var:s,value:t.value||t}};D();var zf=(t,e,n={},r)=>{let o=r||T(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=n,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=S(e)?e:String(e),h=Vt(t),p=h&&!h.passthrough&&!h.cssVar?h.name:null,g=(Z,Y)=>c?{value:Z,...Y}:Z;if(p){let Z=o.color[`${p}Safe`];if(Z){let Y=`${d}@${u}`,U=Z[Y]!==void 0?Z[Y]:Z[d];if(U!==void 0){let Ot=U&&U.rgb!==void 0?o.useVariable&&U.var?`var(${U.var})`:U.value:et(U,null,o);return g(Ot,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=et(t,u?`@${u}`:null,o),y=Wr(t,o,u),x=Wr(e,o,u);if(!y||!x)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),g(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let b=jr(x.rgb,x.alpha),_=jr(y.rgb,y.alpha,b),w=Go(_,b);if(w>=f-.02)return g(m,{ratio:w,deviation:0,derived:!1,overridden:!1});let[k,A,P]=wa(y.rgb),[,I,E]=Sa([k,A,P]),M=Fr(b)>.5,X=M?k:1-k,vt=Z=>{let Y=M?k-Z:k+Z,U=Math.max(0,Math.min(1,Y));return{rgb:ka(U,I,E),L:U}},Ct=Z=>{let{rgb:Y}=vt(Z),U=jr(Y.map(Ot=>Math.round(Ot)),y.alpha,b);return Go(U,b)},at=0,N=X,H=Ct(N)>=f;if(H)for(let Z=0;Z<l;Z++){let Y=(at+N)/2;Ct(Y)>=f?N=Y:at=Y}else at=N;let{rgb:mt,L:B}=vt(N),gt=mt.map(Z=>Math.round(Z)),F=Ct(N),q=y.alpha<1?`rgba(${gt.join(", ")}, ${y.alpha})`:`rgb(${gt.join(", ")})`,yt=Math.abs(B-k)*100;return g(q,{rgb:gt,ratio:F,startRatio:w,deviation:yt,derived:!0,overridden:!1,reachable:H})},Um=(t,e,n={},r)=>zf(t,e,{...n,meta:!0},r);D();D();var pR=t=>{let n=T().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return te(o),o},hR=t=>{for(let e in t){let n=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;bt(n,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),te(n),Gn(t,e)}},ja=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r},Ba=()=>{let t=T(),{spacing:e}=t;te(e),xn(e),hR(e)},gR=t=>{let e=T(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:te(t)},At=(t,e="padding",n,r)=>{let o=gR(n);if(S(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=_n(t);r=i[0],t=i[1]}}let s=r?[t]:S(t)&&t.includes("(")?dt(t):Mr(t);if(R(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)=>rn(s[f],e+l+i,o,r);return a[s.length].map((l,f)=>c(l,f))}return rn(t,e,o,r)}},Ee=(t,e,n,r)=>{let o=T(),{spacing:s}=o,i=n||t[e];if(!r&&S(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&S(i)&&i.includes("(")){let a=_n(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=pR(t);return At(i,e,a,r)}return At(i,e,s,r)},Va=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=So.some(i=>t.includes(i));return r||o?n:n.length<3&&/[A-Z]/.test(n)?n+"_default":n};return t.split(",").map(n=>n.trim()).map(e).join(",").split(" ").map(e).join(" ")};D();var qr=(t,e,n)=>!S(t)||fe.test(t)?t:yn(t).map(r=>(r=r.trim(),r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(o.startsWith("--"))return`var(${o})`;let s=Hr(()=>et(o,e));if(Fe(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||Nr.has(o.toLowerCase()))return o;n&&n(o);let i=At(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),er=(t,e,n,r)=>{let o=T();if(v(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(R(t)){let a={"@light":er(t[0],e,"light"),"@dark":er(t[1],e,"dark")};return o.useVariable&&tr(a,"shadow",e,o),a}if(v(t)){let a={};for(let c in t)a[c]=er(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&tr(a,"shadow",e,o),a}S(t)&&!fe.test(t)&&(t=qr(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(n?`-${n}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},Ua=(t,e)=>{let n=T();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(_t(t))return`var(${t})`;let[r]=R(t)?t:t.split(" "),s=n.shadow[r],i=v(s);if(!s)return n.verbose&&console.warn("Can't find color ",r),t;if(i&&!s.value&&n.useVariable&&s.var)return`var(${s.var})`;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;n.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={},c=Qn(n);for(let l in s){if(l.charCodeAt(0)!==64)continue;let f=l.slice(1),u=s[l],d=u&&(u.value!==void 0?u.value:u);if(d!==void 0&&(a[`[data-theme="${f}"] &`]=d,f==="light"||f==="dark")){let h=Jn(f,n);if(!h)continue;a[h]={[c]:d}}}return a}return n.verbose&&console.warn("Can't find color",t),t};var mR=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),yR=t=>mR.has(t),pe=(t,e,n)=>{if(t==null)return;let r=t+"";if(fe.test(r))return r;let o=r.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?r:r.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(_t(s))return`var(${s})`;if(yR(s)||/^\d/.test(s)||s==="0")return s;let i=Hr(()=>et(s,e));if(Fe(i))return i;if(Nr.has(s.toLowerCase()))return s;n&&n(s);let a=At(s,"border");return a&&a.border?a.border:s}).join(" ")};D();var bR=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"]),CS=["color","Color","background","Background","fill","Fill","stroke","Stroke"],OS=t=>{for(let e=0;e<CS.length;e++)if(t.includes(CS[e]))return!0;return!1},_R={boxShadow:qr,textShadow:qr,border:pe,borderTop:pe,borderRight:pe,borderBottom:pe,borderLeft:pe,outline:pe,columnRule:pe},xR=t=>{if(!t)return!1;let e=Vt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},ES=new Set,wR=(t,e,n,r,o,s)=>{if(!ht())return;let i=`${t}::${e}::${n||""}::${r}`;ES.has(i)||(ES.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(n?` (${n})`:"")+` did not fully resolve: "${r}" -> "${o}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},Wm=(t,e,n,r)=>{let o=_R[e];if(!o)return et(n,r);let s=null,i=o(n,r,a=>{!s&&xR(a)&&(s=a)});return s&&wR(t,e,r,n,i,s),i},qm=(t,e)=>Ae(t,e),SR=t=>v(t)&&j(t.value),kR=t=>{for(let e in t){let n=t[e];if(S(n)&&n.startsWith("var(--"))return!0}return!1},Ha=(t,e)=>{let n=T();return SR(t)?!n.useVariable&&kR(t)?t:ns(t.value,e):ns(t,e)},RS=(t,e)=>{let n=new Set;for(let r of e){let o=r.slice(0,1);if(!(o==="@"||o==="."||o===":")&&OS(r))for(let s in t){if(n.has(s))continue;let i=t[s]?.[r];if(i===void 0)continue;let a=et(i,`@${s}`);a!==void 0&&S(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!bR.has(a)&&n.add(s)}}return n},vR=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),za=(t,e)=>{for(let n in e){let r=e[n];v(r)?za(t[n]||(t[n]={}),r):t[n]=r}return t},AS=(t,e,n,r)=>{if(za(t,{[`[data-theme="${e}"] &`]:n}),e!=="light"&&e!=="dark")return;let o=Jn(e,r);o&&za(t,{[o]:{[Qn(r)]:n}})},PS=(t,e,n,r)=>{let o=n.globalTheme!==void 0?n.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(r?Object.keys(r):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=RS(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let y={};for(let _ in t)j(t[_]?.[l])&&(y[_]=t[_][l]);let x=r&&j(r[l])?r[l]:void 0;if(!Object.keys(y).length&&!x)continue;let b=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=PS(y,`${e}-${b}`,n,x);continue}let u=r&&!j(r[l])?r[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let h={},p;for(let y of d){if(a.has(y))continue;let x=t[y]?.[l];if((x===void 0||j(x))&&(x=u),x===void 0)continue;let b=Wm(e,l,x,`@${y}`);b!==void 0&&(h[y]=b,(s&&y===s||!s&&(y==="light"||p===void 0))&&(p=b))}let g={},m=Object.keys(h).filter(y=>h[y]!==p);if(m.length){let y=h.light!==void 0?h.light:p,x=h.dark!==void 0?h.dark:p;if(OS(l)&&Zn(y)&&Zn(x)){g[l]=y===x?y:`light-dark(${y}, ${x})`;for(let b in h)b==="light"||b==="dark"||AS(g,b,{[l]:h[b]},n)}else{p!==void 0&&(g[l]=p);for(let b of m)AS(g,b,{[l]:h[b]},n)}}else{if(p===void 0)continue;g[l]=p}za(c,g),c[`.${l}`]=g}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},zm=(t,e,n,r)=>{let{cssVars:o}=n;n.cssMediaVars||(n.cssMediaVars={});let s=n.cssMediaVars,i=n.globalTheme!==void 0?n.globalTheme:"auto",a=i&&i!=="auto"?String(i).replace(/^'|'$/g,""):null,c={},l=new Set(r?Object.keys(r):[]);for(let u in t)if(t[u])for(let d of Object.keys(t[u]))l.add(d);let f=RS(t,l);for(let u of l){let d=u.slice(0,1),h=j(r?.[u])||Object.values(t).some(p=>j(p?.[u]));if(d==="."&&h){let p=u.slice(1),g={};for(let y in t)j(t[y]?.[u])&&(g[y]=t[y][u]);let m=j(r?.[u])?r[u]:void 0;c[u]=zm(g,`${e}-${p}`,n,m)}else if(d===":"&&h){let p=u.replace(/^:+/,""),g={};for(let y in t)j(t[y]?.[u])&&(g[y]=t[y][u]);let m=j(r?.[u])?r[u]:void 0;c[u]=zm(g,`${e}-${p}`,n,m)}else if(d!=="@"&&d!=="."&&d!==":"){let g=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}-${u}`,m=r&&!j(r[u])?r[u]:void 0,y=new Set(Object.keys(t));m!==void 0&&(y.add("light"),y.add("dark"),a&&y.add(a));let x,b=!1;for(let _ of y){if(f.has(_))continue;let w=t[_]?.[u];if((w===void 0||j(w))&&(w=m),w===void 0)continue;let k=Wm(e,u,w,`@${_}`);if(k===void 0)continue;b=!0,(a&&_===a||!a&&(_==="light"||x===void 0))&&(x=k);let A=`[data-theme="${_}"]`;if(s[A]||(s[A]={}),s[A][g]=k,_==="dark"||_==="light"){let P=`@media (prefers-color-scheme: ${_})`;s[P]||(s[P]={}),s[P][g]=k}}if(x!==void 0&&(o[g]=x),!b)continue;c[u]=`var(${g})`,c[`.${u}`]={[u]:c[u]}}}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},ns=(t,e,n,r)=>{let o=T(),{cssVars:s}=o,i={value:t},a=!n&&!r,c,l;if(j(t)){if(a&&o.useVariable){let f={},u={};for(let d in t)d.startsWith("@")?j(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];(Object.keys(f).length||Object.keys(u).length)&&(l=zm(f,e,o,u),Object.assign(i,l))}else if(a){let f={},u={};for(let d in t)d.startsWith("@")?j(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];c=PS(f,e,o,u),Object.assign(i,c)}for(let f in t){let u=f.slice(0,1),d=t[f];if(u==="@"||u===":"||u==="."){let h=u==="@"&&f;i[f]=ns(d,e,f,r||h)}else if(!a){let h=Wm(e,f,d,r),p=[...new Set([r,n].filter(x=>x).map(x=>x.slice(1)))],g=p.length?"-"+p.join("-"):"",y=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${g}-${f}`;o.useVariable?(o.useThemeSuffixedVars&&(s[y]=h),i[f]=`var(${y})`):i[f]=h,i[`.${f}`]={[f]:i[f]}}}if(c)for(let f in c){let u=f.slice(0,1);(u==="."||u===":")&&j(t[f])&&(i[f]=c[f])}if(l)for(let f in l){let u=f.slice(0,1);(u==="."||u===":")&&j(t[f])&&(i[f]=l[f])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(S(t)&&_t(t)){let u=o.theme[t.slice(2)];return Ae(u,r)}return i},Hm=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(j(t[r]))if(e&&vR(r))n[r]=za({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=Hm(t[r],e):o==="."&&(n[`&${r}`]=Hm(t[r],e))}else n[r]=t[r]}return n},DS=(t,e)=>{let n=e.shift();return t[n]?DS(t[n],e):t},TS=(t,e)=>R(e)?DS(t,e):S(e)&&t[e]?t[e]:t;var Ae=(t,e)=>{let n=T();if(S(t)&&_t(t)&&(t=Ae(t.slice(2))),!t||!S(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=R(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=TS(s,o):s&&e&&(s=TS(s,e)),Hm(s,!n.useVariable)};D();D();var Wa=(t,e)=>{let n=T(),r=`--font-${e}`;if(!t||R(t)&&!t[0])return;let o;if(t.isVariable){let s=ve(t.url,n.files)||t.url;Yo(s)?o=Xo(s):o=Kn(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=Vr(e,t,n.files);else{let s=Array.isArray(t.url)?t.url.map(i=>ve(i,n.files)||i):ve(t.url,n.files)||t.url;o=Kn(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:r,value:t,fontFace:o}},qa=(t,e)=>{let n=T(),{fontFamily:r}=n;return Br(e||r,t)},rs=(t,e)=>{let n=T(),{fontFamily:r,fontFamilyTypes:o}=n,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!r.default)&&(r.default=e),v(s)&&(s=Mr(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};D();var Hf=t=>{let e=T(),{typography:n,media:r}=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:d,subSequence:h,h1Matches:p,unit:g}=t;bt(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:p,unit:g});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||g,x=!i.unit&&m.has(g)?"rem":y,b=r[c],_="@media "+(b==="print"?`${b}`:`screen and ${b}`);if(n.templates[_]={fontSize:i.base/n.browserDefault+x},!a){bt(i,{sequence:{},scales:{},vars:{}}),te(i),Gn(t,o);continue}bt(i,{sequence:{},scales:{},templates:{},vars:{}}),te(i),Gn(t,o)}},Wf=t=>{let e=T();if(t.h1Matches){let n=t.unit,r=$a(t),{templates:o}=t;for(let s in r){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${r[s]?.variable})`:`${r[s]?.scaling}${n}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},Ka=()=>{let t=T(),{typography:e}=t;te(e),Wf(e),xn(e),Hf(e)},Ga=t=>{let e=T(),{typography:n}=e;return rn(t,"fontSize",n)};D();var Ya=t=>{if(!S(t))return;let n=T().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};D();var Xa=()=>{let t=T(),{timing:e}=t;te(e),xn(e)},Te=t=>{let e=T(),{timing:n}=e;return n[t]||n[ya(t)]||t},he=(t,e="timing")=>{let n=T(),{timing:r}=n;return rn(t,e,r)};D();var Za=()=>{let t=T(),{fontFamily:e,theme:n,typography:r}=t,o=t.document;return dn(o)?(Mn(t,"document",o),o=t.document={}):o||(o=t.document={}),bt(o,{theme:n.document,fontFamily:Br(e),fontSize:r.base,lineHeight:r.lineHeight})};D();var Ym={document:nt},IS=new WeakMap,LS=new WeakMap,CR=128,$S=1048576,Km=8192,Xm=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),NS=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),ER=(t,e)=>{let n=1,r=t.ownerDocument;if(r&&typeof r.createTreeWalker=="function"){let s=r.createTreeWalker(t,4294967295);for(;s.nextNode();)if(++n>e)return n;return n}let o=[t];for(;o.length;){let s=o.pop().childNodes||[];for(let i=0;i<s.length;i++){if(++n>e)return n;o.push(s[i])}}return n},Gm=(t,e)=>{if(typeof t.importNode=="function")return t.importNode(e,!0);let n=e.cloneNode(!0);return typeof t.adoptNode=="function"?t.adoptNode(n):n},AR=(t,e)=>{if(typeof t.prepend=="function")return t.prepend(e);let n=t.firstChild!==void 0?t.firstChild:t.childNodes&&t.childNodes[0];return typeof t.insertBefore=="function"?t.insertBefore(e,n||null):t.appendChild(e)},os=(t,e)=>{let n=T();if(!t){n.verbose&&console.warn("setSVG: val is not defined",e);return}return n.useSvgSprite?Na(e,t):t},Ja=(t,e=Ym)=>{let n=T(),r=Object.keys(t).length?{}:n.svg;for(let o in t)r[o]=t[o];BS(r,e)},Kr=(t,e)=>{let n=T();return n.useIconSprite&&!n.semanticIcons?.[e]?os(t,e):t},Gr=(t,e=Ym)=>{let n=T(),r=Object.keys(t).length?{}:n.icons;for(let o in t)r[o]=t[o];BS(r,e)},jS=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let n=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(n.setAttribute("aria-hidden","true"),n.setAttribute("width","0"),n.setAttribute("height","0"),n.setAttribute("style","position:absolute"),n.setAttribute("id","svgSprite")),n},TR=(t,e)=>{let n=typeof DOMParser<"u"?DOMParser:null;if(n){let r=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new n().parseFromString(r,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},OR=(t,e,n)=>{let r=String(n),o=LS.get(e),s=o?.entries.get(r);if(s)return o.entries.delete(r),o.entries.set(r,s),s.root;let i=TR(t,r);if(i||(i=jS(t,{isRoot:!1}),i.innerHTML=r),r.length>$S)return i;let a=ER(i,Km);if(a>Km)return i;for(o||(o={entries:new Map,units:0,nodes:0},LS.set(e,o));o.entries.size>=CR||o.units+r.length>$S||o.nodes+a>Km;){let c=o.entries.keys().next().value,l=o.entries.get(c);o.units-=c.length,o.nodes-=l.nodes,o.entries.delete(c)}return o.entries.set(r,{root:i,nodes:a}),o.units+=r.length,o.nodes+=a,i},MS=t=>{let e=new Map;for(let n of t.children){let r=Xm(n);if(!r)continue;let o=e.get(r)||[];o.push(n),e.set(r,o)}return e},RR=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),FS=(t,e,n,r)=>{let o=0,s=e.childElementCount>8?MS(n):null,i=a=>{if(!s)try{return[...n.querySelectorAll(`symbol[id="${RR(a)}"]`)].filter(c=>c.parentNode===n)}catch{s=MS(n)}return s.get(a)};for(let a of e.childNodes){if(NS(a))continue;let c=Xm(a);if(!c&&r){let u=o++,d=r.nodes[u];if(!d&&r.complete||d?.parentNode===n)continue;let h=Gm(t,d||a);n.appendChild(h),r.nodes[u]=h;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=Gm(t,a),n.appendChild(f);else if(!f.isEqualNode(a)){let u=Gm(t,a);n.replaceChild(u,f),f=u}if(l)for(let u=1;u<l.length;u++)l[u].remove();c&&s&&s.set(c,[f])}},BS=(t,e=Ym)=>{let n=T(),r=e.document||nt;if(!r||!r.documentElement)return n.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Fa(t);let o=r.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||jS(r);if(!i||!i.nodeType)return;let a=d=>OR(r,i,d),c=a(s),l=IS.get(i);l||IS.set(i,l=new WeakMap);let f=l.get(n);if(f||l.set(n,f=new Map),[...c.childNodes].some(d=>!NS(d)&&!Xm(d))){let d=[];for(let h in t)d.push(h);for(let h of d){let p=f.get(h);p||f.set(h,p={nodes:[],complete:!1}),FS(r,d.length===1?c:a(t[h]),i,p),p.complete=!0}}else{FS(r,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||AR(r.body,i);for(let d in t)n.__svgCache[d]=!0};D();var Qa=(t={})=>{let e=T(),n=e.typography||{},r=e.document||{},o=v(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=n.templates||{};c.body={...e.useDocumentTheme?Ae("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?Ae("document"):{};if(o.html&&Wt(o.html,a),n.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[c].html.fontSize=l.fontSize))}if(n.unit){let c=e.media||{};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,d=f.base||n.base,h=f.browserDefault||n.browserDefault,p=l.slice(1),g=c[p];if(!g)continue;let m="@media "+(g==="print"?g:"screen and "+g);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/h+u}}return ot(bt(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:r.fontFamily,lineHeight:r.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:r.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}},de)};D();var PR=new Set(["fallback"]),Zm=new Set,VS=(t,e)=>{Zm.has(t)||(Zm.add(t),ht()&&console.warn(e))},Jm=()=>{Zm.clear()},US=t=>{for(let e in t)delete t[e];return t},tc=()=>{let t=T(),e=v(t.cssSkinVars)?US(t.cssSkinVars):t.cssSkinVars={},n=v(t.cssSkinFallback)?US(t.cssSkinFallback):t.cssSkinFallback={},r=t.skins;if(!v(r))return e;let o=t.varPrefix?t.varPrefix+"-":"",s=t.color||{},i=t.cssVars||{},a=c=>S(c)&&Object.prototype.hasOwnProperty.call(s,c)?`var(--${o}color-${c})`:c;for(let c in r){let l=r[c];if(!v(l))continue;let f={};for(let u in l){if(PR.has(u))continue;let d=l[u];if(v(d))for(let h in d){let p=`--${o}theme-${u}-${h}`;t.useVariable!==!1&&!(p in i)&&VS(`${c}/${u}/${h}`,`[scratch] skin "${c}" rewrites theme "${u}" param "${h}", which the theme does not declare \u2014 no element reads ${p}, so the skin changes nothing there. Declare "${h}" on the "${u}" theme (its no-skin value).`),f[p]=a(d[h])}}e[c]=f,S(l.fallback)&&(n[c]=l.fallback)}for(let c in n){let l=n[c];e[l]||(VS(`${c}/fallback/${l}`,`[scratch] skin "${c}" falls back to "${l}", which is not a declared skin \u2014 the reduced-transparency fallback is skipped.`),delete n[c])}return e},zS=(t,e)=>{let n=`[data-skin="${t}"]`;return!e||e===":root"?`:root${n}, ${n}`:`${e}${n}, ${n} ${e}, ${e} ${n}`},Yr=(t,e,n)=>{let r={};if(!v(t))return r;for(let s in t)r[zS(s,n)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[zS(s,n)]=i)}return Object.keys(o).length&&(r["@media (prefers-reduced-transparency: reduce)"]=o),r};D();var DR=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),HS=/^-?[A-Z][0-9]?$/,on=t=>pe(t),qf=t=>{if(S(t))return fe.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(_t(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=et(e);return Fe(n)?n:e}).join(" ")},Kf=(t,e)=>Ua(t,e),ec=(t,e)=>{if(S(t))return fe.test(t)?t:yn(t).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(_t(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=et(r);if(Fe(o)){let i=$t(r,e);return v(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(r)||r==="0"||r.includes("px")||r.slice(-2)==="em")return r;let s=At(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", ")},nc=(t,e)=>{let n=t.indexOf("(");if(n===-1)return t;let r=t.slice(0,n+1),o=t.slice(n+1,t.lastIndexOf(")")),s=")",a=yn(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||DR.has(f)||f==="transparent"||fe.test(f))return f;let u=et(f);return Fe(u)?u:f}).join(" ")));return r+a.join(", ")+s},Gf=(t,e)=>{if(!S(t))return;let n=T();return yn(t).map(r=>{let o=r.trim();if(_t(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=$t(o,e);if(S(s))return s;if(v(s)){for(let i in s)if(S(s[i]))return s[i]}return o}return o.includes("gradient")?nc(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Vt(o)?`url(${o})`:o}).join(", ")},Yf=t=>S(t)&&dt(t).map(e=>At(e,"gap").gap).join(" "),Xf=t=>{if(!S(t))return t;let e=T();return dt(t).map(n=>HS.test(n)?zr(n,e.spacing):n).join(" ")},Qm=t=>{if(!S(t))return;let e=t.split(" ");return e.length?e.map(n=>_t(n)?`var(${n})`:n.length<3||n.includes("ms")?he(n).timing||n:Te(n)?Te(n):n).join(" "):t},rc=(t,e,n)=>{if(S(t))return t.split(",").map(r=>he(r).timing||r).join(",")},Zf=t=>{if(!S(t))return;let e=t.split(",");if(e.length)return e.map(Qm).join(",")};function kt(t,e,n={},r={}){let o=ut.call(this,e||n[t]);if(o==null)return;let s;if(S(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=_n(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=ja(t);!i&&a&&!r.ratio&&(o=Va(o))}return r.ratio?Ee(n,t,o,s):At(o,t,void 0,s)}var L=(t,e=null,n)=>kt(t,e,n,{ratio:!0}),IR=(t,e,n)=>S(t)?dt(t).map(r=>HS.test(r)?Ee(e,n,r)[n]:r).join(" "):t,wn=(t,e,n,r="borderRadius")=>{if(S(t))return{[r]:dt(t).map(o=>{let s=Ya(o);return s!==void 0?IR(s,e,n):Ee(e,n,o)[n]}).join(" ")}};D();var is="__smblsThemeRootOwner",as=t=>{let e=t&&t.__prefersListener,n=t&&t.__prefersMq;if(e&&n)try{typeof n.removeEventListener=="function"?n.removeEventListener("change",e):typeof n.removeListener=="function"&&n.removeListener(e)}catch{try{n.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},WS=(t,e,n)=>{if(!(!t||!e)){as(t),t.__prefersListener=n,t.__prefersMq=e;try{e.addEventListener("change",n)}catch{e.addListener(n)}}},LR=(t,e)=>{let n=T(),{cssVars:r}=n,o=e.startsWith("--")?e:`--${e}`;return r[o]=t,t},Kt=t=>t,Jf={color:Xn,gradient:es,font:Wa,fontFamily:rs,fontfamily:rs,theme:Ha,icons:Kr,semanticIcons:Kt,semanticicons:Kt,svg:os,svgData:Kt,typography:Kt,shadow:er,spacing:Kt,media:Kt,grid:Kt,class:Kt,timing:Kt,reset:Kt,unit:Kt,animation:Kt,vars:LR,sizes:Kt,shape:Kt,skins:Kt},$R=(t,e,n,r)=>{Mn(t,n,e);let o={};for(let s of r)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",n,"resolved to a host object; parked it and allocated a plain bucket"),o},ty=(t,e,n)=>{let r=T(),o=Ta(t),s=o.toLowerCase(),i=r[o]||r[s]||r[t],a=dn(i)?$R(r,i,s,[o,s,t]):i,c=Jf[o]||Jf[s];if(c)try{let l=c(e,n);return a&&(a[n]=l),a}catch(l){r.verbose&&console.warn("Error setting",s,"value",e,n,l)}if(!c){let l=a||(r[s]={});return l[n]=e,l}r.verbose&&console.warn("Can not find",s,"method in scratch")},ey=(t,e)=>{let n=T(),r=t.toLowerCase();return dn(e)?(Mn(n,r,e),n.verbose&&console.warn("[scratch] ignoring host object passed as the",r,"design-system family"),n[r]||n[t]):e==null?(n.verbose&&console.warn("[scratch] skipping empty design-system family",r),n[r]||n[t]):(Object.keys(e).sort((s,i)=>{let a=v(e[s])||R(e[s])?1:0,c=v(e[i])||R(e[i])?1:0;return a-c}).forEach(s=>{try{return ty(r,e[s],s)}catch(i){n.verbose&&console.warn("Error setting",r,"value",e[s],s,i)}}),n[r]||n[t])},Qf=(t,e)=>{let n=e||T();n.globalTheme=t;let o=wo(n)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=n.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[is]=n,c)as(n),a.setAttribute("data-theme",t),n.resolvedTheme=t,t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{let d=u.matches?"dark":"light";a.setAttribute("data-theme",d),n.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",WS(n,f,l)}else as(n),a.setAttribute("data-theme","light"),n.resolvedTheme="light",a.style.colorScheme="light"}let i=n.varPrefix?`--${n.varPrefix}-theme-`:"--theme-";for(let a in n.cssVars)a.startsWith(i)&&delete n.cssVars[a];for(let a in n.cssMediaVars)delete n.cssMediaVars[a];if(o&&n.cssVars){let a=n.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 d in n.cssVars)f[u].style.setProperty(d,n.cssVars[d]);return n}}catch{}}return n},MR={},Xr=(t,e=MR)=>{let n=e.config||T(),{version:r,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:p,hoverMedia:g,files:m,assets:y,...x}=t;e.newConfig&&(n=Nf(e.newConfig)),un(x.document)&&(n.__domDocument=x.document,delete x.document),un(n.document)&&(n.__domDocument||(n.__domDocument=n.document),n.document={}),m!==void 0&&(n.files=m),y!==void 0&&(n.assets=y),o!==void 0&&(n.verbose=o),s!==void 0&&(n.useVariable=s),i!==void 0&&(n.useReset=i),c!==void 0&&(n.useFontImport=c),a!==void 0&&(n.useSvgSprite=a),l!==void 0&&(n.useIconSprite=l),d!==void 0&&(n.useDocumentTheme=d),f!==void 0&&(n.globalTheme=f),u!==void 0&&(n.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(n.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(n.useDefaultConfig=h),p!==void 0&&(n.semanticIcons=p),g!==void 0&&(n.hoverMedia=g),n.verbose&&console.log(n);let _=wo(n)||(typeof document<"u"?document:null),w=_&&_.defaultView||(typeof window<"u"?window:null),k=_&&(n.themeRoot||_.documentElement);if(k&&typeof k.setAttribute=="function")if(n.globalTheme&&n.globalTheme!=="auto")as(n),k.setAttribute("data-theme",n.globalTheme),n.resolvedTheme=n.globalTheme,k[is]=n,n.globalTheme==="dark"||n.globalTheme==="light"?k.style.colorScheme=n.globalTheme:k.style.colorScheme="light dark";else if(k[is]&&k[is]!==n&&k.hasAttribute("data-theme"))as(n),n.resolvedTheme=k.getAttribute("data-theme");else if(w&&w.matchMedia){let M=vt=>{let Ct=vt.matches?"dark":"light";k.setAttribute("data-theme",Ct),n.resolvedTheme=Ct},X=w.matchMedia("(prefers-color-scheme: dark)");M(X),k.style.colorScheme="light dark",k[is]=n,WS(n,X,M)}else as(n),k.setAttribute("data-theme","light"),n.resolvedTheme="light",k.style.colorScheme="light",k[is]=n;n.__svgCache||(n.__svgCache={}),ts(x);let A=Object.keys(x).filter(E=>!E.startsWith("__")),P=new Set(A);if(A.forEach(E=>{let M=E.toLowerCase();M!==E&&P.has(M)&&ot(x[M],x[E],de)}),A.map(E=>{let M=E.toLowerCase();if(!(M!==E&&P.has(M)))return ey(E,x[E])}),n.varPrefix&&(n.typography&&(n.typography.varPrefix=n.varPrefix),n.spacing&&(n.spacing.varPrefix=n.varPrefix),n.timing&&(n.timing.varPrefix=n.varPrefix)),x.typography)try{Ka()}catch(E){n.verbose&&console.warn("Error applying typography sequence",E)}if(x.spacing)try{Ba()}catch(E){n.verbose&&console.warn("Error applying spacing sequence",E)}if(x.timing)try{Xa()}catch(E){n.verbose&&console.warn("Error applying timing sequence",E)}try{tc()}catch(E){n.verbose&&console.warn("Error applying skins",E)}Za();let I=Qa();return I&&(n.reset=I),n};var ls=new Map,r0=null,ry=null,FR=null;function sc(t){t.batchAtomicCss&&(ry=t.batchAtomicCss),t.compoundCssClass&&(FR=t.compoundCssClass)}var NR=new Set,KS=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function cy(t){try{let e=T();e&&(e.__domDocument=t)}catch{}t&&NR.add(t)}function Jr(){try{let t=T();if(t){if(KS(t.__domDocument))return t.__domDocument;if(KS(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var ee={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function su(){return{...ee}}function ly(){for(let t in ee)ee[t]=0;ru=!1}var ru=!1,nu=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function jR(t){let e=Date.parse(t);if(!isFinite(e))return"";let n=Math.floor((Date.now()-e)/864e5);return n<1?" (today)":` (${nu(n,"day")} ago)`}function BR(){try{let t=XR();if(!t.length)return-1;let e=0;for(let n=0;n<t.length;n++)e+=t[n].cssRules?t[n].cssRules.length:0;return e}catch{return-1}}function VR(t,e){if(ru)return!1;ru=!0;let n="n/a \u2014 running from src/ (unbuilt), so no dist is in play",r="this IS the source",o="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${nu(ee.variable,"variable rule")} and ${nu(ee.atomic,"atomic rule")}, while the design system held ${nu(e,"CSS variable")}.
42
+ }`,Vr=(t,e,n)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>ve(d,n)||d):ve(s,n)||s;return va(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),lm=t=>Object.keys(t).map(n=>Vr(n,t[n].value)),Df=(t,e,n)=>{if(e&&e.isVariable){let s=ve(e.url,n)||e.url;return Yo(s)?Xo(s):Kn(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return Vr(t,e,n).map(Pf);let o=Array.isArray(e.url)?e.url.map(s=>ve(s,n)||s):ve(e.url,n)||e.url;return Kn(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Ca=(t,e)=>Object.keys(t).map(r=>Df(r,t[r].value,e));D();D();D();D();var Zo={};$(Zo,{animation:()=>Em,breakpoints:()=>vm,class:()=>Pm,color:()=>ym,devices:()=>Cm,document:()=>lS,font:()=>um,fontFace:()=>hm,fontFamily:()=>dm,fontFamilyTypes:()=>pm,gradient:()=>bm,grid:()=>Rm,icons:()=>wm,media:()=>gm,reset:()=>fS,semanticIcons:()=>Sm,sequence:()=>bn,shadow:()=>xm,shape:()=>Im,sizes:()=>Lm,skins:()=>$m,spacing:()=>mm,svg:()=>Am,svgData:()=>Tm,templates:()=>Om,theme:()=>_m,timing:()=>km,typography:()=>Ea,unit:()=>fm,vars:()=>Dm});var bn={"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 fm={default:"em"};var HO={browserDefault:16,base:16,type:"font-size",ratio:bn["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Ea=HO;var um={};var dm={},pm={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},hm={};var gm={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var WO={base:Ea.base,type:"spacing",ratio:bn.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},mm=WO;var ym={},bm={};var _m={};var xm={};var wm={},Sm={};var qO={default:150,base:150,type:"timing",ratio:bn["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},km=qO;var lS={};var vm={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Cm={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 Em={};var Am={},Tm={};var Om={};var KO={},Rm=KO;var Pm={};var fS={},Dm={},Lm={},Im={},$m={};var Mf={},Ff={},de=new Set,Lf=Zo,If={},Ta=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in Lf){let e=t.toLowerCase();If[e]=Lf[t];let n=Ta(e);n!==e&&(If[n]=Lf[t]),e!==t&&(If[t]=Lf[t])}var Ur={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Mf,cssMediaVars:Ff,CSS_VARS:Mf,CSS_MEDIA_VARS:Ff,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...If},Jo=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return Rt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=Rt(e)?e:t.globalTheme,r=oi(Rt(n)?n:"auto");return Object.defineProperty(t,"globalTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r},uS=t=>t?Jo(t):null,Qo=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return Rt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=Rt(e)?e:t.resolvedTheme,r=oi(Rt(n)?n:null);return Object.defineProperty(t,"resolvedTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r},dS=t=>t?Qo(t):null;Jo(Ur);Qo(Ur);var $f=it(Ur),ue={active:"0",0:Ur},pS=t=>(Rt(t)&&(ue.active=t),ue[t||ue.active]),Aa=[],st=t=>{t&&t._scratchConfig&&Aa.push(t)},rt=()=>{Aa.pop()},T=t=>Aa.length?Aa[Aa.length-1]:ue[t||ue.active]||Ur,Nf=t=>{if(v(t))return ue.active="1",ue[1]=ot(t,it($f),de),ts(ue[1]),Jo(ue[1]),Qo(ue[1]),t},GO=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],YO=["useVariable","globalTheme","verbose"],XO=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],ts=t=>{for(let e of XO){let n;for(let r of e){let o=t[r];v(o)&&(n=n?ot(n,o,de):o)}if(n)for(let r of e)v(t[r])&&(t[r]=n)}},Oa=(t,e,{cleanBase:n=!1}={})=>{let r=n?null:T(),o=it(!n&&r&&r._scratchConfig?r:$f);for(let i of GO)delete o[i];for(let i of YO)Object.prototype.hasOwnProperty.call($f,i)?o[i]=$f[i]:delete o[i];let s=ot(e||{},o,de);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s.cssSkinVars={},s.cssSkinFallback={},s._scratchConfig=!0,ts(s),Jo(s),Qo(s),t&&(ue[t]=s),s};var nn={"-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"},Fm=(t,e)=>{let{key:n,variable:r,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[n]={key:n,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:r},e.scales[n]=s;let c=hS.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},_n=t=>{if(!t.includes("("))return t;let e=t.trim(),n=e.indexOf("("),r=e.slice(0,n),o=0,s=-1;for(let i=n;i<e.length;i++){let a=e[i];if(a==="(")o++;else if(a===")"&&(o--,o===0)){s=i;break}}return s===-1||/\s/.test(r)||e.slice(s+1).trim()!==""?[void 0,t]:[r,e.slice(n+1,s)]},Mm="\0",ZO=(t,e)=>{let n="",r=0,o="";for(let s of t){if(r===0&&s!=="("){n+=s;continue}o+=s,s==="("?r++:s===")"&&(r--,r===0&&(n+=Mm+e.length+Mm,e.push(o),o=""))}return n+o},JO=(t,e)=>t.indexOf(Mm)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),QO=/^(calc|min|max|clamp)\((.*)\)$/,tR=(t,e)=>{let n=QO.exec(t);return n?`${n[1]}(${Ia(n[2],e)})`:t.indexOf("(")!==-1?t:zr(t,e)},hS=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ra=(t,e)=>{let{base:n,type:r,unit:o}=e,s=hS.has(o)?"rem":o,i=(xr(s)?1:n)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=nn[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=nn[t+1],u=Math.abs(t),d=Math.pow(gS,2*u),h=nn[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},jf=(t,e,n,r)=>{let{type:o}=r,i=t===2&&e.length===2?t+1:t,l=`${"--"+(r.varPrefix?r.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${n}) * var(${l+i}))`},Pa=(t,e)=>{let r=(t*e-t)/1.618,o=t*e-r,s=t+r,i=(o+s)/2;return[o,i,s]},Da=(t,e)=>Pa(t,e).map(n=>n/t),La=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,h]=Pa(o,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((p,g)=>{let m=~~(p/r*1e3)/1e3,y=i+(g+1),x=a+(g+1)/10,b=jf(g+1,f,i,e),_={key:n+(g+1),variable:y,value:p,scaling:m,scalingVariable:b,index:x};Fm(_,e)})},gS=1.618,eR=(t,e,n)=>{if(t>=0)return e*Math.pow(n,t);let r=Math.abs(t),o=e*Math.pow(n,t),s=e*Math.pow(n,r)/Math.pow(gS,2*r);return Math.max(o,s)},te=t=>{let{type:e,base:n,ratio:r,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=nn[f],d=eR(f,n,r),h=~~(d/n*100)/100,p=c+u,g=Ra(f,t),m={key:u,variable:p,value:d,base:n,scaling:h,scalingVariable:g,ratio:r,index:f};Fm(m,t),s&&La(m,t)}return t},Nm=(t,e=0)=>{let{type:n,base:r,ratio:o,subSequence:s}=t,i=k(e)?e:nn[e],a=k(e)?Object.entries(nn).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=r*Math.pow(o,a),f=~~(l/r*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(n&&n.replace(".","-"))+"-"+i,p=Ra(a,t),g={key:i,variable:h,value:l,base:r,scaling:f,scalingVariable:p,ratio:o,index:a};return Fm(g,c),s&&La(g,c),c},zr=(t="A",e)=>{let n=T(),{unit:r}=n;if(k(t)&&_t(t))return`var(${t})`;if(k(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(k(t)){let b=n.sizes;if(b){let _=b[t]||b[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:o,unit:s=r.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(si(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${ba(e.type.replace(".","-"))}-`,h=t.toUpperCase(),p=h.slice(0,1)==="-"?"-":"",g=p?h.slice(1):h,m="";g.includes("_")&&(m="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let y=b=>a.test(b)?`var(${d}${b}${m})`:b;if(g.includes("+")){let[b,_]=g.split("+"),w=`${y(b)} + ${y(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("*")){let[b,_]=g.split("*"),w=`${y(b)} * ${y(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("-")){let[b,_]=g.split("-"),w=`${y(b)} - ${y(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}if(!o[g]&&g.length===2&&(n.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||n.useVariable){let b=`var(${d}${g}${m})`;return p?`calc(${b} * -1)`:b}let x=o?o[g]:null;if(!x){if(console.warn("can't find",o,g),ht())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?p+x.val+s:p+x.scaling+s},Ia=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return ZO(t,o).split(r).map(i=>{let a=JO(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:tR(c,e)}).join("")},rn=(t,e,n,r)=>{if(typeof t!="string")return T().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!r&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=_n(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Ia(t,n):t=zr(t,n),{[e]:r?`${r}(${t})`:t}},Bf=(t,e)=>nn[t-e],$a=t=>{let{h1Matches:e,sequence:n}=t;return new Array(6).fill(null).map((r,o)=>{let s=Bf(e,o);return n[s]})};D();var jm=(t,e)=>{let n=T(),{cssVars:r}=n;j(t.value)||(r[t.var]=t.value)},Ma=(t,e,n)=>{let r=T(),{unit:o}=r,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[d,h,p]=Da(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${h/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${p/a})`},mS=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),xn=(t,e={})=>{let n=T(),{unit:r,timing:o,cssVars:s}=n,i=t.unit||r.default,a=mS.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Ma(s,t,e);for(let u in l){let d=l[u],h=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=h,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=h:(s[d.variable+"_default"]=h,s[d.variable]=`var(${d.variable+"_default"})`)}},Gn=(t,e,n={})=>{let r=T(),{unit:o,media:s,cssVars:i}=r,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=mS.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,p=s[a];if(!p&&r.verbose&&console.warn("Can't find media query ",p),!u){let g=i[`@media ${p}`];g||(g=i[`@media ${p}`]={}),Ma(g,c,n);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let x=d[y],b=h[y]+f;g[x.variable+"_default"]=b,g[x.variable]=b}return}for(let g in d){let m=d[g],y=(xr(f)?h[g]:d[g].val)+f;!p&&r.verbose&&console.warn("Can't find query ",p);let x=i[`@media ${p}`];x||(x=i[`@media ${p}`]={}),x[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};D();var bS=Or(),Fa=t=>{let e=T(),n="";for(let r in t)e.__svgCache[r]||(e.__svgCache[r]=!0,n+=t[r]);return n},nR=t=>{let e=t&&(t.default||t);if(!k(e))return bS&&console.warn("parseRootAttributes:",e,"is not a string"),{};let n=e.match(/<svg\s+(.*?)>/);if(!n||!n[1])return{};let o=n[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},{}):{}},rR=(t,e)=>{let n=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(n.push(s),o)),!n.length)return t;let r=t;for(let o of n){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;r=r.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 r},yS=new Set,Na=(t,e)=>{let n=e&&e.default?e.default:e;if(!k(n))return bS&&!yS.has(t)&&(yS.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=n;let r=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(r){let u=r[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=nR(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=rR(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=iR(f),f},oR="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",sR=new RegExp(`<(${oR})\\b([^>]*?)\\s*/>`,"g"),iR=t=>t.replace(sR,"<$1$2></$1>");var ss={};$(ss,{STANDARD_SCHEME_QUERIES:()=>Uf,__resetSkinWarnings:()=>Jm,appendSVGSprite:()=>Ja,appendSvgIconsSprite:()=>Gr,applyDocument:()=>Za,applyHeadings:()=>Wf,applyReset:()=>Qa,applySkins:()=>tc,applySpacingSequence:()=>Ba,applyTimingSequence:()=>Xa,applyTypographySequence:()=>Ka,buildSkinVarStyles:()=>Yr,checkIfBoxSize:()=>ja,getColor:()=>et,getFontFamily:()=>qa,getFontSizeByKey:()=>Ga,getMediaColor:()=>$t,getMediaTheme:()=>Ae,getSafeInk:()=>zf,getSafeInkInfo:()=>Um,getShadow:()=>Ua,getShapeByKey:()=>Ya,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>At,getTheme:()=>qm,getTimingByKey:()=>he,getTimingFunction:()=>Te,isPlainColor:()=>Zn,quietColorProbe:()=>Hr,resolveBorderValue:()=>pe,resolveColorRgb:()=>Wr,resolveShadowValue:()=>qr,runThroughMedia:()=>Hf,schemeGuardSelector:()=>Qn,schemeMediaQuery:()=>Jn,setAdaptiveSchemeVar:()=>tr,setColor:()=>Xn,setFont:()=>Wa,setFontFamily:()=>rs,setGradient:()=>es,setMediaTheme:()=>ns,setSVG:()=>os,setShadow:()=>er,setSvgIcon:()=>Kr,setTheme:()=>Ha,splitSpacedValue:()=>Va});D();var Uf={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Jn=(t,e)=>{let n=e.media&&e.media[t]||Uf[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},Qn=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},Ce=new Set,SS=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","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","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","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","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),aR=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,cR=/gradient\(|url\(|image-set\(|var\(/i,lR=new Set(["transparent","currentColor","currentcolor"]),Zn=t=>{if(!k(t))return!1;let e=t.trim();return cR.test(e)?!1:aR.test(e)?!0:SS.has(e)||lR.has(e)},Vf=new Set,_S=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(v(e)&&Object.keys(e).length||v(n)&&Object.keys(n).length)},xS=new Set,Bm=0,Hr=t=>{Bm++;try{return t()}finally{Bm--}},fR=(t,e)=>{if(!k(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=Vt(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},Vm=(t,e,n)=>{let r=fR(t,n);if(r){if(!xS.has(t)){xS.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${r}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let o=Vt(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&_S(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!Bm&&!Vf.has(t)){Vf.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=k(e)?e.toLowerCase():"";if(!SS.has(s)||!_S(n))return t;if(!Vf.has(s)){Vf.add(s);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${i}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},kS=(t,e,n)=>{let r=e!==void 0?e:1;if(!n)return`rgb(from ${t} r g b / ${r})`;if(n.charCodeAt(0)===43||n.charCodeAt(0)===45){let s=parseFloat(n),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${r})`}return`hsl(from ${t} h s ${n}% / ${r})`},et=(t,e,n)=>{let r=n||T();if(!k(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(_t(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(R(t))[o,s,i]=t;else{let u=Vt(t);if(!u){let{color:d,gradient:h}=r,p=h[t]||d[t];return p?(e&&p[e]&&(p=p[e]),r.useVariable?`var(${p.var})`:p.value):Vm(t,t,r)}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}=r,l=a[o]||c[o];if(!l)return Vm(t,o,r);if(e)if(l[e]!==void 0)l=l[e];else if(R(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&r.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else r.verbose&&console.warn(t," - does not have ",e);if(k(l)){if(Ce.has(o))return l;Ce.add(o);try{return et(l,null,n)}finally{Ce.delete(o)}}let f=l.rgb;if(!f){let u=r.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?kS(u,s,i):u}return i&&!l[i]&&(f=en(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, ${l.alpha!==void 0?l.alpha:1})`:r.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},wS=t=>{let e=ke(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},uR=(t,e)=>{if(!e)return t;let n=t.rgb;if(e.tone){let o=en(n,e.tone);n=k(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let r=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:n,alpha:r}},Wr=(t,e,n)=>{let r=e||T();if(!k(t))return null;let o=Vt(t);if(o){if(o.passthrough){let d=ke(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=r,c=i[s]||a[s];if(!c)return wS(t);if(k(c)){let d;if(Ce.has(s))d=wS(c);else{Ce.add(s);try{d=Wr(c,r,n)}finally{Ce.delete(s)}}return d?uR(d,o):null}if(c.rgb===void 0&&v(c)){let d=`@${n||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;o&&o.tone&&(l=en(l,o.tone));let f=k(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},vS=t=>v(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),CS=t=>{if(!v(t)||t.value!==void 0)return null;let e=[];for(let n in t)if(n!=="var"){if(n.charCodeAt(0)!==64||!vS(t[n]))return null;e.push(n.slice(1))}return e.length?e:null},dR=t=>k(t&&t.var)&&CS(t)!==null,pR=(t,e,n,r,o)=>{let s=CS(e);if(!s)return;if(k(e.var)){let c=`var(${e.var})`;return n||r?kS(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=et(t,"@light",o),a=et(t,"@dark",o);if(!(!Zn(i)||!Zn(a)))return i===a?i:`light-dark(${i}, ${a})`},$t=(t,e,n)=>{let r=n||T();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!k(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(_t(t))return`var(${t})`;let o,s,i;if(R(t))o=t[0];else{let u=Vt(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}=r,l=a[o]||c[o],f=v(l);if(f&&l.value)return et(t,`@${e}`,n);if(f){if(r.useVariable&&l.var)return s||i?et(t,null,n):`var(${l.var})`;if(e){if(!r.useVariable&&a[o]===l){let u=pR(t,l,s,i,n);if(u!==void 0)return u}return et(t,`@${e}`,n)}else{let u={},d=Qn(r);for(let h in l){if(h.charCodeAt(0)!==64)continue;let p=h.slice(1),g=et(t,h,n);if(g!==void 0&&(u[`[data-theme="${p}"] &`]=g,p==="light"||p==="dark")){let m=Jn(p,r);if(!m)continue;u[m]={[d]:g}}}return u}}else return Vm(t,o,r)},tr=(t,e,n,r)=>{let s=`--${r.varPrefix?r.varPrefix+"-":""}${e}-${n}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){r.cssVars[s]=i,r.cssMediaVars||(r.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(r.cssMediaVars[l]||(r.cssMediaVars[l]={}),r.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;r.cssMediaVars[f]||(r.cssMediaVars[f]={}),r.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Xn=(t,e,n)=>{let r=T();if(vS(t))return r.useVariable&&t.var&&(r.cssVars[t.var]=t.value),t;if(!r.useVariable&&dR(t))return t;if(k(t)&&_t(t)){let g=t.slice(2);if(t=et(g),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=g.split(" "),y=r.color[m[0]];if(y&&!y.value&&!y.rgb&&(k(y)||R(y)||v(y))&&!Ce.has(m[0])){Ce.add(m[0]);try{r.color[m[0]]=Xn(y,m[0])}finally{Ce.delete(m[0])}y=r.color[m[0]]}if(y&&y.value){let x=y.rgb,b=m[1]!==void 0?m[1]:"1",_=m[2];_&&(x=en(x,_)),t=`rgba(${x}, ${b})`}else{let x=m[2],b=m[1]!==void 0?m[1]:"1";if(x)try{let _=ke(m[0]);_&&_.length>=3?t=`rgba(${en(_.slice(0,3).join(", "),x)}, ${b})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(R(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),v(t)){let g={};for(let m in t)m!=="var"&&(g[m]=Xn(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return r.useVariable&&tr(g,"color",e,r),g}let s=`--${r.varPrefix?r.varPrefix+"-":""}color-${e}`+(n?`-${n}`:""),i=t.value||t;if(k(i)&&!i.includes("(")&&!i.startsWith("#")){let g=Vt(i);if(g&&g.name&&!g.passthrough&&!g.cssVar){let m=r.color[g.name];if(m&&!m.value&&!m.rgb&&(k(m)||R(m)||v(m))&&!Ce.has(g.name)){Ce.add(g.name);try{r.color[g.name]=Xn(m,g.name)}finally{Ce.delete(g.name)}}let y=r.color[g.name];if(y&&y.rgb){let x=y.rgb;g.tone&&(x=en(x,g.tone));let b=g.alpha!==void 0?parseFloat(g.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${x}, ${b})`}}}let a=ke(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,p=`rgba(${h}, ${d})`;return r.useVariable&&(r.cssVars[s]=p),{var:s,rgb:h,alpha:d,value:p}},es=(t,e,n)=>{let r=T();if(v(t)&&t.value!==void 0&&t.var!==void 0)return r.useVariable&&(r.cssVars[t.var]=t.value),t;if(k(t)&&_t(t)&&(t=et(t.slice(2))),R(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),v(t)){let i={};for(let a in t)a!=="var"&&(i[a]=es(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return r.useVariable&&tr(i,"gradient",e,r),i}let s=`--${r.varPrefix?r.varPrefix+"-":""}gradient-${e}`+(n?`-${n}`:"");return r.useVariable&&(r.cssVars[s]=t.value||t),{var:s,value:t.value||t}};D();var zf=(t,e,n={},r)=>{let o=r||T(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=n,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=k(e)?e:String(e),h=Vt(t),p=h&&!h.passthrough&&!h.cssVar?h.name:null,g=(Z,Y)=>c?{value:Z,...Y}:Z;if(p){let Z=o.color[`${p}Safe`];if(Z){let Y=`${d}@${u}`,U=Z[Y]!==void 0?Z[Y]:Z[d];if(U!==void 0){let Ot=U&&U.rgb!==void 0?o.useVariable&&U.var?`var(${U.var})`:U.value:et(U,null,o);return g(Ot,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=et(t,u?`@${u}`:null,o),y=Wr(t,o,u),x=Wr(e,o,u);if(!y||!x)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),g(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let b=jr(x.rgb,x.alpha),_=jr(y.rgb,y.alpha,b),w=Go(_,b);if(w>=f-.02)return g(m,{ratio:w,deviation:0,derived:!1,overridden:!1});let[S,A,P]=wa(y.rgb),[,L,E]=Sa([S,A,P]),M=Fr(b)>.5,X=M?S:1-S,vt=Z=>{let Y=M?S-Z:S+Z,U=Math.max(0,Math.min(1,Y));return{rgb:ka(U,L,E),L:U}},Ct=Z=>{let{rgb:Y}=vt(Z),U=jr(Y.map(Ot=>Math.round(Ot)),y.alpha,b);return Go(U,b)},at=0,N=X,H=Ct(N)>=f;if(H)for(let Z=0;Z<l;Z++){let Y=(at+N)/2;Ct(Y)>=f?N=Y:at=Y}else at=N;let{rgb:mt,L:B}=vt(N),gt=mt.map(Z=>Math.round(Z)),F=Ct(N),q=y.alpha<1?`rgba(${gt.join(", ")}, ${y.alpha})`:`rgb(${gt.join(", ")})`,yt=Math.abs(B-S)*100;return g(q,{rgb:gt,ratio:F,startRatio:w,deviation:yt,derived:!0,overridden:!1,reachable:H})},Um=(t,e,n={},r)=>zf(t,e,{...n,meta:!0},r);D();D();var hR=t=>{let n=T().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return te(o),o},gR=t=>{for(let e in t){let n=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;bt(n,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),te(n),Gn(t,e)}},ja=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r},Ba=()=>{let t=T(),{spacing:e}=t;te(e),xn(e),gR(e)},mR=t=>{let e=T(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:te(t)},At=(t,e="padding",n,r)=>{let o=mR(n);if(k(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=_n(t);r=i[0],t=i[1]}}let s=r?[t]:k(t)&&t.includes("(")?dt(t):Mr(t);if(R(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)=>rn(s[f],e+l+i,o,r);return a[s.length].map((l,f)=>c(l,f))}return rn(t,e,o,r)}},Ee=(t,e,n,r)=>{let o=T(),{spacing:s}=o,i=n||t[e];if(!r&&k(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&k(i)&&i.includes("(")){let a=_n(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=hR(t);return At(i,e,a,r)}return At(i,e,s,r)},Va=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=So.some(i=>t.includes(i));return r||o?n:n.length<3&&/[A-Z]/.test(n)?n+"_default":n};return t.split(",").map(n=>n.trim()).map(e).join(",").split(" ").map(e).join(" ")};D();var qr=(t,e,n)=>!k(t)||fe.test(t)?t:yn(t).map(r=>(r=r.trim(),r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(o.startsWith("--"))return`var(${o})`;let s=Hr(()=>et(o,e));if(Ne(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||Nr.has(o.toLowerCase()))return o;n&&n(o);let i=At(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),er=(t,e,n,r)=>{let o=T();if(v(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(R(t)){let a={"@light":er(t[0],e,"light"),"@dark":er(t[1],e,"dark")};return o.useVariable&&tr(a,"shadow",e,o),a}if(v(t)){let a={};for(let c in t)a[c]=er(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&tr(a,"shadow",e,o),a}k(t)&&!fe.test(t)&&(t=qr(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(n?`-${n}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},Ua=(t,e)=>{let n=T();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!k(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(_t(t))return`var(${t})`;let[r]=R(t)?t:t.split(" "),s=n.shadow[r],i=v(s);if(!s)return n.verbose&&console.warn("Can't find color ",r),t;if(i&&!s.value&&n.useVariable&&s.var)return`var(${s.var})`;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;n.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={},c=Qn(n);for(let l in s){if(l.charCodeAt(0)!==64)continue;let f=l.slice(1),u=s[l],d=u&&(u.value!==void 0?u.value:u);if(d!==void 0&&(a[`[data-theme="${f}"] &`]=d,f==="light"||f==="dark")){let h=Jn(f,n);if(!h)continue;a[h]={[c]:d}}}return a}return n.verbose&&console.warn("Can't find color",t),t};var yR=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),bR=t=>yR.has(t),pe=(t,e,n)=>{if(t==null)return;let r=t+"";if(fe.test(r))return r;let o=r.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?r:r.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(_t(s))return`var(${s})`;if(bR(s)||/^\d/.test(s)||s==="0")return s;let i=Hr(()=>et(s,e));if(Ne(i))return i;if(Nr.has(s.toLowerCase()))return s;n&&n(s);let a=At(s,"border");return a&&a.border?a.border:s}).join(" ")};D();var _R=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"]),ES=["color","Color","background","Background","fill","Fill","stroke","Stroke"],RS=t=>{for(let e=0;e<ES.length;e++)if(t.includes(ES[e]))return!0;return!1},xR={boxShadow:qr,textShadow:qr,border:pe,borderTop:pe,borderRight:pe,borderBottom:pe,borderLeft:pe,outline:pe,columnRule:pe},wR=t=>{if(!t)return!1;let e=Vt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},AS=new Set,SR=(t,e,n,r,o,s)=>{if(!ht())return;let i=`${t}::${e}::${n||""}::${r}`;AS.has(i)||(AS.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(n?` (${n})`:"")+` did not fully resolve: "${r}" -> "${o}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},Wm=(t,e,n,r)=>{let o=xR[e];if(!o)return et(n,r);let s=null,i=o(n,r,a=>{!s&&wR(a)&&(s=a)});return s&&SR(t,e,r,n,i,s),i},qm=(t,e)=>Ae(t,e),kR=t=>v(t)&&j(t.value),vR=t=>{for(let e in t){let n=t[e];if(k(n)&&n.startsWith("var(--"))return!0}return!1},Ha=(t,e)=>{let n=T();return kR(t)?!n.useVariable&&vR(t)?t:ns(t.value,e):ns(t,e)},PS=(t,e)=>{let n=new Set;for(let r of e){let o=r.slice(0,1);if(!(o==="@"||o==="."||o===":")&&RS(r))for(let s in t){if(n.has(s))continue;let i=t[s]?.[r];if(i===void 0)continue;let a=et(i,`@${s}`);a!==void 0&&k(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!_R.has(a)&&n.add(s)}}return n},CR=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),za=(t,e)=>{for(let n in e){let r=e[n];v(r)?za(t[n]||(t[n]={}),r):t[n]=r}return t},TS=(t,e,n,r)=>{if(za(t,{[`[data-theme="${e}"] &`]:n}),e!=="light"&&e!=="dark")return;let o=Jn(e,r);o&&za(t,{[o]:{[Qn(r)]:n}})},DS=(t,e,n,r)=>{let o=n.globalTheme!==void 0?n.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(r?Object.keys(r):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=PS(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let y={};for(let _ in t)j(t[_]?.[l])&&(y[_]=t[_][l]);let x=r&&j(r[l])?r[l]:void 0;if(!Object.keys(y).length&&!x)continue;let b=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=DS(y,`${e}-${b}`,n,x);continue}let u=r&&!j(r[l])?r[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let h={},p;for(let y of d){if(a.has(y))continue;let x=t[y]?.[l];if((x===void 0||j(x))&&(x=u),x===void 0)continue;let b=Wm(e,l,x,`@${y}`);b!==void 0&&(h[y]=b,(s&&y===s||!s&&(y==="light"||p===void 0))&&(p=b))}let g={},m=Object.keys(h).filter(y=>h[y]!==p);if(m.length){let y=h.light!==void 0?h.light:p,x=h.dark!==void 0?h.dark:p;if(RS(l)&&Zn(y)&&Zn(x)){g[l]=y===x?y:`light-dark(${y}, ${x})`;for(let b in h)b==="light"||b==="dark"||TS(g,b,{[l]:h[b]},n)}else{p!==void 0&&(g[l]=p);for(let b of m)TS(g,b,{[l]:h[b]},n)}}else{if(p===void 0)continue;g[l]=p}za(c,g),c[`.${l}`]=g}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},zm=(t,e,n,r)=>{let{cssVars:o}=n;n.cssMediaVars||(n.cssMediaVars={});let s=n.cssMediaVars,i=n.globalTheme!==void 0?n.globalTheme:"auto",a=i&&i!=="auto"?String(i).replace(/^'|'$/g,""):null,c={},l=new Set(r?Object.keys(r):[]);for(let u in t)if(t[u])for(let d of Object.keys(t[u]))l.add(d);let f=PS(t,l);for(let u of l){let d=u.slice(0,1),h=j(r?.[u])||Object.values(t).some(p=>j(p?.[u]));if(d==="."&&h){let p=u.slice(1),g={};for(let y in t)j(t[y]?.[u])&&(g[y]=t[y][u]);let m=j(r?.[u])?r[u]:void 0;c[u]=zm(g,`${e}-${p}`,n,m)}else if(d===":"&&h){let p=u.replace(/^:+/,""),g={};for(let y in t)j(t[y]?.[u])&&(g[y]=t[y][u]);let m=j(r?.[u])?r[u]:void 0;c[u]=zm(g,`${e}-${p}`,n,m)}else if(d!=="@"&&d!=="."&&d!==":"){let g=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}-${u}`,m=r&&!j(r[u])?r[u]:void 0,y=new Set(Object.keys(t));m!==void 0&&(y.add("light"),y.add("dark"),a&&y.add(a));let x,b=!1;for(let _ of y){if(f.has(_))continue;let w=t[_]?.[u];if((w===void 0||j(w))&&(w=m),w===void 0)continue;let S=Wm(e,u,w,`@${_}`);if(S===void 0)continue;b=!0,(a&&_===a||!a&&(_==="light"||x===void 0))&&(x=S);let A=`[data-theme="${_}"]`;if(s[A]||(s[A]={}),s[A][g]=S,_==="dark"||_==="light"){let P=`@media (prefers-color-scheme: ${_})`;s[P]||(s[P]={}),s[P][g]=S}}if(x!==void 0&&(o[g]=x),!b)continue;c[u]=`var(${g})`,c[`.${u}`]={[u]:c[u]}}}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},ns=(t,e,n,r)=>{let o=T(),{cssVars:s}=o,i={value:t},a=!n&&!r,c,l;if(j(t)){if(a&&o.useVariable){let f={},u={};for(let d in t)d.startsWith("@")?j(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];(Object.keys(f).length||Object.keys(u).length)&&(l=zm(f,e,o,u),Object.assign(i,l))}else if(a){let f={},u={};for(let d in t)d.startsWith("@")?j(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];c=DS(f,e,o,u),Object.assign(i,c)}for(let f in t){let u=f.slice(0,1),d=t[f];if(u==="@"||u===":"||u==="."){let h=u==="@"&&f;i[f]=ns(d,e,f,r||h)}else if(!a){let h=Wm(e,f,d,r),p=[...new Set([r,n].filter(x=>x).map(x=>x.slice(1)))],g=p.length?"-"+p.join("-"):"",y=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${g}-${f}`;o.useVariable?(o.useThemeSuffixedVars&&(s[y]=h),i[f]=`var(${y})`):i[f]=h,i[`.${f}`]={[f]:i[f]}}}if(c)for(let f in c){let u=f.slice(0,1);(u==="."||u===":")&&j(t[f])&&(i[f]=c[f])}if(l)for(let f in l){let u=f.slice(0,1);(u==="."||u===":")&&j(t[f])&&(i[f]=l[f])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(k(t)&&_t(t)){let u=o.theme[t.slice(2)];return Ae(u,r)}return i},Hm=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(j(t[r]))if(e&&CR(r))n[r]=za({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=Hm(t[r],e):o==="."&&(n[`&${r}`]=Hm(t[r],e))}else n[r]=t[r]}return n},LS=(t,e)=>{let n=e.shift();return t[n]?LS(t[n],e):t},OS=(t,e)=>R(e)?LS(t,e):k(e)&&t[e]?t[e]:t;var Ae=(t,e)=>{let n=T();if(k(t)&&_t(t)&&(t=Ae(t.slice(2))),!t||!k(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=R(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=OS(s,o):s&&e&&(s=OS(s,e)),Hm(s,!n.useVariable)};D();D();var Wa=(t,e)=>{let n=T(),r=`--font-${e}`;if(!t||R(t)&&!t[0])return;let o;if(t.isVariable){let s=ve(t.url,n.files)||t.url;Yo(s)?o=Xo(s):o=Kn(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=Vr(e,t,n.files);else{let s=Array.isArray(t.url)?t.url.map(i=>ve(i,n.files)||i):ve(t.url,n.files)||t.url;o=Kn(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:r,value:t,fontFace:o}},qa=(t,e)=>{let n=T(),{fontFamily:r}=n;return Br(e||r,t)},rs=(t,e)=>{let n=T(),{fontFamily:r,fontFamilyTypes:o}=n,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!r.default)&&(r.default=e),v(s)&&(s=Mr(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};D();var Hf=t=>{let e=T(),{typography:n,media:r}=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:d,subSequence:h,h1Matches:p,unit:g}=t;bt(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:p,unit:g});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||g,x=!i.unit&&m.has(g)?"rem":y,b=r[c],_="@media "+(b==="print"?`${b}`:`screen and ${b}`);if(n.templates[_]={fontSize:i.base/n.browserDefault+x},!a){bt(i,{sequence:{},scales:{},vars:{}}),te(i),Gn(t,o);continue}bt(i,{sequence:{},scales:{},templates:{},vars:{}}),te(i),Gn(t,o)}},Wf=t=>{let e=T();if(t.h1Matches){let n=t.unit,r=$a(t),{templates:o}=t;for(let s in r){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${r[s]?.variable})`:`${r[s]?.scaling}${n}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},Ka=()=>{let t=T(),{typography:e}=t;te(e),Wf(e),xn(e),Hf(e)},Ga=t=>{let e=T(),{typography:n}=e;return rn(t,"fontSize",n)};D();var Ya=t=>{if(!k(t))return;let n=T().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};D();var Xa=()=>{let t=T(),{timing:e}=t;te(e),xn(e)},Te=t=>{let e=T(),{timing:n}=e;return n[t]||n[ya(t)]||t},he=(t,e="timing")=>{let n=T(),{timing:r}=n;return rn(t,e,r)};D();var Za=()=>{let t=T(),{fontFamily:e,theme:n,typography:r}=t,o=t.document;return dn(o)?(Mn(t,"document",o),o=t.document={}):o||(o=t.document={}),bt(o,{theme:n.document,fontFamily:Br(e),fontSize:r.base,lineHeight:r.lineHeight})};D();var Ym={document:nt},IS=new WeakMap,$S=new WeakMap,ER=128,MS=1048576,Km=8192,Xm=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),jS=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),AR=(t,e)=>{let n=1,r=t.ownerDocument;if(r&&typeof r.createTreeWalker=="function"){let s=r.createTreeWalker(t,4294967295);for(;s.nextNode();)if(++n>e)return n;return n}let o=[t];for(;o.length;){let s=o.pop().childNodes||[];for(let i=0;i<s.length;i++){if(++n>e)return n;o.push(s[i])}}return n},Gm=(t,e)=>{if(typeof t.importNode=="function")return t.importNode(e,!0);let n=e.cloneNode(!0);return typeof t.adoptNode=="function"?t.adoptNode(n):n},TR=(t,e)=>{if(typeof t.prepend=="function")return t.prepend(e);let n=t.firstChild!==void 0?t.firstChild:t.childNodes&&t.childNodes[0];return typeof t.insertBefore=="function"?t.insertBefore(e,n||null):t.appendChild(e)},os=(t,e)=>{let n=T();if(!t){n.verbose&&console.warn("setSVG: val is not defined",e);return}return n.useSvgSprite?Na(e,t):t},Ja=(t,e=Ym)=>{let n=T(),r=Object.keys(t).length?{}:n.svg;for(let o in t)r[o]=t[o];VS(r,e)},Kr=(t,e)=>{let n=T();return n.useIconSprite&&!n.semanticIcons?.[e]?os(t,e):t},Gr=(t,e=Ym)=>{let n=T(),r=Object.keys(t).length?{}:n.icons;for(let o in t)r[o]=t[o];VS(r,e)},BS=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let n=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(n.setAttribute("aria-hidden","true"),n.setAttribute("width","0"),n.setAttribute("height","0"),n.setAttribute("style","position:absolute"),n.setAttribute("id","svgSprite")),n},OR=(t,e)=>{let n=typeof DOMParser<"u"?DOMParser:null;if(n){let r=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new n().parseFromString(r,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},RR=(t,e,n)=>{let r=String(n),o=$S.get(e),s=o?.entries.get(r);if(s)return o.entries.delete(r),o.entries.set(r,s),s.root;let i=OR(t,r);if(i||(i=BS(t,{isRoot:!1}),i.innerHTML=r),r.length>MS)return i;let a=AR(i,Km);if(a>Km)return i;for(o||(o={entries:new Map,units:0,nodes:0},$S.set(e,o));o.entries.size>=ER||o.units+r.length>MS||o.nodes+a>Km;){let c=o.entries.keys().next().value,l=o.entries.get(c);o.units-=c.length,o.nodes-=l.nodes,o.entries.delete(c)}return o.entries.set(r,{root:i,nodes:a}),o.units+=r.length,o.nodes+=a,i},FS=t=>{let e=new Map;for(let n of t.children){let r=Xm(n);if(!r)continue;let o=e.get(r)||[];o.push(n),e.set(r,o)}return e},PR=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),NS=(t,e,n,r)=>{let o=0,s=e.childElementCount>8?FS(n):null,i=a=>{if(!s)try{return[...n.querySelectorAll(`symbol[id="${PR(a)}"]`)].filter(c=>c.parentNode===n)}catch{s=FS(n)}return s.get(a)};for(let a of e.childNodes){if(jS(a))continue;let c=Xm(a);if(!c&&r){let u=o++,d=r.nodes[u];if(!d&&r.complete||d?.parentNode===n)continue;let h=Gm(t,d||a);n.appendChild(h),r.nodes[u]=h;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=Gm(t,a),n.appendChild(f);else if(!f.isEqualNode(a)){let u=Gm(t,a);n.replaceChild(u,f),f=u}if(l)for(let u=1;u<l.length;u++)l[u].remove();c&&s&&s.set(c,[f])}},VS=(t,e=Ym)=>{let n=T(),r=e.document||nt;if(!r||!r.documentElement)return n.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Fa(t);let o=r.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||BS(r);if(!i||!i.nodeType)return;let a=d=>RR(r,i,d),c=a(s),l=IS.get(i);l||IS.set(i,l=new WeakMap);let f=l.get(n);if(f||l.set(n,f=new Map),[...c.childNodes].some(d=>!jS(d)&&!Xm(d))){let d=[];for(let h in t)d.push(h);for(let h of d){let p=f.get(h);p||f.set(h,p={nodes:[],complete:!1}),NS(r,d.length===1?c:a(t[h]),i,p),p.complete=!0}}else{NS(r,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||TR(r.body,i);for(let d in t)n.__svgCache[d]=!0};D();var Qa=(t={})=>{let e=T(),n=e.typography||{},r=e.document||{},o=v(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=n.templates||{};c.body={...e.useDocumentTheme?Ae("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?Ae("document"):{};if(o.html&&Wt(o.html,a),n.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[c].html.fontSize=l.fontSize))}if(n.unit){let c=e.media||{};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,d=f.base||n.base,h=f.browserDefault||n.browserDefault,p=l.slice(1),g=c[p];if(!g)continue;let m="@media "+(g==="print"?g:"screen and "+g);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/h+u}}return ot(bt(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:r.fontFamily,lineHeight:r.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:r.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}},de)};D();var DR=new Set(["fallback"]),Zm=new Set,US=(t,e)=>{Zm.has(t)||(Zm.add(t),ht()&&console.warn(e))},Jm=()=>{Zm.clear()},zS=t=>{for(let e in t)delete t[e];return t},tc=()=>{let t=T(),e=v(t.cssSkinVars)?zS(t.cssSkinVars):t.cssSkinVars={},n=v(t.cssSkinFallback)?zS(t.cssSkinFallback):t.cssSkinFallback={},r=t.skins;if(!v(r))return e;let o=t.varPrefix?t.varPrefix+"-":"",s=t.color||{},i=t.cssVars||{},a=c=>k(c)&&Object.prototype.hasOwnProperty.call(s,c)?`var(--${o}color-${c})`:c;for(let c in r){let l=r[c];if(!v(l))continue;let f={};for(let u in l){if(DR.has(u))continue;let d=l[u];if(v(d))for(let h in d){let p=`--${o}theme-${u}-${h}`;t.useVariable!==!1&&!(p in i)&&US(`${c}/${u}/${h}`,`[scratch] skin "${c}" rewrites theme "${u}" param "${h}", which the theme does not declare \u2014 no element reads ${p}, so the skin changes nothing there. Declare "${h}" on the "${u}" theme (its no-skin value).`),f[p]=a(d[h])}}e[c]=f,k(l.fallback)&&(n[c]=l.fallback)}for(let c in n){let l=n[c];e[l]||(US(`${c}/fallback/${l}`,`[scratch] skin "${c}" falls back to "${l}", which is not a declared skin \u2014 the reduced-transparency fallback is skipped.`),delete n[c])}return e},HS=(t,e)=>{let n=`[data-skin="${t}"]`;return!e||e===":root"?`:root${n}, ${n}`:`${e}${n}, ${n} ${e}, ${e} ${n}`},Yr=(t,e,n)=>{let r={};if(!v(t))return r;for(let s in t)r[HS(s,n)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[HS(s,n)]=i)}return Object.keys(o).length&&(r["@media (prefers-reduced-transparency: reduce)"]=o),r};D();var LR=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),WS=/^-?[A-Z][0-9]?$/,on=t=>pe(t),qf=t=>{if(k(t))return fe.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(_t(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=et(e);return Ne(n)?n:e}).join(" ")},Kf=(t,e)=>Ua(t,e),ec=(t,e)=>{if(k(t))return fe.test(t)?t:yn(t).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(_t(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=et(r);if(Ne(o)){let i=$t(r,e);return v(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(r)||r==="0"||r.includes("px")||r.slice(-2)==="em")return r;let s=At(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", ")},nc=(t,e)=>{let n=t.indexOf("(");if(n===-1)return t;let r=t.slice(0,n+1),o=t.slice(n+1,t.lastIndexOf(")")),s=")",a=yn(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||LR.has(f)||f==="transparent"||fe.test(f))return f;let u=et(f);return Ne(u)?u:f}).join(" ")));return r+a.join(", ")+s},Gf=(t,e)=>{if(!k(t))return;let n=T();return yn(t).map(r=>{let o=r.trim();if(_t(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=$t(o,e);if(k(s))return s;if(v(s)){for(let i in s)if(k(s[i]))return s[i]}return o}return o.includes("gradient")?nc(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Vt(o)?`url(${o})`:o}).join(", ")},Yf=t=>k(t)&&dt(t).map(e=>At(e,"gap").gap).join(" "),Xf=t=>{if(!k(t))return t;let e=T();return dt(t).map(n=>WS.test(n)?zr(n,e.spacing):n).join(" ")},Qm=t=>{if(!k(t))return;let e=t.split(" ");return e.length?e.map(n=>_t(n)?`var(${n})`:n.length<3||n.includes("ms")?he(n).timing||n:Te(n)?Te(n):n).join(" "):t},rc=(t,e,n)=>{if(k(t))return t.split(",").map(r=>he(r).timing||r).join(",")},Zf=t=>{if(!k(t))return;let e=t.split(",");if(e.length)return e.map(Qm).join(",")};function kt(t,e,n={},r={}){let o=ut.call(this,e||n[t]);if(o==null)return;let s;if(k(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=_n(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=ja(t);!i&&a&&!r.ratio&&(o=Va(o))}return r.ratio?Ee(n,t,o,s):At(o,t,void 0,s)}var I=(t,e=null,n)=>kt(t,e,n,{ratio:!0}),IR=(t,e,n)=>k(t)?dt(t).map(r=>WS.test(r)?Ee(e,n,r)[n]:r).join(" "):t,wn=(t,e,n,r="borderRadius")=>{if(k(t))return{[r]:dt(t).map(o=>{let s=Ya(o);return s!==void 0?IR(s,e,n):Ee(e,n,o)[n]}).join(" ")}};D();var is="__smblsThemeRootOwner",as=t=>{let e=t&&t.__prefersListener,n=t&&t.__prefersMq;if(e&&n)try{typeof n.removeEventListener=="function"?n.removeEventListener("change",e):typeof n.removeListener=="function"&&n.removeListener(e)}catch{try{n.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},qS=(t,e,n)=>{if(!(!t||!e)){as(t),t.__prefersListener=n,t.__prefersMq=e;try{e.addEventListener("change",n)}catch{e.addListener(n)}}},$R=(t,e)=>{let n=T(),{cssVars:r}=n,o=e.startsWith("--")?e:`--${e}`;return r[o]=t,t},Kt=t=>t,Jf={color:Xn,gradient:es,font:Wa,fontFamily:rs,fontfamily:rs,theme:Ha,icons:Kr,semanticIcons:Kt,semanticicons:Kt,svg:os,svgData:Kt,typography:Kt,shadow:er,spacing:Kt,media:Kt,grid:Kt,class:Kt,timing:Kt,reset:Kt,unit:Kt,animation:Kt,vars:$R,sizes:Kt,shape:Kt,skins:Kt},MR=(t,e,n,r)=>{Mn(t,n,e);let o={};for(let s of r)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",n,"resolved to a host object; parked it and allocated a plain bucket"),o},ty=(t,e,n)=>{let r=T(),o=Ta(t),s=o.toLowerCase(),i=r[o]||r[s]||r[t],a=dn(i)?MR(r,i,s,[o,s,t]):i,c=Jf[o]||Jf[s];if(c)try{let l=c(e,n);return a&&(a[n]=l),a}catch(l){r.verbose&&console.warn("Error setting",s,"value",e,n,l)}if(!c){let l=a||(r[s]={});return l[n]=e,l}r.verbose&&console.warn("Can not find",s,"method in scratch")},ey=(t,e)=>{let n=T(),r=t.toLowerCase();return dn(e)?(Mn(n,r,e),n.verbose&&console.warn("[scratch] ignoring host object passed as the",r,"design-system family"),n[r]||n[t]):e==null?(n.verbose&&console.warn("[scratch] skipping empty design-system family",r),n[r]||n[t]):(Object.keys(e).sort((s,i)=>{let a=v(e[s])||R(e[s])?1:0,c=v(e[i])||R(e[i])?1:0;return a-c}).forEach(s=>{try{return ty(r,e[s],s)}catch(i){n.verbose&&console.warn("Error setting",r,"value",e[s],s,i)}}),n[r]||n[t])},Qf=(t,e)=>{let n=e||T();n.globalTheme=t;let o=wo(n)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=n.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[is]=n,c)as(n),a.setAttribute("data-theme",t),n.resolvedTheme=t,t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{let d=u.matches?"dark":"light";a.setAttribute("data-theme",d),n.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",qS(n,f,l)}else as(n),a.setAttribute("data-theme","light"),n.resolvedTheme="light",a.style.colorScheme="light"}let i=n.varPrefix?`--${n.varPrefix}-theme-`:"--theme-";for(let a in n.cssVars)a.startsWith(i)&&delete n.cssVars[a];for(let a in n.cssMediaVars)delete n.cssMediaVars[a];if(o&&n.cssVars){let a=n.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 d in n.cssVars)f[u].style.setProperty(d,n.cssVars[d]);return n}}catch{}}return n},FR={},Xr=(t,e=FR)=>{let n=e.config||T(),{version:r,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:p,hoverMedia:g,files:m,assets:y,...x}=t;e.newConfig&&(n=Nf(e.newConfig)),un(x.document)&&(n.__domDocument=x.document,delete x.document),un(n.document)&&(n.__domDocument||(n.__domDocument=n.document),n.document={}),m!==void 0&&(n.files=m),y!==void 0&&(n.assets=y),o!==void 0&&(n.verbose=o),s!==void 0&&(n.useVariable=s),i!==void 0&&(n.useReset=i),c!==void 0&&(n.useFontImport=c),a!==void 0&&(n.useSvgSprite=a),l!==void 0&&(n.useIconSprite=l),d!==void 0&&(n.useDocumentTheme=d),f!==void 0&&(n.globalTheme=f),u!==void 0&&(n.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(n.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(n.useDefaultConfig=h),p!==void 0&&(n.semanticIcons=p),g!==void 0&&(n.hoverMedia=g),n.verbose&&console.log(n);let _=wo(n)||(typeof document<"u"?document:null),w=_&&_.defaultView||(typeof window<"u"?window:null),S=_&&(n.themeRoot||_.documentElement);if(S&&typeof S.setAttribute=="function")if(n.globalTheme&&n.globalTheme!=="auto")as(n),S.setAttribute("data-theme",n.globalTheme),n.resolvedTheme=n.globalTheme,S[is]=n,n.globalTheme==="dark"||n.globalTheme==="light"?S.style.colorScheme=n.globalTheme:S.style.colorScheme="light dark";else if(S[is]&&S[is]!==n&&S.hasAttribute("data-theme"))as(n),n.resolvedTheme=S.getAttribute("data-theme");else if(w&&w.matchMedia){let M=vt=>{let Ct=vt.matches?"dark":"light";S.setAttribute("data-theme",Ct),n.resolvedTheme=Ct},X=w.matchMedia("(prefers-color-scheme: dark)");M(X),S.style.colorScheme="light dark",S[is]=n,qS(n,X,M)}else as(n),S.setAttribute("data-theme","light"),n.resolvedTheme="light",S.style.colorScheme="light",S[is]=n;n.__svgCache||(n.__svgCache={}),ts(x);let A=Object.keys(x).filter(E=>!E.startsWith("__")),P=new Set(A);if(A.forEach(E=>{let M=E.toLowerCase();M!==E&&P.has(M)&&ot(x[M],x[E],de)}),A.map(E=>{let M=E.toLowerCase();if(!(M!==E&&P.has(M)))return ey(E,x[E])}),n.varPrefix&&(n.typography&&(n.typography.varPrefix=n.varPrefix),n.spacing&&(n.spacing.varPrefix=n.varPrefix),n.timing&&(n.timing.varPrefix=n.varPrefix)),x.typography)try{Ka()}catch(E){n.verbose&&console.warn("Error applying typography sequence",E)}if(x.spacing)try{Ba()}catch(E){n.verbose&&console.warn("Error applying spacing sequence",E)}if(x.timing)try{Xa()}catch(E){n.verbose&&console.warn("Error applying timing sequence",E)}try{tc()}catch(E){n.verbose&&console.warn("Error applying skins",E)}Za();let L=Qa();return L&&(n.reset=L),n};var ls=new Map,o0=null,ry=null,NR=null;function sc(t){t.batchAtomicCss&&(ry=t.batchAtomicCss),t.compoundCssClass&&(NR=t.compoundCssClass)}var jR=new Set,GS=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function cy(t){try{let e=T();e&&(e.__domDocument=t)}catch{}t&&jR.add(t)}function Jr(){try{let t=T();if(t){if(GS(t.__domDocument))return t.__domDocument;if(GS(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var ee={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function su(){return{...ee}}function ly(){for(let t in ee)ee[t]=0;ru=!1}var ru=!1,nu=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function BR(t){let e=Date.parse(t);if(!isFinite(e))return"";let n=Math.floor((Date.now()-e)/864e5);return n<1?" (today)":` (${nu(n,"day")} ago)`}function VR(){try{let t=ZR();if(!t.length)return-1;let e=0;for(let n=0;n<t.length;n++)e+=t[n].cssRules?t[n].cssRules.length:0;return e}catch{return-1}}function UR(t,e){if(ru)return!1;ru=!0;let n="n/a \u2014 running from src/ (unbuilt), so no dist is in play",r="this IS the source",o="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${nu(ee.variable,"variable rule")} and ${nu(ee.atomic,"atomic rule")}, while the design system held ${nu(e,"CSS variable")}.
43
43
  The document will render UNSTYLED and nothing else will report an error.
44
44
  This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
45
45
  package : ${o}
46
46
  built : ${n}
47
47
  source : ${r}
48
48
  emitted : ${JSON.stringify(ee)}
49
- sheets : the style[data-smbls] tiers currently hold ${BR()} rule(s)
49
+ sheets : the style[data-smbls] tiers currently hold ${VR()} rule(s)
50
50
  FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
51
51
  then rebuild the listed packages and clear the app's .parcel-cache
52
- Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function o0(){try{let t=T(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function GS(t){ru||ee.variable>0||ee.atomic>0||s0(Math.max(t,o0()))}function fy(t){let e=t&&(t.CSS_VARS||t.cssVars);return s0(e?Object.keys(e).length:o0())}function s0(t){let e=su();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!iu())return{ok:!0,reason:"no-sheet",stats:e,varCount:t};if(e.variable>0||e.atomic>0)return{ok:!0,reason:null,stats:e,varCount:t};let n=e.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return VR(n,t),{ok:!1,reason:n,stats:e,varCount:t}}var UR={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 Zr(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function ou(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e.toString(36)}function zR(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():ou(e)}var HR={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"};function cs(t,e){let n=HR[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function oy(t){let e="";for(let n in t){let r=t[n];if(typeof r!="object"||r===null)continue;let o="";for(let s in r){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;o+=cs(i?s:Zr(s),r[s])}e+=`${n}{${o}}`}return e}var WR="@media (hover: hover)",qR=/(?:^|[^\\]):hover(?![\w-])/;function uy(){try{let t=T();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Sn(t,e,n){return n===!1||!qR.test(e)||n===void 0&&!uy()?t:`${WR}{${t}}`}function YS(t,e,n){let r=(n?n+"":"")+t+":"+e,o=ls.get(r),s=o?null:Zr(t);if(!o){let c=UR[t]||ou(t),l=zR(e);o=n?`_${n}_${c}-${l}`:`_${c}-${l}`,ls.set(r,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||Zr(t),a=`.${o}{${cs(i,e)}}`;return Ne(a,void 0,"atomic"),o}var XS=new WeakMap,ZS=new WeakMap;function Ne(t,e,n){let r=iu(e,KR(t));if(!r)return ee.dropped++,"dropped";let o=XS.get(r);if(o||(o=new Set,XS.set(r,o)),o.has(t))return ee.duplicate++,ee[n||"global"]++,"duplicate";let s=ZS.get(r);if(s&&s.has(t))return ee.invalid++,"invalid";try{r.insertRule(t,r.cssRules.length)}catch{return s||(s=new Set,ZS.set(r,s)),s.add(t),ee.invalid++,"invalid"}return o.add(t),ee[n||"global"]++,"inserted"}var je="0:0",JS="1:0",QS=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function KR(t){if(typeof t!="string"||!t)return je;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return je;let e=1/0,n=-1/0;QS.lastIndex=0;let r;for(;r=QS.exec(t);){let o=parseFloat(r[2])*(r[3]==="em"||r[3]==="rem"?16:1);r[1]==="max"?e=Math.min(e,o):n=Math.max(n,o)}return e!==1/0?"2:"+-e:n!==-1/0?"3:"+n:JS}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?je:JS}var t0=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},GR=(t,e)=>{let[n,r]=t0(t),[o,s]=t0(e);return n!==o?n<o:r<s},YR=t=>t.getAttribute("data-tier")||je,e0=new WeakMap;function iu(t,e){let n=t||Jr();if(!n||!n.head)return null;let r=e||je,o=e0.get(n);o||(o=new Map,e0.set(n,o));let s=o.get(r);if(s&&s.ownerNode&&s.ownerNode.parentNode===n.head)return s;r!==je&&iu(n,je);let i=r===je?n.head.querySelector("style[data-smbls]:not([data-tier])"):n.head.querySelector(`style[data-smbls][data-tier="${r}"]`);if(!i){i=n.createElement("style"),i.setAttribute("data-smbls",""),r!==je&&i.setAttribute("data-tier",r);let c=n.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(GR(r,YR(c[u]))){l=c[u];break}let f=c.length?c[c.length-1]:null;l?n.head.insertBefore(i,l):f?n.head.insertBefore(i,f.nextSibling):n.head.appendChild(i)}let a=i.sheet;return o.set(r,a),r===je&&(r0=a),a}function XR(t){let e=t||Jr();if(!e||!e.head)return[];let n=[],r=e.head.querySelectorAll("style[data-smbls]");for(let o=0;o<r.length;o++)r[o].sheet&&n.push(r[o].sheet);return n}var ZR=8;function ge(t,e,n,r){if(!t||typeof t!="object")return"";let o=!!(r&&r.state),s=null,i=0,a=[],c=[],l=Object.keys(t);for(let u=0;u<l.length;u++){let d=l[u],h=t[d];h==null||h===!1||h===""||(typeof h=="object"?c.push([d,h]):ry?(s||(s=[]),s.push(d,String(h)),i++):a.push(YS(d,String(h),n)))}if(s&&i>=ZR){let u=s.join("\0"),d=ry(u),h=d.indexOf("\0"),p=d.substring(0,h),g=d.substring(h+1);if(g){let m=g.split(`
53
- `);for(let y=0;y<m.length;y++)m[y]&&Ne(m[y],void 0,"atomic")}a.push(p)}else if(s)for(let u=0;u<s.length;u+=2)a.push(YS(s[u],s[u+1],n));let f=[];for(let u=0;u<c.length;u++)f.push(eP(c[u][0],c[u][1],n,o));return a.concat(f).join(" ").trim()}var n0=new Map,JR=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function oc(t){return/^@(media|supports|container)\b/.test(t)}function QR(t){return typeof t!="string"||!t||oc(t)?!1:t.split(",").every(e=>JR.test(e.trim()))}var i0=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},sy=32,iy=1024,ay=!1;function eu(t,e,n){if(ay)return;ay=!0;let r=[e,...n],o=r.length>12?[...r.slice(0,6),`\u2026${r.length-9} more\u2026`,...r.slice(-3)]:r;console.warn(`[@symbo.ls/css] ${t} at ${o.join(" > ")} \u2014 skipped. A style block may hold only CSS values and nested plain blocks; the rest of this rule is still emitted. (One warning per page.)`)}function tP(t){try{return JSON.stringify(t)}catch{let n=[],r=0;return JSON.stringify(t,function(o,s){if(!s||typeof s!="object")return s;for(;n.length&&n[n.length-1]!==this;)n.pop();if(!(n.length&&(n.includes(s)||!i0(s)||n.length>sy||++r>iy)))return n.push(s),s})}}function eP(t,e,n,r){let o=tP(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&uy(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=ls.get(a);if(c){let w=n0.get(c);if(w)for(let k=0;k<w.length;k++)Ne(w[k],void 0,"atomic");return c}c=n?`_${n}_c${ou(a)}`:`_c${ou(a)}`;let l=r?`.${c}.${c}`:`.${c}`,f=QR(t)?`${l}.${c}`:l,u="",d=[],h=w=>typeof w=="string"&&(w.indexOf("{")!==-1||w.indexOf("}")!==-1),p=new Set,g=0,m=(w,k)=>{p.add(k);let A="",P=Object.keys(k);for(let I=0;I<P.length;I++){let E=P[I],M=k[E];if(M!=null)if(typeof M=="object"){let X=[...w,E];p.has(M)?eu("a style value that loops back to one of its own ancestors",t,X):i0(M)?X.length>sy?eu(`a style block nested more than ${sy} levels deep`,t,X):++g>iy?eu(`a style object with more than ${iy} nested blocks`,t,X):m(X,M):eu(`a ${Object.prototype.toString.call(M).slice(8,-1)} (not a style block)`,t,X)}else{if(h(M))continue;A+=cs(Zr(E),M)}}p.delete(k),A&&(w.length===0?u+=A:d.push({chain:w,body:A}))};m([],e);let y=w=>w.startsWith(":")||w.startsWith("["),x=(w,k=!0)=>{let A=k&&w.length===1?f:l;if(!w.length)return A;let P=w[0].split(",").map(I=>I.trim()).map(I=>I.includes("&")?I.replace(/&/g,A):y(I)?`${A}${I}`:`${A} ${I}`);for(let I=1;I<w.length;I++){let E=w[I].split(",").map(X=>X.trim()),M=[];for(let X of P)for(let vt of E)vt.includes("&")?M.push(vt.replace(/&/g,X)):y(vt)?M.push(X+vt):M.push(X+" "+vt);P=M}return P.join(", ")},b=[],_=(w,k)=>{let A=w.filter(oc),P=x(w.filter(E=>!oc(E)),A.length===0),I=`${P}{${k}}`;for(let E=A.length-1;E>=0;E--)I=`${A[E]}{${I}}`;I=Sn(I,P,i),b.push(I),Ne(I,void 0,"atomic")};u&&_([t],u);for(let w of d)_([t,...w.chain],w.body);return n0.set(c,b),ls.set(a,c),c}function xt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(iu(),typeof t=="string"){let s=t.indexOf("--")!==-1;Ne(t,void 0,s?"variable":"global"),s&&GS(1);return}let e=uy(),n=0,r=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};r.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of r){let i=t[s];if(s.startsWith("@keyframes")){let a=oy(i);a&&Ne(`${s}{${a}}`,void 0,"keyframes");continue}if(oc(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=oy(c);l&&Ne(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:Zr(u);l+=cs(h,c[u])}n+=f,Ne(Sn(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&n++;let f=l?a:Zr(a);Ne(`${s}{${cs(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let h=d?f:Zr(f);a+=cs(h,u)}}if(n+=l,a&&Ne(Sn(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(oc(d)?f.push(d):u.push(d));f.sort((d,h)=>{let p=g=>{let m=g.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return p(h)-p(d)});for(let d of u)xt({[`${s} ${d}`]:i[d]});for(let d of f)xt({[d]:{[s]:i[d]}})}}}n>0&&GS(n)}function fs(t,e){return Ne(`@keyframes ${t}{${oy(e)}}`,void 0,"keyframes"),t}function a0(){ls.clear(),r0=null,ay=!1}function dy(){return ls.size}D();var lb={};$(lb,{DELEGATED_EVENTS:()=>gs,LIFECYCLE_EVENTS:()=>or,MIXINS:()=>au,NON_BUBBLING_EVENTS:()=>cu,REGISTRY:()=>Ut,SVG_TAGS:()=>ps,addDelegatedEvent:()=>ic,addMethods:()=>ws,applyExtends:()=>ys,cacheNode:()=>rr,create:()=>re,createHTMLNode:()=>ds,detectTag:()=>nr,dispose:()=>vn,flushMounts:()=>gc,globalEventKeyInfo:()=>lu,isSvgTag:()=>hs,isValidTag:()=>us,refreshContextProto:()=>bu,registerEvent:()=>ms,registerGlobalEvent:()=>fu,remove:()=>xs,removeDelegatedEvent:()=>ac,update:()=>bs});var hy="http://www.w3.org/2000/svg",ps=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"]),nP=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 us(t){return nP.has(t)||ps.has(t)}function hs(t){return ps.has(t)}function nr(t){let{tag:e,key:n}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(s){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${n||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=n),typeof e=="string"&&us(e))return e;if(!n||typeof n!="string")return"div";let r=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=n.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),us(o)&&!r.has(o)?o:"div"}var c0={};function ds(t,e){let n=e?.context?.document||globalThis.document;if(!n)return null;if(t==="string")return n.createTextNode(e?.text||"");if(t==="fragment")return n.createDocumentFragment();if(hs(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===hy)return n.createElementNS(hy,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function rr(t){let e=t.tag=nr(t),r=hs(e)&&(e==="svg"||t.parent?.node?.namespaceURI===hy)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=c0[r];if(s||(s=c0[r]=ds(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?ds(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Ut=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","srcObject","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]),au={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},or=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),cu=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"]),gy=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),gs=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 yy=new WeakMap,rP={passive:!0},oP={passive:!0,capture:!0},by=(t,e)=>gy.has(t)?e?oP:rP:e||!1;function u0(t){let e=yy.get(t);return e||(e={handlers:new Map,installed:new Set},yy.set(t,e)),e}function sP(t,e){let n=u0(e);if(n.installed.has(t))return;n.installed.add(t);let r=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";e.addEventListener(t,s=>{if(o){let a=s.target,c=n.handlers.get(t),l=c&&a?c.get(a):null;if(!l||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;l(s);return}let i=s.target;for(;i&&i!==e;){let a=n.handlers.get(t);if(a){let c=a.get(i);if(c&&(c(s),s.cancelBubble))return}i=i.parentNode}},by(t,r))}function ic(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=u0(r);sP(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function ac(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=yy.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function l0(t){return gs.has(t)&&!or.has(t)}function d0(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&st(r);try{let s=e.call(t,o,t,t.state,n);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{r&&rt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&rt()}}function ms(t,e,n){let{node:r,context:o}=e;if(!r)return;let s=d0(e,n),i=cu.has(t);if(!i&&l0(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;ic(t,r,s,a)}else r.addEventListener(t,s,by(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&l0(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;ac(t,r,a)}else r.removeEventListener(t,s,by(t,!1))})}var my=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function lu(t){if(typeof t!="string")return null;for(let e=0;e<my.length;e++){let n=my[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:my[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}var iP=/^[A-Za-z_$][\w$]*$/;function aP(t,e,n){let r=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(r=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof r=="string"&&iP.test(r)){let c=r;r=function(f){return t.call(c,f)}}return typeof r!="function"?null:(s===void 0&&(s=gy.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function cP(t,e,n){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=n&&n.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}function lP(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function fP(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function uP(t){let e=t.node;if(!e)return!1;let n=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return n?n.isConnected!==!1:!1}function fu(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)f0(t,e,n[o]);return}f0(t,e,n)}}function f0(t,e,n){let r=e.__ref,o=aP(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=cP(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(r.__globalEvents&&r.__globalEvents.has(i))return;let a=d0(e,o.handler),c=f=>{uP(e)&&a(f)},l={capture:o.capture,passive:o.passive,once:o.once};lP(s,t.eventName,c,l)&&(r.__globalEvents||(r.__globalEvents=new Map),r.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{fP(s,t.eventName,c,l),r.__globalEvents&&r.__globalEvents.delete(i)}))}function p0(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 ys(t,e,n){let r=p0(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=h0(r[i],s);a&&a!==e&&g0(t,a,n,new Set([e]))}}function h0(t,e){if(typeof t=="string"){if(t.includes(">")){let n=t.split(">").map(o=>o.trim()),r=e[n[0]]||e[`smbls.${n[0]}`];for(let o=1;o<n.length&&r;o++)r=r[n[o]];return r||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function g0(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=p0(e);if(o.length){let i=(t.context||n?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=h0(o[a],i);c&&g0(t,c,n,r)}}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]=m0(t[s],i):t[s]=i}}function m0(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=m0(o,s):n[r]=s}return n}Rr();D();var dP=["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"],uu={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"]},b0=["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"],sn=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()):_0(t),pP=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),_0=t=>pP.has(t)?t.toLowerCase():null,hP=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),an=t=>typeof t=="string"&&(hP.has(t)||t.startsWith("aria-")),ne=(t,e)=>e!==!0&&e!==!1?e:an(t)?e?"true":"false":e===!0?"":e,Oe=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||sn(e)||uu.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(uu,t)?uu[t].includes(e):!1,xy=t=>{if(!S(t))return!1;let e=t.toLowerCase();return b0.includes(e)},gP=(t,e,n)=>{let r={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n&&o in n)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])Rt(e[o][a])&&(r["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(Rt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());r["data-"+c]=e[o][a]}continue}let s=Oe(t,o),i=xy(o);if(Rt(e[o])&&(s||i)){let a=sn(o)||o;r[a]=e[o]}}return r},mP=(t,e)=>{let n={};if(t.attr)for(let r in t.attr)n[r]=t.attr[r](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let r in t.aria){let o=t.aria[r];typeof o=="function"&&(n["aria-"+r]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];if(typeof o=="function"){let s=r.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());n["data-"+s]=o(e,e.state,e.context)}}return n},sr=(t,e)=>{let n=t.call("exec",e,t);if(n)return S(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},_y=(t,e)=>{let n=(t.preSrc||"")+(sr(t,e)||"");if(!n)return;try{return new URL(n),n}catch{}let{context:r}=t;if(!r.files&&!r.assets)return n;if(n.startsWith("/assets/")){let o=n.slice(8),s=r.assets&&(r.assets[n]||r.assets[o]);return s&&s.content?s.content.src:n}if(n.startsWith("/files/")){let o=n.slice(7),s=r.files&&(r.files[n]||r.files[o]);return s&&s.content?s.content.src:n}if(r.assets){let o=r.assets[n];if(o&&o.content)return o.content.src}if(r.files){let o=r.files[n];if(o&&o.content)return o.content.src}return n},Qr={src:t=>_y(t,t.src),href:t=>sr(t,t.href),action:t=>sr(t,t.action),poster:t=>_y(t,t.poster),data:t=>sr(t,t.data)},wy=t=>{let e=t.tag||"div",n={};for(let r in Qr)if(t[r]!==void 0&&Oe(e,r)){let o=Qr[r](t);o!==void 0&&(n[r]=o)}return n},y0=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return O(n)?n.call(e,e):!!n},yP=(t,e,n)=>{if(t==="$"){let o=y0(e,n);return o===void 0&&(o=!!n[e]),o}let r=n[e]===!0||n.state[e];if(!r){let o=y0(e,n);o!==void 0&&(r=o)}return t==="."?!!r:!r},bP=new Set(["$",".","!"]),_P=(t,e,n)=>{let r={},o=(s,i,a,c)=>{let l=i;r[s]=f=>{if(yP(a,c,f))return O(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!bP.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(n&&l in n)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let h in a[l])o("aria-"+h,a[l][h],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let h in a[l]){let p=h.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+p,a[l][h],i,c)}continue}let f=Oe(e,l),u=xy(l);if(!f&&!u)continue;let d=sn(l)||l;o(d,a[l],i,c)}}return r};function bs(t={},e={}){let n=this,r=n.__ref;if(!r)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof n.onBeforeUpdate=="function"&&Sy(r))try{let i=n.onBeforeUpdate(n,n.state,n.context,e);if(i&&typeof i.then=="function")i.then(()=>kn(r,!1),a=>{kn(r,!0),n.context?.plugins?.length&&Pt("error",n,{hook:"onBeforeUpdate",error:a})||console.error("[DOMQL] onBeforeUpdate error:",a)});else if(kn(r,!1),i===!1)return n}catch(i){throw kn(r,!0),i}let o=!t||Object.keys(t).length===0,s=[];fl(()=>{if(t.state&&St(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&_s(n,t.text??"")),t.html!==void 0&&(n.html=t.html,!r.__exec.html&&n.node&&(n.node.innerHTML=t.html)),t.style&&n.node?.style){if(!r.__exec.style)for(let i in t.style){let a=t.style[i];if(a==null)continue;let c=i.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=String(a).replace(/\s*!important\s*$/,"");n.node.style.setProperty(c,l,"important")}n.style||(n.style={}),Object.assign(n.style,t.style)}if(t.attr&&n.node?.setAttribute){for(let i in t.attr){let a=t.attr[i];a==null||a===!1&&!an(i)?n.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&n.node.setAttribute(i,ne(i,a))}n.attr||(n.attr={}),Object.assign(n.attr,t.attr)}if(t.data&&n.node?.dataset){for(let i in t.data)n.node.dataset[i]=t.data[i];n.data||(n.data={}),Object.assign(n.data,t.data)}for(let i in t){if(Ut.has(i)||i==="state")continue;let a=t[i],c=n[i];if(c&&c.__ref&&typeof c.update=="function")c.update(a,e);else if(typeof a=="object"&&a!==null){let l=i.charCodeAt(0);l>=65&&l<=90&&re(a,n,i,e)}else i!=="text"&&i!=="html"&&i!=="style"&&i!=="attr"&&i!=="data"&&(n[i]=a,typeof a!="function"&&s.push(i))}});for(let i=0;i<s.length;i++)S0(n,s[i]);if(n.node){for(let i=0;i<s.length;i++)if(x0(s[i])){w0(n);break}}if(n.node&&o&&r.__effects&&r.__effects.length)for(let i=0;i<r.__effects.length;i++){let a=r.__effects[i];a&&!a._disposed&&!a._isSubscribeToEffect&&typeof a._execute=="function"&&a._execute()}else if(n.node&&r.__conditionalRunners)for(let i of r.__conditionalRunners)i();return Pt("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}function vn(t){if(!t)return;let e=t.__ref;if(!e)return;let n=Ln();if(n){$n(null);try{return vn(t)}finally{$n(n)}}e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(typeof e.__releaseMedia=="function"&&(e.__releaseMedia(),e.__releaseMedia=null),e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&vn(i)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function xs(){vn(this)}D();D();D();var xP=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],wP=["none","forwards","backwards","both"],SP=["normal","reverse","alternate","alternate-reverse"],kP=["running","paused"],vP=t=>/^[\d.]+m?s$/.test(t),CP=/^(?:translate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|scale(?:3d|x|y|z)?\((?:\s*1(?:\.0+)?\s*,?)+\)|rotate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|skew(?:x|y)?\((?:\s*0[a-z%]*\s*,?)+\)|matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\))$/,EP=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let n=e.match(/[a-z0-9]+\([^()]*\)/g);return!n||n.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:n.every(r=>CP.test(r.replace(/\s+/g,"")))},k0=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),AP={transform:EP,translate:k0,rotate:t=>k0(t)||/^\s*(?:[xyz]\s+)?0(?:deg|rad|turn|grad)?\s*$/.test(String(t).toLowerCase()),scale:t=>/^(none|initial|unset)$/.test(String(t).trim().toLowerCase())||/^(?:\s*1(?:\.0+)?)+\s*$/.test(String(t)),opacity:t=>/^(initial|unset)$/.test(String(t).trim().toLowerCase())||Number(t)===1},TP=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let n=e.match(/^(\d+(?:\.\d+)?)%$/);return n?Number(n[1]):null},OP=t=>{if(!v(t))return null;let e=null,n=-1;for(let r in t){let o=TP(r);o==null||!v(t[r])||o>=n&&(n=o,e=t[r])}return e},RP=t=>{let e=OP(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=AP[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},PP=(t,e)=>{if(v(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return v(r)?r:null},DP=["reverse","alternate","alternate-reverse"],v0=(t,e,n)=>{let r=n||e.animationDirection;return r&&DP.includes(String(r))?"both":RP(PP(t,e))?"backwards":"both"},IP=0,C0=new Map,ky=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(v(t)){let o=JSON.stringify(t),s=C0.get(o);if(s)return s;let i=`smbls-anim-${IP++}`,a=fs(i,t);return C0.set(o,a),a}let r=n&&n[t];return v(r)?fs(t,r):t},LP=t=>{let e=[],n=0,r="";for(let o of String(t).trim())o==="("?n++:o===")"&&n>0&&n--,n===0&&/\s/.test(o)?(r&&e.push(r),r=""):r+=o;return r&&e.push(r),e},$P=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},r=LP(t),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of r)n&&n[u]?o=u:vP(u)?s.push(u):xP.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")||u.startsWith("linear(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):SP.includes(u)?c=u:wP.includes(u)?l=u:kP.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},vy={animation:(t,e)=>{if(t!=null){if(S(t)&&t.includes(" ")){let n=$P(t,e);return{animationName:ky(n.name||t,e),animationDuration:n.durations[0]||he(e.animationDuration||"A").timing,animationDelay:n.durations[1]||he(e.animationDelay||"0s").timing,animationTimingFunction:n.timingFunction||Te(e.animationTimingFunction||"ease"),animationFillMode:n.fillMode||e.animationFillMode||v0(n.name||t,e,n.direction),animationIterationCount:n.iterationCount!=null?n.iterationCount:e.animationIterationCount||1,animationPlayState:n.playState||e.animationPlayState,animationDirection:n.direction||e.animationDirection}}return{animationName:ky(t,e),animationDuration:he(e.animationDuration||"A").timing,animationDelay:he(e.animationDelay||"0s").timing,animationTimingFunction:Te(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||v0(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:ky(t,e)}),animationDuration:t=>({animationDuration:he(t).timing}),animationDelay:t=>({animationDelay:he(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Te(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};D();var du=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!S(e))return;let[r,o]=dt(e);return{...L(t+"Start",r,n),...L(t+"End",o||r,n)}},Cy={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>L("height",t,e),width:(t,e)=>L("width",t,e),boxSizing:t=>Dt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,n]=dt(t);return{...kt("height",e),...kt("width",n||e)}},inlineSize:(t,e)=>L("inlineSize",t,e),blockSize:(t,e)=>L("blockSize",t,e),minWidth:(t,e)=>L("minWidth",t,e),maxWidth:(t,e)=>L("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,n]=dt(t);return{...kt("minWidth",e),...kt("maxWidth",n||e)}},minHeight:(t,e)=>L("minHeight",t,e),maxHeight:(t,e)=>L("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,n]=dt(t);return{...kt("minHeight",e),...kt("maxHeight",n||e)}},size:t=>{if(!S(t))return;let[e,n]=dt(t);return{...L("inlineSize",e),...L("blockSize",n||e)}},minBlockSize:(t,e)=>L("minBlockSize",t,e),minInlineSize:(t,e)=>L("minInlineSize",t,e),maxBlockSize:(t,e)=>L("maxBlockSize",t,e),maxInlineSize:(t,e)=>L("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,n]=dt(t);return{...kt("minInlineSize",e),...kt("minBlockSize",n||e)}},maxSize:t=>{if(!S(t))return;let[e,n]=dt(t);return{...kt("maxInlineSize",e),...kt("maxBlockSize",n||e)}},borderWidth:(t,e)=>L("borderWidth",t,e),borderTopWidth:(t,e)=>L("borderTopWidth",t,e),borderRightWidth:(t,e)=>L("borderRightWidth",t,e),borderBottomWidth:(t,e)=>L("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>L("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>L("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>L("textUnderlineOffset",t,e),padding:(t,e)=>L("padding",t,e),paddingInline:t=>{if(!S(t))return;let[e,n]=dt(t);return{...kt("paddingInlineStart",e),...kt("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!S(t))return;let[e,n]=dt(t);return{...kt("paddingBlockStart",e),...kt("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>L("paddingBlockStart",t,e),paddingBottom:(t,e)=>L("paddingBlockEnd",t,e),paddingLeft:(t,e)=>L("paddingInlineStart",t,e),paddingRight:(t,e)=>L("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>L("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>L("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>L("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>L("paddingInlineEnd",t,e),margin:(t,e)=>L("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,n]=dt(t);return{...kt("marginInlineStart",e),...kt("marginInlineEnd",n||e)}},marginBlock:t=>{if(!S(t))return;let[e,n]=dt(t);return{...kt("marginBlockStart",e),...kt("marginBlockEnd",n||e)}},marginTop:(t,e)=>L("marginBlockStart",t,e),marginBottom:(t,e)=>L("marginBlockEnd",t,e),marginLeft:(t,e)=>L("marginInlineStart",t,e),marginRight:(t,e)=>L("marginInlineEnd",t,e),marginInlineStart:(t,e)=>L("marginInlineStart",t,e),marginInlineEnd:(t,e)=>L("marginInlineEnd",t,e),marginBlockStart:(t,e)=>L("marginBlockStart",t,e),marginBlockEnd:(t,e)=>L("marginBlockEnd",t,e),scrollMargin:(t,e)=>L("scrollMargin",t,e),scrollMarginTop:(t,e)=>L("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>L("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>L("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>L("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>du("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>du("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>L("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>L("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>L("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>L("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>L("scrollPadding",t,e),scrollPaddingTop:(t,e)=>L("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>L("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>L("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>L("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>du("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>du("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>L("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>L("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>L("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>L("scrollPaddingInlineEnd",t,e),gap:t=>({gap:Yf(t)}),columnGap:(t,e)=>Ee(e,"columnGap",t),rowGap:(t,e)=>Ee(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!S(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>wn(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>wn(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>wn(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>wn(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>wn(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>wn(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var Ey={fontSize:t=>Ga(t)||t,fontFamily:t=>({fontFamily:qa(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 Ay={overflow:t=>({overflow:t}),cursor:(t,e,n,r)=>{if(!t)return;let o=r.assets&&r.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=r.files&&r.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 Ty={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:dt(t).map(n=>At(n,"k").k).join(" ")}},left:t=>At(t,"left"),top:t=>At(t,"top"),right:t=>At(t,"right"),bottom:t=>At(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=dt(t).map(n=>At(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=dt(t).map(n=>At(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};D();var pu=0,hu=()=>{pu++},gu=()=>{pu>0&&pu--},me=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:pu>0?null:n&&n.resolvedTheme||null},oe=(t,e)=>{if(e==null||e==="")return;if(!v(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(v(s)){let i=oe(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},Oy={theme:(t,e)=>{if(t)return e.themeModifier?Ae(t,`@${e.themeModifier}`):Ae(t)},color:(t,e)=>{let n=me(e);if(t)return oe("color",$t(t,n))},background:(t,e)=>{let n=me(e);if(t)return S(t)&&t.includes("gradient")&&t.includes("(")?{background:nc(t,n)}:oe("background",$t(t,n))},backgroundColor:(t,e)=>{let n=me(e);if(t)return oe("backgroundColor",$t(t,n))},backgroundImage:(t,e,n,r)=>{let o=me(e);if(!t)return;let s=r.assets&&r.assets[t];if(s&&s.content)t=s.content.src;else{let i=r.files&&r.files[t];i&&i.content&&(t=i.content.src)}return oe("backgroundImage",Gf(t,o))},textStroke:t=>{let e=qf(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:on(t)}),outlineWidth:(t,e)=>L("outlineWidth",t,e),outlineColor:(t,e)=>{let n=me(e);if(t)return oe("outlineColor",$t(t,n))},outlineOffset:(t,e)=>L("outlineOffset",t,e),border:t=>({border:on(t)}),borderColor:(t,e)=>{let n=me(e);if(t)return oe("borderColor",$t(t,n))},borderTopColor:(t,e)=>{let n=me(e);if(t)return oe("borderTopColor",$t(t,n))},borderBottomColor:(t,e)=>{let n=me(e);if(t)return oe("borderBottomColor",$t(t,n))},borderLeftColor:(t,e)=>{let n=me(e);if(t)return oe("borderLeftColor",$t(t,n))},borderRightColor:(t,e)=>{let n=me(e);if(t)return oe("borderRightColor",$t(t,n))},borderLeft:t=>({borderLeft:on(t)}),borderTop:t=>({borderTop:on(t)}),borderRight:t=>({borderRight:on(t)}),borderBottom:t=>({borderBottom:on(t)}),shadow:(t,e)=>{let n=me(e);if(t)return oe("boxShadow",Kf(t,n))},boxShadow:(t,e)=>{if(!S(t))return;let[n,r]=t.split("!importan"),o=me(e),s=r?" !important":"",i=ec(n.trim(),o);return S(i)?{boxShadow:i+s}:oe("boxShadow",i)},textShadow:(t,{context:e})=>oe("textShadow",ec(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:on(t)})};var cc={transition:t=>{let e=Zf(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:rc(t)}),transitionDelay:t=>({transitionDelay:rc(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Te(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};D();var Ry={flow:(t,e)=>{let n=e.reverse;if(!S(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!S(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};D();var MP=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,E0=t=>{if(!S(t))return t;let e=T().sizes;return e?t.replace(MP,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},cn=t=>E0(Xf(t)),Py={gridTemplateColumns:t=>({gridTemplateColumns:cn(t)}),gridTemplateRows:t=>({gridTemplateRows:cn(t)}),gridAutoColumns:t=>({gridAutoColumns:cn(t)}),gridAutoRows:t=>({gridAutoRows:cn(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:cn(t)}),templateColumns:t=>({gridTemplateColumns:cn(t)}),autoColumns:t=>({gridAutoColumns:cn(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:cn(t)}),templateRows:t=>({gridTemplateRows:cn(t)}),autoRows:t=>({gridAutoRows:cn(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var wt={...vy,...Cy,...Ey,...Ay,...Ty,...Oy,...cc,...Ry,...Py};var Tt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationTimeline","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","interpolateSize","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","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapStop","scrollSnapType","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);D();var FP=/^-?[A-Z][0-9]?$/,NP=/^[a-z][0-9]?$/,A0=/var\(\s*(--[A-Za-z0-9-]+)/g,jP=t=>{let e=new Set,n=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:n};for(let r in t){let o=t[r];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)n.add(s)}}return{knownLetters:e,knownVars:n}},BP=(t,e)=>{if(!e.size)return[];let n=t.split(/[(),\s]+/).filter(Boolean),r=new Set;for(let o of n){if(!FP.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;e.has(s)&&r.add(o)}return[...r]},VP=(t,e)=>{if(!e.size)return[];let n=[];A0.lastIndex=0;let r;for(;r=A0.exec(t);){let o=r[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!NP.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&n.push({varName:o,corrected:a})}return n},mu=new Set,T0=(t,e,n)=>{if(!ht()||!S(e)||!e)return;let r;try{r=T()}catch{return}let{knownLetters:o,knownVars:s}=jP(r);if(!o.size&&!s.size)return;let i=BP(e,o),a=VP(e,s);if(!i.length&&!a.length)return;let c=n?.__ref?.path?n.__ref.path.join("."):n?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;mu.has(f)||(mu.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;mu.has(u)||(mu.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};D();var UP=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,zP=(t,e,n)=>{let{context:r}=n;if(!r.designSystem?.media)return;let o=t.slice(1),s=r.designSystem.media[o],i=se(e,n);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(UP),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=r.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},O0=(t,e,n)=>({[t]:se(e,n)}),lc=(t,e,n)=>{let r=`&${t}`,o=se(e,n);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=r.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[r]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[r]:o}},Dy=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return O(n)?n.call(e,e):!!n},HP=(t,e,n)=>{let r=t.slice(1),o=Dy(r,n);if(o===void 0&&(o=!!n[r]),!!o)return se(e,n)},WP=(t,e,n)=>({[t]:e}),qP=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Dy(r,n);s!==void 0&&(o=s)}if(o)return se(e,n)},KP=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Dy(r,n);s!==void 0&&(o=s)}if(!o)return se(e,n)},Iy=(t,e)=>se(t,e),Ly={"@":zP,":":lc,"[":lc,"*":lc,"+":lc,"~":lc,"&":O0,">":O0,$:HP,"-":WP,".":qP,"!":KP};var yu=Bn(),R0=(t,e,n)=>{let r=e?.context?.designSystem;r&&st(r);try{let o={},s={},i=(a,c)=>{if(n.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&S(c)){let l=P0(c,e);l&&(n.unpack?bt(o,l):o.designSystemClass=l)}else if(a==="true"){let l=ut(c,e);bt(o,Iy(l,e))}else if(e.classlist?.[a]){let l=e.classlist[a],f=O(l)?l(e,e.state,e.context):l;f&&i(a,f),!yu&&v(o[a])&&(o[a].label=a)}else if(wt[a]){let l=ut(c,e);if(l===null)continue;R(l)&&(l=l.reduce((u,d)=>bt(u,d),{}));let f=wt[a](l,e,e.state,e.context);R(f)&&(f=f.reduce((u,d)=>bt(u,d),{})),f&&i(a,f),!yu&&v(o[a])&&(o[a].label=a)}else if(Tt.has(a)){let l=ut(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),yu||T0(a,l,e),i(a,{[a]:l}),!yu&&v(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{r&&rt()}},P0=(t,e)=>{if(!S(t))return;let n=e?.context?.designSystem?.class;if(!n)return;let r;for(let o of t.split(" ")){if(!o)continue;let s=n[o];if(!v(s))continue;let i=it(s);r=r?Wt(r,i):i}if(r)return se(r,e)},D0=(t,e)=>{let n={};for(let r in t){let o=Ly[r.slice(0,1)];if(o){let s=o(r,t[r],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]&&typeof n[i]=="object"&&typeof s[i]=="object"?Wt(n[i],s[i]):n[i]=s[i])}}return n},se=(t,e,n={unpack:!0})=>{let[r,o]=R0(t,e,n),s=D0(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(n.unpack)return Si(r,s);r._selectors=s}return r},GP=(t,e)=>{let n={};if(t.class)for(let r in t.class)n[r]=t.class[r](e);return n};D();var I0=t=>{if(v(t))return se(t,t)},YP=(t,e)=>{let n=I0(t);return typeof e=="function"?e(n):ge(n)};D();D();function Fy(t,e,n){let r=t?.context?.analyze;if(!r||!r.emit||e==="warn"&&!r.shouldCapture("warnings")||e==="error"&&!r.shouldCapture("errors"))return;let o=n.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");r.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:n})}var L0=new Set;function $0(t,e,n){let r=String(e);if(L0.has(r))return;L0.add(r);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.join("."):t?.key!=null?String(t.key):"(unknown element)",i=n!=null?`resolves to a non-function (${typeof n}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${r}') at <${s}>: "${r}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;Fy(t,"error",[a]),console.error(a)}var F0=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),XP=new Set,N0=t=>F0($y,t)&&!(Eo||XP).has(t),M0=new Set;function j0(t,e){M0.has(t)||(M0.add(t),ht()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function ZP(...t){return Fy(this,"warn",t),aa.apply(this,t)}function JP(...t){return Fy(this,"error",t),Ir.apply(this,t)}var $y={update:bs,remove:xs,getDB:ua,getQuery:da,getRootData:oa,getPath:ta,nextElement:ca,previousElement:la,verbose:Fo,warn:ZP,error:JP,variables:fa,spotByPath:Qi,set(t,e){let n=this.__ref;if(n){if(n.__setLocked){n.__setQueued={content:t,options:e};return}n.__setLocked=!0}try{if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(n){n.__setLocked=!1;let r=n.__setQueued;r&&(n.__setQueued=null,this.set(r.content,r.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let n=this.parent,r=this.key,o=this.parse();return this.remove(),e(o,n,r,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 n of e.__children){let r=this[n];if(!r)continue;if(typeof t=="function"){if(t(r))return r}else if(typeof t=="string"&&r.key===t)return r;let o=r.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let n=this.__ref;if(!n?.__children)return e;for(let r of n.__children){let o=this[r];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(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:ra,getRootState:na,getRootContext:sa,getContext:ia,parse(t){let e={},n=t?new Set(t):null,r=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!n?.has(o)){if(r&&r[o]!==void 0){e[o]=r[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),n=this.__ref;if(n?.__children)for(let r of n.__children)this[r]?.parseDeep&&(e[r]=this[r].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let n of t)e[n]=this[n];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 n=t[e];if(n==null)continue;let r=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(n).replace(/\s*!important\s*$/,"");this.node.style.setProperty(r,o,"important")}},call(t,...e){let n=this.context,r=N0(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&j0(t,"el.call");let o=r?this[t]:n?.methods?.[t]||n?.functions?.[t]||n?.utils?.[t]||this[t];if(typeof o=="function"){let s=Ar;if(!s||!s(o))return o.call(this,...e);ht()&&$0(this,t,Ie(o));return}ht()&&$0(this,t,o)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let n=t.__children.indexOf("content");n!==-1&&t.__children.splice(n,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},My=new WeakMap;function QP(t){if(!t)return $y;let e=My.get(t);if(e)return e;e=Object.create($y);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return My.set(t,e),e}function ws(t){let e=QP(t.context);Object.setPrototypeOf(t,e)}function bu(t){if(!t)return!1;let e=My.get(t);if(!e)return!1;let n=t.methods;if(!n)return!1;for(let r in n){if(N0(r)&&!F0(e,r)){j0(r,"refreshContextProto");continue}e[r]=n[r]}return!0}var _u=[],xu=!1,ir=0;function wu(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function B0(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),t()},n.port2.postMessage(0);return}setTimeout(t,0)}function Ny(){return ir?wu()-ir>=50:!1}var Ss=0;function jy(){Ss===0&&!ir&&(ir=wu()),Ss++}function By(){Ss>0&&Ss--,Ss===0&&!xu&&(ir=0)}function Vy(t){_u.push(t),xu||(xu=!0,B0(V0))}function V0(){for(ir=wu();_u.length;){let t=_u.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(wu()-ir>=50)break}if(_u.length){B0(V0);return}xu=!1,ir=0,Ss=0}D();D();Rr();var qy={};$(qy,{STATE_METHODS:()=>U0,applyInitialState:()=>ku,applyStateMethods:()=>ye,callStateMethod:()=>fc,createState:()=>zy,isTracking:()=>Wy,useHostState:()=>Hy});var U0=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"]),Su=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},Be=(t,e,n,{onlyIfAbsent:r}={})=>{Su(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&Su(t,e,n)},fc=(t,e,...n)=>{if(!t)return;let r=t["$"+e];if(typeof r=="function")return r.apply(t,n);let o=t[e];if(typeof o=="function")return o.apply(t,n)},ye=(t,e)=>{if(St(e)){let o=e.__raw||e;Be(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Be(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Be(o,"setByPath",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}),Be(o,"getByPath",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}),Be(o,"removeByPath",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}),Be(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Be(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Be(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Be(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&St(a.parent);)a=a.parent;return fc(a,"update",s,i)}),Be(o,"parentUpdate",function(s,i={}){if(e.parent)return fc(e.parent,"update",s,i)}),Be(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=St(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,St(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let n=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},r={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;n();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return n(),e}};for(let o in r)if(Su(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){dl(o,"");continue}Su(e,o,r[o])}};var zy=function(t,e,n){return t.state=ku(t,e,n),t.state},ku=function(t,e,n){let{__ref:r}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return ye(t,s),s}if(typeof o=="string")return r&&(r.__state=o),r.__stateType="string",t2(o,t,e);if(typeof o=="number"||typeof o=="boolean"){r&&(r.__state=o,r.__stateType=typeof o,r.__hasRootState=!0);let s=fn({value:o});return s.__element=t,e?.state&&(s.parent=e.state),ye(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!St(o)){r&&(r.__hasRootState=!0),o.isRootState&&r&&(r.__hasRootState=!0);let s=fn({...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)),ye(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,n),s}return St(o)?(o.__element=t,o):e?.state||{}};function Uy(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function t2(t,e,n){if(!n?.state)return{};if(t===".")return n.state;if(t.startsWith("../")){let o=t.slice(3),s=n.state?.parent;return o&&s?Uy(s,o):s??n.state??{}}if(t.startsWith("~/")){let o=n.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?Uy(o,s):o??{}}let r=Uy(n.state,t);if(r&&typeof r=="object"&&!St(r)&&!Object.getOwnPropertyDescriptor(r,"root")){let o=n.state?.root||n.state;Object.defineProperty(r,"root",{get:()=>o,enumerable:!1,configurable:!0})}return r}var Hy=(t,e)=>{if(!t)return H0;let n=n2(t,e);return!n||!n.state?H0:o2(n.state)},Wy=()=>Ln()!=null,e2=128;function n2(t,e){let n=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,r=t,o=null;for(let s=0;s<e2&&r;s++){if(n(r)&&r.state)return r;if(r.state&&!o&&(o=r),!r.parent||r.parent===r)break;r=r.parent}return o}var r2={get(t,e){return t[e]}},z0=new WeakMap,o2=t=>{let e=z0.get(t);return e||(e=new Proxy(t,r2),z0.set(t,e)),e},H0=new Proxy(Object.create(null),{get(){},has(){return!1}});var vu="3.14.795";var W0="__SMBLS_ELEMENT_ID_ENGINE__",q0=(t,e,n)=>{let r=e||vu,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[W0];return s&&s.engine&&s.version===r?s.engine:(s||(o[W0]={version:r,engine:t}),t)};var W=(t,e)=>e.split(" ").map(n=>t+"-"+n),Ky="top right bottom left",Gy=Ky+" block block-start block-end inline inline-start inline-end",ar="start end",to="width style color",Cu=t=>W(t,Gy),s2=(()=>{let t=W("border","width style color image");for(let e of Gy.split(" "))t.push("border-"+e,...W("border-"+e,to));return t})(),K0=t=>[...W("border-"+t,to+" start end"),...W("border-"+t+"-start",to),...W("border-"+t+"-end",to)],Cn={animation:W("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:W("background","image position position-x position-y size repeat origin clip attachment color"),border:s2};for(let t of["width","style","color"])Cn["border-"+t]=Gy.split(" ").map(e=>"border-"+e+"-"+t);for(let t of Ky.split(" "))Cn["border-"+t]=W("border-"+t,to);Cn["border-block"]=K0("block");Cn["border-inline"]=K0("inline");Object.assign(Cn,{"border-image":W("border-image","source slice width outset repeat"),"border-radius":"top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" ").map(t=>"border-"+t+"-radius"),columns:W("column","width count"),"column-rule":W("column-rule",to),container:W("container","name type"),"contain-intrinsic-size":W("contain-intrinsic","width height"),flex:W("flex","grow shrink basis"),"flex-flow":W("flex","direction wrap"),font:[...W("font","style variant weight stretch size"),"line-height",...W("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:W("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":W("grid-template","rows columns areas"),"grid-area":W("grid","row column row-start row-end column-start column-end"),"grid-row":W("grid-row",ar),"grid-column":W("grid-column",ar),inset:[...Ky.split(" "),...W("inset","block block-start block-end inline inline-start inline-end")],"inset-block":W("inset-block",ar),"inset-inline":W("inset-inline",ar),"list-style":W("list-style","type position image"),margin:Cu("margin"),"margin-block":W("margin-block",ar),"margin-inline":W("margin-inline",ar),mask:W("mask","image mode repeat position clip origin size composite"),offset:W("offset","position path distance rotate anchor"),outline:W("outline",to),overflow:W("overflow","x y"),"overscroll-behavior":W("overscroll-behavior","x y"),padding:Cu("padding"),"padding-block":W("padding-block",ar),"padding-inline":W("padding-inline",ar)});for(let t of["content","items","self"])Cn["place-"+t]=["align-"+t,"justify-"+t];Object.assign(Cn,{"scroll-margin":Cu("scroll-margin"),"scroll-padding":Cu("scroll-padding"),"text-decoration":W("text-decoration","line style color thickness"),"text-emphasis":W("text-emphasis","style color"),transition:W("transition","property duration timing-function delay behavior")});var uc={};for(let t in Cn)for(let e of Cn[t])(uc[e]||(uc[e]=[])).push(t);var i2=new Set(["rows","cols","wrap"]),Eu=(t,e)=>i2.has(e)&&Oe(t,e),ks=(t,e)=>!!(wt[e]||Tt&&Tt.has(e))&&!Eu(t,e);var fk=q0({uniqId:1,scopedStyleId:0},vu),pc=[],eo=new Set,ob=!1,uk=0,vs=null,mc=null;function Cs(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function dk(){return typeof document<"u"&&document.visibilityState==="hidden"}var a2=250,c2=1e3;function l2(){return mc&&(mc!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||dk())?!0:Cs()-uk>=c2}function f2(){if(ob=!0,uk=Cs(),mc=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(gc,0);vs=t?()=>t(e):null;return}if(dk()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(gc,a2);vs=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;mc=requestAnimationFrame;let e=requestAnimationFrame(gc);vs=t?()=>t(e):null}}function Lu(){if(ob){if(!l2())return;let t=vs;if(vs=null,t)try{t()}catch{}}f2()}var pk=300,hk=15e4;function gc(){if(ob=!1,vs=null,mc=null,eo.size&&N2(),!pc.length)return;let t=pc.splice(0,pc.length);for(let e=0;e<t.length;e++){let n=t[e];if(n.node){if(!n.node.isConnected){let r=n.__ref||(n.__ref={});r.__mountAttempts=(r.__mountAttempts||0)+1,r.__mountFirstAttemptAt==null&&(r.__mountFirstAttemptAt=Cs());let o=Cs()-r.__mountFirstAttemptAt;r.__mountAttempts<=pk&&o<hk?(pc.push(n),Lu()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}ie("Mounted",n,n.__ref?.__mountOptions||{})}}}function Jy(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&yc(t,!0),typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,pc.push(t),Lu())}function G0(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Pt("contentUpdate",t,e);let n=t.context?.designSystem;n&&st(n);try{t.onContentUpdate(t,t.state,t.context,e)}catch(r){if(t.context?.plugins?.length&&Pt("error",t,{hook:"onContentUpdate",error:r})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',r),t.context?.strictMode)throw r}finally{n&&rt()}}function En(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function u2(t){return t.charAt(2).toLowerCase()+t.slice(3)}function d2(t){return t.toLowerCase()}function Qy(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function hc(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=hc(o,s):n[r]=s}return n}function Ru(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function gk(t,e,n){return Ru(t)||(e&&typeof e=="object"?Ru(e.key):void 0)||String(n)}function re(t,e,n,r={},o){let s=Ln();if(s){$n(null);try{return re(t,e,n,r,o)}finally{$n(s)}}if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=Ru(n);let i=Ru(t.key),a=Object.create(null);a.key=n||i||`_${fk.uniqId++}`,a.parent=e||null,a.context=t.context||e?.context||r.context||{},a.context.__create||(a.context.__create=re);let c=a.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||a,path:e?.__ref?.path?[...e.__ref.path,a.key]:[a.key],origin:t};if(n&&!t.extends&&!t.extend){let y=n.indexOf("_"),x=n.indexOf("."),b=y>0?y:-1;if(x>0&&(b<0||x<b)&&(b=x),b>0){let _=n.substring(0,b),w=a.context?.components;w&&(w[_]||w["smbls."+_])?t={...t,extends:_}:w&&ht()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${_}" but neither "${_}" nor "smbls.${_}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}ys(a,t,r);let l=new Set(["childProps","attr","style","scope","data"]),f=a.props&&typeof a.props=="object"?a.props:null;for(let y in t){if(y==="parent"||y==="node"||y==="__ref"||y==="extends"||y==="context"||y==="props")continue;if(y==="key"){i&&(a.key=i);continue}let x=t[y],b=a[y],_=b&&x&&typeof b=="object"&&typeof x=="object"&&!Array.isArray(b)&&!Array.isArray(x)&&typeof b!="function"&&typeof x!="function";_&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?a[y]=hc(b,x):_&&l.has(y)?a[y]={...b,...x}:_&&Qy(y)?a[y]=hc(b,x):a[y]=x}function u(y){for(let x in y){let b=y[x],_=a[x],w=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";w&&x.charCodeAt(0)>=65&&x.charCodeAt(0)<=90?a[x]=hc(_,b):w&&l.has(x)?a[x]={..._,...b}:w&&Qy(x)?a[x]=hc(_,b):a[x]=b}}f&&u(f),t.props&&typeof t.props=="object"&&u(t.props),t.classlist!==void 0&&(a.classlist=t.classlist),t.text!==void 0&&(a.text=t.text),t.html!==void 0&&(a.html=t.html);let d=a.scope&&typeof a.scope=="object"?a.scope:null,h=e?.scope,p=a.context&&typeof a.context.globalScope=="object"&&a.context.globalScope||null,g=h||p||null;if(t.scope!==void 0||d){let y={};d&&Object.assign(y,d),t.scope!==void 0&&Object.assign(y,t.scope),a.scope=ul(y,g)}else g&&(a.scope=g);if(t.if!==void 0&&(a.if=t.if),ws(a),p2(a,e,t),a.if!=null){let y;if(typeof a.if=="function")try{y=a.if(a,a.state,a.context)}catch(x){if(y=!1,c.__ifError=x,typeof console<"u"&&console.warn){let b=a.key||a.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,x?.message||x)}}else y=a.if;c.__if=!!y}if(c.__if)typeof a.if=="function"&&(c.__ifInitialized=!0);else return e&&(e[a.key]=a),typeof a.if=="function"&&bk(a,c,a.if),a;a.tag||(a.tag=nr(a)),ie("Init",a,r);let m=a.node=rr(a);if(!m)return a;if(a.tag==="fragment"){let x=(a.context?.document||globalThis.document).createComment("");m.appendChild(x),c.__fragmentAnchor=x}ie("AttachNode",a,r),m.setAttribute&&a.key&&m.setAttribute("data-key",a.key),e&&(e[a.key]=a,e.__ref?.__children&&(e.__ref.__children.includes(a.key)||e.__ref.__children.push(a.key))),m.setAttribute&&a.context?.scopeSelector&&a.context.scopeSelector!==":root"&&a.context.key&&a.key===a.context.key&&m.setAttribute("data-smbls-app",a.context.key),a.id&&m.setAttribute&&(m.id=a.id),Tk(a,r),yk(a),tb(a),Ck(a),Ek(a),U2(a);try{Ok(a,r)}catch(y){if(typeof console<"u"&&console.error){let x=a.__ref?.path?.join(".")||a.key||"<root>";console.error(`[smbls] createChildren failed at ${x}:`,y?.message||y,y?.stack?`
52
+ Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function s0(){try{let t=T(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function YS(t){ru||ee.variable>0||ee.atomic>0||i0(Math.max(t,s0()))}function fy(t){let e=t&&(t.CSS_VARS||t.cssVars);return i0(e?Object.keys(e).length:s0())}function i0(t){let e=su();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!iu())return{ok:!0,reason:"no-sheet",stats:e,varCount:t};if(e.variable>0||e.atomic>0)return{ok:!0,reason:null,stats:e,varCount:t};let n=e.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return UR(n,t),{ok:!1,reason:n,stats:e,varCount:t}}var zR={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 Zr(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function ou(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e.toString(36)}function HR(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():ou(e)}var WR={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"};function cs(t,e){let n=WR[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function oy(t){let e="";for(let n in t){let r=t[n];if(typeof r!="object"||r===null)continue;let o="";for(let s in r){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;o+=cs(i?s:Zr(s),r[s])}e+=`${n}{${o}}`}return e}var qR="@media (hover: hover)",KR=/(?:^|[^\\]):hover(?![\w-])/;function uy(){try{let t=T();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Sn(t,e,n){return n===!1||!KR.test(e)||n===void 0&&!uy()?t:`${qR}{${t}}`}function XS(t,e,n){let r=(n?n+"":"")+t+":"+e,o=ls.get(r),s=o?null:Zr(t);if(!o){let c=zR[t]||ou(t),l=HR(e);o=n?`_${n}_${c}-${l}`:`_${c}-${l}`,ls.set(r,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||Zr(t),a=`.${o}{${cs(i,e)}}`;return je(a,void 0,"atomic"),o}var ZS=new WeakMap,JS=new WeakMap;function je(t,e,n){let r=iu(e,GR(t));if(!r)return ee.dropped++,"dropped";let o=ZS.get(r);if(o||(o=new Set,ZS.set(r,o)),o.has(t))return ee.duplicate++,ee[n||"global"]++,"duplicate";let s=JS.get(r);if(s&&s.has(t))return ee.invalid++,"invalid";try{r.insertRule(t,r.cssRules.length)}catch{return s||(s=new Set,JS.set(r,s)),s.add(t),ee.invalid++,"invalid"}return o.add(t),ee[n||"global"]++,"inserted"}var Be="0:0",QS="1:0",t0=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function GR(t){if(typeof t!="string"||!t)return Be;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return Be;let e=1/0,n=-1/0;t0.lastIndex=0;let r;for(;r=t0.exec(t);){let o=parseFloat(r[2])*(r[3]==="em"||r[3]==="rem"?16:1);r[1]==="max"?e=Math.min(e,o):n=Math.max(n,o)}return e!==1/0?"2:"+-e:n!==-1/0?"3:"+n:QS}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?Be:QS}var e0=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},YR=(t,e)=>{let[n,r]=e0(t),[o,s]=e0(e);return n!==o?n<o:r<s},XR=t=>t.getAttribute("data-tier")||Be,n0=new WeakMap;function iu(t,e){let n=t||Jr();if(!n||!n.head)return null;let r=e||Be,o=n0.get(n);o||(o=new Map,n0.set(n,o));let s=o.get(r);if(s&&s.ownerNode&&s.ownerNode.parentNode===n.head)return s;r!==Be&&iu(n,Be);let i=r===Be?n.head.querySelector("style[data-smbls]:not([data-tier])"):n.head.querySelector(`style[data-smbls][data-tier="${r}"]`);if(!i){i=n.createElement("style"),i.setAttribute("data-smbls",""),r!==Be&&i.setAttribute("data-tier",r);let c=n.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(YR(r,XR(c[u]))){l=c[u];break}let f=c.length?c[c.length-1]:null;l?n.head.insertBefore(i,l):f?n.head.insertBefore(i,f.nextSibling):n.head.appendChild(i)}let a=i.sheet;return o.set(r,a),r===Be&&(o0=a),a}function ZR(t){let e=t||Jr();if(!e||!e.head)return[];let n=[],r=e.head.querySelectorAll("style[data-smbls]");for(let o=0;o<r.length;o++)r[o].sheet&&n.push(r[o].sheet);return n}var JR=8;function ge(t,e,n,r){if(!t||typeof t!="object")return"";let o=!!(r&&r.state),s=null,i=0,a=[],c=[],l=Object.keys(t);for(let u=0;u<l.length;u++){let d=l[u],h=t[d];h==null||h===!1||h===""||(typeof h=="object"?c.push([d,h]):ry?(s||(s=[]),s.push(d,String(h)),i++):a.push(XS(d,String(h),n)))}if(s&&i>=JR){let u=s.join("\0"),d=ry(u),h=d.indexOf("\0"),p=d.substring(0,h),g=d.substring(h+1);if(g){let m=g.split(`
53
+ `);for(let y=0;y<m.length;y++)m[y]&&je(m[y],void 0,"atomic")}a.push(p)}else if(s)for(let u=0;u<s.length;u+=2)a.push(XS(s[u],s[u+1],n));let f=[];for(let u=0;u<c.length;u++)f.push(nP(c[u][0],c[u][1],n,o));return a.concat(f).join(" ").trim()}var r0=new Map,QR=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function oc(t){return/^@(media|supports|container)\b/.test(t)}function tP(t){return typeof t!="string"||!t||oc(t)?!1:t.split(",").every(e=>QR.test(e.trim()))}var a0=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},sy=32,iy=1024,ay=!1;function eu(t,e,n){if(ay)return;ay=!0;let r=[e,...n],o=r.length>12?[...r.slice(0,6),`\u2026${r.length-9} more\u2026`,...r.slice(-3)]:r;console.warn(`[@symbo.ls/css] ${t} at ${o.join(" > ")} \u2014 skipped. A style block may hold only CSS values and nested plain blocks; the rest of this rule is still emitted. (One warning per page.)`)}function eP(t){try{return JSON.stringify(t)}catch{let n=[],r=0;return JSON.stringify(t,function(o,s){if(!s||typeof s!="object")return s;for(;n.length&&n[n.length-1]!==this;)n.pop();if(!(n.length&&(n.includes(s)||!a0(s)||n.length>sy||++r>iy)))return n.push(s),s})}}function nP(t,e,n,r){let o=eP(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&uy(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=ls.get(a);if(c){let w=r0.get(c);if(w)for(let S=0;S<w.length;S++)je(w[S],void 0,"atomic");return c}c=n?`_${n}_c${ou(a)}`:`_c${ou(a)}`;let l=r?`.${c}.${c}`:`.${c}`,f=tP(t)?`${l}.${c}`:l,u="",d=[],h=w=>typeof w=="string"&&(w.indexOf("{")!==-1||w.indexOf("}")!==-1),p=new Set,g=0,m=(w,S)=>{p.add(S);let A="",P=Object.keys(S);for(let L=0;L<P.length;L++){let E=P[L],M=S[E];if(M!=null)if(typeof M=="object"){let X=[...w,E];p.has(M)?eu("a style value that loops back to one of its own ancestors",t,X):a0(M)?X.length>sy?eu(`a style block nested more than ${sy} levels deep`,t,X):++g>iy?eu(`a style object with more than ${iy} nested blocks`,t,X):m(X,M):eu(`a ${Object.prototype.toString.call(M).slice(8,-1)} (not a style block)`,t,X)}else{if(h(M))continue;A+=cs(Zr(E),M)}}p.delete(S),A&&(w.length===0?u+=A:d.push({chain:w,body:A}))};m([],e);let y=w=>w.startsWith(":")||w.startsWith("["),x=(w,S=!0)=>{let A=S&&w.length===1?f:l;if(!w.length)return A;let P=w[0].split(",").map(L=>L.trim()).map(L=>L.includes("&")?L.replace(/&/g,A):y(L)?`${A}${L}`:`${A} ${L}`);for(let L=1;L<w.length;L++){let E=w[L].split(",").map(X=>X.trim()),M=[];for(let X of P)for(let vt of E)vt.includes("&")?M.push(vt.replace(/&/g,X)):y(vt)?M.push(X+vt):M.push(X+" "+vt);P=M}return P.join(", ")},b=[],_=(w,S)=>{let A=w.filter(oc),P=x(w.filter(E=>!oc(E)),A.length===0),L=`${P}{${S}}`;for(let E=A.length-1;E>=0;E--)L=`${A[E]}{${L}}`;L=Sn(L,P,i),b.push(L),je(L,void 0,"atomic")};u&&_([t],u);for(let w of d)_([t,...w.chain],w.body);return r0.set(c,b),ls.set(a,c),c}function xt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(iu(),typeof t=="string"){let s=t.indexOf("--")!==-1;je(t,void 0,s?"variable":"global"),s&&YS(1);return}let e=uy(),n=0,r=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};r.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of r){let i=t[s];if(s.startsWith("@keyframes")){let a=oy(i);a&&je(`${s}{${a}}`,void 0,"keyframes");continue}if(oc(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=oy(c);l&&je(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:Zr(u);l+=cs(h,c[u])}n+=f,je(Sn(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&n++;let f=l?a:Zr(a);je(`${s}{${cs(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let h=d?f:Zr(f);a+=cs(h,u)}}if(n+=l,a&&je(Sn(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(oc(d)?f.push(d):u.push(d));f.sort((d,h)=>{let p=g=>{let m=g.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return p(h)-p(d)});for(let d of u)xt({[`${s} ${d}`]:i[d]});for(let d of f)xt({[d]:{[s]:i[d]}})}}}n>0&&YS(n)}function fs(t,e){return je(`@keyframes ${t}{${oy(e)}}`,void 0,"keyframes"),t}function c0(){ls.clear(),o0=null,ay=!1}function dy(){return ls.size}D();var lb={};$(lb,{DELEGATED_EVENTS:()=>gs,LIFECYCLE_EVENTS:()=>or,MIXINS:()=>au,NON_BUBBLING_EVENTS:()=>cu,REGISTRY:()=>Ut,SVG_TAGS:()=>ps,addDelegatedEvent:()=>ic,addMethods:()=>ws,applyExtends:()=>ys,cacheNode:()=>rr,create:()=>re,createHTMLNode:()=>ds,detectTag:()=>nr,dispose:()=>vn,flushMounts:()=>gc,globalEventKeyInfo:()=>lu,isSvgTag:()=>hs,isValidTag:()=>us,refreshContextProto:()=>bu,registerEvent:()=>ms,registerGlobalEvent:()=>fu,remove:()=>xs,removeDelegatedEvent:()=>ac,update:()=>bs});var hy="http://www.w3.org/2000/svg",ps=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"]),rP=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 us(t){return rP.has(t)||ps.has(t)}function hs(t){return ps.has(t)}function nr(t){let{tag:e,key:n}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(s){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${n||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=n),typeof e=="string"&&us(e))return e;if(!n||typeof n!="string")return"div";let r=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=n.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),us(o)&&!r.has(o)?o:"div"}var l0={};function ds(t,e){let n=e?.context?.document||globalThis.document;if(!n)return null;if(t==="string")return n.createTextNode(e?.text||"");if(t==="fragment")return n.createDocumentFragment();if(hs(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===hy)return n.createElementNS(hy,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function rr(t){let e=t.tag=nr(t),r=hs(e)&&(e==="svg"||t.parent?.node?.namespaceURI===hy)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=l0[r];if(s||(s=l0[r]=ds(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?ds(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Ut=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","srcObject","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]),au={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},or=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),cu=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"]),gy=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),gs=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 yy=new WeakMap,oP={passive:!0},sP={passive:!0,capture:!0},by=(t,e)=>gy.has(t)?e?sP:oP:e||!1;function d0(t){let e=yy.get(t);return e||(e={handlers:new Map,installed:new Set},yy.set(t,e)),e}function iP(t,e){let n=d0(e);if(n.installed.has(t))return;n.installed.add(t);let r=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";e.addEventListener(t,s=>{if(o){let a=s.target,c=n.handlers.get(t),l=c&&a?c.get(a):null;if(!l||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;l(s);return}let i=s.target;for(;i&&i!==e;){let a=n.handlers.get(t);if(a){let c=a.get(i);if(c&&(c(s),s.cancelBubble))return}i=i.parentNode}},by(t,r))}function ic(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=d0(r);iP(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function ac(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=yy.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function f0(t){return gs.has(t)&&!or.has(t)}function p0(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&st(r);try{let s=e.call(t,o,t,t.state,n);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{r&&rt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&rt()}}function ms(t,e,n){let{node:r,context:o}=e;if(!r)return;let s=p0(e,n),i=cu.has(t);if(!i&&f0(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;ic(t,r,s,a)}else r.addEventListener(t,s,by(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&f0(t)){let a=o?.rootNode||r.ownerDocument?.documentElement;ac(t,r,a)}else r.removeEventListener(t,s,by(t,!1))})}var my=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function lu(t){if(typeof t!="string")return null;for(let e=0;e<my.length;e++){let n=my[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:my[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}var aP=/^[A-Za-z_$][\w$]*$/;function cP(t,e,n){let r=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(r=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof r=="string"&&aP.test(r)){let c=r;r=function(f){return t.call(c,f)}}return typeof r!="function"?null:(s===void 0&&(s=gy.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function lP(t,e,n){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=n&&n.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}function fP(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function uP(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function dP(t){let e=t.node;if(!e)return!1;let n=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return n?n.isConnected!==!1:!1}function fu(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)u0(t,e,n[o]);return}u0(t,e,n)}}function u0(t,e,n){let r=e.__ref,o=cP(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=lP(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(r.__globalEvents&&r.__globalEvents.has(i))return;let a=p0(e,o.handler),c=f=>{dP(e)&&a(f)},l={capture:o.capture,passive:o.passive,once:o.once};fP(s,t.eventName,c,l)&&(r.__globalEvents||(r.__globalEvents=new Map),r.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{uP(s,t.eventName,c,l),r.__globalEvents&&r.__globalEvents.delete(i)}))}function h0(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 ys(t,e,n){let r=h0(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=g0(r[i],s);a&&a!==e&&m0(t,a,n,new Set([e]))}}function g0(t,e){if(typeof t=="string"){if(t.includes(">")){let n=t.split(">").map(o=>o.trim()),r=e[n[0]]||e[`smbls.${n[0]}`];for(let o=1;o<n.length&&r;o++)r=r[n[o]];return r||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function m0(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=h0(e);if(o.length){let i=(t.context||n?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=g0(o[a],i);c&&m0(t,c,n,r)}}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]=y0(t[s],i):t[s]=i}}function y0(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=y0(o,s):n[r]=s}return n}Rr();D();var pP=["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"],uu={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"]},_0=["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"],sn=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()):x0(t),hP=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),x0=t=>hP.has(t)?t.toLowerCase():null,gP=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),an=t=>typeof t=="string"&&(gP.has(t)||t.startsWith("aria-")),ne=(t,e)=>e!==!0&&e!==!1?e:an(t)?e?"true":"false":e===!0?"":e,Oe=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||sn(e)||uu.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(uu,t)?uu[t].includes(e):!1,xy=t=>{if(!k(t))return!1;let e=t.toLowerCase();return _0.includes(e)},mP=(t,e,n)=>{let r={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n&&o in n)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])Rt(e[o][a])&&(r["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(Rt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());r["data-"+c]=e[o][a]}continue}let s=Oe(t,o),i=xy(o);if(Rt(e[o])&&(s||i)){let a=sn(o)||o;r[a]=e[o]}}return r},yP=(t,e)=>{let n={};if(t.attr)for(let r in t.attr)n[r]=t.attr[r](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let r in t.aria){let o=t.aria[r];typeof o=="function"&&(n["aria-"+r]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];if(typeof o=="function"){let s=r.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());n["data-"+s]=o(e,e.state,e.context)}}return n},sr=(t,e)=>{let n=t.call("exec",e,t);if(n)return k(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},_y=(t,e)=>{let n=(t.preSrc||"")+(sr(t,e)||"");if(!n)return;try{return new URL(n),n}catch{}let{context:r}=t;if(!r.files&&!r.assets)return n;if(n.startsWith("/assets/")){let o=n.slice(8),s=r.assets&&(r.assets[n]||r.assets[o]);return s&&s.content?s.content.src:n}if(n.startsWith("/files/")){let o=n.slice(7),s=r.files&&(r.files[n]||r.files[o]);return s&&s.content?s.content.src:n}if(r.assets){let o=r.assets[n];if(o&&o.content)return o.content.src}if(r.files){let o=r.files[n];if(o&&o.content)return o.content.src}return n},Qr={src:t=>_y(t,t.src),href:t=>sr(t,t.href),action:t=>sr(t,t.action),poster:t=>_y(t,t.poster),data:t=>sr(t,t.data)},wy=t=>{let e=t.tag||"div",n={};for(let r in Qr)if(t[r]!==void 0&&Oe(e,r)){let o=Qr[r](t);o!==void 0&&(n[r]=o)}return n},b0=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return O(n)?n.call(e,e):!!n},bP=(t,e,n)=>{if(t==="$"){let o=b0(e,n);return o===void 0&&(o=!!n[e]),o}let r=n[e]===!0||n.state[e];if(!r){let o=b0(e,n);o!==void 0&&(r=o)}return t==="."?!!r:!r},_P=new Set(["$",".","!"]),xP=(t,e,n)=>{let r={},o=(s,i,a,c)=>{let l=i;r[s]=f=>{if(bP(a,c,f))return O(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!_P.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(n&&l in n)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let h in a[l])o("aria-"+h,a[l][h],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let h in a[l]){let p=h.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+p,a[l][h],i,c)}continue}let f=Oe(e,l),u=xy(l);if(!f&&!u)continue;let d=sn(l)||l;o(d,a[l],i,c)}}return r};function bs(t={},e={}){let n=this,r=n.__ref;if(!r)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof n.onBeforeUpdate=="function"&&Sy(r))try{let i=n.onBeforeUpdate(n,n.state,n.context,e);if(i&&typeof i.then=="function")i.then(()=>kn(r,!1),a=>{kn(r,!0),n.context?.plugins?.length&&Pt("error",n,{hook:"onBeforeUpdate",error:a})||console.error("[DOMQL] onBeforeUpdate error:",a)});else if(kn(r,!1),i===!1)return n}catch(i){throw kn(r,!0),i}let o=!t||Object.keys(t).length===0,s=[];fl(()=>{if(t.state&&St(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&_s(n,t.text??"")),t.html!==void 0&&(n.html=t.html,!r.__exec.html&&n.node&&(n.node.innerHTML=t.html)),t.style&&n.node?.style){if(!r.__exec.style)for(let i in t.style){let a=t.style[i];if(a==null)continue;let c=i.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=String(a).replace(/\s*!important\s*$/,"");n.node.style.setProperty(c,l,"important")}n.style||(n.style={}),Object.assign(n.style,t.style)}if(t.attr&&n.node?.setAttribute){for(let i in t.attr){let a=t.attr[i];a==null||a===!1&&!an(i)?n.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&n.node.setAttribute(i,ne(i,a))}n.attr||(n.attr={}),Object.assign(n.attr,t.attr)}if(t.data&&n.node?.dataset){for(let i in t.data)n.node.dataset[i]=t.data[i];n.data||(n.data={}),Object.assign(n.data,t.data)}for(let i in t){if(Ut.has(i)||i==="state")continue;let a=t[i],c=n[i];if(c&&c.__ref&&typeof c.update=="function")c.update(a,e);else if(typeof a=="object"&&a!==null){let l=i.charCodeAt(0);l>=65&&l<=90&&re(a,n,i,e)}else i!=="text"&&i!=="html"&&i!=="style"&&i!=="attr"&&i!=="data"&&(n[i]=a,typeof a!="function"&&s.push(i))}});for(let i=0;i<s.length;i++)k0(n,s[i]);if(n.node){for(let i=0;i<s.length;i++)if(w0(s[i])){S0(n);break}}if(n.node&&o&&r.__effects&&r.__effects.length)for(let i=0;i<r.__effects.length;i++){let a=r.__effects[i];a&&!a._disposed&&!a._isSubscribeToEffect&&typeof a._execute=="function"&&a._execute()}else if(n.node&&r.__conditionalRunners)for(let i of r.__conditionalRunners)i();return Pt("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}function vn(t){if(!t)return;let e=t.__ref;if(!e)return;let n=In();if(n){$n(null);try{return vn(t)}finally{$n(n)}}e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(typeof e.__releaseMedia=="function"&&(e.__releaseMedia(),e.__releaseMedia=null),e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&vn(i)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function xs(){vn(this)}D();D();D();var wP=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],SP=["none","forwards","backwards","both"],kP=["normal","reverse","alternate","alternate-reverse"],vP=["running","paused"],CP=t=>/^[\d.]+m?s$/.test(t),EP=/^(?:translate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|scale(?:3d|x|y|z)?\((?:\s*1(?:\.0+)?\s*,?)+\)|rotate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|skew(?:x|y)?\((?:\s*0[a-z%]*\s*,?)+\)|matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\))$/,AP=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let n=e.match(/[a-z0-9]+\([^()]*\)/g);return!n||n.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:n.every(r=>EP.test(r.replace(/\s+/g,"")))},v0=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),TP={transform:AP,translate:v0,rotate:t=>v0(t)||/^\s*(?:[xyz]\s+)?0(?:deg|rad|turn|grad)?\s*$/.test(String(t).toLowerCase()),scale:t=>/^(none|initial|unset)$/.test(String(t).trim().toLowerCase())||/^(?:\s*1(?:\.0+)?)+\s*$/.test(String(t)),opacity:t=>/^(initial|unset)$/.test(String(t).trim().toLowerCase())||Number(t)===1},OP=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let n=e.match(/^(\d+(?:\.\d+)?)%$/);return n?Number(n[1]):null},RP=t=>{if(!v(t))return null;let e=null,n=-1;for(let r in t){let o=OP(r);o==null||!v(t[r])||o>=n&&(n=o,e=t[r])}return e},PP=t=>{let e=RP(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=TP[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},DP=(t,e)=>{if(v(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return v(r)?r:null},LP=["reverse","alternate","alternate-reverse"],C0=(t,e,n)=>{let r=n||e.animationDirection;return r&&LP.includes(String(r))?"both":PP(DP(t,e))?"backwards":"both"},IP=0,E0=new Map,ky=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(v(t)){let o=JSON.stringify(t),s=E0.get(o);if(s)return s;let i=`smbls-anim-${IP++}`,a=fs(i,t);return E0.set(o,a),a}let r=n&&n[t];return v(r)?fs(t,r):t},$P=t=>{let e=[],n=0,r="";for(let o of String(t).trim())o==="("?n++:o===")"&&n>0&&n--,n===0&&/\s/.test(o)?(r&&e.push(r),r=""):r+=o;return r&&e.push(r),e},MP=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},r=$P(t),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of r)n&&n[u]?o=u:CP(u)?s.push(u):wP.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")||u.startsWith("linear(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):kP.includes(u)?c=u:SP.includes(u)?l=u:vP.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},vy={animation:(t,e)=>{if(t!=null){if(k(t)&&t.includes(" ")){let n=MP(t,e);return{animationName:ky(n.name||t,e),animationDuration:n.durations[0]||he(e.animationDuration||"A").timing,animationDelay:n.durations[1]||he(e.animationDelay||"0s").timing,animationTimingFunction:n.timingFunction||Te(e.animationTimingFunction||"ease"),animationFillMode:n.fillMode||e.animationFillMode||C0(n.name||t,e,n.direction),animationIterationCount:n.iterationCount!=null?n.iterationCount:e.animationIterationCount||1,animationPlayState:n.playState||e.animationPlayState,animationDirection:n.direction||e.animationDirection}}return{animationName:ky(t,e),animationDuration:he(e.animationDuration||"A").timing,animationDelay:he(e.animationDelay||"0s").timing,animationTimingFunction:Te(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||C0(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:ky(t,e)}),animationDuration:t=>({animationDuration:he(t).timing}),animationDelay:t=>({animationDelay:he(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Te(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};D();var du=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!k(e))return;let[r,o]=dt(e);return{...I(t+"Start",r,n),...I(t+"End",o||r,n)}},Cy={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>I("height",t,e),width:(t,e)=>I("width",t,e),boxSizing:t=>Dt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!k(t))return;let[e,n]=dt(t);return{...kt("height",e),...kt("width",n||e)}},inlineSize:(t,e)=>I("inlineSize",t,e),blockSize:(t,e)=>I("blockSize",t,e),minWidth:(t,e)=>I("minWidth",t,e),maxWidth:(t,e)=>I("maxWidth",t,e),widthRange:t=>{if(!k(t))return;let[e,n]=dt(t);return{...kt("minWidth",e),...kt("maxWidth",n||e)}},minHeight:(t,e)=>I("minHeight",t,e),maxHeight:(t,e)=>I("maxHeight",t,e),heightRange:t=>{if(!k(t))return;let[e,n]=dt(t);return{...kt("minHeight",e),...kt("maxHeight",n||e)}},size:t=>{if(!k(t))return;let[e,n]=dt(t);return{...I("inlineSize",e),...I("blockSize",n||e)}},minBlockSize:(t,e)=>I("minBlockSize",t,e),minInlineSize:(t,e)=>I("minInlineSize",t,e),maxBlockSize:(t,e)=>I("maxBlockSize",t,e),maxInlineSize:(t,e)=>I("maxInlineSize",t,e),minSize:t=>{if(!k(t))return;let[e,n]=dt(t);return{...kt("minInlineSize",e),...kt("minBlockSize",n||e)}},maxSize:t=>{if(!k(t))return;let[e,n]=dt(t);return{...kt("maxInlineSize",e),...kt("maxBlockSize",n||e)}},borderWidth:(t,e)=>I("borderWidth",t,e),borderTopWidth:(t,e)=>I("borderTopWidth",t,e),borderRightWidth:(t,e)=>I("borderRightWidth",t,e),borderBottomWidth:(t,e)=>I("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>I("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>I("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>I("textUnderlineOffset",t,e),padding:(t,e)=>I("padding",t,e),paddingInline:t=>{if(!k(t))return;let[e,n]=dt(t);return{...kt("paddingInlineStart",e),...kt("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!k(t))return;let[e,n]=dt(t);return{...kt("paddingBlockStart",e),...kt("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>I("paddingBlockStart",t,e),paddingBottom:(t,e)=>I("paddingBlockEnd",t,e),paddingLeft:(t,e)=>I("paddingInlineStart",t,e),paddingRight:(t,e)=>I("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>I("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>I("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>I("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>I("paddingInlineEnd",t,e),margin:(t,e)=>I("margin",t,e),marginInline:t=>{if(!k(t))return;let[e,n]=dt(t);return{...kt("marginInlineStart",e),...kt("marginInlineEnd",n||e)}},marginBlock:t=>{if(!k(t))return;let[e,n]=dt(t);return{...kt("marginBlockStart",e),...kt("marginBlockEnd",n||e)}},marginTop:(t,e)=>I("marginBlockStart",t,e),marginBottom:(t,e)=>I("marginBlockEnd",t,e),marginLeft:(t,e)=>I("marginInlineStart",t,e),marginRight:(t,e)=>I("marginInlineEnd",t,e),marginInlineStart:(t,e)=>I("marginInlineStart",t,e),marginInlineEnd:(t,e)=>I("marginInlineEnd",t,e),marginBlockStart:(t,e)=>I("marginBlockStart",t,e),marginBlockEnd:(t,e)=>I("marginBlockEnd",t,e),scrollMargin:(t,e)=>I("scrollMargin",t,e),scrollMarginTop:(t,e)=>I("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>I("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>I("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>I("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>du("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>du("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>I("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>I("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>I("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>I("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>I("scrollPadding",t,e),scrollPaddingTop:(t,e)=>I("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>I("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>I("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>I("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>du("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>du("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>I("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>I("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>I("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>I("scrollPaddingInlineEnd",t,e),gap:t=>({gap:Yf(t)}),columnGap:(t,e)=>Ee(e,"columnGap",t),rowGap:(t,e)=>Ee(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!k(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!k(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>wn(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>wn(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>wn(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>wn(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>wn(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>wn(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var Ey={fontSize:t=>Ga(t)||t,fontFamily:t=>({fontFamily:qa(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 Ay={overflow:t=>({overflow:t}),cursor:(t,e,n,r)=>{if(!t)return;let o=r.assets&&r.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=r.files&&r.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 Ty={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:dt(t).map(n=>At(n,"k").k).join(" ")}},left:t=>At(t,"left"),top:t=>At(t,"top"),right:t=>At(t,"right"),bottom:t=>At(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=dt(t).map(n=>At(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=dt(t).map(n=>At(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};D();var pu=0,hu=()=>{pu++},gu=()=>{pu>0&&pu--},me=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:pu>0?null:n&&n.resolvedTheme||null},oe=(t,e)=>{if(e==null||e==="")return;if(!v(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(v(s)){let i=oe(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},Oy={theme:(t,e)=>{if(t)return e.themeModifier?Ae(t,`@${e.themeModifier}`):Ae(t)},color:(t,e)=>{let n=me(e);if(t)return oe("color",$t(t,n))},background:(t,e)=>{let n=me(e);if(t)return k(t)&&t.includes("gradient")&&t.includes("(")?{background:nc(t,n)}:oe("background",$t(t,n))},backgroundColor:(t,e)=>{let n=me(e);if(t)return oe("backgroundColor",$t(t,n))},backgroundImage:(t,e,n,r)=>{let o=me(e);if(!t)return;let s=r.assets&&r.assets[t];if(s&&s.content)t=s.content.src;else{let i=r.files&&r.files[t];i&&i.content&&(t=i.content.src)}return oe("backgroundImage",Gf(t,o))},textStroke:t=>{let e=qf(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:on(t)}),outlineWidth:(t,e)=>I("outlineWidth",t,e),outlineColor:(t,e)=>{let n=me(e);if(t)return oe("outlineColor",$t(t,n))},outlineOffset:(t,e)=>I("outlineOffset",t,e),border:t=>({border:on(t)}),borderColor:(t,e)=>{let n=me(e);if(t)return oe("borderColor",$t(t,n))},borderTopColor:(t,e)=>{let n=me(e);if(t)return oe("borderTopColor",$t(t,n))},borderBottomColor:(t,e)=>{let n=me(e);if(t)return oe("borderBottomColor",$t(t,n))},borderLeftColor:(t,e)=>{let n=me(e);if(t)return oe("borderLeftColor",$t(t,n))},borderRightColor:(t,e)=>{let n=me(e);if(t)return oe("borderRightColor",$t(t,n))},borderLeft:t=>({borderLeft:on(t)}),borderTop:t=>({borderTop:on(t)}),borderRight:t=>({borderRight:on(t)}),borderBottom:t=>({borderBottom:on(t)}),shadow:(t,e)=>{let n=me(e);if(t)return oe("boxShadow",Kf(t,n))},boxShadow:(t,e)=>{if(!k(t))return;let[n,r]=t.split("!importan"),o=me(e),s=r?" !important":"",i=ec(n.trim(),o);return k(i)?{boxShadow:i+s}:oe("boxShadow",i)},textShadow:(t,{context:e})=>oe("textShadow",ec(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:on(t)})};var cc={transition:t=>{let e=Zf(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:rc(t)}),transitionDelay:t=>({transitionDelay:rc(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Te(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};D();var Ry={flow:(t,e)=>{let n=e.reverse;if(!k(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!k(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};D();var FP=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,A0=t=>{if(!k(t))return t;let e=T().sizes;return e?t.replace(FP,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},cn=t=>A0(Xf(t)),Py={gridTemplateColumns:t=>({gridTemplateColumns:cn(t)}),gridTemplateRows:t=>({gridTemplateRows:cn(t)}),gridAutoColumns:t=>({gridAutoColumns:cn(t)}),gridAutoRows:t=>({gridAutoRows:cn(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:cn(t)}),templateColumns:t=>({gridTemplateColumns:cn(t)}),autoColumns:t=>({gridAutoColumns:cn(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:cn(t)}),templateRows:t=>({gridTemplateRows:cn(t)}),autoRows:t=>({gridAutoRows:cn(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var wt={...vy,...Cy,...Ey,...Ay,...Ty,...Oy,...cc,...Ry,...Py};var Tt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationTimeline","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","interpolateSize","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","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapStop","scrollSnapType","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);D();var NP=/^-?[A-Z][0-9]?$/,jP=/^[a-z][0-9]?$/,T0=/var\(\s*(--[A-Za-z0-9-]+)/g,BP=t=>{let e=new Set,n=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:n};for(let r in t){let o=t[r];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)n.add(s)}}return{knownLetters:e,knownVars:n}},VP=(t,e)=>{if(!e.size)return[];let n=t.split(/[(),\s]+/).filter(Boolean),r=new Set;for(let o of n){if(!NP.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;e.has(s)&&r.add(o)}return[...r]},UP=(t,e)=>{if(!e.size)return[];let n=[];T0.lastIndex=0;let r;for(;r=T0.exec(t);){let o=r[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!jP.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&n.push({varName:o,corrected:a})}return n},mu=new Set,O0=(t,e,n)=>{if(!ht()||!k(e)||!e)return;let r;try{r=T()}catch{return}let{knownLetters:o,knownVars:s}=BP(r);if(!o.size&&!s.size)return;let i=VP(e,o),a=UP(e,s);if(!i.length&&!a.length)return;let c=n?.__ref?.path?n.__ref.path.join("."):n?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;mu.has(f)||(mu.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;mu.has(u)||(mu.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};D();var zP=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,HP=(t,e,n)=>{let{context:r}=n;if(!r.designSystem?.media)return;let o=t.slice(1),s=r.designSystem.media[o],i=se(e,n);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(zP),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=r.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},R0=(t,e,n)=>({[t]:se(e,n)}),lc=(t,e,n)=>{let r=`&${t}`,o=se(e,n);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=r.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[r]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[r]:o}},Dy=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return O(n)?n.call(e,e):!!n},WP=(t,e,n)=>{let r=t.slice(1),o=Dy(r,n);if(o===void 0&&(o=!!n[r]),!!o)return se(e,n)},qP=(t,e,n)=>({[t]:e}),KP=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Dy(r,n);s!==void 0&&(o=s)}if(o)return se(e,n)},GP=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Dy(r,n);s!==void 0&&(o=s)}if(!o)return se(e,n)},Ly=(t,e)=>se(t,e),Iy={"@":HP,":":lc,"[":lc,"*":lc,"+":lc,"~":lc,"&":R0,">":R0,$:WP,"-":qP,".":KP,"!":GP};var yu=Bn(),P0=(t,e,n)=>{let r=e?.context?.designSystem;r&&st(r);try{let o={},s={},i=(a,c)=>{if(n.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&k(c)){let l=D0(c,e);l&&(n.unpack?bt(o,l):o.designSystemClass=l)}else if(a==="true"){let l=ut(c,e);bt(o,Ly(l,e))}else if(e.classlist?.[a]){let l=e.classlist[a],f=O(l)?l(e,e.state,e.context):l;f&&i(a,f),!yu&&v(o[a])&&(o[a].label=a)}else if(wt[a]){let l=ut(c,e);if(l===null)continue;R(l)&&(l=l.reduce((u,d)=>bt(u,d),{}));let f=wt[a](l,e,e.state,e.context);R(f)&&(f=f.reduce((u,d)=>bt(u,d),{})),f&&i(a,f),!yu&&v(o[a])&&(o[a].label=a)}else if(Tt.has(a)){let l=ut(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),yu||O0(a,l,e),i(a,{[a]:l}),!yu&&v(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{r&&rt()}},D0=(t,e)=>{if(!k(t))return;let n=e?.context?.designSystem?.class;if(!n)return;let r;for(let o of t.split(" ")){if(!o)continue;let s=n[o];if(!v(s))continue;let i=it(s);r=r?Wt(r,i):i}if(r)return se(r,e)},L0=(t,e)=>{let n={};for(let r in t){let o=Iy[r.slice(0,1)];if(o){let s=o(r,t[r],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]&&typeof n[i]=="object"&&typeof s[i]=="object"?Wt(n[i],s[i]):n[i]=s[i])}}return n},se=(t,e,n={unpack:!0})=>{let[r,o]=P0(t,e,n),s=L0(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(n.unpack)return Si(r,s);r._selectors=s}return r},YP=(t,e)=>{let n={};if(t.class)for(let r in t.class)n[r]=t.class[r](e);return n};D();var I0=t=>{if(v(t))return se(t,t)},XP=(t,e)=>{let n=I0(t);return typeof e=="function"?e(n):ge(n)};D();D();function Fy(t,e,n){let r=t?.context?.analyze;if(!r||!r.emit||e==="warn"&&!r.shouldCapture("warnings")||e==="error"&&!r.shouldCapture("errors"))return;let o=n.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");r.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:n})}var $0=new Set;function M0(t,e,n){let r=String(e);if($0.has(r))return;$0.add(r);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.join("."):t?.key!=null?String(t.key):"(unknown element)",i=n!=null?`resolves to a non-function (${typeof n}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${r}') at <${s}>: "${r}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;Fy(t,"error",[a]),console.error(a)}var N0=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),ZP=new Set,j0=t=>N0($y,t)&&!(Eo||ZP).has(t),F0=new Set;function B0(t,e){F0.has(t)||(F0.add(t),ht()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function JP(...t){return Fy(this,"warn",t),aa.apply(this,t)}function QP(...t){return Fy(this,"error",t),Lr.apply(this,t)}var $y={update:bs,remove:xs,getDB:ua,getQuery:da,getRootData:oa,getPath:ta,nextElement:ca,previousElement:la,verbose:Fo,warn:JP,error:QP,variables:fa,spotByPath:Qi,set(t,e){let n=this.__ref;if(n){if(n.__setLocked){n.__setQueued={content:t,options:e};return}n.__setLocked=!0}try{if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(n){n.__setLocked=!1;let r=n.__setQueued;r&&(n.__setQueued=null,this.set(r.content,r.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let n=this.parent,r=this.key,o=this.parse();return this.remove(),e(o,n,r,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 n of e.__children){let r=this[n];if(!r)continue;if(typeof t=="function"){if(t(r))return r}else if(typeof t=="string"&&r.key===t)return r;let o=r.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let n=this.__ref;if(!n?.__children)return e;for(let r of n.__children){let o=this[r];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(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:ra,getRootState:na,getRootContext:sa,getContext:ia,parse(t){let e={},n=t?new Set(t):null,r=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!n?.has(o)){if(r&&r[o]!==void 0){e[o]=r[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),n=this.__ref;if(n?.__children)for(let r of n.__children)this[r]?.parseDeep&&(e[r]=this[r].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let n of t)e[n]=this[n];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 n=t[e];if(n==null)continue;let r=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(n).replace(/\s*!important\s*$/,"");this.node.style.setProperty(r,o,"important")}},call(t,...e){let n=this.context,r=j0(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&B0(t,"el.call");let o=r?this[t]:n?.methods?.[t]||n?.functions?.[t]||n?.utils?.[t]||this[t];if(typeof o=="function"){let s=Ar;if(!s||!s(o))return o.call(this,...e);ht()&&M0(this,t,Ie(o));return}ht()&&M0(this,t,o)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let n=t.__children.indexOf("content");n!==-1&&t.__children.splice(n,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},My=new WeakMap;function t2(t){if(!t)return $y;let e=My.get(t);if(e)return e;e=Object.create($y);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return My.set(t,e),e}function ws(t){let e=t2(t.context);Object.setPrototypeOf(t,e)}function bu(t){if(!t)return!1;let e=My.get(t);if(!e)return!1;let n=t.methods;if(!n)return!1;for(let r in n){if(j0(r)&&!N0(e,r)){B0(r,"refreshContextProto");continue}e[r]=n[r]}return!0}var _u=[],xu=!1,ir=0;function wu(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function V0(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),t()},n.port2.postMessage(0);return}setTimeout(t,0)}function Ny(){return ir?wu()-ir>=50:!1}var Ss=0;function jy(){Ss===0&&!ir&&(ir=wu()),Ss++}function By(){Ss>0&&Ss--,Ss===0&&!xu&&(ir=0)}function Vy(t){_u.push(t),xu||(xu=!0,V0(U0))}function U0(){for(ir=wu();_u.length;){let t=_u.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(wu()-ir>=50)break}if(_u.length){V0(U0);return}xu=!1,ir=0,Ss=0}D();D();Rr();var qy={};$(qy,{STATE_METHODS:()=>z0,applyInitialState:()=>ku,applyStateMethods:()=>ye,callStateMethod:()=>fc,createState:()=>zy,isTracking:()=>Wy,useHostState:()=>Hy});var z0=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"]),Su=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},Ve=(t,e,n,{onlyIfAbsent:r}={})=>{Su(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&Su(t,e,n)},fc=(t,e,...n)=>{if(!t)return;let r=t["$"+e];if(typeof r=="function")return r.apply(t,n);let o=t[e];if(typeof o=="function")return o.apply(t,n)},ye=(t,e)=>{if(St(e)){let o=e.__raw||e;Ve(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Ve(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Ve(o,"setByPath",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}),Ve(o,"getByPath",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}),Ve(o,"removeByPath",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}),Ve(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Ve(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Ve(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Ve(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&St(a.parent);)a=a.parent;return fc(a,"update",s,i)}),Ve(o,"parentUpdate",function(s,i={}){if(e.parent)return fc(e.parent,"update",s,i)}),Ve(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=St(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,St(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let n=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},r={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;n();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return n(),e}};for(let o in r)if(Su(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){dl(o,"");continue}Su(e,o,r[o])}};var zy=function(t,e,n){return t.state=ku(t,e,n),t.state},ku=function(t,e,n){let{__ref:r}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return ye(t,s),s}if(typeof o=="string")return r&&(r.__state=o),r.__stateType="string",e2(o,t,e);if(typeof o=="number"||typeof o=="boolean"){r&&(r.__state=o,r.__stateType=typeof o,r.__hasRootState=!0);let s=fn({value:o});return s.__element=t,e?.state&&(s.parent=e.state),ye(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!St(o)){r&&(r.__hasRootState=!0),o.isRootState&&r&&(r.__hasRootState=!0);let s=fn({...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)),ye(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,n),s}return St(o)?(o.__element=t,o):e?.state||{}};function Uy(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function e2(t,e,n){if(!n?.state)return{};if(t===".")return n.state;if(t.startsWith("../")){let o=t.slice(3),s=n.state?.parent;return o&&s?Uy(s,o):s??n.state??{}}if(t.startsWith("~/")){let o=n.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?Uy(o,s):o??{}}let r=Uy(n.state,t);if(r&&typeof r=="object"&&!St(r)&&!Object.getOwnPropertyDescriptor(r,"root")){let o=n.state?.root||n.state;Object.defineProperty(r,"root",{get:()=>o,enumerable:!1,configurable:!0})}return r}var Hy=(t,e)=>{if(!t)return W0;let n=r2(t,e);return!n||!n.state?W0:s2(n.state)},Wy=()=>In()!=null,n2=128;function r2(t,e){let n=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,r=t,o=null;for(let s=0;s<n2&&r;s++){if(n(r)&&r.state)return r;if(r.state&&!o&&(o=r),!r.parent||r.parent===r)break;r=r.parent}return o}var o2={get(t,e){return t[e]}},H0=new WeakMap,s2=t=>{let e=H0.get(t);return e||(e=new Proxy(t,o2),H0.set(t,e)),e},W0=new Proxy(Object.create(null),{get(){},has(){return!1}});var vu="3.14.796";var q0="__SMBLS_ELEMENT_ID_ENGINE__",K0=(t,e,n)=>{let r=e||vu,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[q0];return s&&s.engine&&s.version===r?s.engine:(s||(o[q0]={version:r,engine:t}),t)};var W=(t,e)=>e.split(" ").map(n=>t+"-"+n),Ky="top right bottom left",Gy=Ky+" block block-start block-end inline inline-start inline-end",ar="start end",to="width style color",Cu=t=>W(t,Gy),i2=(()=>{let t=W("border","width style color image");for(let e of Gy.split(" "))t.push("border-"+e,...W("border-"+e,to));return t})(),G0=t=>[...W("border-"+t,to+" start end"),...W("border-"+t+"-start",to),...W("border-"+t+"-end",to)],Cn={animation:W("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:W("background","image position position-x position-y size repeat origin clip attachment color"),border:i2};for(let t of["width","style","color"])Cn["border-"+t]=Gy.split(" ").map(e=>"border-"+e+"-"+t);for(let t of Ky.split(" "))Cn["border-"+t]=W("border-"+t,to);Cn["border-block"]=G0("block");Cn["border-inline"]=G0("inline");Object.assign(Cn,{"border-image":W("border-image","source slice width outset repeat"),"border-radius":"top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" ").map(t=>"border-"+t+"-radius"),columns:W("column","width count"),"column-rule":W("column-rule",to),container:W("container","name type"),"contain-intrinsic-size":W("contain-intrinsic","width height"),flex:W("flex","grow shrink basis"),"flex-flow":W("flex","direction wrap"),font:[...W("font","style variant weight stretch size"),"line-height",...W("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:W("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":W("grid-template","rows columns areas"),"grid-area":W("grid","row column row-start row-end column-start column-end"),"grid-row":W("grid-row",ar),"grid-column":W("grid-column",ar),inset:[...Ky.split(" "),...W("inset","block block-start block-end inline inline-start inline-end")],"inset-block":W("inset-block",ar),"inset-inline":W("inset-inline",ar),"list-style":W("list-style","type position image"),margin:Cu("margin"),"margin-block":W("margin-block",ar),"margin-inline":W("margin-inline",ar),mask:W("mask","image mode repeat position clip origin size composite"),offset:W("offset","position path distance rotate anchor"),outline:W("outline",to),overflow:W("overflow","x y"),"overscroll-behavior":W("overscroll-behavior","x y"),padding:Cu("padding"),"padding-block":W("padding-block",ar),"padding-inline":W("padding-inline",ar)});for(let t of["content","items","self"])Cn["place-"+t]=["align-"+t,"justify-"+t];Object.assign(Cn,{"scroll-margin":Cu("scroll-margin"),"scroll-padding":Cu("scroll-padding"),"text-decoration":W("text-decoration","line style color thickness"),"text-emphasis":W("text-emphasis","style color"),transition:W("transition","property duration timing-function delay behavior")});var uc={};for(let t in Cn)for(let e of Cn[t])(uc[e]||(uc[e]=[])).push(t);var a2=new Set(["rows","cols","wrap"]),Eu=(t,e)=>a2.has(e)&&Oe(t,e),ks=(t,e)=>!!(wt[e]||Tt&&Tt.has(e))&&!Eu(t,e);var uk=K0({uniqId:1,scopedStyleId:0},vu),pc=[],eo=new Set,ob=!1,dk=0,vs=null,mc=null;function Cs(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function pk(){return typeof document<"u"&&document.visibilityState==="hidden"}var c2=250,l2=1e3;function f2(){return mc&&(mc!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||pk())?!0:Cs()-dk>=l2}function u2(){if(ob=!0,dk=Cs(),mc=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(gc,0);vs=t?()=>t(e):null;return}if(pk()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(gc,c2);vs=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;mc=requestAnimationFrame;let e=requestAnimationFrame(gc);vs=t?()=>t(e):null}}function Iu(){if(ob){if(!f2())return;let t=vs;if(vs=null,t)try{t()}catch{}}u2()}var hk=300,gk=15e4;function gc(){if(ob=!1,vs=null,mc=null,eo.size&&j2(),!pc.length)return;let t=pc.splice(0,pc.length);for(let e=0;e<t.length;e++){let n=t[e];if(n.node){if(!n.node.isConnected){let r=n.__ref||(n.__ref={});r.__mountAttempts=(r.__mountAttempts||0)+1,r.__mountFirstAttemptAt==null&&(r.__mountFirstAttemptAt=Cs());let o=Cs()-r.__mountFirstAttemptAt;r.__mountAttempts<=hk&&o<gk?(pc.push(n),Iu()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}ie("Mounted",n,n.__ref?.__mountOptions||{})}}}function Jy(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&yc(t,!0),typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,pc.push(t),Iu())}function Y0(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Pt("contentUpdate",t,e);let n=t.context?.designSystem;n&&st(n);try{t.onContentUpdate(t,t.state,t.context,e)}catch(r){if(t.context?.plugins?.length&&Pt("error",t,{hook:"onContentUpdate",error:r})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',r),t.context?.strictMode)throw r}finally{n&&rt()}}function En(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function d2(t){return t.charAt(2).toLowerCase()+t.slice(3)}function p2(t){return t.toLowerCase()}function Qy(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function hc(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=hc(o,s):n[r]=s}return n}function Ru(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function mk(t,e,n){return Ru(t)||(e&&typeof e=="object"?Ru(e.key):void 0)||String(n)}function re(t,e,n,r={},o){let s=In();if(s){$n(null);try{return re(t,e,n,r,o)}finally{$n(s)}}if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=Ru(n);let i=Ru(t.key),a=Object.create(null);a.key=n||i||`_${uk.uniqId++}`,a.parent=e||null,a.context=t.context||e?.context||r.context||{},a.context.__create||(a.context.__create=re);let c=a.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||a,path:e?.__ref?.path?[...e.__ref.path,a.key]:[a.key],origin:t};if(n&&!t.extends&&!t.extend){let y=n.indexOf("_"),x=n.indexOf("."),b=y>0?y:-1;if(x>0&&(b<0||x<b)&&(b=x),b>0){let _=n.substring(0,b),w=a.context?.components;w&&(w[_]||w["smbls."+_])?t={...t,extends:_}:w&&ht()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${_}" but neither "${_}" nor "smbls.${_}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}ys(a,t,r);let l=new Set(["childProps","attr","style","scope","data"]),f=a.props&&typeof a.props=="object"?a.props:null;for(let y in t){if(y==="parent"||y==="node"||y==="__ref"||y==="extends"||y==="context"||y==="props")continue;if(y==="key"){i&&(a.key=i);continue}let x=t[y],b=a[y],_=b&&x&&typeof b=="object"&&typeof x=="object"&&!Array.isArray(b)&&!Array.isArray(x)&&typeof b!="function"&&typeof x!="function";_&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?a[y]=hc(b,x):_&&l.has(y)?a[y]={...b,...x}:_&&Qy(y)?a[y]=hc(b,x):a[y]=x}function u(y){for(let x in y){let b=y[x],_=a[x],w=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";w&&x.charCodeAt(0)>=65&&x.charCodeAt(0)<=90?a[x]=hc(_,b):w&&l.has(x)?a[x]={..._,...b}:w&&Qy(x)?a[x]=hc(_,b):a[x]=b}}f&&u(f),t.props&&typeof t.props=="object"&&u(t.props),t.classlist!==void 0&&(a.classlist=t.classlist),t.text!==void 0&&(a.text=t.text),t.html!==void 0&&(a.html=t.html);let d=a.scope&&typeof a.scope=="object"?a.scope:null,h=e?.scope,p=a.context&&typeof a.context.globalScope=="object"&&a.context.globalScope||null,g=h||p||null;if(t.scope!==void 0||d){let y={};d&&Object.assign(y,d),t.scope!==void 0&&Object.assign(y,t.scope),a.scope=ul(y,g)}else g&&(a.scope=g);if(t.if!==void 0&&(a.if=t.if),ws(a),h2(a,e,t),a.if!=null){let y;if(typeof a.if=="function")try{y=a.if(a,a.state,a.context)}catch(x){if(y=!1,c.__ifError=x,typeof console<"u"&&console.warn){let b=a.key||a.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,x?.message||x)}}else y=a.if;c.__if=!!y}if(c.__if)typeof a.if=="function"&&(c.__ifInitialized=!0);else return e&&(e[a.key]=a),typeof a.if=="function"&&_k(a,c,a.if),a;a.tag||(a.tag=nr(a)),ie("Init",a,r);let m=a.node=rr(a);if(!m)return a;if(a.tag==="fragment"){let x=(a.context?.document||globalThis.document).createComment("");m.appendChild(x),c.__fragmentAnchor=x}ie("AttachNode",a,r),m.setAttribute&&a.key&&m.setAttribute("data-key",a.key),e&&(e[a.key]=a,e.__ref?.__children&&(e.__ref.__children.includes(a.key)||e.__ref.__children.push(a.key))),m.setAttribute&&a.context?.scopeSelector&&a.context.scopeSelector!==":root"&&a.context.key&&a.key===a.context.key&&m.setAttribute("data-smbls-app",a.context.key),a.id&&m.setAttribute&&(m.id=a.id),Ok(a,r),bk(a),tb(a),Ek(a),Ak(a),z2(a);try{Rk(a,r)}catch(y){if(typeof console<"u"&&console.error){let x=a.__ref?.path?.join(".")||a.key||"<root>";console.error(`[smbls] createChildren failed at ${x}:`,y?.message||y,y?.stack?`
54
54
  `+y.stack.split(`
55
55
  `).slice(0,6).join(`
56
- `):"")}}if(Iu(a,!0),Rk(a,e,o),typeof a.html=="function"&&a.node&&!a.node.innerHTML){let y=a.context?.designSystem;y&&st(y);try{let x=a.html(a,a.state,a.context);x!=null&&typeof x!="function"&&(a.node.innerHTML=x)}catch{}finally{y&&rt()}}if(ie("Create",a,r),ie("Complete",a,r),ie("Render",a,r),ie("RenderRouter",a,r),Jy(a,r),typeof a.onFrame=="function"){let y=a.onFrame,x=a.context?.designSystem,b=()=>{if(a.node){if(a.node.isConnected){x&&st(x);try{y(a,a.state,a.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{x&&rt()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return a}function p2(t,e,n){let r=!e,o=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,s=r&&o&&t.context?.state,i=n.state!==void 0&&!s?n.state:t.state&&!St(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ye(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=t.context,u=a.lang||l.defaultLang||"en",d=new Set,h=(m,y)=>{d.has(m)||Pr(f,m,c)&&(c[m]=y,d.add(m),Je(f,m,y))},p=l.translations[u];if(p&&typeof p=="object")for(let m in p)h(m,p[m]);let g=new Set(l.languages||[]);for(let m in l.translations)g.has(m)||h(m,l.translations[m])}t.state=St(c)?c:fn(c),t.state.__element=t,t.state.root=t.state,ye(t,t.state),Mo?.(a,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ye(t,t.state);return}if(typeof i=="string"){if(t.state=mk(i,e),t.state&&typeof t.state=="object"&&!St(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ye(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=St(a)?a:fn(a||{})}else St(i)?t.state=i:t.state=fn({...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,ye(t,t.state),Mo?.(i,t.state)}function Yy(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function mk(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?Yy(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?Yy(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=Yy(e.state,t);if(n!=null&&Object.keys(n).length>0)return n;let r=e.context?.polyglot;if(r?.translations){let o=e.state?.root?.lang||r.defaultLang||"en",s=r.translations[o];if(s?.[t]!==void 0)return s[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}var h2=new Set(["s","state","ctx","context"]);function g2(t){try{let n=(typeof Ie=="function"?Ie(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(r=>r.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function m2(t){if(typeof t!="function"||t.length!==2)return!1;let e=g2(t);if(e.length<2)return!1;let n=e[1].replace(/[{}[\]]/g,"").trim();return n.length>0&&!h2.has(n)}function y2(t){let e=t.__ref,n=t.tag||"div",r=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"||Ut.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||En(a)||wt[a]||Tt&&Tt.has(a)||Oe(n,a)||(ht()&&m2(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),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(){r&&st(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&rt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function b2(t,e){if(!(!Array.isArray(e)||e.length===0))for(let n=0;n<e.length;n++){let r=e[n];try{typeof r=="function"?r(t,t.state,t.context):typeof r=="string"&&t.state?.[r]}catch{}}}function Ft(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return b2(t,e),n.apply(this,r)}}function dc(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ct(t,e){return()=>t.path.join(".")+"::"+e}var Y0=new Set;function Gt(t,e,n){if(!ht())return;let r=ct(t,e)();Y0.has(r)||(Y0.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var X0=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,_2=(t,e)=>{let n;try{n=String(t)}catch{return}if(!n.includes("{{"))return;X0.lastIndex=0;let r;for(;(r=X0.exec(n))!==null;)r[2].includes("{{")&&e.add(r[2])},x2=(t,e)=>!En(t)&&!ks(e,t),Z0=(t,e,n,r)=>{if(typeof e=="string"){e.includes("{{")&&n.add(e);return}typeof e=="function"&&x2(t,r)&&_2(e,n)},w2=["attr","aria","data"],S2=t=>{if(w2.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},k2=t=>{let e=new Set,n=t.tag||"div";for(let r of Object.keys(t)){let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(s&&typeof s=="object"&&!Array.isArray(s)){if(!S2(r))continue;for(let i in s)Z0(i,s[i],e,n);continue}Z0(r,s,e,n)}return e};function yk(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=k2(t);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(y2(t),typeof t.text=="function"){let c=t.text,l=Ft(t,t.textDeps,c),f=G(()=>{if(!n.contentManaged)try{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=Mt.call(t,u,t.state)),_s(t,u))}catch(u){Gt(n,"text",u)}},{depth:n.path.length,label:ct(n,"text")});n.__effects.push(f),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=G(()=>{if(n.contentManaged)return;let f=Mt.call(t,c,t.state);f!=null&&(t.text=f),t.node&&_s(t,f??"")},{depth:n.path.length,label:ct(n,"text")});n.__effects.push(l),n.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!Ut.has(c)&&!En(c)&&!n.__exec[c]&&!Eu(s,c)){if(wt[c]){let l=t[c],f=Ft(t,t[c+"Deps"],l),u=c,d,h=null,p=null,g,m=G(()=>{let y=t.context?.designSystem;y&&st(y);try{let x=f(t,t.state,t.context);hu();let b;try{b=wt[u](x,t,t.state,t.context)}finally{gu()}if(Array.isArray(b)){let w={};for(let k of b)if(k)for(let A in k)w[A]=k[A];b=w}let _=u==="show"||u==="hide";if(b&&t.node&&v2(b)){let w=Ou(b);if(w===null||w!==g){g=w;let k=ge(b,null,t.context?.cssPrefix),A=k?k.split(" ").filter(Boolean):null;if(t.node.classList){if(p)for(let P of p)t.node.classList.remove(P);if(A&&A.length)for(let P of A)t.node.classList.add(P);p=A}}d=void 0,h=null}else if(b&&t.node){if(p){for(let k of p)t.node.classList.remove(k);p=null,g=void 0}let w=Ou(b);if(w===null||w!==d||!Tu(t.node,h)){d=w;let k=tk(t,b);h=Au(t.node,k)}}else t.node&&_&&(d=void 0,h=null,t.node.style.display="")}finally{y&&rt()}},{depth:n.path.length,label:ct(n,u)});n.__effects.push(m),n.__exec[c]=l}else if(Tt&&Tt.has(c)){let l=t[c],f=Ft(t,t[c+"Deps"],l),u=c,d,h=null,p=G(()=>{let g=t.context?.designSystem;g&&st(g);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!Tu(t.node,h)){d=y;let x={[u]:m},b=tk(t,x);h=Au(t.node,b)}}else d=void 0,h=null,t.node.style[u]=""}finally{g&&rt()}},{depth:n.path.length,label:ct(n,u)});n.__effects.push(p),n.__exec[c]=l}}if(typeof t.html=="function"){let c=t.html,l=Ft(t,t.htmlDeps,c),f=G(()=>{let u=t.context?.designSystem;u&&st(u);try{let d=l(t,t.state,t.context);t.node&&d!=null&&typeof d!="function"&&(t.node.innerHTML=d)}finally{u&&rt()}},{depth:n.path.length,label:ct(n,"html")});n.__effects.push(f),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=Ft(t,t.valueDeps,c),f=G(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Mt.call(t,u,t.state)),Q0(t,u)}catch(u){Gt(n,"value",u)}},{depth:n.path.length,label:ct(n,"value")});n.__effects.push(f),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=G(()=>{try{Q0(t,Mt.call(t,c,t.state))}catch(f){Gt(n,"value",f)}},{depth:n.path.length,label:ct(n,"value")});n.__effects.push(l),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=Ft(t,t.styleDeps,c),f,u=null,d=G(()=>{let h=l(t,t.state,t.context),p=Ou(h);(p===null||p!==f||!Tu(t.node,u))&&(f=p,C2(t.node,u,h),no(t.node,h),u=Au(t.node,h))},{depth:n.path.length,label:ct(n,"style")});n.__effects.push(d),n.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let l=t.style[c];if(typeof l!="function")continue;let f=Ft(t,dc(t.styleDeps,c),l),u,d=null,h=G(()=>{try{let p=f(t,t.state,t.context);if(t.node){let g=c+":"+String(p);if(g!==u||!Tu(t.node,d)){u=g;let m={[c]:p};no(t.node,m),d=Au(t.node,m)}}}catch(p){Gt(n,"style."+c,p)}},{depth:n.path.length,label:ct(n,"style."+c)});n.__effects.push(h)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let l=Ft(t,dc(t.attrDeps,c),t.attr[c]),f=c,u=G(()=>{try{let d=l(t,t.state,t.context);typeof d=="string"&&d.includes("{{")&&(d=Mt.call(t,d,t.state)),t.node?.setAttribute&&(d==null||d===!1&&!an(f)?t.node.removeAttribute(f):typeof d!="function"&&typeof d!="object"&&t.node.setAttribute(f,ne(f,d)))}catch(d){Gt(n,"attr."+f,d)}},{depth:n.path.length,label:ct(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let l=t.attr[c],f=c,u=G(()=>{try{let d=Mt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,ne(f,d??""))}catch(d){Gt(n,"attr."+f,d)}},{depth:n.path.length,label:ct(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let l=t.aria[c];if(typeof l=="string"&&l.includes("{{")){let h=l,p="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),g=G(()=>{try{let m=Mt.call(t,h,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(p,ne(p,m??""))}catch(m){Gt(n,"aria."+c,m)}},{depth:n.path.length,label:ct(n,"aria."+c)});g._attrName=p,n.__effects.push(g);continue}if(typeof l!="function")continue;let f=Ft(t,dc(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),d=G(()=>{try{let h=f(t,t.state,t.context);if(!t.node?.setAttribute)return;h==null?t.node.removeAttribute(u):typeof h!="function"&&typeof h!="object"&&t.node.setAttribute(u,ne(u,h))}catch(h){Gt(n,"aria."+c,h)}},{depth:n.path.length,label:ct(n,"aria."+c)});d._attrName=u,n.__effects.push(d)}if(t.data&&typeof t.data=="object")for(let c in t.data){let l=t.data[c];if(typeof l=="string"&&l.includes("{{")){let p=l,g="data-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),m=G(()=>{try{let y=Mt.call(t,p,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,y??"")}catch(y){Gt(n,"data."+c,y)}},{depth:n.path.length,label:ct(n,"data."+c)});m._attrName=g,n.__effects.push(m);continue}if(typeof l!="function")continue;let f=Ft(t,dc(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),h=G(()=>{try{let p=f(t,t.state,t.context);if(!t.node?.setAttribute)return;p==null||p===!1?t.node.removeAttribute(d):typeof p!="function"&&typeof p!="object"&&t.node.setAttribute(d,p===!0?"":p)}catch(p){Gt(n,"data."+c,p)}},{depth:n.path.length,label:ct(n,"data."+c)});h._attrName=d,n.__effects.push(h)}let i=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(i)for(let c in i){if(typeof i[c]!="function")continue;let l=Ft(t,dc(t.classDeps,c),i[c]),f=G(()=>{try{let u=l(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(c):t.node.classList.remove(c)}catch(u){Gt(n,"class."+c,u)}},{depth:n.path.length,label:ct(n,"class."+c)});n.__effects.push(f)}!r&&typeof t.if=="function"&&bk(t,n,t.if);for(let c of Object.keys(t)){if(Ut.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||En(c))continue;let f=t[c];n.__exec[c]=f;let u=t.tag||"div";if(Oe(u,c)&&!ks(u,c)){let d=sn(c)||c,h=Ft(t,t[c+"Deps"],f),p=G(()=>{try{let g=h(t,t.state,t.context);typeof g=="string"&&g.includes("{{")&&(g=Mt.call(t,g,t.state)),t.node?.setAttribute&&(g==null||g===!1&&!an(d)?t.node.removeAttribute(d):typeof g!="function"&&typeof g!="object"&&(d==="src"&&"src"in t.node?t.node.src=g:t.node.setAttribute(d,ne(d,g))))}catch(g){Gt(n,c,g)}},{depth:n.path.length,label:ct(n,c)});p._attrName=d.toLowerCase(),n.__effects.push(p)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Ut.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||En(c)||ks(a,c)||Qr[c]||!Oe(a,c))continue;let u=sn(c)||c,d=G(()=>{try{let h=Mt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,ne(u,h??""))}catch(h){Gt(n,c,h)}},{depth:n.path.length,label:ct(n,c)});d._attrName=u.toLowerCase(),n.__effects.push(d)}if(P2(t),$2(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=G(()=>{let h=[];for(let y=0;y<l.length;y++){let x=l[y];try{h[y]=typeof x=="function"?x(t,t.state,t.context):t.state?.[x]}catch{h[y]=void 0}}if(!f){f=!0,u=h;return}let p=h.length!==u.length;for(let y=0;!p&&y<h.length;y++)h[y]!==u[y]&&(p=!0);let g=u;if(u=h,!p)return;let m=t.context?.designSystem;m&&st(m);try{c(t,t.state,t.context,{prev:g,next:h})}catch(y){if(t.context?.plugins?.length&&Pt("error",t,{hook:"onStateUpdate",error:y})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',y),t.context?.strictMode)throw y}finally{m&&rt()}},{depth:n.path.length,label:ct(n,"onStateUpdate")});n.__effects.push(d)}L2(t)}function J0(t){let e=t.parent,n=e?.node;if(!n||!t.node){Rk(t,t.parent);return}let r=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===n){r=a.node;break}}r?n.insertBefore(t.node,r):n.appendChild(t.node)}function bk(t,e,n){let r=Ft(t,t.ifDeps,n),o=G(()=>{let s;try{s=r(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(a){console.error("[smbls] onRemove error:",a)}}else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=rr(t)),t.node&&(t.node.ref=t),J0(t),tb(t),ie("Render",t,{}),Jy(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=nr(t)),ie("Init",t,{}),t.node||(t.node=rr(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}ie("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Tk(t,{}),yk(t,{skipIfEffect:!0}),tb(t),Ck(t),Ek(t),Ok(t,{}),J0(t),ie("Create",t,{}),ie("Complete",t,{}),ie("Render",t,{}),ie("RenderRouter",t,{}),Jy(t,{})}},{depth:e.path.length,label:ct(e,"if")});e.__effects.push(o)}function _s(t,e){let n=t.node;if(!n)return;let r=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){n.nodeValue!==r&&(n.nodeValue=r);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==n&&(s=null),!s){let i=n.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==r&&(s.nodeValue=r):n.firstChild?(s=(n.ownerDocument||t.context?.document||globalThis.document).createTextNode(r),n.insertBefore(s,n.firstChild)):(n.textContent=r,s=n.firstChild&&n.firstChild.nodeType===3?n.firstChild:null),o&&(o.__textNode=s||null)}function Q0(t,e){let n=t.node;if(!n||!("value"in n))return;let r=e==null?"":String(e);if(n.value===r)return;let o=typeof document<"u"&&document.activeElement===n,s=o&&typeof n.selectionStart=="number"?n.selectionStart:null,i=o&&typeof n.selectionEnd=="number"?n.selectionEnd:null;if(n.value=r,o&&s!=null&&i!=null)try{n.setSelectionRange(s,i)}catch{}let a=t.__ref&&t.__ref.__autoGrow;a&&a.active&&a.resize()}function tb(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&_s(t,t.text),vk(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let n=String(t.value);e.value!==n&&(e.value=n)}if(t.style&&typeof t.style=="object"){let n=t.style;for(let r in t.style)if(typeof t.style[r]=="function"){n={};for(let o in t.style)typeof t.style[o]!="function"&&(n[o]=t.style[o]);break}no(e,n)}if(t.attr&&typeof t.attr=="object")for(let n in t.attr){let r=t.attr[n];typeof r=="function"||typeof r=="object"||r!=null&&(typeof r=="string"&&r.includes("{{")||r===!1&&!an(n)||e.setAttribute&&e.setAttribute(n,ne(n,r)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&e.setAttribute&&e.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(let n in t.data){let r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||typeof r=="string"&&r.includes("{{")||e.dataset&&(e.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){let n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&e.classList.add(r));else if(typeof n=="object")for(let r in n){let o=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];o&&e.classList.add(typeof o=="string"?o:r)}}}}function Ou(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function v2(t){if(!t||typeof t!="object")return!1;for(let e in t){let n=t[e];if(n&&typeof n=="object"&&!Array.isArray(n))return!0}return!1}function Au(t,e){if(!t||!t.style||!e)return null;let n=t.style,r=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=$u(o);r.push(i,sb(n,i),_k(n,i))}return r}function sb(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function _k(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function $u(t){return Pu(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function C2(t,e,n){if(!t||!t.style||!e||!e.length)return;let r=t.style,o=new Set;if(n&&typeof n=="object")for(let s in n)n[s]==null||s.charAt(0)==="&"||o.add($u(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||sb(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function Tu(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(sb(n,e[r])!==e[r+1]||_k(n,e[r])!==e[r+2])return!1;return!0}var Pu=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function E2(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add($u(n)));return e}function A2(t,e,n,r){let o=t.__ref;if(!o)return;let s=null;if(n)for(let i of n){if(r&&r.has(i))continue;let a=e[i];if(a==null||typeof a=="object")continue;let c=$u(i);uc[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function xk(t,e){let n=t.__ref,r=n&&n.__declaredLonghands;if(!r||!e)return null;let o=null;for(let s in r){if(e.has(s))continue;let i=uc[s],a=!1;for(let c=0;c<i.length;c++)if(e.has(i[c])){a=!0;break}a&&(o||(o={}),o[s]=r[s])}return o}function tk(t,e){let n=t.node;no(n,e);let r=E2(e);if(!r)return e;let o=t.__ref;if(o)if(o.__inlineCssKeys)for(let i of r)o.__inlineCssKeys.add(i);else o.__inlineCssKeys=new Set(r);let s=xk(t,r);return s?(no(n,s),Object.assign({},e,s)):e}function T2(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=xk(t,e.__inlineCssKeys);n&&no(t.node,n)}function no(t,e){if(!t||!e||!t.style)return;let n=null;for(let r in e){let o=e[r];if(o!=null){if(r.charAt(0)==="&"&&typeof o=="object"){n||(n={}),n[r]=o;continue}try{let s=String(o),i=Pu(r)?r:r.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{}}}n&&O2(t,n)}function O2(t,e){let n=`_ds${fk.scopedStyleId++}`;t.classList.add(n);let r=t.ownerDocument,o=r.querySelector("style[data-smbls-scoped]");o||(o=r.createElement("style"),o.setAttribute("data-smbls-scoped",""),r.head.appendChild(o));let s="";for(let i in e){let a="."+n,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 d in l){let h=l[d];if(typeof h=="object"){let p=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),g="";for(let m in h)g+=`${m.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${h[m]};`;u+=Sn(`${p} { ${g} }`,p)+`
56
+ `):"")}}if(Lu(a,!0),Pk(a,e,o),typeof a.html=="function"&&a.node&&!a.node.innerHTML){let y=a.context?.designSystem;y&&st(y);try{let x=a.html(a,a.state,a.context);x!=null&&typeof x!="function"&&(a.node.innerHTML=x)}catch{}finally{y&&rt()}}if(ie("Create",a,r),ie("Complete",a,r),ie("Render",a,r),ie("RenderRouter",a,r),Jy(a,r),typeof a.onFrame=="function"){let y=a.onFrame,x=a.context?.designSystem,b=()=>{if(a.node){if(a.node.isConnected){x&&st(x);try{y(a,a.state,a.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{x&&rt()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return a}function h2(t,e,n){let r=!e,o=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,s=r&&o&&t.context?.state,i=n.state!==void 0&&!s?n.state:t.state&&!St(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ye(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=t.context,u=a.lang||l.defaultLang||"en",d=new Set,h=(m,y)=>{d.has(m)||Pr(f,m,c)&&(c[m]=y,d.add(m),Je(f,m,y))},p=l.translations[u];if(p&&typeof p=="object")for(let m in p)h(m,p[m]);let g=new Set(l.languages||[]);for(let m in l.translations)g.has(m)||h(m,l.translations[m])}t.state=St(c)?c:fn(c),t.state.__element=t,t.state.root=t.state,ye(t,t.state),Mo?.(a,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ye(t,t.state);return}if(typeof i=="string"){if(t.state=yk(i,e),t.state&&typeof t.state=="object"&&!St(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ye(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=St(a)?a:fn(a||{})}else St(i)?t.state=i:t.state=fn({...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,ye(t,t.state),Mo?.(i,t.state)}function Yy(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function yk(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?Yy(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?Yy(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=Yy(e.state,t);if(n!=null&&Object.keys(n).length>0)return n;let r=e.context?.polyglot;if(r?.translations){let o=e.state?.root?.lang||r.defaultLang||"en",s=r.translations[o];if(s?.[t]!==void 0)return s[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}var g2=new Set(["s","state","ctx","context"]);function m2(t){try{let n=(typeof Ie=="function"?Ie(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(r=>r.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function y2(t){if(typeof t!="function"||t.length!==2)return!1;let e=m2(t);if(e.length<2)return!1;let n=e[1].replace(/[{}[\]]/g,"").trim();return n.length>0&&!g2.has(n)}function b2(t){let e=t.__ref,n=t.tag||"div",r=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"||Ut.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||En(a)||wt[a]||Tt&&Tt.has(a)||Oe(n,a)||(ht()&&y2(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),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(){r&&st(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&rt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function _2(t,e){if(!(!Array.isArray(e)||e.length===0))for(let n=0;n<e.length;n++){let r=e[n];try{typeof r=="function"?r(t,t.state,t.context):typeof r=="string"&&t.state?.[r]}catch{}}}function Ft(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return _2(t,e),n.apply(this,r)}}function dc(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ct(t,e){return()=>t.path.join(".")+"::"+e}var X0=new Set;function Gt(t,e,n){if(!ht())return;let r=ct(t,e)();X0.has(r)||(X0.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var Z0=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,x2=(t,e)=>{let n;try{n=String(t)}catch{return}if(!n.includes("{{"))return;Z0.lastIndex=0;let r;for(;(r=Z0.exec(n))!==null;)r[2].includes("{{")&&e.add(r[2])},w2=(t,e)=>!En(t)&&!ks(e,t),J0=(t,e,n,r)=>{if(typeof e=="string"){e.includes("{{")&&n.add(e);return}typeof e=="function"&&w2(t,r)&&x2(e,n)},S2=["attr","aria","data","metadata"],k2=t=>{if(S2.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},v2=t=>{let e=new Set,n=t.tag||"div";for(let r of Object.keys(t)){let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(s&&typeof s=="object"&&!Array.isArray(s)){if(!k2(r))continue;for(let i in s)J0(i,s[i],e,n);continue}J0(r,s,e,n)}return e};function bk(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=v2(t);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(b2(t),typeof t.text=="function"){let c=t.text,l=Ft(t,t.textDeps,c),f=G(()=>{if(!n.contentManaged)try{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=Mt.call(t,u,t.state)),_s(t,u))}catch(u){Gt(n,"text",u)}},{depth:n.path.length,label:ct(n,"text")});n.__effects.push(f),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=G(()=>{if(n.contentManaged)return;let f=Mt.call(t,c,t.state);f!=null&&(t.text=f),t.node&&_s(t,f??"")},{depth:n.path.length,label:ct(n,"text")});n.__effects.push(l),n.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!Ut.has(c)&&!En(c)&&!n.__exec[c]&&!Eu(s,c)){if(wt[c]){let l=t[c],f=Ft(t,t[c+"Deps"],l),u=c,d,h=null,p=null,g,m=G(()=>{let y=t.context?.designSystem;y&&st(y);try{let x=f(t,t.state,t.context);hu();let b;try{b=wt[u](x,t,t.state,t.context)}finally{gu()}if(Array.isArray(b)){let w={};for(let S of b)if(S)for(let A in S)w[A]=S[A];b=w}let _=u==="show"||u==="hide";if(b&&t.node&&C2(b)){let w=Ou(b);if(w===null||w!==g){g=w;let S=ge(b,null,t.context?.cssPrefix),A=S?S.split(" ").filter(Boolean):null;if(t.node.classList){if(p)for(let P of p)t.node.classList.remove(P);if(A&&A.length)for(let P of A)t.node.classList.add(P);p=A}}d=void 0,h=null}else if(b&&t.node){if(p){for(let S of p)t.node.classList.remove(S);p=null,g=void 0}let w=Ou(b);if(w===null||w!==d||!Tu(t.node,h)){d=w;let S=ek(t,b);h=Au(t.node,S)}}else t.node&&_&&(d=void 0,h=null,t.node.style.display="")}finally{y&&rt()}},{depth:n.path.length,label:ct(n,u)});n.__effects.push(m),n.__exec[c]=l}else if(Tt&&Tt.has(c)){let l=t[c],f=Ft(t,t[c+"Deps"],l),u=c,d,h=null,p=G(()=>{let g=t.context?.designSystem;g&&st(g);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!Tu(t.node,h)){d=y;let x={[u]:m},b=ek(t,x);h=Au(t.node,b)}}else d=void 0,h=null,t.node.style[u]=""}finally{g&&rt()}},{depth:n.path.length,label:ct(n,u)});n.__effects.push(p),n.__exec[c]=l}}if(typeof t.html=="function"){let c=t.html,l=Ft(t,t.htmlDeps,c),f=G(()=>{let u=t.context?.designSystem;u&&st(u);try{let d=l(t,t.state,t.context);t.node&&d!=null&&typeof d!="function"&&(t.node.innerHTML=d)}finally{u&&rt()}},{depth:n.path.length,label:ct(n,"html")});n.__effects.push(f),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=Ft(t,t.valueDeps,c),f=G(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Mt.call(t,u,t.state)),tk(t,u)}catch(u){Gt(n,"value",u)}},{depth:n.path.length,label:ct(n,"value")});n.__effects.push(f),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=G(()=>{try{tk(t,Mt.call(t,c,t.state))}catch(f){Gt(n,"value",f)}},{depth:n.path.length,label:ct(n,"value")});n.__effects.push(l),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=Ft(t,t.styleDeps,c),f,u=null,d=G(()=>{let h=l(t,t.state,t.context),p=Ou(h);(p===null||p!==f||!Tu(t.node,u))&&(f=p,E2(t.node,u,h),no(t.node,h),u=Au(t.node,h))},{depth:n.path.length,label:ct(n,"style")});n.__effects.push(d),n.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let l=t.style[c];if(typeof l!="function")continue;let f=Ft(t,dc(t.styleDeps,c),l),u,d=null,h=G(()=>{try{let p=f(t,t.state,t.context);if(t.node){let g=c+":"+String(p);if(g!==u||!Tu(t.node,d)){u=g;let m={[c]:p};no(t.node,m),d=Au(t.node,m)}}}catch(p){Gt(n,"style."+c,p)}},{depth:n.path.length,label:ct(n,"style."+c)});n.__effects.push(h)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let l=Ft(t,dc(t.attrDeps,c),t.attr[c]),f=c,u=G(()=>{try{let d=l(t,t.state,t.context);typeof d=="string"&&d.includes("{{")&&(d=Mt.call(t,d,t.state)),t.node?.setAttribute&&(d==null||d===!1&&!an(f)?t.node.removeAttribute(f):typeof d!="function"&&typeof d!="object"&&t.node.setAttribute(f,ne(f,d)))}catch(d){Gt(n,"attr."+f,d)}},{depth:n.path.length,label:ct(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let l=t.attr[c],f=c,u=G(()=>{try{let d=Mt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,ne(f,d??""))}catch(d){Gt(n,"attr."+f,d)}},{depth:n.path.length,label:ct(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let l=t.aria[c];if(typeof l=="string"&&l.includes("{{")){let h=l,p="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),g=G(()=>{try{let m=Mt.call(t,h,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(p,ne(p,m??""))}catch(m){Gt(n,"aria."+c,m)}},{depth:n.path.length,label:ct(n,"aria."+c)});g._attrName=p,n.__effects.push(g);continue}if(typeof l!="function")continue;let f=Ft(t,dc(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),d=G(()=>{try{let h=f(t,t.state,t.context);if(!t.node?.setAttribute)return;h==null?t.node.removeAttribute(u):typeof h!="function"&&typeof h!="object"&&t.node.setAttribute(u,ne(u,h))}catch(h){Gt(n,"aria."+c,h)}},{depth:n.path.length,label:ct(n,"aria."+c)});d._attrName=u,n.__effects.push(d)}if(t.data&&typeof t.data=="object")for(let c in t.data){let l=t.data[c];if(typeof l=="string"&&l.includes("{{")){let p=l,g="data-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),m=G(()=>{try{let y=Mt.call(t,p,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,y??"")}catch(y){Gt(n,"data."+c,y)}},{depth:n.path.length,label:ct(n,"data."+c)});m._attrName=g,n.__effects.push(m);continue}if(typeof l!="function")continue;let f=Ft(t,dc(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),h=G(()=>{try{let p=f(t,t.state,t.context);if(!t.node?.setAttribute)return;p==null||p===!1?t.node.removeAttribute(d):typeof p!="function"&&typeof p!="object"&&t.node.setAttribute(d,p===!0?"":p)}catch(p){Gt(n,"data."+c,p)}},{depth:n.path.length,label:ct(n,"data."+c)});h._attrName=d,n.__effects.push(h)}let i=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(i)for(let c in i){if(typeof i[c]!="function")continue;let l=Ft(t,dc(t.classDeps,c),i[c]),f=G(()=>{try{let u=l(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(c):t.node.classList.remove(c)}catch(u){Gt(n,"class."+c,u)}},{depth:n.path.length,label:ct(n,"class."+c)});n.__effects.push(f)}!r&&typeof t.if=="function"&&_k(t,n,t.if);for(let c of Object.keys(t)){if(Ut.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||En(c))continue;let f=t[c];n.__exec[c]=f;let u=t.tag||"div";if(Oe(u,c)&&!ks(u,c)){let d=sn(c)||c,h=Ft(t,t[c+"Deps"],f),p=G(()=>{try{let g=h(t,t.state,t.context);typeof g=="string"&&g.includes("{{")&&(g=Mt.call(t,g,t.state)),t.node?.setAttribute&&(g==null||g===!1&&!an(d)?t.node.removeAttribute(d):typeof g!="function"&&typeof g!="object"&&(d==="src"&&"src"in t.node?t.node.src=g:t.node.setAttribute(d,ne(d,g))))}catch(g){Gt(n,c,g)}},{depth:n.path.length,label:ct(n,c)});p._attrName=d.toLowerCase(),n.__effects.push(p)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Ut.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||En(c)||ks(a,c)||Qr[c]||!Oe(a,c))continue;let u=sn(c)||c,d=G(()=>{try{let h=Mt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,ne(u,h??""))}catch(h){Gt(n,c,h)}},{depth:n.path.length,label:ct(n,c)});d._attrName=u.toLowerCase(),n.__effects.push(d)}if(D2(t),M2(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=G(()=>{let h=[];for(let y=0;y<l.length;y++){let x=l[y];try{h[y]=typeof x=="function"?x(t,t.state,t.context):t.state?.[x]}catch{h[y]=void 0}}if(!f){f=!0,u=h;return}let p=h.length!==u.length;for(let y=0;!p&&y<h.length;y++)h[y]!==u[y]&&(p=!0);let g=u;if(u=h,!p)return;let m=t.context?.designSystem;m&&st(m);try{c(t,t.state,t.context,{prev:g,next:h})}catch(y){if(t.context?.plugins?.length&&Pt("error",t,{hook:"onStateUpdate",error:y})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',y),t.context?.strictMode)throw y}finally{m&&rt()}},{depth:n.path.length,label:ct(n,"onStateUpdate")});n.__effects.push(d)}$2(t)}function Q0(t){let e=t.parent,n=e?.node;if(!n||!t.node){Pk(t,t.parent);return}let r=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===n){r=a.node;break}}r?n.insertBefore(t.node,r):n.appendChild(t.node)}function _k(t,e,n){let r=Ft(t,t.ifDeps,n),o=G(()=>{let s;try{s=r(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(a){console.error("[smbls] onRemove error:",a)}}else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=rr(t)),t.node&&(t.node.ref=t),Q0(t),tb(t),ie("Render",t,{}),Jy(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=nr(t)),ie("Init",t,{}),t.node||(t.node=rr(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}ie("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Ok(t,{}),bk(t,{skipIfEffect:!0}),tb(t),Ek(t),Ak(t),Rk(t,{}),Q0(t),ie("Create",t,{}),ie("Complete",t,{}),ie("Render",t,{}),ie("RenderRouter",t,{}),Jy(t,{})}},{depth:e.path.length,label:ct(e,"if")});e.__effects.push(o)}function _s(t,e){let n=t.node;if(!n)return;let r=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){n.nodeValue!==r&&(n.nodeValue=r);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==n&&(s=null),!s){let i=n.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==r&&(s.nodeValue=r):n.firstChild?(s=(n.ownerDocument||t.context?.document||globalThis.document).createTextNode(r),n.insertBefore(s,n.firstChild)):(n.textContent=r,s=n.firstChild&&n.firstChild.nodeType===3?n.firstChild:null),o&&(o.__textNode=s||null)}function tk(t,e){let n=t.node;if(!n||!("value"in n))return;let r=e==null?"":String(e);if(n.value===r)return;let o=typeof document<"u"&&document.activeElement===n,s=o&&typeof n.selectionStart=="number"?n.selectionStart:null,i=o&&typeof n.selectionEnd=="number"?n.selectionEnd:null;if(n.value=r,o&&s!=null&&i!=null)try{n.setSelectionRange(s,i)}catch{}let a=t.__ref&&t.__ref.__autoGrow;a&&a.active&&a.resize()}function tb(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&_s(t,t.text),Ck(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let n=String(t.value);e.value!==n&&(e.value=n)}if(t.style&&typeof t.style=="object"){let n=t.style;for(let r in t.style)if(typeof t.style[r]=="function"){n={};for(let o in t.style)typeof t.style[o]!="function"&&(n[o]=t.style[o]);break}no(e,n)}if(t.attr&&typeof t.attr=="object")for(let n in t.attr){let r=t.attr[n];typeof r=="function"||typeof r=="object"||r!=null&&(typeof r=="string"&&r.includes("{{")||r===!1&&!an(n)||e.setAttribute&&e.setAttribute(n,ne(n,r)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&e.setAttribute&&e.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(let n in t.data){let r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||typeof r=="string"&&r.includes("{{")||e.dataset&&(e.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){let n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&e.classList.add(r));else if(typeof n=="object")for(let r in n){let o=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];o&&e.classList.add(typeof o=="string"?o:r)}}}}function Ou(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function C2(t){if(!t||typeof t!="object")return!1;for(let e in t){let n=t[e];if(n&&typeof n=="object"&&!Array.isArray(n))return!0}return!1}function Au(t,e){if(!t||!t.style||!e)return null;let n=t.style,r=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=$u(o);r.push(i,sb(n,i),xk(n,i))}return r}function sb(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function xk(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function $u(t){return Pu(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function E2(t,e,n){if(!t||!t.style||!e||!e.length)return;let r=t.style,o=new Set;if(n&&typeof n=="object")for(let s in n)n[s]==null||s.charAt(0)==="&"||o.add($u(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||sb(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function Tu(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(sb(n,e[r])!==e[r+1]||xk(n,e[r])!==e[r+2])return!1;return!0}var Pu=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function A2(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add($u(n)));return e}function T2(t,e,n,r){let o=t.__ref;if(!o)return;let s=null;if(n)for(let i of n){if(r&&r.has(i))continue;let a=e[i];if(a==null||typeof a=="object")continue;let c=$u(i);uc[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function wk(t,e){let n=t.__ref,r=n&&n.__declaredLonghands;if(!r||!e)return null;let o=null;for(let s in r){if(e.has(s))continue;let i=uc[s],a=!1;for(let c=0;c<i.length;c++)if(e.has(i[c])){a=!0;break}a&&(o||(o={}),o[s]=r[s])}return o}function ek(t,e){let n=t.node;no(n,e);let r=A2(e);if(!r)return e;let o=t.__ref;if(o)if(o.__inlineCssKeys)for(let i of r)o.__inlineCssKeys.add(i);else o.__inlineCssKeys=new Set(r);let s=wk(t,r);return s?(no(n,s),Object.assign({},e,s)):e}function O2(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=wk(t,e.__inlineCssKeys);n&&no(t.node,n)}function no(t,e){if(!t||!e||!t.style)return;let n=null;for(let r in e){let o=e[r];if(o!=null){if(r.charAt(0)==="&"&&typeof o=="object"){n||(n={}),n[r]=o;continue}try{let s=String(o),i=Pu(r)?r:r.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{}}}n&&R2(t,n)}function R2(t,e){let n=`_ds${uk.scopedStyleId++}`;t.classList.add(n);let r=t.ownerDocument,o=r.querySelector("style[data-smbls-scoped]");o||(o=r.createElement("style"),o.setAttribute("data-smbls-scoped",""),r.head.appendChild(o));let s="";for(let i in e){let a="."+n,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 d in l){let h=l[d];if(typeof h=="object"){let p=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),g="";for(let m in h)g+=`${m.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${h[m]};`;u+=Sn(`${p} { ${g} }`,p)+`
57
57
  `}else f+=`${d.replace(/[A-Z]/g,p=>"-"+p.toLowerCase())}: ${h};`}f&&(s+=Sn(`${c} { ${f} }`,c)+`
58
- `),u&&(s+=u)}}s&&(o.textContent+=s)}var ek=new Set;function nk(t){if(!Array.isArray(t))return"";let e=[];for(let n=0;n<t.length;n++)typeof t[n]=="string"&&t[n].length&&e.push(t[n]);return e.sort(),e.join("|")}function R2(t,e,n){let r=nk(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(nk(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";ek.has(s)||(ek.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${n.join(", ")||"(none)"}], probed [${Array.isArray(o)?o.join(", "):String(o)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function P2(t){let e=t.subscribeTo,n=typeof e=="function",r=e;if(n)try{r=e(t,t.state,t.context)}catch{r=null}if(n&&ht()&&R2(t,e,Array.isArray(r)?r:[]),!Array.isArray(r)||r.length===0)return;let o=t.__ref;for(let s=0;s<r.length;s++){let i=r[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=G(()=>{let d=t.state&&(St(t.state)?t.state.root:null);if(!d||!St(d))return;let h=d;h=h[c];for(let g=0;g<l.length&&!(h==null||typeof h!="object");g++)if(St(h))h=h[l[g]];else break;if(!f.value)return;let p=!1;if(typeof t.onBeforeUpdate=="function"){let g=t.context?.designSystem;g&&st(g);try{if(Sy(o)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>kn(o,!1),y=>{kn(o,!0),t.context?.plugins?.length&&Pt("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}):(kn(o,!1),m===!1&&(p=!0))}}catch(m){kn(o,!0),t.context?.plugins?.length&&Pt("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{g&&rt()}}if(!p&&t.node&&o.__effects)for(let g=0;g<o.__effects.length;g++){let m=o.__effects[g];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!p&&typeof t.onUpdate=="function"){let g=t.context?.designSystem;g&&st(g);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Pt("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{g&&rt()}}},{depth:o.path.length,label:ct(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function ib(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function ab(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let n=e.context?.designSystem?.media?.[t.slice(1)];return n?/^@(media|supports|container)\b/.test(n)?n:`@media ${n}`:t}var rk=new Set;function D2(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;rk.has(r)||(rk.add(r),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function Es(t,e,n,r){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(wt[a]){let u=wt[a](c,e,e.state,e.context);if(u){let d=Array.isArray(u)?u:[u];for(let h of d)h&&Object.assign(o,h)}}else o[a]=c;if(l)for(let u in o)f.has(u)||s.add(u)};for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=t[a];if(typeof c=="function"&&(c=c(e,e.state,e.context)),c==null||typeof c=="function")continue;if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let h in c){let p=c[h];if(typeof p=="function"&&(p=p(e,e.state,e.context)),p==null||typeof p=="function")continue;let g=typeof e[h]=="function"&&(wt[h]||Tt&&Tt.has(h))||!!(r&&r.has(h));i(h,p,g)}continue}if(ib(a,e)){let h=Es(c,e,!1,r);Object.keys(h).length&&(o[`[data-theme="${a.slice(1)}"] &`]=h);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){ht()&&D2(a,e);continue}let u=ab(a,e),d=Es(c,e,!1,r);Object.keys(d).length&&(o[u]=d);continue}let l=typeof e[a]=="function"&&(wt[a]||Tt&&Tt.has(a)),f=!!(r&&r.has(a));i(a,c,l||f)}if(n)for(let a in o)s.add(a);for(let a of s){let c=o[a];typeof c=="string"&&!c.includes("!important")&&(o[a]=c+" !important")}return o}var Du=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function wk(t,e){for(let n in e){let r=e[n];t[n]=Du(r)?wk(Du(t[n])?t[n]:{},r):r}return t}function I2(t,e){if(!Du(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Du(o)&&(n=wk(n||{},o))}return n}function cb(t,e){if(e===void 0&&(e=0),e>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&cb(t[n],e+1))return!0}return!1}function Sk(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(ib(t,n)){let s=Es(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=ab(t,n),o=Es(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function L2(t){let e=t.__ref;for(let n of Object.keys(t)){if(!Qy(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!cb(r))continue;let o=null,s,i=G(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&st(a);let c,l=!1;try{let f=Sk(n,r,t),u=f?Ou(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=ge({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&rt()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:ct(e,"cssBlock("+n+")")});e.__effects.push(i)}}function $2(t){let e=t.__ref;e.__conditionalRunners=[];let n=new Map;for(let r of Object.keys(t)){let o=r.charAt(0);if(o!=="."&&o!=="!")continue;let s=r.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let p=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${r}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${o}\` is read as one prop name. Nest the selector inside instead: \`${o}${p}: { '${s.slice(p.length)}': {...} }\`.`)}continue}let i=t[r];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=new Set;for(let p in i){if(!Object.prototype.hasOwnProperty.call(i,p))continue;let g=p.charAt(0),m=i[p];(g===":"||g==="@"||g==="&"||g==="[")&&m&&typeof m=="object"&&!Array.isArray(m)||l.add(p)}let f=()=>{let p,g=t[s];if(g===void 0){let x=!!t.state&&s in t.state,b=t.state?t.state[s]:void 0;if(x||b!==void 0)p=b;else{let _=t.context?.cases?.[s];if(_===void 0)return;try{p=typeof _=="function"?_.call(t,t):_}catch(w){p=!1,e.__conditionalError=w,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${r}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,w?.message||w)}}}else if(typeof g=="function")try{p=g(t,t.state,t.context)}catch(x){p=!1,e.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${r}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}else p=g;let m=a?!p:!!p;if(!t.node||m===c.lastMatch)return;c.lastMatch=m;let y=t.context?.designSystem;y&&st(y);try{if(m){let x={},b={},_=!1;for(let k in i){if(!Object.prototype.hasOwnProperty.call(i,k))continue;let A=i[k],P=k.charAt(0);if((P===":"||P==="@"||P==="&"||P==="[")&&A&&typeof A=="object"&&!Array.isArray(A)){if(ib(k,t)){let E=Es(A,t,!1,l);Object.keys(E).length&&(b[`[data-theme="${k.slice(1)}"] &`]=E,_=!0)}else{let E=ab(k,t),M=Es(A,t,!1,l);Object.keys(M).length&&(b[E]=M,_=!0)}continue}let I=typeof A=="function"?A(t,t.state,t.context):A;if(I!=null)if(wt[k]){let E=wt[k](I,t,t.state,t.context);if(E){let M=Array.isArray(E)?E:[E];for(let X of M)X&&Object.assign(x,X)}}else(Tt&&Tt.has(k)||Pu(k))&&(x[k]=I)}let w=Object.keys(x);if(w.length){no(t.node,x);for(let k of w)n.set(k,r);c.appliedKeys=w}else c.appliedKeys=null;if(_){let k=ge(b,null,t.context?.cssPrefix,{state:!0}),A=k?k.split(" ").filter(Boolean):[];if(A.length&&t.node.classList){for(let P of A)t.node.classList.add(P);c.appliedClasses=A}else c.appliedClasses=null}else if(c.appliedClasses){for(let k of c.appliedClasses)t.node.classList.remove(k);c.appliedClasses=null}}else{if(c.appliedKeys){for(let x of c.appliedKeys)n.get(x)===r&&(Pu(x)?t.node.style.removeProperty(x):t.node.style[x]="",n.delete(x));c.appliedKeys=null}if(c.appliedClasses){for(let x of c.appliedClasses)t.node.classList.remove(x);c.appliedClasses=null}}}finally{y&&rt()}};e.__conditionalRunners.push(f);let u=Ft(t,t[s+"Deps"],f),d=G(u,{depth:e.path.length,label:ct(e,"conditional("+r+")")}),h=e.__exec&&e.__exec[s]||t[s];d._sources.size===0&&typeof h=="function"&&ht()&&console.warn(`[smbls] conditional \`${r}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${s}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(d)}}var Xy=new WeakSet;function M2(t){let e=t.ownerDocument;!e||Xy.has(e)||(Xy.add(e),queueMicrotask(()=>{Xy.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var Zy=new WeakSet,ok=!1;function sk(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function eb(t,e){let n={...t};for(let r in e){let o=e[r],s=n[r];n[r]=o&&typeof o=="object"&&s&&typeof s=="object"?eb(s,o):o}return n}function kk(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=kk(o,e);Object.keys(s).length&&(n[r]=s)}else e.has(r)||(n[r]=o)}return n}function vk(t){let{node:e}=t;if(!e)return;if(ok||(ok=!0,ge({display:"none"})),Zy.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Zy.add(t);let n=t.context?.designSystem;n&&st(n),hu();try{let r={},o=!1,s=[],i=null,a=null,c=null,l=(p,g)=>{if(g&&typeof g=="object"&&sk(p)){a||(a={});let m=a[p];m&&(g=eb(m,g)),a[p]=g}else(g===null||typeof g!="object")&&(c||(c=new Set),c.add(p));r[p]=g};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&wt.theme){let p=wt.theme(t.theme,t,t.state,t.context);if(p){let g=m=>{for(let y in m){let x=m[y];x&&typeof x=="object"&&sk(y)&&(i||(i={}),i[y]=x),r[y]=x}};if(Array.isArray(p))for(let m of p)m&&g(m);else g(p);o=!0}}let f=(p,g)=>{if(wt[p]){let m=wt[p](g,t,t.state,t.context);if(m){if(Array.isArray(m)){for(let y of m)if(y)for(let x in y)l(x,y[x])}else for(let y in m)l(y,m[y]);o=!0}}else if(Tt&&Tt.has(p))g!=null&&typeof g!="object"&&(l(p,g),o=!0);else if(p.charCodeAt(0)===45)g!=null&&typeof g!="object"&&(l(p,g),o=!0);else if((p.charAt(0)==="&"||p.charAt(0)==="@"||p.charAt(0)===":"||p.charAt(0)==="[")&&g&&typeof g=="object"&&!Array.isArray(g)){if(cb(g))return;let m=Sk(p,g,t);m&&(l(m.cssProp,m.block),o=!0)}};if(typeof t.class=="string"){let p=I2(t.class,t.context?.designSystem?.class);if(p)for(let g in p)f(g,p[g])}let u=c?new Set(c):null,d=t.tag||"div";for(let p of Object.keys(t)){if(typeof t[p]=="function"||Ut.has(p)||p==="theme")continue;let g=p.charCodeAt(0);g>=65&&g<=90||En(p)||Eu(d,p)||f(p,t[p])}if(i)for(let p in i){let g=c?kk(i[p],c):i[p];a&&a[p]&&(g=eb(g,a[p])),Object.keys(g).length?r[p]=g:delete r[p]}if(A2(t,r,c,u),o){r.display&&String(r.display).includes("!important")&&(e.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);let p=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof p=="string"&&p!==""&&r.display&&r.display!==p&&(r.display=p);let g=ge(r,null,t.context?.cssPrefix);if(s=g?g.split(" ").filter(Boolean):[],g&&e.classList){let m=s,y=!1;for(let x of m)e.classList.add(x),y||(x.charCodeAt(0)===95&&x.charCodeAt(1)===99||x.charCodeAt(0)===95&&x.indexOf("_c",1)!==-1)&&(y=!0);y&&M2(e)}}let h=t.__ref;if(h){let p=h.__staticCssClasses;if(p&&e.classList){let g=new Set(s);for(let m of p)g.has(m)||e.classList.remove(m)}h.__staticCssClasses=s}T2(t)}finally{gu(),n&&rt(),Zy.delete(t)}}var x0=t=>!!wt[t]||!!(Tt&&Tt.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function w0(t){t&&t.node&&vk(t)}function Ck(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,ne(i,s))}let n=wy(t);for(let o in n){let s=n[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let r=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||Ut.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!En(o)&&!ks(r,o)&&Oe(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!Qr[o])continue;i=Mt.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!an(sn(o)||o))continue;let a=sn(o)||o;e.setAttribute(a,ne(a,i))}}}function S0(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||En(e))return;let o=t.tag||"div";if(ks(o,e)||!Oe(o,e))return;let s=sn(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let u=0;u<a.length;u++){let d=a[u];d&&d._attrName===i&&!d._disposed&&typeof d._execute=="function"&&(c=!0,d._execute())}if(c)return;let l=t[e],f=Qr[e];if(f&&l!=null){let u=f(t);u!==void 0&&(l=u)}typeof l=="string"&&l.includes("{{")&&(l=Mt.call(t,l,t.state)),l==null||l===!1&&!an(s)?n.removeAttribute(s):typeof l!="function"&&typeof l!="object"&&n.setAttribute(s,ne(s,l))}function F2(t,e){let n=t.node,r=t.__ref,o=r.__autoGrow;if(!e){if(o&&o.active){try{n.removeEventListener("input",o.resize)}catch{}ak(o),eo.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),ck(n,o,!1),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=r.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!n.isConnected){yc(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,ik(t,o);return}o.awaitingLayout=!1;let i=n.style.height;n.style.height="0px";let a=n.scrollHeight;if(!(a>0)){n.style.height=i;return}let c=B2(n),l=c!=null&&a>c;n.style.height=(l?c:a)+"px",ck(n,o,l),o.lastMeasure=a,o.lastWidth=n.clientWidth,ik(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}ak(o),eo.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,j2(t,o));let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""):n.style.maxHeight=s,o.appliedMax=s),o.resize()}function yc(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),eo.add(t),Lu())}function N2(){let t=Array.from(eo);eo.clear();for(let e=0;e<t.length;e++){let n=t[e],r=n.node,o=n.__ref?.__autoGrow;if(!(!r||!o||!o.active)){if(!r.isConnected){o.firstAttemptAt==null&&(o.firstAttemptAt=Cs()),o.attachAttempts+=1,o.attachAttempts<=pk&&Cs()-o.firstAttemptAt<hk&&(eo.add(n),Lu());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function ik(t,e){if(e.watch)return;let n=t.node;if(!n)return;let r=n.ownerDocument&&n.ownerDocument.defaultView,o=r&&r.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof o!="function")return;let s=()=>{if(!e.active||!n.isConnected||!(n.scrollHeight>0))return;if(e.awaitingLayout){e.awaitingLayout=!1,yc(t,!0);return}let a=n.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,yc(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function ak(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function j2(t,e){if(e.fontsHooked)return;e.fontsHooked=!0;let n=t.node&&t.node.ownerDocument,r=n&&n.fonts&&n.fonts.ready;!r||typeof r.then!="function"||r.then(()=>{e.active&&t.node&&yc(t,!0)},()=>{})}function B2(t){let e=t.ownerDocument&&t.ownerDocument.defaultView,n;try{n=e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{n=null}if(!n)return null;let r=f=>typeof f=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(f)?parseFloat(f):null,o=r(n.maxHeight);if(o==null||!(o>0))return null;let s=(r(n.paddingTop)||0)+(r(n.paddingBottom)||0),i=(r(n.borderTopWidth)||0)+(r(n.borderBottomWidth)||0),a=n.boxSizing==="border-box"?o-i:o+s,c=r(n.lineHeight);if(!(c>0))return a;let l=Math.floor((a-s)/c+1e-6);return l>=1?l*c+s:a}function ck(t,e,n){n?e.appliedScroll||(t.style.overflowY="auto",e.appliedScroll=!0):e.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),e.appliedScroll=!1)}var lk=["srcObject","muted"],V2=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function U2(t){let e=t.node,n=t.__ref;if(!(!e||!n))for(let r=0;r<lk.length;r++){let o=lk[r],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=V2(o,a);if(e[o]!==c)try{e[o]=c}catch(l){Gt(n,o,l)}};if(typeof s=="function"){let a=Ft(t,t[o+"Deps"],s),c=G(()=>{try{i(a(t,t.state,t.context))}catch(l){Gt(n,o,l)}},{depth:n.path.length,label:ct(n,o)});n.__effects.push(c),n.__exec[o]=s}else i(s);o==="srcObject"&&(n.__releaseMedia=()=>{try{e.srcObject!=null&&(e.srcObject=null)}catch{}})}}function Ek(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let n=t.__ref,r=t.autoGrow,o=typeof r=="function"?Ft(t,t.autoGrowDeps,r):null,s=G(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===r&&o?o:i)(t,t.state,t.context)}catch{a=null}F2(t,a)},{depth:n.path.length,label:ct(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var Ak=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Tk(t,e){for(let n of Object.keys(t)){if(!En(n)||Ak.has(n))continue;let r=lu(n);if(r){fu(r,t,t[n]);continue}let o=t[n];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(c){return t.call(i,c)}}if(typeof o!="function")continue;let s=u2(n);or.has(s)||ms(d2(s),t,o)}z2(t)}function z2(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let d of Ak){let h=t[d];typeof h=="function"&&(n[d]=h,r=!0)}if(!r)return;let o=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let p=h.clientX-i,g=h.clientY-a,m=Date.now()-c;if(m>s)return;let y=Math.abs(p),x=Math.abs(g);if(Math.max(y,x)<o)return;let b;if(y>x*1.2)b=p<0?"left":"right";else if(x>y*1.2)b=g<0?"up":"down";else return;let _="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),w=n[_],k=n.onSwipe;w&&w.call(t,d,t,t.state,t.context),k&&k.call(t,{direction:b,dx:p,dy:g,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function bc(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=bc(o,s):n[r]=s}return n}function nb(t,e,n,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",i=t.context?.document||globalThis.document,a=s?null:i?.createDocumentFragment();if(!s&&!a)return;let c=t.childProps,l=t.childrenAs,f=m=>{let y=e[m],x=y;(typeof y=="string"||typeof y=="number")&&(y={text:y});let b=c;if(typeof c=="function")try{b=c(t,y)}catch{b=null}if(l==="state"){let w=x;(typeof x=="string"||typeof x=="number")&&(w={value:x,text:x}),y=b?{...b,state:w}:{state:w}}else b&&(y=bc(b,y));if(o&&!y.ignoreChildExtends)if(y.extends){let w=Array.isArray(y.extends)?y.extends:[y.extends],k=Array.isArray(o)?o:[o];y={...y,extends:[...k,...w]}}else y={...y,extends:o};let _=gk(y?.key,x,m);try{return re(y,t,_,n)}catch(w){if(typeof console<"u"&&console.error){let k=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${_}" failed to construct at ${k} (initial render, skipping this row):`,w?.message||w)}return null}},u=t.__ref;if(!(r===!0&&!s&&!!u&&(n?.mountYield===!0||t.yieldChildren===!0))){for(let m=0;m<e.length;m++){let y=f(m);!s&&y?.node&&a.appendChild(y.node)}return s||t.node.appendChild(a),!0}let h=u.__childrenChunkGen=(u.__childrenChunkGen||0)+1;jy();let p=null,g=m=>{if(u.__disposed||u.__childrenChunkGen!==h){p&&p.parentNode&&p.remove();return}for(let y=m;y<e.length;y++){let x=f(y);if(x?.node&&(p?t.node.insertBefore(x.node,p):a.appendChild(x.node)),y+1<e.length&&Ny()){p||(p=i.createComment("smbls-mount"),a.appendChild(p),t.node.appendChild(a));let b=y+1;Vy(()=>g(b));return}}p?(p.remove(),t.node.tagName==="SELECT"&&Iu(t,!0)):t.node.appendChild(a)};return g(0),By(),!0}if(typeof e=="string"){let s=mk(e,t);if(Array.isArray(s))return nb(t,s,n,r)}if(typeof e=="object")for(let s in e){if(Ut.has(s))continue;let i=e[s];if(!(i==null||i===!1)){if((typeof i=="string"||typeof i=="number")&&(i={text:i}),t.childProps&&(i=bc(t.childProps,i)),o&&!i.ignoreChildExtends)if(i.extends){let a=Array.isArray(i.extends)?i.extends:[i.extends],c=Array.isArray(o)?o:[o];i={...i,extends:[...c,...a]}}else i={...i,extends:o};re(i,t,s,n)}}}function Iu(t,e){let n=t.node;if(!n||n.tagName!=="SELECT")return;let r=n.options;if(!r||!r.length)return;let o=t.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value,typeof f=="string"&&f.includes("{{")&&(f=Mt.call(t,f,t.state));let u=f==null?"":String(f);n.value!==u&&(n.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<r.length;f++)r[f].defaultSelected&&(l=f);l>=0&&n.selectedIndex!==l&&(n.selectedIndex=l)}function Ok(t,e){let{children:n,content:r}=t,o=t.childExtends;if(typeof n=="function"){let u=n;try{n=u(t,t.state,t.context)}catch(m){if(n=void 0,typeof console<"u"&&console.error){let y=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${y} (initial run, treating as empty):`,m?.message||m)}}t.children=n;let d=t.__ref,h=!1,p=Ft(t,t.childrenDeps,u),g=G(()=>{let m=h;h=!0;let y;try{y=p(t,t.state,t.context)}catch(I){if(typeof console<"u"&&console.error){let E=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${E}${m?"":" (initial tracking run)"}:`,I?.message||I)}return}if(!m||y===t.children)return;t.children=y,d.__childrenChunkGen!=null&&d.__childrenChunkGen++;let x=typeof t.onContentUpdate=="function",b=x?[]:null,_=x?[]:null,w=x?[]:null;if(Array.isArray(y)&&t.childrenAs==="state"){let I=t.childProps,E=[],M=new Map;for(let B=0;B<y.length;B++){let gt=y[B],F=I;if(typeof I=="function")try{F=I(t,gt)}catch{F=null}let q=gk(F&&F.key,gt,B);E.push(q),M.set(q,{rawChild:gt,childProps:F})}let X=new Set(E),vt=d.__children.slice();for(let B of vt)if(!X.has(B)){let gt=t[B];gt?.remove&&gt.remove(),delete t[B],_&&_.push(B)}let Ct=t.childExtends,at=t.tag==="fragment",N=t.context?.document||globalThis.document,H=at?null:N?.createDocumentFragment(),mt=new Set;for(let B of E){let gt=M.get(B),F=gt.rawChild,q=t[B];if(q&&q.state){if(F&&typeof F=="object"){let Ot=q.state,Bt=Ot.$replace||Ot.replace,mo=Ot.$update||Ot.update;try{if(typeof Bt=="function")Bt.call(Ot,F);else if(typeof mo=="function"){for(let le in Ot)if(!(le==="__element"||le==="root"||le==="parent"||le==="update")&&!Object.prototype.hasOwnProperty.call(F,le))try{Ot[le]=void 0}catch{}mo.call(Ot,F)}else for(let le in F)Ot[le]=F[le]}catch(le){if(typeof console<"u"&&console.error){let Qs=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${B}" failed to patch at ${Qs} (reconcile, keeping its previous data for this pass):`,le?.message||le)}}}w&&w.push(B);continue}let yt=F;(typeof F=="string"||typeof F=="number")&&(yt={value:F,text:F});let Z=gt.childProps,Y=Z?{...Z,state:yt}:{state:yt};if(Ct&&!Y.ignoreChildExtends)if(Y.extends){let Ot=Array.isArray(Y.extends)?Y.extends:[Y.extends],Bt=Array.isArray(Ct)?Ct:[Ct];Y={...Y,extends:[...Bt,...Ot]}}else Y={...Y,extends:Ct};let U;try{U=re(Y,t,B,e)}catch(Ot){if(typeof console<"u"&&console.error){let Bt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${B}" failed to construct at ${Bt} (reconcile, skipping this row):`,Ot?.message||Ot)}mt.add(B);continue}!at&&U?.node&&H&&H.appendChild(U.node),b&&b.push(B)}if(!at&&H&&H.childNodes.length&&t.node&&t.node.appendChild(H),!at&&t.node){let B=null;for(let gt of E){let F=t[gt]?.node;if(!F)continue;let q=B?B.nextSibling:t.node.firstChild;F!==q&&t.node.insertBefore(F,q),B=F}}d.__children=mt.size?E.filter(B=>!mt.has(B)):E,x&&(b.length||_.length)&&G0(t,{added:b,removed:_,kept:w}),Iu(t,!1);return}let P=x?[...d.__children]:null;for(let I of[...d.__children]){let E=t[I];E?.remove&&E.remove(),delete t[I]}d.__children=[],nb(t,y,e),Iu(t,!1),x&&G0(t,{added:[...d.__children],removed:P,kept:[]})},{depth:d.path.length,label:ct(d,"children")});d.__effects.push(g)}let s=nb(t,n,e,!0);if(r!=null&&!(r&&r.__ref)){let u=r;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=bc(t.childProps,u)),o&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(o)?o:[o];u={...u,extends:[...h,...d]}}else u={...u,extends:o};re(u,t,"content",e)}if(n&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let p=h.slice(0,-7);if(!p||p.charCodeAt(0)<65||p.charCodeAt(0)>90)continue;let g={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let y=u[m],x=y.charCodeAt(0);if(x>=65&&x<=90||Ut.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;let b=t[y];b!==void 0&&(g[y]=b,delete t[y])}t[p]&&typeof t[p]=="object"?t[p]={...g,...t[p]}:t[p]=g}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(Ut.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let p=i[u]||i[`smbls.${u}`];p&&(h={...h,extends:p})}if(t.childProps&&(h=bc(t.childProps,h)),o&&!h.ignoreChildExtends)if(h.extends){let p=Array.isArray(h.extends)?h.extends:[h.extends],g=Array.isArray(o)?o:[o];h={...h,extends:[...g,...p]}}else h={...h,extends:o};re(h,t,u,e)}};if(!a){for(let u of c)l(u);return}jy();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Ny()){let h=d+1;Vy(()=>f(h));return}};f(0),By()}function Rk(t,e,n){let{node:r}=t;if(!r)return;r.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(n?.position==="before"&&n.node)i.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let a=n.node.nextSibling;i.insertBefore(r,a||o)}else i.insertBefore(r,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let i=n.node.nextSibling;i?s.insertBefore(r,i):s.appendChild(r)}else s.appendChild(r)}var rb=3;function Sy(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=rb?!1:(t.__inBeforeUpdate=!0,!0)}function kn(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===rb&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${rb}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function ie(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Pt(r,e,n);let o="on"+t,s=e[o];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&st(l);let f=!!c;try{let u=s(e,e.state,e.context,n);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&Pt("error",e,{hook:o,error:h})||console.error(`[DOMQL] Lifecycle "${o}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&Pt("error",e,{hook:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),e.context?.strictMode)throw u}finally{l&&rt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var Pk={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["--gray 1 -168","--gray 1 +168"],caption:["--gray 1 -68","--gray 1 +68"],paragraph:["--gray 1 -42","--gray 1 +42"],disabled:["--gray 1 -26","--gray 1 +26"],line:["--gray 1 -16","--gray 1 +16"],scrim:["black.45","black.55"],scrimSoft:["black.2","black.3"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},Dk={"gradient-blue-light":`linear-gradient(to right,
58
+ `),u&&(s+=u)}}s&&(o.textContent+=s)}var nk=new Set;function rk(t){if(!Array.isArray(t))return"";let e=[];for(let n=0;n<t.length;n++)typeof t[n]=="string"&&t[n].length&&e.push(t[n]);return e.sort(),e.join("|")}function P2(t,e,n){let r=rk(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(rk(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";nk.has(s)||(nk.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${n.join(", ")||"(none)"}], probed [${Array.isArray(o)?o.join(", "):String(o)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function D2(t){let e=t.subscribeTo,n=typeof e=="function",r=e;if(n)try{r=e(t,t.state,t.context)}catch{r=null}if(n&&ht()&&P2(t,e,Array.isArray(r)?r:[]),!Array.isArray(r)||r.length===0)return;let o=t.__ref;for(let s=0;s<r.length;s++){let i=r[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=G(()=>{let d=t.state&&(St(t.state)?t.state.root:null);if(!d||!St(d))return;let h=d;h=h[c];for(let g=0;g<l.length&&!(h==null||typeof h!="object");g++)if(St(h))h=h[l[g]];else break;if(!f.value)return;let p=!1;if(typeof t.onBeforeUpdate=="function"){let g=t.context?.designSystem;g&&st(g);try{if(Sy(o)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>kn(o,!1),y=>{kn(o,!0),t.context?.plugins?.length&&Pt("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}):(kn(o,!1),m===!1&&(p=!0))}}catch(m){kn(o,!0),t.context?.plugins?.length&&Pt("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{g&&rt()}}if(!p&&t.node&&o.__effects)for(let g=0;g<o.__effects.length;g++){let m=o.__effects[g];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!p&&typeof t.onUpdate=="function"){let g=t.context?.designSystem;g&&st(g);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Pt("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{g&&rt()}}},{depth:o.path.length,label:ct(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function ib(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function ab(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let n=e.context?.designSystem?.media?.[t.slice(1)];return n?/^@(media|supports|container)\b/.test(n)?n:`@media ${n}`:t}var ok=new Set;function L2(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;ok.has(r)||(ok.add(r),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function Es(t,e,n,r){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(wt[a]){let u=wt[a](c,e,e.state,e.context);if(u){let d=Array.isArray(u)?u:[u];for(let h of d)h&&Object.assign(o,h)}}else o[a]=c;if(l)for(let u in o)f.has(u)||s.add(u)};for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=t[a];if(typeof c=="function"&&(c=c(e,e.state,e.context)),c==null||typeof c=="function")continue;if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let h in c){let p=c[h];if(typeof p=="function"&&(p=p(e,e.state,e.context)),p==null||typeof p=="function")continue;let g=typeof e[h]=="function"&&(wt[h]||Tt&&Tt.has(h))||!!(r&&r.has(h));i(h,p,g)}continue}if(ib(a,e)){let h=Es(c,e,!1,r);Object.keys(h).length&&(o[`[data-theme="${a.slice(1)}"] &`]=h);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){ht()&&L2(a,e);continue}let u=ab(a,e),d=Es(c,e,!1,r);Object.keys(d).length&&(o[u]=d);continue}let l=typeof e[a]=="function"&&(wt[a]||Tt&&Tt.has(a)),f=!!(r&&r.has(a));i(a,c,l||f)}if(n)for(let a in o)s.add(a);for(let a of s){let c=o[a];typeof c=="string"&&!c.includes("!important")&&(o[a]=c+" !important")}return o}var Du=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function Sk(t,e){for(let n in e){let r=e[n];t[n]=Du(r)?Sk(Du(t[n])?t[n]:{},r):r}return t}function I2(t,e){if(!Du(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Du(o)&&(n=Sk(n||{},o))}return n}function cb(t,e){if(e===void 0&&(e=0),e>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&cb(t[n],e+1))return!0}return!1}function kk(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(ib(t,n)){let s=Es(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=ab(t,n),o=Es(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function $2(t){let e=t.__ref;for(let n of Object.keys(t)){if(!Qy(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!cb(r))continue;let o=null,s,i=G(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&st(a);let c,l=!1;try{let f=kk(n,r,t),u=f?Ou(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=ge({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&rt()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:ct(e,"cssBlock("+n+")")});e.__effects.push(i)}}function M2(t){let e=t.__ref;e.__conditionalRunners=[];let n=new Map;for(let r of Object.keys(t)){let o=r.charAt(0);if(o!=="."&&o!=="!")continue;let s=r.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let p=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${r}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${o}\` is read as one prop name. Nest the selector inside instead: \`${o}${p}: { '${s.slice(p.length)}': {...} }\`.`)}continue}let i=t[r];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=new Set;for(let p in i){if(!Object.prototype.hasOwnProperty.call(i,p))continue;let g=p.charAt(0),m=i[p];(g===":"||g==="@"||g==="&"||g==="[")&&m&&typeof m=="object"&&!Array.isArray(m)||l.add(p)}let f=()=>{let p,g=t[s];if(g===void 0){let x=!!t.state&&s in t.state,b=t.state?t.state[s]:void 0;if(x||b!==void 0)p=b;else{let _=t.context?.cases?.[s];if(_===void 0)return;try{p=typeof _=="function"?_.call(t,t):_}catch(w){p=!1,e.__conditionalError=w,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${r}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,w?.message||w)}}}else if(typeof g=="function")try{p=g(t,t.state,t.context)}catch(x){p=!1,e.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${r}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}else p=g;let m=a?!p:!!p;if(!t.node||m===c.lastMatch)return;c.lastMatch=m;let y=t.context?.designSystem;y&&st(y);try{if(m){let x={},b={},_=!1;for(let S in i){if(!Object.prototype.hasOwnProperty.call(i,S))continue;let A=i[S],P=S.charAt(0);if((P===":"||P==="@"||P==="&"||P==="[")&&A&&typeof A=="object"&&!Array.isArray(A)){if(ib(S,t)){let E=Es(A,t,!1,l);Object.keys(E).length&&(b[`[data-theme="${S.slice(1)}"] &`]=E,_=!0)}else{let E=ab(S,t),M=Es(A,t,!1,l);Object.keys(M).length&&(b[E]=M,_=!0)}continue}let L=typeof A=="function"?A(t,t.state,t.context):A;if(L!=null)if(wt[S]){let E=wt[S](L,t,t.state,t.context);if(E){let M=Array.isArray(E)?E:[E];for(let X of M)X&&Object.assign(x,X)}}else(Tt&&Tt.has(S)||Pu(S))&&(x[S]=L)}let w=Object.keys(x);if(w.length){no(t.node,x);for(let S of w)n.set(S,r);c.appliedKeys=w}else c.appliedKeys=null;if(_){let S=ge(b,null,t.context?.cssPrefix,{state:!0}),A=S?S.split(" ").filter(Boolean):[];if(A.length&&t.node.classList){for(let P of A)t.node.classList.add(P);c.appliedClasses=A}else c.appliedClasses=null}else if(c.appliedClasses){for(let S of c.appliedClasses)t.node.classList.remove(S);c.appliedClasses=null}}else{if(c.appliedKeys){for(let x of c.appliedKeys)n.get(x)===r&&(Pu(x)?t.node.style.removeProperty(x):t.node.style[x]="",n.delete(x));c.appliedKeys=null}if(c.appliedClasses){for(let x of c.appliedClasses)t.node.classList.remove(x);c.appliedClasses=null}}}finally{y&&rt()}};e.__conditionalRunners.push(f);let u=Ft(t,t[s+"Deps"],f),d=G(u,{depth:e.path.length,label:ct(e,"conditional("+r+")")}),h=e.__exec&&e.__exec[s]||t[s];d._sources.size===0&&typeof h=="function"&&ht()&&console.warn(`[smbls] conditional \`${r}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${s}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(d)}}var Xy=new WeakSet;function F2(t){let e=t.ownerDocument;!e||Xy.has(e)||(Xy.add(e),queueMicrotask(()=>{Xy.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var Zy=new WeakSet,sk=!1;function ik(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function eb(t,e){let n={...t};for(let r in e){let o=e[r],s=n[r];n[r]=o&&typeof o=="object"&&s&&typeof s=="object"?eb(s,o):o}return n}function vk(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=vk(o,e);Object.keys(s).length&&(n[r]=s)}else e.has(r)||(n[r]=o)}return n}function Ck(t){let{node:e}=t;if(!e)return;if(sk||(sk=!0,ge({display:"none"})),Zy.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Zy.add(t);let n=t.context?.designSystem;n&&st(n),hu();try{let r={},o=!1,s=[],i=null,a=null,c=null,l=(p,g)=>{if(g&&typeof g=="object"&&ik(p)){a||(a={});let m=a[p];m&&(g=eb(m,g)),a[p]=g}else(g===null||typeof g!="object")&&(c||(c=new Set),c.add(p));r[p]=g};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&wt.theme){let p=wt.theme(t.theme,t,t.state,t.context);if(p){let g=m=>{for(let y in m){let x=m[y];x&&typeof x=="object"&&ik(y)&&(i||(i={}),i[y]=x),r[y]=x}};if(Array.isArray(p))for(let m of p)m&&g(m);else g(p);o=!0}}let f=(p,g)=>{if(wt[p]){let m=wt[p](g,t,t.state,t.context);if(m){if(Array.isArray(m)){for(let y of m)if(y)for(let x in y)l(x,y[x])}else for(let y in m)l(y,m[y]);o=!0}}else if(Tt&&Tt.has(p))g!=null&&typeof g!="object"&&(l(p,g),o=!0);else if(p.charCodeAt(0)===45)g!=null&&typeof g!="object"&&(l(p,g),o=!0);else if((p.charAt(0)==="&"||p.charAt(0)==="@"||p.charAt(0)===":"||p.charAt(0)==="[")&&g&&typeof g=="object"&&!Array.isArray(g)){if(cb(g))return;let m=kk(p,g,t);m&&(l(m.cssProp,m.block),o=!0)}};if(typeof t.class=="string"){let p=I2(t.class,t.context?.designSystem?.class);if(p)for(let g in p)f(g,p[g])}let u=c?new Set(c):null,d=t.tag||"div";for(let p of Object.keys(t)){if(typeof t[p]=="function"||Ut.has(p)||p==="theme")continue;let g=p.charCodeAt(0);g>=65&&g<=90||En(p)||Eu(d,p)||f(p,t[p])}if(i)for(let p in i){let g=c?vk(i[p],c):i[p];a&&a[p]&&(g=eb(g,a[p])),Object.keys(g).length?r[p]=g:delete r[p]}if(T2(t,r,c,u),o){r.display&&String(r.display).includes("!important")&&(e.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);let p=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof p=="string"&&p!==""&&r.display&&r.display!==p&&(r.display=p);let g=ge(r,null,t.context?.cssPrefix);if(s=g?g.split(" ").filter(Boolean):[],g&&e.classList){let m=s,y=!1;for(let x of m)e.classList.add(x),y||(x.charCodeAt(0)===95&&x.charCodeAt(1)===99||x.charCodeAt(0)===95&&x.indexOf("_c",1)!==-1)&&(y=!0);y&&F2(e)}}let h=t.__ref;if(h){let p=h.__staticCssClasses;if(p&&e.classList){let g=new Set(s);for(let m of p)g.has(m)||e.classList.remove(m)}h.__staticCssClasses=s}O2(t)}finally{gu(),n&&rt(),Zy.delete(t)}}var w0=t=>!!wt[t]||!!(Tt&&Tt.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function S0(t){t&&t.node&&Ck(t)}function Ek(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,ne(i,s))}let n=wy(t);for(let o in n){let s=n[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let r=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||Ut.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!En(o)&&!ks(r,o)&&Oe(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!Qr[o])continue;i=Mt.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!an(sn(o)||o))continue;let a=sn(o)||o;e.setAttribute(a,ne(a,i))}}}function k0(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||En(e))return;let o=t.tag||"div";if(ks(o,e)||!Oe(o,e))return;let s=sn(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let u=0;u<a.length;u++){let d=a[u];d&&d._attrName===i&&!d._disposed&&typeof d._execute=="function"&&(c=!0,d._execute())}if(c)return;let l=t[e],f=Qr[e];if(f&&l!=null){let u=f(t);u!==void 0&&(l=u)}typeof l=="string"&&l.includes("{{")&&(l=Mt.call(t,l,t.state)),l==null||l===!1&&!an(s)?n.removeAttribute(s):typeof l!="function"&&typeof l!="object"&&n.setAttribute(s,ne(s,l))}function N2(t,e){let n=t.node,r=t.__ref,o=r.__autoGrow;if(!e){if(o&&o.active){try{n.removeEventListener("input",o.resize)}catch{}ck(o),eo.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),lk(n,o,!1),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=r.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!n.isConnected){yc(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,ak(t,o);return}o.awaitingLayout=!1;let i=n.style.height;n.style.height="0px";let a=n.scrollHeight;if(!(a>0)){n.style.height=i;return}let c=V2(n),l=c!=null&&a>c;n.style.height=(l?c:a)+"px",lk(n,o,l),o.lastMeasure=a,o.lastWidth=n.clientWidth,ak(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}ck(o),eo.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,B2(t,o));let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""):n.style.maxHeight=s,o.appliedMax=s),o.resize()}function yc(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),eo.add(t),Iu())}function j2(){let t=Array.from(eo);eo.clear();for(let e=0;e<t.length;e++){let n=t[e],r=n.node,o=n.__ref?.__autoGrow;if(!(!r||!o||!o.active)){if(!r.isConnected){o.firstAttemptAt==null&&(o.firstAttemptAt=Cs()),o.attachAttempts+=1,o.attachAttempts<=hk&&Cs()-o.firstAttemptAt<gk&&(eo.add(n),Iu());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function ak(t,e){if(e.watch)return;let n=t.node;if(!n)return;let r=n.ownerDocument&&n.ownerDocument.defaultView,o=r&&r.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof o!="function")return;let s=()=>{if(!e.active||!n.isConnected||!(n.scrollHeight>0))return;if(e.awaitingLayout){e.awaitingLayout=!1,yc(t,!0);return}let a=n.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,yc(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function ck(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function B2(t,e){if(e.fontsHooked)return;e.fontsHooked=!0;let n=t.node&&t.node.ownerDocument,r=n&&n.fonts&&n.fonts.ready;!r||typeof r.then!="function"||r.then(()=>{e.active&&t.node&&yc(t,!0)},()=>{})}function V2(t){let e=t.ownerDocument&&t.ownerDocument.defaultView,n;try{n=e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{n=null}if(!n)return null;let r=f=>typeof f=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(f)?parseFloat(f):null,o=r(n.maxHeight);if(o==null||!(o>0))return null;let s=(r(n.paddingTop)||0)+(r(n.paddingBottom)||0),i=(r(n.borderTopWidth)||0)+(r(n.borderBottomWidth)||0),a=n.boxSizing==="border-box"?o-i:o+s,c=r(n.lineHeight);if(!(c>0))return a;let l=Math.floor((a-s)/c+1e-6);return l>=1?l*c+s:a}function lk(t,e,n){n?e.appliedScroll||(t.style.overflowY="auto",e.appliedScroll=!0):e.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),e.appliedScroll=!1)}var fk=["srcObject","muted"],U2=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function z2(t){let e=t.node,n=t.__ref;if(!(!e||!n))for(let r=0;r<fk.length;r++){let o=fk[r],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=U2(o,a);if(e[o]!==c)try{e[o]=c}catch(l){Gt(n,o,l)}};if(typeof s=="function"){let a=Ft(t,t[o+"Deps"],s),c=G(()=>{try{i(a(t,t.state,t.context))}catch(l){Gt(n,o,l)}},{depth:n.path.length,label:ct(n,o)});n.__effects.push(c),n.__exec[o]=s}else i(s);o==="srcObject"&&(n.__releaseMedia=()=>{try{e.srcObject!=null&&(e.srcObject=null)}catch{}})}}function Ak(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let n=t.__ref,r=t.autoGrow,o=typeof r=="function"?Ft(t,t.autoGrowDeps,r):null,s=G(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===r&&o?o:i)(t,t.state,t.context)}catch{a=null}N2(t,a)},{depth:n.path.length,label:ct(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var Tk=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Ok(t,e){for(let n of Object.keys(t)){if(!En(n)||Tk.has(n))continue;let r=lu(n);if(r){fu(r,t,t[n]);continue}let o=t[n];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(c){return t.call(i,c)}}if(typeof o!="function")continue;let s=d2(n);or.has(s)||ms(p2(s),t,o)}H2(t)}function H2(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let d of Tk){let h=t[d];typeof h=="function"&&(n[d]=h,r=!0)}if(!r)return;let o=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let p=h.clientX-i,g=h.clientY-a,m=Date.now()-c;if(m>s)return;let y=Math.abs(p),x=Math.abs(g);if(Math.max(y,x)<o)return;let b;if(y>x*1.2)b=p<0?"left":"right";else if(x>y*1.2)b=g<0?"up":"down";else return;let _="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),w=n[_],S=n.onSwipe;w&&w.call(t,d,t,t.state,t.context),S&&S.call(t,{direction:b,dx:p,dy:g,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function bc(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=bc(o,s):n[r]=s}return n}function nb(t,e,n,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",i=t.context?.document||globalThis.document,a=s?null:i?.createDocumentFragment();if(!s&&!a)return;let c=t.childProps,l=t.childrenAs,f=m=>{let y=e[m],x=y;(typeof y=="string"||typeof y=="number")&&(y={text:y});let b=c;if(typeof c=="function")try{b=c(t,y)}catch{b=null}if(l==="state"){let w=x;(typeof x=="string"||typeof x=="number")&&(w={value:x,text:x}),y=b?{...b,state:w}:{state:w}}else b&&(y=bc(b,y));if(o&&!y.ignoreChildExtends)if(y.extends){let w=Array.isArray(y.extends)?y.extends:[y.extends],S=Array.isArray(o)?o:[o];y={...y,extends:[...S,...w]}}else y={...y,extends:o};let _=mk(y?.key,x,m);try{return re(y,t,_,n)}catch(w){if(typeof console<"u"&&console.error){let S=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${_}" failed to construct at ${S} (initial render, skipping this row):`,w?.message||w)}return null}},u=t.__ref;if(!(r===!0&&!s&&!!u&&(n?.mountYield===!0||t.yieldChildren===!0))){for(let m=0;m<e.length;m++){let y=f(m);!s&&y?.node&&a.appendChild(y.node)}return s||t.node.appendChild(a),!0}let h=u.__childrenChunkGen=(u.__childrenChunkGen||0)+1;jy();let p=null,g=m=>{if(u.__disposed||u.__childrenChunkGen!==h){p&&p.parentNode&&p.remove();return}for(let y=m;y<e.length;y++){let x=f(y);if(x?.node&&(p?t.node.insertBefore(x.node,p):a.appendChild(x.node)),y+1<e.length&&Ny()){p||(p=i.createComment("smbls-mount"),a.appendChild(p),t.node.appendChild(a));let b=y+1;Vy(()=>g(b));return}}p?(p.remove(),t.node.tagName==="SELECT"&&Lu(t,!0)):t.node.appendChild(a)};return g(0),By(),!0}if(typeof e=="string"){let s=yk(e,t);if(Array.isArray(s))return nb(t,s,n,r)}if(typeof e=="object")for(let s in e){if(Ut.has(s))continue;let i=e[s];if(!(i==null||i===!1)){if((typeof i=="string"||typeof i=="number")&&(i={text:i}),t.childProps&&(i=bc(t.childProps,i)),o&&!i.ignoreChildExtends)if(i.extends){let a=Array.isArray(i.extends)?i.extends:[i.extends],c=Array.isArray(o)?o:[o];i={...i,extends:[...c,...a]}}else i={...i,extends:o};re(i,t,s,n)}}}function Lu(t,e){let n=t.node;if(!n||n.tagName!=="SELECT")return;let r=n.options;if(!r||!r.length)return;let o=t.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value,typeof f=="string"&&f.includes("{{")&&(f=Mt.call(t,f,t.state));let u=f==null?"":String(f);n.value!==u&&(n.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<r.length;f++)r[f].defaultSelected&&(l=f);l>=0&&n.selectedIndex!==l&&(n.selectedIndex=l)}function Rk(t,e){let{children:n,content:r}=t,o=t.childExtends;if(typeof n=="function"){let u=n;try{n=u(t,t.state,t.context)}catch(m){if(n=void 0,typeof console<"u"&&console.error){let y=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${y} (initial run, treating as empty):`,m?.message||m)}}t.children=n;let d=t.__ref,h=!1,p=Ft(t,t.childrenDeps,u),g=G(()=>{let m=h;h=!0;let y;try{y=p(t,t.state,t.context)}catch(L){if(typeof console<"u"&&console.error){let E=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${E}${m?"":" (initial tracking run)"}:`,L?.message||L)}return}if(!m||y===t.children)return;t.children=y,d.__childrenChunkGen!=null&&d.__childrenChunkGen++;let x=typeof t.onContentUpdate=="function",b=x?[]:null,_=x?[]:null,w=x?[]:null;if(Array.isArray(y)&&t.childrenAs==="state"){let L=t.childProps,E=[],M=new Map;for(let B=0;B<y.length;B++){let gt=y[B],F=L;if(typeof L=="function")try{F=L(t,gt)}catch{F=null}let q=mk(F&&F.key,gt,B);E.push(q),M.set(q,{rawChild:gt,childProps:F})}let X=new Set(E),vt=d.__children.slice();for(let B of vt)if(!X.has(B)){let gt=t[B];gt?.remove&&gt.remove(),delete t[B],_&&_.push(B)}let Ct=t.childExtends,at=t.tag==="fragment",N=t.context?.document||globalThis.document,H=at?null:N?.createDocumentFragment(),mt=new Set;for(let B of E){let gt=M.get(B),F=gt.rawChild,q=t[B];if(q&&q.state){if(F&&typeof F=="object"){let Ot=q.state,Bt=Ot.$replace||Ot.replace,mo=Ot.$update||Ot.update;try{if(typeof Bt=="function")Bt.call(Ot,F);else if(typeof mo=="function"){for(let le in Ot)if(!(le==="__element"||le==="root"||le==="parent"||le==="update")&&!Object.prototype.hasOwnProperty.call(F,le))try{Ot[le]=void 0}catch{}mo.call(Ot,F)}else for(let le in F)Ot[le]=F[le]}catch(le){if(typeof console<"u"&&console.error){let Qs=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${B}" failed to patch at ${Qs} (reconcile, keeping its previous data for this pass):`,le?.message||le)}}}w&&w.push(B);continue}let yt=F;(typeof F=="string"||typeof F=="number")&&(yt={value:F,text:F});let Z=gt.childProps,Y=Z?{...Z,state:yt}:{state:yt};if(Ct&&!Y.ignoreChildExtends)if(Y.extends){let Ot=Array.isArray(Y.extends)?Y.extends:[Y.extends],Bt=Array.isArray(Ct)?Ct:[Ct];Y={...Y,extends:[...Bt,...Ot]}}else Y={...Y,extends:Ct};let U;try{U=re(Y,t,B,e)}catch(Ot){if(typeof console<"u"&&console.error){let Bt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${B}" failed to construct at ${Bt} (reconcile, skipping this row):`,Ot?.message||Ot)}mt.add(B);continue}!at&&U?.node&&H&&H.appendChild(U.node),b&&b.push(B)}if(!at&&H&&H.childNodes.length&&t.node&&t.node.appendChild(H),!at&&t.node){let B=null;for(let gt of E){let F=t[gt]?.node;if(!F)continue;let q=B?B.nextSibling:t.node.firstChild;F!==q&&t.node.insertBefore(F,q),B=F}}d.__children=mt.size?E.filter(B=>!mt.has(B)):E,x&&(b.length||_.length)&&Y0(t,{added:b,removed:_,kept:w}),Lu(t,!1);return}let P=x?[...d.__children]:null;for(let L of[...d.__children]){let E=t[L];E?.remove&&E.remove(),delete t[L]}d.__children=[],nb(t,y,e),Lu(t,!1),x&&Y0(t,{added:[...d.__children],removed:P,kept:[]})},{depth:d.path.length,label:ct(d,"children")});d.__effects.push(g)}let s=nb(t,n,e,!0);if(r!=null&&!(r&&r.__ref)){let u=r;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=bc(t.childProps,u)),o&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(o)?o:[o];u={...u,extends:[...h,...d]}}else u={...u,extends:o};re(u,t,"content",e)}if(n&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let p=h.slice(0,-7);if(!p||p.charCodeAt(0)<65||p.charCodeAt(0)>90)continue;let g={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let y=u[m],x=y.charCodeAt(0);if(x>=65&&x<=90||Ut.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;let b=t[y];b!==void 0&&(g[y]=b,delete t[y])}t[p]&&typeof t[p]=="object"?t[p]={...g,...t[p]}:t[p]=g}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(Ut.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let p=i[u]||i[`smbls.${u}`];p&&(h={...h,extends:p})}if(t.childProps&&(h=bc(t.childProps,h)),o&&!h.ignoreChildExtends)if(h.extends){let p=Array.isArray(h.extends)?h.extends:[h.extends],g=Array.isArray(o)?o:[o];h={...h,extends:[...g,...p]}}else h={...h,extends:o};re(h,t,u,e)}};if(!a){for(let u of c)l(u);return}jy();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Ny()){let h=d+1;Vy(()=>f(h));return}};f(0),By()}function Pk(t,e,n){let{node:r}=t;if(!r)return;r.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(n?.position==="before"&&n.node)i.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let a=n.node.nextSibling;i.insertBefore(r,a||o)}else i.insertBefore(r,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let i=n.node.nextSibling;i?s.insertBefore(r,i):s.appendChild(r)}else s.appendChild(r)}var rb=3;function Sy(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=rb?!1:(t.__inBeforeUpdate=!0,!0)}function kn(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===rb&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${rb}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function ie(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Pt(r,e,n);let o="on"+t,s=e[o];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&st(l);let f=!!c;try{let u=s(e,e.state,e.context,n);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&Pt("error",e,{hook:o,error:h})||console.error(`[DOMQL] Lifecycle "${o}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&Pt("error",e,{hook:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),e.context?.strictMode)throw u}finally{l&&rt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var Dk={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["--gray 1 -168","--gray 1 +168"],caption:["--gray 1 -68","--gray 1 +68"],paragraph:["--gray 1 -42","--gray 1 +42"],disabled:["--gray 1 -26","--gray 1 +26"],line:["--gray 1 -16","--gray 1 +16"],scrim:["black.45","black.55"],scrimSoft:["black.2","black.3"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},Lk={"gradient-blue-light":`linear-gradient(to right,
59
59
  rgba(4, 116, 242, 1),
60
60
  rgba(0, 48, 103, 1)
61
61
  )`,"gradient-blue-dark":`linear-gradient(to right,
@@ -81,28 +81,28 @@ FROM ${a}${l}`},xO=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;
81
81
  #1E54F0 36%,
82
82
  #8B4CCA 69%,
83
83
  #C66894 100%
84
- )`};var H2={primary:{"@dark":{color:"white",background:"blue",".color-only":{color:"blue"},".inactive":{background:"gray+16"},".gradient":{color:"white",background:"gradient-blue"}},"@light":{color:"white",background:"gradient-blue",".color-only":{color:"blue"},".gradient":{color:"white",background:"gradient-colorful"}}},secondary:{"@dark":{color:"white",background:"green",".color-only":{color:"green"}},"@light":{color:"white",background:"green",".color-only":{color:"green"}},".child":"--primary"},tertiary:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"}},quaternary:{"@light":{color:"white",background:"gradient-light"},"@dark":{color:"white",background:"gradient-dark-active"}},quinary:{"@dark":{color:"gray=90",background:"gradient-light",":hover":{color:"gray=95",background:"gradient-light-active"},":focus":{color:"gray=120",background:"gradient-light-active"},":active":{color:"gray=120",background:"gradient-light-active"},".active":{color:"gray=120",background:"gradient-light-active"}},"@light":{color:"gray3",background:"gradient-dark",":hover":{color:"gray1",background:"gradient-dark-active"},":active":{color:"gray1",background:"gradient-dark-active"},".active":{color:"gray1",background:"gradient-dark-active"}}}},W2={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},q2={field:{"@light":{color:"black",background:"gray.975+144",borderColor:"gray.975+144","::placeholder":{color:"gray-68"}},"@dark":{color:"white",background:"gray.975-52",borderColor:"gray.975-52","::placeholder":{color:"gray+68"}}},label:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"},".light":{color:"white",background:"gray3"},".dark":{color:"white",background:"black.35"}},card:{"@light":{background:"gray.975+150"},"@dark":{color:"white",background:"gray.975-56"},".child":{color:"white",background:"gray3"},".secondary":{color:"white",background:"gradient-blue-dark",".child":{color:"white",background:"black.35"}}},dialog:{"@dark":{color:"white",background:"gray.92",".helper":{color:"white",background:"black"}},"@light":{color:"currentColor",background:"gray.1"}}},Ik={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...H2,...W2,...q2,backdrop:{"@light":{background:"scrim",backdropFilter:"blur(8px)"},"@dark":{background:"scrim",backdropFilter:"blur(8px)"}},backdropSoft:{"@light":{background:"scrimSoft",backdropFilter:"blur(4px)"},"@dark":{background:"scrimSoft",backdropFilter:"blur(4px)"}},none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var Lk={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var $k={ratio:1.618,subSequence:!0};var Mk={SourceSans:[{url:""}]},Fk={system:{isDefault:!0,isSystemFallback:!0,value:["system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"','"Liberation Sans"'],type:"sans-serif"}};var Nk={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var jk={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Bk={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var Vk={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var _c={version:"0.0.1",color:Pk,gradient:Dk,theme:Ik,typography:Lk,spacing:$k,font:Mk,fontFamily:Fk,timing:Bk,icons:Nk,media:jk,sizes:Vk,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}},modalIn:{from:{transform:"scale(0.95)",opacity:0},to:{transform:"",opacity:1}},modalOut:{to:{transform:"scale(0.95)",opacity:0}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Ts={};$(Ts,{A:()=>iC,AssetPicture:()=>sv,Audio:()=>cv,Avatar:()=>wC,B:()=>Av,Block:()=>Uk,Box:()=>Bu,Br:()=>Pv,Button:()=>lC,ButtonSet:()=>pC,COMPONENTS:()=>ro,Caption:()=>bv,Checkbox:()=>Vv,CheckboxHgroup:()=>Uv,Circle:()=>nv,CircleButton:()=>uC,Clickable:()=>Qk,Data:()=>Ov,Dialog:()=>gC,DialogFooter:()=>yC,DialogHeader:()=>mC,Dropdown:()=>kC,DropdownList:()=>vC,DropdownParent:()=>CC,DropdownParentFocus:()=>EC,DropdownSiblingFocus:()=>AC,FileIcon:()=>tC,Flex:()=>Hk,Focusable:()=>tv,FocusableComponent:()=>ev,Footnote:()=>Ev,Form:()=>Xk,Grid:()=>qk,Gutter:()=>Gk,H1:()=>uv,H2:()=>dv,H3:()=>pv,H4:()=>hv,H5:()=>gv,H6:()=>mv,Headline:()=>vv,Hgroup:()=>Mv,HgroupButton:()=>Nv,HgroupRows:()=>Fv,Hoverable:()=>Jk,Hr:()=>Rv,I:()=>Tv,Icon:()=>Jv,IconButton:()=>hC,IconText:()=>Qv,Iframe:()=>Zk,Img:()=>Yk,Inline:()=>zk,InlineFlex:()=>Wk,InlineGrid:()=>Kk,Input:()=>jv,Italic:()=>Sv,KangorooButton:()=>dC,Li:()=>Dv,Link:()=>Nb,Notification:()=>TC,NumberInput:()=>Bv,Ol:()=>Lv,P:()=>yv,Picture:()=>ov,Radio:()=>zv,RadioHgroup:()=>Hv,Range:()=>SC,RouteLink:()=>aC,RouterLink:()=>jb,SHAPES:()=>Nu,Select:()=>cC,Shape:()=>gb,Span:()=>fv,SquareButton:()=>fC,Strong:()=>_v,Subhead:()=>Cv,Svg:()=>iv,Text:()=>lv,Textarea:()=>Kv,TextareaWithButton:()=>Gv,Theme:()=>rv,Title:()=>kv,Toggle:()=>Wv,ToggleHgroup:()=>qv,Tooltip:()=>bC,TooltipHidden:()=>_C,TooltipParent:()=>xC,U:()=>xv,Ul:()=>Iv,Underline:()=>wv,Video:()=>av,depth:()=>ju,focusableRingEnabled:()=>Mu,getSystemGlobalTheme:()=>xc});var fb={};$(fb,{Block:()=>Uk,Flex:()=>Hk,Grid:()=>qk,Gutter:()=>Gk,Inline:()=>zk,InlineFlex:()=>Wk,InlineGrid:()=>Kk});var Uk={display:"block"},zk={display:"inline"},Hk={display:"flex"},Wk={display:"inline-flex"},qk={display:"grid"},Kk={display:"inline-grid"},Gk={boxSize:"C1"};var ub={};$(ub,{Img:()=>Yk});D();var Yk={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Qt(t);return e&&e.src||t.src},srcset:t=>{let e=Qt(t);return(e?_a(e):"")||t.srcset}}};var db={};$(db,{Form:()=>Xk});var Xk={tag:"form"};var pb={};$(pb,{Iframe:()=>Zk});var Zk={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var hb={};$(hb,{Clickable:()=>Qk,Focusable:()=>tv,FocusableComponent:()=>ev,Hoverable:()=>Jk,focusableRingEnabled:()=>Mu});var K2={appearance:"none",fontFamily:"inherit"},Jk={transition:"C defaultBezier",transitionProperty:"opacity, transform",opacity:.85,":hover":{opacity:.9,transform:"scale(1.015)"},":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1,transform:"scale(1.015)",":hover":{opacity:1}}},Qk={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Mu(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var tv={border:"none",outline:t=>Mu(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Mu(t)?"solid X currentColor":"none"},attr:{tabIndex:t=>t.tabIndex}},ev={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:K2};var bb={};$(bb,{Picture:()=>ov});var yb={};$(yb,{Theme:()=>rv,getSystemGlobalTheme:()=>xc});var mb={};$(mb,{Circle:()=>nv,SHAPES:()=>Nu,Shape:()=>gb,default:()=>G2,depth:()=>ju});D();var Re=T(),ju={4:{boxShadow:`rgba(0,0,0,.10) 0 2${Re.unit.default} 4${Re.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${Re.unit.default} 6${Re.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${Re.unit.default} 10${Re.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${Re.unit.default} 16${Re.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${Re.unit.default} 26${Re.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${Re.unit.default} 42${Re.unit.default}`}},As=t=>et(t.shapeDirectionColor)||et(t.borderColor)||et(t.backgroundColor)||et(t.background),Fu=t=>{let e=cc.transition(t.transition,t);return e&&e.transition},Nu={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:As(t),transition:Fu(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:As(t),transition:Fu(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:As(t),transition:Fu(t),transitionProperty:"background"},"&:before":{left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"},"&:after":{left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}),chevron:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",transition:Fu(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${As(t)} 25%, transparent 25%), linear-gradient(315deg, ${As(t)} 25%, transparent 25%)`},"&:after":{background:As(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},gb={deps:{exec:ut,getSpacingBasedOnRatio:Ee,getMediaColor:$t},classlist:{shape:t=>t.deps.exec(Nu[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Nu[t.shape+"Direction"];return t.shape&&e?e[t.shapeDirection||"left"]:null},shapeDirectionColor:t=>{let e={borderColor:t.deps.getMediaColor(t.background||t.backgroundColor)};return t.shapeDirection?e:null}}},nv={round:"100%"},G2=gb;D();var xc=({context:t,state:e})=>{let n=e&&e.root,r=n&&n.globalTheme||t.designSystem&&t.designSystem.globalTheme;return r==="auto"?null:r},rv={deps:{depth:ju},classlist:{depth:t=>!Dt(t.depth)&&t.deps.depth[t.depth]}};var ov={deps:{getSystemGlobalTheme:xc},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:xc},tag:"source",attr:{media:t=>{let{key:e,context:n,deps:r}=t,{media:o}=n.designSystem,s=r.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var _b={};$(_b,{AssetPicture:()=>sv});D();var sv={tag:"picture",children:t=>{let e=Qt(t);if(e)return xa(e,t.alt)}};var xb={};$(xb,{Svg:()=>iv});var iv={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:n,utils:r}=e,o=n&&n.svg,s=t.spriteId||n&&n.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let h=d[1],p=e.document||(typeof document<"u"?document:null);if(!(p&&typeof p.getElementById=="function"&&p.getElementById(h))){let m=r&&r.scratchSystem&&r.scratchSystem.appendSVGSprite;n&&!n.__svgCache&&(n.__svgCache={}),typeof m=="function"?m({[h]:i},{document:p}):r&&typeof r.init=="function"&&r.init({svg:{[h]:i}},{document:p,emotion:e.emotion})}return a(h)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=o[l]=`svg-${(u>>>0).toString(36)}`,r.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var wb={};$(wb,{Video:()=>av});D();var av={tag:"video",controls:!0,attr:{src:t=>{let e=Qt(t);return e&&e.src||t.src}},children:t=>{let e=Qt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var Sb={};$(Sb,{Audio:()=>cv});D();var cv={tag:"audio",controls:!0,attr:{src:t=>{let e=Qt(t);return e&&e.src||t.src}},children:t=>{let e=Qt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var kb={};$(kb,{B:()=>Av,Caption:()=>bv,Data:()=>Ov,Footnote:()=>Ev,H1:()=>uv,H2:()=>dv,H3:()=>pv,H4:()=>hv,H5:()=>gv,H6:()=>mv,Headline:()=>vv,I:()=>Tv,Italic:()=>Sv,P:()=>yv,Span:()=>fv,Strong:()=>_v,Subhead:()=>Cv,Text:()=>lv,Title:()=>kv,U:()=>xv,Underline:()=>wv});var lv={},fv={tag:"span"},uv={tag:"h1"},dv={tag:"h2"},pv={tag:"h3"},hv={tag:"h4"},gv={tag:"h5"},mv={tag:"h6"},yv={tag:"p"},bv={tag:"caption"},_v={tag:"strong",fontWeight:"700"},xv={tag:"u"},wv={tag:"u"},Sv={tag:"i"},kv={},vv={tag:"h6",fontSize:"B",fontWeight:500},Cv={tag:"span",fontSize:"Z1"},Ev={tag:"span",fontSize:"Z"},Av={tag:"b"},Tv={tag:"i"},Ov={tag:"data"};var vb={};$(vb,{Box:()=>Bu,Br:()=>Pv,Hr:()=>Rv,Li:()=>Dv,Ol:()=>Lv,Ul:()=>Iv});var Y2=t=>{if(!t.context)return;let{props:e,__ref:n}=t,r=se(e,t,{unpack:!1});n.__class=r},Bu={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:Y2},Rv={tag:"hr",margin:"C1 0"},Pv={tag:"br"},Dv={tag:"li"},Iv={tag:"ul",childExtends:{extends:"Li"}},Lv={tag:"ol",childExtends:{extends:"Li"}};var Cb={};$(Cb,{Hgroup:()=>Mv,HgroupButton:()=>Nv,HgroupRows:()=>Fv});var $v=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let n=e.charCodeAt(0);if(n>=65&&n<=90)return!0}return!1},Mv={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:$v,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:$v,margin:"0",color:"paragraph"}},Fv={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},Nv={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Eb={};$(Eb,{Input:()=>jv});var jv={extends:["Focusable"],tag:"input",border:"none",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,minLength:t=>t.minlength,maxLength:t=>t.maxlength,name:t=>t.name,autocomplete:t=>t.autocomplete,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,readonly:t=>t.readonly,required:t=>t.required,type:t=>t.type}};var Ab={};$(Ab,{NumberInput:()=>Bv});var Bv={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"solid gray3",borderWidth:"1px",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var Tb={};$(Tb,{Checkbox:()=>Vv,CheckboxHgroup:()=>Uv});var Vv={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:"solid X currentColor",outlineOffset:"Z"},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},Uv={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Ob={};$(Ob,{Radio:()=>zv,RadioHgroup:()=>Hv});var zv={extends:"Checkbox",Input:{type:"radio",":checked + div:after":{opacity:"1"}},Flex:{round:"100%",padding:"Y",":after":{content:'""',display:"block",boxSize:"X+W1",round:"100%",background:"white",opacity:"0",transition:"opacity .15s ease-in-out"},Icon:null}},Hv={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Rb={};$(Rb,{Toggle:()=>Wv,ToggleHgroup:()=>qv});var Wv={extends:"Checkbox",Input:{role:"switch",":checked + div":{background:"green2+8",justifyContent:"flex-end"}},Flex:{boxSize:"A1 B1",padding:"- W_default",round:"D",align:"center flex-start",theme:"field",border:"none",transition:"opacity .15s ease",":after":{content:'""',boxSize:"A A",round:"100%",background:"white",boxShadow:"gray.2 1px 1px Z"},Icon:null}},qv={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Pb={};$(Pb,{Textarea:()=>Kv,TextareaWithButton:()=>Gv});var Kv={tag:"textarea",extends:["Input","Flex"],fontfamily:"Avenir",placeholder:"Leave us a message...",padding:"A",theme:"field",border:"none",minHeight:"E_default",width:"100%",height:"E1_default",fontFamily:"inherit",round:"Z2",lineHeight:1.4,".outlined":{borderWidth:"1px",borderStyle:"solid"}},Gv={display:"flex",gap:"Y2",Textarea:{height:"C2+W",minWidth:"H",padding:"A",fontSize:"Z1",round:"Z2",minHeight:"fit-content"},SquareButton:{background:"blue",Icon:{name:"send"}}};var Db={};$(Db,{FileIcon:()=>tC,Icon:()=>Jv,IconText:()=>Qv});var Yv=new Set,Xv=(t,e)=>{if(!Yv.has(t)&&(Yv.add(t),typeof console<"u"&&console.warn)){let n=e&&e.__ref&&e.__ref.path,r=n&&n.length?` at <${n.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${r} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},Zv=new WeakMap,X2=t=>{let e=Zv.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},Zv.set(t,e)),e},Z2=(t,e)=>{if(!t)return null;let n=t.default||t;return typeof n=="string"?n.trim()?{[e]:n}:null:typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).length?n:null},J2=(t,e,n)=>{let r=n&&n.context&&n.context.document||(typeof document<"u"?document:null);st(t);try{let o=T();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Kr(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&r&&Object.keys(s).length&&Gr(s,{document:r}),Object.keys(s).length>0}finally{rt()}},Q2=(t,e,n,r,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=X2(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(o),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=Z2(f,n);return u?J2(s,u,r):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,f),!1)).then(f=>{a.pending.delete(e);let u=a.waiting.get(e);a.waiting.delete(e),f||a.failed.add(e),u&&u.forEach(d=>{try{d(f)}catch(h){console.error("[Icon] repaint error:",h)}})});return a.pending.set(e,l),!0},Jv={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,n)=>{let{parent:r}=t,{icons:o,useIconSprite:s,verbose:i}=n&&n.designSystem,{toCamelCase:a}=n&&n.utils,c=p=>{let g=p[".isActive"];if(g)return p.call("exec",g.name||g.icon)},l=(p,g,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:x}=m&&m.utils,b=f(p,g),w=x(b).split(/([a-z])([A-Z])/g),k=w[1]?w[0]:b.split(".")[0].split(" ")[0],A=y&&y[k];if(A){let P=b.includes(".")?"sfsymbols."+b.split(".").slice(1).join("."):"sfsymbols";return b=A[P]||A[b.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${b}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(p,g)=>{let{key:m}=p,y=p.call("exec",p.name||p.icon||m,p);return p.call("isString",y)&&y.includes("{{")&&(y=p.call("replaceLiteralsWithObjectFields",y)),p.call("isString",y)?y:m},u=t.src,d,h=()=>{let p=f(t,e),g=p;if(p.includes(" ")){let E=p.split(" ");p=E[0]+E.slice(1).map(M=>M.charAt(0).toUpperCase()+M.slice(1)).join("")}let m=a(p),y=m.split(/([a-z])([A-Z])/g),x=l(t,e,n);if(x){Object.assign(t,x);return}let b;t.isActive&&(b=c(t));let _=r[".isActive"];r&&r.isActive&&_&&_.icon&&(b=t.call("exec",_.icon||_.Icon.name||_.Icon.icon,t)),t.call("isString",b)&&b.includes("{{")&&(b=t.call("replaceLiteralsWithObjectFields",b));let w;o[b]&&(w=b),o[m]?w=m:o[y[0]+y[1]]?w=y[0]+y[1]:o[y[0]]?w=y[0]:i&&t.warn("Can't find icon:",p,w);let k=o[w],A=r&&r.src||u;!k&&!A&&(Q2(n,g,m,t,M=>{if(!(d&&d._disposed)){if(!M)return Xv(g,t);h()}})||Xv(g,t));let P=s&&w,I=k||A||o.noIcon;if(!(t.spriteId===P&&t.src===I&&t.node&&t.node.innerHTML)&&(t.spriteId=P,t.src=I,typeof t.html=="function"&&t.node)){let E=t.context&&t.context.designSystem;E&&st(E);try{let M=t.html(t,t.state,t.context);M!=null&&typeof M!="function"&&(t.node.innerHTML=M)}finally{E&&rt()}}};d=G(h,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},Qv={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,n=t.call("exec",t.icon,t);return t.call("exec",n||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},tC={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Bb={};$(Bb,{A:()=>iC,Link:()=>Nb,RouteLink:()=>aC,RouterLink:()=>jb});var wc={};$(wc,{default:()=>sD,getActiveRoute:()=>Fb,lastLevel:()=>Uu,lastPathname:()=>Vu,matchRoute:()=>Lb,parseQuery:()=>$b,parseRoutePattern:()=>Ib,router:()=>ln,runGuards:()=>Mb});D();var nC=/^:(.+)/,rC=/^\*$/,eC=new Map,Ib=t=>{let e=eC.get(t);if(e)return e;let n=t.replace(/^\//,"").split("/"),r=[],o=!1;for(let i=0;i<n.length;i++){let a=n[i].match(nC);a?r.push({index:i,name:a[1]}):rC.test(n[i])&&(o=!0)}let s={segments:n,params:r,hasWildcard:o,pattern:t};return eC.set(t,s),s},Lb=(t,e,n=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(n),s="/"+(o[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=Ib(l),u=tD(o,f);u>a&&(a=u,i=l,c=eD(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},tD=(t,e)=>{let{segments:n,hasWildcard:r}=e;if(!r&&n.length!==t.length&&n.length!==1&&n.length>t.length)return-1;let o=0,s=Math.min(n.length,t.length);for(let i=0;i<s;i++)if(n[i]===t[i])o+=3;else if(nC.test(n[i]))o+=1;else if(rC.test(n[i]))o+=.5;else return-1;return o},eD=(t,e)=>{let n={};for(let{index:r,name:o}of e.params)t[r]&&(n[o]=decodeURIComponent(t[r]));return n},$b=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((r,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(r)):e[o]=r}),e},Mb=async(t,e)=>{if(!t||!t.length)return!0;for(let n of t){let r=await n(e);if(r===!1)return!1;if(typeof r=="string")return r}return!0},Fb=(t=0,e)=>{e||(e=typeof C<"u"?C.location.pathname:"/");let r=e.split("/")[t+1];if(r)return`/${r}`},Vu,Uu=0,nD=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,oC={level:Uu,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof nt<"u"&&(nt.scrollingElement||nt.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0,exitTimeout:300},rD=(t,e)=>{if(!t||t.visibilityState!=="visible")return!1;try{let n=e&&typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)");if(n&&n.matches)return!1}catch{}return!0},sC=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},oD=(t,e,n,r,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===n)return a.wait;if(sC(e),!n||!n.node||typeof t.onRouteExit>"u"||!rD(s,i))return null;let c=typeof o=="number"&&o>=0?o:oC.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...r,page:n,timeout:c,signal:l?l.signal:void 0},u;try{u=gn("routeExit",t,f)}catch{return null}if(!u||typeof u.then!="function")return null;let d={page:n,abort:()=>{l&&!l.signal.aborted&&l.abort()}};return d.wait=new Promise(h=>{let p=setTimeout(()=>{d.abort(),h()},c),g=()=>{clearTimeout(p),h()};u.then(g,g)}),e.__routeExit=d,d.wait},ln=async(t,e,n={},r={})=>{let o=e||void 0,s=o?.context?.window||C,i=o?.context?.document||nt,a={...oC,...o.context.routerOptions,...r};Uu=a.lastLevel;let c=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=nD(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:h,search:p,hash:g}=d,m=$b(p),y=o.node,x=g&&g!==s.location.hash.slice(1),b=h!==Vu;Vu=h;let _=c.__routerRendered,w,k,A,P;if(a.useParamsMatching){let N=Lb(h,o.routes,a.level);w=N.key,k=N.routePath,A=N.content,P=N.params}else{w=Fb(a.level,h),k=w;let N=o.routes;A=N?N[w||"/"]||N["/*"]:null,P={}}let I=a.scrollToNode?y:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}if(!A){a.onNotFound?a.onNotFound({pathname:h,route:w,element:o}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(o.routes||{}));return}if(a.guards&&a.guards.length){let N={pathname:h,route:w,params:P,query:m,hash:g,element:o,state:n},H=await Mb(a.guards,N);if(H===!1)return;if(typeof H=="string")return ln(H,e,n,{...r,guards:[]})}let E=c.__routerNavSeq=(c.__routerNavSeq||0)+1,M=!_||_.content!==A||_.route!==w,X=b||M||a.force===!0;if(X&&_){let N=oD(o,c,o[l],{from:_.route,to:w,pathname:h,params:P,query:m,hash:g},a.exitTimeout,i,s);if(N&&(await N,c.__routerNavSeq!==E||(c.__routeExit&&c.__routeExit.wait===N&&(c.__routeExit=null),typeof o?.set!="function")))return}else sC(c);if(a.pushState){let N=h+(p||"")+(g||"");try{a.replace?s.history.replaceState(n,null,N):s.history.pushState(n,null,N)}catch{}}let Ct=b||!x?{route:w,routePath:k,hash:g,params:P,query:m,debugging:!1}:{params:P,query:m};if(a.updateState&&o.state.update(Ct,{preventContentUpdate:!0}),X){l&&a.removeOldElement&&o[l].remove();let N=o.__ref?.origin?.content,H={};if(N)for(let F in N){let q=N[F];F==="__ref"||F==="props"||F==="node"||F==="parent"||F==="key"||(typeof q=="string"||typeof q=="number"||typeof q=="boolean"||typeof q=="object"&&q!==null&&!q.node&&!q.__ref)&&(H[F]=q)}let mt={...H,...typeof A=="object"?A:{extends:A}};a.useFragment&&(mt.tag="fragment");let B={content:A,route:w},gt=c.__routerRendered;try{if(typeof o?.set!="function")return;c.__routerRendered=B,o.set(mt,{contentElementKey:l})}catch(F){c.__routerRendered===B&&(c.__routerRendered=gt),console.error("[smbls/router] failed to render route content",h,F)}}let at=!b&&x;if(a.scrollToTop&&!at&&I?.scrollTo&&I.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&A[l]?.node?.scrollTo&&A[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),g){let N=i.getElementById(g.slice(1));if(N&&I?.scrollTo){let H=s.getComputedStyle?s.getComputedStyle(N):null,mt=H&&parseFloat(H.scrollMarginTop)||0,B=N.getBoundingClientRect().top+I.scrollTop-mt-(a.scrollToOffset||0);I.scrollTo({...a.scrollToOptions||{},top:B,left:0})}}gn("routeChanged",o,a)},sD=ln;var iD=(t,e,n)=>{let{context:r}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=r,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let p=d;if(u&&u.customRouterElement){let g=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of g){if(!m||!m[y]){m=null;break}m=m[y]}m&&(p=m,d.routes&&(p.routes=d.routes))}(f.router||l.router||c.router||ln)(a,p,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(p){console.warn(p)}}},Nb={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>sr(t,t.href)||sr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:iD},iC={extends:"Link"},jb={onClick:(t,e,n)=>{let{context:r}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=r,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let p=d;if(u&&u.customRouterElement){let g=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of g){if(!m||!m[y]){m=null;break}m=m[y]}m&&(p=m,d.routes&&(p.routes=d.routes))}(f.router||l.router||c.router||ln)(a,p,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(p){console.warn(p)}}}},aC={extends:[Nb,jb]};var Vb={};$(Vb,{Select:()=>cC});var cC={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:t=>t.value,selected:t=>t.selected,disabled:t=>t.disabled}},attr:{name:t=>t.name,disabled:t=>t.disabled,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e}}};var Ub={};$(Ub,{Button:()=>lC,ButtonSet:()=>pC,CircleButton:()=>uC,IconButton:()=>hC,KangorooButton:()=>dC,SquareButton:()=>fC});var lC={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",borderStyle:"none",display:"inline-flex",align:"center center",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",padding:"0 A",fontWeight:"700",fontFamily:"inherit",round:"radiusPill",disabled:t=>t.call("exec",t.disabled)},fC={extends:"Button",fontSize:"A",width:"A",minHeight:"auto",padding:"Z",aspectRatio:"1 / 1",boxSize:"fit-content fit-content",justifyContent:"center",round:"Z2",boxSizing:"content-box"},uC={extends:"SquareButton",round:"C"},dC={extends:"Button",childExtends:"IconText"},pC={tag:"nav",display:"flex",childExtends:"SquareButton"},hC={extends:["SquareButton","ClickableItem"],round:"Z"};var zb={};$(zb,{Dialog:()=>gC,DialogFooter:()=>yC,DialogHeader:()=>mC});var gC={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},mC={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},yC={display:"flex",align:"center flex-end",gap:"X2",margin:"auto - -",padding:"Y2 X2",childExtends:{extends:"Button",textTransform:"uppercase",background:"transparent","@dark":{theme:"primary @dark .color-only"},"@light":{theme:"primary @light .color-only"},"&":{padding:"Z A"},":hover":{theme:"tertiary"},":active":{background:"white.1"}},Cancel:{text:"cancel"},Ok:{text:"ok"}};var Hb={};$(Hb,{Tooltip:()=>bC,TooltipHidden:()=>_C,TooltipParent:()=>xC});D();var bC={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>Rt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},_C={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},xC={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var Wb={};$(Wb,{Avatar:()=>wC});var aD=t=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="32" fill="#71718A"/><text x="32" y="42" font-family="system-ui,sans-serif" font-size="28" font-weight="700" text-anchor="middle" fill="#fff">${String(t||"").trim().charAt(0).toUpperCase()||"?"}</text></svg>`;return"data:image/svg+xml;utf8,"+encodeURIComponent(n)},wC={extends:"Img",display:"block",avatarType:"adventurer-neutral",borderRadius:"100%",boxSize:"C+X C+X",src:t=>`https://api.dicebear.com/7.x/${t.avatarType||"initials"}/svg?seed=${t.key||"no-avatar"}`,onError:(t,e)=>{if(!e.node||e.node.__avatarFallbackApplied)return;e.node.__avatarFallbackApplied=!0;let n=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=aD(n)},attr:{alt:t=>t.alt!=null?t.alt:t.text?t.call("exec",t.text,t):t.key&&t.key!=="no-avatar"?t.key:""}};var qb={};$(qb,{Range:()=>SC});var SC={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,n)=>{e.call("isFunction",e.onInput)?e.onInput(t,e,n):n.update({value:parseFloat(e.node.value)})},onChange:(t,e,n)=>{e.call("isFunction",e.onChange)?e.onChange(t,e,n):n.update({value:parseFloat(e.node.value)})},"::-webkit-slider-thumb":{boxSizing:"content-box",width:"8px",height:"8px",borderWidth:"2px",borderStyle:"solid",borderRadius:"100%",opacity:".8",appearance:"none"},"::-webkit-slider-runnable-track":{},"@dark":{background:"white.2","::-webkit-slider-thumb":{background:"#232526",borderColor:Ko("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Ko("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,n)=>{let r=t.call("exec",t[e],t);return(t.call("isFunction",r)?r(t,t.state):r!==void 0?r:n!==void 0?n:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var Kb={};$(Kb,{Dropdown:()=>kC,DropdownList:()=>vC,DropdownParent:()=>CC,DropdownParentFocus:()=>EC,DropdownSiblingFocus:()=>AC});var kC={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},vC={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},CC={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},EC={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},AC={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var Gb={};$(Gb,{Notification:()=>TC});var TC={display:"flex",theme:"alert",padding:"Z1 B Z A",round:"A A A Y2",gap:"X2",cursor:"pointer",align:"flex-start center",IconText:{Icon:{name:"info outline"},Text:{":empty":{hide:!0}}},Hgroup:{extends:["Flex","Hgroup"],flow:"y",align:"flex-start",gap:"X2",H:{tag:"h6",margin:"0",fontWeight:"600",lineHeight:"1em",text:"Notification",":empty":{hide:!0}},P:{fontSize:"Z",margin:"0",text:"is not always a distraction",":empty":{hide:!0}}}};var ro=Object.assign({},fb,ub,db,pb,hb,bb,_b,xb,mb,wb,Sb,yb,kb,vb,Cb,Eb,Ab,Tb,Ob,Rb,Pb,Db,Bb,Vb,Ub,zb,Hb,Wb,qb,Kb,Gb);function zu(t){if(t==null)return 0;if(typeof t!="object")return OC(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let r=0;r<t.length;r++)e=(e^zu(t[r]))*16777619;return e>>>0}let n=Object.keys(t).sort();for(let r=0;r<n.length;r++)e=(e^OC(n[r]))*16777619,e=(e^zu(t[n[r]]))*16777619;return e>>>0}function OC(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e}function Hu(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!Hu(t[o],e[o]))return!1;return!0}let n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){let s=n[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!Hu(t[s],e[s]))return!1}return!0}function Yb(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let n=!1,r={};for(let o in t)if(o in e){let s=Yb(t[o],e[o]);r[o]=s,s!==t[o]&&(n=!0)}else r[o]=t[o];for(let o in e)o in t||(r[o]=e[o],n=!0);return n?r:t}function Xb(t,e,n){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(n||(n=new WeakSet),n.has(e))return t;n.add(e);for(let r in e){let o=e[r];o&&typeof o=="object"&&!Array.isArray(o)&&t[r]&&typeof t[r]=="object"&&!Array.isArray(t[r])?Xb(t[r],o,n):t[r]=o}return t}function cr(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e.toString(36)}function Os(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Sc(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():cr(e)}function RC(t){return t.split(`
84
+ )`};var W2={primary:{"@dark":{color:"white",background:"blue",".color-only":{color:"blue"},".inactive":{background:"gray+16"},".gradient":{color:"white",background:"gradient-blue"}},"@light":{color:"white",background:"gradient-blue",".color-only":{color:"blue"},".gradient":{color:"white",background:"gradient-colorful"}}},secondary:{"@dark":{color:"white",background:"green",".color-only":{color:"green"}},"@light":{color:"white",background:"green",".color-only":{color:"green"}},".child":"--primary"},tertiary:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"}},quaternary:{"@light":{color:"white",background:"gradient-light"},"@dark":{color:"white",background:"gradient-dark-active"}},quinary:{"@dark":{color:"gray=90",background:"gradient-light",":hover":{color:"gray=95",background:"gradient-light-active"},":focus":{color:"gray=120",background:"gradient-light-active"},":active":{color:"gray=120",background:"gradient-light-active"},".active":{color:"gray=120",background:"gradient-light-active"}},"@light":{color:"gray3",background:"gradient-dark",":hover":{color:"gray1",background:"gradient-dark-active"},":active":{color:"gray1",background:"gradient-dark-active"},".active":{color:"gray1",background:"gradient-dark-active"}}}},q2={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},K2={field:{"@light":{color:"black",background:"gray.975+144",borderColor:"gray.975+144","::placeholder":{color:"gray-68"}},"@dark":{color:"white",background:"gray.975-52",borderColor:"gray.975-52","::placeholder":{color:"gray+68"}}},label:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"},".light":{color:"white",background:"gray3"},".dark":{color:"white",background:"black.35"}},card:{"@light":{background:"gray.975+150"},"@dark":{color:"white",background:"gray.975-56"},".child":{color:"white",background:"gray3"},".secondary":{color:"white",background:"gradient-blue-dark",".child":{color:"white",background:"black.35"}}},dialog:{"@dark":{color:"white",background:"gray.92",".helper":{color:"white",background:"black"}},"@light":{color:"currentColor",background:"gray.1"}}},Ik={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...W2,...q2,...K2,backdrop:{"@light":{background:"scrim",backdropFilter:"blur(8px)"},"@dark":{background:"scrim",backdropFilter:"blur(8px)"}},backdropSoft:{"@light":{background:"scrimSoft",backdropFilter:"blur(4px)"},"@dark":{background:"scrimSoft",backdropFilter:"blur(4px)"}},none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var $k={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var Mk={ratio:1.618,subSequence:!0};var Fk={SourceSans:[{url:""}]},Nk={system:{isDefault:!0,isSystemFallback:!0,value:["system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"','"Liberation Sans"'],type:"sans-serif"}};var jk={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var Bk={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Vk={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var Uk={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var _c={version:"0.0.1",color:Dk,gradient:Lk,theme:Ik,typography:$k,spacing:Mk,font:Fk,fontFamily:Nk,timing:Vk,icons:jk,media:Bk,sizes:Uk,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}},modalIn:{from:{transform:"scale(0.95)",opacity:0},to:{transform:"",opacity:1}},modalOut:{to:{transform:"scale(0.95)",opacity:0}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Ts={};$(Ts,{A:()=>aC,AssetPicture:()=>iv,Audio:()=>lv,Avatar:()=>SC,B:()=>Tv,Block:()=>zk,Box:()=>Bu,Br:()=>Dv,Button:()=>fC,ButtonSet:()=>hC,COMPONENTS:()=>ro,Caption:()=>_v,Checkbox:()=>Uv,CheckboxHgroup:()=>zv,Circle:()=>rv,CircleButton:()=>dC,Clickable:()=>tv,Data:()=>Rv,Dialog:()=>mC,DialogFooter:()=>bC,DialogHeader:()=>yC,Dropdown:()=>vC,DropdownList:()=>CC,DropdownParent:()=>EC,DropdownParentFocus:()=>AC,DropdownSiblingFocus:()=>TC,FileIcon:()=>eC,Flex:()=>Wk,Focusable:()=>ev,FocusableComponent:()=>nv,Footnote:()=>Av,Form:()=>Zk,Grid:()=>Kk,Gutter:()=>Yk,H1:()=>dv,H2:()=>pv,H3:()=>hv,H4:()=>gv,H5:()=>mv,H6:()=>yv,Headline:()=>Cv,Hgroup:()=>Fv,HgroupButton:()=>jv,HgroupRows:()=>Nv,Hoverable:()=>Qk,Hr:()=>Pv,I:()=>Ov,Icon:()=>Qv,IconButton:()=>gC,IconText:()=>tC,Iframe:()=>Jk,Img:()=>Xk,Inline:()=>Hk,InlineFlex:()=>qk,InlineGrid:()=>Gk,Input:()=>Bv,Italic:()=>kv,KangorooButton:()=>pC,Li:()=>Lv,Link:()=>Nb,Notification:()=>OC,NumberInput:()=>Vv,Ol:()=>$v,P:()=>bv,Picture:()=>sv,Radio:()=>Hv,RadioHgroup:()=>Wv,Range:()=>kC,RouteLink:()=>cC,RouterLink:()=>jb,SHAPES:()=>Nu,Select:()=>lC,Shape:()=>gb,Span:()=>uv,SquareButton:()=>uC,Strong:()=>xv,Subhead:()=>Ev,Svg:()=>av,Text:()=>fv,Textarea:()=>Gv,TextareaWithButton:()=>Yv,Theme:()=>ov,Title:()=>vv,Toggle:()=>qv,ToggleHgroup:()=>Kv,Tooltip:()=>_C,TooltipHidden:()=>xC,TooltipParent:()=>wC,U:()=>wv,Ul:()=>Iv,Underline:()=>Sv,Video:()=>cv,depth:()=>ju,focusableRingEnabled:()=>Mu,getSystemGlobalTheme:()=>xc});var fb={};$(fb,{Block:()=>zk,Flex:()=>Wk,Grid:()=>Kk,Gutter:()=>Yk,Inline:()=>Hk,InlineFlex:()=>qk,InlineGrid:()=>Gk});var zk={display:"block"},Hk={display:"inline"},Wk={display:"flex"},qk={display:"inline-flex"},Kk={display:"grid"},Gk={display:"inline-grid"},Yk={boxSize:"C1"};var ub={};$(ub,{Img:()=>Xk});D();var Xk={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Qt(t);return e&&e.src||t.src},srcset:t=>{let e=Qt(t);return(e?_a(e):"")||t.srcset}}};var db={};$(db,{Form:()=>Zk});var Zk={tag:"form"};var pb={};$(pb,{Iframe:()=>Jk});var Jk={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var hb={};$(hb,{Clickable:()=>tv,Focusable:()=>ev,FocusableComponent:()=>nv,Hoverable:()=>Qk,focusableRingEnabled:()=>Mu});var G2={appearance:"none",fontFamily:"inherit"},Qk={transition:"C defaultBezier",transitionProperty:"opacity, transform",opacity:.85,":hover":{opacity:.9,transform:"scale(1.015)"},":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1,transform:"scale(1.015)",":hover":{opacity:1}}},tv={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Mu(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var ev={border:"none",outline:t=>Mu(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Mu(t)?"solid X currentColor":"none"},attr:{tabIndex:t=>t.tabIndex}},nv={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:G2};var bb={};$(bb,{Picture:()=>sv});var yb={};$(yb,{Theme:()=>ov,getSystemGlobalTheme:()=>xc});var mb={};$(mb,{Circle:()=>rv,SHAPES:()=>Nu,Shape:()=>gb,default:()=>Y2,depth:()=>ju});D();var Re=T(),ju={4:{boxShadow:`rgba(0,0,0,.10) 0 2${Re.unit.default} 4${Re.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${Re.unit.default} 6${Re.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${Re.unit.default} 10${Re.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${Re.unit.default} 16${Re.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${Re.unit.default} 26${Re.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${Re.unit.default} 42${Re.unit.default}`}},As=t=>et(t.shapeDirectionColor)||et(t.borderColor)||et(t.backgroundColor)||et(t.background),Fu=t=>{let e=cc.transition(t.transition,t);return e&&e.transition},Nu={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:As(t),transition:Fu(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:As(t),transition:Fu(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:As(t),transition:Fu(t),transitionProperty:"background"},"&:before":{left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"},"&:after":{left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}),chevron:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",transition:Fu(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${As(t)} 25%, transparent 25%), linear-gradient(315deg, ${As(t)} 25%, transparent 25%)`},"&:after":{background:As(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},gb={deps:{exec:ut,getSpacingBasedOnRatio:Ee,getMediaColor:$t},classlist:{shape:t=>t.deps.exec(Nu[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Nu[t.shape+"Direction"];return t.shape&&e?e[t.shapeDirection||"left"]:null},shapeDirectionColor:t=>{let e={borderColor:t.deps.getMediaColor(t.background||t.backgroundColor)};return t.shapeDirection?e:null}}},rv={round:"100%"},Y2=gb;D();var xc=({context:t,state:e})=>{let n=e&&e.root,r=n&&n.globalTheme||t.designSystem&&t.designSystem.globalTheme;return r==="auto"?null:r},ov={deps:{depth:ju},classlist:{depth:t=>!Dt(t.depth)&&t.deps.depth[t.depth]}};var sv={deps:{getSystemGlobalTheme:xc},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:xc},tag:"source",attr:{media:t=>{let{key:e,context:n,deps:r}=t,{media:o}=n.designSystem,s=r.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var _b={};$(_b,{AssetPicture:()=>iv});D();var iv={tag:"picture",children:t=>{let e=Qt(t);if(e)return xa(e,t.alt)}};var xb={};$(xb,{Svg:()=>av});var av={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:n,utils:r}=e,o=n&&n.svg,s=t.spriteId||n&&n.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let h=d[1],p=e.document||(typeof document<"u"?document:null);if(!(p&&typeof p.getElementById=="function"&&p.getElementById(h))){let m=r&&r.scratchSystem&&r.scratchSystem.appendSVGSprite;n&&!n.__svgCache&&(n.__svgCache={}),typeof m=="function"?m({[h]:i},{document:p}):r&&typeof r.init=="function"&&r.init({svg:{[h]:i}},{document:p,emotion:e.emotion})}return a(h)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=o[l]=`svg-${(u>>>0).toString(36)}`,r.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var wb={};$(wb,{Video:()=>cv});D();var cv={tag:"video",controls:!0,attr:{src:t=>{let e=Qt(t);return e&&e.src||t.src}},children:t=>{let e=Qt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var Sb={};$(Sb,{Audio:()=>lv});D();var lv={tag:"audio",controls:!0,attr:{src:t=>{let e=Qt(t);return e&&e.src||t.src}},children:t=>{let e=Qt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var kb={};$(kb,{B:()=>Tv,Caption:()=>_v,Data:()=>Rv,Footnote:()=>Av,H1:()=>dv,H2:()=>pv,H3:()=>hv,H4:()=>gv,H5:()=>mv,H6:()=>yv,Headline:()=>Cv,I:()=>Ov,Italic:()=>kv,P:()=>bv,Span:()=>uv,Strong:()=>xv,Subhead:()=>Ev,Text:()=>fv,Title:()=>vv,U:()=>wv,Underline:()=>Sv});var fv={},uv={tag:"span"},dv={tag:"h1"},pv={tag:"h2"},hv={tag:"h3"},gv={tag:"h4"},mv={tag:"h5"},yv={tag:"h6"},bv={tag:"p"},_v={tag:"caption"},xv={tag:"strong",fontWeight:"700"},wv={tag:"u"},Sv={tag:"u"},kv={tag:"i"},vv={},Cv={tag:"h6",fontSize:"B",fontWeight:500},Ev={tag:"span",fontSize:"Z1"},Av={tag:"span",fontSize:"Z"},Tv={tag:"b"},Ov={tag:"i"},Rv={tag:"data"};var vb={};$(vb,{Box:()=>Bu,Br:()=>Dv,Hr:()=>Pv,Li:()=>Lv,Ol:()=>$v,Ul:()=>Iv});var X2=t=>{if(!t.context)return;let{props:e,__ref:n}=t,r=se(e,t,{unpack:!1});n.__class=r},Bu={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:X2},Pv={tag:"hr",margin:"C1 0"},Dv={tag:"br"},Lv={tag:"li"},Iv={tag:"ul",childExtends:{extends:"Li"}},$v={tag:"ol",childExtends:{extends:"Li"}};var Cb={};$(Cb,{Hgroup:()=>Fv,HgroupButton:()=>jv,HgroupRows:()=>Nv});var Mv=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let n=e.charCodeAt(0);if(n>=65&&n<=90)return!0}return!1},Fv={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:Mv,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:Mv,margin:"0",color:"paragraph"}},Nv={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},jv={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Eb={};$(Eb,{Input:()=>Bv});var Bv={extends:["Focusable"],tag:"input",border:"none",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,minLength:t=>t.minlength,maxLength:t=>t.maxlength,name:t=>t.name,autocomplete:t=>t.autocomplete,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,readonly:t=>t.readonly,required:t=>t.required,type:t=>t.type}};var Ab={};$(Ab,{NumberInput:()=>Vv});var Vv={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"solid gray3",borderWidth:"1px",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var Tb={};$(Tb,{Checkbox:()=>Uv,CheckboxHgroup:()=>zv});var Uv={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:"solid X currentColor",outlineOffset:"Z"},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},zv={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Ob={};$(Ob,{Radio:()=>Hv,RadioHgroup:()=>Wv});var Hv={extends:"Checkbox",Input:{type:"radio",":checked + div:after":{opacity:"1"}},Flex:{round:"100%",padding:"Y",":after":{content:'""',display:"block",boxSize:"X+W1",round:"100%",background:"white",opacity:"0",transition:"opacity .15s ease-in-out"},Icon:null}},Wv={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Rb={};$(Rb,{Toggle:()=>qv,ToggleHgroup:()=>Kv});var qv={extends:"Checkbox",Input:{role:"switch",":checked + div":{background:"green2+8",justifyContent:"flex-end"}},Flex:{boxSize:"A1 B1",padding:"- W_default",round:"D",align:"center flex-start",theme:"field",border:"none",transition:"opacity .15s ease",":after":{content:'""',boxSize:"A A",round:"100%",background:"white",boxShadow:"gray.2 1px 1px Z"},Icon:null}},Kv={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Pb={};$(Pb,{Textarea:()=>Gv,TextareaWithButton:()=>Yv});var Gv={tag:"textarea",extends:["Input","Flex"],fontfamily:"Avenir",placeholder:"Leave us a message...",padding:"A",theme:"field",border:"none",minHeight:"E_default",width:"100%",height:"E1_default",fontFamily:"inherit",round:"Z2",lineHeight:1.4,".outlined":{borderWidth:"1px",borderStyle:"solid"}},Yv={display:"flex",gap:"Y2",Textarea:{height:"C2+W",minWidth:"H",padding:"A",fontSize:"Z1",round:"Z2",minHeight:"fit-content"},SquareButton:{background:"blue",Icon:{name:"send"}}};var Db={};$(Db,{FileIcon:()=>eC,Icon:()=>Qv,IconText:()=>tC});var Xv=new Set,Zv=(t,e)=>{if(!Xv.has(t)&&(Xv.add(t),typeof console<"u"&&console.warn)){let n=e&&e.__ref&&e.__ref.path,r=n&&n.length?` at <${n.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${r} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},Jv=new WeakMap,Z2=t=>{let e=Jv.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},Jv.set(t,e)),e},J2=(t,e)=>{if(!t)return null;let n=t.default||t;return typeof n=="string"?n.trim()?{[e]:n}:null:typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).length?n:null},Q2=(t,e,n)=>{let r=n&&n.context&&n.context.document||(typeof document<"u"?document:null);st(t);try{let o=T();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Kr(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&r&&Object.keys(s).length&&Gr(s,{document:r}),Object.keys(s).length>0}finally{rt()}},tD=(t,e,n,r,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=Z2(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(o),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=J2(f,n);return u?Q2(s,u,r):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,f),!1)).then(f=>{a.pending.delete(e);let u=a.waiting.get(e);a.waiting.delete(e),f||a.failed.add(e),u&&u.forEach(d=>{try{d(f)}catch(h){console.error("[Icon] repaint error:",h)}})});return a.pending.set(e,l),!0},Qv={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,n)=>{let{parent:r}=t,{icons:o,useIconSprite:s,verbose:i}=n&&n.designSystem,{toCamelCase:a}=n&&n.utils,c=p=>{let g=p[".isActive"];if(g)return p.call("exec",g.name||g.icon)},l=(p,g,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:x}=m&&m.utils,b=f(p,g),w=x(b).split(/([a-z])([A-Z])/g),S=w[1]?w[0]:b.split(".")[0].split(" ")[0],A=y&&y[S];if(A){let P=b.includes(".")?"sfsymbols."+b.split(".").slice(1).join("."):"sfsymbols";return b=A[P]||A[b.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${b}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(p,g)=>{let{key:m}=p,y=p.call("exec",p.name||p.icon||m,p);return p.call("isString",y)&&y.includes("{{")&&(y=p.call("replaceLiteralsWithObjectFields",y)),p.call("isString",y)?y:m},u=t.src,d,h=()=>{let p=f(t,e),g=p;if(p.includes(" ")){let E=p.split(" ");p=E[0]+E.slice(1).map(M=>M.charAt(0).toUpperCase()+M.slice(1)).join("")}let m=a(p),y=m.split(/([a-z])([A-Z])/g),x=l(t,e,n);if(x){Object.assign(t,x);return}let b;t.isActive&&(b=c(t));let _=r[".isActive"];r&&r.isActive&&_&&_.icon&&(b=t.call("exec",_.icon||_.Icon.name||_.Icon.icon,t)),t.call("isString",b)&&b.includes("{{")&&(b=t.call("replaceLiteralsWithObjectFields",b));let w;o[b]&&(w=b),o[m]?w=m:o[y[0]+y[1]]?w=y[0]+y[1]:o[y[0]]?w=y[0]:i&&t.warn("Can't find icon:",p,w);let S=o[w],A=r&&r.src||u;!S&&!A&&(tD(n,g,m,t,M=>{if(!(d&&d._disposed)){if(!M)return Zv(g,t);h()}})||Zv(g,t));let P=s&&w,L=S||A||o.noIcon;if(!(t.spriteId===P&&t.src===L&&t.node&&t.node.innerHTML)&&(t.spriteId=P,t.src=L,typeof t.html=="function"&&t.node)){let E=t.context&&t.context.designSystem;E&&st(E);try{let M=t.html(t,t.state,t.context);M!=null&&typeof M!="function"&&(t.node.innerHTML=M)}finally{E&&rt()}}};d=G(h,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},tC={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,n=t.call("exec",t.icon,t);return t.call("exec",n||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},eC={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Bb={};$(Bb,{A:()=>aC,Link:()=>Nb,RouteLink:()=>cC,RouterLink:()=>jb});var wc={};$(wc,{default:()=>iD,getActiveRoute:()=>Fb,lastLevel:()=>Uu,lastPathname:()=>Vu,matchRoute:()=>Ib,parseQuery:()=>$b,parseRoutePattern:()=>Lb,router:()=>ln,runGuards:()=>Mb});D();var rC=/^:(.+)/,oC=/^\*$/,nC=new Map,Lb=t=>{let e=nC.get(t);if(e)return e;let n=t.replace(/^\//,"").split("/"),r=[],o=!1;for(let i=0;i<n.length;i++){let a=n[i].match(rC);a?r.push({index:i,name:a[1]}):oC.test(n[i])&&(o=!0)}let s={segments:n,params:r,hasWildcard:o,pattern:t};return nC.set(t,s),s},Ib=(t,e,n=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(n),s="/"+(o[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=Lb(l),u=eD(o,f);u>a&&(a=u,i=l,c=nD(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},eD=(t,e)=>{let{segments:n,hasWildcard:r}=e;if(!r&&n.length!==t.length&&n.length!==1&&n.length>t.length)return-1;let o=0,s=Math.min(n.length,t.length);for(let i=0;i<s;i++)if(n[i]===t[i])o+=3;else if(rC.test(n[i]))o+=1;else if(oC.test(n[i]))o+=.5;else return-1;return o},nD=(t,e)=>{let n={};for(let{index:r,name:o}of e.params)t[r]&&(n[o]=decodeURIComponent(t[r]));return n},$b=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((r,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(r)):e[o]=r}),e},Mb=async(t,e)=>{if(!t||!t.length)return!0;for(let n of t){let r=await n(e);if(r===!1)return!1;if(typeof r=="string")return r}return!0},Fb=(t=0,e)=>{e||(e=typeof C<"u"?C.location.pathname:"/");let r=e.split("/")[t+1];if(r)return`/${r}`},Vu,Uu=0,rD=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,sC={level:Uu,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof nt<"u"&&(nt.scrollingElement||nt.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0,exitTimeout:300},oD=(t,e)=>{if(!t||t.visibilityState!=="visible")return!1;try{let n=e&&typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)");if(n&&n.matches)return!1}catch{}return!0},iC=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},sD=(t,e,n,r,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===n)return a.wait;if(iC(e),!n||!n.node||typeof t.onRouteExit>"u"||!oD(s,i))return null;let c=typeof o=="number"&&o>=0?o:sC.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...r,page:n,timeout:c,signal:l?l.signal:void 0},u;try{u=gn("routeExit",t,f)}catch{return null}if(!u||typeof u.then!="function")return null;let d={page:n,abort:()=>{l&&!l.signal.aborted&&l.abort()}};return d.wait=new Promise(h=>{let p=setTimeout(()=>{d.abort(),h()},c),g=()=>{clearTimeout(p),h()};u.then(g,g)}),e.__routeExit=d,d.wait},ln=async(t,e,n={},r={})=>{let o=e||void 0,s=o?.context?.window||C,i=o?.context?.document||nt,a={...sC,...o.context.routerOptions,...r};Uu=a.lastLevel;let c=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=rD(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:h,search:p,hash:g}=d,m=$b(p),y=o.node,x=g&&g!==s.location.hash.slice(1),b=h!==Vu;Vu=h;let _=c.__routerRendered,w,S,A,P;if(a.useParamsMatching){let N=Ib(h,o.routes,a.level);w=N.key,S=N.routePath,A=N.content,P=N.params}else{w=Fb(a.level,h),S=w;let N=o.routes;A=N?N[w||"/"]||N["/*"]:null,P={}}let L=a.scrollToNode?y:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}if(!A){a.onNotFound?a.onNotFound({pathname:h,route:w,element:o}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(o.routes||{}));return}if(a.guards&&a.guards.length){let N={pathname:h,route:w,params:P,query:m,hash:g,element:o,state:n},H=await Mb(a.guards,N);if(H===!1)return;if(typeof H=="string")return ln(H,e,n,{...r,guards:[]})}let E=c.__routerNavSeq=(c.__routerNavSeq||0)+1,M=!_||_.content!==A||_.route!==w,X=b||M||a.force===!0;if(X&&_){let N=sD(o,c,o[l],{from:_.route,to:w,pathname:h,params:P,query:m,hash:g},a.exitTimeout,i,s);if(N&&(await N,c.__routerNavSeq!==E||(c.__routeExit&&c.__routeExit.wait===N&&(c.__routeExit=null),typeof o?.set!="function")))return}else iC(c);if(a.pushState){let N=h+(p||"")+(g||"");try{a.replace?s.history.replaceState(n,null,N):s.history.pushState(n,null,N)}catch{}}let Ct=b||!x?{route:w,routePath:S,hash:g,params:P,query:m,debugging:!1}:{params:P,query:m};if(a.updateState&&o.state.update(Ct,{preventContentUpdate:!0}),X){l&&a.removeOldElement&&o[l].remove();let N=o.__ref?.origin?.content,H={};if(N)for(let F in N){let q=N[F];F==="__ref"||F==="props"||F==="node"||F==="parent"||F==="key"||(typeof q=="string"||typeof q=="number"||typeof q=="boolean"||typeof q=="object"&&q!==null&&!q.node&&!q.__ref)&&(H[F]=q)}let mt={...H,...typeof A=="object"?A:{extends:A}};a.useFragment&&(mt.tag="fragment");let B={content:A,route:w},gt=c.__routerRendered;try{if(typeof o?.set!="function")return;c.__routerRendered=B,o.set(mt,{contentElementKey:l})}catch(F){c.__routerRendered===B&&(c.__routerRendered=gt),console.error("[smbls/router] failed to render route content",h,F)}}let at=!b&&x;if(a.scrollToTop&&!at&&L?.scrollTo&&L.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&A[l]?.node?.scrollTo&&A[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),g){let N=i.getElementById(g.slice(1));if(N&&L?.scrollTo){let H=s.getComputedStyle?s.getComputedStyle(N):null,mt=H&&parseFloat(H.scrollMarginTop)||0,B=N.getBoundingClientRect().top+L.scrollTop-mt-(a.scrollToOffset||0);L.scrollTo({...a.scrollToOptions||{},top:B,left:0})}}gn("routeChanged",o,a)},iD=ln;var aD=(t,e,n)=>{let{context:r}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=r,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let p=d;if(u&&u.customRouterElement){let g=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of g){if(!m||!m[y]){m=null;break}m=m[y]}m&&(p=m,d.routes&&(p.routes=d.routes))}(f.router||l.router||c.router||ln)(a,p,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(p){console.warn(p)}}},Nb={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>sr(t,t.href)||sr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:aD},aC={extends:"Link"},jb={onClick:(t,e,n)=>{let{context:r}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=r,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let p=d;if(u&&u.customRouterElement){let g=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of g){if(!m||!m[y]){m=null;break}m=m[y]}m&&(p=m,d.routes&&(p.routes=d.routes))}(f.router||l.router||c.router||ln)(a,p,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(p){console.warn(p)}}}},cC={extends:[Nb,jb]};var Vb={};$(Vb,{Select:()=>lC});var lC={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:t=>t.value,selected:t=>t.selected,disabled:t=>t.disabled}},attr:{name:t=>t.name,disabled:t=>t.disabled,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e}}};var Ub={};$(Ub,{Button:()=>fC,ButtonSet:()=>hC,CircleButton:()=>dC,IconButton:()=>gC,KangorooButton:()=>pC,SquareButton:()=>uC});var fC={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",borderStyle:"none",display:"inline-flex",align:"center center",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",padding:"0 A",fontWeight:"700",fontFamily:"inherit",round:"radiusPill",disabled:t=>t.call("exec",t.disabled)},uC={extends:"Button",fontSize:"A",width:"A",minHeight:"auto",padding:"Z",aspectRatio:"1 / 1",boxSize:"fit-content fit-content",justifyContent:"center",round:"Z2",boxSizing:"content-box"},dC={extends:"SquareButton",round:"C"},pC={extends:"Button",childExtends:"IconText"},hC={tag:"nav",display:"flex",childExtends:"SquareButton"},gC={extends:["SquareButton","ClickableItem"],round:"Z"};var zb={};$(zb,{Dialog:()=>mC,DialogFooter:()=>bC,DialogHeader:()=>yC});var mC={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},yC={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},bC={display:"flex",align:"center flex-end",gap:"X2",margin:"auto - -",padding:"Y2 X2",childExtends:{extends:"Button",textTransform:"uppercase",background:"transparent","@dark":{theme:"primary @dark .color-only"},"@light":{theme:"primary @light .color-only"},"&":{padding:"Z A"},":hover":{theme:"tertiary"},":active":{background:"white.1"}},Cancel:{text:"cancel"},Ok:{text:"ok"}};var Hb={};$(Hb,{Tooltip:()=>_C,TooltipHidden:()=>xC,TooltipParent:()=>wC});D();var _C={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>Rt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},xC={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},wC={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var Wb={};$(Wb,{Avatar:()=>SC});var cD=t=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="32" fill="#71718A"/><text x="32" y="42" font-family="system-ui,sans-serif" font-size="28" font-weight="700" text-anchor="middle" fill="#fff">${String(t||"").trim().charAt(0).toUpperCase()||"?"}</text></svg>`;return"data:image/svg+xml;utf8,"+encodeURIComponent(n)},SC={extends:"Img",display:"block",avatarType:"adventurer-neutral",borderRadius:"100%",boxSize:"C+X C+X",src:t=>`https://api.dicebear.com/7.x/${t.avatarType||"initials"}/svg?seed=${t.key||"no-avatar"}`,onError:(t,e)=>{if(!e.node||e.node.__avatarFallbackApplied)return;e.node.__avatarFallbackApplied=!0;let n=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=cD(n)},attr:{alt:t=>t.alt!=null?t.alt:t.text?t.call("exec",t.text,t):t.key&&t.key!=="no-avatar"?t.key:""}};var qb={};$(qb,{Range:()=>kC});var kC={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,n)=>{e.call("isFunction",e.onInput)?e.onInput(t,e,n):n.update({value:parseFloat(e.node.value)})},onChange:(t,e,n)=>{e.call("isFunction",e.onChange)?e.onChange(t,e,n):n.update({value:parseFloat(e.node.value)})},"::-webkit-slider-thumb":{boxSizing:"content-box",width:"8px",height:"8px",borderWidth:"2px",borderStyle:"solid",borderRadius:"100%",opacity:".8",appearance:"none"},"::-webkit-slider-runnable-track":{},"@dark":{background:"white.2","::-webkit-slider-thumb":{background:"#232526",borderColor:Ko("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Ko("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,n)=>{let r=t.call("exec",t[e],t);return(t.call("isFunction",r)?r(t,t.state):r!==void 0?r:n!==void 0?n:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var Kb={};$(Kb,{Dropdown:()=>vC,DropdownList:()=>CC,DropdownParent:()=>EC,DropdownParentFocus:()=>AC,DropdownSiblingFocus:()=>TC});var vC={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},CC={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},EC={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},AC={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},TC={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var Gb={};$(Gb,{Notification:()=>OC});var OC={display:"flex",theme:"alert",padding:"Z1 B Z A",round:"A A A Y2",gap:"X2",cursor:"pointer",align:"flex-start center",IconText:{Icon:{name:"info outline"},Text:{":empty":{hide:!0}}},Hgroup:{extends:["Flex","Hgroup"],flow:"y",align:"flex-start",gap:"X2",H:{tag:"h6",margin:"0",fontWeight:"600",lineHeight:"1em",text:"Notification",":empty":{hide:!0}},P:{fontSize:"Z",margin:"0",text:"is not always a distraction",":empty":{hide:!0}}}};var ro=Object.assign({},fb,ub,db,pb,hb,bb,_b,xb,mb,wb,Sb,yb,kb,vb,Cb,Eb,Ab,Tb,Ob,Rb,Pb,Db,Bb,Vb,Ub,zb,Hb,Wb,qb,Kb,Gb);function zu(t){if(t==null)return 0;if(typeof t!="object")return RC(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let r=0;r<t.length;r++)e=(e^zu(t[r]))*16777619;return e>>>0}let n=Object.keys(t).sort();for(let r=0;r<n.length;r++)e=(e^RC(n[r]))*16777619,e=(e^zu(t[n[r]]))*16777619;return e>>>0}function RC(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e}function Hu(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!Hu(t[o],e[o]))return!1;return!0}let n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){let s=n[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!Hu(t[s],e[s]))return!1}return!0}function Yb(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let n=!1,r={};for(let o in t)if(o in e){let s=Yb(t[o],e[o]);r[o]=s,s!==t[o]&&(n=!0)}else r[o]=t[o];for(let o in e)o in t||(r[o]=e[o],n=!0);return n?r:t}function Xb(t,e,n){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(n||(n=new WeakSet),n.has(e))return t;n.add(e);for(let r in e){let o=e[r];o&&typeof o=="object"&&!Array.isArray(o)&&t[r]&&typeof t[r]=="object"&&!Array.isArray(t[r])?Xb(t[r],o,n):t[r]=o}return t}function cr(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e.toString(36)}function Os(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Sc(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():cr(e)}function PC(t){return t.split(`
85
85
  `).map(cr).join(`
86
- `)}var PC={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",paddingBlock:"pbl",paddingInline:"pin",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",marginBlock:"mbl",marginInline:"min",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",scrollBehavior:"sb",inset:"ins"};function DC(t,e){let n=PC[t]||cr(t),r=Sc(e),o=`_${n}-${r}`,s=Os(t),i=uD[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${o}{${a}}`;return`${o}
87
- ${c}`}var uD={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"},dD="@media (hover: hover)",pD=/(?:^|[^\\]):hover(?![\w-])/,IC=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function LC(t){let e=t.split("\0"),n=[],r=[];for(let o=0;o+1<e.length;o+=2){let s=e[o],i=e[o+1];if(!i||IC(i))continue;let a=PC[s]||cr(s),c=Sc(i),l=`_${a}-${c}`,f=Os(s);n.push(l),r.push(`.${l}{${f}:${i}}`)}return n.join(" ")+"\0"+r.join(`
88
- `)}function $C(t,e,n){let r=t+e,o=`_c${cr(r)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(IC(u)||(i+=`${Os(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${o}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")||t.startsWith("[")&&!t.includes("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${o}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${o}`),a=`${c}{${i}}`):(c=`.${o} ${t}`,a=`${c}{${i}}`);return n!==!1&&pD.test(c)&&(a=`${dD}{${a}}`),`${o}
89
- ${a}`}var Zb=null;function qu(t){Zb=t}var Ve={structuralHash:zu,deepEqual:Hu,mergeStructural:Yb,overwriteDeep:Xb,shortHash:cr,toKebab:Os,sanitizeValue:Sc,batchShortHash:RC,atomicCssClass:DC,batchAtomicCss:LC,compoundCssClass:$C},MC=!1,Wu=null;function FC(t){return Wu||(Wu=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Ve.structuralHash=e.structuralHash),e.deepEqual&&(Ve.deepEqual=e.deepEqual),e.mergeStructural&&(Ve.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Ve.overwriteDeep=e.overwriteDeep),e.shortHash&&(Ve.shortHash=e.shortHash),e.toKebab&&(Ve.toKebab=e.toKebab),e.sanitizeValue&&(Ve.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Ve.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Ve.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Ve.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Ve.compoundCssClass=e.compoundCssClass),MC=!0,Zb&&e.batchAtomicCss&&Zb({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Wu)}function NC(){return MC}D();var kc={};$(kc,{CDN_PROVIDERS:()=>Se,DOMQL_EVENTS:()=>Gp,DOMQ_PROPERTIES:()=>Fn,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Eo,ENV:()=>dh,HTML_TAGS:()=>Oo,METHODS:()=>jn,METHODS_EXL:()=>yi,NODE_ENV:()=>Le,OPTIONS:()=>zi,PACKAGE_MANAGER_TO_CDN:()=>Hn,PARSED_DOMQ_PROPERTIES:()=>mi,PROPS_METHODS:()=>Nn,STATE_METHODS:()=>Sr,STATE_PROPERTIES:()=>qp,SVG_TAGS:()=>ew,TYPES:()=>li,UNIVERSAL_RESERVED_KEYS:()=>pf,__resetBuiltinMethodWarnings:()=>Gg,addCaching:()=>Wl,addContext:()=>Hl,addExtend:()=>$h,addExtends:()=>Ye,addItemAfterEveryElement:()=>Ip,addProtoToArray:()=>di,addRef:()=>Vl,applyCSS:()=>t_,applyDependentState:()=>tg,applyEvent:()=>Zl,applyEventUpdate:()=>Jl,applyExtends:()=>ow,applyProps:()=>Mi,arrayContainsOtherArray:()=>Ep,arraysEqual:()=>$p,arrayzeValue:()=>Mr,buildImgSrcset:()=>_a,buildSourcesAndImg:()=>xa,cache:()=>sg,call:()=>Ag,captureSnapshot:()=>Og,checkForStateTypes:()=>Xh,checkIfInherits:()=>Xl,checkIfStringIsInArray:()=>Np,clone:()=>Zp,cloneAndMergeArrayExtend:()=>Ti,cloneFunction:()=>_h,collectExtendsList:()=>Ro,concatAddExtends:()=>Dh,copyJavaScriptToClipboard:()=>Zg,copyStringToClipboard:()=>Xg,createBasedOnType:()=>Bl,createElement:()=>Yh,createElementExtends:()=>Tl,createExtends:()=>Ri,createExtendsFromKeys:()=>Po,createExtendsStack:()=>Dl,createIfConditionFlag:()=>xh,createInheritedState:()=>Zh,createKey:()=>Ci,createNestedObject:()=>sh,createNestedObjectByKeyPath:()=>Qh,createObjectWithoutPrototype:()=>xl,createParent:()=>Ul,createPath:()=>zl,createProps:()=>Fi,createPropsStack:()=>Nl,createRoot:()=>Gh,createScope:()=>ng,createSnapshotId:()=>vi,customDecodeURIComponent:()=>Wp,customEncodeURIComponent:()=>Hp,cutArrayAfterValue:()=>Pp,cutArrayBeforeValue:()=>Rp,debounce:()=>Ei,debounceOnContext:()=>yh,decodeNewlines:()=>zp,deepClone:()=>it,deepContains:()=>rh,deepDefaults:()=>ga,deepDestringifyFunctions:()=>_e,deepExtend:()=>Al,deepMerge:()=>ot,deepMergeExtends:()=>Xe,deepStringifyFunctions:()=>_i,defineSetter:()=>Cg,destringifyGlobalScope:()=>wi,detectHeightOnInit:()=>Lg,detectInfiniteLoop:()=>lh,document:()=>nt,encodeNewlines:()=>Up,error:()=>Ir,excludeKeysFromObject:()=>uh,exec:()=>ut,extendCachedRegistry:()=>Ih,extendStackRegistry:()=>Pi,extractArrayExtend:()=>Ii,fetchLibraryData:()=>bf,fibonacciNumberByIndex:()=>$g,filterArrays:()=>Mp,filterArraysFast:()=>Fp,finalizeExtends:()=>Il,findClosestNumber:()=>yf,findClosestNumberInFactory:()=>Wg,findInheritedState:()=>Yl,findKeyPosition:()=>Bp,flattenExtend:()=>Do,formatDate:()=>Ig,generateHash:()=>vl,generateHeadArrayTags:()=>mf,generateKey:()=>ki,generateMetaTags:()=>zg,get:()=>wg,getActiveRoute:()=>Fb,getCDNDirUrl:()=>hf,getCDNUrl:()=>Me,getCapitalCaseKeys:()=>Nh,getCdnProviderFromConfig:()=>Bo,getChildStateInKey:()=>Gl,getChildren:()=>vg,getContext:()=>ia,getCookie:()=>Ch,getDB:()=>ua,getEmotionStylesheet:()=>em,getExtendsInElement:()=>Mh,getExtendsStack:()=>Oi,getExtendsStackRegistry:()=>El,getFrequencyInArray:()=>Ap,getFunctionSource:()=>Ie,getHashedExtend:()=>Di,getImportMapScript:()=>Dg,getInObjectByPath:()=>ch,getLocalStorage:()=>Ah,getNev:()=>mh,getPageMetadata:()=>Hg,getParentStateInKey:()=>Kl,getPath:()=>ta,getQuery:()=>da,getRef:()=>kg,getRoot:()=>ra,getRootContext:()=>sa,getRootData:()=>oa,getRootState:()=>na,getRootStateInKey:()=>ql,getSpreadChildren:()=>jh,global:()=>kp,hasFunction:()=>Ge,hasHandlerPlugin:()=>Ao,hasOwnProperty:()=>th,hashContent:()=>Uo,inheritChildExtends:()=>Rl,inheritChildPropsExtends:()=>Ol,inheritParentProps:()=>Ni,inheritRecursiveChildExtends:()=>Pl,init:()=>An,initProps:()=>Wh,is:()=>Jt,isArray:()=>R,isBoolean:()=>pl,isBuiltinElementMethod:()=>Kp,isContextComponent:()=>Bh,isCyclic:()=>fh,isDOMNode:()=>Zt,isDate:()=>gl,isDefined:()=>Rt,isDevelopment:()=>Vn,isEmpty:()=>bl,isEmptyObject:()=>eh,isEqualDeep:()=>_l,isFailedRevival:()=>Ar,isFunction:()=>O,isHtmlElement:()=>ai,isLazyFunction:()=>Jp,isLocal:()=>gh,isLoudDevRuntime:()=>ht,isMalformedDependency:()=>Lr,isMethod:()=>Tg,isMobile:()=>kh,isNode:()=>pn,isNot:()=>Cp,isNotProduction:()=>Or,isNull:()=>hl,isNumber:()=>Ke,isObject:()=>v,isObjectLike:()=>j,isPhoto:()=>Mg,isPolyglotRetranslatableKey:()=>Ui,isPolyglotWritableKey:()=>Pr,isProduction:()=>Bn,isProtectedElementMethod:()=>kr,isStaging:()=>hh,isState:()=>Jh,isString:()=>S,isStringFunction:()=>Ai,isTest:()=>Sl,isTesting:()=>ph,isUndefined:()=>Dt,isUniversallyReservedKey:()=>Rg,isUnresolvableDependency:()=>Wn,isValidDependencyMap:()=>$r,isValidHtmlTag:()=>Oh,isWrappedLibrary:()=>tn,joinArrays:()=>ko,jointStacks:()=>Lh,keys:()=>uf,lastLevel:()=>Uu,lastPathname:()=>Vu,loadCssFile:()=>Bg,loadJavascript:()=>Vg,loadJavascriptFile:()=>Fg,loadJavascriptFileEmbedSync:()=>jg,loadJavascriptFileSync:()=>Ng,loadRemoteCSS:()=>Ug,loadRemoteScript:()=>Vo,log:()=>Eg,logGroupIf:()=>Sh,logIf:()=>wh,lookdown:()=>_g,lookdownAll:()=>xg,lookup:()=>bg,lowercaseFirstLetter:()=>wr,makeObjectWithoutPrototype:()=>nh,map:()=>Xp,mapStringsWithContextComponents:()=>Li,markPolyglotSeeded:()=>Je,matchRoute:()=>Lb,matchesComponentNaming:()=>Ze,memoize:()=>bh,merge:()=>bt,mergeSharedLibraries:()=>ma,nextElement:()=>ca,normalizeIgnoreList:()=>qn,normalizeLibraryKey:()=>zo,objectToString:()=>xi,objectizeStringProperty:()=>$i,overwrite:()=>Si,overwriteDeep:()=>Wt,overwriteShallow:()=>Tr,overwriteState:()=>eg,parse:()=>df,parseDeep:()=>Ji,parseQuery:()=>$b,parseRoutePattern:()=>Ib,pickupElementFromProps:()=>Ml,pickupPropsFromElement:()=>$l,polyglotSeededKeys:()=>Io,previousElement:()=>la,promoteActiveRootState:()=>Mo,propExists:()=>zh,propertizeElement:()=>Fl,propertizeUpdate:()=>Uh,reinit:()=>Qb,remove:()=>Mw,removeChars:()=>Jg,removeCookie:()=>Eh,removeDuplicateProps:()=>Bi,removeDuplicatesInArray:()=>vo,removeFromArray:()=>Tp,removeFromObject:()=>oh,removeNestedKeyByPath:()=>ih,removeValueFromArray:()=>ui,removeValueFromArrayAll:()=>Dp,reorderArrayByValues:()=>Lp,replaceLiteralsWithObjectFields:()=>Mt,replaceOctalEscapeSequences:()=>Vp,resolveAsset:()=>Qt,resolveHandler:()=>To,resolveSharedLibraries:()=>Yg,returnValueAsText:()=>jl,router:()=>ln,runGuards:()=>Mb,runPluginHook:()=>Pt,scratchSystem:()=>ss,scratchUtils:()=>Yn,self:()=>vp,set:()=>Xr,setActiveRootState:()=>ea,setCookie:()=>vh,setHashedExtend:()=>Cl,setInObjectByPath:()=>ah,setLocalStorage:()=>Th,setNodeStyles:()=>ff,setProps:()=>Sg,setPropsPrototype:()=>ji,sharedLibrary:()=>Kg,splitPackageSpecifier:()=>pa,spotByPath:()=>Qi,srcsetFor:()=>Ho,stringIncludesAny:()=>hi,stringToObject:()=>Qp,stripVersionRangePrefix:()=>ha,swapItemsInArray:()=>Op,syncProps:()=>Vi,toCamelCase:()=>ya,toDashCase:()=>ba,toDescriptionCase:()=>tm,toPriorityOrder:()=>xe,toTitleCase:()=>Qg,toggleFullscreen:()=>Pg,triggerEventOn:()=>gn,triggerEventOnUpdate:()=>rg,trimStringFromSymbols:()=>jp,unstackArrayOfObjects:()=>fi,update:()=>Hh,updateProps:()=>qh,variables:()=>fa,verbose:()=>Fo,warn:()=>aa,window:()=>C});D();D();var gD=T(),jC=(t=gD,e)=>{let n=v(e.localFile)?e.localFile:{},r=it(n.designSystem||{});return ot(t,r,de)},mD={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Ku=(t,e)=>{let n=!e||e===":root",r={};for(let o in t)if(o.startsWith("@media")){let s=n?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;r[o]={[s]:t[o]}}else n?r[o]=t[o]:r[`${e}${o}, ${o} ${e}`]=t[o];return r},Jb=(t,e)=>{t.CSS_MEDIA_VARS&&xt(Ku(t.CSS_MEDIA_VARS,e));let n=Yr(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(n).length&&xt(n)},An=(t,e=mD)=>{let n=jC(t||{},e),r=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let g=new URLSearchParams(window.location.search).get("globalTheme");g&&(o=g)}let s=Xr({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...n},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=r);let i=Ca(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&xt(i),c&&(xt({[r]:s.CSS_VARS}),Jb(s,r)),a&&xt(s.reset);let p=s.animation;if(p){let g={};for(let m in p)g[`@keyframes ${m}`]=p[m];xt(g)}return(u||f)&&Ja(s.svg,{document:e.document}),(h||d)&&Gr(s.icons,{document:e.document}),s},Gu={},Qb=(t,e=Gu)=>{let n=jC(t||{},e),r=e.scopeSelector||":root",o=Xr({verbose:!1,...n});return e.preventInject||(xt({[r]:o.CSS_VARS}),Jb(o,r),xt(o.reset)),o},t_=(t,e=Gu)=>{xt(t)},yD=(t,e=Gu)=>{let n=e.scopeSelector||":root";xt({[n]:t.CSS_VARS}),Jb(t,n)};var bD=(t,e=Gu)=>{};D();var VC=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,_D=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},n_={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},vc=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},xD=["manual","auto"],e_=new WeakMap,BC=(t,e)=>{let n=e.claims[e.claims.length-1],r=n?n.value:e.found;t.scrollRestoration!==r&&(t.scrollRestoration=r)},wD=(t,e)=>{let n=e&&e.scrollRestoration;if(n!=null){if(!xD.includes(n)){if(t.verbose!==!1){let r=typeof n=="string"?JSON.stringify(n):`a ${typeof n}`;console.warn(`[smbls/router] router.scrollRestoration must be 'manual' or 'auto', got ${r} \u2014 the browser default stays`)}return}try{let r=t.window||C,o=r&&r.history;if(!o||!("scrollRestoration"in o))return;let s=e_.get(o);s||(s={found:o.scrollRestoration,claims:[]},e_.set(o,s));let i={value:n};s.claims.push(i),BC(o,s),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{let a=s.claims.indexOf(i);if(a!==-1){s.claims.splice(a,1),s.claims.length||e_.delete(o);try{BC(o,s)}catch{}}})}catch{}}},UC=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=n_:e.router=bt(e.router||{},n_);let n=e.router;wD(e,n);let r=async(s,i)=>{let a=s.context?.window||C,c=_D(n);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=VC(f),c=f+u+d}let l=s;if(n.customRouterElement){let f=vc(s,n.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await ln(c,l,{},{initialRender:!0,pushState:!1})},o=!Dt(t.onRenderRouter);return n&&n.initRouter&&!o&&(t.onRenderRouter=r),SD(e,n),n},r_=(t,e)=>{if(e.router===!1)return;let n=e.router||n_;if(!n.popState)return;let r=e.utils&&e.utils.router?e.utils.router:ln,o=e.window||C,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=VC(a);let f=a+c+l,u=t;if(n.customRouterElement){let d=vc(t,n.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},SD=(t,e)=>{let{components:n}=t;if(e&&e.injectRouterInLinkComponent)return ot(n.Link||n["smbls.Link"],n.RouterLink||n["smbls.RouterLink"])};D();var o_=C&&C.location?C.location.host.includes("dev."):Vn(),zC=o_?"http://localhost:8080/get":"https://api.symbols.app/get",kD={endpoint:zC},HC=async(t,e=kD)=>{let n=e.endpoint||zC,r=e.serviceRoute?R(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(n+"/?"+r,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(O(e.onError))return e.onError(s);console.error(s)}},vD=async(t,e)=>{let{editor:n}=e;if(n&&n.remote){let r=await HC(t,n),o=o_||e.isDevelopment?_e(r):_e(r.releases[0]);n.serviceRoute?R(n.serviceRoute)?n.serviceRoute.forEach(s=>{Wt(e[s],o[s.toLowerCase()])}):Wt(e[n.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Wt(e[s],o[s.toLowerCase()])})}return e},CD=async(t,e,n)=>{let{editor:r}=e;if(r&&r.remote){let o=await HC(t,r),s=o_||e.isDevelopment?_e(o):_e(o.releases[0]);n(s)}},WC=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await vD(t,e)}catch(n){console.error(n)}},qC=(t,e,n,r)=>{if(e&&n.editor)try{n.editor.async&&CD(e,n,r||(o=>{let s=o.designSystem;v(s)&&n.utils.init(s),v(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var Cc=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let n of e.__teardowns)try{n()}catch(r){console.error("[smbls] destroy teardown error:",r)}e.__teardowns.length=0}try{vn(t)}catch(n){console.error("[smbls] dispose error:",n)}if(e.fetch&&e.fetch.__resolved&&delete e.fetch.__resolved,e.fetch&&e.fetch.__resolving&&delete e.fetch.__resolving,e.db&&e.db.__resolved&&delete e.db.__resolved,e.db&&e.db.__resolving&&delete e.db.__resolving,e.analyze?.destroy)try{e.analyze.destroy()}catch(n){console.error("[analyze] destroy error:",n)}return t.__destroyed=!0,!0};var i_={};$(i_,{Helmet:()=>YC,applyMetadata:()=>Ds,default:()=>ID,extractMetadata:()=>RD,generateHeadHtml:()=>DD,helmetPlugin:()=>s_,resolveMetadata:()=>lr});D();var ED={title:{tag:"title"},description:{tag:"meta",attr:"name",key:"description"},keywords:{tag:"meta",attr:"name",key:"keywords"},robots:{tag:"meta",attr:"name",key:"robots"},author:{tag:"meta",attr:"name",key:"author"},canonical:{tag:"link",attr:"rel",key:"canonical",valueAttr:"href"},image:{tag:"meta",attr:"property",key:"og:image"},url:{tag:"meta",attr:"property",key:"og:url"},siteName:{tag:"meta",attr:"property",key:"og:site_name"},type:{tag:"meta",attr:"property",key:"og:type"},locale:{tag:"meta",attr:"property",key:"og:locale"},"og:title":{tag:"meta",attr:"property",key:"og:title"},"og:description":{tag:"meta",attr:"property",key:"og:description"},"og:image":{tag:"meta",attr:"property",key:"og:image"},"og:url":{tag:"meta",attr:"property",key:"og:url"},"og:type":{tag:"meta",attr:"property",key:"og:type"},"og:site_name":{tag:"meta",attr:"property",key:"og:site_name"},"og:locale":{tag:"meta",attr:"property",key:"og:locale"},"twitter:card":{tag:"meta",attr:"name",key:"twitter:card"},"twitter:title":{tag:"meta",attr:"name",key:"twitter:title"},"twitter:description":{tag:"meta",attr:"name",key:"twitter:description"},"twitter:image":{tag:"meta",attr:"name",key:"twitter:image"},"twitter:site":{tag:"meta",attr:"name",key:"twitter:site"},"theme-color":{tag:"meta",attr:"name",key:"theme-color"}},AD=t=>{if(t.tag==="link")return`link[${t.attr}="${t.key}"]`;if(t.tag&&!t.attr&&!t.key)return t.tag;if(t.tag&&t.attr&&t.key)return`${t.tag}[${t.attr}="${t.key}"]`},KC=t=>_e({v:t}).v,GC=(t,e,n,r)=>{try{return ut(t,e,n)}catch(o){console.warn(`[helmet] metadata factory for "${r}" threw; treating as unset:`,o&&o.message||o);return}},lr=(t,e,n)=>{if(!t)return{};let r=t;S(r)&&Ge(r)&&(r=KC(r));let o=O(r)?GC(r,e,n,"metadata"):v(r)?{...r}:{};if(!v(o))return{};for(let s in o){let i=o[s];S(i)&&Ge(i)&&(i=KC(i)),O(i)?i=GC(i,e,n,s):S(i)&&Ge(i)&&(i=void 0),S(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,n)),o[s]=i}return o},TD=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),OD=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let n in t)if(TD(t[n]))return t[n]},RD=(t,e="/",n,r)=>{let o=t.pages||{},s=OD(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=lr(t.app.metadata,n,r);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=lr(c,n,r);for(let f in l)a.add(f);i={...i,...l},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}if(i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},PD=(t,e)=>{let n=e.createElement(t.tag);return t.attr&&n.setAttribute(t.attr,t.key),(e.head||e.querySelector("head")).appendChild(n),n},Ps=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},Rs=(t,e,n,r)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of n)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of n){if(s.has(a))continue;let c=r(a);c&&(c.setAttribute(e,a),o.appendChild(c))}},Ds=(t,e)=>{if(!(!v(t)||!e)){for(let n in t){let r=t[n];if(r==null||n==="jsonLd"||n==="styles"||n==="scripts"||n==="alternate"||n==="favicons"||n==="icon"||n==="favicon")continue;let o=ED[n];if(!o)continue;let s=AD(o),i=e.querySelector(s)||PD(o,e);i&&(n==="title"?i.textContent=r:o.valueAttr?i.setAttribute(o.valueAttr,r):i.setAttribute("content",r))}if(Array.isArray(t.jsonLd)){let r=t.jsonLd.filter(s=>s!=null).map(s=>S(s)?s:JSON.stringify(s)),o=r.map(Ps);Rs(e,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=r[i],a})}if(Array.isArray(t.styles)){let n=t.styles.filter(o=>o!=null&&String(o).trim()),r=n.map(Ps);Rs(e,"data-smbls-style",r,o=>{let s=r.indexOf(o),i=e.createElement("style");return i.textContent=String(n[s]),i})}if(Array.isArray(t.scripts)){let n=t.scripts.filter(o=>o&&(S(o)?o.trim():o.src)),r=n.map(o=>S(o)?o:String(o.src));Rs(e,"data-smbls-script",r,o=>{let s=r.indexOf(o),i=n[s],a=e.createElement("script");return S(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}if(Array.isArray(t.alternate)){let n=t.alternate.filter(o=>v(o)),r=n.map(o=>`${o.hreflang||""}|${o.href||""}`);Rs(e,"data-smbls-alternate",r,o=>{let s=r.indexOf(o),i=e.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(n[s]))i.setAttribute(a,c);return i})}if(Array.isArray(t.favicons)){let n=t.favicons.filter(o=>o!=null),r=n.map(o=>v(o)?Ps(JSON.stringify(o)):String(o));Rs(e,"data-smbls-favicon",r,o=>{let s=r.indexOf(o),i=n[s],a=e.createElement("link");if(a.setAttribute("rel","icon"),v(i))for(let[c,l]of Object.entries(i))a.setAttribute(c,l);else a.setAttribute("href",String(i));return a})}if(t.icon||t.favicon){let n=String(t.icon||t.favicon),r=n.endsWith(".svg")?"image/svg+xml":n.endsWith(".png")?"image/png":"";Rs(e,"data-smbls-single-icon",[n],o=>{let s=e.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),r&&s.setAttribute("type",r),s})}}},lt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,n=>e[n])},DD=t=>{let e=['<meta charset="UTF-8">'],n=new Set(["charset","jsonLd","styles","scripts"]),r=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||n.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${lt(s)}</title>`);continue}if(o==="viewport"){r||(e.push(`<meta name="viewport" content="${lt(s)}">`),r=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${lt(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=lt(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${lt(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${lt(f)}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${lt(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${lt(f)}" content="${lt(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${lt(f)}" content="${lt(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${lt(o)}" content="${lt(f)}">`)):e.push(`<meta property="${lt(o)}" content="${lt(s)}">`):l?e.push(`<meta name="${lt(o)}" content="${lt(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${lt(o)}" content="${lt(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${lt(o)}" content="${lt(s)}">`)}if(r||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let o of t.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Ps(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let o of t.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Ps(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let o of t.scripts){if(!o)continue;let s=typeof o=="string",i=s?o:o.src;if(!i&&!(o&&o.body))continue;let a=[];i&&a.push(`src="${lt(i)}"`),s||(o.type&&a.push(`type="${lt(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${lt(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${lt(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${lt(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${lt(i||Ps(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
90
- `)},YC={define:{metadata:(t,e,n)=>{let r=e.context?.document||typeof document<"u"&&document;if(!r)return;let o=G(()=>{let s=lr(t,e,e.state);Ds(s,r);let i=e.state?.root;v(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(o)}}},s_={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let n=G(()=>{let r=t.metadata;if(!r)return;let o=lr(r,t,t.state);Ds(o,e)});t.__ref?.__effects&&t.__ref.__effects.push(n)},update(t){let e=t.metadata;if(!e)return;let n=t.context?.document||typeof document<"u"&&document;if(!n)return;let r=lr(e,t,t.state);Ds(r,n)}},ID=YC;Zi();var XC=(t,e,n,r)=>{t&&Xi(t,e,n,r)},ZC=(t,e,n)=>{if(!t)return;let r=e.context?.document||typeof document<"u"&&document;if(!r)return;let o=lr(t,e,n);Ds(o,r)},JC=async(t,e)=>{if(!t)return;let n={tag:"fragment",...t},r=async()=>{await e.set(n,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(r):await r(),n},Is={routes:t=>t,metadata:ZC,fetch:XC,$router:JC},QC=(t={})=>{let e={routes:n=>n};return t.metadata!==!1&&(e.metadata=ZC),t.fetch!==!1&&(e.fetch=XC),t.router!==!1&&(e.$router=JC),e};var a_={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Yu={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},Xu={...a_,router:Yu},LD={state:{},pages:{},components:{},router:Yu,define:Is},fr=LD;D();D();var t1=(t,e)=>j(t.extends)?t.extends:[];D();var c_={};$(c_,{default:()=>ND,getActiveLang:()=>ur,getLanguages:()=>Ac,getLocalStateLang:()=>Dc,initPolyglot:()=>Ju,loadTranslations:()=>Oc,polyglotPlugin:()=>$s,setLang:()=>Rc,translate:()=>Tc,upsertTranslation:()=>Pc});D();var n1="smbls_lang",$D="smbls_t_",MD="smbls_tv_",Ls={get(t){try{return window?.localStorage.getItem(t)}catch{return null}},set(t,e){try{window?.localStorage.setItem(t,e)}catch(n){console.warn("[polyglot] localStorage unavailable:",n.message)}},remove(t){try{window?.localStorage.removeItem(t)}catch(e){console.warn("[polyglot] localStorage unavailable:",e.message)}}},Ec={};function ur(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function Ac(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Zu=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let n=e.split("."),r=t;for(let o=0;o<n.length;o++){if(r==null)return;r=r[n[o]]}return r},e1=(t,e,n)=>{let r=e.lastIndexOf(".");if(r===-1)return t[e+"_"+n];let o=Zu(t,e.substring(0,r));if(o!=null)return o[e.substring(r+1)+"_"+n]};function Tc(t,e){if(!t)return"";let n=this?.context,r=n?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=e1(s,t,o);if(l!==void 0)return l}if(r?.translations){let l=r.translations[o];if(l){let f=Zu(l,t);if(f!==void 0)return f}}let a=(s?.root||n?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=Zu(l,t);if(f!==void 0)return f}}let c=r?.defaultLang||"en";if(s){let l=e1(s,t,c);if(l!==void 0)return l}if(r?.translations){let l=r.translations[c];if(l){let f=Zu(l,t);if(f!==void 0)return f}}return t}async function Oc(t){let e=this?.context,n=e?.polyglot,r=this?.state?.root||e?.state?.root;if(!n||!r)return;let o=n.storagePrefix||$D,s=n.storageVersionPrefix||(n.storagePrefix?n.storagePrefix.replace(/_$/,"v_"):MD);if(n.translations&&n.translations[t]&&!n.fetch||!n.fetch||n._fetchFailed?.[t])return;if(!r.translations?.[t]){let c=Ls.get(o+t);if(c)try{let l=JSON.parse(c),f={translations:{...r.translations||{}}};f.translations[t]=l,r.update&&r.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(n.storagePrefix||"smbls")+":"+t;if(Ec[i])return Ec[i];let a=this;return Ec[i]=(async()=>{try{let c=n.fetch,l=parseInt(Ls.get(s+t),10)||0,f,u,d;if(O(c)){let p=await c(t,l,a);if(!p||p.changed===!1)return;f=p.translations||p.data||p,u=p.version||0,d=!0}else if(v(c)){let p=a.getDB||(()=>e.fetch),g=O(p)?await p.call(a):e.fetch;if(!g)return;let m=c.rpc||c.from||"get_translations_if_changed",y={p_lang:t,p_cached_version:l,...c.params||{}},x=await g.rpc({from:m,params:y});if(x.error)throw n._fetchFailed||(n._fetchFailed={}),n._fetchFailed[t]=!0,x.error;let b=x.data;if(!b||!b.changed)return;f=b.translations||{},u=b.version||0,d=!0}else return;if(!d||!f)return;Ls.set(o+t,JSON.stringify(f)),u&&Ls.set(s+t,String(u));let h={translations:{...r.translations||{}}};h.translations[t]=f,r.update&&r.update(h)}catch(c){if(n.verbose!==!1){let l=c?.message||c?.details||(typeof c=="object"?JSON.stringify(c):String(c));console.warn("[polyglot] Failed to load translations for",t,"-",l)}}finally{delete Ec[i]}})(),Ec[i]}var FD=(t,e,n)=>{let r=t.__ref;if(!r||r.contentManaged||n==null||typeof n=="object")return;let o=r.__textNode;if(!o||o.parentNode!==e)return;let s=String(n);o.nodeValue!==s&&(o.nodeValue=s)};async function Rc(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root,s=n?.document||globalThis.document;if(!o)return;if(e?.persist!==!1){let l=r?.storageLangKey||n1;Ls.set(l,t)}if(s?.documentElement&&(s.documentElement.lang=t),this.call("getActiveLang")===t)return;r?.fetch&&await this.call("loadTranslations",t),n?.state&&(n.state.lang=t);let i=r?.translations?.[t],a={lang:t},c=l=>Ui(n,l,o);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(a[l]=f)}o.update&&o.update(a);for(let l in a)l!=="lang"&&Je(n,l,a[l]);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&o[l]&&typeof o[l]=="object"&&!Array.isArray(o[l])){for(let u in f)o[l][u]=f[u];Je(n,l,o[l])}}if(s&&i){let l=s.querySelectorAll("[data-key]");for(let f of l){let u=f.ref;if(!u)continue;let d=u.__ref?.__exec?.text;if(typeof d=="string"&&d.includes("{{"))try{FD(u,f,u.call("replaceLiteralsWithObjectFields",d,u.state))}catch{}}}}async function Pc(t,e,n){let r=this?.context,o=r?.polyglot,s=this?.state?.root||r?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=n),o?.translations?.[e]&&(o.translations[e][t]=n),o?.fetch&&v(o.fetch)){let i=this.getDB||(()=>r.fetch),a=O(i)?await i.call(this):r.fetch;if(!a)return;let c=o.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:n}});if(l?.error)throw l.error;return l.data}}async function Ju(){let t=this?.context,e=t?.polyglot;if(!e)return;let n=this?.state?.root||t?.state?.root;if(!n)return;let r=e.storageLangKey||n1,s=Ls.get(r)||ur.call(this),i=t?.document||globalThis.document;i?.documentElement&&(i.documentElement.lang=s),n.update&&n.lang!==s&&n.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function Dc(t){try{let e=ur.call(this),n=this?.state;if(!n)return"";let r=t.lastIndexOf(".");if(r===-1)return n[t+e]??"";let o=t.substring(0,r).split("."),s=n;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(r+1)+e]??""}catch{return""}}var $s={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Ju.call(t))}},ND=$s;Zi();var f_={};$(f_,{SYSTEM_METRICS:()=>Ic,capsizeHandler:()=>l_,capsizePlugin:()=>td,computeCapsize:()=>r1,default:()=>jD,resolveFontSizePx:()=>o1,resolveMetrics:()=>s1});var Ic={arial:{capHeight:716,ascent:1854,descent:-434,lineGap:67,unitsPerEm:2048},helvetica:{capHeight:714,ascent:770,descent:-230,lineGap:0,unitsPerEm:1e3},"helvetica neue":{capHeight:714,ascent:952,descent:-213,lineGap:28,unitsPerEm:1e3},georgia:{capHeight:1419,ascent:1878,descent:-449,lineGap:0,unitsPerEm:2048},"times new roman":{capHeight:1356,ascent:1825,descent:-443,lineGap:87,unitsPerEm:2048},"courier new":{capHeight:1170,ascent:1705,descent:-615,lineGap:0,unitsPerEm:2048},verdana:{capHeight:1489,ascent:2059,descent:-430,lineGap:0,unitsPerEm:2048},roboto:{capHeight:1456,ascent:1900,descent:-500,lineGap:0,unitsPerEm:2048},"open sans":{capHeight:1462,ascent:2189,descent:-600,lineGap:0,unitsPerEm:2048},inter:{capHeight:1490,ascent:2048,descent:-512,lineGap:0,unitsPerEm:2048},lato:{capHeight:1434,ascent:1974,descent:-426,lineGap:0,unitsPerEm:2e3},"source sans":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans pro":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans 3":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},montserrat:{capHeight:700,ascent:968,descent:-251,lineGap:0,unitsPerEm:1e3},poppins:{capHeight:700,ascent:1050,descent:-350,lineGap:100,unitsPerEm:1e3},raleway:{capHeight:710,ascent:1e3,descent:-250,lineGap:0,unitsPerEm:1e3},"dm sans":{capHeight:700,ascent:992,descent:-312,lineGap:0,unitsPerEm:1e3},nunito:{capHeight:705,ascent:1011,descent:-353,lineGap:0,unitsPerEm:1e3},"work sans":{capHeight:684,ascent:930,descent:-243,lineGap:0,unitsPerEm:1e3},manrope:{capHeight:708,ascent:980,descent:-300,lineGap:0,unitsPerEm:1e3},"ibm plex sans":{capHeight:698,ascent:1025,descent:-275,lineGap:0,unitsPerEm:1e3},"plus jakarta sans":{capHeight:720,ascent:1060,descent:-300,lineGap:0,unitsPerEm:1e3}},Qu=t=>parseFloat(t.toFixed(4)),r1=(t,e,n)=>{let{ascent:r,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=r+c+s,f=n!==void 0?n:l/i*t,u=f/t,d=l/i,h=(r-a+s/2)/i-(u-d)/2,p=(c+s/2)/i-(u-d)/2;return{fontSize:`${Qu(t/16)}rem`,lineHeight:`${Qu(f)}px`,capHeightTrim:`${Qu(-h)}em`,baselineTrim:`${Qu(-p)}em`}},o1=(t,e)=>{if(typeof t=="number")return t;let n=e?.designSystem;if(!n)return null;let{typography:r}=n;if(r?.sequence){let s=String(t).toUpperCase(),i=r.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(n.typography?.browserDefault||16):o},s1=(t,e)=>{let r=e?.designSystem?.font_family||{};if(t){let s=r[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(Ic[i])return Ic[i]}let o=r.default||Object.keys(r)[0];if(o){let s=r[o];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(Ic[a])return Ic[a]}}return null},l_=(t,e,n,r)=>{if(!t)return;let o=o1(e.fontSize,r);if(!o)return;let s=s1(e.fontFamily,r);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=r1(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},td={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},jD=td;var y_={};$(y_,{PRESERVE_VALUE_KEYS:()=>jt,SKIP_INLINE_KEYS:()=>dr,abbrToProp:()=>Nt,decode:()=>f1,encode:()=>a1,expand:()=>so,isComponentKey:()=>Ue,isSelectorKey:()=>ze,parse:()=>io,parseFurther:()=>co,propToAbbr:()=>Pe,shorten:()=>Lc,shorthandPlugin:()=>$c,stringify:()=>oo,stringifyFurther:()=>ao});var Pe={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Nt=Object.create(null);for(let t in Pe)Nt[Pe[t]]=t;var u_=Object.create(null);for(let t in Pe){let e=Pe[t];if(u_[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${u_[e]}"`);u_[e]=t}var jt=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),dr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Ue(t){return/^[A-Z]/.test(t)}function ze(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function a1(t){if(!t||typeof t!="object")return"";let e=[];for(let n in t){let r=t[n];if(typeof r=="function"||r!==null&&typeof r=="object"&&!Array.isArray(r)||r===void 0)continue;let o=Pe[n]||n;if(r===!0)e.push(o);else if(r===!1)e.push("!"+o);else if(Array.isArray(r)){let s=r.map(i=>ed(i));e.push(o+":"+s.join(","))}else e.push(o+":"+ed(r))}return e.join(" ")}function ed(t){return String(t).replace(/ /g,"_")}function Lc(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Lc(n):n});let e={};for(let n in t){let r=t[n];if(Ue(n)){e[n]=d_(r);continue}if(ze(n)){e[n]=d_(r);continue}let o=Pe[n]||n;if(jt.has(n)||jt.has(o)){e[o]=r;continue}e[o]=d_(r)}return e}function d_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Lc(e):e}):typeof t=="object"?Lc(t):t}function oo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?oo(r):r});let e={},n=[];for(let r in t){let o=t[r];if(Ue(r)){e[r]=i1(o);continue}if(ze(r)){e[r]=i1(o);continue}let s=Pe[r]||r;if(jt.has(r)||jt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(dr.has(r)||dr.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?oo(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(ed).join(","));continue}if(typeof o=="object"){e[s]=oo(o);continue}o===!0?n.push(s):o===!1?n.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:n.push(s+":"+ed(o))}return n.length&&(e.in=n.join(" ")),e}function i1(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?oo(e):e}):typeof t=="object"?oo(t):t}function f1(t){if(!t||typeof t!="string")return{};let e={},n=u1(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=Nt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=Nt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Nt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(c1);continue}e[a]=c1(i)}return e}function u1(t){return t.trim().split(/\s+/).filter(Boolean)}function c1(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function l1(t){return t.replace(/_/g," ")}function BD(t){if(!t||typeof t!="string")return{};let e={},n=u1(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=Nt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=Nt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Nt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(l1);continue}e[a]=l1(i)}return e}function so(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?so(n):n});let e={};for(let n in t){let r=t[n];if(Ue(n)){e[n]=p_(r);continue}let o=Nt[n]||n;if(ze(n)&&o===n){e[n]=p_(r);continue}if(jt.has(o)||jt.has(n)){e[o]=r;continue}e[o]=p_(r)}return e}function p_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?so(e):e}):typeof t=="object"?so(t):t}function io(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?io(n):n});let e={};if(typeof t.in=="string"){let n=BD(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(Ue(n)){e[n]=h_(r);continue}let o=Nt[n]||n;if(ze(n)&&o===n){e[n]=h_(r);continue}if(jt.has(o)||jt.has(n)){e[o]=r;continue}e[o]=h_(r)}return e}function h_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?io(e):e}):typeof t=="object"?io(t):t}function d1(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function VD(t){let e="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){let r=t[n+1];if(r===","||r==="_"||r==="\\"){e+=r,n+=2;continue}}t[n]==="_"?e+=" ":e+=t[n],n++}return e}function UD(t){let e=[],n="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){n+=t[r]+t[r+1],r+=2;continue}if(t[r]===","){e.push(n),n="",r++;continue}n+=t[r],r++}return e.push(n),e}function p1(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);return e.length===1&&e[0]==="in"&&typeof t.in=="string"}function ao(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?ao(r):r});let e={},n=[];for(let r in t){let o=t[r];if(Ue(r)){let i=h1(o);e[r]=p1(i)?i.in:i;continue}if(ze(r)){let i=h1(o);e[r]=p1(i)?i.in:i;continue}let s=Pe[r]||r;if(jt.has(r)||jt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(dr.has(r)||dr.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?ao(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(d1).join(","));continue}if(typeof o=="object"){e[s]=ao(o);continue}if(o===!0){n.push(s);continue}if(o===!1){n.push("!"+s);continue}if(typeof o=="number"){n.push(s+":#"+o);continue}n.push(s+":"+d1(o))}return n.length&&(e.in=n.join(" ")),e}function h1(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?ao(e):e}):typeof t=="object"?ao(t):t}function g1(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):VD(t)}function g_(t){if(!t||typeof t!="string")return{};let e={},n=t.trim().split(/\s+/).filter(Boolean);for(let r of n){if(r.startsWith("!")){let l=r.slice(1),f=Nt[l]||l;e[f]=!1;continue}let o=r.indexOf(":");if(o===-1){let l=Nt[r]||r;e[l]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Nt[s]||s,c=UD(i);if(c.length>1){e[a]=c.map(g1);continue}e[a]=g1(i)}return e}function co(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?co(n):n});let e={};if(typeof t.in=="string"){let n=g_(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(Ue(n)){typeof r=="string"?e[n]=g_(r):e[n]=m_(r);continue}let o=Nt[n]||n;if(ze(n)&&o===n){typeof r=="string"?e[n]=g_(r):e[n]=m_(r);continue}if(jt.has(o)||jt.has(n)){e[o]=r;continue}e[o]=m_(r)}return e}function m_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?co(e):e}):typeof t=="object"?co(t):t}var zD={shorten:so,stringify:io,stringifyFurther:co};function HD(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>e(r));let n={};for(let r in t){let o=t[r];n[r]=o&&typeof o=="object"?e(o):o}return n}var WD=["components","pages","snippets"],$c={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let r=zD[e===!0?"shorten":e];if(r){for(let o of WD)t[o]&&(t[o]=HD(t[o],r));t.app&&typeof t.app=="object"&&(t.app=r(t.app))}}};var O_={};$(O_,{LEVELS:()=>Mc,analyzePlugin:()=>Fs,attachBrowserListeners:()=>fd,attachNetworkListeners:()=>Nc,classifyEvent:()=>v_,createAnalyzeState:()=>ud,createBeaconSink:()=>A_,createConsoleSink:()=>C_,createDedupe:()=>w_,createEnrich:()=>__,createMemorySink:()=>E_,createPipeline:()=>sd,createRedact:()=>od,createRemoteSink:()=>ad,createSample:()=>S_,createSummarize:()=>x_,default:()=>Fs,emitFetchEvent:()=>k1,makeEvent:()=>J,meetsLevel:()=>nd,normalizeLevel:()=>Fc,resolveSinks:()=>ld,summarizeElement:()=>lo});var qD=0,KD=()=>`${Date.now().toString(36)}-${(qD++).toString(36)}`,J=(t,e,n={})=>({id:KD(),ts:Date.now(),type:t,level:e,...n}),GD=t=>{let e=[],n=t,r=0;for(;n&&r<32;)n.key!=null&&e.unshift(String(n.key)),n=n.parent,r++;return e.join(" > ")},lo=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:GD(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Ms=t=>t?.context?.analyze,YD={init:{category:"lifecycle",type:"lifecycle",level:"debug"},create:{category:"lifecycle",type:"lifecycle",level:"debug"},render:{category:"lifecycle",type:"lifecycle",level:"debug"},beforeRemove:{category:"lifecycle",type:"lifecycle",level:"debug"},remove:{category:"lifecycle",type:"lifecycle",level:"debug"}},XD=(t,{category:e,type:n,level:r})=>o=>{let s=Ms(o);!s||!s.shouldCapture(e)||s.emit(J(n,r,{hook:t,element:lo(o)}))},m1=t=>(e,n)=>{let r=Ms(e);!r||!r.shouldCapture("state")||r.emit(J("state","debug",{hook:t,element:lo(e),changedKeys:n?.changedKeys||null}))},Fs={name:"analyze",error(t,e){let n=Ms(t);if(!n||n.config.enabled===!1||!n.shouldCapture("errors"))return;let r=e?.error||e?.err||(e instanceof Error?e:null);n.emit(J("error","error",{hook:e?.hook||"error",element:lo(t),error:r,message:r?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Ms(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(J("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Ms(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Ms(t);if(!e||!e.shouldCapture("updates"))return;let n=null;t.__ref?.__analyzeUpdateStart!=null&&(n=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(J("update","debug",{hook:"update",element:lo(t),durationMs:n}))},beforeStateUpdate:m1("beforeStateUpdate"),stateUpdate:m1("stateUpdate")};for(let[t,e]of Object.entries(YD))Fs[t]=XD(t,e);D();var Mc={error:0,warn:1,info:2,debug:3,trace:4};var nd=(t,e)=>{let n=Mc[t],r=Mc[e];return n==null||r==null?!0:n<=r},Fc=t=>Mc[t]!=null?t:"warn";D();var rd=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var ZD=(t,e)=>{for(let n of e)if(n instanceof RegExp){if(n.test(t))return!0}else if(typeof n=="string"&&t.toLowerCase().includes(n.toLowerCase()))return!0;return!1},JD=(t,e)=>{if(e!=="redact"){if(e==="hash"){let n=0,r=String(t);for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},b_=(t,e,n,r)=>{if(r>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>b_(s,e,n,r+1));let o={};for(let s of Object.keys(t))if(ZD(s,e)||rd.test(s)){let a=JD(t[s],n);a!==void 0&&(o[s]=a)}else o[s]=b_(t[s],e,n,r+1);return o},od=(t=[],e="mask")=>{let n=Array.isArray(t)?t:[t];return r=>{if(!r)return r;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}=r,g=b_(p,n,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}}};var __=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,n=typeof navigator<"u"?navigator.userAgent:null,r=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=C,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:r,route:i},meta:{ua:n,viewport:c}}}},x_=()=>t=>{if(!t)return t;if(t.element&&typeof t.element=="object"){let e=t.element;(e.node||e.parent||e.__ref)&&(t={...t,element:{key:e.key!=null?String(e.key):null,name:e.__name||e.name||null,tag:e.tag||null,component:e.component||null}})}return t.error instanceof Error&&(t={...t,error:{name:t.error.name,message:t.error.message,stack:t.error.stack}}),t},w_=(t=1e3,e=500)=>{let n=new Map;return r=>{if(!r)return r;let o=`${r.type}:${r.level}:${r.message||""}:${r.error?.message||""}`,s=n.get(o),i=r.ts||Date.now();if(s&&i-s<t)return null;if(n.set(o,i),n.size>e){let a=Math.ceil(e/10),c=0;for(let l of n.keys()){if(c++>=a)break;n.delete(l)}}return r}},S_=t=>e=>{if(!e)return e;let n=t[e.type];return n==null||n>=1?e:Math.random()>n?null:e},y1={redact:t=>od(t.config.redact||[],t.config.maskStrategy),enrich:t=>__(t),summarize:()=>x_(),dedupe:t=>w_(t.config.cache?.dedupeWindowMs||1e3),sample:t=>S_(t.config.sample||{})},QD=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=y1[t];return n?n(e):null}return null},sd=t=>{let e=t.config,n=Array.isArray(e.transformers)?e.transformers.slice():[],r=n.findIndex(s=>s==="redact");r>=0&&n.splice(r,1);let o=[];e.redact!==!1&&o.push(y1.redact(t));for(let s of n){let i=QD(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,h=!1;for(let p of l)if(d=p(d),d==null){h=!0;break}!h&&d!=null&&f.push(d)}return f}i=c}return i}};D();D();var id=typeof C<"u"&&typeof C.document<"u",tI=5e3,eI=50,nI=3,rI=1500,oI=1e3,v_=t=>t?t.level==="error"||t.type==="error"?"bug":t.type==="network"?"network":t.type==="console"?t.level==="error"||t.level==="warn"?"bug":"log":t.level==="warn"?"bug":t.level==="info"?"log":"verbose":"verbose",sI=t=>{try{return JSON.stringify(t)}catch{return null}},iI=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},aI=t=>{if(!t)return null;let e=String(t),n;return(n=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:n[1]}:(n=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:n[1]}:(n=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:n[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(n=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:n[1]}):(n=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:n[1]}:{name:null,version:null}},cI=()=>{if(!id)return null;try{let t=C.document?.documentElement?.getAttribute("data-theme")||null,e=typeof C.matchMedia=="function"?C.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},lI=()=>{if(!id)return null;let t=C.location,e=typeof navigator<"u"?navigator:null,n=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:C.document?.referrer||null,title:C.document?.title||null,ua:e?.userAgent||null,browser:aI(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:iI(),viewport:C.innerWidth?{w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}:null,screen:n?{w:n.width||null,h:n.height||null,availW:n.availWidth||null,availH:n.availHeight||null,colorDepth:n.colorDepth||null,orientation:n.orientation?.type||null}:null,theme:cI()}},ad=(t={})=>{let e=t.url,n=typeof t.transport=="function"?t.transport:null,r=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!n)return()=>{};let o=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:v_,h=typeof t.beforeSend=="function"?t.beforeSend:null,p=t.debug===!0,g=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:tI,y=t.maxBatch||eI,x=t.maxRetries!=null?t.maxRetries:nI,b=t.backoffMs||rI,_=t.queueLimit||oI,w=t.sampleRate!=null?t.sampleRate:1,k=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,A=t.sessionId||k(),P=[],I=[],E=null,M=null,X=()=>{E||!P.length||(E=setTimeout(N,m))},vt=F=>{if(M)return;let q=b*Math.pow(2,Math.max(0,F-1));M=setTimeout(()=>{if(M=null,!I.length)return;let yt=I.shift();at(yt.envelope,yt.attempt)},q)},Ct=(F,q=!1)=>{let yt=u?k_(u):null,Z={id:A,sentAt:Date.now()};q&&(Z.endedAt=Date.now());let Y={v:1,session:Z,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:lI(),user:yt?.user||null,traits:yt?.traits||null,tags:yt?.tags||null,events:F};if((g?k_(g)===!0:p)&&(Y.app.debug=!0),h)try{return h(Y)||null}catch{return Y}return Y},at=async(F,q=1)=>{if(F)try{let yt=!0;if(n){let Z=await n(F);yt=Z!==!1&&Z?.ok!==!1}else yt=await fI(e,F,{apiKey:o,getAuth:f});!yt&&q<x&&(I.push({envelope:F,attempt:q+1}),vt(q+1))}catch{q<x&&(I.push({envelope:F,attempt:q+1}),vt(q+1))}},N=(F=!1,q=!1)=>{if(E&&(clearTimeout(E),E=null),!P.length&&!q)return;let yt=P;P=[];let Z=Ct(yt,q);if(Z){if(F&&id){if(typeof r=="function"&&k_(()=>r(Z)))return;if(navigator.sendBeacon&&e){let Y=sI(Z);if(Y)try{navigator.sendBeacon(e,new C.Blob([Y],{type:"application/json"}));return}catch{}}}at(Z)}},H=!1,mt=()=>{H||(H=!0,N(!0,!0))};id&&(C.addEventListener("pagehide",mt,{passive:!0}),C.addEventListener("beforeunload",mt,{passive:!0}),C.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&N(!0)},{passive:!0}));let B=F=>{if(!F||w<1&&Math.random()>w)return;H&&(H=!1);let q={...F,log_type:d(F)};P.push(q),P.length>_&&(P=P.slice(-_)),P.length>=y?N():X()},gt=F=>(N(!1,!0),A=F||k(),H=!1,B.sessionId=A,A);return B.flush=()=>N(!1),B.endSession=mt,B.startNewSession=gt,B.sessionId=A,B},k_=t=>{try{return t()}catch{return null}},fI=async(t,e,{apiKey:n,getAuth:r})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(n&&(o["X-Analyze-Key"]=n),r)try{let s=await r();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var uI={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},dI="\x1B[0m",cd=typeof C<"u"&&typeof C.document<"u",C_=(t={})=>{let e=t.minLevel||null,n=console.error.bind(console),r=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?n:s.level==="warn"?r:o,a=`[analyze:${s.type}]`;if(cd)i(a,s);else{let c=uI[s.level]||"";i(`${c}${a}${dI}`,s)}}},E_=(t,e={})=>{let n=e.max||t.config.cache?.max||500,r=new Array(n),o=0,s=0,i=a=>{r[o]=a,o=(o+1)%n,s<n&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+n)%n;for(let l=0;l<s;l++)a[l]=r[(c+l)%n];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{o=0,s=0}},i},A_=(t={})=>{let e=t.url,n=t.batchMs!=null?t.batchMs:5e3,r=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=cd?new C.Blob([c],{type:"application/json"}):c;if(cd&&navigator.sendBeacon)try{navigator.sendBeacon(e,l);return}catch{}typeof fetch<"u"&&fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-Analyze-Beacon":"1"},body:c,keepalive:!0}).catch(()=>{})};cd&&(C.addEventListener("pagehide",i,{passive:!0}),C.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=r?i():s||(s=setTimeout(i,n)))};return a.flush=i,a},b1={console:C_,memory:E_,beacon:A_,remote:ad},_1=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},ld=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],n=[];for(let r of e)if(typeof r=="function")n.push(r);else if(typeof r=="string"){let o=b1[r];if(!o)continue;n.push(r==="memory"?o(t,{}):o(r==="remote"?_1(t,{}):{}))}else if(r&&typeof r=="object"&&r.type){let o=b1[r.type];if(!o)continue;n.push(r.type==="memory"?o(t,r):o(r.type==="remote"?_1(t,r):r))}return n};D();var pI=typeof C<"u"&&typeof C.document<"u",hI=new Set(["password","hidden"]),x1=(t,e)=>{let n=0,r=null,o=null;return(...s)=>{let i=Date.now();i-n>=e?(n=i,t(...s)):(o=s,r||(r=setTimeout(()=>{n=Date.now(),r=null,o&&(t(...o),o=null)},e-(i-n))))}},T_="__analyzeKeyPath",Ns=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[T_])return e[T_];let n=[],r=e,o=0,s=null;for(;r&&o<64;){if(r.getAttribute){let a=r.getAttribute("data-key");a&&(s==null&&(s=a),n.unshift(a))}r=r.parentNode,o++}let i;if(n.length)i={selector:null,key:s,path:n.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[T_]=i}catch{}return i},gI=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let n=0,r=String(t||"");for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},mI=t=>!!(!t||t.tagName==="INPUT"&&hI.has(t.type)||rd.test(t.name||"")||rd.test(t.id||"")||t.dataset?.analyze==="skip"),fd=t=>{if(!pI)return;let e=t.config.capture,n=t.config.throttle,r=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),r.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(C,"error",s=>{t.emit(J("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),o(C,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(J("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){o(C,"click",i=>{t.emit(J("pointer","info",{hook:"click",target:Ns(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:w1(i)}))},{passive:!0,capture:!0}),o(C,"dblclick",i=>{t.emit(J("pointer","info",{hook:"dblclick",target:Ns(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(C,"contextmenu",i=>{t.emit(J("pointer","info",{hook:"contextmenu",target:Ns(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=x1(i=>{t.emit(J("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},n.pointermove);o(C,"pointermove",s,{passive:!0})}if(e.keyboard&&o(C,"keydown",s=>{t.emit(J("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:w1(s),target:Ns(s)}))},{passive:!0,capture:!0}),e.forms){let s=i=>{let a=i.target;if(!a||!a.tagName||!["INPUT","TEXTAREA","SELECT"].includes(a.tagName))return;let l=mI(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=gI(a.value,t.config.maskStrategy)),t.emit(J("forms","info",{hook:i.type,target:Ns(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(C,"input",s,{passive:!0,capture:!0}),o(C,"change",s,{passive:!0,capture:!0}),o(C,"submit",i=>{t.emit(J("forms","info",{hook:"submit",target:Ns(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=x1(()=>{t.emit(J("scroll","trace",{hook:"scroll",x:C.scrollX,y:C.scrollY}))},n.scroll);o(C,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Ei(()=>{t.emit(J("viewport","info",{hook:"resize",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))},n.resize);o(C,"resize",s,{passive:!0}),o(C,"orientationchange",()=>{t.emit(J("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(C.document,"visibilitychange",()=>{t.emit(J("viewport","info",{hook:"visibilitychange",hidden:C.document.hidden}))},{passive:!0}),t.emit(J("viewport","info",{hook:"initial",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(J("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(S1)}))}catch{}return i.apply(console,a)},r.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(J("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}r.push(()=>s.disconnect())}catch{}},w1=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),yI=t=>{let e={name:t.name||"Error",message:typeof t.message=="string"?t.message:String(t),stack:typeof t.stack=="string"?t.stack:null};return t.cause!==void 0&&(e.cause=S1(t.cause)),e},S1=t=>{if(t==null)return t;if(t instanceof Error)return yI(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};D();var bI=typeof C<"u"&&typeof C.document<"u",k1=(t,e)=>{let n=t?.analyze;if(!n||!n.shouldCapture("network"))return;let r=e.phase==="error"?"error":"info";n.emit(J("network",r,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Nc=t=>{if(bI&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof C.fetch=="function"){let e=C.fetch.bind(C),n=function(r,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(r,o);let s=typeof r=="string"?r:r&&r.url||"",i=(o?.method||typeof r=="object"&&r?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(J("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(r,o).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(J("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(J("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};C.fetch=n,t.__teardown.push(()=>{C.fetch=e})}if(typeof C.XMLHttpRequest=="function"){let e=C.XMLHttpRequest,n=e.prototype.open,r=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},n.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return r.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(J("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(J("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(J("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),r.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=n,e.prototype.send=r})}}};var _I={errors:!0,warnings:!0,pointer:!1,keyboard:!1,forms:!1,scroll:!1,viewport:!1,network:!1,performance:!1,navigation:!1,console:!1,lifecycle:!1,state:!1,updates:!1,replay:!1,telemetry:!1},xI={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},wI={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},SI={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},kI=t=>{let e={..._I,...t};return e.replay&&Object.assign(e,xI),e.telemetry&&Object.assign(e,wI),e.remote&&Object.assign(e,SI),Object.assign(e,t),e},vI=64,CI=()=>{if(typeof C>"u"||!C.location)return null;try{let e=new URLSearchParams(C.location.search).get("analyze");return e||null}catch{return null}},ud=(t={})=>{let e=t===!0?{}:{...t};e.capture=kI(e.capture||{});let n=CI();(n==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),n==="off"&&(e.enabled=!1),e.level=Fc(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let r={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{r.__pipeline||(r.__pipeline=sd(r),r.__sinks=ld(r))};return r.shouldCapture=s=>r.config.enabled===!1?!1:!!r.config.capture[s],r.emit=s=>{if(s&&r.config.enabled!==!1&&!r.__paused&&nd(s.level,r.config.level)){if(!r.__ready){if(s.level!=="error"&&!r.config.captureDuringHydration)return;r.__preBuffer.length<vI&&r.__preBuffer.push(s);return}o(),v1(r,s)}},r.activate=s=>{if(r.context==null&&(r.context=s||null),r.__ready)return;r.__ready=!0;let i=r.__preBuffer;if(r.__preBuffer=[],i.length){o();for(let a of i)v1(r,a)}try{fd(r)}catch(a){console.error("[analyze] browser attach error:",a)}try{Nc(r)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of r.__onActivate||[])try{a(r)}catch(c){console.error("[analyze] onActivate error:",c)}},r.pause=()=>{r.__paused=!0},r.resume=()=>{r.__paused=!1},r.setLevel=s=>{r.config.level=Fc(s)},r.setCapture=(s,i)=>{if(r.config.capture[s]=!!i,s==="network"&&i&&r.__ready)try{Nc(r)}catch(a){console.error("[analyze] network attach error:",a)}},r.query=s=>r.__memory?r.__memory.query(s):[],r.snapshot=()=>r.__memory?r.__memory.snapshot():[],r.emitNetwork=s=>{if(!r.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},r.flush=()=>{if(r.__sinks)for(let s of r.__sinks)typeof s.flush=="function"&&s.flush()},r.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(r.config.sinks)?r.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(r.__sinks)for(let c of r.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},r.replay=()=>({initialSnapshot:r.__initialSnapshot,events:r.snapshot()}),r.destroy=()=>{for(let s of r.__teardown)try{s()}catch{}r.__teardown=[],r.__ready=!1,r.__paused=!0},r.__onActivate=[],r.onActivate=s=>{r.__onActivate.push(s)},r},v1=(t,e)=>{let n=t.__pipeline(e);if(n==null)return;let r=Array.isArray(n)?n:[n];for(let o of r){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var D_={};$(D_,{Inspect:()=>dd,inspectPlugin:()=>P_});D();function C1(t){return S(t)?t:R(t)?t.find(e=>S(e)):""}function R_(t){if(!t)return;let e=t.__ref.__componentKey,n=t.extends&&C1(t.extends),r=t.parent&&t.parent.childExtends&&C1(t.parent.childExtends);return(e||n||r||"").split("_")[0].split(".")[0].split("+")[0]}function pd(t){if(!t||!t.__ref)return;let{components:e,pages:n,editor:r}=t.context,o=R_(t);return r&&r.onInitInspect&&!r.onInitInspect(o,t,t.state)?pd(t.parent):o&&(e[o]||n[o])?t:pd(t.parent)}var EI=(t,e,n)=>{let r=n.window||window;r.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},r.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},dd={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:EI,onMousemove:(t,e,n)=>{let r=t.target.ref,o=pd(r),s=e.Inspector.state;if(!o||!n.debugging||!o.__ref)return s.update({area:!1});let i=R_(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),h={x:l,y:f,width:u,height:d};if(!s.area)return a(h);s.area.x!==h.x&&a(h)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,n)=>{if(!n.debugging)return;let r=t.target.ref,o=pd(r);if(!o)return;let s=R_(o);if(!s)return;let i=r.context.editor;if(i&&i.onInspect)return i.onInspect(s,r,r.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return r.context.socket?.emit&&r.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(v(e)){let{Content:n,...r}=e;for(let o in r)Ts[o]||(r[o].__ref||(r[o].__ref={}),r[o].__ref.__componentKey||(r[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,n)=>{let{area:r}=n,o=n.area&&n.parent.debugging,s;if(!o)s="display: none !important";else if(r){let{x:i,y:a,width:c,height:l}=r;s=`
86
+ `)}var DC={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",paddingBlock:"pbl",paddingInline:"pin",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",marginBlock:"mbl",marginInline:"min",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",scrollBehavior:"sb",inset:"ins"};function LC(t,e){let n=DC[t]||cr(t),r=Sc(e),o=`_${n}-${r}`,s=Os(t),i=dD[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${o}{${a}}`;return`${o}
87
+ ${c}`}var dD={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"},pD="@media (hover: hover)",hD=/(?:^|[^\\]):hover(?![\w-])/,IC=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function $C(t){let e=t.split("\0"),n=[],r=[];for(let o=0;o+1<e.length;o+=2){let s=e[o],i=e[o+1];if(!i||IC(i))continue;let a=DC[s]||cr(s),c=Sc(i),l=`_${a}-${c}`,f=Os(s);n.push(l),r.push(`.${l}{${f}:${i}}`)}return n.join(" ")+"\0"+r.join(`
88
+ `)}function MC(t,e,n){let r=t+e,o=`_c${cr(r)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(IC(u)||(i+=`${Os(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${o}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")||t.startsWith("[")&&!t.includes("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${o}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${o}`),a=`${c}{${i}}`):(c=`.${o} ${t}`,a=`${c}{${i}}`);return n!==!1&&hD.test(c)&&(a=`${pD}{${a}}`),`${o}
89
+ ${a}`}var Zb=null;function qu(t){Zb=t}var Ue={structuralHash:zu,deepEqual:Hu,mergeStructural:Yb,overwriteDeep:Xb,shortHash:cr,toKebab:Os,sanitizeValue:Sc,batchShortHash:PC,atomicCssClass:LC,batchAtomicCss:$C,compoundCssClass:MC},FC=!1,Wu=null;function NC(t){return Wu||(Wu=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Ue.structuralHash=e.structuralHash),e.deepEqual&&(Ue.deepEqual=e.deepEqual),e.mergeStructural&&(Ue.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Ue.overwriteDeep=e.overwriteDeep),e.shortHash&&(Ue.shortHash=e.shortHash),e.toKebab&&(Ue.toKebab=e.toKebab),e.sanitizeValue&&(Ue.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Ue.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Ue.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Ue.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Ue.compoundCssClass=e.compoundCssClass),FC=!0,Zb&&e.batchAtomicCss&&Zb({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Wu)}function jC(){return FC}D();var kc={};$(kc,{CDN_PROVIDERS:()=>Se,DOMQL_EVENTS:()=>Gp,DOMQ_PROPERTIES:()=>Fn,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Eo,ENV:()=>dh,HTML_TAGS:()=>Oo,METHODS:()=>jn,METHODS_EXL:()=>yi,NODE_ENV:()=>$e,OPTIONS:()=>zi,PACKAGE_MANAGER_TO_CDN:()=>Hn,PARSED_DOMQ_PROPERTIES:()=>mi,PROPS_METHODS:()=>Nn,STATE_METHODS:()=>Sr,STATE_PROPERTIES:()=>qp,SVG_TAGS:()=>nw,TYPES:()=>li,UNIVERSAL_RESERVED_KEYS:()=>pf,__resetBuiltinMethodWarnings:()=>Gg,addCaching:()=>Wl,addContext:()=>Hl,addExtend:()=>$h,addExtends:()=>Ye,addItemAfterEveryElement:()=>Lp,addProtoToArray:()=>di,addRef:()=>Vl,applyCSS:()=>t_,applyDependentState:()=>tg,applyEvent:()=>Zl,applyEventUpdate:()=>Jl,applyExtends:()=>sw,applyProps:()=>Mi,arrayContainsOtherArray:()=>Ep,arraysEqual:()=>$p,arrayzeValue:()=>Mr,buildImgSrcset:()=>_a,buildSourcesAndImg:()=>xa,cache:()=>sg,call:()=>Ag,captureSnapshot:()=>Og,checkForStateTypes:()=>Xh,checkIfInherits:()=>Xl,checkIfStringIsInArray:()=>Np,clone:()=>Zp,cloneAndMergeArrayExtend:()=>Ti,cloneFunction:()=>_h,collectExtendsList:()=>Ro,concatAddExtends:()=>Dh,copyJavaScriptToClipboard:()=>Zg,copyStringToClipboard:()=>Xg,createBasedOnType:()=>Bl,createElement:()=>Yh,createElementExtends:()=>Tl,createExtends:()=>Ri,createExtendsFromKeys:()=>Po,createExtendsStack:()=>Dl,createIfConditionFlag:()=>xh,createInheritedState:()=>Zh,createKey:()=>Ci,createNestedObject:()=>sh,createNestedObjectByKeyPath:()=>Qh,createObjectWithoutPrototype:()=>xl,createParent:()=>Ul,createPath:()=>zl,createProps:()=>Fi,createPropsStack:()=>Nl,createRoot:()=>Gh,createScope:()=>ng,createSnapshotId:()=>vi,customDecodeURIComponent:()=>Wp,customEncodeURIComponent:()=>Hp,cutArrayAfterValue:()=>Pp,cutArrayBeforeValue:()=>Rp,debounce:()=>Ei,debounceOnContext:()=>yh,decodeNewlines:()=>zp,deepClone:()=>it,deepContains:()=>rh,deepDefaults:()=>ga,deepDestringifyFunctions:()=>_e,deepExtend:()=>Al,deepMerge:()=>ot,deepMergeExtends:()=>Xe,deepStringifyFunctions:()=>_i,defineSetter:()=>Cg,destringifyGlobalScope:()=>wi,detectHeightOnInit:()=>Ig,detectInfiniteLoop:()=>lh,document:()=>nt,encodeNewlines:()=>Up,error:()=>Lr,excludeKeysFromObject:()=>uh,exec:()=>ut,extendCachedRegistry:()=>Lh,extendStackRegistry:()=>Pi,extractArrayExtend:()=>Li,fetchLibraryData:()=>bf,fibonacciNumberByIndex:()=>$g,filterArrays:()=>Mp,filterArraysFast:()=>Fp,finalizeExtends:()=>Ll,findClosestNumber:()=>yf,findClosestNumberInFactory:()=>Wg,findInheritedState:()=>Yl,findKeyPosition:()=>Bp,flattenExtend:()=>Do,formatDate:()=>Lg,generateHash:()=>vl,generateHeadArrayTags:()=>mf,generateKey:()=>ki,generateMetaTags:()=>zg,get:()=>wg,getActiveRoute:()=>Fb,getCDNDirUrl:()=>hf,getCDNUrl:()=>Fe,getCapitalCaseKeys:()=>Nh,getCdnProviderFromConfig:()=>Bo,getChildStateInKey:()=>Gl,getChildren:()=>vg,getContext:()=>ia,getCookie:()=>Ch,getDB:()=>ua,getEmotionStylesheet:()=>em,getExtendsInElement:()=>Mh,getExtendsStack:()=>Oi,getExtendsStackRegistry:()=>El,getFrequencyInArray:()=>Ap,getFunctionSource:()=>Ie,getHashedExtend:()=>Di,getImportMapScript:()=>Dg,getInObjectByPath:()=>ch,getLocalStorage:()=>Ah,getNev:()=>mh,getPageMetadata:()=>Hg,getParentStateInKey:()=>Kl,getPath:()=>ta,getQuery:()=>da,getRef:()=>kg,getRoot:()=>ra,getRootContext:()=>sa,getRootData:()=>oa,getRootState:()=>na,getRootStateInKey:()=>ql,getSpreadChildren:()=>jh,global:()=>kp,hasFunction:()=>Le,hasHandlerPlugin:()=>Ao,hasOwnProperty:()=>th,hashContent:()=>Uo,inheritChildExtends:()=>Rl,inheritChildPropsExtends:()=>Ol,inheritParentProps:()=>Ni,inheritRecursiveChildExtends:()=>Pl,init:()=>An,initProps:()=>Wh,is:()=>Jt,isArray:()=>R,isBoolean:()=>pl,isBuiltinElementMethod:()=>Kp,isContextComponent:()=>Bh,isCyclic:()=>fh,isDOMNode:()=>Zt,isDate:()=>gl,isDefined:()=>Rt,isDevelopment:()=>Vn,isEmpty:()=>bl,isEmptyObject:()=>eh,isEqualDeep:()=>_l,isFailedRevival:()=>Ar,isFunction:()=>O,isHtmlElement:()=>ai,isLazyFunction:()=>Jp,isLocal:()=>gh,isLoudDevRuntime:()=>ht,isMalformedDependency:()=>Ir,isMethod:()=>Tg,isMobile:()=>kh,isNode:()=>pn,isNot:()=>Cp,isNotProduction:()=>Or,isNull:()=>hl,isNumber:()=>Ge,isObject:()=>v,isObjectLike:()=>j,isPhoto:()=>Mg,isPolyglotRetranslatableKey:()=>Ui,isPolyglotWritableKey:()=>Pr,isProduction:()=>Bn,isProtectedElementMethod:()=>kr,isStaging:()=>hh,isState:()=>Jh,isString:()=>k,isStringFunction:()=>Ai,isTest:()=>Sl,isTesting:()=>ph,isUndefined:()=>Dt,isUniversallyReservedKey:()=>Rg,isUnresolvableDependency:()=>Wn,isValidDependencyMap:()=>$r,isValidHtmlTag:()=>Oh,isWrappedLibrary:()=>tn,joinArrays:()=>ko,jointStacks:()=>Ih,keys:()=>uf,lastLevel:()=>Uu,lastPathname:()=>Vu,loadCssFile:()=>Bg,loadJavascript:()=>Vg,loadJavascriptFile:()=>Fg,loadJavascriptFileEmbedSync:()=>jg,loadJavascriptFileSync:()=>Ng,loadRemoteCSS:()=>Ug,loadRemoteScript:()=>Vo,log:()=>Eg,logGroupIf:()=>Sh,logIf:()=>wh,lookdown:()=>_g,lookdownAll:()=>xg,lookup:()=>bg,lowercaseFirstLetter:()=>wr,makeObjectWithoutPrototype:()=>nh,map:()=>Xp,mapStringsWithContextComponents:()=>Ii,markPolyglotSeeded:()=>Je,matchRoute:()=>Ib,matchesComponentNaming:()=>Ze,memoize:()=>bh,merge:()=>bt,mergeSharedLibraries:()=>ma,nextElement:()=>ca,normalizeIgnoreList:()=>qn,normalizeLibraryKey:()=>zo,objectToString:()=>xi,objectizeStringProperty:()=>$i,overwrite:()=>Si,overwriteDeep:()=>Wt,overwriteShallow:()=>Tr,overwriteState:()=>eg,parse:()=>df,parseDeep:()=>Ji,parseQuery:()=>$b,parseRoutePattern:()=>Lb,pickupElementFromProps:()=>Ml,pickupPropsFromElement:()=>$l,polyglotSeededKeys:()=>Lo,previousElement:()=>la,promoteActiveRootState:()=>Mo,propExists:()=>zh,propertizeElement:()=>Fl,propertizeUpdate:()=>Uh,reinit:()=>Qb,remove:()=>Fw,removeChars:()=>Jg,removeCookie:()=>Eh,removeDuplicateProps:()=>Bi,removeDuplicatesInArray:()=>vo,removeFromArray:()=>Tp,removeFromObject:()=>oh,removeNestedKeyByPath:()=>ih,removeValueFromArray:()=>ui,removeValueFromArrayAll:()=>Dp,reorderArrayByValues:()=>Ip,replaceLiteralsWithObjectFields:()=>Mt,replaceOctalEscapeSequences:()=>Vp,resolveAsset:()=>Qt,resolveHandler:()=>To,resolveSharedLibraries:()=>Yg,returnValueAsText:()=>jl,router:()=>ln,runGuards:()=>Mb,runPluginHook:()=>Pt,scratchSystem:()=>ss,scratchUtils:()=>Yn,self:()=>vp,set:()=>Xr,setActiveRootState:()=>ea,setCookie:()=>vh,setHashedExtend:()=>Cl,setInObjectByPath:()=>ah,setLocalStorage:()=>Th,setNodeStyles:()=>ff,setProps:()=>Sg,setPropsPrototype:()=>ji,sharedLibrary:()=>Kg,splitPackageSpecifier:()=>pa,spotByPath:()=>Qi,srcsetFor:()=>Ho,stringIncludesAny:()=>hi,stringToObject:()=>Qp,stripVersionRangePrefix:()=>ha,swapItemsInArray:()=>Op,syncProps:()=>Vi,toCamelCase:()=>ya,toDashCase:()=>ba,toDescriptionCase:()=>tm,toPriorityOrder:()=>xe,toTitleCase:()=>Qg,toggleFullscreen:()=>Pg,triggerEventOn:()=>gn,triggerEventOnUpdate:()=>rg,trimStringFromSymbols:()=>jp,unstackArrayOfObjects:()=>fi,update:()=>Hh,updateProps:()=>qh,variables:()=>fa,verbose:()=>Fo,warn:()=>aa,window:()=>C});D();D();var mD=T(),BC=(t=mD,e)=>{let n=v(e.localFile)?e.localFile:{},r=it(n.designSystem||{});return ot(t,r,de)},yD={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Ku=(t,e)=>{let n=!e||e===":root",r={};for(let o in t)if(o.startsWith("@media")){let s=n?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;r[o]={[s]:t[o]}}else n?r[o]=t[o]:r[`${e}${o}, ${o} ${e}`]=t[o];return r},Jb=(t,e)=>{t.CSS_MEDIA_VARS&&xt(Ku(t.CSS_MEDIA_VARS,e));let n=Yr(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(n).length&&xt(n)},An=(t,e=yD)=>{let n=BC(t||{},e),r=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let g=new URLSearchParams(window.location.search).get("globalTheme");g&&(o=g)}let s=Xr({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...n},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=r);let i=Ca(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&xt(i),c&&(xt({[r]:s.CSS_VARS}),Jb(s,r)),a&&xt(s.reset);let p=s.animation;if(p){let g={};for(let m in p)g[`@keyframes ${m}`]=p[m];xt(g)}return(u||f)&&Ja(s.svg,{document:e.document}),(h||d)&&Gr(s.icons,{document:e.document}),s},Gu={},Qb=(t,e=Gu)=>{let n=BC(t||{},e),r=e.scopeSelector||":root",o=Xr({verbose:!1,...n});return e.preventInject||(xt({[r]:o.CSS_VARS}),Jb(o,r),xt(o.reset)),o},t_=(t,e=Gu)=>{xt(t)},bD=(t,e=Gu)=>{let n=e.scopeSelector||":root";xt({[n]:t.CSS_VARS}),Jb(t,n)};var _D=(t,e=Gu)=>{};D();var UC=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,xD=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},n_={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},vc=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},wD=["manual","auto"],e_=new WeakMap,VC=(t,e)=>{let n=e.claims[e.claims.length-1],r=n?n.value:e.found;t.scrollRestoration!==r&&(t.scrollRestoration=r)},SD=(t,e)=>{let n=e&&e.scrollRestoration;if(n!=null){if(!wD.includes(n)){if(t.verbose!==!1){let r=typeof n=="string"?JSON.stringify(n):`a ${typeof n}`;console.warn(`[smbls/router] router.scrollRestoration must be 'manual' or 'auto', got ${r} \u2014 the browser default stays`)}return}try{let r=t.window||C,o=r&&r.history;if(!o||!("scrollRestoration"in o))return;let s=e_.get(o);s||(s={found:o.scrollRestoration,claims:[]},e_.set(o,s));let i={value:n};s.claims.push(i),VC(o,s),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{let a=s.claims.indexOf(i);if(a!==-1){s.claims.splice(a,1),s.claims.length||e_.delete(o);try{VC(o,s)}catch{}}})}catch{}}},zC=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=n_:e.router=bt(e.router||{},n_);let n=e.router;SD(e,n);let r=async(s,i)=>{let a=s.context?.window||C,c=xD(n);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=UC(f),c=f+u+d}let l=s;if(n.customRouterElement){let f=vc(s,n.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await ln(c,l,{},{initialRender:!0,pushState:!1})},o=!Dt(t.onRenderRouter);return n&&n.initRouter&&!o&&(t.onRenderRouter=r),kD(e,n),n},r_=(t,e)=>{if(e.router===!1)return;let n=e.router||n_;if(!n.popState)return;let r=e.utils&&e.utils.router?e.utils.router:ln,o=e.window||C,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=UC(a);let f=a+c+l,u=t;if(n.customRouterElement){let d=vc(t,n.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},kD=(t,e)=>{let{components:n}=t;if(e&&e.injectRouterInLinkComponent)return ot(n.Link||n["smbls.Link"],n.RouterLink||n["smbls.RouterLink"])};D();var o_=C&&C.location?C.location.host.includes("dev."):Vn(),HC=o_?"http://localhost:8080/get":"https://api.symbols.app/get",vD={endpoint:HC},WC=async(t,e=vD)=>{let n=e.endpoint||HC,r=e.serviceRoute?R(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(n+"/?"+r,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(O(e.onError))return e.onError(s);console.error(s)}},CD=async(t,e)=>{let{editor:n}=e;if(n&&n.remote){let r=await WC(t,n),o=o_||e.isDevelopment?_e(r):_e(r.releases[0]);n.serviceRoute?R(n.serviceRoute)?n.serviceRoute.forEach(s=>{Wt(e[s],o[s.toLowerCase()])}):Wt(e[n.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Wt(e[s],o[s.toLowerCase()])})}return e},ED=async(t,e,n)=>{let{editor:r}=e;if(r&&r.remote){let o=await WC(t,r),s=o_||e.isDevelopment?_e(o):_e(o.releases[0]);n(s)}},qC=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await CD(t,e)}catch(n){console.error(n)}},KC=(t,e,n,r)=>{if(e&&n.editor)try{n.editor.async&&ED(e,n,r||(o=>{let s=o.designSystem;v(s)&&n.utils.init(s),v(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var Cc=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let n of e.__teardowns)try{n()}catch(r){console.error("[smbls] destroy teardown error:",r)}e.__teardowns.length=0}try{vn(t)}catch(n){console.error("[smbls] dispose error:",n)}if(e.fetch&&e.fetch.__resolved&&delete e.fetch.__resolved,e.fetch&&e.fetch.__resolving&&delete e.fetch.__resolving,e.db&&e.db.__resolved&&delete e.db.__resolved,e.db&&e.db.__resolving&&delete e.db.__resolving,e.analyze?.destroy)try{e.analyze.destroy()}catch(n){console.error("[analyze] destroy error:",n)}return t.__destroyed=!0,!0};var a_={};$(a_,{Helmet:()=>XC,applyMetadata:()=>Ds,default:()=>ID,extractMetadata:()=>PD,generateHeadHtml:()=>LD,helmetPlugin:()=>i_,resolveMetadata:()=>lr});D();var AD={title:{tag:"title"},description:{tag:"meta",attr:"name",key:"description"},keywords:{tag:"meta",attr:"name",key:"keywords"},robots:{tag:"meta",attr:"name",key:"robots"},author:{tag:"meta",attr:"name",key:"author"},canonical:{tag:"link",attr:"rel",key:"canonical",valueAttr:"href"},image:{tag:"meta",attr:"property",key:"og:image"},url:{tag:"meta",attr:"property",key:"og:url"},siteName:{tag:"meta",attr:"property",key:"og:site_name"},type:{tag:"meta",attr:"property",key:"og:type"},locale:{tag:"meta",attr:"property",key:"og:locale"},"og:title":{tag:"meta",attr:"property",key:"og:title"},"og:description":{tag:"meta",attr:"property",key:"og:description"},"og:image":{tag:"meta",attr:"property",key:"og:image"},"og:url":{tag:"meta",attr:"property",key:"og:url"},"og:type":{tag:"meta",attr:"property",key:"og:type"},"og:site_name":{tag:"meta",attr:"property",key:"og:site_name"},"og:locale":{tag:"meta",attr:"property",key:"og:locale"},"twitter:card":{tag:"meta",attr:"name",key:"twitter:card"},"twitter:title":{tag:"meta",attr:"name",key:"twitter:title"},"twitter:description":{tag:"meta",attr:"name",key:"twitter:description"},"twitter:image":{tag:"meta",attr:"name",key:"twitter:image"},"twitter:site":{tag:"meta",attr:"name",key:"twitter:site"},"theme-color":{tag:"meta",attr:"name",key:"theme-color"}},TD=t=>{if(t.tag==="link")return`link[${t.attr}="${t.key}"]`;if(t.tag&&!t.attr&&!t.key)return t.tag;if(t.tag&&t.attr&&t.key)return`${t.tag}[${t.attr}="${t.key}"]`},GC=t=>_e({v:t}).v,YC=(t,e,n,r)=>{try{return ut(t,e,n)}catch(o){console.warn(`[helmet] metadata factory for "${r}" threw; treating as unset:`,o&&o.message||o);return}},s_=Object.freeze({authored:!0}),lr=(t,e,n,r)=>{if(!t)return{};let o=t;k(o)&&Le(o)&&(o=GC(o));let s=O(o),i=!s&&r?.authored===!0,a=s?YC(o,e,n,"metadata"):v(o)?{...o}:{};if(!v(a))return{};for(let c in a){let l=a[c],f=i&&k(l)&&!Le(l);k(l)&&Le(l)&&(l=GC(l)),O(l)?l=YC(l,e,n,c):k(l)&&Le(l)&&(l=void 0),k(l)&&l.includes("{{")&&e?.call&&(l=f?e.call("replaceLiteralsWithObjectFields",l,n,s_):e.call("replaceLiteralsWithObjectFields",l,n)),a[c]=l}return a},OD=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),RD=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let n in t)if(OD(t[n]))return t[n]},PD=(t,e="/",n,r)=>{let o=t.pages||{},s=RD(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=lr(t.app.metadata,n,r,s_);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=lr(c,n,r,s_);for(let f in l)a.add(f);i={...i,...l},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}if(i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},DD=(t,e)=>{let n=e.createElement(t.tag);return t.attr&&n.setAttribute(t.attr,t.key),(e.head||e.querySelector("head")).appendChild(n),n},Ps=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},Rs=(t,e,n,r)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of n)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of n){if(s.has(a))continue;let c=r(a);c&&(c.setAttribute(e,a),o.appendChild(c))}},Ds=(t,e)=>{if(!(!v(t)||!e)){for(let n in t){let r=t[n];if(r==null||n==="jsonLd"||n==="styles"||n==="scripts"||n==="alternate"||n==="favicons"||n==="icon"||n==="favicon")continue;let o=AD[n];if(!o)continue;let s=TD(o),i=e.querySelector(s)||DD(o,e);i&&(n==="title"?i.textContent=r:o.valueAttr?i.setAttribute(o.valueAttr,r):i.setAttribute("content",r))}if(Array.isArray(t.jsonLd)){let r=t.jsonLd.filter(s=>s!=null).map(s=>k(s)?s:JSON.stringify(s)),o=r.map(Ps);Rs(e,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=r[i],a})}if(Array.isArray(t.styles)){let n=t.styles.filter(o=>o!=null&&String(o).trim()),r=n.map(Ps);Rs(e,"data-smbls-style",r,o=>{let s=r.indexOf(o),i=e.createElement("style");return i.textContent=String(n[s]),i})}if(Array.isArray(t.scripts)){let n=t.scripts.filter(o=>o&&(k(o)?o.trim():o.src)),r=n.map(o=>k(o)?o:String(o.src));Rs(e,"data-smbls-script",r,o=>{let s=r.indexOf(o),i=n[s],a=e.createElement("script");return k(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}if(Array.isArray(t.alternate)){let n=t.alternate.filter(o=>v(o)),r=n.map(o=>`${o.hreflang||""}|${o.href||""}`);Rs(e,"data-smbls-alternate",r,o=>{let s=r.indexOf(o),i=e.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(n[s]))i.setAttribute(a,c);return i})}if(Array.isArray(t.favicons)){let n=t.favicons.filter(o=>o!=null),r=n.map(o=>v(o)?Ps(JSON.stringify(o)):String(o));Rs(e,"data-smbls-favicon",r,o=>{let s=r.indexOf(o),i=n[s],a=e.createElement("link");if(a.setAttribute("rel","icon"),v(i))for(let[c,l]of Object.entries(i))a.setAttribute(c,l);else a.setAttribute("href",String(i));return a})}if(t.icon||t.favicon){let n=String(t.icon||t.favicon),r=n.endsWith(".svg")?"image/svg+xml":n.endsWith(".png")?"image/png":"";Rs(e,"data-smbls-single-icon",[n],o=>{let s=e.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),r&&s.setAttribute("type",r),s})}}},lt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,n=>e[n])},LD=t=>{let e=['<meta charset="UTF-8">'],n=new Set(["charset","jsonLd","styles","scripts"]),r=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||n.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${lt(s)}</title>`);continue}if(o==="viewport"){r||(e.push(`<meta name="viewport" content="${lt(s)}">`),r=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${lt(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=lt(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${lt(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${lt(f)}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${lt(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${lt(f)}" content="${lt(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${lt(f)}" content="${lt(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${lt(o)}" content="${lt(f)}">`)):e.push(`<meta property="${lt(o)}" content="${lt(s)}">`):l?e.push(`<meta name="${lt(o)}" content="${lt(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${lt(o)}" content="${lt(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${lt(o)}" content="${lt(s)}">`)}if(r||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let o of t.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Ps(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let o of t.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Ps(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let o of t.scripts){if(!o)continue;let s=typeof o=="string",i=s?o:o.src;if(!i&&!(o&&o.body))continue;let a=[];i&&a.push(`src="${lt(i)}"`),s||(o.type&&a.push(`type="${lt(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${lt(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${lt(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${lt(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${lt(i||Ps(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
90
+ `)},XC={define:{metadata:(t,e,n)=>{let r=e.context?.document||typeof document<"u"&&document;if(!r)return;let o=G(()=>{let s=lr(t,e,e.state);Ds(s,r);let i=e.state?.root;v(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(o)}}},i_={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let n=G(()=>{let r=t.metadata;if(!r)return;let o=lr(r,t,t.state);Ds(o,e)});t.__ref?.__effects&&t.__ref.__effects.push(n)},update(t){let e=t.metadata;if(!e)return;let n=t.context?.document||typeof document<"u"&&document;if(!n)return;let r=lr(e,t,t.state);Ds(r,n)}},ID=XC;Zi();var ZC=(t,e,n,r)=>{t&&Xi(t,e,n,r)},JC=(t,e,n)=>{if(!t)return;let r=e.context?.document||typeof document<"u"&&document;if(!r)return;let o=lr(t,e,n);Ds(o,r)},QC=async(t,e)=>{if(!t)return;let n={tag:"fragment",...t},r=async()=>{await e.set(n,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(r):await r(),n},Ls={routes:t=>t,metadata:JC,fetch:ZC,$router:QC},tE=(t={})=>{let e={routes:n=>n};return t.metadata!==!1&&(e.metadata=JC),t.fetch!==!1&&(e.fetch=ZC),t.router!==!1&&(e.$router=QC),e};var c_={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Yu={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},Xu={...c_,router:Yu},$D={state:{},pages:{},components:{},router:Yu,define:Ls},fr=$D;D();D();var eE=(t,e)=>j(t.extends)?t.extends:[];D();var l_={};$(l_,{default:()=>jD,getActiveLang:()=>ur,getLanguages:()=>Ac,getLocalStateLang:()=>Dc,initPolyglot:()=>Ju,loadTranslations:()=>Oc,polyglotPlugin:()=>$s,setLang:()=>Rc,translate:()=>Tc,upsertTranslation:()=>Pc});D();var rE="smbls_lang",MD="smbls_t_",FD="smbls_tv_",Is={get(t){try{return window?.localStorage.getItem(t)}catch{return null}},set(t,e){try{window?.localStorage.setItem(t,e)}catch(n){console.warn("[polyglot] localStorage unavailable:",n.message)}},remove(t){try{window?.localStorage.removeItem(t)}catch(e){console.warn("[polyglot] localStorage unavailable:",e.message)}}},Ec={};function ur(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function Ac(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Zu=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let n=e.split("."),r=t;for(let o=0;o<n.length;o++){if(r==null)return;r=r[n[o]]}return r},nE=(t,e,n)=>{let r=e.lastIndexOf(".");if(r===-1)return t[e+"_"+n];let o=Zu(t,e.substring(0,r));if(o!=null)return o[e.substring(r+1)+"_"+n]};function Tc(t,e){if(!t)return"";let n=this?.context,r=n?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=nE(s,t,o);if(l!==void 0)return l}if(r?.translations){let l=r.translations[o];if(l){let f=Zu(l,t);if(f!==void 0)return f}}let a=(s?.root||n?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=Zu(l,t);if(f!==void 0)return f}}let c=r?.defaultLang||"en";if(s){let l=nE(s,t,c);if(l!==void 0)return l}if(r?.translations){let l=r.translations[c];if(l){let f=Zu(l,t);if(f!==void 0)return f}}return t}async function Oc(t){let e=this?.context,n=e?.polyglot,r=this?.state?.root||e?.state?.root;if(!n||!r)return;let o=n.storagePrefix||MD,s=n.storageVersionPrefix||(n.storagePrefix?n.storagePrefix.replace(/_$/,"v_"):FD);if(n.translations&&n.translations[t]&&!n.fetch||!n.fetch||n._fetchFailed?.[t])return;if(!r.translations?.[t]){let c=Is.get(o+t);if(c)try{let l=JSON.parse(c),f={translations:{...r.translations||{}}};f.translations[t]=l,r.update&&r.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(n.storagePrefix||"smbls")+":"+t;if(Ec[i])return Ec[i];let a=this;return Ec[i]=(async()=>{try{let c=n.fetch,l=parseInt(Is.get(s+t),10)||0,f,u,d;if(O(c)){let p=await c(t,l,a);if(!p||p.changed===!1)return;f=p.translations||p.data||p,u=p.version||0,d=!0}else if(v(c)){let p=a.getDB||(()=>e.fetch),g=O(p)?await p.call(a):e.fetch;if(!g)return;let m=c.rpc||c.from||"get_translations_if_changed",y={p_lang:t,p_cached_version:l,...c.params||{}},x=await g.rpc({from:m,params:y});if(x.error)throw n._fetchFailed||(n._fetchFailed={}),n._fetchFailed[t]=!0,x.error;let b=x.data;if(!b||!b.changed)return;f=b.translations||{},u=b.version||0,d=!0}else return;if(!d||!f)return;Is.set(o+t,JSON.stringify(f)),u&&Is.set(s+t,String(u));let h={translations:{...r.translations||{}}};h.translations[t]=f,r.update&&r.update(h)}catch(c){if(n.verbose!==!1){let l=c?.message||c?.details||(typeof c=="object"?JSON.stringify(c):String(c));console.warn("[polyglot] Failed to load translations for",t,"-",l)}}finally{delete Ec[i]}})(),Ec[i]}var ND=(t,e,n)=>{let r=t.__ref;if(!r||r.contentManaged||n==null||typeof n=="object")return;let o=r.__textNode;if(!o||o.parentNode!==e)return;let s=String(n);o.nodeValue!==s&&(o.nodeValue=s)};async function Rc(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root,s=n?.document||globalThis.document;if(!o)return;if(e?.persist!==!1){let l=r?.storageLangKey||rE;Is.set(l,t)}if(s?.documentElement&&(s.documentElement.lang=t),this.call("getActiveLang")===t)return;r?.fetch&&await this.call("loadTranslations",t),n?.state&&(n.state.lang=t);let i=r?.translations?.[t],a={lang:t},c=l=>Ui(n,l,o);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(a[l]=f)}o.update&&o.update(a);for(let l in a)l!=="lang"&&Je(n,l,a[l]);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&o[l]&&typeof o[l]=="object"&&!Array.isArray(o[l])){for(let u in f)o[l][u]=f[u];Je(n,l,o[l])}}if(s&&i){let l=s.querySelectorAll("[data-key]");for(let f of l){let u=f.ref;if(!u)continue;let d=u.__ref?.__exec?.text;if(typeof d=="string"&&d.includes("{{"))try{ND(u,f,u.call("replaceLiteralsWithObjectFields",d,u.state))}catch{}}}}async function Pc(t,e,n){let r=this?.context,o=r?.polyglot,s=this?.state?.root||r?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=n),o?.translations?.[e]&&(o.translations[e][t]=n),o?.fetch&&v(o.fetch)){let i=this.getDB||(()=>r.fetch),a=O(i)?await i.call(this):r.fetch;if(!a)return;let c=o.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:n}});if(l?.error)throw l.error;return l.data}}async function Ju(){let t=this?.context,e=t?.polyglot;if(!e)return;let n=this?.state?.root||t?.state?.root;if(!n)return;let r=e.storageLangKey||rE,s=Is.get(r)||ur.call(this),i=t?.document||globalThis.document;i?.documentElement&&(i.documentElement.lang=s),n.update&&n.lang!==s&&n.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function Dc(t){try{let e=ur.call(this),n=this?.state;if(!n)return"";let r=t.lastIndexOf(".");if(r===-1)return n[t+e]??"";let o=t.substring(0,r).split("."),s=n;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(r+1)+e]??""}catch{return""}}var $s={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Ju.call(t))}},jD=$s;Zi();var u_={};$(u_,{SYSTEM_METRICS:()=>Lc,capsizeHandler:()=>f_,capsizePlugin:()=>td,computeCapsize:()=>oE,default:()=>BD,resolveFontSizePx:()=>sE,resolveMetrics:()=>iE});var Lc={arial:{capHeight:716,ascent:1854,descent:-434,lineGap:67,unitsPerEm:2048},helvetica:{capHeight:714,ascent:770,descent:-230,lineGap:0,unitsPerEm:1e3},"helvetica neue":{capHeight:714,ascent:952,descent:-213,lineGap:28,unitsPerEm:1e3},georgia:{capHeight:1419,ascent:1878,descent:-449,lineGap:0,unitsPerEm:2048},"times new roman":{capHeight:1356,ascent:1825,descent:-443,lineGap:87,unitsPerEm:2048},"courier new":{capHeight:1170,ascent:1705,descent:-615,lineGap:0,unitsPerEm:2048},verdana:{capHeight:1489,ascent:2059,descent:-430,lineGap:0,unitsPerEm:2048},roboto:{capHeight:1456,ascent:1900,descent:-500,lineGap:0,unitsPerEm:2048},"open sans":{capHeight:1462,ascent:2189,descent:-600,lineGap:0,unitsPerEm:2048},inter:{capHeight:1490,ascent:2048,descent:-512,lineGap:0,unitsPerEm:2048},lato:{capHeight:1434,ascent:1974,descent:-426,lineGap:0,unitsPerEm:2e3},"source sans":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans pro":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans 3":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},montserrat:{capHeight:700,ascent:968,descent:-251,lineGap:0,unitsPerEm:1e3},poppins:{capHeight:700,ascent:1050,descent:-350,lineGap:100,unitsPerEm:1e3},raleway:{capHeight:710,ascent:1e3,descent:-250,lineGap:0,unitsPerEm:1e3},"dm sans":{capHeight:700,ascent:992,descent:-312,lineGap:0,unitsPerEm:1e3},nunito:{capHeight:705,ascent:1011,descent:-353,lineGap:0,unitsPerEm:1e3},"work sans":{capHeight:684,ascent:930,descent:-243,lineGap:0,unitsPerEm:1e3},manrope:{capHeight:708,ascent:980,descent:-300,lineGap:0,unitsPerEm:1e3},"ibm plex sans":{capHeight:698,ascent:1025,descent:-275,lineGap:0,unitsPerEm:1e3},"plus jakarta sans":{capHeight:720,ascent:1060,descent:-300,lineGap:0,unitsPerEm:1e3}},Qu=t=>parseFloat(t.toFixed(4)),oE=(t,e,n)=>{let{ascent:r,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=r+c+s,f=n!==void 0?n:l/i*t,u=f/t,d=l/i,h=(r-a+s/2)/i-(u-d)/2,p=(c+s/2)/i-(u-d)/2;return{fontSize:`${Qu(t/16)}rem`,lineHeight:`${Qu(f)}px`,capHeightTrim:`${Qu(-h)}em`,baselineTrim:`${Qu(-p)}em`}},sE=(t,e)=>{if(typeof t=="number")return t;let n=e?.designSystem;if(!n)return null;let{typography:r}=n;if(r?.sequence){let s=String(t).toUpperCase(),i=r.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(n.typography?.browserDefault||16):o},iE=(t,e)=>{let r=e?.designSystem?.font_family||{};if(t){let s=r[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(Lc[i])return Lc[i]}let o=r.default||Object.keys(r)[0];if(o){let s=r[o];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(Lc[a])return Lc[a]}}return null},f_=(t,e,n,r)=>{if(!t)return;let o=sE(e.fontSize,r);if(!o)return;let s=iE(e.fontFamily,r);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=oE(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},td={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},BD=td;var b_={};$(b_,{PRESERVE_VALUE_KEYS:()=>jt,SKIP_INLINE_KEYS:()=>dr,abbrToProp:()=>Nt,decode:()=>uE,encode:()=>cE,expand:()=>so,isComponentKey:()=>ze,isSelectorKey:()=>He,parse:()=>io,parseFurther:()=>co,propToAbbr:()=>Pe,shorten:()=>Ic,shorthandPlugin:()=>$c,stringify:()=>oo,stringifyFurther:()=>ao});var Pe={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Nt=Object.create(null);for(let t in Pe)Nt[Pe[t]]=t;var d_=Object.create(null);for(let t in Pe){let e=Pe[t];if(d_[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${d_[e]}"`);d_[e]=t}var jt=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),dr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function ze(t){return/^[A-Z]/.test(t)}function He(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function cE(t){if(!t||typeof t!="object")return"";let e=[];for(let n in t){let r=t[n];if(typeof r=="function"||r!==null&&typeof r=="object"&&!Array.isArray(r)||r===void 0)continue;let o=Pe[n]||n;if(r===!0)e.push(o);else if(r===!1)e.push("!"+o);else if(Array.isArray(r)){let s=r.map(i=>ed(i));e.push(o+":"+s.join(","))}else e.push(o+":"+ed(r))}return e.join(" ")}function ed(t){return String(t).replace(/ /g,"_")}function Ic(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Ic(n):n});let e={};for(let n in t){let r=t[n];if(ze(n)){e[n]=p_(r);continue}if(He(n)){e[n]=p_(r);continue}let o=Pe[n]||n;if(jt.has(n)||jt.has(o)){e[o]=r;continue}e[o]=p_(r)}return e}function p_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ic(e):e}):typeof t=="object"?Ic(t):t}function oo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?oo(r):r});let e={},n=[];for(let r in t){let o=t[r];if(ze(r)){e[r]=aE(o);continue}if(He(r)){e[r]=aE(o);continue}let s=Pe[r]||r;if(jt.has(r)||jt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(dr.has(r)||dr.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?oo(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(ed).join(","));continue}if(typeof o=="object"){e[s]=oo(o);continue}o===!0?n.push(s):o===!1?n.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:n.push(s+":"+ed(o))}return n.length&&(e.in=n.join(" ")),e}function aE(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?oo(e):e}):typeof t=="object"?oo(t):t}function uE(t){if(!t||typeof t!="string")return{};let e={},n=dE(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=Nt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=Nt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Nt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(lE);continue}e[a]=lE(i)}return e}function dE(t){return t.trim().split(/\s+/).filter(Boolean)}function lE(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function fE(t){return t.replace(/_/g," ")}function VD(t){if(!t||typeof t!="string")return{};let e={},n=dE(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=Nt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=Nt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Nt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(fE);continue}e[a]=fE(i)}return e}function so(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?so(n):n});let e={};for(let n in t){let r=t[n];if(ze(n)){e[n]=h_(r);continue}let o=Nt[n]||n;if(He(n)&&o===n){e[n]=h_(r);continue}if(jt.has(o)||jt.has(n)){e[o]=r;continue}e[o]=h_(r)}return e}function h_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?so(e):e}):typeof t=="object"?so(t):t}function io(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?io(n):n});let e={};if(typeof t.in=="string"){let n=VD(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(ze(n)){e[n]=g_(r);continue}let o=Nt[n]||n;if(He(n)&&o===n){e[n]=g_(r);continue}if(jt.has(o)||jt.has(n)){e[o]=r;continue}e[o]=g_(r)}return e}function g_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?io(e):e}):typeof t=="object"?io(t):t}function pE(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function UD(t){let e="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){let r=t[n+1];if(r===","||r==="_"||r==="\\"){e+=r,n+=2;continue}}t[n]==="_"?e+=" ":e+=t[n],n++}return e}function zD(t){let e=[],n="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){n+=t[r]+t[r+1],r+=2;continue}if(t[r]===","){e.push(n),n="",r++;continue}n+=t[r],r++}return e.push(n),e}function hE(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);return e.length===1&&e[0]==="in"&&typeof t.in=="string"}function ao(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?ao(r):r});let e={},n=[];for(let r in t){let o=t[r];if(ze(r)){let i=gE(o);e[r]=hE(i)?i.in:i;continue}if(He(r)){let i=gE(o);e[r]=hE(i)?i.in:i;continue}let s=Pe[r]||r;if(jt.has(r)||jt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(dr.has(r)||dr.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?ao(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(pE).join(","));continue}if(typeof o=="object"){e[s]=ao(o);continue}if(o===!0){n.push(s);continue}if(o===!1){n.push("!"+s);continue}if(typeof o=="number"){n.push(s+":#"+o);continue}n.push(s+":"+pE(o))}return n.length&&(e.in=n.join(" ")),e}function gE(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?ao(e):e}):typeof t=="object"?ao(t):t}function mE(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):UD(t)}function m_(t){if(!t||typeof t!="string")return{};let e={},n=t.trim().split(/\s+/).filter(Boolean);for(let r of n){if(r.startsWith("!")){let l=r.slice(1),f=Nt[l]||l;e[f]=!1;continue}let o=r.indexOf(":");if(o===-1){let l=Nt[r]||r;e[l]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Nt[s]||s,c=zD(i);if(c.length>1){e[a]=c.map(mE);continue}e[a]=mE(i)}return e}function co(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?co(n):n});let e={};if(typeof t.in=="string"){let n=m_(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(ze(n)){typeof r=="string"?e[n]=m_(r):e[n]=y_(r);continue}let o=Nt[n]||n;if(He(n)&&o===n){typeof r=="string"?e[n]=m_(r):e[n]=y_(r);continue}if(jt.has(o)||jt.has(n)){e[o]=r;continue}e[o]=y_(r)}return e}function y_(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?co(e):e}):typeof t=="object"?co(t):t}var HD={shorten:so,stringify:io,stringifyFurther:co};function WD(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>e(r));let n={};for(let r in t){let o=t[r];n[r]=o&&typeof o=="object"?e(o):o}return n}var qD=["components","pages","snippets"],$c={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let r=HD[e===!0?"shorten":e];if(r){for(let o of qD)t[o]&&(t[o]=WD(t[o],r));t.app&&typeof t.app=="object"&&(t.app=r(t.app))}}};var R_={};$(R_,{LEVELS:()=>Mc,analyzePlugin:()=>Fs,attachBrowserListeners:()=>fd,attachNetworkListeners:()=>Nc,classifyEvent:()=>C_,createAnalyzeState:()=>ud,createBeaconSink:()=>T_,createConsoleSink:()=>E_,createDedupe:()=>S_,createEnrich:()=>x_,createMemorySink:()=>A_,createPipeline:()=>sd,createRedact:()=>od,createRemoteSink:()=>ad,createSample:()=>k_,createSummarize:()=>w_,default:()=>Fs,emitFetchEvent:()=>vE,makeEvent:()=>J,meetsLevel:()=>nd,normalizeLevel:()=>Fc,resolveSinks:()=>ld,summarizeElement:()=>lo});var KD=0,GD=()=>`${Date.now().toString(36)}-${(KD++).toString(36)}`,J=(t,e,n={})=>({id:GD(),ts:Date.now(),type:t,level:e,...n}),YD=t=>{let e=[],n=t,r=0;for(;n&&r<32;)n.key!=null&&e.unshift(String(n.key)),n=n.parent,r++;return e.join(" > ")},lo=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:YD(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Ms=t=>t?.context?.analyze,XD={init:{category:"lifecycle",type:"lifecycle",level:"debug"},create:{category:"lifecycle",type:"lifecycle",level:"debug"},render:{category:"lifecycle",type:"lifecycle",level:"debug"},beforeRemove:{category:"lifecycle",type:"lifecycle",level:"debug"},remove:{category:"lifecycle",type:"lifecycle",level:"debug"}},ZD=(t,{category:e,type:n,level:r})=>o=>{let s=Ms(o);!s||!s.shouldCapture(e)||s.emit(J(n,r,{hook:t,element:lo(o)}))},yE=t=>(e,n)=>{let r=Ms(e);!r||!r.shouldCapture("state")||r.emit(J("state","debug",{hook:t,element:lo(e),changedKeys:n?.changedKeys||null}))},Fs={name:"analyze",error(t,e){let n=Ms(t);if(!n||n.config.enabled===!1||!n.shouldCapture("errors"))return;let r=e?.error||e?.err||(e instanceof Error?e:null);n.emit(J("error","error",{hook:e?.hook||"error",element:lo(t),error:r,message:r?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Ms(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(J("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Ms(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Ms(t);if(!e||!e.shouldCapture("updates"))return;let n=null;t.__ref?.__analyzeUpdateStart!=null&&(n=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(J("update","debug",{hook:"update",element:lo(t),durationMs:n}))},beforeStateUpdate:yE("beforeStateUpdate"),stateUpdate:yE("stateUpdate")};for(let[t,e]of Object.entries(XD))Fs[t]=ZD(t,e);D();var Mc={error:0,warn:1,info:2,debug:3,trace:4};var nd=(t,e)=>{let n=Mc[t],r=Mc[e];return n==null||r==null?!0:n<=r},Fc=t=>Mc[t]!=null?t:"warn";D();var rd=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var JD=(t,e)=>{for(let n of e)if(n instanceof RegExp){if(n.test(t))return!0}else if(typeof n=="string"&&t.toLowerCase().includes(n.toLowerCase()))return!0;return!1},QD=(t,e)=>{if(e!=="redact"){if(e==="hash"){let n=0,r=String(t);for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},__=(t,e,n,r)=>{if(r>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>__(s,e,n,r+1));let o={};for(let s of Object.keys(t))if(JD(s,e)||rd.test(s)){let a=QD(t[s],n);a!==void 0&&(o[s]=a)}else o[s]=__(t[s],e,n,r+1);return o},od=(t=[],e="mask")=>{let n=Array.isArray(t)?t:[t];return r=>{if(!r)return r;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}=r,g=__(p,n,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}}};var x_=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,n=typeof navigator<"u"?navigator.userAgent:null,r=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=C,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:r,route:i},meta:{ua:n,viewport:c}}}},w_=()=>t=>{if(!t)return t;if(t.element&&typeof t.element=="object"){let e=t.element;(e.node||e.parent||e.__ref)&&(t={...t,element:{key:e.key!=null?String(e.key):null,name:e.__name||e.name||null,tag:e.tag||null,component:e.component||null}})}return t.error instanceof Error&&(t={...t,error:{name:t.error.name,message:t.error.message,stack:t.error.stack}}),t},S_=(t=1e3,e=500)=>{let n=new Map;return r=>{if(!r)return r;let o=`${r.type}:${r.level}:${r.message||""}:${r.error?.message||""}`,s=n.get(o),i=r.ts||Date.now();if(s&&i-s<t)return null;if(n.set(o,i),n.size>e){let a=Math.ceil(e/10),c=0;for(let l of n.keys()){if(c++>=a)break;n.delete(l)}}return r}},k_=t=>e=>{if(!e)return e;let n=t[e.type];return n==null||n>=1?e:Math.random()>n?null:e},bE={redact:t=>od(t.config.redact||[],t.config.maskStrategy),enrich:t=>x_(t),summarize:()=>w_(),dedupe:t=>S_(t.config.cache?.dedupeWindowMs||1e3),sample:t=>k_(t.config.sample||{})},tL=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=bE[t];return n?n(e):null}return null},sd=t=>{let e=t.config,n=Array.isArray(e.transformers)?e.transformers.slice():[],r=n.findIndex(s=>s==="redact");r>=0&&n.splice(r,1);let o=[];e.redact!==!1&&o.push(bE.redact(t));for(let s of n){let i=tL(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,h=!1;for(let p of l)if(d=p(d),d==null){h=!0;break}!h&&d!=null&&f.push(d)}return f}i=c}return i}};D();D();var id=typeof C<"u"&&typeof C.document<"u",eL=5e3,nL=50,rL=3,oL=1500,sL=1e3,C_=t=>t?t.level==="error"||t.type==="error"?"bug":t.type==="network"?"network":t.type==="console"?t.level==="error"||t.level==="warn"?"bug":"log":t.level==="warn"?"bug":t.level==="info"?"log":"verbose":"verbose",iL=t=>{try{return JSON.stringify(t)}catch{return null}},aL=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},cL=t=>{if(!t)return null;let e=String(t),n;return(n=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:n[1]}:(n=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:n[1]}:(n=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:n[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(n=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:n[1]}):(n=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:n[1]}:{name:null,version:null}},lL=()=>{if(!id)return null;try{let t=C.document?.documentElement?.getAttribute("data-theme")||null,e=typeof C.matchMedia=="function"?C.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},fL=()=>{if(!id)return null;let t=C.location,e=typeof navigator<"u"?navigator:null,n=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:C.document?.referrer||null,title:C.document?.title||null,ua:e?.userAgent||null,browser:cL(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:aL(),viewport:C.innerWidth?{w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}:null,screen:n?{w:n.width||null,h:n.height||null,availW:n.availWidth||null,availH:n.availHeight||null,colorDepth:n.colorDepth||null,orientation:n.orientation?.type||null}:null,theme:lL()}},ad=(t={})=>{let e=t.url,n=typeof t.transport=="function"?t.transport:null,r=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!n)return()=>{};let o=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:C_,h=typeof t.beforeSend=="function"?t.beforeSend:null,p=t.debug===!0,g=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:eL,y=t.maxBatch||nL,x=t.maxRetries!=null?t.maxRetries:rL,b=t.backoffMs||oL,_=t.queueLimit||sL,w=t.sampleRate!=null?t.sampleRate:1,S=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,A=t.sessionId||S(),P=[],L=[],E=null,M=null,X=()=>{E||!P.length||(E=setTimeout(N,m))},vt=F=>{if(M)return;let q=b*Math.pow(2,Math.max(0,F-1));M=setTimeout(()=>{if(M=null,!L.length)return;let yt=L.shift();at(yt.envelope,yt.attempt)},q)},Ct=(F,q=!1)=>{let yt=u?v_(u):null,Z={id:A,sentAt:Date.now()};q&&(Z.endedAt=Date.now());let Y={v:1,session:Z,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:fL(),user:yt?.user||null,traits:yt?.traits||null,tags:yt?.tags||null,events:F};if((g?v_(g)===!0:p)&&(Y.app.debug=!0),h)try{return h(Y)||null}catch{return Y}return Y},at=async(F,q=1)=>{if(F)try{let yt=!0;if(n){let Z=await n(F);yt=Z!==!1&&Z?.ok!==!1}else yt=await uL(e,F,{apiKey:o,getAuth:f});!yt&&q<x&&(L.push({envelope:F,attempt:q+1}),vt(q+1))}catch{q<x&&(L.push({envelope:F,attempt:q+1}),vt(q+1))}},N=(F=!1,q=!1)=>{if(E&&(clearTimeout(E),E=null),!P.length&&!q)return;let yt=P;P=[];let Z=Ct(yt,q);if(Z){if(F&&id){if(typeof r=="function"&&v_(()=>r(Z)))return;if(navigator.sendBeacon&&e){let Y=iL(Z);if(Y)try{navigator.sendBeacon(e,new C.Blob([Y],{type:"application/json"}));return}catch{}}}at(Z)}},H=!1,mt=()=>{H||(H=!0,N(!0,!0))};id&&(C.addEventListener("pagehide",mt,{passive:!0}),C.addEventListener("beforeunload",mt,{passive:!0}),C.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&N(!0)},{passive:!0}));let B=F=>{if(!F||w<1&&Math.random()>w)return;H&&(H=!1);let q={...F,log_type:d(F)};P.push(q),P.length>_&&(P=P.slice(-_)),P.length>=y?N():X()},gt=F=>(N(!1,!0),A=F||S(),H=!1,B.sessionId=A,A);return B.flush=()=>N(!1),B.endSession=mt,B.startNewSession=gt,B.sessionId=A,B},v_=t=>{try{return t()}catch{return null}},uL=async(t,e,{apiKey:n,getAuth:r})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(n&&(o["X-Analyze-Key"]=n),r)try{let s=await r();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var dL={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},pL="\x1B[0m",cd=typeof C<"u"&&typeof C.document<"u",E_=(t={})=>{let e=t.minLevel||null,n=console.error.bind(console),r=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?n:s.level==="warn"?r:o,a=`[analyze:${s.type}]`;if(cd)i(a,s);else{let c=dL[s.level]||"";i(`${c}${a}${pL}`,s)}}},A_=(t,e={})=>{let n=e.max||t.config.cache?.max||500,r=new Array(n),o=0,s=0,i=a=>{r[o]=a,o=(o+1)%n,s<n&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+n)%n;for(let l=0;l<s;l++)a[l]=r[(c+l)%n];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{o=0,s=0}},i},T_=(t={})=>{let e=t.url,n=t.batchMs!=null?t.batchMs:5e3,r=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=cd?new C.Blob([c],{type:"application/json"}):c;if(cd&&navigator.sendBeacon)try{navigator.sendBeacon(e,l);return}catch{}typeof fetch<"u"&&fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-Analyze-Beacon":"1"},body:c,keepalive:!0}).catch(()=>{})};cd&&(C.addEventListener("pagehide",i,{passive:!0}),C.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=r?i():s||(s=setTimeout(i,n)))};return a.flush=i,a},_E={console:E_,memory:A_,beacon:T_,remote:ad},xE=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},ld=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],n=[];for(let r of e)if(typeof r=="function")n.push(r);else if(typeof r=="string"){let o=_E[r];if(!o)continue;n.push(r==="memory"?o(t,{}):o(r==="remote"?xE(t,{}):{}))}else if(r&&typeof r=="object"&&r.type){let o=_E[r.type];if(!o)continue;n.push(r.type==="memory"?o(t,r):o(r.type==="remote"?xE(t,r):r))}return n};D();var hL=typeof C<"u"&&typeof C.document<"u",gL=new Set(["password","hidden"]),wE=(t,e)=>{let n=0,r=null,o=null;return(...s)=>{let i=Date.now();i-n>=e?(n=i,t(...s)):(o=s,r||(r=setTimeout(()=>{n=Date.now(),r=null,o&&(t(...o),o=null)},e-(i-n))))}},O_="__analyzeKeyPath",Ns=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[O_])return e[O_];let n=[],r=e,o=0,s=null;for(;r&&o<64;){if(r.getAttribute){let a=r.getAttribute("data-key");a&&(s==null&&(s=a),n.unshift(a))}r=r.parentNode,o++}let i;if(n.length)i={selector:null,key:s,path:n.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[O_]=i}catch{}return i},mL=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let n=0,r=String(t||"");for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},yL=t=>!!(!t||t.tagName==="INPUT"&&gL.has(t.type)||rd.test(t.name||"")||rd.test(t.id||"")||t.dataset?.analyze==="skip"),fd=t=>{if(!hL)return;let e=t.config.capture,n=t.config.throttle,r=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),r.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(C,"error",s=>{t.emit(J("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),o(C,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(J("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){o(C,"click",i=>{t.emit(J("pointer","info",{hook:"click",target:Ns(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:SE(i)}))},{passive:!0,capture:!0}),o(C,"dblclick",i=>{t.emit(J("pointer","info",{hook:"dblclick",target:Ns(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(C,"contextmenu",i=>{t.emit(J("pointer","info",{hook:"contextmenu",target:Ns(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=wE(i=>{t.emit(J("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},n.pointermove);o(C,"pointermove",s,{passive:!0})}if(e.keyboard&&o(C,"keydown",s=>{t.emit(J("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:SE(s),target:Ns(s)}))},{passive:!0,capture:!0}),e.forms){let s=i=>{let a=i.target;if(!a||!a.tagName||!["INPUT","TEXTAREA","SELECT"].includes(a.tagName))return;let l=yL(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=mL(a.value,t.config.maskStrategy)),t.emit(J("forms","info",{hook:i.type,target:Ns(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(C,"input",s,{passive:!0,capture:!0}),o(C,"change",s,{passive:!0,capture:!0}),o(C,"submit",i=>{t.emit(J("forms","info",{hook:"submit",target:Ns(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=wE(()=>{t.emit(J("scroll","trace",{hook:"scroll",x:C.scrollX,y:C.scrollY}))},n.scroll);o(C,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Ei(()=>{t.emit(J("viewport","info",{hook:"resize",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))},n.resize);o(C,"resize",s,{passive:!0}),o(C,"orientationchange",()=>{t.emit(J("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(C.document,"visibilitychange",()=>{t.emit(J("viewport","info",{hook:"visibilitychange",hidden:C.document.hidden}))},{passive:!0}),t.emit(J("viewport","info",{hook:"initial",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(J("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(kE)}))}catch{}return i.apply(console,a)},r.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(J("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}r.push(()=>s.disconnect())}catch{}},SE=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),bL=t=>{let e={name:t.name||"Error",message:typeof t.message=="string"?t.message:String(t),stack:typeof t.stack=="string"?t.stack:null};return t.cause!==void 0&&(e.cause=kE(t.cause)),e},kE=t=>{if(t==null)return t;if(t instanceof Error)return bL(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};D();var _L=typeof C<"u"&&typeof C.document<"u",vE=(t,e)=>{let n=t?.analyze;if(!n||!n.shouldCapture("network"))return;let r=e.phase==="error"?"error":"info";n.emit(J("network",r,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Nc=t=>{if(_L&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof C.fetch=="function"){let e=C.fetch.bind(C),n=function(r,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(r,o);let s=typeof r=="string"?r:r&&r.url||"",i=(o?.method||typeof r=="object"&&r?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(J("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(r,o).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(J("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(J("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};C.fetch=n,t.__teardown.push(()=>{C.fetch=e})}if(typeof C.XMLHttpRequest=="function"){let e=C.XMLHttpRequest,n=e.prototype.open,r=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},n.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return r.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(J("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(J("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(J("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),r.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=n,e.prototype.send=r})}}};var xL={errors:!0,warnings:!0,pointer:!1,keyboard:!1,forms:!1,scroll:!1,viewport:!1,network:!1,performance:!1,navigation:!1,console:!1,lifecycle:!1,state:!1,updates:!1,replay:!1,telemetry:!1},wL={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},SL={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},kL={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},vL=t=>{let e={...xL,...t};return e.replay&&Object.assign(e,wL),e.telemetry&&Object.assign(e,SL),e.remote&&Object.assign(e,kL),Object.assign(e,t),e},CL=64,EL=()=>{if(typeof C>"u"||!C.location)return null;try{let e=new URLSearchParams(C.location.search).get("analyze");return e||null}catch{return null}},ud=(t={})=>{let e=t===!0?{}:{...t};e.capture=vL(e.capture||{});let n=EL();(n==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),n==="off"&&(e.enabled=!1),e.level=Fc(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let r={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{r.__pipeline||(r.__pipeline=sd(r),r.__sinks=ld(r))};return r.shouldCapture=s=>r.config.enabled===!1?!1:!!r.config.capture[s],r.emit=s=>{if(s&&r.config.enabled!==!1&&!r.__paused&&nd(s.level,r.config.level)){if(!r.__ready){if(s.level!=="error"&&!r.config.captureDuringHydration)return;r.__preBuffer.length<CL&&r.__preBuffer.push(s);return}o(),CE(r,s)}},r.activate=s=>{if(r.context==null&&(r.context=s||null),r.__ready)return;r.__ready=!0;let i=r.__preBuffer;if(r.__preBuffer=[],i.length){o();for(let a of i)CE(r,a)}try{fd(r)}catch(a){console.error("[analyze] browser attach error:",a)}try{Nc(r)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of r.__onActivate||[])try{a(r)}catch(c){console.error("[analyze] onActivate error:",c)}},r.pause=()=>{r.__paused=!0},r.resume=()=>{r.__paused=!1},r.setLevel=s=>{r.config.level=Fc(s)},r.setCapture=(s,i)=>{if(r.config.capture[s]=!!i,s==="network"&&i&&r.__ready)try{Nc(r)}catch(a){console.error("[analyze] network attach error:",a)}},r.query=s=>r.__memory?r.__memory.query(s):[],r.snapshot=()=>r.__memory?r.__memory.snapshot():[],r.emitNetwork=s=>{if(!r.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},r.flush=()=>{if(r.__sinks)for(let s of r.__sinks)typeof s.flush=="function"&&s.flush()},r.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(r.config.sinks)?r.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(r.__sinks)for(let c of r.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},r.replay=()=>({initialSnapshot:r.__initialSnapshot,events:r.snapshot()}),r.destroy=()=>{for(let s of r.__teardown)try{s()}catch{}r.__teardown=[],r.__ready=!1,r.__paused=!0},r.__onActivate=[],r.onActivate=s=>{r.__onActivate.push(s)},r},CE=(t,e)=>{let n=t.__pipeline(e);if(n==null)return;let r=Array.isArray(n)?n:[n];for(let o of r){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var L_={};$(L_,{Inspect:()=>dd,inspectPlugin:()=>D_});D();function EE(t){return k(t)?t:R(t)?t.find(e=>k(e)):""}function P_(t){if(!t)return;let e=t.__ref.__componentKey,n=t.extends&&EE(t.extends),r=t.parent&&t.parent.childExtends&&EE(t.parent.childExtends);return(e||n||r||"").split("_")[0].split(".")[0].split("+")[0]}function pd(t){if(!t||!t.__ref)return;let{components:e,pages:n,editor:r}=t.context,o=P_(t);return r&&r.onInitInspect&&!r.onInitInspect(o,t,t.state)?pd(t.parent):o&&(e[o]||n[o])?t:pd(t.parent)}var AL=(t,e,n)=>{let r=n.window||window;r.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},r.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},dd={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:AL,onMousemove:(t,e,n)=>{let r=t.target.ref,o=pd(r),s=e.Inspector.state;if(!o||!n.debugging||!o.__ref)return s.update({area:!1});let i=P_(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),h={x:l,y:f,width:u,height:d};if(!s.area)return a(h);s.area.x!==h.x&&a(h)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,n)=>{if(!n.debugging)return;let r=t.target.ref,o=pd(r);if(!o)return;let s=P_(o);if(!s)return;let i=r.context.editor;if(i&&i.onInspect)return i.onInspect(s,r,r.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return r.context.socket?.emit&&r.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(v(e)){let{Content:n,...r}=e;for(let o in r)Ts[o]||(r[o].__ref||(r[o].__ref={}),r[o].__ref.__componentKey||(r[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,n)=>{let{area:r}=n,o=n.area&&n.parent.debugging,s;if(!o)s="display: none !important";else if(r){let{x:i,y:a,width:c,height:l}=r;s=`
91
91
  display: block !important;
92
92
  top: ${a-6}px;
93
93
  left: ${i-6}px;
94
94
  width: ${c+12}px;
95
95
  height: ${l+12}px;
96
- `}return e.node.style=s,e.Span.node.innerText=n.focusKey,!1}}},P_={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(dd):t.extends?t.extends=[t.extends,dd]:t.extends=[dd]}};var L_={};$(L_,{apiUrl:()=>I_,channelByApiUrl:()=>RI,channelNames:()=>TI,channels:()=>ae,currentChannel:()=>pr,defaultChannel:()=>NI,deployTarget:()=>$I,isKnownChannel:()=>FI,mermaidUrl:()=>LI,normalizeOwnerSegment:()=>jI,normalizeProjectKey:()=>VI,normalizeProjectSlug:()=>BI,parseSymboLsHost:()=>UI,previewProjectUrl:()=>II,previewUrl:()=>O1,resolveChannel:()=>fo,screenshotCdnHost:()=>R1,screenshotCdnUrl:()=>MI,setChannel:()=>OI,shellUrl:()=>DI,socketUrl:()=>PI});var ae={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var TI=Object.keys(ae.channels),Tn=t=>!!(t&&ae.channels[t]),fo=t=>Tn(t)?ae.channels[t]:ae.channels[ae.defaultChannel],OI=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=Tn(t)?t:null,js=void 0)},js,jc=t=>typeof process<"u"&&process.env&&process.env[t]||null,pr=()=>{if(js!==void 0)return js;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=jc("SYMBOLS_CHANNEL"),n=jc("NODE_ENV");return js=Tn(t)&&t||Tn(e)&&e||Tn(n)&&n||ae.defaultChannel,js===ae.defaultChannel&&!Tn(t)&&!Tn(e)&&!Tn(n)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${n||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${ae.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),js},E1=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],A1=t=>{let e=E1.indexOf(t);return e===-1?E1.length:e},RI=t=>{if(!t)return null;let e=Object.keys(ae.channels).filter(n=>ae.channels[n].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((n,r)=>A1(n)-A1(r))[0]},I_=(t=pr())=>jc("SYMBOLS_API_URL")||fo(t).api,PI=(t=pr())=>jc("SYMBOLS_SOCKET_URL")||fo(t).socket,DI=(t=pr())=>fo(t).shell||null,O1=(t=pr())=>fo(t).preview||null,II=({owner:t,key:e,env:n="production"}={},r=pr())=>{let o=O1(r);if(!o||!t||!e)return null;let s=o.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!n||n==="production"||n==="prod"?l:`${l}?env=${encodeURIComponent(n)}`},LI=({owner:t,key:e,env:n="production"}={},r=pr())=>{let o=fo(r).mermaidApex;if(!o||!t||!e)return null;let i=!n||n==="production"||n==="prod"?"":`--${encodeURIComponent(n)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},$I=(t=pr())=>fo(t).deploy||{},R1=()=>jc("SYMBOLS_SCREENSHOT_CDN")||ae.screenshotCdn,MI=({owner:t,key:e,page:n="root",componentKey:r,env:o="production",width:s}={})=>{if(!t||!e)return null;let i=r?`component/${encodeURIComponent(r)}`:encodeURIComponent(String(n||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];o&&o!=="production"&&a.push(`env=${encodeURIComponent(o)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${R1()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},FI=Tn,NI=ae.defaultChannel,jI=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",BI=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",VI=(t,e={})=>{let n=String(t||"").trim();if(!n)return"";/\.symbo\.ls$/iu.test(n)&&(n=n.replace(/\.symbo\.ls$/iu,"")),n.includes("/")&&(n=n.split("/").pop());let r=typeof e.owner=="string"?e.owner.trim():"";return r&&n.startsWith(`${r}--`)?n=n.slice(r.length+2):!r&&n.includes("--")&&(n=n.slice(n.indexOf("--")+2)),n},T1={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},UI=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let n=e.split(".");if(n.length<4||n.slice(-2).join(".")!=="symbo.ls")return null;if(n.length===4){let s=n[1],i=n[0],a=T1[s];if(a&&i.includes("--")){let c=i.split("--");if(c.length===2||c.length===3){let[l,f,u]=c;if(l&&f){let d=u?T1[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(n.length>=5)return{projectKey:n[1],owner:n[2],env:n[0]};let r=n[1],o=n[0];if(o.includes("--")){let[s,i]=o.split("--",2);return!s||!i?null:{projectKey:s,owner:r,env:i}}return{projectKey:o,owner:r,env:"production"}};var F_={};$(F_,{BUILD_DOMQL_SYSTEM_PROMPT:()=>U1,DEFAULT_MAX_TOKENS:()=>_d,DEFAULT_MODEL:()=>hr,DEFAULT_PROVIDER:()=>Uc,DEFAULT_TEMPERATURE:()=>bd,MODEL_TIER_ALIASES:()=>M_,PROVIDER_MODELS:()=>Vc,SIMONE_BASE_URL:()=>Bc,SIMONE_CHAT_PATH:()=>hd,SIMONE_CODE_PATH:()=>gd,SIMONE_CODE_SYMBOLS_PATH:()=>md,SIMONE_HEALTH_PATH:()=>yd,SIMONE_TOOLS_PATH:()=>P1,WORKSPACE_SYSTEM_PROMPT:()=>V1,buildMessages:()=>M1,chat:()=>zc,health:()=>$1,parseSimoneResponse:()=>j1,resolveModel:()=>z1,streamChat:()=>zc,streamCode:()=>I1,streamCodeSymbols:()=>L1,toLegacyEnvelope:()=>B1});var Bc="https://symbols-service-production.up.railway.app",hd="/api/chat",gd="/api/code",md="/api/code-symbols",yd="/api/health",P1="/api/tools",Vc={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-2.5-pro","gemini-3.1-pro-preview"]},Uc="gemini",hr=Vc[Uc][0],bd=.7,_d=4096;function zI(t){if(!t)return null;for(let[e,n]of Object.entries(Vc))if(n.includes(t))return e;return null}function D1(t,e){return t?t.replace(/\/$/,"")+e:e}function HI(t){if(!t.startsWith("data: "))return null;let e=t.slice(6);if(e==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(e)}}catch{return{raw:e}}}async function zc(t,e={},n){let{baseUrl:r=Bc,path:o=hd,model:s=hr,provider:i=zI(s)||Uc,temperature:a=bd,maxTokens:c=_d,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let h={messages:t,provider:i,model:s,temperature:a,maxTokens:c};l&&(h.effort=l),f&&(h.apiKeys=f);let p=await fetch(D1(r,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!p.ok){let _=p.statusText;try{let k=await p.text();try{let A=JSON.parse(k);_=A.error||A.detail||_}catch{_=k||_}}catch{}let w=new Error(`simone: HTTP ${p.status} \u2014 ${_}`);throw w.status=p.status,w}if(!p.body||typeof p.body.getReader!="function"){let _=await p.text();return n&&n(_),{text:_,errors:[]}}let g=p.body.getReader(),m=new TextDecoder,y=[],x=[],b="";try{for(;;){let{done:_,value:w}=await g.read();if(_)break;b+=m.decode(w,{stream:!0});let k=b.indexOf(`
97
- `);for(;k!==-1;){let A=b.slice(0,k).trim();if(b=b.slice(k+1),A){let P=HI(A);if(P?.done)return{text:y.join(""),errors:x};let I=P?.chunk;I?.delta&&(y.push(I.delta),n&&n(I.delta)),I?.error&&x.push(I.error)}k=b.indexOf(`
98
- `)}}return{text:y.join(""),errors:x}}finally{g.cancel().catch(()=>{})}}function I1(t,e={},n){return zc(t,{...e,path:gd},n)}function L1(t,e={},n){return zc(t,{...e,path:md},n)}async function $1(t={}){let{baseUrl:e=Bc,signal:n,headers:r}=t,o=await fetch(D1(e,yd),{method:"GET",headers:r,signal:n});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function M1({system:t,history:e=[],user:n,context:r}){let o=[];t&&o.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||o.push({role:s.role,content:s.content});if(n){let s=n;if(r!=null){let i=typeof r=="string"?r:JSON.stringify(r,null,2);s=`${s}
96
+ `}return e.node.style=s,e.Span.node.innerText=n.focusKey,!1}}},D_={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(dd):t.extends?t.extends=[t.extends,dd]:t.extends=[dd]}};var $_={};$($_,{apiUrl:()=>I_,channelByApiUrl:()=>PL,channelNames:()=>OL,channels:()=>ae,currentChannel:()=>pr,defaultChannel:()=>jL,deployTarget:()=>ML,isKnownChannel:()=>NL,mermaidUrl:()=>$L,normalizeOwnerSegment:()=>BL,normalizeProjectKey:()=>UL,normalizeProjectSlug:()=>VL,parseSymboLsHost:()=>zL,previewProjectUrl:()=>IL,previewUrl:()=>RE,resolveChannel:()=>fo,screenshotCdnHost:()=>PE,screenshotCdnUrl:()=>FL,setChannel:()=>RL,shellUrl:()=>LL,socketUrl:()=>DL});var ae={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var OL=Object.keys(ae.channels),Tn=t=>!!(t&&ae.channels[t]),fo=t=>Tn(t)?ae.channels[t]:ae.channels[ae.defaultChannel],RL=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=Tn(t)?t:null,js=void 0)},js,jc=t=>typeof process<"u"&&process.env&&process.env[t]||null,pr=()=>{if(js!==void 0)return js;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=jc("SYMBOLS_CHANNEL"),n=jc("NODE_ENV");return js=Tn(t)&&t||Tn(e)&&e||Tn(n)&&n||ae.defaultChannel,js===ae.defaultChannel&&!Tn(t)&&!Tn(e)&&!Tn(n)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${n||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${ae.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),js},AE=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],TE=t=>{let e=AE.indexOf(t);return e===-1?AE.length:e},PL=t=>{if(!t)return null;let e=Object.keys(ae.channels).filter(n=>ae.channels[n].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((n,r)=>TE(n)-TE(r))[0]},I_=(t=pr())=>jc("SYMBOLS_API_URL")||fo(t).api,DL=(t=pr())=>jc("SYMBOLS_SOCKET_URL")||fo(t).socket,LL=(t=pr())=>fo(t).shell||null,RE=(t=pr())=>fo(t).preview||null,IL=({owner:t,key:e,env:n="production"}={},r=pr())=>{let o=RE(r);if(!o||!t||!e)return null;let s=o.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!n||n==="production"||n==="prod"?l:`${l}?env=${encodeURIComponent(n)}`},$L=({owner:t,key:e,env:n="production"}={},r=pr())=>{let o=fo(r).mermaidApex;if(!o||!t||!e)return null;let i=!n||n==="production"||n==="prod"?"":`--${encodeURIComponent(n)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},ML=(t=pr())=>fo(t).deploy||{},PE=()=>jc("SYMBOLS_SCREENSHOT_CDN")||ae.screenshotCdn,FL=({owner:t,key:e,page:n="root",componentKey:r,env:o="production",width:s}={})=>{if(!t||!e)return null;let i=r?`component/${encodeURIComponent(r)}`:encodeURIComponent(String(n||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];o&&o!=="production"&&a.push(`env=${encodeURIComponent(o)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${PE()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},NL=Tn,jL=ae.defaultChannel,BL=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",VL=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",UL=(t,e={})=>{let n=String(t||"").trim();if(!n)return"";/\.symbo\.ls$/iu.test(n)&&(n=n.replace(/\.symbo\.ls$/iu,"")),n.includes("/")&&(n=n.split("/").pop());let r=typeof e.owner=="string"?e.owner.trim():"";return r&&n.startsWith(`${r}--`)?n=n.slice(r.length+2):!r&&n.includes("--")&&(n=n.slice(n.indexOf("--")+2)),n},OE={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},zL=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let n=e.split(".");if(n.length<4||n.slice(-2).join(".")!=="symbo.ls")return null;if(n.length===4){let s=n[1],i=n[0],a=OE[s];if(a&&i.includes("--")){let c=i.split("--");if(c.length===2||c.length===3){let[l,f,u]=c;if(l&&f){let d=u?OE[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(n.length>=5)return{projectKey:n[1],owner:n[2],env:n[0]};let r=n[1],o=n[0];if(o.includes("--")){let[s,i]=o.split("--",2);return!s||!i?null:{projectKey:s,owner:r,env:i}}return{projectKey:o,owner:r,env:"production"}};var N_={};$(N_,{BUILD_DOMQL_SYSTEM_PROMPT:()=>zE,DEFAULT_MAX_TOKENS:()=>_d,DEFAULT_MODEL:()=>hr,DEFAULT_PROVIDER:()=>Uc,DEFAULT_TEMPERATURE:()=>bd,MODEL_TIER_ALIASES:()=>F_,PROVIDER_MODELS:()=>Vc,SIMONE_BASE_URL:()=>Bc,SIMONE_CHAT_PATH:()=>hd,SIMONE_CODE_PATH:()=>gd,SIMONE_CODE_SYMBOLS_PATH:()=>md,SIMONE_HEALTH_PATH:()=>yd,SIMONE_TOOLS_PATH:()=>DE,WORKSPACE_SYSTEM_PROMPT:()=>UE,buildMessages:()=>FE,chat:()=>zc,health:()=>ME,parseSimoneResponse:()=>BE,resolveModel:()=>HE,streamChat:()=>zc,streamCode:()=>IE,streamCodeSymbols:()=>$E,toLegacyEnvelope:()=>VE});var Bc="https://symbols-service-production.up.railway.app",hd="/api/chat",gd="/api/code",md="/api/code-symbols",yd="/api/health",DE="/api/tools",Vc={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-2.5-pro","gemini-3.1-pro-preview"]},Uc="gemini",hr=Vc[Uc][0],bd=.7,_d=4096;function HL(t){if(!t)return null;for(let[e,n]of Object.entries(Vc))if(n.includes(t))return e;return null}function LE(t,e){return t?t.replace(/\/$/,"")+e:e}function WL(t){if(!t.startsWith("data: "))return null;let e=t.slice(6);if(e==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(e)}}catch{return{raw:e}}}async function zc(t,e={},n){let{baseUrl:r=Bc,path:o=hd,model:s=hr,provider:i=HL(s)||Uc,temperature:a=bd,maxTokens:c=_d,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let h={messages:t,provider:i,model:s,temperature:a,maxTokens:c};l&&(h.effort=l),f&&(h.apiKeys=f);let p=await fetch(LE(r,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!p.ok){let _=p.statusText;try{let S=await p.text();try{let A=JSON.parse(S);_=A.error||A.detail||_}catch{_=S||_}}catch{}let w=new Error(`simone: HTTP ${p.status} \u2014 ${_}`);throw w.status=p.status,w}if(!p.body||typeof p.body.getReader!="function"){let _=await p.text();return n&&n(_),{text:_,errors:[]}}let g=p.body.getReader(),m=new TextDecoder,y=[],x=[],b="";try{for(;;){let{done:_,value:w}=await g.read();if(_)break;b+=m.decode(w,{stream:!0});let S=b.indexOf(`
97
+ `);for(;S!==-1;){let A=b.slice(0,S).trim();if(b=b.slice(S+1),A){let P=WL(A);if(P?.done)return{text:y.join(""),errors:x};let L=P?.chunk;L?.delta&&(y.push(L.delta),n&&n(L.delta)),L?.error&&x.push(L.error)}S=b.indexOf(`
98
+ `)}}return{text:y.join(""),errors:x}}finally{g.cancel().catch(()=>{})}}function IE(t,e={},n){return zc(t,{...e,path:gd},n)}function $E(t,e={},n){return zc(t,{...e,path:md},n)}async function ME(t={}){let{baseUrl:e=Bc,signal:n,headers:r}=t,o=await fetch(LE(e,yd),{method:"GET",headers:r,signal:n});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function FE({system:t,history:e=[],user:n,context:r}){let o=[];t&&o.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||o.push({role:s.role,content:s.content});if(n){let s=n;if(r!=null){let i=typeof r=="string"?r:JSON.stringify(r,null,2);s=`${s}
99
99
 
100
100
  ---
101
101
  Context:
102
102
  \`\`\`json
103
103
  ${i}
104
- \`\`\``}o.push({role:"user",content:s})}return o}var N1=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,WI=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function qI(t){let e=[];for(let n of t.matchAll(N1))e.push({lang:(n.groups?.lang||"").toLowerCase(),code:n.groups?.code??""});return e}function KI(t){return t.replace(N1,"").trim()}function $_(t){if(!t||!/[{[]/.test(t))return null;try{return JSON.parse(t)}catch{}try{return JSON.parse(t.replace(/,\s*([}\]])/g,"$1"))}catch{}return null}function F1(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&WI.has(t.type)}function j1(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let n=qI(e),r=n.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=n.filter(i=>i.lang==="json"),s=KI(e);for(let i of o){let a=$_(i.code);if(F1(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(r.length>0){let i=r[0].code,a=$_("["+i+"]");return Array.isArray(a)&&a.length>1?{kind:"multi",text:s,assets:a,code:i,message:s||`Generated ${a.length} items`}:{kind:"component",text:s,code:i,message:s||"Generated a component"}}if(e.startsWith("{")){let i=$_(e);if(F1(i))return{kind:"asset",text:i.description||"",asset:i,message:i.description||`Generated ${i.type}: ${i.title||i.key||""}`.trim()}}return{kind:"text",text:e,message:e}}function B1(t){if(!t)return{code_response:{type:"error",content:"Empty response from assistant"}};switch(t.kind){case"asset":return{code_response:{type:"json_response",data:t.asset}};case"multi":return{code_response:{type:"symbols_component_code",component_code:t.code}};case"component":return{code_response:{type:"symbols_component_code",component_code:t.code,analysis_text:t.text}};default:return{code_response:{type:"plain_text_response",content:t.text||t.message||""}}}}var V1=["You are Simone, the Symbols.app assistant.","You help users build DOMQL v3 components, pages, and design-system entries.",'When the user asks for a component or page, return a single ```json fenced block whose body is one asset object with shape { type, key, title, description, value }. type is one of "component", "page", "function", "state", "color", "font", "icon", "theme".',"For multiple assets, return one ```js fenced block with comma-separated asset objects.","For general questions, reply with prose only."].join(" "),U1=["You are a DOMQL v3.14 code generator for the Symbols workspace.","Output EXECUTABLE DOMQL v3.14 for the requested page(s)/component(s) \u2014 never a description, never a plan, never an explanation.","Author data-first object schemas: child elements are UPPERCASE keys; styling lives in flat element props (NO attr/props/on wrappers); use design-system tokens (color/typography/spacing keys), never raw px/rem/hex/rgba; `extends` and `childExtends` are quoted strings; event handlers are flat (onClick, onInit) \u2014 never on:{} or props:{} wrappers.","OUTPUT FORMAT \u2014 pick ONE:","- SINGLE page/component: emit exactly one ```js fenced code block whose body is a single DOMQL object literal (an expression \u2014 start with `{`, no `export`, no variable assignment, no surrounding prose).",'- MULTIPLE pages/components: emit exactly one ```json fenced code block whose body is an object of the shape { "pages": { "PageKey": "<DOMQL object-literal source string>" }, "components": { "CompKey": "<DOMQL object-literal source string>" } }. Include only the sections you produce; each value is the DOMQL source for that key.',"Keys are PascalCase. Default to a single page unless the request clearly needs several distinct pages/components.","Emit ONLY the single fenced block. No text before or after it."].join(`
105
- `),M_={Starter:hr,Free:hr,Pro:"claude-opus-4-6"};function z1(t){return t?M_[t]||t:hr}var H1={"@symbo.ls/signal":wp,"@symbo.ls/scratch":ny,"@symbo.ls/element":lb,"@symbo.ls/css":py,"@symbo.ls/utils":Wo,"@symbo.ls/state":qy,"@symbo.ls/router":wc,"@symbo.ls/polyglot":c_,"@symbo.ls/helmet":i_,"@symbo.ls/fetch":af,"@symbo.ls/capsize":f_,"@symbo.ls/shorthand":y_,"@symbo.ls/analyze":O_,"@symbo.ls/inspect":D_,"@symbo.ls/channels":L_,"@symbo-ls/simone-server":F_},W1=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:{}),r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in H1)r[o]||(r[o]=H1[o]);if(e)for(let o in e)r[o]||(r[o]=e[o]);return r},q1=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:null);if(!n||!e||typeof e!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(r,o))continue;let i=a=>(Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return r},K1=["@symbo.ls/sdk"],G1=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!t||typeof t!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||r[o]||(r[o]=s)}return r},GI=/^@symbo[-.]ls\//,YI=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,Y1=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!Array.isArray(t))return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o of t){let s=o&&o.library?o.library:o;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey,a=[];for(let c of[s.key,s.name,s.__libraryKey,s.__libraryName]){if(typeof c!="string"||!c||c!==i&&!GI.test(c))continue;let l=YI(c);l&&!a.includes(l)&&a.push(l)}for(let c of a)for(let l of[`@symbo-ls/${c}`,`@symbo.ls/${c}`])r[l]||(r[l]=s)}return r};D();var X1=t=>{let e={faces:0,links:0};if(!t)return e;for(let n in t){let r=t[n];if(!r||!r.fontFace)continue;let o=Array.isArray(r.fontFace)?r.fontFace:[r.fontFace];for(let s of o){if(Z1(s)){let i=ZI(s);i&&JI(i)&&e.links++;continue}if(XI(s)){xt(s.trim()),e.faces++;continue}typeof s=="string"&&s.includes("font-family")&&(xt(`@font-face { ${s} }`),e.faces++)}}return e},Z1=t=>typeof t=="string"&&t.trim().startsWith("@import"),XI=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),ZI=t=>{if(!Z1(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},JI=(t,e)=>{if(typeof t!="string"||!t)return null;let n=e||Jr();if(!n||!n.head)return null;let r="data-smbls-font",o=n.head.querySelectorAll(`link[rel="stylesheet"][${r}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(r)===t)return o[i];let s=n.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(r,t),n.head.appendChild(s),s};var eE=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let n=typeof document<"u"?document:e.document;t.document=t.document||n;let r=t.window;return r&&r!==e&&typeof r.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=r||e,t.window},J1=(t="smbls")=>{let e={};for(let n in ro)Object.prototype.hasOwnProperty.call(ro,n)&&(Ze(n)?e[`smbls.${n}`]=ro[n]:e[n]=ro[n]);return e},nE=t=>t.components?{...J1(),...t.components}:J1(),rE=t=>({...kc,...wc,...Yn,...t.utils,...t.snippets,...t.functions}),oE=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var sE=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,QI=3e3,tL=(t,e,n=r=>import(r))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let r=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(r[t])return Promise.resolve(r[t]);let o=Promise.resolve().then(()=>n(e)).then(i=>(i&&!r[t]&&(r[t]=i),r[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),QI);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},Q1={},V_=async({dependencies:t,dependenciesOnDemand:e,document:n,preventCaching:r=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=tL})=>{if(o||(o=Hn[s]||Bo(i)||"esmsh"),!t)return null;if(!$r(t))return console.warn(`[smbls] dependencies is ${Array.isArray(t)?"an ARRAY":`a ${typeof t}`}, not a package-name-keyed object \u2014 skipping the CDN fetch loop. This usually means a project's config.js declares its own "dependencies" field that collides with the platform package map once context.js spreads them together.`),null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=Vn()&&r?`?${Math.random()}`:"",f=async(d,h)=>{let p=Me(d,h,o)+l;try{await Promise.race([Vo(p,{document:n,type:"module"}),new Promise((g,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,p)}catch(g){if(console.error(`Failed to load ${d} from ${o}:`,g),o!=="symbols")try{let m=Me(d,h,"symbols")+l;await Promise.race([Vo(m,{document:n,type:"module"}),new Promise((y,x)=>setTimeout(()=>x(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let h=t[d];if(!(e&&e[d])&&!Q1[d]&&(Q1[d]=!0,!Wn(d))){if(Lr(d)){console.warn(`[smbls] dependency "${d}" looks like an un-interpolated template placeholder, not a real package specifier \u2014 skipping the CDN fetch (this is a bug upstream of the dependency loader, not a network failure).`);continue}sE(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},tE=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,eL=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof Ie=="function"?Ie(t):Function.prototype.toString.call(t)}catch{return""}return""},nL=t=>{let e=new Set;if(!t)return e;let n=[t.globalScope,t.functions,t.methods,t.snippets];for(let r=0;r<n.length;r++){let o=n[r];if(!o||typeof o!="object")continue;let s=Object.keys(o);for(let i=0;i<s.length;i++){let a;try{a=o[s[i]]}catch{continue}let c=eL(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;tE.lastIndex=0;let l;for(;(l=tE.exec(c))!==null;)e.add(l[1])}}return e},rL=t=>{let e=new Set;if(!t||typeof t.querySelectorAll!="function")return e;let n;try{n=t.querySelectorAll('script[type="importmap"]')}catch{return e}for(let r=0;r<n.length;r++){let o;try{o=JSON.parse(n[r].textContent||"")}catch{continue}let s=o&&typeof o=="object"?o.imports:null;if(s&&typeof s=="object"){let i=Object.keys(s);for(let a=0;a<i.length;a++)e.add(i[a])}}return e},oL=(t,e)=>{if(!e||!e.size)return!1;if(e.has(t))return!0;for(let n of e)if(n.length>1&&n.endsWith("/")&&t.length>n.length&&t.startsWith(n))return!0;return!1},iE=(t,{syncRead:e=nL(t),runtimeDocument:n=typeof document<"u"?document:null,importMap:r=rL(n)}={})=>{let o=t&&t.dependencies;if(!$r(o))return null;let s=!t.document||t.document===n,i=t.dependenciesOnDemand,a=null,c=null;for(let l in o)s&&!(i&&i[l])&&!e.has(l)&&oL(l,r)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},sL=t=>import(t),N_={},iL=(t,e)=>{if(!e||typeof globalThis>"u")return;let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});n[t]||(n[t]=e)},aL=(t,{importModule:e=sL}={})=>{let n=[];if(!t)return Promise.resolve([]);for(let r in t)Wn(r)||Lr(r)||sE(r)||(N_[r]||(N_[r]=Promise.resolve().then(()=>e(r)).then(o=>(iL(r,o),o||null),()=>null)),n.push(N_[r]));return Promise.all(n)},cL=2e3,lL=3e3,aE=(t,{win:e=typeof window<"u"?window:null,importModule:n,loadTimeoutMs:r=lL}={})=>t?new Promise(o=>{let s=()=>{aL(t,{importModule:n}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:cL}):setTimeout(s,0)},a=e&&e.document;if(a&&a.readyState&&a.readyState!=="complete"&&typeof e.addEventListener=="function"){let c=!0,l=null,f=()=>{c&&(c=!1,clearTimeout(l),typeof e.removeEventListener=="function"&&e.removeEventListener("load",f),i())};e.addEventListener("load",f,{once:!0}),l=setTimeout(f,r)}else i()}):null,cE=async(t,e)=>{let n=e.window||window,r=e.cdnProvider||Bo(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=r)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&Wn(a))return await u.require(a,c);if(!u.packages[a]){let d=Vn()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],p=Me(a,h,c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let m=Me(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Me(a,"latest",c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let g=Me(a,"latest","symbols")+d;await i.utils.loadRemoteScript(g,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};n.packages?n.packages=bt(n.packages,t):n.packages=t,n.require||(e.utils.require=await o(e),n.require=e.utils.require),n.requireOnDemand||(e.utils.requireOnDemand=await s(e),n.requireOnDemand=e.utils.requireOnDemand)},fL=/\s+/g,lE=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,uL=(t,e)=>{let n="";for(let r in t){let o=t[r];typeof o=="boolean"&&o?n+=` ${r}`:typeof o=="string"?n+=` ${o}`:typeof o=="function"&&(n+=` ${lE(o,e)}`)}return n},dL=(t,e,n)=>{if(!t)return;let{key:r}=e;t===!0&&(t=e.classlist={key:r}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=uL(t,e));let o=t.replace(fL," ").trim();if(n&&typeof n.setAttribute=="function")n.setAttribute("class",o);else if(n)try{n.className=o}catch{}return o},pL=()=>(t,e,n)=>{let r=lE(t,e);if(t){let{__ref:o}=e;o.__class.style=r}fE()(e.classlist,e,e.state,!0)},fE=()=>(t,e,n,r)=>{if(e.style&&!r)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=ge(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&dL(i,e,e.node)}},hL=()=>({style:pL(),classlist:fE()}),gL=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],j_=new WeakSet,B_=!1,mL=t=>!!t&&typeof t=="object",uE=(t,e)=>{let n=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,r=e.initOptions||{},o=e.registry||hL(),s=e.designSystem?ot(it(e.designSystem),it(_c),de):it(_c),i={};for(let g of gL)e[g]!==void 0&&(i[g]=e[g]);let a,c=mL(n),f=c&&j_.has(n)&&!e.skipDesignSystemInit,u=!f&&!B_,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=T(t)||T(),a&&(a.__domDocument=n),a?.CSS_VARS){st(a);try{xt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&xt(Ku(a.CSS_MEDIA_VARS,d));let g=Yr(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(g).length&&xt(g)}finally{rt()}}}else if(u){let g=T();g&&(g.__domDocument=n),a=An(s,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...Xu,...i,...r}),a&&a!==g&&(a.__domDocument=n),c&&j_.add(n),B_=!0}else{let g=Oa(t,s,{cleanBase:!0});for(let m in i)g[m]=i[m];if(g.__domDocument=n,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,g.varPrefix=m}st(g);try{a=An(g,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...Xu,...i,...r})}finally{rt()}c&&j_.add(n),B_=!0}let h=a?.CONFIG||a,p=h?.font;if(p){st(h);try{X1(p)}finally{rt()}}return[a,o]},dE=(t,e)=>{let n={};e.state&&ot(n,e.state),t&&t.state&&ot(n,t.state);let r=e.polyglot;if(r?.translations){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(r.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=o||n.lang||r.defaultLang||"en";o&&o!==n.lang&&(n.lang=o);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!Pr(e,u,n)){i.add(u);return}n[u]=d,a.add(u),Je(e,u,d)}},l=r.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(r.languages||[]);for(let u in r.translations)f.has(u)||c(u,r.translations[u]);i.size&&r.verbose!==!1&&e.verbose!==!1&&console.warn(`[polyglot] ${i.size} translation key${i.size===1?"":"s"} collide${i.size===1?"s":""} with a declared root-state key (${[...i].join(", ")}) \u2014 the declared value wins and the translation is NOT seeded into state. Rename the translation key, or read it with \`{{ key | polyglot }}\` instead of a bare \`{{ key }}\`.`)}return n.isRootState=!0,it(n)},pE=(t,e)=>{v(t.routes)&&v(e.pages)&&bt(t.routes,e.pages);let n=t.routes||e.pages||{},r=[];for(let o in n){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(n,i)?r.push(`${o} -> ${i}`):n[i]=n[o],delete n[o]}return r.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${r.length} explicitly declared route${r.length===1?"":"s"} over a same-named page key (${r.join(", ")}). A bare page NAME never overwrites a declared '/route'. This usually means a shared library ships a page under its export name that collides with one of your routes \u2014 add it to that library's ignoreList if you did not intend the collision.`),n},hE=t=>{ma(t,t.sharedLibraries)};var Hc={polyglot:Tc,getLocalStateLang:Dc,getActiveLang:ur,getLang:ur,setLang:Rc,getLanguages:Ac,loadTranslations:Oc,upsertTranslation:Pc};Zi();var He=Object.create(null);He.open="0";He.close="1";He.ping="2";He.pong="3";He.message="4";He.upgrade="5";He.noop="6";var Wc=Object.create(null);Object.keys(He).forEach(t=>{Wc[He[t]]=t});var qc={type:"error",data:"parser error"};var yE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",bE=typeof ArrayBuffer=="function",_E=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Kc=({type:t,data:e},n,r)=>yE&&e instanceof Blob?n?r(e):gE(e,r):bE&&(e instanceof ArrayBuffer||_E(e))?n?r(e):gE(new Blob([e]),r):r(He[t]+(e||"")),gE=(t,e)=>{let n=new FileReader;return n.onload=function(){let r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function mE(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var U_;function xE(t,e){if(yE&&t.data instanceof Blob)return t.data.arrayBuffer().then(mE).then(e);if(bE&&(t.data instanceof ArrayBuffer||_E(t.data)))return e(mE(t.data));Kc(t,!1,n=>{U_||(U_=new TextEncoder),e(U_.encode(n))})}var wE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<wE.length;t++)Gc[wE.charCodeAt(t)]=t;var SE=t=>{let e=t.length*.75,n=t.length,r,o=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(r=0;r<n;r+=4)s=Gc[t.charCodeAt(r)],i=Gc[t.charCodeAt(r+1)],a=Gc[t.charCodeAt(r+2)],c=Gc[t.charCodeAt(r+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l};var yL=typeof ArrayBuffer=="function",Yc=(t,e)=>{if(typeof t!="string")return{type:"message",data:kE(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:bL(t.substring(1),e)}:Wc[n]?t.length>1?{type:Wc[n],data:t.substring(1)}:{type:Wc[n]}:qc},bL=(t,e)=>{if(yL){let n=SE(t);return kE(n,e)}else return{base64:!0,data:t}},kE=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var vE="",CE=(t,e)=>{let n=t.length,r=new Array(n),o=0;t.forEach((s,i)=>{Kc(s,!1,a=>{r[i]=a,++o===n&&e(r.join(vE))})})},EE=(t,e)=>{let n=t.split(vE),r=[];for(let o=0;o<n.length;o++){let s=Yc(n[o],e);if(r.push(s),s.type==="error")break}return r};function AE(){return new TransformStream({transform(t,e){xE(t,n=>{let r=n.length,o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}var z_;function xd(t){return t.reduce((e,n)=>e+n.length,0)}function wd(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),r=0;for(let o=0;o<e;o++)n[o]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function TE(t,e){z_||(z_=new TextDecoder);let n=[],r=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(xd(n)<1)break;let c=wd(n,1);s=(c[0]&128)===128,o=c[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(xd(n)<2)break;let c=wd(n,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(xd(n)<8)break;let c=wd(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(qc);break}o=f*Math.pow(2,32)+l.getUint32(4),r=3}else{if(xd(n)<o)break;let c=wd(n,o);a.enqueue(Yc(s?c:z_.decode(c),e)),r=0}if(o===0||o>t){a.enqueue(qc);break}}}})}var H_=4;function pt(t){if(t)return _L(t)}function _L(t){for(var e in pt.prototype)t[e]=pt.prototype[e];return t}pt.prototype.on=pt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};pt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};pt.prototype.off=pt.prototype.removeListener=pt.prototype.removeAllListeners=pt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+t],this};pt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this};pt.prototype.emitReserved=pt.prototype.emit;pt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};pt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var On=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Yt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),OE="arraybuffer";function Sd(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}var xL=Yt.setTimeout,wL=Yt.clearTimeout;function Rn(t,e){e.useNativeTimers?(t.setTimeoutFn=xL.bind(Yt),t.clearTimeoutFn=wL.bind(Yt)):(t.setTimeoutFn=Yt.setTimeout.bind(Yt),t.clearTimeoutFn=Yt.clearTimeout.bind(Yt))}var SL=1.33;function RE(t){return typeof t=="string"?kL(t):Math.ceil((t.byteLength||t.size)*SL)}function kL(t){let e=0,n=0;for(let r=0,o=t.length;r<o;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function kd(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function PE(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function DE(t){let e={},n=t.split("&");for(let r=0,o=n.length;r<o;r++){let s=n[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var vd=class extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}},Pn=class extends pt{constructor(e){super(),this.writable=!1,Rn(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,r){return super.emitReserved("error",new vd(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=Yc(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let n=PE(e);return n.length?"?"+n:""}};var Xc=class extends Pn{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};EE(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,CE(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=kd()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}};var IE=!1;try{IE=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var LE=IE;function vL(){}var W_=class extends Xc{constructor(e){if(super(e),typeof location<"u"){let n=location.protocol==="https:",r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){let r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}},gr=class t extends pt{constructor(e,n,r){super(),this.createRequest=e,Rn(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;let n=Sd(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=vL,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};gr.requestsCount=0;gr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",$E);else if(typeof addEventListener=="function"){let t="onpagehide"in Yt?"pagehide":"unload";addEventListener(t,$E,!1)}}function $E(){for(let t in gr.requests)gr.requests.hasOwnProperty(t)&&gr.requests[t].abort()}var CL=(function(){let t=ME({xdomain:!1});return t&&t.responseType!==null})(),mr=class extends W_{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=CL&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new gr(ME,this.uri(),e)}};function ME(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||LE))return new XMLHttpRequest}catch{}if(!e)try{return new Yt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var FE=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",K_=class extends Pn{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,r=FE?{}:Sd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;Kc(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}o&&On(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=kd()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},q_=Yt.WebSocket||Yt.MozWebSocket,yr=class extends K_{createSocket(e,n,r){return FE?new q_(e,n,r):n?new q_(e,n):new q_(e)}doWrite(e,n){this.ws.send(n)}};var Bs=class extends Pn{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let n=TE(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),o=AE();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;this._writer.write(r).then(()=>{o&&On(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var G_={websocket:yr,webtransport:Bs,polling:mr};var EL=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,AL=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Vs(t){if(t.length>8e3)throw"URI too long";let e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=EL.exec(t||""),s={},i=14;for(;i--;)s[AL[i]]=o[i]||"";return n!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=TL(s,s.path),s.queryKey=OL(s,s.query),s}function TL(t,e){let n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function OL(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}var Y_=typeof addEventListener=="function"&&typeof removeEventListener=="function",Cd=[];Y_&&addEventListener("offline",()=>{Cd.forEach(t=>t())},!1);var uo=class t extends pt{constructor(e,n){if(super(),this.binaryType=OE,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){let r=Vs(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Vs(n.host).host);Rn(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{let o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=DE(this.opts.query)),Y_&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Cd.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=H_,n.transport=e,this.id&&(n.sid=this.id);let r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){let o=this.writeBuffer[r].data;if(o&&(n+=RE(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,On(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let s={type:e,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Y_&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=Cd.indexOf(this._offlineEventListener);r!==-1&&Cd.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};uo.protocol=H_;var Ed=class extends uo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let n=this.createTransport(e),r=!1;uo.priorWebsocketSuccess=!1;let o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;uo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){n&&u.name!==n.name&&s()}let f=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",i),n.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let n=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}},Us=class extends Ed{constructor(e,n={}){let r=typeof e=="object"?e:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>G_[o]).filter(o=>!!o)),super(e,r)}};var XU=Us.protocol;function NE(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Vs(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}var nx={};$(nx,{Decoder:()=>tx,Encoder:()=>Q_,PacketType:()=>z,isPacketValid:()=>XL,protocol:()=>YE});var PL=typeof ArrayBuffer=="function",DL=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,jE=Object.prototype.toString,IL=typeof Blob=="function"||typeof Blob<"u"&&jE.call(Blob)==="[object BlobConstructor]",LL=typeof File=="function"||typeof File<"u"&&jE.call(File)==="[object FileConstructor]";function Jc(t){return PL&&(t instanceof ArrayBuffer||DL(t))||IL&&t instanceof Blob||LL&&t instanceof File}function Zc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Zc(t[n]))return!0;return!1}if(Jc(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Zc(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Zc(t[n]))return!0;return!1}function BE(t){let e=[],n=t.data,r=t;return r.data=X_(n,e),r.attachments=e.length,{packet:r,buffers:e}}function X_(t,e){if(!t)return t;if(Jc(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=X_(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){let n={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=X_(t[r],e));return n}return t}function VE(t,e){return t.data=Z_(t.data,e),delete t.attachments,t}function Z_(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Z_(t[n],e);else if(typeof t=="object")for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Z_(t[n],e));return t}var KE=WA(qE(),1),J_=(0,KE.default)("socket.io-parser"),GE=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],YE=5,z;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(z||(z={}));var Q_=class{constructor(e){this.replacer=e}encode(e){return J_("encoding packet %j",e),(e.type===z.EVENT||e.type===z.ACK)&&Zc(e)?this.encodeAsBinary({type:e.type===z.EVENT?z.BINARY_EVENT:z.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===z.BINARY_EVENT||e.type===z.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),J_("encoded %j as %s",e,n),n}encodeAsBinary(e){let n=BE(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}},tx=class t extends pt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let r=n.type===z.BINARY_EVENT;r||n.type===z.BINARY_ACK?(n.type=r?z.EVENT:z.ACK,this.reconstructor=new ex(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Jc(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0,r={type:Number(e.charAt(0))};if(z[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===z.BINARY_EVENT||r.type===z.BINARY_ACK){let s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);let i=e.substring(s,n);if(i!=Number(i)||e.charAt(n)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!XE(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=a}if(e.charAt(n+1)==="/"){let s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(s,n)}else r.nsp="/";let o=e.charAt(n+1);if(o!==""&&Number(o)==o){let s=n+1;for(;++n;){let i=e.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===e.length)break}r.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){let s=this.tryParse(e.substr(n));if(t.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return J_("decoded %s as %j",e,r),r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case z.CONNECT:return Od(n);case z.DISCONNECT:return n===void 0;case z.CONNECT_ERROR:return typeof n=="string"||Od(n);case z.EVENT:case z.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&GE.indexOf(n[0])===-1);case z.ACK:case z.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ex=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let n=VE(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function KL(t){return typeof t=="string"}var XE=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function GL(t){return t===void 0||XE(t)}function Od(t){return Object.prototype.toString.call(t)==="[object Object]"}function YL(t,e){switch(t){case z.CONNECT:return e===void 0||Od(e);case z.DISCONNECT:return e===void 0;case z.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&GE.indexOf(e[0])===-1);case z.ACK:return Array.isArray(e);case z.CONNECT_ERROR:return typeof e=="string"||Od(e);default:return!1}}function XL(t){return KL(t.nsp)&&GL(t.id)&&YL(t.type,t.data)}function be(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var ZL=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),qs=class extends pt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[be(e,"open",this.onopen.bind(this)),be(e,"packet",this.onpacket.bind(this)),be(e,"error",this.onerror.bind(this)),be(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var r,o,s;if(ZL.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let i={type:z.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let f=this.ids++,u=n.pop();this._registerAckCallback(f,u),i.id=f}let a=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var r;let o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...n){return new Promise((r,o)=>{let s=(i,a)=>i?o(i):r(a);s.withError=!0,n.push(s),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());let r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){let r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case z.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case z.EVENT:case z.BINARY_EVENT:this.onevent(e);break;case z.ACK:case z.BINARY_ACK:this.onack(e);break;case z.DISCONNECT:this.ondisconnect();break;case z.CONNECT_ERROR:this.destroy();let r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){let n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,r=!1;return function(...o){r||(r=!0,n.packet({type:z.ACK,id:e,data:o}))}}onack(e){let n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:z.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let r of n)r.apply(this,e.data)}}};function ho(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}ho.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};ho.prototype.reset=function(){this.attempts=0};ho.prototype.setMin=function(t){this.ms=t};ho.prototype.setMax=function(t){this.max=t};ho.prototype.setJitter=function(t){this.jitter=t};var Ks=class extends pt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Rn(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ho({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;let o=n.parser||nx;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Us(this.uri,this.opts);let n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let o=be(n,"open",function(){r.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=be(n,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(be(e,"ping",this.onping.bind(this)),be(e,"data",this.ondata.bind(this)),be(e,"error",this.onerror.bind(this)),be(e,"close",this.onclose.bind(this)),be(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){On(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new qs(this,e,n),this.nsps[e]=r),r}_destroy(e){let n=Object.keys(this.nsps);for(let r of n)if(this.nsps[r].active)return;this._close()}_packet(e){let n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var Qc={};function Gs(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=NE(t,e.path||"/socket.io"),r=n.source,o=n.id,s=n.path,i=Qc[o]&&s in Qc[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Ks(r,e):(Qc[o]||(Qc[o]=new Ks(r,e)),c=Qc[o]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign(Gs,{Manager:Ks,Socket:qs,io:Gs,connect:Gs});D();D();var Rd=new Set(["__proto__","constructor","prototype"]),rx=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Rd.has(t[e]))return!1;return!0},ZE=(t,e)=>{!t||!rx(e)||e.reduce((n,r,o,s)=>{if(n&&r in n){if(o!==s.length-1)return n[r];delete n[r]}},t)},JE=(t,e,n,r=!1)=>{!t||!rx(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&r&&(o[s]={}),o[s];o[s]=n}},t)},Pd=(t,e)=>{let n=new Set;if(!Array.isArray(e))return n;for(let[r,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(n.add(o[0]),r){case"delete":ZE(t,o);break;case"update":case"set":JE(t,o,s,!0);break;default:break}return n},QE=(t,e)=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let n=t&&(t.__raw||t)||{},r=null;for(let o of Object.keys(e))Rd.has(o)||Object.prototype.hasOwnProperty.call(n,o)||(r||(r={}),r[o]=e[o]);return r},tl=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},tA=(t,e,n,r="designSystem")=>{for(let o in e){if(Rd.has(o))continue;let s=`${r}/${o}`;if(n.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}tA(t[o],i,n,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},ox=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};Pd(o,e)}let n=JSON.parse(JSON.stringify(t.__rawDesignSystem)),r=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let o of r){let s=tn(o),i=s?o.library:o,a=i&&i.designSystem;if(!a||typeof a!="object")continue;let c=qn(i.sharedLibIgnore);if(s)for(let l of qn(o.ignoreList))c.add(l);c.has("designSystem")||tA(n,a,c)}return n};D();var eA=(t,e,n)=>{let r=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(n[a]&&typeof n[a]=="object")if(a==="designSystem"){if(tl(n,c),r){let l=ox(n);l&&An(l)}}else Tr(n[a],c);else n[a]=c}),r=!0,i&&(n.schema=i))}},nA=(t,e,n)=>(r={})=>{let{changes:o}=r;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=Pd(n,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=ox(n,s);c?An(c):n.__warnedNoRawDesignSystem||(n.__warnedNoRawDesignSystem=!0,console.warn("[sync] design-system op ignored: no raw design system was seeded on this client. Re-initing from the processed config would corrupt every token, so the update is skipped \u2014 reload to pick it up. Seed it at boot with seedRawDesignSystem(ctx, ds)."))}if(a.has("state")){let c=QE(e,n.state);if(c){let l=typeof e.$update=="function"?e.$update:e.update;typeof l=="function"&&l.call(e,c)}}if(["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=n.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var JL={success:"green",error:"red",warning:"yellow"},rA=(t,e,n)=>{if(t.symbols){if(!n.connected){n.notifications.connected={title:"Connected",message:"to the Symbols live server"},n.update({connected:!0});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}}else if(n.connected){n.notifications.connected={title:"Disconnected",type:"error"},n.update({connected:!1});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}},oA={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:JL[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,n,r)=>{n.update({animation:"fadeInUp"})},onClick:(e,n,r)=>{delete r.notifications[n.key],n.update({animation:"fadeOutDown"}),r.onClose&&r.onClose(e,n,r)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var QL=!1,t$=()=>QL?"http://localhost:8080":"https://api.symbols.app",e$=t=>{let e=t&&t.editor&&t.editor.socketUrl||t&&t.settings&&t.settings.socketUrl;return typeof e=="string"&&e?{mode:"collab",baseUrl:e}:t&&t.editor&&t.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:{mode:null,baseUrl:null}},n$=async t=>{try{let e=t||t$(),n=await C.fetch(`${e}/service-token`,{method:"GET"}),r;try{let o=await n.clone().json();if(o&&typeof o.token=="string")return o.token.trim();r=await n.text()}catch{r=await n.text()}return(r||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},aA=(t,e,n,r)=>{t.on("snapshot",eA(e,n,r)),t.on("ops",nA(e,n,r)),t.on("clients",o=>{r.editor?.verbose&&rA(o,e,n)}),t.on("disconnect",o=>{r.editor?.verbose&&console.info("[sync] disconnected",o)})},r$=async(t,e,n,r)=>{let o=await n$(r);if(!o)return console.warn("[sync] no service token \u2014 collab disabled"),null;let s=n.key;if(!s)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let i=n.editor?.projectId||null,a=Gs(r,{path:"/collab-socket",transports:["websocket"],auth:{token:o,projectId:i,projectKey:s,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return a.on("connect",()=>{n.editor?.verbose&&console.info("[sync] connected (collab)")}),aA(a,t,e,n),a},o$=(t,e,n)=>{let r=Gs({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return r.on("connect",()=>{n.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),aA(r,t,e,n),r.on("reload",()=>{typeof C<"u"&&C.location&&C.location.reload()}),r},s$=async(t,e,n)=>{let{mode:r,baseUrl:o}=e$(n);return r?r==="collab"?r$(t,e,n,o):r==="runner"?o$(t,e,n):null:null},i$={onInit:s$};var cA=t=>typeof t>"u",sA=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),iA=t=>t?.editor?.runtime==="runner",lA=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},fA={name:"sync",beforeCreate(t,e){let n=e&&e.editor;(n&&!cA(n.liveSync)?n.liveSync:sA(e)||iA(e))&&(sA(e)&&!iA(e)&&!e?.key||lA(t,i$))}},uA={name:"notifications",beforeCreate(t,e){if(!e)return;let n=cA(e.notifications)?null:e.notifications,r=e.editor&&e.editor.verbose===!0;(n===!0||n!==!1&&r)&&lA(t,oA)}};var ax={};$(ax,{AlertTemplate:()=>Ud,ConfirmTemplate:()=>Vd,CustomTemplate:()=>Hd,ModalLayer:()=>Bd,ModalRoot:()=>jd,PromptTemplate:()=>zd,windowsComponents:()=>ix});var sx={};$(sx,{alertDialog:()=>Fd,closeAllModals:()=>$d,closeModal:()=>Id,confirmDialog:()=>Md,getLayer:()=>Dd,openModal:()=>Ld,promptDialog:()=>Nd,windowsFunctions:()=>Dn});function Q(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function Ys(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let n=t?.getRoot?.();return n?.ModalRoot?n.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Dd(){return Q(this)}var a$=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.setProperty!="function"||(r.style.setProperty("display","none","important"),r.style.setProperty("opacity","0","important"),r.style.setProperty("visibility","hidden","important"),r.style.setProperty("pointer-events","none","important"))},dA=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.removeProperty!="function"||(r.style.removeProperty("display"),r.style.removeProperty("opacity"),r.style.removeProperty("visibility"),r.style.removeProperty("pointer-events"))};function Id(t){let e=Ys(this);if(!e)return;let n=e.state?.stack||[];if(!n.length)return;let r,o,s;if(t){if(s=[],r=n.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),r.length===n.length)return;o=n.filter(i=>i.id===t)}else r=n.slice(0,-1),o=n.slice(-1),s=[n.length-1];e.state.update({stack:r});for(let i of s)a$(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Ld(t={}){let e=Ys(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let n=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,r={id:n,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},o=e.state?.stack||[];if(o.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=o.length;return dA(e,s),e.state.update({stack:[...o,r]}),n}function $d(){let t=Ys(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Md(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Fd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Nd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Dn={openModal:Ld,closeModal:Id,closeAllModals:$d,confirmDialog:Md,alertDialog:Fd,promptDialog:Nd,getLayer:Dd};var c$=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),pA=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(c$),n=[];for(let r=0;r<e.length;r++){let o=e[r];(o.offsetParent!==null||o===document.activeElement)&&n.push(o)}return n},hA=t=>{let e=t.state?.stack||[];if(!e.length)return null;let n=t["ModalLayer_"+(e.length-1)];return n?.node||n?.__ref?.node||null},jd={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[0]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[1]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[2]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[3]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[4]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},onInit:(t,e)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=t;let n=t.context;if(n){n.functions||(n.functions={});for(let a in Dn)a in n.functions||(n.functions[a]=Dn[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let r=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},o=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=hA(t);if(!l)return;let f=pA(l);if(!f.length){a.preventDefault();let p=l.querySelector?.('[role="dialog"]')||l;try{p.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],h=document.activeElement;if(!l.contains(h)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&h===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&h===d){a.preventDefault();try{u.focus()}catch{}}return}a.key!=="Escape"||a.defaultPrevented||c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),r())}};window.addEventListener("keydown",o),t.__escHandler=o;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,h)=>h!==a)});let f=t["ModalLayer_"+a],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},i=a=>{let c=t.state?.stack||[];if(!c.length)return;let l=a.target?.closest?.('[data-key="Close"]');if(l){for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f],d=u?.node||u?.__ref?.node;if(d&&d.contains(l)){a.preventDefault(),a.stopPropagation(),s(f);return}}return}for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f];if((u?.node||u?.__ref?.node)===a.target){if(c[f]?.dismissOnBackdrop===!1)return;a.preventDefault(),a.stopPropagation(),s(f);return}}};document.addEventListener("click",i,!0),t.__clickDelegate=i},onUpdate:t=>{if(typeof window>"u")return;let e=(t.state&&t.state.stack||[]).length,n=t.__prevStackLen||0;if(e!==n)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>n)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let r=hA(t);if(!r)return;let o=pA(r)[0]||r.querySelector&&r.querySelector('[role="dialog"]')||r;try{o.focus&&o.focus()}catch{}});else{let r=null;for(let o=n;o>e;o--)t.__modalOpeners[o]&&(r=r||t.__modalOpeners[o]),t.__modalOpeners[o]=null;if(r&&typeof r.focus=="function"&&r.isConnected!==!1)try{r.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var Bd={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",theme:"backdrop",transition:"opacity C defaultBezier",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}},width:t=>Q(t)?.width||"H",maxWidth:t=>Q(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>Q(t)?.maxHeight||"100%",animation:"modalIn",animationDuration:"D",animationTimingFunction:"springBezier",onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>Q(t)?.template!=="confirm"},AlertTemplate:{hide:t=>Q(t)?.template!=="alert"},PromptTemplate:{hide:t=>Q(t)?.template!=="prompt"},CustomTemplate:{hide:t=>Q(t)?.template!=="custom"}}};var Xs=(t,e,n)=>Q(t)?.[e]||n,l$=t=>{let e=Q(t)?.icon;return e===null||e===!1},Vd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>Xs(t,"title","Are you sure?"),attr:{id:t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>l$(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>Xs(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>Xs(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Xs(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=Q(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:t=>Xs(t,"confirmTheme","primary"),text:t=>Xs(t,"confirmText","Confirm"),onClick:(t,e,n)=>{let r=Q(e);if(r?.onConfirm)try{r.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",r?.id)}}}};var el=(t,e,n)=>Q(t)?.[e]||n,Ud={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>el(t,"title","Notice"),attr:{id:t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>el(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!el(t,"message",""),P:{tag:"p",margin:"0",text:t=>el(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>el(t,"okText","OK"),onClick:(t,e,n)=>{let r=Q(e);if(r?.onOk)try{r.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",r?.id)}}}};var Zs=(t,e,n)=>Q(t)?.[e]||n,zd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",scope:{value:""},onRender:(t,e)=>{let n=Q(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},onUpdate:(t,e)=>{let n=Q(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Zs(t,"title","Enter a value"),attr:{id:t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Zs(t,"message",""),P:{tag:"p",margin:"0",text:t=>Zs(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>Zs(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,n)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,n)=>{if(t.key!=="Enter")return;t.preventDefault();let r=Q(e),o=e.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Zs(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=Q(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Zs(t,"confirmText","OK"),onClick:(t,e,n)=>{let r=Q(e),o=e.parent.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}}}};var Hd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",Title:{tag:"h2",text:t=>Q(t)?.title||"",hide:t=>!Q(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",onInit:t=>{let e=G(()=>{let n=Q(t),r=n?.content||null,o=n?.id||null;if(!r){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in Dn)i in s.functions||(s.functions[i]=Dn[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var gA={extends:"Button",theme:"tertiary"};var ix={ModalRoot:jd,ModalLayer:Bd,ConfirmTemplate:Vd,AlertTemplate:Ud,PromptTemplate:zd,CustomTemplate:Hd,"smbls.CancelButton":gA};var px={};$(px,{Dropdown:()=>Xd,DropdownList:()=>Zd,DropdownParent:()=>Jd,DropdownParentFocus:()=>Qd,DropdownRoot:()=>Gd,DropdownSiblingFocus:()=>tp,DropdownTrigger:()=>Yd,dropdownComponents:()=>dx});var mA=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),f$=(t,e,n,r)=>{let o=mA(t,n,r),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},u$=(t,e,n,r,o)=>{let s=mA(e,r,o),i=t==="top"||t==="bottom"?n.height+8:n.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i||a&&s[a]>s[t]?a:t};var cx=(t,e,n)=>{let r;return t==="bottom"?r=n-e.bottom-16:t==="top"?r=e.top-16:r=n-16,Math.max(40,Math.floor(r))},Wd=(t,e,n)=>Math.max(e,Math.min(n,t)),In=(t,e,n="auto")=>{if(!t){let p=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:cx("center",null,p)}}let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(n==="center"){let p=cx("center",t,o),g=Math.min(s.height,p),m=Wd((r-s.width)/2,8,Math.max(8,r-s.width-8)),y=Wd((o-g)/2,8,Math.max(8,o-g-8));return{left:m,top:y,side:"center",align:"center",maxHeight:p}}let i,a;if(n==="auto")i=f$(t,s,r,o),a="start";else{let p=n.split("-");i=p[0],a=p[1]||"start",i=u$(i,t,s,r,o)}let c=cx(i,t,o),l=Math.min(s.height,c),f,u;i==="bottom"||i==="top"?(a==="start"?f=t.left:a==="end"?f=t.right-s.width:f=t.left+(t.width-s.width)/2,u=i==="bottom"?t.bottom+8:t.top-l-8):(a==="start"?u=t.top:a==="end"?u=t.bottom-l:u=t.top+(t.height-l)/2,f=i==="right"?t.right+8:t.left-s.width-8);let d=Math.max(8,r-s.width-8),h=Math.max(8,o-l-8);return f=Wd(f,8,d),u=Wd(u,8,h),{left:f,top:u,side:i,align:a,maxHeight:c}},Js=t=>{switch(t){case"bottom":return"translateY(-6px)";case"top":return"translateY(6px)";case"left":return"translateX(6px)";case"right":return"translateX(-6px)";case"center":return"translateY(0px)";default:return"translateY(-6px)"}};var br={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},d$=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},lx=t=>t?.getRoot?.()?.DropdownRoot||null,p$=0,h$=()=>`dropdown_${++p$}_${Date.now().toString(36)}`;function qd(t={}){let e=lx(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||d$(n);if(!r)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||h$(),s=t.restoreEl?.node||t.restoreEl||n||(typeof document<"u"?document.activeElement:null),i={id:o,content:t.content||null,anchor:r,placement:t.placement||br.placement,trigger:t.trigger||br.trigger,offset:t.offset??br.offset,minWidth:t.minWidth||br.minWidth,maxWidth:t.maxWidth||br.maxWidth,maxHeight:t.maxHeight||br.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,role:t.role||null,ariaLabel:t.ariaLabel||null,ariaLabelledby:t.ariaLabelledby||null,focusIn:!!t.focusIn,onOpen:t.onOpen,onClose:t.onClose,restoreEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return o}function Kd(t){let e=lx(this);if(!e)return;let n=e.state?.layer;n&&e.state.update({layer:{...n,inert:!!t}})}function go(t){let e=lx(this);if(!e)return;let n=e.state?.layer;if(!n)return;let r=typeof t=="string"?t:t?.id;if(r&&n.id&&r!==n.id)return;let o=n.onClose,s=n.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(n)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var fx=(t,e)=>{let n=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${n})`:n},yA=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},g$=`
104
+ \`\`\``}o.push({role:"user",content:s})}return o}var jE=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,qL=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function KL(t){let e=[];for(let n of t.matchAll(jE))e.push({lang:(n.groups?.lang||"").toLowerCase(),code:n.groups?.code??""});return e}function GL(t){return t.replace(jE,"").trim()}function M_(t){if(!t||!/[{[]/.test(t))return null;try{return JSON.parse(t)}catch{}try{return JSON.parse(t.replace(/,\s*([}\]])/g,"$1"))}catch{}return null}function NE(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&qL.has(t.type)}function BE(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let n=KL(e),r=n.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=n.filter(i=>i.lang==="json"),s=GL(e);for(let i of o){let a=M_(i.code);if(NE(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(r.length>0){let i=r[0].code,a=M_("["+i+"]");return Array.isArray(a)&&a.length>1?{kind:"multi",text:s,assets:a,code:i,message:s||`Generated ${a.length} items`}:{kind:"component",text:s,code:i,message:s||"Generated a component"}}if(e.startsWith("{")){let i=M_(e);if(NE(i))return{kind:"asset",text:i.description||"",asset:i,message:i.description||`Generated ${i.type}: ${i.title||i.key||""}`.trim()}}return{kind:"text",text:e,message:e}}function VE(t){if(!t)return{code_response:{type:"error",content:"Empty response from assistant"}};switch(t.kind){case"asset":return{code_response:{type:"json_response",data:t.asset}};case"multi":return{code_response:{type:"symbols_component_code",component_code:t.code}};case"component":return{code_response:{type:"symbols_component_code",component_code:t.code,analysis_text:t.text}};default:return{code_response:{type:"plain_text_response",content:t.text||t.message||""}}}}var UE=["You are Simone, the Symbols.app assistant.","You help users build DOMQL v3 components, pages, and design-system entries.",'When the user asks for a component or page, return a single ```json fenced block whose body is one asset object with shape { type, key, title, description, value }. type is one of "component", "page", "function", "state", "color", "font", "icon", "theme".',"For multiple assets, return one ```js fenced block with comma-separated asset objects.","For general questions, reply with prose only."].join(" "),zE=["You are a DOMQL v3.14 code generator for the Symbols workspace.","Output EXECUTABLE DOMQL v3.14 for the requested page(s)/component(s) \u2014 never a description, never a plan, never an explanation.","Author data-first object schemas: child elements are UPPERCASE keys; styling lives in flat element props (NO attr/props/on wrappers); use design-system tokens (color/typography/spacing keys), never raw px/rem/hex/rgba; `extends` and `childExtends` are quoted strings; event handlers are flat (onClick, onInit) \u2014 never on:{} or props:{} wrappers.","OUTPUT FORMAT \u2014 pick ONE:","- SINGLE page/component: emit exactly one ```js fenced code block whose body is a single DOMQL object literal (an expression \u2014 start with `{`, no `export`, no variable assignment, no surrounding prose).",'- MULTIPLE pages/components: emit exactly one ```json fenced code block whose body is an object of the shape { "pages": { "PageKey": "<DOMQL object-literal source string>" }, "components": { "CompKey": "<DOMQL object-literal source string>" } }. Include only the sections you produce; each value is the DOMQL source for that key.',"Keys are PascalCase. Default to a single page unless the request clearly needs several distinct pages/components.","Emit ONLY the single fenced block. No text before or after it."].join(`
105
+ `),F_={Starter:hr,Free:hr,Pro:"claude-opus-4-6"};function HE(t){return t?F_[t]||t:hr}var WE={"@symbo.ls/signal":wp,"@symbo.ls/scratch":ny,"@symbo.ls/element":lb,"@symbo.ls/css":py,"@symbo.ls/utils":Wo,"@symbo.ls/state":qy,"@symbo.ls/router":wc,"@symbo.ls/polyglot":l_,"@symbo.ls/helmet":a_,"@symbo.ls/fetch":af,"@symbo.ls/capsize":u_,"@symbo.ls/shorthand":b_,"@symbo.ls/analyze":R_,"@symbo.ls/inspect":L_,"@symbo.ls/channels":$_,"@symbo-ls/simone-server":N_},qE=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:{}),r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in WE)r[o]||(r[o]=WE[o]);if(e)for(let o in e)r[o]||(r[o]=e[o]);return r},KE=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:null);if(!n||!e||typeof e!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(r,o))continue;let i=a=>(Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return r},GE=["@symbo.ls/sdk"],YE=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!t||typeof t!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||r[o]||(r[o]=s)}return r},YL=/^@symbo[-.]ls\//,XL=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,XE=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!Array.isArray(t))return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o of t){let s=o&&o.library?o.library:o;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey,a=[];for(let c of[s.key,s.name,s.__libraryKey,s.__libraryName]){if(typeof c!="string"||!c||c!==i&&!YL.test(c))continue;let l=XL(c);l&&!a.includes(l)&&a.push(l)}for(let c of a)for(let l of[`@symbo-ls/${c}`,`@symbo.ls/${c}`])r[l]||(r[l]=s)}return r};D();var ZE=t=>{let e={faces:0,links:0};if(!t)return e;for(let n in t){let r=t[n];if(!r||!r.fontFace)continue;let o=Array.isArray(r.fontFace)?r.fontFace:[r.fontFace];for(let s of o){if(JE(s)){let i=JL(s);i&&QL(i)&&e.links++;continue}if(ZL(s)){xt(s.trim()),e.faces++;continue}typeof s=="string"&&s.includes("font-family")&&(xt(`@font-face { ${s} }`),e.faces++)}}return e},JE=t=>typeof t=="string"&&t.trim().startsWith("@import"),ZL=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),JL=t=>{if(!JE(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},QL=(t,e)=>{if(typeof t!="string"||!t)return null;let n=e||Jr();if(!n||!n.head)return null;let r="data-smbls-font",o=n.head.querySelectorAll(`link[rel="stylesheet"][${r}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(r)===t)return o[i];let s=n.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(r,t),n.head.appendChild(s),s};var n1=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let n=typeof document<"u"?document:e.document;t.document=t.document||n;let r=t.window;return r&&r!==e&&typeof r.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=r||e,t.window},QE=(t="smbls")=>{let e={};for(let n in ro)Object.prototype.hasOwnProperty.call(ro,n)&&(Ze(n)?e[`smbls.${n}`]=ro[n]:e[n]=ro[n]);return e},r1=t=>t.components?{...QE(),...t.components}:QE(),o1=t=>({...kc,...wc,...Yn,...t.utils,...t.snippets,...t.functions}),s1=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var i1=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,tI=3e3,eI=(t,e,n=r=>import(r))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let r=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(r[t])return Promise.resolve(r[t]);let o=Promise.resolve().then(()=>n(e)).then(i=>(i&&!r[t]&&(r[t]=i),r[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),tI);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},t1={},U_=async({dependencies:t,dependenciesOnDemand:e,document:n,preventCaching:r=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=eI})=>{if(o||(o=Hn[s]||Bo(i)||"esmsh"),!t)return null;if(!$r(t))return console.warn(`[smbls] dependencies is ${Array.isArray(t)?"an ARRAY":`a ${typeof t}`}, not a package-name-keyed object \u2014 skipping the CDN fetch loop. This usually means a project's config.js declares its own "dependencies" field that collides with the platform package map once context.js spreads them together.`),null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=Vn()&&r?`?${Math.random()}`:"",f=async(d,h)=>{let p=Fe(d,h,o)+l;try{await Promise.race([Vo(p,{document:n,type:"module"}),new Promise((g,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,p)}catch(g){if(console.error(`Failed to load ${d} from ${o}:`,g),o!=="symbols")try{let m=Fe(d,h,"symbols")+l;await Promise.race([Vo(m,{document:n,type:"module"}),new Promise((y,x)=>setTimeout(()=>x(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let h=t[d];if(!(e&&e[d])&&!t1[d]&&(t1[d]=!0,!Wn(d))){if(Ir(d)){console.warn(`[smbls] dependency "${d}" looks like an un-interpolated template placeholder, not a real package specifier \u2014 skipping the CDN fetch (this is a bug upstream of the dependency loader, not a network failure).`);continue}i1(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},e1=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,nI=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof Ie=="function"?Ie(t):Function.prototype.toString.call(t)}catch{return""}return""},rI=t=>{let e=new Set;if(!t)return e;let n=[t.globalScope,t.functions,t.methods,t.snippets];for(let r=0;r<n.length;r++){let o=n[r];if(!o||typeof o!="object")continue;let s=Object.keys(o);for(let i=0;i<s.length;i++){let a;try{a=o[s[i]]}catch{continue}let c=nI(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;e1.lastIndex=0;let l;for(;(l=e1.exec(c))!==null;)e.add(l[1])}}return e},oI=t=>{let e=new Set;if(!t||typeof t.querySelectorAll!="function")return e;let n;try{n=t.querySelectorAll('script[type="importmap"]')}catch{return e}for(let r=0;r<n.length;r++){let o;try{o=JSON.parse(n[r].textContent||"")}catch{continue}let s=o&&typeof o=="object"?o.imports:null;if(s&&typeof s=="object"){let i=Object.keys(s);for(let a=0;a<i.length;a++)e.add(i[a])}}return e},sI=(t,e)=>{if(!e||!e.size)return!1;if(e.has(t))return!0;for(let n of e)if(n.length>1&&n.endsWith("/")&&t.length>n.length&&t.startsWith(n))return!0;return!1},a1=(t,{syncRead:e=rI(t),runtimeDocument:n=typeof document<"u"?document:null,importMap:r=oI(n)}={})=>{let o=t&&t.dependencies;if(!$r(o))return null;let s=!t.document||t.document===n,i=t.dependenciesOnDemand,a=null,c=null;for(let l in o)s&&!(i&&i[l])&&!e.has(l)&&sI(l,r)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},iI=t=>import(t),j_={},aI=(t,e)=>{if(!e||typeof globalThis>"u")return;let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});n[t]||(n[t]=e)},cI=(t,{importModule:e=iI}={})=>{let n=[];if(!t)return Promise.resolve([]);for(let r in t)Wn(r)||Ir(r)||i1(r)||(j_[r]||(j_[r]=Promise.resolve().then(()=>e(r)).then(o=>(aI(r,o),o||null),()=>null)),n.push(j_[r]));return Promise.all(n)},lI=2e3,fI=3e3,c1=(t,{win:e=typeof window<"u"?window:null,importModule:n,loadTimeoutMs:r=fI}={})=>t?new Promise(o=>{let s=()=>{cI(t,{importModule:n}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:lI}):setTimeout(s,0)},a=e&&e.document;if(a&&a.readyState&&a.readyState!=="complete"&&typeof e.addEventListener=="function"){let c=!0,l=null,f=()=>{c&&(c=!1,clearTimeout(l),typeof e.removeEventListener=="function"&&e.removeEventListener("load",f),i())};e.addEventListener("load",f,{once:!0}),l=setTimeout(f,r)}else i()}):null,l1=async(t,e)=>{let n=e.window||window,r=e.cdnProvider||Bo(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=r)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&Wn(a))return await u.require(a,c);if(!u.packages[a]){let d=Vn()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],p=Fe(a,h,c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let m=Fe(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Fe(a,"latest",c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let g=Fe(a,"latest","symbols")+d;await i.utils.loadRemoteScript(g,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};n.packages?n.packages=bt(n.packages,t):n.packages=t,n.require||(e.utils.require=await o(e),n.require=e.utils.require),n.requireOnDemand||(e.utils.requireOnDemand=await s(e),n.requireOnDemand=e.utils.requireOnDemand)},uI=/\s+/g,f1=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,dI=(t,e)=>{let n="";for(let r in t){let o=t[r];typeof o=="boolean"&&o?n+=` ${r}`:typeof o=="string"?n+=` ${o}`:typeof o=="function"&&(n+=` ${f1(o,e)}`)}return n},pI=(t,e,n)=>{if(!t)return;let{key:r}=e;t===!0&&(t=e.classlist={key:r}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=dI(t,e));let o=t.replace(uI," ").trim();if(n&&typeof n.setAttribute=="function")n.setAttribute("class",o);else if(n)try{n.className=o}catch{}return o},hI=()=>(t,e,n)=>{let r=f1(t,e);if(t){let{__ref:o}=e;o.__class.style=r}u1()(e.classlist,e,e.state,!0)},u1=()=>(t,e,n,r)=>{if(e.style&&!r)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=ge(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&pI(i,e,e.node)}},gI=()=>({style:hI(),classlist:u1()}),mI=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],B_=new WeakSet,V_=!1,yI=t=>!!t&&typeof t=="object",d1=(t,e)=>{let n=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,r=e.initOptions||{},o=e.registry||gI(),s=e.designSystem?ot(it(e.designSystem),it(_c),de):it(_c),i={};for(let g of mI)e[g]!==void 0&&(i[g]=e[g]);let a,c=yI(n),f=c&&B_.has(n)&&!e.skipDesignSystemInit,u=!f&&!V_,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=T(t)||T(),a&&(a.__domDocument=n),a?.CSS_VARS){st(a);try{xt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&xt(Ku(a.CSS_MEDIA_VARS,d));let g=Yr(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(g).length&&xt(g)}finally{rt()}}}else if(u){let g=T();g&&(g.__domDocument=n),a=An(s,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...Xu,...i,...r}),a&&a!==g&&(a.__domDocument=n),c&&B_.add(n),V_=!0}else{let g=Oa(t,s,{cleanBase:!0});for(let m in i)g[m]=i[m];if(g.__domDocument=n,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,g.varPrefix=m}st(g);try{a=An(g,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...Xu,...i,...r})}finally{rt()}c&&B_.add(n),V_=!0}let h=a?.CONFIG||a,p=h?.font;if(p){st(h);try{ZE(p)}finally{rt()}}return[a,o]},p1=(t,e)=>{let n={};e.state&&ot(n,e.state),t&&t.state&&ot(n,t.state);let r=e.polyglot;if(r?.translations){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(r.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=o||n.lang||r.defaultLang||"en";o&&o!==n.lang&&(n.lang=o);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!Pr(e,u,n)){i.add(u);return}n[u]=d,a.add(u),Je(e,u,d)}},l=r.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(r.languages||[]);for(let u in r.translations)f.has(u)||c(u,r.translations[u]);i.size&&r.verbose!==!1&&e.verbose!==!1&&console.warn(`[polyglot] ${i.size} translation key${i.size===1?"":"s"} collide${i.size===1?"s":""} with a declared root-state key (${[...i].join(", ")}) \u2014 the declared value wins and the translation is NOT seeded into state. Rename the translation key, or read it with \`{{ key | polyglot }}\` instead of a bare \`{{ key }}\`.`)}return n.isRootState=!0,it(n)},h1=(t,e)=>{v(t.routes)&&v(e.pages)&&bt(t.routes,e.pages);let n=t.routes||e.pages||{},r=[];for(let o in n){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(n,i)?r.push(`${o} -> ${i}`):n[i]=n[o],delete n[o]}return r.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${r.length} explicitly declared route${r.length===1?"":"s"} over a same-named page key (${r.join(", ")}). A bare page NAME never overwrites a declared '/route'. This usually means a shared library ships a page under its export name that collides with one of your routes \u2014 add it to that library's ignoreList if you did not intend the collision.`),n},g1=t=>{ma(t,t.sharedLibraries)};var Hc={polyglot:Tc,getLocalStateLang:Dc,getActiveLang:ur,getLang:ur,setLang:Rc,getLanguages:Ac,loadTranslations:Oc,upsertTranslation:Pc};Zi();var We=Object.create(null);We.open="0";We.close="1";We.ping="2";We.pong="3";We.message="4";We.upgrade="5";We.noop="6";var Wc=Object.create(null);Object.keys(We).forEach(t=>{Wc[We[t]]=t});var qc={type:"error",data:"parser error"};var b1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",_1=typeof ArrayBuffer=="function",x1=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Kc=({type:t,data:e},n,r)=>b1&&e instanceof Blob?n?r(e):m1(e,r):_1&&(e instanceof ArrayBuffer||x1(e))?n?r(e):m1(new Blob([e]),r):r(We[t]+(e||"")),m1=(t,e)=>{let n=new FileReader;return n.onload=function(){let r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function y1(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var z_;function w1(t,e){if(b1&&t.data instanceof Blob)return t.data.arrayBuffer().then(y1).then(e);if(_1&&(t.data instanceof ArrayBuffer||x1(t.data)))return e(y1(t.data));Kc(t,!1,n=>{z_||(z_=new TextEncoder),e(z_.encode(n))})}var S1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<S1.length;t++)Gc[S1.charCodeAt(t)]=t;var k1=t=>{let e=t.length*.75,n=t.length,r,o=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(r=0;r<n;r+=4)s=Gc[t.charCodeAt(r)],i=Gc[t.charCodeAt(r+1)],a=Gc[t.charCodeAt(r+2)],c=Gc[t.charCodeAt(r+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l};var bI=typeof ArrayBuffer=="function",Yc=(t,e)=>{if(typeof t!="string")return{type:"message",data:v1(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:_I(t.substring(1),e)}:Wc[n]?t.length>1?{type:Wc[n],data:t.substring(1)}:{type:Wc[n]}:qc},_I=(t,e)=>{if(bI){let n=k1(t);return v1(n,e)}else return{base64:!0,data:t}},v1=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var C1="",E1=(t,e)=>{let n=t.length,r=new Array(n),o=0;t.forEach((s,i)=>{Kc(s,!1,a=>{r[i]=a,++o===n&&e(r.join(C1))})})},A1=(t,e)=>{let n=t.split(C1),r=[];for(let o=0;o<n.length;o++){let s=Yc(n[o],e);if(r.push(s),s.type==="error")break}return r};function T1(){return new TransformStream({transform(t,e){w1(t,n=>{let r=n.length,o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}var H_;function xd(t){return t.reduce((e,n)=>e+n.length,0)}function wd(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),r=0;for(let o=0;o<e;o++)n[o]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function O1(t,e){H_||(H_=new TextDecoder);let n=[],r=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(xd(n)<1)break;let c=wd(n,1);s=(c[0]&128)===128,o=c[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(xd(n)<2)break;let c=wd(n,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(xd(n)<8)break;let c=wd(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(qc);break}o=f*Math.pow(2,32)+l.getUint32(4),r=3}else{if(xd(n)<o)break;let c=wd(n,o);a.enqueue(Yc(s?c:H_.decode(c),e)),r=0}if(o===0||o>t){a.enqueue(qc);break}}}})}var W_=4;function pt(t){if(t)return xI(t)}function xI(t){for(var e in pt.prototype)t[e]=pt.prototype[e];return t}pt.prototype.on=pt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};pt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};pt.prototype.off=pt.prototype.removeListener=pt.prototype.removeAllListeners=pt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+t],this};pt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this};pt.prototype.emitReserved=pt.prototype.emit;pt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};pt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var On=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Yt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),R1="arraybuffer";function Sd(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}var wI=Yt.setTimeout,SI=Yt.clearTimeout;function Rn(t,e){e.useNativeTimers?(t.setTimeoutFn=wI.bind(Yt),t.clearTimeoutFn=SI.bind(Yt)):(t.setTimeoutFn=Yt.setTimeout.bind(Yt),t.clearTimeoutFn=Yt.clearTimeout.bind(Yt))}var kI=1.33;function P1(t){return typeof t=="string"?vI(t):Math.ceil((t.byteLength||t.size)*kI)}function vI(t){let e=0,n=0;for(let r=0,o=t.length;r<o;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function kd(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function D1(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function L1(t){let e={},n=t.split("&");for(let r=0,o=n.length;r<o;r++){let s=n[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var vd=class extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}},Pn=class extends pt{constructor(e){super(),this.writable=!1,Rn(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,r){return super.emitReserved("error",new vd(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=Yc(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let n=D1(e);return n.length?"?"+n:""}};var Xc=class extends Pn{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};A1(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,E1(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=kd()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}};var I1=!1;try{I1=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var $1=I1;function CI(){}var q_=class extends Xc{constructor(e){if(super(e),typeof location<"u"){let n=location.protocol==="https:",r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){let r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}},gr=class t extends pt{constructor(e,n,r){super(),this.createRequest=e,Rn(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;let n=Sd(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=CI,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};gr.requestsCount=0;gr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",M1);else if(typeof addEventListener=="function"){let t="onpagehide"in Yt?"pagehide":"unload";addEventListener(t,M1,!1)}}function M1(){for(let t in gr.requests)gr.requests.hasOwnProperty(t)&&gr.requests[t].abort()}var EI=(function(){let t=F1({xdomain:!1});return t&&t.responseType!==null})(),mr=class extends q_{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=EI&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new gr(F1,this.uri(),e)}};function F1(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||$1))return new XMLHttpRequest}catch{}if(!e)try{return new Yt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var N1=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",G_=class extends Pn{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,r=N1?{}:Sd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;Kc(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}o&&On(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=kd()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},K_=Yt.WebSocket||Yt.MozWebSocket,yr=class extends G_{createSocket(e,n,r){return N1?new K_(e,n,r):n?new K_(e,n):new K_(e)}doWrite(e,n){this.ws.send(n)}};var Bs=class extends Pn{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let n=O1(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),o=T1();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;this._writer.write(r).then(()=>{o&&On(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var Y_={websocket:yr,webtransport:Bs,polling:mr};var AI=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,TI=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Vs(t){if(t.length>8e3)throw"URI too long";let e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=AI.exec(t||""),s={},i=14;for(;i--;)s[TI[i]]=o[i]||"";return n!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=OI(s,s.path),s.queryKey=RI(s,s.query),s}function OI(t,e){let n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function RI(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}var X_=typeof addEventListener=="function"&&typeof removeEventListener=="function",Cd=[];X_&&addEventListener("offline",()=>{Cd.forEach(t=>t())},!1);var uo=class t extends pt{constructor(e,n){if(super(),this.binaryType=R1,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){let r=Vs(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Vs(n.host).host);Rn(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{let o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=L1(this.opts.query)),X_&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Cd.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=W_,n.transport=e,this.id&&(n.sid=this.id);let r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){let o=this.writeBuffer[r].data;if(o&&(n+=P1(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,On(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let s={type:e,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),X_&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=Cd.indexOf(this._offlineEventListener);r!==-1&&Cd.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};uo.protocol=W_;var Ed=class extends uo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let n=this.createTransport(e),r=!1;uo.priorWebsocketSuccess=!1;let o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;uo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){n&&u.name!==n.name&&s()}let f=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",i),n.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let n=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}},Us=class extends Ed{constructor(e,n={}){let r=typeof e=="object"?e:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>Y_[o]).filter(o=>!!o)),super(e,r)}};var ZU=Us.protocol;function j1(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Vs(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}var rx={};$(rx,{Decoder:()=>ex,Encoder:()=>tx,PacketType:()=>z,isPacketValid:()=>ZI,protocol:()=>X1});var DI=typeof ArrayBuffer=="function",LI=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,B1=Object.prototype.toString,II=typeof Blob=="function"||typeof Blob<"u"&&B1.call(Blob)==="[object BlobConstructor]",$I=typeof File=="function"||typeof File<"u"&&B1.call(File)==="[object FileConstructor]";function Jc(t){return DI&&(t instanceof ArrayBuffer||LI(t))||II&&t instanceof Blob||$I&&t instanceof File}function Zc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Zc(t[n]))return!0;return!1}if(Jc(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Zc(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Zc(t[n]))return!0;return!1}function V1(t){let e=[],n=t.data,r=t;return r.data=Z_(n,e),r.attachments=e.length,{packet:r,buffers:e}}function Z_(t,e){if(!t)return t;if(Jc(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=Z_(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){let n={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=Z_(t[r],e));return n}return t}function U1(t,e){return t.data=J_(t.data,e),delete t.attachments,t}function J_(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=J_(t[n],e);else if(typeof t=="object")for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=J_(t[n],e));return t}var G1=qA(K1(),1),Q_=(0,G1.default)("socket.io-parser"),Y1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],X1=5,z;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(z||(z={}));var tx=class{constructor(e){this.replacer=e}encode(e){return Q_("encoding packet %j",e),(e.type===z.EVENT||e.type===z.ACK)&&Zc(e)?this.encodeAsBinary({type:e.type===z.EVENT?z.BINARY_EVENT:z.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===z.BINARY_EVENT||e.type===z.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),Q_("encoded %j as %s",e,n),n}encodeAsBinary(e){let n=V1(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}},ex=class t extends pt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let r=n.type===z.BINARY_EVENT;r||n.type===z.BINARY_ACK?(n.type=r?z.EVENT:z.ACK,this.reconstructor=new nx(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Jc(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0,r={type:Number(e.charAt(0))};if(z[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===z.BINARY_EVENT||r.type===z.BINARY_ACK){let s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);let i=e.substring(s,n);if(i!=Number(i)||e.charAt(n)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!Z1(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=a}if(e.charAt(n+1)==="/"){let s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(s,n)}else r.nsp="/";let o=e.charAt(n+1);if(o!==""&&Number(o)==o){let s=n+1;for(;++n;){let i=e.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===e.length)break}r.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){let s=this.tryParse(e.substr(n));if(t.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return Q_("decoded %s as %j",e,r),r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case z.CONNECT:return Od(n);case z.DISCONNECT:return n===void 0;case z.CONNECT_ERROR:return typeof n=="string"||Od(n);case z.EVENT:case z.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Y1.indexOf(n[0])===-1);case z.ACK:case z.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},nx=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let n=U1(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function GI(t){return typeof t=="string"}var Z1=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function YI(t){return t===void 0||Z1(t)}function Od(t){return Object.prototype.toString.call(t)==="[object Object]"}function XI(t,e){switch(t){case z.CONNECT:return e===void 0||Od(e);case z.DISCONNECT:return e===void 0;case z.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Y1.indexOf(e[0])===-1);case z.ACK:return Array.isArray(e);case z.CONNECT_ERROR:return typeof e=="string"||Od(e);default:return!1}}function ZI(t){return GI(t.nsp)&&YI(t.id)&&XI(t.type,t.data)}function be(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var JI=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),qs=class extends pt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[be(e,"open",this.onopen.bind(this)),be(e,"packet",this.onpacket.bind(this)),be(e,"error",this.onerror.bind(this)),be(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var r,o,s;if(JI.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let i={type:z.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let f=this.ids++,u=n.pop();this._registerAckCallback(f,u),i.id=f}let a=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var r;let o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...n){return new Promise((r,o)=>{let s=(i,a)=>i?o(i):r(a);s.withError=!0,n.push(s),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());let r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){let r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case z.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case z.EVENT:case z.BINARY_EVENT:this.onevent(e);break;case z.ACK:case z.BINARY_ACK:this.onack(e);break;case z.DISCONNECT:this.ondisconnect();break;case z.CONNECT_ERROR:this.destroy();let r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){let n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,r=!1;return function(...o){r||(r=!0,n.packet({type:z.ACK,id:e,data:o}))}}onack(e){let n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:z.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let r of n)r.apply(this,e.data)}}};function ho(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}ho.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};ho.prototype.reset=function(){this.attempts=0};ho.prototype.setMin=function(t){this.ms=t};ho.prototype.setMax=function(t){this.max=t};ho.prototype.setJitter=function(t){this.jitter=t};var Ks=class extends pt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Rn(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ho({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;let o=n.parser||rx;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Us(this.uri,this.opts);let n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let o=be(n,"open",function(){r.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=be(n,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(be(e,"ping",this.onping.bind(this)),be(e,"data",this.ondata.bind(this)),be(e,"error",this.onerror.bind(this)),be(e,"close",this.onclose.bind(this)),be(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){On(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new qs(this,e,n),this.nsps[e]=r),r}_destroy(e){let n=Object.keys(this.nsps);for(let r of n)if(this.nsps[r].active)return;this._close()}_packet(e){let n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var Qc={};function Gs(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=j1(t,e.path||"/socket.io"),r=n.source,o=n.id,s=n.path,i=Qc[o]&&s in Qc[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Ks(r,e):(Qc[o]||(Qc[o]=new Ks(r,e)),c=Qc[o]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign(Gs,{Manager:Ks,Socket:qs,io:Gs,connect:Gs});D();D();var Rd=new Set(["__proto__","constructor","prototype"]),ox=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Rd.has(t[e]))return!1;return!0},J1=(t,e)=>{!t||!ox(e)||e.reduce((n,r,o,s)=>{if(n&&r in n){if(o!==s.length-1)return n[r];delete n[r]}},t)},Q1=(t,e,n,r=!1)=>{!t||!ox(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&r&&(o[s]={}),o[s];o[s]=n}},t)},Pd=(t,e)=>{let n=new Set;if(!Array.isArray(e))return n;for(let[r,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(n.add(o[0]),r){case"delete":J1(t,o);break;case"update":case"set":Q1(t,o,s,!0);break;default:break}return n},tA=(t,e)=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let n=t&&(t.__raw||t)||{},r=null;for(let o of Object.keys(e))Rd.has(o)||Object.prototype.hasOwnProperty.call(n,o)||(r||(r={}),r[o]=e[o]);return r},tl=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},eA=(t,e,n,r="designSystem")=>{for(let o in e){if(Rd.has(o))continue;let s=`${r}/${o}`;if(n.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}eA(t[o],i,n,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},sx=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};Pd(o,e)}let n=JSON.parse(JSON.stringify(t.__rawDesignSystem)),r=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let o of r){let s=tn(o),i=s?o.library:o,a=i&&i.designSystem;if(!a||typeof a!="object")continue;let c=qn(i.sharedLibIgnore);if(s)for(let l of qn(o.ignoreList))c.add(l);c.has("designSystem")||eA(n,a,c)}return n};D();var nA=(t,e,n)=>{let r=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(n[a]&&typeof n[a]=="object")if(a==="designSystem"){if(tl(n,c),r){let l=sx(n);l&&An(l)}}else Tr(n[a],c);else n[a]=c}),r=!0,i&&(n.schema=i))}},rA=(t,e,n)=>(r={})=>{let{changes:o}=r;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=Pd(n,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=sx(n,s);c?An(c):n.__warnedNoRawDesignSystem||(n.__warnedNoRawDesignSystem=!0,console.warn("[sync] design-system op ignored: no raw design system was seeded on this client. Re-initing from the processed config would corrupt every token, so the update is skipped \u2014 reload to pick it up. Seed it at boot with seedRawDesignSystem(ctx, ds)."))}if(a.has("state")){let c=tA(e,n.state);if(c){let l=typeof e.$update=="function"?e.$update:e.update;typeof l=="function"&&l.call(e,c)}}if(["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=n.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var QI={success:"green",error:"red",warning:"yellow"},oA=(t,e,n)=>{if(t.symbols){if(!n.connected){n.notifications.connected={title:"Connected",message:"to the Symbols live server"},n.update({connected:!0});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}}else if(n.connected){n.notifications.connected={title:"Disconnected",type:"error"},n.update({connected:!1});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}},sA={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:QI[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,n,r)=>{n.update({animation:"fadeInUp"})},onClick:(e,n,r)=>{delete r.notifications[n.key],n.update({animation:"fadeOutDown"}),r.onClose&&r.onClose(e,n,r)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var t$=!1,e$=()=>t$?"http://localhost:8080":"https://api.symbols.app",n$=t=>{let e=t&&t.editor&&t.editor.socketUrl||t&&t.settings&&t.settings.socketUrl;return typeof e=="string"&&e?{mode:"collab",baseUrl:e}:t&&t.editor&&t.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:{mode:null,baseUrl:null}},r$=async t=>{try{let e=t||e$(),n=await C.fetch(`${e}/service-token`,{method:"GET"}),r;try{let o=await n.clone().json();if(o&&typeof o.token=="string")return o.token.trim();r=await n.text()}catch{r=await n.text()}return(r||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},cA=(t,e,n,r)=>{t.on("snapshot",nA(e,n,r)),t.on("ops",rA(e,n,r)),t.on("clients",o=>{r.editor?.verbose&&oA(o,e,n)}),t.on("disconnect",o=>{r.editor?.verbose&&console.info("[sync] disconnected",o)})},o$=async(t,e,n,r)=>{let o=await r$(r);if(!o)return console.warn("[sync] no service token \u2014 collab disabled"),null;let s=n.key;if(!s)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let i=n.editor?.projectId||null,a=Gs(r,{path:"/collab-socket",transports:["websocket"],auth:{token:o,projectId:i,projectKey:s,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return a.on("connect",()=>{n.editor?.verbose&&console.info("[sync] connected (collab)")}),cA(a,t,e,n),a},s$=(t,e,n)=>{let r=Gs({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return r.on("connect",()=>{n.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),cA(r,t,e,n),r.on("reload",()=>{typeof C<"u"&&C.location&&C.location.reload()}),r},i$=async(t,e,n)=>{let{mode:r,baseUrl:o}=n$(n);return r?r==="collab"?o$(t,e,n,o):r==="runner"?s$(t,e,n):null:null},a$={onInit:i$};var lA=t=>typeof t>"u",iA=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),aA=t=>t?.editor?.runtime==="runner",fA=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},uA={name:"sync",beforeCreate(t,e){let n=e&&e.editor;(n&&!lA(n.liveSync)?n.liveSync:iA(e)||aA(e))&&(iA(e)&&!aA(e)&&!e?.key||fA(t,a$))}},dA={name:"notifications",beforeCreate(t,e){if(!e)return;let n=lA(e.notifications)?null:e.notifications,r=e.editor&&e.editor.verbose===!0;(n===!0||n!==!1&&r)&&fA(t,sA)}};var cx={};$(cx,{AlertTemplate:()=>Ud,ConfirmTemplate:()=>Vd,CustomTemplate:()=>Hd,ModalLayer:()=>Bd,ModalRoot:()=>jd,PromptTemplate:()=>zd,windowsComponents:()=>ax});var ix={};$(ix,{alertDialog:()=>Fd,closeAllModals:()=>$d,closeModal:()=>Ld,confirmDialog:()=>Md,getLayer:()=>Dd,openModal:()=>Id,promptDialog:()=>Nd,windowsFunctions:()=>Dn});function Q(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function Ys(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let n=t?.getRoot?.();return n?.ModalRoot?n.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Dd(){return Q(this)}var c$=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.setProperty!="function"||(r.style.setProperty("display","none","important"),r.style.setProperty("opacity","0","important"),r.style.setProperty("visibility","hidden","important"),r.style.setProperty("pointer-events","none","important"))},pA=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.removeProperty!="function"||(r.style.removeProperty("display"),r.style.removeProperty("opacity"),r.style.removeProperty("visibility"),r.style.removeProperty("pointer-events"))};function Ld(t){let e=Ys(this);if(!e)return;let n=e.state?.stack||[];if(!n.length)return;let r,o,s;if(t){if(s=[],r=n.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),r.length===n.length)return;o=n.filter(i=>i.id===t)}else r=n.slice(0,-1),o=n.slice(-1),s=[n.length-1];e.state.update({stack:r});for(let i of s)c$(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Id(t={}){let e=Ys(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let n=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,r={id:n,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},o=e.state?.stack||[];if(o.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=o.length;return pA(e,s),e.state.update({stack:[...o,r]}),n}function $d(){let t=Ys(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Md(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Fd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Nd(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Dn={openModal:Id,closeModal:Ld,closeAllModals:$d,confirmDialog:Md,alertDialog:Fd,promptDialog:Nd,getLayer:Dd};var l$=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),hA=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(l$),n=[];for(let r=0;r<e.length;r++){let o=e[r];(o.offsetParent!==null||o===document.activeElement)&&n.push(o)}return n},gA=t=>{let e=t.state?.stack||[];if(!e.length)return null;let n=t["ModalLayer_"+(e.length-1)];return n?.node||n?.__ref?.node||null},jd={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[0]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[1]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[2]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[3]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[4]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},onInit:(t,e)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=t;let n=t.context;if(n){n.functions||(n.functions={});for(let a in Dn)a in n.functions||(n.functions[a]=Dn[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let r=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},o=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=gA(t);if(!l)return;let f=hA(l);if(!f.length){a.preventDefault();let p=l.querySelector?.('[role="dialog"]')||l;try{p.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],h=document.activeElement;if(!l.contains(h)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&h===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&h===d){a.preventDefault();try{u.focus()}catch{}}return}a.key!=="Escape"||a.defaultPrevented||c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),r())}};window.addEventListener("keydown",o),t.__escHandler=o;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,h)=>h!==a)});let f=t["ModalLayer_"+a],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},i=a=>{let c=t.state?.stack||[];if(!c.length)return;let l=a.target?.closest?.('[data-key="Close"]');if(l){for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f],d=u?.node||u?.__ref?.node;if(d&&d.contains(l)){a.preventDefault(),a.stopPropagation(),s(f);return}}return}for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f];if((u?.node||u?.__ref?.node)===a.target){if(c[f]?.dismissOnBackdrop===!1)return;a.preventDefault(),a.stopPropagation(),s(f);return}}};document.addEventListener("click",i,!0),t.__clickDelegate=i},onUpdate:t=>{if(typeof window>"u")return;let e=(t.state&&t.state.stack||[]).length,n=t.__prevStackLen||0;if(e!==n)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>n)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let r=gA(t);if(!r)return;let o=hA(r)[0]||r.querySelector&&r.querySelector('[role="dialog"]')||r;try{o.focus&&o.focus()}catch{}});else{let r=null;for(let o=n;o>e;o--)t.__modalOpeners[o]&&(r=r||t.__modalOpeners[o]),t.__modalOpeners[o]=null;if(r&&typeof r.focus=="function"&&r.isConnected!==!1)try{r.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var Bd={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",theme:"backdrop",transition:"opacity C defaultBezier",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}},width:t=>Q(t)?.width||"H",maxWidth:t=>Q(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>Q(t)?.maxHeight||"100%",animation:"modalIn",animationDuration:"D",animationTimingFunction:"springBezier",onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>Q(t)?.template!=="confirm"},AlertTemplate:{hide:t=>Q(t)?.template!=="alert"},PromptTemplate:{hide:t=>Q(t)?.template!=="prompt"},CustomTemplate:{hide:t=>Q(t)?.template!=="custom"}}};var Xs=(t,e,n)=>Q(t)?.[e]||n,f$=t=>{let e=Q(t)?.icon;return e===null||e===!1},Vd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>Xs(t,"title","Are you sure?"),attr:{id:t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>f$(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>Xs(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>Xs(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Xs(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=Q(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:t=>Xs(t,"confirmTheme","primary"),text:t=>Xs(t,"confirmText","Confirm"),onClick:(t,e,n)=>{let r=Q(e);if(r?.onConfirm)try{r.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",r?.id)}}}};var el=(t,e,n)=>Q(t)?.[e]||n,Ud={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>el(t,"title","Notice"),attr:{id:t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>el(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!el(t,"message",""),P:{tag:"p",margin:"0",text:t=>el(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>el(t,"okText","OK"),onClick:(t,e,n)=>{let r=Q(e);if(r?.onOk)try{r.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",r?.id)}}}};var Zs=(t,e,n)=>Q(t)?.[e]||n,zd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",scope:{value:""},onRender:(t,e)=>{let n=Q(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},onUpdate:(t,e)=>{let n=Q(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Zs(t,"title","Enter a value"),attr:{id:t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Zs(t,"message",""),P:{tag:"p",margin:"0",text:t=>Zs(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>Zs(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,n)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,n)=>{if(t.key!=="Enter")return;t.preventDefault();let r=Q(e),o=e.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Zs(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=Q(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Zs(t,"confirmText","OK"),onClick:(t,e,n)=>{let r=Q(e),o=e.parent.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}}}};var Hd={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",Title:{tag:"h2",text:t=>Q(t)?.title||"",hide:t=>!Q(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=Q(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",onInit:t=>{let e=G(()=>{let n=Q(t),r=n?.content||null,o=n?.id||null;if(!r){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in Dn)i in s.functions||(s.functions[i]=Dn[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var mA={extends:"Button",theme:"tertiary"};var ax={ModalRoot:jd,ModalLayer:Bd,ConfirmTemplate:Vd,AlertTemplate:Ud,PromptTemplate:zd,CustomTemplate:Hd,"smbls.CancelButton":mA};var hx={};$(hx,{Dropdown:()=>Xd,DropdownList:()=>Zd,DropdownParent:()=>Jd,DropdownParentFocus:()=>Qd,DropdownRoot:()=>Gd,DropdownSiblingFocus:()=>tp,DropdownTrigger:()=>Yd,dropdownComponents:()=>px});var yA=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),u$=(t,e,n,r)=>{let o=yA(t,n,r),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},d$=(t,e,n,r,o)=>{let s=yA(e,r,o),i=t==="top"||t==="bottom"?n.height+8:n.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i||a&&s[a]>s[t]?a:t};var lx=(t,e,n)=>{let r;return t==="bottom"?r=n-e.bottom-16:t==="top"?r=e.top-16:r=n-16,Math.max(40,Math.floor(r))},Wd=(t,e,n)=>Math.max(e,Math.min(n,t)),Ln=(t,e,n="auto")=>{if(!t){let p=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:lx("center",null,p)}}let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(n==="center"){let p=lx("center",t,o),g=Math.min(s.height,p),m=Wd((r-s.width)/2,8,Math.max(8,r-s.width-8)),y=Wd((o-g)/2,8,Math.max(8,o-g-8));return{left:m,top:y,side:"center",align:"center",maxHeight:p}}let i,a;if(n==="auto")i=u$(t,s,r,o),a="start";else{let p=n.split("-");i=p[0],a=p[1]||"start",i=d$(i,t,s,r,o)}let c=lx(i,t,o),l=Math.min(s.height,c),f,u;i==="bottom"||i==="top"?(a==="start"?f=t.left:a==="end"?f=t.right-s.width:f=t.left+(t.width-s.width)/2,u=i==="bottom"?t.bottom+8:t.top-l-8):(a==="start"?u=t.top:a==="end"?u=t.bottom-l:u=t.top+(t.height-l)/2,f=i==="right"?t.right+8:t.left-s.width-8);let d=Math.max(8,r-s.width-8),h=Math.max(8,o-l-8);return f=Wd(f,8,d),u=Wd(u,8,h),{left:f,top:u,side:i,align:a,maxHeight:c}},Js=t=>{switch(t){case"bottom":return"translateY(-6px)";case"top":return"translateY(6px)";case"left":return"translateX(6px)";case"right":return"translateX(-6px)";case"center":return"translateY(0px)";default:return"translateY(-6px)"}};var br={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},p$=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},fx=t=>t?.getRoot?.()?.DropdownRoot||null,h$=0,g$=()=>`dropdown_${++h$}_${Date.now().toString(36)}`;function qd(t={}){let e=fx(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||p$(n);if(!r)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||g$(),s=t.restoreEl?.node||t.restoreEl||n||(typeof document<"u"?document.activeElement:null),i={id:o,content:t.content||null,anchor:r,placement:t.placement||br.placement,trigger:t.trigger||br.trigger,offset:t.offset??br.offset,minWidth:t.minWidth||br.minWidth,maxWidth:t.maxWidth||br.maxWidth,maxHeight:t.maxHeight||br.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,role:t.role||null,ariaLabel:t.ariaLabel||null,ariaLabelledby:t.ariaLabelledby||null,focusIn:!!t.focusIn,onOpen:t.onOpen,onClose:t.onClose,restoreEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return o}function Kd(t){let e=fx(this);if(!e)return;let n=e.state?.layer;n&&e.state.update({layer:{...n,inert:!!t}})}function go(t){let e=fx(this);if(!e)return;let n=e.state?.layer;if(!n)return;let r=typeof t=="string"?t:t?.id;if(r&&n.id&&r!==n.id)return;let o=n.onClose,s=n.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(n)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var ux=(t,e)=>{let n=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${n})`:n},bA=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},m$=`
106
106
  @keyframes smbls-dropdown-fade-in {
107
107
  from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
108
108
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
@@ -169,4 +169,4 @@ ${i}
169
169
  [data-smbls-dropdown="panel"]:not([data-smbls-shadowed]) {
170
170
  box-shadow: none !important;
171
171
  }
172
- `,m$=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=g$,document.head.appendChild(t)},bA=(t,e)=>{if(!t.node)return;let n=e?.background;if(!n)t.node.removeAttribute("data-smbls-surface");else{let r=/^[a-z][\w.+-]*$/i.test(n)?`var(--color-${n})`:n;t.node.style.setProperty("--smbls-dropdown-surface",r),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow||t.scope?.bodyShadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},y$=t=>{if(!t)return null;let e=typeof t.shadow=="function"?t.shadow(t,t.state):t.shadow;return typeof e=="string"&&e?e:null},b$=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},_$=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],_A=(t,e)=>{if(!t.node)return;let n=new Set;for(let[r,o]of _$){let s=e?.[o];s&&(t.node.setAttribute(r,s),n.add(r))}if(t.__a11yAttrs)for(let r of t.__a11yAttrs)n.has(r)||t.node.removeAttribute(r);t.__a11yAttrs=n,t.__panelTabindex&&(t.node.removeAttribute("tabindex"),t.__panelTabindex=!1)},x$='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',w$=t=>{let e=t.node;if(e){for(let n of e.querySelectorAll(x$)){if(n.matches(":disabled"))continue;let r=n.getAttribute("tabindex");if(!(r!==null&&parseInt(r,10)<0)&&(n.focus({preventScroll:!0}),e.ownerDocument.activeElement===n))return}e.setAttribute("tabindex","-1"),t.__panelTabindex=!0,e.focus({preventScroll:!0})}},Gd={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(m$(),typeof window>"u")return;let e=r=>{r.key!=="Escape"||r.defaultPrevented||t.state?.layer&&(r.preventDefault(),go.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let n=r=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(r.target))return;let i=o.anchor;if(i){let a=r.clientX,c=r.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}go.call(t)};document.addEventListener("mousedown",n,!0),t.__dropdownClickHandler=n},onRemove:t=>{typeof window>"u"||(t.__dropdownEscHandler&&window.removeEventListener("keydown",t.__dropdownEscHandler),t.__dropdownClickHandler&&document.removeEventListener("mousedown",t.__dropdownClickHandler,!0))},PanelHost:{tag:"div",position:"fixed",inset:"0",pointerEvents:"none",subscribeTo:["layer"],layer:(t,e)=>e?.layer||null,Panel:{tag:"div",attr:{"data-smbls-dropdown":"panel"},position:"fixed",subscribeTo:["layer"],left:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return In(e.anchor,n,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return In(e.anchor,n,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let n=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":Js(In(e.anchor,n,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>{let e=t.parent?.layer;if(!e?.anchor)return"none";let n=t._lastSize||{width:280,height:200};return fx(e,In(e.anchor,n,e.placement))},overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||t.scope?.bodyShadow||null,scope:{bodyShadow:null},animationDuration:"B",animationTimingFunction:"defaultBezier",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"1":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=G(()=>{let n=t.parent?.layer,r=n?.content||null,o=n?.id||null;if(!r){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null,_A(t,null),t.node?.removeAttribute("data-smbls-open"),t.scope&&(t.scope.bodyShadow=null)}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r)}catch(s){console.warn("[dropdown] content set failed:",s)}t.scope&&(t.scope.bodyShadow=y$(t.content)),bA(t,n),_A(t,n),b$(t),n.focusIn&&w$(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;bA(t,n);let s=t.parent?.layer;if(!s?.anchor)return;let i=yA(t.node);t._lastSize=i;let a=In(s.anchor,i,s.placement);t.node.style.maxHeight=fx(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Js(a.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let n=yA(t.node),r=t._lastSize;(!r||Math.abs(r.width-n.width)>1||Math.abs(r.height-n.height)>1)&&(t._lastSize=n);let o=In(e.anchor,n,e.placement);t.node.style.maxHeight=fx(e,o),t.node.style.left=o.left+"px",t.node.style.top=o.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Js(o.side))}}}};var ux=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let n={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let r in n)n[r]===void 0&&delete n[r];t.call("openDropdown",n)},Yd={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),ux(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&ux(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>ux(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Xd={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},Zd={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},Jd={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Qd={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},tp={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var dx={DropdownRoot:Gd,DropdownTrigger:Yd,Dropdown:Xd,DropdownList:Zd,DropdownParent:Jd,DropdownParentFocus:Qd,DropdownSiblingFocus:tp};var gx={};$(gx,{DROPDOWN_DEFAULTS:()=>br,closeDropdown:()=>go,computePosition:()=>In,dropdownFunctions:()=>hx,fadeInTransform:()=>Js,openDropdown:()=>qd,setDropdownInert:()=>Kd});var hx={openDropdown:qd,closeDropdown:go,setDropdownInert:Kd};var S$=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),k$=(t,e,n,r,o)=>{let s=S$(e,r,o),i=t==="top"||t==="bottom"?n.height+6:n.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},xA=(t,e,n)=>Math.max(e,Math.min(n,t)),wA=(t,e,n="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=k$(n,t,e,r,o),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=xA(i,6,r-e.width-6),a=xA(a,6,o-e.height-6),{left:i,top:a,side:s}},SA=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var ep={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},v$=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},kA=t=>t?.getRoot?.()?.TooltipRoot||null,vA=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},CA=(t,e,n=0)=>{let r=vA(t);if(!r||r.id!==e||r.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(r.text||"")){n<3&&setTimeout(()=>CA(t,e,n+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...r,size:{width:s.width,height:s.height}}})},C$=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},E$=0,A$=()=>`tooltip_${++E$}_${Date.now().toString(36)}`;function EA(t={}){let e=kA(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||v$(n);if(!r)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||A$(),s={id:o,text:t.text||"",anchor:r,placement:t.placement||ep.placement,theme:t.theme||ep.theme,open:!0,size:null};return e.state.update({tip:s}),C$(()=>CA(e,o)),o}function AA(t){let e=kA(this);if(!e)return;let n=vA(e);if(!n||n.open===!1)return;let r=typeof t=="string"?t:t?.id;r&&n.id&&r!==n.id||e.state.update({tip:{...n,open:!1}})}var mx=t=>{let e=t.tip;return e?.anchor?wA(e.anchor,e.size||{width:0,height:0},e.placement):null},np=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},TA={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=mx(t);return e?e.left+"px":"-9999px"},top:t=>{let e=mx(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||ep.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>np(t)?"1":"0",visibility:t=>np(t)?"visible":"hidden",transform:t=>{if(np(t))return"none";let e=mx(t);return SA(e?e.side:"bottom")},transition:t=>{let e=np(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var yx=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},T$=t=>{t.tooltipText&&(yx(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},OA=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,T$(t)},t.tooltipDelay??250))},RA=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},PA={onMouseenter:(t,e)=>OA(e),onMouseleave:(t,e)=>RA(e),onFocus:(t,e)=>OA(e),onBlur:(t,e)=>RA(e),onMouseover:(t,e)=>yx(e),onFocusin:(t,e)=>yx(e)};var DA={display:"flex",theme:"dialog",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},IA={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)},style:t=>{if(!t.scope||!t.scope.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.scope&&t.scope.tooltipOpen]},LA={position:"relative",zIndex:999,scope:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e)=>{t.pointerType!=="touch"||!e.scope||(e.scope.tooltipOpen=!e.scope.tooltipOpen)},onDocumentKeydown:(t,e)=>{t.key!=="Escape"||!e.scope||!e.scope.tooltipOpen||(e.scope.tooltipOpen=!1)},onDocumentPointerdown:(t,e)=>{!e.scope||!e.scope.tooltipOpen||e.node&&e.node.contains(t.target)||(e.scope.tooltipOpen=!1)}};var $A={TooltipRoot:TA,TooltipTrigger:PA,Tooltip:DA,TooltipHidden:IA,TooltipParent:LA};var MA={openTooltip:EA,closeTooltip:AA};var FA=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),NA=t=>tn(t)?t.library!==void 0?t.library:t.key??t.name:t,O$=(t,e)=>{let n=e?.sharedLibraries,r=Array.isArray(n)?n.map(i=>typeof i=="string"?i:i?.key||i?.name):n&&typeof n=="object"?Object.keys(n):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(r&&r[a])return r[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=NA(i);if(!FA(a))return i;let c=s(a);return c?tn(i)?{...i,library:c}:c:null}).filter(Boolean)},_x=new WeakMap,R$={lazy:!0,window:globalThis},bx=t=>{let e=_x.get(t);e&&(_x.delete(t),aE(e))},P$=async(t,e={})=>{let n=e.symbolsConfig,r=n?.owner&&n?.key?`${n.owner}--${n.key}`:n?.key,o=e.key=e.key||r||(S(t)?t:"smblsapp");if(e.define=e.define||Is,e.cssPropsRegistry=wt,e.window=eE(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(p=>{let g=NA(p);return typeof g=="string"||FA(g)})){e.sharedLibraries=O$(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:p}=await Promise.resolve().then(()=>(D(),Wo));e.sharedLibraries=await p(e.sharedLibraries,{apiBaseUrl:I_()})}Y1(e.sharedLibraries),hE(e)}tl(e,e.designSystem);let[s,i]=uE(o,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&$c.prepareContext(e);let a=dE(t,e);if(e.state=a,ea(a),e.pages=pE(t,e),e.components=nE(e),e.utils=rE(e),Hn[e.packageManager]){let h=iE(e);h&&h.deferred?(h.blocking&&await V_({...e,dependencies:h.blocking}),_x.set(e,h.deferred)):e.dependencies=await V_(e)}if(e.methods=oE(e),e.routerOptions=UC(t,e),e.defaultExtends=[Bu],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(p=>!p||typeof p!="object");e.plugins=e.plugins.filter(p=>p&&typeof p=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(p=>JSON.stringify(p)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}e.globalScope&&v(e.globalScope)&&(e.globalScope=wi(e.globalScope));let c=(h,p)=>{let g=p?h[p]:h;if(!v(g))return;let m=_e(g,{},R$);try{Object.assign(g,m)}catch(y){if(p)h[p]=m;else throw y}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(p=>p&&p.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push($s);for(let h in Hc)typeof e.functions[h]!="function"&&(e.functions[h]=Hc[h])}if(f("helmet")||e.plugins.push(s_),e.fetch&&!f("fetch")&&e.plugins.push(mg),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(td),e.cssPropsRegistry.useCapsize=l_),e.shorthand&&!f("shorthand")&&e.plugins.push($c),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=ud(h),e.plugins.push(Fs)}e.sync!==!1&&!f("sync")&&e.plugins.push(fA),e.inspect&&!f("inspect")&&e.plugins.push(P_),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(uA);let d=(h,p,g)=>{if(e[h]!==!1){for(let m in p)v(e.components[m])||(e.components[m]=p[m]);for(let m in g)typeof e.functions[m]!="function"&&(e.functions[m]=g[m])}};return d("windows",ix,Dn),d("dropdown",dx,hx),d("tooltip",$A,MA),e},xx=async(t,e)=>{v(e)||(e={}),pn(t)?(t={},e.parent=t):S(t)?(t={},e.key=t):v(t)||(t={});let n=e.window||(typeof window<"u"?window:null),r=n?.__BRENDER__,o=null;if(r){let c=e.document||(typeof document<"u"?document:null);c&&(o=Array.from(c.head.querySelectorAll("style")))}if(await P$(t,e),e.useReset!==!1){let c=e.document||(typeof document<"u"?document:null);if(c){let l=c.head.querySelector("style[data-smbls]");l||(l=c.createElement("style"),l.setAttribute("data-smbls",""),c.head.appendChild(l));let f=l.sheet;if(f){try{f.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{f.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&v(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=t1(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await cE({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let c of e.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(t,e)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=e.document;if(!s||!s.createElement)return bx(e),t;let i=e.parent||s.body;if(r){let c=D$(re,t,i,e,n,o);return bx(e),c}let a=re(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return bx(e),typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},D$=async(t,e,n,r,o,s)=>{let i=n.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of n.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,n,r.key,{verbose:r.verbose,context:r,...r.domqlOptions});return I$(o),c},I$=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var wx=(t,e)=>ot(t,v(e)?e:{}),L$=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let n=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(n=s)}}catch{}let r=t.themeStorageKey;if(n==="auto"&&r&&typeof localStorage<"u")try{let s=localStorage.getItem(r);s&&(n=s)}catch{}let o=n==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():n;e.setAttribute("data-theme",o),t.globalTheme=n,t.themeRoot=e},$$=()=>{if(typeof document>"u")return null;try{let t=document.querySelector('meta[name="symbols-runtime"]'),e=t&&t.getAttribute("content");return typeof e=="string"&&e?e:null}catch{return null}},jA=t=>{let e=$$();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},Sx=(t,e=fr,n)=>{let r={...fr,...wx(e,n)};return jA(r),L$(r),xx(t,r).then(s=>{if(r_(s,r),s.destroy=()=>Cc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=vc(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&!s.__ref&&s.onCreate(s,s.state,s.context,r),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},M$=(t,e=fr,n)=>{let r=Sx(t,e,n),o={...fr,...wx(e,n)},s=o.key;return qC(r,s,{utils:kc,...o}),r},F$=async(t,e=fr,n)=>{let r={...fr,...wx(e,n)};jA(r);let o=e.key;await WC(o,r);let s=await xx(t,r);return r_(s,r),s.destroy=()=>Cc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=vc(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},r.onCreate&&await r.onCreate(s,s.state,s.context,r),s},N$=(t={},e=fr,n)=>Sx({deps:{isUndefined:Dt},...t},ot({domqlOptions:{onlyResolveExtends:!0}},e),n);qu(sc);W1(void 0,{smbls:kx});q1(void 0,{"@symbo.ls/windows":()=>({...ax,...sx}),"@symbo.ls/dropdown":()=>({...px,...gx})});
172
+ `,y$=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=m$,document.head.appendChild(t)},_A=(t,e)=>{if(!t.node)return;let n=e?.background;if(!n)t.node.removeAttribute("data-smbls-surface");else{let r=/^[a-z][\w.+-]*$/i.test(n)?`var(--color-${n})`:n;t.node.style.setProperty("--smbls-dropdown-surface",r),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow||t.scope?.bodyShadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},b$=t=>{if(!t)return null;let e=typeof t.shadow=="function"?t.shadow(t,t.state):t.shadow;return typeof e=="string"&&e?e:null},_$=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},x$=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],xA=(t,e)=>{if(!t.node)return;let n=new Set;for(let[r,o]of x$){let s=e?.[o];s&&(t.node.setAttribute(r,s),n.add(r))}if(t.__a11yAttrs)for(let r of t.__a11yAttrs)n.has(r)||t.node.removeAttribute(r);t.__a11yAttrs=n,t.__panelTabindex&&(t.node.removeAttribute("tabindex"),t.__panelTabindex=!1)},w$='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',S$=t=>{let e=t.node;if(e){for(let n of e.querySelectorAll(w$)){if(n.matches(":disabled"))continue;let r=n.getAttribute("tabindex");if(!(r!==null&&parseInt(r,10)<0)&&(n.focus({preventScroll:!0}),e.ownerDocument.activeElement===n))return}e.setAttribute("tabindex","-1"),t.__panelTabindex=!0,e.focus({preventScroll:!0})}},Gd={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(y$(),typeof window>"u")return;let e=r=>{r.key!=="Escape"||r.defaultPrevented||t.state?.layer&&(r.preventDefault(),go.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let n=r=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(r.target))return;let i=o.anchor;if(i){let a=r.clientX,c=r.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}go.call(t)};document.addEventListener("mousedown",n,!0),t.__dropdownClickHandler=n},onRemove:t=>{typeof window>"u"||(t.__dropdownEscHandler&&window.removeEventListener("keydown",t.__dropdownEscHandler),t.__dropdownClickHandler&&document.removeEventListener("mousedown",t.__dropdownClickHandler,!0))},PanelHost:{tag:"div",position:"fixed",inset:"0",pointerEvents:"none",subscribeTo:["layer"],layer:(t,e)=>e?.layer||null,Panel:{tag:"div",attr:{"data-smbls-dropdown":"panel"},position:"fixed",subscribeTo:["layer"],left:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return Ln(e.anchor,n,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return Ln(e.anchor,n,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let n=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":Js(Ln(e.anchor,n,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>{let e=t.parent?.layer;if(!e?.anchor)return"none";let n=t._lastSize||{width:280,height:200};return ux(e,Ln(e.anchor,n,e.placement))},overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||t.scope?.bodyShadow||null,scope:{bodyShadow:null},animationDuration:"B",animationTimingFunction:"defaultBezier",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"1":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=G(()=>{let n=t.parent?.layer,r=n?.content||null,o=n?.id||null;if(!r){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null,xA(t,null),t.node?.removeAttribute("data-smbls-open"),t.scope&&(t.scope.bodyShadow=null)}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r)}catch(s){console.warn("[dropdown] content set failed:",s)}t.scope&&(t.scope.bodyShadow=b$(t.content)),_A(t,n),xA(t,n),_$(t),n.focusIn&&S$(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;_A(t,n);let s=t.parent?.layer;if(!s?.anchor)return;let i=bA(t.node);t._lastSize=i;let a=Ln(s.anchor,i,s.placement);t.node.style.maxHeight=ux(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Js(a.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let n=bA(t.node),r=t._lastSize;(!r||Math.abs(r.width-n.width)>1||Math.abs(r.height-n.height)>1)&&(t._lastSize=n);let o=Ln(e.anchor,n,e.placement);t.node.style.maxHeight=ux(e,o),t.node.style.left=o.left+"px",t.node.style.top=o.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Js(o.side))}}}};var dx=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let n={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let r in n)n[r]===void 0&&delete n[r];t.call("openDropdown",n)},Yd={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),dx(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&dx(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>dx(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Xd={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},Zd={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},Jd={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Qd={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},tp={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var px={DropdownRoot:Gd,DropdownTrigger:Yd,Dropdown:Xd,DropdownList:Zd,DropdownParent:Jd,DropdownParentFocus:Qd,DropdownSiblingFocus:tp};var mx={};$(mx,{DROPDOWN_DEFAULTS:()=>br,closeDropdown:()=>go,computePosition:()=>Ln,dropdownFunctions:()=>gx,fadeInTransform:()=>Js,openDropdown:()=>qd,setDropdownInert:()=>Kd});var gx={openDropdown:qd,closeDropdown:go,setDropdownInert:Kd};var k$=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),v$=(t,e,n,r,o)=>{let s=k$(e,r,o),i=t==="top"||t==="bottom"?n.height+6:n.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},wA=(t,e,n)=>Math.max(e,Math.min(n,t)),SA=(t,e,n="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=v$(n,t,e,r,o),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=wA(i,6,r-e.width-6),a=wA(a,6,o-e.height-6),{left:i,top:a,side:s}},kA=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var ep={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},C$=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},vA=t=>t?.getRoot?.()?.TooltipRoot||null,CA=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},EA=(t,e,n=0)=>{let r=CA(t);if(!r||r.id!==e||r.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(r.text||"")){n<3&&setTimeout(()=>EA(t,e,n+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...r,size:{width:s.width,height:s.height}}})},E$=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},A$=0,T$=()=>`tooltip_${++A$}_${Date.now().toString(36)}`;function AA(t={}){let e=vA(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||C$(n);if(!r)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||T$(),s={id:o,text:t.text||"",anchor:r,placement:t.placement||ep.placement,theme:t.theme||ep.theme,open:!0,size:null};return e.state.update({tip:s}),E$(()=>EA(e,o)),o}function TA(t){let e=vA(this);if(!e)return;let n=CA(e);if(!n||n.open===!1)return;let r=typeof t=="string"?t:t?.id;r&&n.id&&r!==n.id||e.state.update({tip:{...n,open:!1}})}var yx=t=>{let e=t.tip;return e?.anchor?SA(e.anchor,e.size||{width:0,height:0},e.placement):null},np=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},OA={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=yx(t);return e?e.left+"px":"-9999px"},top:t=>{let e=yx(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||ep.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>np(t)?"1":"0",visibility:t=>np(t)?"visible":"hidden",transform:t=>{if(np(t))return"none";let e=yx(t);return kA(e?e.side:"bottom")},transition:t=>{let e=np(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var bx=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},O$=t=>{t.tooltipText&&(bx(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},RA=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,O$(t)},t.tooltipDelay??250))},PA=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},DA={onMouseenter:(t,e)=>RA(e),onMouseleave:(t,e)=>PA(e),onFocus:(t,e)=>RA(e),onBlur:(t,e)=>PA(e),onMouseover:(t,e)=>bx(e),onFocusin:(t,e)=>bx(e)};var LA={display:"flex",theme:"dialog",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},IA={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)},style:t=>{if(!t.scope||!t.scope.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.scope&&t.scope.tooltipOpen]},$A={position:"relative",zIndex:999,scope:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e)=>{t.pointerType!=="touch"||!e.scope||(e.scope.tooltipOpen=!e.scope.tooltipOpen)},onDocumentKeydown:(t,e)=>{t.key!=="Escape"||!e.scope||!e.scope.tooltipOpen||(e.scope.tooltipOpen=!1)},onDocumentPointerdown:(t,e)=>{!e.scope||!e.scope.tooltipOpen||e.node&&e.node.contains(t.target)||(e.scope.tooltipOpen=!1)}};var MA={TooltipRoot:OA,TooltipTrigger:DA,Tooltip:LA,TooltipHidden:IA,TooltipParent:$A};var FA={openTooltip:AA,closeTooltip:TA};var NA=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),jA=t=>tn(t)?t.library!==void 0?t.library:t.key??t.name:t,R$=(t,e)=>{let n=e?.sharedLibraries,r=Array.isArray(n)?n.map(i=>typeof i=="string"?i:i?.key||i?.name):n&&typeof n=="object"?Object.keys(n):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(r&&r[a])return r[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=jA(i);if(!NA(a))return i;let c=s(a);return c?tn(i)?{...i,library:c}:c:null}).filter(Boolean)},xx=new WeakMap,P$={lazy:!0,window:globalThis},_x=t=>{let e=xx.get(t);e&&(xx.delete(t),c1(e))},D$=async(t,e={})=>{let n=e.symbolsConfig,r=n?.owner&&n?.key?`${n.owner}--${n.key}`:n?.key,o=e.key=e.key||r||(k(t)?t:"smblsapp");if(e.define=e.define||Ls,e.cssPropsRegistry=wt,e.window=n1(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(p=>{let g=jA(p);return typeof g=="string"||NA(g)})){e.sharedLibraries=R$(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:p}=await Promise.resolve().then(()=>(D(),Wo));e.sharedLibraries=await p(e.sharedLibraries,{apiBaseUrl:I_()})}XE(e.sharedLibraries),g1(e)}tl(e,e.designSystem);let[s,i]=d1(o,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&$c.prepareContext(e);let a=p1(t,e);if(e.state=a,ea(a),e.pages=h1(t,e),e.components=r1(e),e.utils=o1(e),Hn[e.packageManager]){let h=a1(e);h&&h.deferred?(h.blocking&&await U_({...e,dependencies:h.blocking}),xx.set(e,h.deferred)):e.dependencies=await U_(e)}if(e.methods=s1(e),e.routerOptions=zC(t,e),e.defaultExtends=[Bu],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(p=>!p||typeof p!="object");e.plugins=e.plugins.filter(p=>p&&typeof p=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(p=>JSON.stringify(p)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}e.globalScope&&v(e.globalScope)&&(e.globalScope=wi(e.globalScope));let c=(h,p)=>{let g=p?h[p]:h;if(!v(g))return;let m=_e(g,{},P$);try{Object.assign(g,m)}catch(y){if(p)h[p]=m;else throw y}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(p=>p&&p.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push($s);for(let h in Hc)typeof e.functions[h]!="function"&&(e.functions[h]=Hc[h])}if(f("helmet")||e.plugins.push(i_),e.fetch&&!f("fetch")&&e.plugins.push(mg),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(td),e.cssPropsRegistry.useCapsize=f_),e.shorthand&&!f("shorthand")&&e.plugins.push($c),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=ud(h),e.plugins.push(Fs)}e.sync!==!1&&!f("sync")&&e.plugins.push(uA),e.inspect&&!f("inspect")&&e.plugins.push(D_),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(dA);let d=(h,p,g)=>{if(e[h]!==!1){for(let m in p)v(e.components[m])||(e.components[m]=p[m]);for(let m in g)typeof e.functions[m]!="function"&&(e.functions[m]=g[m])}};return d("windows",ax,Dn),d("dropdown",px,gx),d("tooltip",MA,FA),e},wx=async(t,e)=>{v(e)||(e={}),pn(t)?(t={},e.parent=t):k(t)?(t={},e.key=t):v(t)||(t={});let n=e.window||(typeof window<"u"?window:null),r=n?.__BRENDER__,o=null;if(r){let c=e.document||(typeof document<"u"?document:null);c&&(o=Array.from(c.head.querySelectorAll("style")))}if(await D$(t,e),e.useReset!==!1){let c=e.document||(typeof document<"u"?document:null);if(c){let l=c.head.querySelector("style[data-smbls]");l||(l=c.createElement("style"),l.setAttribute("data-smbls",""),c.head.appendChild(l));let f=l.sheet;if(f){try{f.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{f.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&v(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=eE(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await l1({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let c of e.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(t,e)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=e.document;if(!s||!s.createElement)return _x(e),t;let i=e.parent||s.body;if(r){let c=L$(re,t,i,e,n,o);return _x(e),c}let a=re(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return _x(e),typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},L$=async(t,e,n,r,o,s)=>{let i=n.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of n.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,n,r.key,{verbose:r.verbose,context:r,...r.domqlOptions});return I$(o),c},I$=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Sx=(t,e)=>ot(t,v(e)?e:{}),$$=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let n=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(n=s)}}catch{}let r=t.themeStorageKey;if(n==="auto"&&r&&typeof localStorage<"u")try{let s=localStorage.getItem(r);s&&(n=s)}catch{}let o=n==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():n;e.setAttribute("data-theme",o),t.globalTheme=n,t.themeRoot=e},M$=()=>{if(typeof document>"u")return null;try{let t=document.querySelector('meta[name="symbols-runtime"]'),e=t&&t.getAttribute("content");return typeof e=="string"&&e?e:null}catch{return null}},BA=t=>{let e=M$();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},kx=(t,e=fr,n)=>{let r={...fr,...Sx(e,n)};return BA(r),$$(r),wx(t,r).then(s=>{if(r_(s,r),s.destroy=()=>Cc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=vc(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&!s.__ref&&s.onCreate(s,s.state,s.context,r),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},F$=(t,e=fr,n)=>{let r=kx(t,e,n),o={...fr,...Sx(e,n)},s=o.key;return KC(r,s,{utils:kc,...o}),r},N$=async(t,e=fr,n)=>{let r={...fr,...Sx(e,n)};BA(r);let o=e.key;await qC(o,r);let s=await wx(t,r);return r_(s,r),s.destroy=()=>Cc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=vc(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},r.onCreate&&await r.onCreate(s,s.state,s.context,r),s},j$=(t={},e=fr,n)=>kx({deps:{isUndefined:Dt},...t},ot({domqlOptions:{onlyResolveExtends:!0}},e),n);qu(sc);qE(void 0,{smbls:vx});KE(void 0,{"@symbo.ls/windows":()=>({...cx,...ix}),"@symbo.ls/dropdown":()=>({...hx,...mx})});