smbls 3.14.668 → 3.14.671

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # smbls
2
2
 
3
+ ## 3.14.671
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated cross-repo patch release.
8
+
3
9
  ## 3.14.668
4
10
 
5
11
  ### Patch Changes
package/dist/smbls.cjs CHANGED
@@ -40,7 +40,7 @@ FROM ${a}${l}`},_w=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
40
40
  `);for(let g=0;g<h.length;g++)h[g]&&Kt(h[g])}s.push(u)}else if(n)for(let c=0;c<n.length;c+=2)s.push(Pm(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(S0(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Ld=new Map;function S0(t,e,r){let n=JSON.stringify(e),o=t.indexOf(":hover")!==-1||n.indexOf(":hover")!==-1,s=o&&jd(),i=(r?r+"":"")+t+n+(o&&!s?"rawhover":""),a=Or.get(i);if(a){let p=Ld.get(a);if(p)for(let m=0;m<p.length;m++)Kt(p[m]);return a}a=r?`_${r}_c${sc(i)}`:`_c${sc(i)}`;let c="",l=[],f=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),u=(p,m)=>{let b="";for(let x in m){let y=m[x];if(y!=null)if(typeof y=="object")u([...p,x],y);else{if(f(y))continue;b+=pn(Rr(x),y)}}b&&(p.length===0?c+=b:l.push({chain:p,body:b}))};u([],e);let d=p=>{if(!p.length)return`.${a}`;let m=p[0].split(",").map(b=>b.trim()).map(b=>b.includes("&")?b.replace(/&/g,`.${a}`):b.startsWith(":")?`.${a}${b}`:`.${a} ${b}`);for(let b=1;b<p.length;b++){let x=p[b].split(",").map(_=>_.trim()),y=[];for(let _ of m)for(let v of x)v.includes("&")?y.push(v.replace(/&/g,_)):v.startsWith(":")?y.push(_+v):y.push(_+" "+v);m=y}return m.join(", ")},h=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(c){let p=`${t}{.${a}{${c}}}`;h.push(p),Kt(p)}for(let p of l){let m=d(p.chain),b=ie(`${t}{${m}{${p.body}}}`,m,s);h.push(b),Kt(b)}return Ld.set(a,h),Or.set(i,a),a}let g=d([t]);if(c){let p=ie(`${g}{${c}}`,g,s);h.push(p),Kt(p)}for(let p of l){let m=d([t,...p.chain]),b=ie(`${m}{${p.body}}`,m,s);h.push(b),Kt(b)}return Ld.set(a,h),Or.set(i,a),a}function ut(t){if(Fm(),typeof t=="string"){Kt(t);return}let e=jd(),r=Object.keys(t),n=o=>{let s=o.match(/max-width:\s*(\d+)/);return s?parseInt(s[1]):0};r.sort((o,s)=>{let i=o.startsWith("@media"),a=s.startsWith("@media");return!i&&!a?0:i?a?n(s)-n(o):1:-1});for(let o of r){let s=t[o];if(o.startsWith("@media")||o.startsWith("@supports"))for(let i in s){let a=s[i];if(typeof a=="object"&&a!==null){let c="";for(let l in a){let f=l.startsWith("--")?l:Rr(l);c+=pn(f,a[l])}Kt(ie(`${o}{${i}{${c}}}`,i,e))}else{let c=i.startsWith("--")?i:Rr(i);Kt(`${o}{${pn(c,a)}}`)}}else{let i="",a=!1;for(let c in s){let l=s[c];if(typeof l=="object"&&l!==null)a=!0;else{let f=c.startsWith("--")?c:Rr(c);i+=pn(f,l)}}if(i&&Kt(ie(`${o}{${i}}`,o,e)),a){let c=[],l=[];for(let f in s)typeof s[f]=="object"&&s[f]!==null&&(f.startsWith("@media")||f.startsWith("@supports")?c.push(f):l.push(f));c.sort((f,u)=>{let d=h=>{let g=h.match(/max-width:\s*(\d+)/);return g?parseInt(g[1]):0};return d(u)-d(f)});for(let f of l)ut({[`${o} ${f}`]:s[f]});for(let f of c)ut({[f]:{[o]:s[f]}})}}}}function hn(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=pn(Rr(s),e[n][s]);r+=`${n}{${o}}`}return Kt(`@keyframes ${t}{${r}}`),t}function Lm(){Or.clear(),Dm=null}function Bd(){return Or.size}O();var vp={};I(vp,{DELEGATED_EVENTS:()=>xn,LIFECYCLE_EVENTS:()=>rr,MIXINS:()=>ac,NON_BUBBLING_EVENTS:()=>cc,REGISTRY:()=>kt,SVG_TAGS:()=>yn,addDelegatedEvent:()=>Hs,addMethods:()=>vn,applyExtends:()=>Sn,cacheNode:()=>er,create:()=>Yt,createHTMLNode:()=>mn,detectTag:()=>tr,dispose:()=>nr,flushMounts:()=>pc,isSvgTag:()=>bn,isValidTag:()=>gn,registerEvent:()=>_n,remove:()=>kn,removeDelegatedEvent:()=>qs,update:()=>wn});var Ud="http://www.w3.org/2000/svg",yn=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"]),w0=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 gn(t){return w0.has(t)||yn.has(t)}function bn(t){return yn.has(t)}function tr(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&gn(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),gn(o)&&!n.has(o)?o:"div"}var Mm={};function mn(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(bn(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===Ud)return r.createElementNS(Ud,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function er(t){let e=t.tag=tr(t),n=bn(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Ud)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Mm[n];if(s||(s=Mm[n]=mn(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?mn(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var kt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),ac={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},rr=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"]),cc=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"]),Nm=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),xn=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 zd=new WeakMap,k0={passive:!0},v0={passive:!0,capture:!0},Wd=(t,e)=>Nm.has(t)?e?v0:k0:e||!1;function Bm(t){let e=zd.get(t);return e||(e={handlers:new Map,installed:new Set},zd.set(t,e)),e}function C0(t,e){let r=Bm(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},Wd(t,n))}function Hs(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=Bm(n);C0(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function qs(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=zd.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function jm(t){return xn.has(t)&&!rr.has(t)}function _n(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=c=>{s&&et(s);try{let l=r.call(e,c,e,e.state,o);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&J()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&J()},a=cc.has(t);if(!a&&jm(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Hs(t,n,i,c)}else n.addEventListener(t,i,Wd(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!a&&jm(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;qs(t,n,c)}else n.removeEventListener(t,i,Wd(t,!1))})}function Vm(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 Sn(t,e,r){let n=Vm(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=Um(n[i],s);a&&a!==e&&zm(t,a,r,new Set([e]))}}function Um(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function zm(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Vm(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=Um(o[a],i);c&&zm(t,c,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Wm(t[s],i):t[s]=i}}function Wm(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Wm(o,s):r[n]=s}return r}qr();function wn(t={},e={}){let r=this,n=r.__ref;if(!n)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;let o=!t||Object.keys(t).length===0;if(Ce(()=>{if(t.state&&st(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,i===!0?"":i)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(kt.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&Yt(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&o&&n.__effects&&n.__effects.length)for(let s=0;s<n.__effects.length;s++){let i=n.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&n.__conditionalRunners)for(let s of n.__conditionalRunners)s();return xt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function nr(t){if(!t)return;let e=t.__ref;if(!e)return;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(n){console.error("[smbls] onBeforeRemove error:",n)}if(e.__effects){for(let n=0;n<e.__effects.length;n++)e.__effects[n].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let n=0;n<e.__eventCleanup.length;n++)e.__eventCleanup[n]();e.__eventCleanup.length=0}if(e.__children){for(let n=0;n<e.__children.length;n++){let o=e.__children[n],s=t[o];s&&s.__ref&&nr(s)}e.__children.length=0}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 n=t.parent.__ref.__children.indexOf(t.key);n!==-1&&t.parent.__ref.__children.splice(n,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(n){console.error("[smbls] onRemove error:",n)}t.node=null,t.parent=null,t.__ref=null}function kn(){nr(this)}function Gs(t){let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let r=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof r=="string"&&r?r==="localhost"||r==="127.0.0.1"||r.endsWith(".localhost"):!1}O();O();var A0=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],E0=["none","forwards","backwards","both"],T0=["normal","reverse","alternate","alternate-reverse"],O0=["running","paused"],R0=t=>/^[\d.]+m?s$/.test(t),P0=0,Hm=new Map,Hd=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(w(t)){let o=JSON.stringify(t),s=Hm.get(o);if(s)return s;let i=`smbls-anim-${P0++}`,a=hn(i,t);return Hm.set(o,a),a}let n=r&&r[t];return w(n)?hn(t,n):t},$0=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:R0(u)?s.push(u):A0.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):T0.includes(u)?c=u:E0.includes(u)?l=u:O0.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},qd={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=$0(t,e);return{animationName:Hd(r.name||t,e),animationDuration:r.durations[0]||Mt(e.animationDuration||"A").timing,animationDelay:r.durations[1]||Mt(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Gt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:Hd(t,e),animationDuration:Mt(e.animationDuration||"A").timing,animationDelay:Mt(e.animationDelay||"0s").timing,animationTimingFunction:Gt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Hd(t,e)}),animationDuration:t=>({animationDuration:Mt(t).timing}),animationDelay:t=>({animationDelay:Mt(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Gt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};O();var Gd={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=>pt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...lt("height",e),...lt("width",r||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,r]=t.split(" ");return{...lt("minWidth",e),...lt("maxWidth",r||e)}},minHeight:(t,e)=>L("minHeight",t,e),maxHeight:(t,e)=>L("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...lt("minHeight",e),...lt("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...L("inlineSize",e),...L("blockSize",r||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,r]=t.split(" ");return{...lt("minInlineSize",e),...lt("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...lt("maxInlineSize",e),...lt("maxBlockSize",r||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),padding:(t,e)=>L("padding",t,e),scrollPadding:(t,e)=>L("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...lt("paddingInlineStart",e),...lt("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...lt("paddingBlockStart",e),...lt("paddingBlockEnd",r||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,r]=t.split(" ");return{...lt("marginInlineStart",e),...lt("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...lt("marginBlockStart",r),...lt("marginBlockEnd",n||r)}},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),gap:t=>({gap:ec(t)}),columnGap:(t,e)=>se(e,"columnGap",t),rowGap:(t,e)=>se(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>zs(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>zs(t??e.round,e,"borderRadius")};var Kd={fontSize:t=>Os(t)||t,fontFamily:t=>({fontFamily:Es(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 Yd={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var Xd={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>dt(r,"k").k).join(" ")}},left:t=>dt(t,"left"),top:t=>dt(t,"top"),right:t=>dt(t,"right"),bottom:t=>dt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>dt(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>dt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};O();var Jt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},Xt=(t,e)=>{if(e==null||e==="")return;if(!w(e))return{[t]:e};let r={},n=!1;for(let o in e){let s=e[o];s==null||s===""||w(s)||(r[o]={[t]:s},n=!0)}return n?r:void 0},Jd={theme:(t,e)=>{if(t)return e.themeModifier?qt(t,`@${e.themeModifier}`):qt(t)},color:(t,e)=>{let r=Jt(e);if(t)return Xt("color",yt(t,r))},background:(t,e)=>{let r=Jt(e);if(t)return S(t)&&t.includes("gradient")&&t.includes("(")?{background:Vs(t,r)}:Xt("background",yt(t,r))},backgroundColor:(t,e)=>{let r=Jt(e);if(t)return Xt("backgroundColor",yt(t,r))},backgroundImage:(t,e,r,n)=>{let o=Jt(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return Xt("backgroundImage",tc(t,o))},textStroke:t=>({WebkitTextStroke:Za(t)}),outline:t=>({outline:we(t)}),outlineOffset:(t,e)=>L("outlineOffset",t,e),border:t=>({border:we(t)}),borderColor:(t,e)=>{let r=Jt(e);if(t)return Xt("borderColor",yt(t,r))},borderTopColor:(t,e)=>{let r=Jt(e);if(t)return Xt("borderTopColor",yt(t,r))},borderBottomColor:(t,e)=>{let r=Jt(e);if(t)return Xt("borderBottomColor",yt(t,r))},borderLeftColor:(t,e)=>{let r=Jt(e);if(t)return Xt("borderLeftColor",yt(t,r))},borderRightColor:(t,e)=>{let r=Jt(e);if(t)return Xt("borderRightColor",yt(t,r))},borderLeft:t=>({borderLeft:we(t)}),borderTop:t=>({borderTop:we(t)}),borderRight:t=>({borderRight:we(t)}),borderBottom:t=>({borderBottom:we(t)}),shadow:(t,e)=>{let r=Jt(e);if(t)return Xt("boxShadow",Qa(t,r))},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=Jt(e),s=n?" !important":"",i=Bs(r.trim(),o);return S(i)?{boxShadow:i+s}:Xt("boxShadow",i)},textShadow:(t,{context:e})=>Xt("textShadow",Bs(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:we(t)})};var Ks={transition:t=>({transition:rc(t)}),transitionDuration:t=>({transitionDuration:Us(t)}),transitionDelay:t=>({transitionDelay:Us(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Gt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};O();var Zd={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var Qd={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var mt={...qd,...Gd,...Kd,...Yd,...Xd,...Jd,...Ks,...Zd,...Qd};var _t=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);O();var I0=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,D0=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=jt(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(I0),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},qm=(t,e,r)=>({[t]:jt(e,r)}),Ys=(t,e,r)=>{let n=`&${t}`,o=jt(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},tp=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return C(r)?r.call(e,e):!!r},F0=(t,e,r)=>{let n=t.slice(1),o=tp(n,r);if(o===void 0&&(o=!!r[n]),!!o)return jt(e,r)},L0=(t,e,r)=>({[t]:e}),M0=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=tp(n,r);s!==void 0&&(o=s)}if(o)return jt(e,r)},N0=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=tp(n,r);s!==void 0&&(o=s)}if(!o)return jt(e,r)},ep=(t,e)=>jt(t,e),rp={"@":D0,":":Ys,"[":Ys,"*":Ys,"+":Ys,"~":Ys,"&":qm,">":qm,$:F0,"-":L0,".":M0,"!":N0};var np=Ue(),Gm=(t,e,r)=>{let n=e?.context?.designSystem;n&&et(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>it(d,f[h]),{});o.designSystemClass=u}}else if(a==="true"){let l=tt(c,e);it(o,ep(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=C(l)?l(e,e.state,e.context):l;f&&i(a,f),!np&&w(o[a])&&(o[a].label=a)}else if(mt[a]){let l=tt(c,e);E(l)&&(l=l.reduce((u,d)=>it(u,d),{}));let f=mt[a](l,e,e.state,e.context);E(f)&&(f=f.reduce((u,d)=>it(u,d),{})),f&&i(a,f),!np&&w(o[a])&&(o[a].label=a)}else if(_t.has(a)){let l=tt(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),i(a,{[a]:l}),!np&&w(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&J()}},Km=(t,e)=>{let r={};for(let n in t){let o=rp[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Rt(r[i],s[i]):r[i]=s[i])}}return r},jt=(t,e,r={unpack:!0})=>{let[n,o]=Gm(t,e,r),s=Km(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return lo(n,s);n._selectors=s}return n},j0=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};O();var Ym=t=>{if(w(t))return jt(t,t)},B0=(t,e)=>{let r=Ym(t);return typeof e=="function"?e(r):ae(r)};O();function op(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}var Xm=new Set;function V0(t,e,r){let n=String(e);if(Xm.has(n))return;Xm.add(n);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \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('${n}') at <${s}>: "${n}" ${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.`;op(t,"error",[a]),console.error(a)}function U0(...t){return op(this,"warn",t),Yo.apply(this,t)}function z0(...t){return op(this,"error",t),vr.apply(this,t)}var Jm={update:wn,remove:kn,getDB:Qo,getQuery:ts,getRootData:qo,getChildren:Vo,getPath:Uo,nextElement:Xo,previousElement:Jo,verbose:Jr,warn:U0,error:z0,variables:Zo,spotByPath:Bo,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let n=this.context?.__create;n&&n(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let n=r.__setQueued;n&&(r.__setQueued=null,this.set(n.content,n.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Ho,getRootState:Wo,getRootContext:Go,getContext:Ko,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e);Gs()&&V0(this,t,n)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},Zm=new WeakMap;function W0(t){if(!t)return Jm;let e=Zm.get(t);if(e)return e;e=Object.create(Jm);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return Zm.set(t,e),e}function vn(t){let e=W0(t.context);Object.setPrototypeOf(t,e)}O();qr();var lp={};I(lp,{STATE_METHODS:()=>Qm,applyInitialState:()=>fc,applyStateMethods:()=>Bt,callStateMethod:()=>Xs,createState:()=>ip,isTracking:()=>cp,useHostState:()=>ap});var Qm=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"]),lc=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},ce=(t,e,r,{onlyIfAbsent:n,host:o}={})=>{lc(t,"$"+e,r),!(n&&o&&o[e]!==void 0)&&lc(t,e,r)},Xs=(t,e,...r)=>{if(!t)return;let n=t["$"+e];if(typeof n=="function")return n.apply(t,r);let o=t[e];if(typeof o=="function")return o.apply(t,r)},Bt=(t,e)=>{if(st(e)){let o=e.__raw||e;ce(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0,host:e}),ce(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0,host:e}),ce(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}),ce(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}),ce(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}),ce(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),ce(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),ce(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),ce(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&st(a.parent);)a=a.parent;return Xs(a,"update",s,i)}),ce(o,"parentUpdate",function(s,i={}){if(e.parent)return Xs(e.parent,"update",s,i)}),ce(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 r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return r(),e}};for(let o in n)if(lc(e,"$"+o,n[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){hr(o,"");continue}lc(e,o,n[o])}};var ip=function(t,e,r){return t.state=fc(t,e,r),t.state},fc=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return Bt(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",H0(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=Lt({value:o});return s.__element=t,e?.state&&(s.parent=e.state),Bt(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!st(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=Lt({...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)),Bt(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return st(o)?(o.__element=t,o):e?.state||{}};function sp(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function H0(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?sp(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?sp(o,s):o??{}}let n=sp(r.state,t);if(n&&typeof n=="object"&&!st(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var ap=(t,e)=>{if(!t)return ey;let r=G0(t,e);return!r||!r.state?ey:Y0(r.state)},cp=()=>dr()!=null,q0=128;function G0(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<q0&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var K0={get(t,e){return t[e]}},ty=new WeakMap,Y0=t=>{let e=ty.get(t);return e||(e=new Proxy(t,K0),ty.set(t,e)),e},ey=new Proxy(Object.create(null),{get(){},has(){return!1}});O();var X0=["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"],uc={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"]},ny=["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"],dp=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,sr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||dp(e)||uc.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(uc,t)?uc[t].includes(e):!1,pp=t=>{if(!S(t))return!1;let e=t.toLowerCase();return ny.includes(e)},J0=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])Tt(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(Tt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=sr(t,o),i=pp(o);if(Tt(e[o])&&(s||i)){let a=dp(o)||o;n[a]=e[o]}}return n},Z0=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},or=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},fp=(t,e)=>{let r=(t.preSrc||"")+(or(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},up={src:t=>fp(t,t.src),href:t=>or(t,t.href),action:t=>or(t,t.action),poster:t=>fp(t,t.poster),data:t=>or(t,t.data)},hp=t=>{let e=t.tag||"div",r={};for(let n in up)if(t[n]!==void 0&&sr(e,n)){let o=up[n](t);o!==void 0&&(r[n]=o)}return r},ry=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return C(r)?r.call(e,e):!!r},Q0=(t,e,r)=>{if(t==="$"){let o=ry(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=ry(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},tk=new Set(["$",".","!"]),ek=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(Q0(a,c,f))return C(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!tk.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let 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 g=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase());o("data-"+g,a[l][h],i,c)}continue}let f=sr(e,l),u=pp(l);if(!f&&!u)continue;let d=dp(l)||l;o(d,a[l],i,c)}}return n};var rk=1,dc=[],bp=!1;function nk(){bp||(bp=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(pc):setTimeout(pc,0))}function pc(){if(bp=!1,!dc.length)return;let t=dc.splice(0,dc.length);for(let e=0;e<t.length;e++){let r=t[e];!r.node||!r.node.isConnected||De("Mounted",r,r.__ref?.__mountOptions||{})}}function ly(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,dc.push(t),nk())}function oy(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&xt("contentUpdate",t,e);let r=t.context?.designSystem;r&&et(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(t.context?.plugins?.length&&xt("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{r&&J()}}function An(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function ok(t){return t.charAt(2).toLowerCase()+t.slice(3)}function sk(t){return t.toLowerCase()}function sy(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Zs(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Zs(o,s):r[n]=s}return r}function Yt(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${rk++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=Yt);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key]};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_");if(p>0){let m=r.substring(0,p),b=s.context?.components;b&&(b[m]||b["smbls."+m])?t={...t,extends:m}:b&&Gs()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Sn(s,t,n);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],b=s[p],x=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";x&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=Zs(b,m):x&&a.has(p)?s[p]={...b,...m}:x&&sy(p)?s[p]=Zs(b,m):s[p]=m}function l(p){for(let m in p){let b=p[m],x=s[m],y=x&&b&&typeof x=="object"&&typeof b=="object"&&!Array.isArray(x)&&!Array.isArray(b)&&typeof x!="function"&&typeof b!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Zs(x,b):y&&a.has(m)?s[m]={...x,...b}:y&&sy(m)?s[m]=Zs(x,b):s[m]=b}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=qn(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),vn(s),ik(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let b=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&dy(s,i,s.if),s;s.tag||(s.tag=tr(s)),De("Init",s,n);let g=s.node=er(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}De("AttachNode",s,n),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),gy(s,n),uy(s),xp(s),py(s),mk(s);try{my(s,n)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
41
41
  `+p.stack.split(`
42
42
  `).slice(0,6).join(`
43
- `):"")}}if(Sp(s,!0),wp(s,e,o),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&et(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&J()}}if(De("Create",s,n),De("Complete",s,n),De("Render",s,n),De("RenderRouter",s,n),ly(s,n),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,b=()=>{if(s.node){if(s.node.isConnected){m&&et(m);try{p(s,s.state,s.context)}catch(x){console.error("[DOMQL] onFrame error:",x)}finally{m&&J()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return s}function ik(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!st(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Bt(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=a.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let h in u)c[h]===void 0&&(c[h]=u[h]);let d=new Set(l.languages||[]);for(let h in l.translations)!d.has(h)&&c[h]===void 0&&(c[h]=l.translations[h])}t.state=st(c)?c:Lt(c),t.state.__element=t,t.state.root=t.state,Bt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Bt(t,t.state);return}if(typeof i=="string"){if(t.state=fy(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})}Bt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=st(a)?a:Lt(a||{})}else st(i)?t.state=i:t.state=Lt({...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,Bt(t,t.state)}function gp(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function fy(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?gp(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?gp(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=gp(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function ak(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||kt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||An(a)||mt[a]||_t&&_t.has(a)||sr(r,a)||o.push({prop:a,fn:t[a]})}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&et(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&J()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function ck(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let n=e[r];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function Dt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...n){return ck(t,e),r.apply(this,n)}}function Js(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function uy(t,e){let r=t.__ref,n=!!(e&&e.skipIfEffect);if(ak(t),typeof t.text=="function"){let s=t.text,i=Dt(t,t.textDeps,s),a=Q(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=mr.call(t,c,t.state)),t.tag==="string"?t.node.nodeValue=c:t.node.textContent=c)}catch{}},{depth:r.path.length});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Q(()=>{if(r.contentManaged)return;let a=mr.call(t,s,t.state);a!=null&&(t.text=a),t.node&&(t.tag==="string"?t.node.nodeValue=a??"":t.node.textContent=a??"")},{depth:r.path.length});r.__effects.push(i),r.__exec.text=s}for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!kt.has(s)&&!An(s)&&!r.__exec[s]){if(mt[s]){let i=t[s],a=Dt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&et(u);try{let d=a(t,t.state,t.context),h=mt[c](d,t,t.state,t.context);if(h&&t.node){let g=iy(h);(g===null||g!==l)&&(l=g,Cn(t.node,h))}else t.node&&(c==="show"||c==="hide")&&(l=void 0,t.node.style.display="")}finally{u&&J()}},{depth:r.path.length});r.__effects.push(f),r.__exec[s]=i}else if(_t&&_t.has(s)){let i=t[s],a=Dt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&et(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,Cn(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&J()}},{depth:r.path.length});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=Dt(t,t.htmlDeps,s),a=Q(()=>{let c=t.context?.designSystem;c&&et(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&J()}},{depth:r.path.length});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=Dt(t,t.valueDeps,s),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=Dt(t,t.styleDeps,s),a,c=Q(()=>{let l=i(t,t.state,t.context),f=iy(l);(f===null||f!==a)&&(a=f,Cn(t.node,l))},{depth:r.path.length});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=Dt(t,Js(t.styleDeps,s),i),c,l=Q(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,Cn(t.node,{[s]:f}))}}catch{}},{depth:r.path.length});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=Dt(t,Js(t.attrDeps,s),t.attr[s]),a=s,c=Q(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,l===!0?"":l))}catch{}},{depth:r.path.length});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=Dt(t,Js(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Q(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null||l===!1?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=Dt(t,Js(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Q(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length});r.__effects.push(l)}let o=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(o)for(let s in o){if(typeof o[s]!="function")continue;let i=Dt(t,Js(t.classDeps,s),o[s]),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length});r.__effects.push(a)}!n&&typeof t.if=="function"&&dy(t,r,t.if);for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||kt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||An(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(sr(c,s)&&!mt[s]&&!(_t&&_t.has(s))){let l=s,f=Dt(t,t[s+"Deps"],a),u=Q(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(l,d===!0?"":d)))}catch{}},{depth:r.path.length});r.__effects.push(u)}}if(uk(t),pk(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Q(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&et(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&xt("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&J()}},{depth:r.path.length});r.__effects.push(l)}}function dy(t,e,r){let n=Dt(t,t.ifDeps,r),o=Q(()=>{let s;try{s=n(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();else if(!i&&e.__if)if(e.__ifInitialized){t.node||(t.node=er(t)),t.node&&(t.node.ref=t);let a=t.parent,c=a?.node;if(c&&t.node){let l=null,f=Object.keys(a),u=f.indexOf(t.key);for(let d=u+1;d<f.length;d++){let h=a[f[d]];if(h?.node?.parentNode===c){l=h.node;break}}l?c.insertBefore(t.node,l):c.appendChild(t.node)}else wp(t,t.parent);xp(t)}else{if(e.__ifInitialized=!0,t.tag||(t.tag=tr(t)),De("Init",t,{}),t.node||(t.node=er(t)),!t.node)return;if(t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}De("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),gy(t,{}),uy(t,{skipIfEffect:!0}),xp(t),py(t),my(t,{}),wp(t,t.parent),ly(t,{})}},{depth:e.path.length});e.__effects.push(o)}function xp(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),gk(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Cn(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.setAttribute&&e.setAttribute(r,n===!0?"":n)}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function iy(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Cn(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&fk(t,r)}var lk=0;function fk(t,e){let r=`_ds${lk++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=ie(`${g} { ${p} }`,g)+`
43
+ `):"")}}if(Sp(s,!0),wp(s,e,o),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&et(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&J()}}if(De("Create",s,n),De("Complete",s,n),De("Render",s,n),De("RenderRouter",s,n),ly(s,n),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,b=()=>{if(s.node){if(s.node.isConnected){m&&et(m);try{p(s,s.state,s.context)}catch(x){console.error("[DOMQL] onFrame error:",x)}finally{m&&J()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return s}function ik(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!st(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Bt(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=a.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let h in u)c[h]===void 0&&(c[h]=u[h]);let d=new Set(l.languages||[]);for(let h in l.translations)!d.has(h)&&c[h]===void 0&&(c[h]=l.translations[h])}t.state=st(c)?c:Lt(c),t.state.__element=t,t.state.root=t.state,Bt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Bt(t,t.state);return}if(typeof i=="string"){if(t.state=fy(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})}Bt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=st(a)?a:Lt(a||{})}else st(i)?t.state=i:t.state=Lt({...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,Bt(t,t.state)}function gp(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function fy(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?gp(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?gp(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=gp(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function ak(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||kt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||An(a)||mt[a]||_t&&_t.has(a)||sr(r,a)||o.push({prop:a,fn:t[a]})}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&et(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&J()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function ck(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let n=e[r];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function Dt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...n){return ck(t,e),r.apply(this,n)}}function Js(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function uy(t,e){let r=t.__ref,n=!!(e&&e.skipIfEffect);if(ak(t),typeof t.text=="function"){let s=t.text,i=Dt(t,t.textDeps,s),a=Q(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=mr.call(t,c,t.state)),t.tag==="string"?t.node.nodeValue=c:t.node.textContent=c)}catch{}},{depth:r.path.length});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Q(()=>{if(r.contentManaged)return;let a=mr.call(t,s,t.state);a!=null&&(t.text=a),t.node&&(t.tag==="string"?t.node.nodeValue=a??"":t.node.textContent=a??"")},{depth:r.path.length});r.__effects.push(i),r.__exec.text=s}for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!kt.has(s)&&!An(s)&&!r.__exec[s]){if(mt[s]){let i=t[s],a=Dt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&et(u);try{let d=a(t,t.state,t.context),h=mt[c](d,t,t.state,t.context);if(h&&t.node){let g=iy(h);(g===null||g!==l)&&(l=g,Cn(t.node,h))}else t.node&&(c==="show"||c==="hide")&&(l=void 0,t.node.style.display="")}finally{u&&J()}},{depth:r.path.length});r.__effects.push(f),r.__exec[s]=i}else if(_t&&_t.has(s)){let i=t[s],a=Dt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&et(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,Cn(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&J()}},{depth:r.path.length});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=Dt(t,t.htmlDeps,s),a=Q(()=>{let c=t.context?.designSystem;c&&et(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&J()}},{depth:r.path.length});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=Dt(t,t.valueDeps,s),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=Dt(t,t.styleDeps,s),a,c=Q(()=>{let l=i(t,t.state,t.context),f=iy(l);(f===null||f!==a)&&(a=f,Cn(t.node,l))},{depth:r.path.length});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=Dt(t,Js(t.styleDeps,s),i),c,l=Q(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,Cn(t.node,{[s]:f}))}}catch{}},{depth:r.path.length});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=Dt(t,Js(t.attrDeps,s),t.attr[s]),a=s,c=Q(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,l===!0?"":l))}catch{}},{depth:r.path.length});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=Dt(t,Js(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Q(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null||l===!1?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=Dt(t,Js(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Q(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length});r.__effects.push(l)}let o=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(o)for(let s in o){if(typeof o[s]!="function")continue;let i=Dt(t,Js(t.classDeps,s),o[s]),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length});r.__effects.push(a)}!n&&typeof t.if=="function"&&dy(t,r,t.if);for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||kt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||An(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(sr(c,s)&&!mt[s]&&!(_t&&_t.has(s))){let l=s,f=Dt(t,t[s+"Deps"],a),u=Q(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(l,d===!0?"":d)))}catch{}},{depth:r.path.length});r.__effects.push(u)}}if(uk(t),pk(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Q(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&et(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&xt("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&J()}},{depth:r.path.length});r.__effects.push(l)}}function dy(t,e,r){let n=Dt(t,t.ifDeps,r),o=Q(()=>{let s;try{s=n(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();else if(!i&&e.__if)if(e.__ifInitialized){t.node||(t.node=er(t)),t.node&&(t.node.ref=t);let a=t.parent,c=a?.node;if(c&&t.node){let l=null,f=Object.keys(a),u=f.indexOf(t.key);for(let d=u+1;d<f.length;d++){let h=a[f[d]];if(h?.node?.parentNode===c){l=h.node;break}}l?c.insertBefore(t.node,l):c.appendChild(t.node)}else wp(t,t.parent);xp(t)}else{if(e.__ifInitialized=!0,t.tag||(t.tag=tr(t)),De("Init",t,{}),t.node||(t.node=er(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}De("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),gy(t,{}),uy(t,{skipIfEffect:!0}),xp(t),py(t),my(t,{}),wp(t,t.parent),ly(t,{})}},{depth:e.path.length});e.__effects.push(o)}function xp(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),gk(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Cn(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.setAttribute&&e.setAttribute(r,n===!0?"":n)}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function iy(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Cn(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&fk(t,r)}var lk=0;function fk(t,e){let r=`_ds${lk++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=ie(`${g} { ${p} }`,g)+`
44
44
  `}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=ie(`${c} { ${f} }`,c)+`
45
45
  `),u&&(s+=u)}}s&&(o.textContent+=s)}function uk(t){let e=t.subscribeTo;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch{e=null}if(!Array.isArray(e)||e.length===0)return;let r=t.__ref;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o!="string"||o.length===0)continue;let s=o.split("."),i=s[0],a=s.slice(1),c={value:!1},l=Q(()=>{let f=t.state&&(st(t.state)?t.state.root:null);if(!f||!st(f))return;let u=f;u=u[i];for(let h=0;h<a.length&&!(u==null||typeof u!="object");h++)if(st(u))u=u[a[h]];else break;if(!c.value)return;let d=!1;if(typeof t.onBeforeUpdate=="function"){let h=t.context?.designSystem;h&&et(h);try{t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0})===!1&&(d=!0)}catch(g){t.context?.plugins?.length&&xt("error",t,{hook:"onBeforeUpdate",error:g})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",g)}finally{h&&J()}}if(!d&&t.node&&r.__effects)for(let h=0;h<r.__effects.length;h++){let g=r.__effects[h];g&&g!==l&&!g._disposed&&!g._isSubscribeToEffect&&typeof g._execute=="function"&&g._execute()}if(!d&&typeof t.onUpdate=="function"){let h=t.context?.designSystem;h&&et(h);try{t.onUpdate(t,t.state,t.context)}catch(g){t.context?.plugins?.length&&xt("error",t,{hook:"onUpdate",error:g})||console.error("[DOMQL] subscribeTo onUpdate error:",g)}finally{h&&J()}}},{depth:r.path.length});c.value=!0,l._isSubscribeToEffect=!0,r.__effects.push(l)}}function kp(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var ay=new Set;function dk(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",n=r+"::"+t;ay.has(n)||(ay.add(n),console.warn(`[smbls/css] "${t}" at ${r} 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 En(t,e,r){let n={},o=(s,i)=>{if(mt[s]){let a=mt[s](i,e,e.state,e.context);if(a){let c=Array.isArray(a)?a:[a];for(let l of c)l&&Object.assign(n,l)}}else n[s]=i};for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s];if(typeof i=="function"&&(i=i(e,e.state,e.context)),!(i==null||typeof i=="function")){if(typeof i=="object"&&!Array.isArray(i)){if(s==="style"){for(let l in i){let f=i[l];typeof f=="function"&&(f=f(e,e.state,e.context)),!(f==null||typeof f=="function")&&o(l,f)}continue}if(kp(s,e)){let l=En(i,e,!0);Object.keys(l).length&&(n[`[data-theme="${s.slice(1)}"] &`]=l);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(s)){Gs()&&dk(s,e);continue}let a=s;if(s.charCodeAt(0)===64&&!s.startsWith("@media")&&!s.startsWith("@keyframes")){let l=e.context?.designSystem?.media?.[s.slice(1)];l&&(a=`@media ${l}`)}let c=En(i,e,!1);Object.keys(c).length&&(n[a]=c);continue}o(s,i)}}if(r)for(let s in n){let i=n[s];typeof i=="string"&&!i.includes("!important")&&(n[s]=i+" !important")}return n}function pk(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let o=n.charAt(0);if(o!=="."&&o!=="!")continue;let s=n.slice(1);if(!s)continue;let i=t[n];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{if(!t.node)return;let u,d=t[s];if(d===void 0)if(t.state&&s in t.state)u=t.state[s];else{let p=t.context?.cases?.[s];if(p===void 0)return;try{u=typeof p=="function"?p.call(t,t):p}catch(m){u=!1,e.__conditionalError=m,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,m?.message||m)}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&et(g);try{if(h){let p={},m={},b=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let _=i[y],v=y.charAt(0);if((v===":"||v==="@"||v==="&")&&_&&typeof _=="object"&&!Array.isArray(_)){if(kp(y,t)){let $=En(_,t,!0);Object.keys($).length&&(m[`[data-theme="${y.slice(1)}"] &`]=$,b=!0)}else{let $=y;if(v==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let R=t.context?.designSystem?.media?.[y.slice(1)];R&&($=`@media ${R}`)}let z=En(_,t,!1);Object.keys(z).length&&(m[$]=z,b=!0)}continue}let T=typeof _=="function"?_(t,t.state,t.context):_;if(T!=null)if(mt[y]){let $=mt[y](T,t,t.state,t.context);if($){let z=Array.isArray($)?$:[$];for(let R of z)R&&Object.assign(p,R)}}else _t&&_t.has(y)&&(p[y]=T)}let x=Object.keys(p);if(x.length){Cn(t.node,p);for(let y of x)r.set(y,n);c.appliedKeys=x}else c.appliedKeys=null;if(b){let y=ae(m,null,t.context?.cssPrefix),_=y?y.split(" ").filter(Boolean):[];if(_.length&&t.node.classList){for(let v of _)t.node.classList.add(v);c.appliedClasses=_}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===n&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&J()}};e.__conditionalRunners.push(l);let f=Q(l,{depth:e.path.length});e.__effects.push(f)}}var mp=new WeakSet;function hk(t){let e=t.ownerDocument;!e||mp.has(e)||(mp.add(e),queueMicrotask(()=>{mp.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var yp=new WeakSet,cy=!1;function gk(t){let{node:e}=t;if(!e)return;if(cy||(cy=!0,ae({display:"none"})),yp.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}yp.add(t);let r=t.context?.designSystem;r&&et(r);try{let n={},o=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||kt.has(s))continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!An(s)){if(mt[s]){let a=t[s],c=mt[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(n,l);else Object.assign(n,c);o=!0}}else if(_t&&_t.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(n[s]=a,o=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(n[s]=a,o=!0)}else if(s.charAt(0)==="&"){let a=t[s];a&&typeof a=="object"&&(n[s]=a,o=!0)}else if(s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"){if(kp(s,t)){let c=En(a,t,!0);Object.keys(c).length&&(n[`[data-theme="${s.slice(1)}"] &`]=c,o=!0)}else{let c=s;if(s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")){let f=t.context?.designSystem?.media?.[s.slice(1)];f&&(c=`@media ${f}`)}let l=En(a,t,!1);Object.keys(l).length&&(n[c]=l,o=!0)}o=!0}}}}if(o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let s=ae(n,null,t.context?.cssPrefix);if(s&&e.classList){let a=s.split(" ").filter(Boolean),c=!1;for(let l of a)e.classList.add(l),c||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(c=!0);c&&hk(e)}let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=n.display;if(a&&a!==i)if(i==="none"){let c=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&c.push(l);for(let l of c)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display=t.display}}}finally{r&&J(),yp.delete(t)}}function py(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||s===!1)continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,s===!0?"":s)}let r=hp(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||kt.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!An(o)&&!(mt[o]||_t&&_t.has(o))&&sr(n,o)){let i=t[o];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=mr(i,t,t.state,t.context),t[o]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;e.setAttribute(o,i===!0?"":i)}}}function mk(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.autoGrow,n=r&&typeof r=="object"&&r.max?String(r.max):null;n&&(e.style.maxHeight=n);let o=()=>{e.style.height="auto",e.style.height=e.scrollHeight+"px"};o(),e.addEventListener("input",o),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("input",o)}catch{}})}var hy=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function gy(t,e){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!An(r)||hy.has(r))continue;let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let s=n;n=function(a){return t.call(s,a)}}if(typeof n!="function")continue;let o=ok(r);rr.has(o)||_n(sk(o),t,n)}yk(t)}function yk(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},n=!1;for(let d of hy){let h=t[d];typeof h=="function"&&(r[d]=h,n=!0)}if(!n)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 g=h.clientX-i,p=h.clientY-a,m=Date.now()-c;if(m>s)return;let b=Math.abs(g),x=Math.abs(p);if(Math.max(b,x)<o)return;let y;if(b>x*1.2)y=g<0?"left":"right";else if(x>b*1.2)y=p<0?"up":"down";else return;let _="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),v=r[_],T=r.onSwipe;v&&v.call(t,d,t,t.state,t.context),T&&T.call(t,{direction:y,dx:g,dy:p,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 hc(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=hc(o,s):r[n]=s}return r}function _p(t,e,r){if(!e||!t.node)return;let n=t.childExtends;if(Array.isArray(e)){let o=t.tag==="fragment",s=t.context?.document||globalThis.document,i=o?null:s?.createDocumentFragment();if(!o&&!i)return;let a=t.childProps,c=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=a;if(typeof a=="function")try{d=a(t,f)}catch{d=null}if(c==="state"){let p=u;(typeof u=="string"||typeof u=="number")&&(p={value:u,text:u}),f=d?{...d,state:p}:{state:p}}else d&&(f=hc(d,f));if(n&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(n)?n:[n];f={...f,extends:[...m,...p]}}else f={...f,extends:n};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,g=Yt(f,t,h,r);!o&&g?.node&&i.appendChild(g.node)}o||t.node.appendChild(i);return}if(typeof e=="string"){let o=fy(e,t);if(Array.isArray(o)){_p(t,o,r);return}}if(typeof e=="object")for(let o in e){if(kt.has(o))continue;let s=e[o];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=hc(t.childProps,s)),n&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(n)?n:[n];s={...s,extends:[...a,...i]}}else s={...s,extends:n};Yt(s,t,o,r)}}}function Sp(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let n=r.options;if(!n||!n.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;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<n.length;f++)n[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function my(t,e){let{children:r,content:n}=t,o=t.childExtends;if(typeof r=="function"){let i=r;r=i(t,t.state,t.context),t.children=r;let a=t.__ref,c=!1,l=Dt(t,t.childrenDeps,i),f=Q(()=>{let u=l(t,t.state,t.context);if(!c){c=!0;return}if(u===t.children)return;t.children=u;let d=typeof t.onContentUpdate=="function",h=d?[]:null,g=d?[]:null,p=d?[]:null;if(Array.isArray(u)&&t.childrenAs==="state"){let y=t.childProps,_=[],v=new Map;for(let N=0;N<u.length;N++){let j=u[N],P=y;if(typeof y=="function")try{P=y(t,j)}catch{P=null}let B=P&&P.key||j&&j.key||`${N}`;_.push(B),v.set(B,{rawChild:j,childProps:P})}let T=new Set(_),$=a.__children.slice();for(let N of $)if(!T.has(N)){let j=t[N];j?.remove&&j.remove(),delete t[N],g&&g.push(N)}let z=t.childExtends,R=t.tag==="fragment",D=t.context?.document||globalThis.document,W=R?null:D?.createDocumentFragment();for(let N of _){let j=v.get(N),P=j.rawChild,B=t[N];if(B&&B.state){if(P&&typeof P=="object"){let Ct=B.state,Lr=Ct.$replace||Ct.replace,Ci=Ct.$update||Ct.update;if(typeof Lr=="function")Lr.call(Ct,P);else if(typeof Ci=="function"){for(let K in Ct)if(!(K==="__element"||K==="root"||K==="parent"||K==="update")&&!Object.prototype.hasOwnProperty.call(P,K))try{Ct[K]=void 0}catch{}Ci.call(Ct,P)}else for(let K in P)Ct[K]=P[K]}p&&p.push(N);continue}let G=P;(typeof P=="string"||typeof P=="number")&&(G={value:P,text:P});let at=j.childProps,bt=at?{...at,state:G}:{state:G};if(z&&!bt.ignoreChildExtends)if(bt.extends){let Ct=Array.isArray(bt.extends)?bt.extends:[bt.extends],Lr=Array.isArray(z)?z:[z];bt={...bt,extends:[...Lr,...Ct]}}else bt={...bt,extends:z};let Fr=Yt(bt,t,N,e);!R&&Fr?.node&&W&&W.appendChild(Fr.node),h&&h.push(N)}if(!R&&W&&W.childNodes.length&&t.node&&t.node.appendChild(W),!R&&t.node){let N=null;for(let j of _){let P=t[j]?.node;if(!P)continue;let B=N?N.nextSibling:t.node.firstChild;P!==B&&t.node.insertBefore(P,B),N=P}}a.__children=_,d&&(h.length||g.length)&&oy(t,{added:h,removed:g,kept:p}),Sp(t,!1);return}let x=d?[...a.__children]:null;for(let y of[...a.__children]){let _=t[y];_?.remove&&_.remove(),delete t[y]}a.__children=[],_p(t,u,e),Sp(t,!1),d&&oy(t,{added:[...a.__children],removed:x,kept:[]})},{depth:a.path.length});a.__effects.push(f)}if(_p(t,r||n,e),r||n)return;let s=t.context?.components||{};{let i=Object.keys(t);for(let a=0;a<i.length;a++){let c=i[a];if(!c.endsWith("Extends")||typeof t[c]!="string")continue;let l=c.slice(0,-7);if(!l||l.charCodeAt(0)<65||l.charCodeAt(0)>90)continue;let f={extends:t[c]};delete t[c];for(let u=a+1;u<i.length;u++){let d=i[u],h=d.charCodeAt(0);if(h>=65&&h<=90||kt.has(d)||typeof t[d]=="function"&&(d.startsWith("on")||d.startsWith(".")))break;let g=t[d];g!==void 0&&(f[d]=g,delete t[d])}t[l]&&typeof t[l]=="object"?t[l]={...f,...t[l]}:t[l]=f}}for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||kt.has(i)||typeof t[i]!="object"||t[i]===null)continue;let a=i.charCodeAt(0);if(a<65||a>90)continue;let c=t[i];if(!c.__ref){if(!c.extends&&!c.extend){let l=s[i]||s[`smbls.${i}`];l&&(c={...c,extends:l})}if(t.childProps&&(c=hc(t.childProps,c)),o&&!c.ignoreChildExtends)if(c.extends){let l=Array.isArray(c.extends)?c.extends:[c.extends],f=Array.isArray(o)?o:[o];c={...c,extends:[...f,...l]}}else c={...c,extends:o};Yt(c,t,i,e)}}}function wp(t,e,r){let{node:n}=t;if(!n)return;n.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(n,a||o)}else i.insertBefore(n,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(n,i):s.appendChild(n)}else s.appendChild(n)}function De(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&xt(n,e,r);let o="on"+t,s=e[o];if(typeof s=="function"){let i=t==="Render"||t==="RenderRouter";if(i){if(e.__ref.__inRender)return!0;e.__ref.__inRender=!0}let a=e.context?.designSystem;a&&et(a);try{if(s(e,e.state,e.context,r)===!1)return!1}catch(c){if(e.context?.plugins?.length&&xt("error",e,{hook:o,error:c})||console.error(`[DOMQL] Lifecycle "${o}" error:`,c),e.context?.strictMode)throw c}finally{a&&J(),i&&(e.__ref.__inRender=!1)}}return!0}var yy={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"]},by={"gradient-blue-light":`linear-gradient(to right,
46
46
  rgba(4, 116, 242, 1),
@@ -11,6 +11,6 @@ FROM ${c}${l}`},tc=t=>{let e=[],r=(o,s)=>{for(let n in o){let i=s?`${s}/${n}`:n;
11
11
  `);for(let y=0;y<h.length;y++)h[y]&&It(h[y])}n.push(u)}else if(o)for(let a=0;a<o.length;a+=2)n.push(Es(o[a],o[a+1],r));let c=[];for(let a=0;a<i.length;a++)c.push(ua(i[a][0],i[a][1],r));return n.concat(c).join(" ").trim()}var en=new Map;function ua(t,e,r){let o=JSON.stringify(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,n=s&&Ps(),i=(r?r+"":"")+t+o+(s&&!n?"rawhover":""),c=Ae.get(i);if(c){let d=en.get(c);if(d)for(let m=0;m<d.length;m++)It(d[m]);return c}c=r?`_${r}_c${tr(i)}`:`_c${tr(i)}`;let a="",l=[],f=d=>typeof d=="string"&&(d.indexOf("{")!==-1||d.indexOf("}")!==-1),u=(d,m)=>{let b="";for(let x in m){let p=m[x];if(p!=null)if(typeof p=="object")u([...d,x],p);else{if(f(p))continue;b+=rn(Ze(x),p)}}b&&(d.length===0?a+=b:l.push({chain:d,body:b}))};u([],e);let g=d=>{if(!d.length)return`.${c}`;let m=d[0].split(",").map(b=>b.trim()).map(b=>b.includes("&")?b.replace(/&/g,`.${c}`):b.startsWith(":")?`.${c}${b}`:`.${c} ${b}`);for(let b=1;b<d.length;b++){let x=d[b].split(",").map(_=>_.trim()),p=[];for(let _ of m)for(let S of x)S.includes("&")?p.push(S.replace(/&/g,_)):S.startsWith(":")?p.push(_+S):p.push(_+" "+S);m=p}return m.join(", ")},h=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(a){let d=`${t}{.${c}{${a}}}`;h.push(d),It(d)}for(let d of l){let m=g(d.chain),b=Vt(`${t}{${m}{${d.body}}}`,m,n);h.push(b),It(b)}return en.set(c,h),Ae.set(i,c),c}let y=g([t]);if(a){let d=Vt(`${y}{${a}}`,y,n);h.push(d),It(d)}for(let d of l){let m=g([t,...d.chain]),b=Vt(`${m}{${d.body}}`,m,n);h.push(b),It(b)}return en.set(c,h),Ae.set(i,c),c}function er(t,e){let r="";for(let o in e){let s="";for(let n in e[o])s+=rn(Ze(n),e[o][n]);r+=`${o}{${s}}`}return It(`@keyframes ${t}{${r}}`),t}var da=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],pa=["none","forwards","backwards","both"],ha=["normal","reverse","alternate","alternate-reverse"],ga=["running","paused"],ya=t=>/^[\d.]+m?s$/.test(t),ma=0,Rs=new Map,nn=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(M(t)){let s=JSON.stringify(t),n=Rs.get(s);if(n)return n;let i=`smbls-anim-${ma++}`,c=er(i,t);return Rs.set(s,c),c}let o=r&&r[t];return M(o)?er(t,o):t},xa=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},o=t.split(/\s+/),s=null,n=[],i=null,c=null,a=null,l=null,f=null;for(let u of o)r&&r[u]?s=u:ya(u)?n.push(u):da.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?c=u==="infinite"?u:Number(u):ha.includes(u)?a=u:pa.includes(u)?l=u:ga.includes(u)?f=u:s||(s=u);return{name:s,durations:n,timingFunction:i,iterationCount:c,direction:a,fillMode:l,playState:f}},Is={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=xa(t,e);return{animationName:nn(r.name||t,e),animationDuration:r.durations[0]||vt(e.animationDuration||"A").timing,animationDelay:r.durations[1]||vt(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Et(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:nn(t,e),animationDuration:vt(e.animationDuration||"A").timing,animationDelay:vt(e.animationDelay||"0s").timing,animationTimingFunction:Et(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:nn(t,e)}),animationDuration:t=>({animationDuration:vt(t).timing}),animationDelay:t=>({animationDelay:vt(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Et(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};U();var Ds={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>C("height",t,e),width:(t,e)=>C("width",t,e),boxSizing:t=>Tn(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...W("height",e),...W("width",r||e)}},inlineSize:(t,e)=>C("inlineSize",t,e),blockSize:(t,e)=>C("blockSize",t,e),minWidth:(t,e)=>C("minWidth",t,e),maxWidth:(t,e)=>C("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...W("minWidth",e),...W("maxWidth",r||e)}},minHeight:(t,e)=>C("minHeight",t,e),maxHeight:(t,e)=>C("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...W("minHeight",e),...W("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...C("inlineSize",e),...C("blockSize",r||e)}},minBlockSize:(t,e)=>C("minBlockSize",t,e),minInlineSize:(t,e)=>C("minInlineSize",t,e),maxBlockSize:(t,e)=>C("maxBlockSize",t,e),maxInlineSize:(t,e)=>C("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...W("minInlineSize",e),...W("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...W("maxInlineSize",e),...W("maxBlockSize",r||e)}},borderWidth:(t,e)=>C("borderWidth",t,e),borderTopWidth:(t,e)=>C("borderTopWidth",t,e),borderRightWidth:(t,e)=>C("borderRightWidth",t,e),borderBottomWidth:(t,e)=>C("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>C("borderLeftWidth",t,e),padding:(t,e)=>C("padding",t,e),scrollPadding:(t,e)=>C("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...W("paddingInlineStart",e),...W("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...W("paddingBlockStart",e),...W("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>C("paddingBlockStart",t,e),paddingBottom:(t,e)=>C("paddingBlockEnd",t,e),paddingLeft:(t,e)=>C("paddingInlineStart",t,e),paddingRight:(t,e)=>C("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>C("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>C("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>C("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>C("paddingInlineEnd",t,e),margin:(t,e)=>C("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...W("marginInlineStart",e),...W("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{...W("marginBlockStart",r),...W("marginBlockEnd",o||r)}},marginTop:(t,e)=>C("marginBlockStart",t,e),marginBottom:(t,e)=>C("marginBlockEnd",t,e),marginLeft:(t,e)=>C("marginInlineStart",t,e),marginRight:(t,e)=>C("marginInlineEnd",t,e),marginInlineStart:(t,e)=>C("marginInlineStart",t,e),marginInlineEnd:(t,e)=>C("marginInlineEnd",t,e),marginBlockStart:(t,e)=>C("marginBlockStart",t,e),marginBlockEnd:(t,e)=>C("marginBlockEnd",t,e),gap:t=>({gap:ys(t)}),columnGap:(t,e)=>Jt(e,"columnGap",t),rowGap:(t,e)=>Jt(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,s]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(s||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>Qr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Qr(t??e.round,e,"borderRadius")};var js={fontSize:t=>fs(t)||t,fontFamily:t=>({fontFamily:cs(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 Ms={overflow:t=>({overflow:t}),cursor:(t,e,r,o)=>{if(!t)return;let s=o.assets&&o.assets[t];if(s&&s.content)t=`url(${s.content.src})`;else{let n=o.files&&o.files[t];n&&n.content&&(t=`url(${n.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 Fs={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>Q(r,"k").k).join(" ")}},left:t=>Q(t,"left"),top:t=>Q(t,"top"),right:t=>Q(t,"right"),bottom:t=>Q(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>Q(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>Q(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};U();var mt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},dt=(t,e)=>{if(e==null||e==="")return;if(!M(e))return{[t]:e};let r={},o=!1;for(let s in e){let n=e[s];n==null||n===""||M(n)||(r[s]={[t]:n},o=!0)}return o?r:void 0},Ls={theme:(t,e)=>{if(t)return e.themeModifier?we(t,`@${e.themeModifier}`):we(t)},color:(t,e)=>{let r=mt(e);if(t)return dt("color",lt(t,r))},background:(t,e)=>{let r=mt(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:qr(t,r)}:dt("background",lt(t,r))},backgroundColor:(t,e)=>{let r=mt(e);if(t)return dt("backgroundColor",lt(t,r))},backgroundImage:(t,e,r,o)=>{let s=mt(e);if(!t)return;let n=o.assets&&o.assets[t];if(n&&n.content)t=n.content.src;else{let i=o.files&&o.files[t];i&&i.content&&(t=i.content.src)}return dt("backgroundImage",gs(t,s))},textStroke:t=>({WebkitTextStroke:ps(t)}),outline:t=>({outline:Rt(t)}),outlineOffset:(t,e)=>C("outlineOffset",t,e),border:t=>({border:Rt(t)}),borderColor:(t,e)=>{let r=mt(e);if(t)return dt("borderColor",lt(t,r))},borderTopColor:(t,e)=>{let r=mt(e);if(t)return dt("borderTopColor",lt(t,r))},borderBottomColor:(t,e)=>{let r=mt(e);if(t)return dt("borderBottomColor",lt(t,r))},borderLeftColor:(t,e)=>{let r=mt(e);if(t)return dt("borderLeftColor",lt(t,r))},borderRightColor:(t,e)=>{let r=mt(e);if(t)return dt("borderRightColor",lt(t,r))},borderLeft:t=>({borderLeft:Rt(t)}),borderTop:t=>({borderTop:Rt(t)}),borderRight:t=>({borderRight:Rt(t)}),borderBottom:t=>({borderBottom:Rt(t)}),shadow:(t,e)=>{let r=mt(e);if(t)return dt("boxShadow",hs(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),s=mt(e),n=o?" !important":"",i=Hr(r.trim(),s);return w(i)?{boxShadow:i+n}:dt("boxShadow",i)},textShadow:(t,{context:e})=>dt("textShadow",Hr(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:Rt(t)})};var Ns={transition:t=>({transition:ms(t)}),transitionDuration:t=>({transitionDuration:Kr(t)}),transitionDelay:t=>({transitionDelay:Kr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Et(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};U();var Vs={flow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,s]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(s||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,o]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:o}}};var Bs={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var pt={...Is,...Ds,...js,...Ms,...Fs,...Ls,...Ns,...Vs,...Bs};var st=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);U();function on(t,e,r){let o=t?.context?.analyze;if(!o||!o.emit||e==="warn"&&!o.shouldCapture("warnings")||e==="error"&&!o.shouldCapture("errors"))return;let s=r.map(n=>n?.message||(typeof n=="string"?n:null)).filter(Boolean).join(" ");o.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:s||null,args:r})}var Us=new Set;function ba(t,e,r){let o=String(e);if(Us.has(o))return;Us.add(o);let s=t?.__ref?.path,n=Array.isArray(s)&&s.length?s.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",c=`[smbls] el.call('${o}') at <${n}>: "${o}" ${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.`;on(t,"error",[c]),console.error(c)}function _a(...t){return on(this,"warn",t),vo.apply(this,t)}function Sa(...t){return on(this,"error",t),Co.apply(this,t)}var Ws={update:Yr,remove:tn,getDB:Oo,getQuery:$o,getRootData:_o,getChildren:yo,getPath:mo,nextElement:ko,previousElement:Ao,verbose:Br,warn:_a,error:Sa,variables:Eo,spotByPath:go,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let o=this.context?.__create;o&&o(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let o=r.__setQueued;o&&(r.__setQueued=null,this.set(o.content,o.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,o=this.key,s=this.parse();return this.remove(),e(s,r,o,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let o=this[r];if(!o)continue;if(typeof t=="function"){if(t(o))return o}else if(typeof t=="string"&&o.key===t)return o;let s=o.lookdown?.(t);if(s)return s}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let o of r.__children){let s=this[o];s&&(typeof t=="function"?t(s)&&e.push(s):typeof t=="string"&&s.key===t&&e.push(s),s.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:bo,getRootState:xo,getRootContext:So,getContext:wo,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let s in this)if(!(s==="parent"||s==="node"||s==="__ref")&&!r?.has(s)){if(o&&o[s]!==void 0){e[s]=o[s];continue}typeof this[s]!="function"&&(e[s]=this[s])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,n=>"-"+n.toLowerCase()),s=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,s,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);ke()&&ba(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 r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},Gs=new WeakMap;function wa(t){if(!t)return Ws;let e=Gs.get(t);if(e)return e;e=Object.create(Ws);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return Gs.set(t,e),e}function sn(t){let e=wa(t.context);Object.setPrototypeOf(t,e)}U();Ve();var rr=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},xt=(t,e,r,{onlyIfAbsent:o,host:s}={})=>{rr(t,"$"+e,r),!(o&&s&&s[e]!==void 0)&&rr(t,e,r)},cn=(t,e,...r)=>{if(!t)return;let o=t["$"+e];if(typeof o=="function")return o.apply(t,r);let s=t[e];if(typeof s=="function")return s.apply(t,r)},Dt=(t,e)=>{if(z(e)){let s=e.__raw||e;xt(s,"toggle",function(n,i={}){e[n]=!e[n]},{onlyIfAbsent:!0,host:e}),xt(s,"set",function(n,i={}){return e.$clean({preventStateUpdate:!0}),typeof n=="object"&&n!==null&&e.$update(n,i),e},{onlyIfAbsent:!0,host:e}),xt(s,"setByPath",function(n,i,c={}){let a=n.split("."),l=e;for(let f=0;f<a.length-1;f++)l[a[f]]===void 0&&(l[a[f]]={}),l=l[a[f]];return l[a[a.length-1]]=i,e}),xt(s,"getByPath",function(n){let i=n.split("."),c=e;for(let a=0;a<i.length;a++){if(c==null)return;c=c[i[a]]}return c}),xt(s,"removeByPath",function(n,i={}){let c=n.split("."),a=e;for(let l=0;l<c.length-1;l++){if(a==null)return e;a=a[c[l]]}return a&&delete a[c[c.length-1]],e}),xt(s,"reset",function(n={}){let i=e.$parse();return e.$set(i,n)}),xt(s,"apply",function(n,i={}){if(typeof n=="function"){let c=n(e);return e.$update(c,i)}}),xt(s,"applyFunction",function(n,i={}){if(typeof n=="function")return n(e),e.$update(e.$parse(),i)}),xt(s,"rootUpdate",function(n,i={}){let c=e;for(;c?.parent&&z(c.parent);)c=c.parent;return cn(c,"update",n,i)}),xt(s,"parentUpdate",function(n,i={}){if(e.parent)return cn(e.parent,"update",n,i)}),xt(s,"quietReplace",function(n,i={}){return e.$replace(n,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(s,"root")||Object.defineProperty(s,"root",{get:function(){let n=e,i=z(n)?n:null;for(let c=0;c<64&&n?.parent&&n.parent!==n;c++)n=n.parent,z(n)&&(i=n);return i||n},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s]},o={update(s){if(!s||typeof s!="object")return e;for(let n in s)e[n]=s[n];return e},apply(s){if(typeof s!="function")return e;let n=s(e);return n?e.$update(n):e},parse(){return{...e}},toggle(s){return e[s]=!e[s],e},set(s){if(!s||typeof s!="object")return e;r();for(let n in s)e[n]=s[n];return e},replace(s){return e.$set(s)},clean(){return r(),e}};for(let s in o)if(rr(e,"$"+s,o[s]),typeof e[s]!="function"){if(Object.prototype.hasOwnProperty.call(e,s)){re(s,"");continue}rr(e,s,o[s])}};var dg=new Proxy(Object.create(null),{get(){},has(){return!1}});U();var an={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"]};var va=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,Oe=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||va(e)||an.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(an,t)?an[t].includes(e):!1;var nr=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},zs=(t,e)=>{let r=(t.preSrc||"")+(nr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:o}=t;if(!o.files&&!o.assets)return r;if(r.startsWith("/assets/")){let s=r.slice(8),n=o.assets&&(o.assets[r]||o.assets[s]);return n&&n.content?n.content.src:r}if(r.startsWith("/files/")){let s=r.slice(7),n=o.files&&(o.files[r]||o.files[s]);return n&&n.content?n.content.src:r}if(o.assets){let s=o.assets[r];if(s&&s.content)return s.content.src}if(o.files){let s=o.files[r];if(s&&s.content)return s.content.src}return r},Hs={src:t=>zs(t,t.src),href:t=>nr(t,t.href),action:t=>nr(t,t.action),poster:t=>zs(t,t.poster),data:t=>nr(t,t.data)},qs=t=>{let e=t.tag||"div",r={};for(let o in Hs)if(t[o]!==void 0&&Oe(e,o)){let s=Hs[o](t);s!==void 0&&(r[o]=s)}return r};var Ca=1,or=[],dn=!1;function ka(){dn||(dn=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(pn):setTimeout(pn,0))}function pn(){if(dn=!1,!or.length)return;let t=or.splice(0,or.length);for(let e=0;e<t.length;e++){let r=t[e];!r.node||!r.node.isConnected||Ot("Mounted",r,r.__ref?.__mountOptions||{})}}function Zs(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,or.push(t),ka())}function Ks(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&St("contentUpdate",t,e);let r=t.context?.designSystem;r&&H(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&St("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&G()}}function Yt(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Aa(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Ea(t){return t.toLowerCase()}function Qs(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Te(t,e){let r={...t};for(let o in e){let s=r[o],n=e[o];s&&n&&typeof s=="object"&&typeof n=="object"&&!Array.isArray(s)&&!Array.isArray(n)&&typeof s!="function"&&typeof n!="function"?r[o]=Te(s,n):r[o]=n}return r}function ut(t,e,r,o={},s){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let n=Object.create(null);n.key=r||t.key||`_${Ca++}`,n.parent=e||null,n.context=t.context||e?.context||o.context||{},n.context.__create||(n.context.__create=ut);let i=n.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||n,path:e?.__ref?.path?[...e.__ref.path,n.key]:[n.key]};if(r&&!t.extends&&!t.extend){let d=r.indexOf("_");if(d>0){let m=r.substring(0,d),b=n.context?.components;b&&(b[m]||b["smbls."+m])?t={...t,extends:m}:b&&ke()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Ce(n,t,o);let c=new Set(["childProps","attr","style","scope","data"]),a=n.props&&typeof n.props=="object"?n.props:null;for(let d in t){if(d==="parent"||d==="node"||d==="__ref"||d==="extends"||d==="context"||d==="props")continue;let m=t[d],b=n[d],x=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";x&&d.charCodeAt(0)>=65&&d.charCodeAt(0)<=90?n[d]=Te(b,m):x&&c.has(d)?n[d]={...b,...m}:x&&Qs(d)?n[d]=Te(b,m):n[d]=m}function l(d){for(let m in d){let b=d[m],x=n[m],p=x&&b&&typeof x=="object"&&typeof b=="object"&&!Array.isArray(x)&&!Array.isArray(b)&&typeof x!="function"&&typeof b!="function";p&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?n[m]=Te(x,b):p&&c.has(m)?n[m]={...x,...b}:p&&Qs(m)?n[m]=Te(x,b):n[m]=b}}a&&l(a),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(n.data=t.data),t.classlist!==void 0&&(n.classlist=t.classlist),t.text!==void 0&&(n.text=t.text),t.html!==void 0&&(n.html=t.html);let f=n.scope&&typeof n.scope=="object"?n.scope:null,u=e?.scope,g=n.context&&typeof n.context.globalScope=="object"&&n.context.globalScope||null,h=u||g||null;if(t.scope!==void 0||f){let d={};f&&Object.assign(d,f),t.scope!==void 0&&Object.assign(d,t.scope),n.scope=xr(d,h)}else h&&(n.scope=h);if(t.if!==void 0&&(n.if=t.if),sn(n),Oa(n,e,t),n.if!=null){let d;if(typeof n.if=="function")try{d=n.if(n,n.state,n.context)}catch(m){if(d=!1,i.__ifError=m,typeof console<"u"&&console.warn){let b=n.key||n.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,m?.message||m)}}else d=n.if;i.__if=!!d}if(i.__if)typeof n.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[n.key]=n),typeof n.if=="function"&&ri(n,i,n.if),n;n.tag||(n.tag=ne(n)),Ot("Init",n,o);let y=n.node=oe(n);if(!y)return n;if(n.tag==="fragment"){let m=(n.context?.document||globalThis.document).createComment("");y.appendChild(m),i.__fragmentAnchor=m}Ot("AttachNode",n,o),y.setAttribute&&n.key&&y.setAttribute("data-key",n.key),e&&(e[n.key]=n,e.__ref?.__children&&(e.__ref.__children.includes(n.key)||e.__ref.__children.push(n.key))),y.setAttribute&&n.context?.scopeSelector&&n.context.scopeSelector!==":root"&&n.context.key&&n.key===n.context.key&&y.setAttribute("data-smbls-app",n.context.key),n.id&&y.setAttribute&&(y.id=n.id),si(n,o),ei(n),hn(n),ni(n),La(n);try{ii(n,o)}catch(d){if(typeof console<"u"&&console.error){let m=n.__ref?.path?.join(".")||n.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,d?.message||d,d?.stack?`
12
12
  `+d.stack.split(`
13
13
  `).slice(0,6).join(`
14
- `):"")}}if(yn(n,!0),mn(n,e,s),typeof n.html=="function"&&n.node&&!n.node.innerHTML){let d=n.context?.designSystem;d&&H(d);try{let m=n.html(n,n.state,n.context);m!=null&&typeof m!="function"&&(n.node.innerHTML=m)}catch{}finally{d&&G()}}if(Ot("Create",n,o),Ot("Complete",n,o),Ot("Render",n,o),Ot("RenderRouter",n,o),Zs(n,o),typeof n.onFrame=="function"){let d=n.onFrame,m=n.context?.designSystem,b=()=>{if(n.node){if(n.node.isConnected){m&&H(m);try{d(n,n.state,n.context)}catch(x){console.error("[DOMQL] onFrame error:",x)}finally{m&&G()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return n}function Oa(t,e,r){let o=!e,s=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,n=o&&s&&t.context?.state,i=r.state!==void 0&&!n?r.state:t.state&&!z(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Dt(t,t.state);else if(t.context?.state){let c=t.context.state,a={...c},l=t.context?.polyglot;if(l?.translations){let f=c.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let h in u)a[h]===void 0&&(a[h]=u[h]);let g=new Set(l.languages||[]);for(let h in l.translations)!g.has(h)&&a[h]===void 0&&(a[h]=l.translations[h])}t.state=z(a)?a:at(a),t.state.__element=t,t.state.root=t.state,Dt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Dt(t,t.state);return}if(typeof i=="string"){if(t.state=ti(i,e),t.state&&typeof t.state=="object"&&!z(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}Dt(t,t.state);return}if(typeof i=="function"){let c=i(t,e?.state);t.state=z(c)?c:at(c||{})}else z(i)?t.state=i:t.state=at({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,Dt(t,t.state)}function fn(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let s of r){if(o==null)return{};o=o[s]}return o??{}}function ti(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let s=t.slice(3);return s?fn(e.state,s):e.state??{}}if(t.startsWith("~/")){let s=e.state?.root||e.state,n=t.slice(2);return n?fn(s,n):s??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=fn(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let o=e.context?.polyglot;if(o?.translations){let s=e.state?.root?.lang||o.defaultLang||"en",n=o.translations[s];if(n?.[t]!==void 0)return n[t];if(o.translations[t]!==void 0)return o.translations[t]}return{}}function $a(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,s=[],n=Object.keys(t);for(let i=0;i<n.length;i++){let c=n[i];if(typeof t[c]!="function"||rt.has(c))continue;let a=c.charCodeAt(0);a>=65&&a<=90||Yt(c)||pt[c]||st&&st.has(c)||Oe(r,c)||s.push({prop:c,fn:t[c]})}for(let i=0;i<s.length;i++){let{prop:c,fn:a}=s[i];e.__exec[c]=a,Object.defineProperty(t,c,{get(){o&&H(o);try{return a(t,t.state,t.context)}catch{return}finally{o&&G()}},set(l){delete e.__exec[c],Object.defineProperty(t,c,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Ta(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function nt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return Ta(t,e),r.apply(this,o)}}function $e(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ei(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if($a(t),typeof t.text=="function"){let n=t.text,i=nt(t,t.textDeps,n),c=N(()=>{if(!r.contentManaged)try{let a=i(t,t.state,t.context);t.node&&a!=null&&typeof a!="function"&&typeof a!="object"&&(typeof a=="string"&&a.includes("{{")&&(a=Ne.call(t,a,t.state)),t.tag==="string"?t.node.nodeValue=a:t.node.textContent=a)}catch{}},{depth:r.path.length});r.__effects.push(c),r.__exec.text=n}else if(typeof t.text=="string"&&t.text.includes("{{")){let n=t.text,i=N(()=>{if(r.contentManaged)return;let c=Ne.call(t,n,t.state);c!=null&&(t.text=c),t.node&&(t.tag==="string"?t.node.nodeValue=c??"":t.node.textContent=c??"")},{depth:r.path.length});r.__effects.push(i),r.__exec.text=n}for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&typeof t[n]=="function"&&!rt.has(n)&&!Yt(n)&&!r.__exec[n]){if(pt[n]){let i=t[n],c=nt(t,t[n+"Deps"],i),a=n,l,f=N(()=>{let u=t.context?.designSystem;u&&H(u);try{let g=c(t,t.state,t.context),h=pt[a](g,t,t.state,t.context);if(h&&t.node){let y=Js(h);(y===null||y!==l)&&(l=y,Xt(t.node,h))}else t.node&&(a==="show"||a==="hide")&&(l=void 0,t.node.style.display="")}finally{u&&G()}},{depth:r.path.length});r.__effects.push(f),r.__exec[n]=i}else if(st&&st.has(n)){let i=t[n],c=nt(t,t[n+"Deps"],i),a=n,l,f=N(()=>{let u=t.context?.designSystem;u&&H(u);try{let g=c(t,t.state,t.context);if(t.node)if(g!=null){let h=a+":"+String(g);h!==l&&(l=h,Xt(t.node,{[a]:g}))}else l=void 0,t.node.style[a]=""}finally{u&&G()}},{depth:r.path.length});r.__effects.push(f),r.__exec[n]=i}}if(typeof t.html=="function"){let n=t.html,i=nt(t,t.htmlDeps,n),c=N(()=>{let a=t.context?.designSystem;a&&H(a);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{a&&G()}},{depth:r.path.length});r.__effects.push(c),r.__exec.html=n}if(typeof t.value=="function"){let n=t.value,i=nt(t,t.valueDeps,n),c=N(()=>{try{let a=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=a==null?"":String(a);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,g=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&g!=null)try{t.node.setSelectionRange(u,g)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(c),r.__exec.value=n}if(typeof t.style=="function"){let n=t.style,i=nt(t,t.styleDeps,n),c,a=N(()=>{let l=i(t,t.state,t.context),f=Js(l);(f===null||f!==c)&&(c=f,Xt(t.node,l))},{depth:r.path.length});r.__effects.push(a),r.__exec.style=n}else if(t.style&&typeof t.style=="object")for(let n in t.style){let i=t.style[n];if(typeof i!="function")continue;let c=nt(t,$e(t.styleDeps,n),i),a,l=N(()=>{try{let f=c(t,t.state,t.context);if(t.node){let u=n+":"+String(f);u!==a&&(a=u,Xt(t.node,{[n]:f}))}}catch{}},{depth:r.path.length});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let n in t.attr)if(typeof t.attr[n]=="function"){let i=nt(t,$e(t.attrDeps,n),t.attr[n]),c=n,a=N(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1?t.node.removeAttribute(c):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(c,l===!0?"":l))}catch{}},{depth:r.path.length});r.__effects.push(a)}}if(t.aria&&typeof t.aria=="object")for(let n in t.aria){if(typeof t.aria[n]!="function")continue;let i=nt(t,$e(t.ariaDeps,n),t.aria[n]),c="aria-"+n.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=N(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null||l===!1?t.node.removeAttribute(c):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(c,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.data&&typeof t.data=="object")for(let n in t.data){if(typeof t.data[n]!="function")continue;let i=nt(t,$e(t.dataDeps,n),t.data[n]),a="data-"+n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=N(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(a):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(a,f===!0?"":f)}catch{}},{depth:r.path.length});r.__effects.push(l)}let s=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(s)for(let n in s){if(typeof s[n]!="function")continue;let i=nt(t,$e(t.classDeps,n),s[n]),c=N(()=>{try{let a=i(t,t.state,t.context);if(!t.node?.classList)return;typeof a=="string"?t.node.classList.add(a):a?t.node.classList.add(n):t.node.classList.remove(n)}catch{}},{depth:r.path.length});r.__effects.push(c)}!o&&typeof t.if=="function"&&ri(t,r,t.if);for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||rt.has(n)||typeof t[n]!="function")continue;let i=n.charCodeAt(0);if(i>=65&&i<=90||Yt(n))continue;let c=t[n];r.__exec[n]=c;let a=t.tag||"div";if(Oe(a,n)&&!pt[n]&&!(st&&st.has(n))){let l=n,f=nt(t,t[n+"Deps"],c),u=N(()=>{try{let g=f(t,t.state,t.context);t.node?.setAttribute&&(g==null||g===!1?t.node.removeAttribute(l):typeof g!="function"&&typeof g!="object"&&(l==="src"&&"src"in t.node?t.node.src=g:t.node.setAttribute(l,g===!0?"":g)))}catch{}},{depth:r.path.length});r.__effects.push(u)}}if(Ia(t),ja(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let n=t.onStateUpdate,i=t.stateDeps,c=!1,a=[],l=N(()=>{let f=[];for(let y=0;y<i.length;y++){let d=i[y];try{f[y]=typeof d=="function"?d(t,t.state,t.context):t.state?.[d]}catch{f[y]=void 0}}if(!c){c=!0,a=f;return}let u=f.length!==a.length;for(let y=0;!u&&y<f.length;y++)f[y]!==a[y]&&(u=!0);let g=a;if(a=f,!u)return;let h=t.context?.designSystem;h&&H(h);try{n(t,t.state,t.context,{prev:g,next:f})}catch(y){if(t.context?.plugins?.length&&St("error",t,{hook:"onStateUpdate",error:y})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',y),t.context?.strictMode)throw y}finally{h&&G()}},{depth:r.path.length});r.__effects.push(l)}}function ri(t,e,r){let o=nt(t,t.ifDeps,r),s=N(()=>{let n;try{n=o(t,t.state,t.context)}catch(c){if(n=!1,e.__ifError=c,typeof console<"u"&&console.warn){let a=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${a} \u2014 treating as false:`,c?.message||c)}return}let i=e.__if;if(e.__if=!!n,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized){t.node||(t.node=oe(t)),t.node&&(t.node.ref=t);let c=t.parent,a=c?.node;if(a&&t.node){let l=null,f=Object.keys(c),u=f.indexOf(t.key);for(let g=u+1;g<f.length;g++){let h=c[f[g]];if(h?.node?.parentNode===a){l=h.node;break}}l?a.insertBefore(t.node,l):a.appendChild(t.node)}else mn(t,t.parent);hn(t)}else{if(e.__ifInitialized=!0,t.tag||(t.tag=ne(t)),Ot("Init",t,{}),t.node||(t.node=oe(t)),!t.node)return;if(t.tag==="fragment"&&!e.__fragmentAnchor){let a=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(a),e.__fragmentAnchor=a}Ot("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),si(t,{}),ei(t,{skipIfEffect:!0}),hn(t),ni(t),ii(t,{}),mn(t,t.parent),Zs(t,{})}},{depth:e.path.length});e.__effects.push(s)}function hn(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),Fa(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Xt(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let o=t.attr[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.setAttribute&&e.setAttribute(r,o===!0?"":o)}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.dataset&&(e.dataset[r]=o===!0?"":o)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(o=>o&&e.classList.add(o));else if(typeof r=="object")for(let o in r){let s=typeof r[o]=="function"?r[o](t,t.state,t.context):r[o];s&&e.classList.add(typeof s=="string"?s:o)}}}}function Js(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Xt(t,e){if(!t||!e||!t.style)return;let r=null;for(let o in e){let s=e[o];if(s!=null){if(o.charAt(0)==="&"&&typeof s=="object"){r||(r={}),r[o]=s;continue}try{let n=String(s),i=o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),c=n.trim(),a=/\s*!important\s*$/.test(c),l=c.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,a?"important":"")}catch{}}}r&&Ra(t,r)}var Pa=0;function Ra(t,e){let r=`_ds${Pa++}`;t.classList.add(r);let o=t.ownerDocument,s=o.querySelector("style[data-smbls-scoped]");s||(s=o.createElement("style"),s.setAttribute("data-smbls-scoped",""),o.head.appendChild(s));let n="";for(let i in e){let c="."+r,a=i.replace(/&/g,c).split(",").map(f=>{let u=f.trim();return u.includes(c)?u:c+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let g in l){let h=l[g];if(typeof h=="object"){let y=g.includes("&")?a.split(", ").map(m=>g.replace(/&/g,m)).join(", "):a.split(", ").map(m=>`${m} ${g}`).join(", "),d="";for(let m in h)d+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=Vt(`${y} { ${d} }`,y)+`
14
+ `):"")}}if(yn(n,!0),mn(n,e,s),typeof n.html=="function"&&n.node&&!n.node.innerHTML){let d=n.context?.designSystem;d&&H(d);try{let m=n.html(n,n.state,n.context);m!=null&&typeof m!="function"&&(n.node.innerHTML=m)}catch{}finally{d&&G()}}if(Ot("Create",n,o),Ot("Complete",n,o),Ot("Render",n,o),Ot("RenderRouter",n,o),Zs(n,o),typeof n.onFrame=="function"){let d=n.onFrame,m=n.context?.designSystem,b=()=>{if(n.node){if(n.node.isConnected){m&&H(m);try{d(n,n.state,n.context)}catch(x){console.error("[DOMQL] onFrame error:",x)}finally{m&&G()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return n}function Oa(t,e,r){let o=!e,s=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,n=o&&s&&t.context?.state,i=r.state!==void 0&&!n?r.state:t.state&&!z(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Dt(t,t.state);else if(t.context?.state){let c=t.context.state,a={...c},l=t.context?.polyglot;if(l?.translations){let f=c.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let h in u)a[h]===void 0&&(a[h]=u[h]);let g=new Set(l.languages||[]);for(let h in l.translations)!g.has(h)&&a[h]===void 0&&(a[h]=l.translations[h])}t.state=z(a)?a:at(a),t.state.__element=t,t.state.root=t.state,Dt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Dt(t,t.state);return}if(typeof i=="string"){if(t.state=ti(i,e),t.state&&typeof t.state=="object"&&!z(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}Dt(t,t.state);return}if(typeof i=="function"){let c=i(t,e?.state);t.state=z(c)?c:at(c||{})}else z(i)?t.state=i:t.state=at({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,Dt(t,t.state)}function fn(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let s of r){if(o==null)return{};o=o[s]}return o??{}}function ti(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let s=t.slice(3);return s?fn(e.state,s):e.state??{}}if(t.startsWith("~/")){let s=e.state?.root||e.state,n=t.slice(2);return n?fn(s,n):s??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=fn(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let o=e.context?.polyglot;if(o?.translations){let s=e.state?.root?.lang||o.defaultLang||"en",n=o.translations[s];if(n?.[t]!==void 0)return n[t];if(o.translations[t]!==void 0)return o.translations[t]}return{}}function $a(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,s=[],n=Object.keys(t);for(let i=0;i<n.length;i++){let c=n[i];if(typeof t[c]!="function"||rt.has(c))continue;let a=c.charCodeAt(0);a>=65&&a<=90||Yt(c)||pt[c]||st&&st.has(c)||Oe(r,c)||s.push({prop:c,fn:t[c]})}for(let i=0;i<s.length;i++){let{prop:c,fn:a}=s[i];e.__exec[c]=a,Object.defineProperty(t,c,{get(){o&&H(o);try{return a(t,t.state,t.context)}catch{return}finally{o&&G()}},set(l){delete e.__exec[c],Object.defineProperty(t,c,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Ta(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function nt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return Ta(t,e),r.apply(this,o)}}function $e(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ei(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if($a(t),typeof t.text=="function"){let n=t.text,i=nt(t,t.textDeps,n),c=N(()=>{if(!r.contentManaged)try{let a=i(t,t.state,t.context);t.node&&a!=null&&typeof a!="function"&&typeof a!="object"&&(typeof a=="string"&&a.includes("{{")&&(a=Ne.call(t,a,t.state)),t.tag==="string"?t.node.nodeValue=a:t.node.textContent=a)}catch{}},{depth:r.path.length});r.__effects.push(c),r.__exec.text=n}else if(typeof t.text=="string"&&t.text.includes("{{")){let n=t.text,i=N(()=>{if(r.contentManaged)return;let c=Ne.call(t,n,t.state);c!=null&&(t.text=c),t.node&&(t.tag==="string"?t.node.nodeValue=c??"":t.node.textContent=c??"")},{depth:r.path.length});r.__effects.push(i),r.__exec.text=n}for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&typeof t[n]=="function"&&!rt.has(n)&&!Yt(n)&&!r.__exec[n]){if(pt[n]){let i=t[n],c=nt(t,t[n+"Deps"],i),a=n,l,f=N(()=>{let u=t.context?.designSystem;u&&H(u);try{let g=c(t,t.state,t.context),h=pt[a](g,t,t.state,t.context);if(h&&t.node){let y=Js(h);(y===null||y!==l)&&(l=y,Xt(t.node,h))}else t.node&&(a==="show"||a==="hide")&&(l=void 0,t.node.style.display="")}finally{u&&G()}},{depth:r.path.length});r.__effects.push(f),r.__exec[n]=i}else if(st&&st.has(n)){let i=t[n],c=nt(t,t[n+"Deps"],i),a=n,l,f=N(()=>{let u=t.context?.designSystem;u&&H(u);try{let g=c(t,t.state,t.context);if(t.node)if(g!=null){let h=a+":"+String(g);h!==l&&(l=h,Xt(t.node,{[a]:g}))}else l=void 0,t.node.style[a]=""}finally{u&&G()}},{depth:r.path.length});r.__effects.push(f),r.__exec[n]=i}}if(typeof t.html=="function"){let n=t.html,i=nt(t,t.htmlDeps,n),c=N(()=>{let a=t.context?.designSystem;a&&H(a);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{a&&G()}},{depth:r.path.length});r.__effects.push(c),r.__exec.html=n}if(typeof t.value=="function"){let n=t.value,i=nt(t,t.valueDeps,n),c=N(()=>{try{let a=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=a==null?"":String(a);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,g=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&g!=null)try{t.node.setSelectionRange(u,g)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(c),r.__exec.value=n}if(typeof t.style=="function"){let n=t.style,i=nt(t,t.styleDeps,n),c,a=N(()=>{let l=i(t,t.state,t.context),f=Js(l);(f===null||f!==c)&&(c=f,Xt(t.node,l))},{depth:r.path.length});r.__effects.push(a),r.__exec.style=n}else if(t.style&&typeof t.style=="object")for(let n in t.style){let i=t.style[n];if(typeof i!="function")continue;let c=nt(t,$e(t.styleDeps,n),i),a,l=N(()=>{try{let f=c(t,t.state,t.context);if(t.node){let u=n+":"+String(f);u!==a&&(a=u,Xt(t.node,{[n]:f}))}}catch{}},{depth:r.path.length});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let n in t.attr)if(typeof t.attr[n]=="function"){let i=nt(t,$e(t.attrDeps,n),t.attr[n]),c=n,a=N(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1?t.node.removeAttribute(c):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(c,l===!0?"":l))}catch{}},{depth:r.path.length});r.__effects.push(a)}}if(t.aria&&typeof t.aria=="object")for(let n in t.aria){if(typeof t.aria[n]!="function")continue;let i=nt(t,$e(t.ariaDeps,n),t.aria[n]),c="aria-"+n.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=N(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null||l===!1?t.node.removeAttribute(c):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(c,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.data&&typeof t.data=="object")for(let n in t.data){if(typeof t.data[n]!="function")continue;let i=nt(t,$e(t.dataDeps,n),t.data[n]),a="data-"+n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=N(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(a):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(a,f===!0?"":f)}catch{}},{depth:r.path.length});r.__effects.push(l)}let s=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(s)for(let n in s){if(typeof s[n]!="function")continue;let i=nt(t,$e(t.classDeps,n),s[n]),c=N(()=>{try{let a=i(t,t.state,t.context);if(!t.node?.classList)return;typeof a=="string"?t.node.classList.add(a):a?t.node.classList.add(n):t.node.classList.remove(n)}catch{}},{depth:r.path.length});r.__effects.push(c)}!o&&typeof t.if=="function"&&ri(t,r,t.if);for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||rt.has(n)||typeof t[n]!="function")continue;let i=n.charCodeAt(0);if(i>=65&&i<=90||Yt(n))continue;let c=t[n];r.__exec[n]=c;let a=t.tag||"div";if(Oe(a,n)&&!pt[n]&&!(st&&st.has(n))){let l=n,f=nt(t,t[n+"Deps"],c),u=N(()=>{try{let g=f(t,t.state,t.context);t.node?.setAttribute&&(g==null||g===!1?t.node.removeAttribute(l):typeof g!="function"&&typeof g!="object"&&(l==="src"&&"src"in t.node?t.node.src=g:t.node.setAttribute(l,g===!0?"":g)))}catch{}},{depth:r.path.length});r.__effects.push(u)}}if(Ia(t),ja(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let n=t.onStateUpdate,i=t.stateDeps,c=!1,a=[],l=N(()=>{let f=[];for(let y=0;y<i.length;y++){let d=i[y];try{f[y]=typeof d=="function"?d(t,t.state,t.context):t.state?.[d]}catch{f[y]=void 0}}if(!c){c=!0,a=f;return}let u=f.length!==a.length;for(let y=0;!u&&y<f.length;y++)f[y]!==a[y]&&(u=!0);let g=a;if(a=f,!u)return;let h=t.context?.designSystem;h&&H(h);try{n(t,t.state,t.context,{prev:g,next:f})}catch(y){if(t.context?.plugins?.length&&St("error",t,{hook:"onStateUpdate",error:y})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',y),t.context?.strictMode)throw y}finally{h&&G()}},{depth:r.path.length});r.__effects.push(l)}}function ri(t,e,r){let o=nt(t,t.ifDeps,r),s=N(()=>{let n;try{n=o(t,t.state,t.context)}catch(c){if(n=!1,e.__ifError=c,typeof console<"u"&&console.warn){let a=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${a} \u2014 treating as false:`,c?.message||c)}return}let i=e.__if;if(e.__if=!!n,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized){t.node||(t.node=oe(t)),t.node&&(t.node.ref=t);let c=t.parent,a=c?.node;if(a&&t.node){let l=null,f=Object.keys(c),u=f.indexOf(t.key);for(let g=u+1;g<f.length;g++){let h=c[f[g]];if(h?.node?.parentNode===a){l=h.node;break}}l?a.insertBefore(t.node,l):a.appendChild(t.node)}else mn(t,t.parent);hn(t)}else{if(e.__ifInitialized=!0,t.tag||(t.tag=ne(t)),Ot("Init",t,{}),t.node||(t.node=oe(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 a=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(a),e.__fragmentAnchor=a}Ot("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),si(t,{}),ei(t,{skipIfEffect:!0}),hn(t),ni(t),ii(t,{}),mn(t,t.parent),Zs(t,{})}},{depth:e.path.length});e.__effects.push(s)}function hn(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),Fa(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Xt(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let o=t.attr[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.setAttribute&&e.setAttribute(r,o===!0?"":o)}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.dataset&&(e.dataset[r]=o===!0?"":o)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(o=>o&&e.classList.add(o));else if(typeof r=="object")for(let o in r){let s=typeof r[o]=="function"?r[o](t,t.state,t.context):r[o];s&&e.classList.add(typeof s=="string"?s:o)}}}}function Js(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Xt(t,e){if(!t||!e||!t.style)return;let r=null;for(let o in e){let s=e[o];if(s!=null){if(o.charAt(0)==="&"&&typeof s=="object"){r||(r={}),r[o]=s;continue}try{let n=String(s),i=o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),c=n.trim(),a=/\s*!important\s*$/.test(c),l=c.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,a?"important":"")}catch{}}}r&&Ra(t,r)}var Pa=0;function Ra(t,e){let r=`_ds${Pa++}`;t.classList.add(r);let o=t.ownerDocument,s=o.querySelector("style[data-smbls-scoped]");s||(s=o.createElement("style"),s.setAttribute("data-smbls-scoped",""),o.head.appendChild(s));let n="";for(let i in e){let c="."+r,a=i.replace(/&/g,c).split(",").map(f=>{let u=f.trim();return u.includes(c)?u:c+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let g in l){let h=l[g];if(typeof h=="object"){let y=g.includes("&")?a.split(", ").map(m=>g.replace(/&/g,m)).join(", "):a.split(", ").map(m=>`${m} ${g}`).join(", "),d="";for(let m in h)d+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=Vt(`${y} { ${d} }`,y)+`
15
15
  `}else f+=`${g.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${h};`}f&&(n+=Vt(`${a} { ${f} }`,a)+`
16
16
  `),u&&(n+=u)}}n&&(s.textContent+=n)}function Ia(t){let e=t.subscribeTo;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch{e=null}if(!Array.isArray(e)||e.length===0)return;let r=t.__ref;for(let o=0;o<e.length;o++){let s=e[o];if(typeof s!="string"||s.length===0)continue;let n=s.split("."),i=n[0],c=n.slice(1),a={value:!1},l=N(()=>{let f=t.state&&(z(t.state)?t.state.root:null);if(!f||!z(f))return;let u=f;u=u[i];for(let h=0;h<c.length&&!(u==null||typeof u!="object");h++)if(z(u))u=u[c[h]];else break;if(!a.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let h=t.context?.designSystem;h&&H(h);try{t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0})===!1&&(g=!0)}catch(y){t.context?.plugins?.length&&St("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}finally{h&&G()}}if(!g&&t.node&&r.__effects)for(let h=0;h<r.__effects.length;h++){let y=r.__effects[h];y&&y!==l&&!y._disposed&&!y._isSubscribeToEffect&&typeof y._execute=="function"&&y._execute()}if(!g&&typeof t.onUpdate=="function"){let h=t.context?.designSystem;h&&H(h);try{t.onUpdate(t,t.state,t.context)}catch(y){t.context?.plugins?.length&&St("error",t,{hook:"onUpdate",error:y})||console.error("[DOMQL] subscribeTo onUpdate error:",y)}finally{h&&G()}}},{depth:r.path.length});a.value=!0,l._isSubscribeToEffect=!0,r.__effects.push(l)}}function xn(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var Xs=new Set;function Da(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;Xs.has(o)||(Xs.add(o),console.warn(`[smbls/css] "${t}" at ${r} 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 Zt(t,e,r){let o={},s=(n,i)=>{if(pt[n]){let c=pt[n](i,e,e.state,e.context);if(c){let a=Array.isArray(c)?c:[c];for(let l of a)l&&Object.assign(o,l)}}else o[n]=i};for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=t[n];if(typeof i=="function"&&(i=i(e,e.state,e.context)),!(i==null||typeof i=="function")){if(typeof i=="object"&&!Array.isArray(i)){if(n==="style"){for(let l in i){let f=i[l];typeof f=="function"&&(f=f(e,e.state,e.context)),!(f==null||typeof f=="function")&&s(l,f)}continue}if(xn(n,e)){let l=Zt(i,e,!0);Object.keys(l).length&&(o[`[data-theme="${n.slice(1)}"] &`]=l);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(n)){ke()&&Da(n,e);continue}let c=n;if(n.charCodeAt(0)===64&&!n.startsWith("@media")&&!n.startsWith("@keyframes")){let l=e.context?.designSystem?.media?.[n.slice(1)];l&&(c=`@media ${l}`)}let a=Zt(i,e,!1);Object.keys(a).length&&(o[c]=a);continue}s(n,i)}}if(r)for(let n in o){let i=o[n];typeof i=="string"&&!i.includes("!important")&&(o[n]=i+" !important")}return o}function ja(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;let s=o.charAt(0);if(s!=="."&&s!=="!")continue;let n=o.slice(1);if(!n)continue;let i=t[o];if(!i||typeof i!="object")continue;let c=s==="!",a={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{if(!t.node)return;let u,g=t[n];if(g===void 0)if(t.state&&n in t.state)u=t.state[n];else{let d=t.context?.cases?.[n];if(d===void 0)return;try{u=typeof d=="function"?d.call(t,t):d}catch(m){u=!1,e.__conditionalError=m,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,m?.message||m)}}else if(typeof g=="function")try{u=g(t,t.state,t.context)}catch(d){u=!1,e.__conditionalError=d,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,d?.message||d)}else u=g;let h=c?!u:!!u;if(h===a.lastMatch)return;a.lastMatch=h;let y=t.context?.designSystem;y&&H(y);try{if(h){let d={},m={},b=!1;for(let p in i){if(!Object.prototype.hasOwnProperty.call(i,p))continue;let _=i[p],S=p.charAt(0);if((S===":"||S==="@"||S==="&")&&_&&typeof _=="object"&&!Array.isArray(_)){if(xn(p,t)){let R=Zt(_,t,!0);Object.keys(R).length&&(m[`[data-theme="${p.slice(1)}"] &`]=R,b=!0)}else{let R=p;if(S==="@"&&!p.startsWith("@media")&&!p.startsWith("@keyframes")){let I=t.context?.designSystem?.media?.[p.slice(1)];I&&(R=`@media ${I}`)}let q=Zt(_,t,!1);Object.keys(q).length&&(m[R]=q,b=!0)}continue}let T=typeof _=="function"?_(t,t.state,t.context):_;if(T!=null)if(pt[p]){let R=pt[p](T,t,t.state,t.context);if(R){let q=Array.isArray(R)?R:[R];for(let I of q)I&&Object.assign(d,I)}}else st&&st.has(p)&&(d[p]=T)}let x=Object.keys(d);if(x.length){Xt(t.node,d);for(let p of x)r.set(p,o);a.appliedKeys=x}else a.appliedKeys=null;if(b){let p=Ee(m,null,t.context?.cssPrefix),_=p?p.split(" ").filter(Boolean):[];if(_.length&&t.node.classList){for(let S of _)t.node.classList.add(S);a.appliedClasses=_}else a.appliedClasses=null}else if(a.appliedClasses){for(let p of a.appliedClasses)t.node.classList.remove(p);a.appliedClasses=null}}else{if(a.appliedKeys){for(let d of a.appliedKeys)r.get(d)===o&&(t.node.style[d]="",r.delete(d));a.appliedKeys=null}if(a.appliedClasses){for(let d of a.appliedClasses)t.node.classList.remove(d);a.appliedClasses=null}}}finally{y&&G()}};e.__conditionalRunners.push(l);let f=N(l,{depth:e.path.length});e.__effects.push(f)}}var ln=new WeakSet;function Ma(t){let e=t.ownerDocument;!e||ln.has(e)||(ln.add(e),queueMicrotask(()=>{ln.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var un=new WeakSet,Ys=!1;function Fa(t){let{node:e}=t;if(!e)return;if(Ys||(Ys=!0,Ee({display:"none"})),un.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}un.add(t);let r=t.context?.designSystem;r&&H(r);try{let o={},s=!1;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||typeof t[n]=="function"||rt.has(n))continue;let i=n.charCodeAt(0);if(!(i>=65&&i<=90)&&!Yt(n)){if(pt[n]){let c=t[n],a=pt[n](c,t,t.state,t.context);if(a){if(Array.isArray(a))for(let l of a)l&&Object.assign(o,l);else Object.assign(o,a);s=!0}}else if(st&&st.has(n)){let c=t[n];c!=null&&typeof c!="object"&&(o[n]=c,s=!0)}else if(n.charCodeAt(0)===45){let c=t[n];c!=null&&typeof c!="object"&&(o[n]=c,s=!0)}else if(n.charAt(0)==="&"){let c=t[n];c&&typeof c=="object"&&(o[n]=c,s=!0)}else if(n.charAt(0)==="@"||n.charAt(0)===":"){let c=t[n];if(c&&typeof c=="object"){if(xn(n,t)){let a=Zt(c,t,!0);Object.keys(a).length&&(o[`[data-theme="${n.slice(1)}"] &`]=a,s=!0)}else{let a=n;if(n.charAt(0)==="@"&&!n.startsWith("@media")&&!n.startsWith("@keyframes")){let f=t.context?.designSystem?.media?.[n.slice(1)];f&&(a=`@media ${f}`)}let l=Zt(c,t,!1);Object.keys(l).length&&(o[a]=l,s=!0)}s=!0}}}}if(s){o.display&&String(o.display).includes("!important")&&(e.style.setProperty("display",String(o.display).replace(/\s*!important\s*$/,""),"important"),delete o.display);let n=Ee(o,null,t.context?.cssPrefix);if(n&&e.classList){let c=n.split(" ").filter(Boolean),a=!1;for(let l of c)e.classList.add(l),a||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(a=!0);a&&Ma(e)}let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let c=o.display;if(c&&c!==i)if(i==="none"){let a=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&a.push(l);for(let l of a)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display=t.display}}}finally{r&&G(),un.delete(t)}}function ni(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let s in t.aria){let n=t.aria[s];if(typeof n=="function"||typeof n=="object"||n==null||n===!1)continue;let i="aria-"+s.replace(/[A-Z]/g,c=>"-"+c.toLowerCase());e.setAttribute(i,n===!0?"":n)}let r=qs(t);for(let s in r){let n=r[s];n!=null&&n!==!1&&typeof n!="function"&&typeof n!="object"&&e.setAttribute(s,n===!0?"":n)}let o=t.tag||"div";for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||rt.has(s)||s==="on"||r[s]!==void 0)continue;let n=s.charCodeAt(0);if(!(n>=65&&n<=90)&&!Yt(s)&&!(pt[s]||st&&st.has(s))&&Oe(o,s)){let i=t[s];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=Ne(i,t,t.state,t.context),t[s]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;e.setAttribute(s,i===!0?"":i)}}}function La(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.autoGrow,o=r&&typeof r=="object"&&r.max?String(r.max):null;o&&(e.style.maxHeight=o);let s=()=>{e.style.height="auto",e.style.height=e.scrollHeight+"px"};s(),e.addEventListener("input",s),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("input",s)}catch{}})}var oi=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function si(t,e){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!Yt(r)||oi.has(r))continue;let o=t[r];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let n=o;o=function(c){return t.call(n,c)}}if(typeof o!="function")continue;let s=Aa(r);se.has(s)||ve(Ea(s),t,o)}Na(t)}function Na(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let g of oi){let h=t[g];typeof h=="function"&&(r[g]=h,o=!0)}if(!o)return;let s=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,n=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,c=0,a=0,l=!1,f=g=>{let h=g.touches&&g.touches[0]||g.changedTouches&&g.changedTouches[0];h&&(i=h.clientX,c=h.clientY,a=Date.now(),l=!0)},u=g=>{if(!l)return;l=!1;let h=g.changedTouches&&g.changedTouches[0]||g.touches&&g.touches[0];if(!h)return;let y=h.clientX-i,d=h.clientY-c,m=Date.now()-a;if(m>n)return;let b=Math.abs(y),x=Math.abs(d);if(Math.max(b,x)<s)return;let p;if(b>x*1.2)p=y<0?"left":"right";else if(x>b*1.2)p=d<0?"up":"down";else return;let _="onSwipe"+p.charAt(0).toUpperCase()+p.slice(1),S=r[_],T=r.onSwipe;S&&S.call(t,g,t,t.state,t.context),T&&T.call(t,{direction:p,dx:y,dy:d,dt:m,event:g},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 sr(t,e){let r={...t};for(let o in e){let s=r[o],n=e[o];s&&n&&typeof s=="object"&&typeof n=="object"&&!Array.isArray(s)&&!Array.isArray(n)&&typeof s!="function"&&typeof n!="function"?r[o]=sr(s,n):r[o]=n}return r}function gn(t,e,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",n=t.context?.document||globalThis.document,i=s?null:n?.createDocumentFragment();if(!s&&!i)return;let c=t.childProps,a=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let g=c;if(typeof c=="function")try{g=c(t,f)}catch{g=null}if(a==="state"){let d=u;(typeof u=="string"||typeof u=="number")&&(d={value:u,text:u}),f=g?{...g,state:d}:{state:d}}else g&&(f=sr(g,f));if(o&&!f.ignoreChildExtends)if(f.extends){let d=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(o)?o:[o];f={...f,extends:[...m,...d]}}else f={...f,extends:o};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,y=ut(f,t,h,r);!s&&y?.node&&i.appendChild(y.node)}s||t.node.appendChild(i);return}if(typeof e=="string"){let s=ti(e,t);if(Array.isArray(s)){gn(t,s,r);return}}if(typeof e=="object")for(let s in e){if(rt.has(s))continue;let n=e[s];if(!(n==null||n===!1)){if((typeof n=="string"||typeof n=="number")&&(n={text:n}),t.childProps&&(n=sr(t.childProps,n)),o&&!n.ignoreChildExtends)if(n.extends){let i=Array.isArray(n.extends)?n.extends:[n.extends],c=Array.isArray(o)?o:[o];n={...n,extends:[...c,...i]}}else n={...n,extends:o};ut(n,t,s,r)}}}function yn(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let o=r.options;if(!o||!o.length)return;let s=t.__ref,n=s&&s.__exec&&s.__exec.value,i=typeof n=="function",c=t.value!=null&&typeof t.value!="function";if(i||c){let f;if(i)try{f=n(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let a=e||!(s&&s.__selectSynced);if(s&&(s.__selectSynced=!0),!a)return;let l=-1;for(let f=0;f<o.length;f++)o[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function ii(t,e){let{children:r,content:o}=t,s=t.childExtends;if(typeof r=="function"){let i=r;r=i(t,t.state,t.context),t.children=r;let c=t.__ref,a=!1,l=nt(t,t.childrenDeps,i),f=N(()=>{let u=l(t,t.state,t.context);if(!a){a=!0;return}if(u===t.children)return;t.children=u;let g=typeof t.onContentUpdate=="function",h=g?[]:null,y=g?[]:null,d=g?[]:null;if(Array.isArray(u)&&t.childrenAs==="state"){let p=t.childProps,_=[],S=new Map;for(let D=0;D<u.length;D++){let L=u[D],O=p;if(typeof p=="function")try{O=p(t,L)}catch{O=null}let V=O&&O.key||L&&L.key||`${D}`;_.push(V),S.set(V,{rawChild:L,childProps:O})}let T=new Set(_),R=c.__children.slice();for(let D of R)if(!T.has(D)){let L=t[D];L?.remove&&L.remove(),delete t[D],y&&y.push(D)}let q=t.childExtends,I=t.tag==="fragment",it=t.context?.document||globalThis.document,ot=I?null:it?.createDocumentFragment();for(let D of _){let L=S.get(D),O=L.rawChild,V=t[D];if(V&&V.state){if(O&&typeof O=="object"){let et=V.state,Ut=et.$replace||et.replace,Pe=et.$update||et.update;if(typeof Ut=="function")Ut.call(et,O);else if(typeof Pe=="function"){for(let P in et)if(!(P==="__element"||P==="root"||P==="parent"||P==="update")&&!Object.prototype.hasOwnProperty.call(O,P))try{et[P]=void 0}catch{}Pe.call(et,O)}else for(let P in O)et[P]=O[P]}d&&d.push(D);continue}let Z=O;(typeof O=="string"||typeof O=="number")&&(Z={value:O,text:O});let tt=L.childProps,J=tt?{...tt,state:Z}:{state:Z};if(q&&!J.ignoreChildExtends)if(J.extends){let et=Array.isArray(J.extends)?J.extends:[J.extends],Ut=Array.isArray(q)?q:[q];J={...J,extends:[...Ut,...et]}}else J={...J,extends:q};let Bt=ut(J,t,D,e);!I&&Bt?.node&&ot&&ot.appendChild(Bt.node),h&&h.push(D)}if(!I&&ot&&ot.childNodes.length&&t.node&&t.node.appendChild(ot),!I&&t.node){let D=null;for(let L of _){let O=t[L]?.node;if(!O)continue;let V=D?D.nextSibling:t.node.firstChild;O!==V&&t.node.insertBefore(O,V),D=O}}c.__children=_,g&&(h.length||y.length)&&Ks(t,{added:h,removed:y,kept:d}),yn(t,!1);return}let x=g?[...c.__children]:null;for(let p of[...c.__children]){let _=t[p];_?.remove&&_.remove(),delete t[p]}c.__children=[],gn(t,u,e),yn(t,!1),g&&Ks(t,{added:[...c.__children],removed:x,kept:[]})},{depth:c.path.length});c.__effects.push(f)}if(gn(t,r||o,e),r||o)return;let n=t.context?.components||{};{let i=Object.keys(t);for(let c=0;c<i.length;c++){let a=i[c];if(!a.endsWith("Extends")||typeof t[a]!="string")continue;let l=a.slice(0,-7);if(!l||l.charCodeAt(0)<65||l.charCodeAt(0)>90)continue;let f={extends:t[a]};delete t[a];for(let u=c+1;u<i.length;u++){let g=i[u],h=g.charCodeAt(0);if(h>=65&&h<=90||rt.has(g)||typeof t[g]=="function"&&(g.startsWith("on")||g.startsWith(".")))break;let y=t[g];y!==void 0&&(f[g]=y,delete t[g])}t[l]&&typeof t[l]=="object"?t[l]={...f,...t[l]}:t[l]=f}}for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||rt.has(i)||typeof t[i]!="object"||t[i]===null)continue;let c=i.charCodeAt(0);if(c<65||c>90)continue;let a=t[i];if(!a.__ref){if(!a.extends&&!a.extend){let l=n[i]||n[`smbls.${i}`];l&&(a={...a,extends:l})}if(t.childProps&&(a=sr(t.childProps,a)),s&&!a.ignoreChildExtends)if(a.extends){let l=Array.isArray(a.extends)?a.extends:[a.extends],f=Array.isArray(s)?s:[s];a={...a,extends:[...f,...l]}}else a={...a,extends:s};ut(a,t,i,e)}}}function mn(t,e,r){let{node:o}=t;if(!o)return;o.ref=t;let s=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(s){let i=s.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let c=r.node.nextSibling;i.insertBefore(o,c||s)}else i.insertBefore(o,s);return}}let n=e?.node||(e?.nodeType?e:null);if(n)if(r?.position==="before"&&r.node)n.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?n.insertBefore(o,i):n.appendChild(o)}else n.appendChild(o)}function Ot(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&St(o,e,r);let s="on"+t,n=e[s];if(typeof n=="function"){let i=t==="Render"||t==="RenderRouter";if(i){if(e.__ref.__inRender)return!0;e.__ref.__inRender=!0}let c=e.context?.designSystem;c&&H(c);try{if(n(e,e.state,e.context,r)===!1)return!1}catch(a){if(e.context?.plugins?.length&&St("error",e,{hook:s,error:a})||console.error(`[DOMQL] Lifecycle "${s}" error:`,a),e.context?.strictMode)throw a}finally{c&&G(),i&&(e.__ref.__inRender=!1)}}return!0}var Va=ut;var Ba=(t,e,r={})=>{if(!t||typeof t!="object")throw new Error("[SymbolsEmbed.mount] rootDef must be an object");if(typeof Node>"u"||!(e instanceof Node))throw new Error("[SymbolsEmbed.mount] host must be a DOM element");let o=r.state?at(r.state):void 0;return ut(t,e,"Root",{state:o,context:r.context||{}})};return di(Ua);})();