sibujs 4.12.0 → 4.13.1

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.
Files changed (74) hide show
  1. package/dist/browser.cjs +71 -18
  2. package/dist/browser.js +4 -4
  3. package/dist/build.cjs +6618 -6178
  4. package/dist/build.d.cts +554 -415
  5. package/dist/build.d.ts +554 -415
  6. package/dist/build.js +2091 -1735
  7. package/dist/cdn.dev.global.js +12 -12
  8. package/dist/cdn.full.dev.global.js +13 -13
  9. package/dist/cdn.full.global.js +12 -12
  10. package/dist/cdn.global.js +12 -12
  11. package/dist/{chunk-WFRQ6D7H.js → chunk-22OPSWMF.js} +1 -1
  12. package/dist/{chunk-ZJCHY2IB.js → chunk-2NC56RGY.js} +1 -1
  13. package/dist/{chunk-NB7TFSJE.js → chunk-2O6JJCUR.js} +4 -4
  14. package/dist/{chunk-B2Y5BJSP.js → chunk-4UTGDVSA.js} +70 -16
  15. package/dist/{chunk-NAVLCP4S.js → chunk-5RIBLY2N.js} +4 -4
  16. package/dist/{chunk-T5O2CUHV.js → chunk-5XUGJM3J.js} +1 -1
  17. package/dist/{chunk-HXT2RNH5.js → chunk-ADZHPN2B.js} +1 -1
  18. package/dist/chunk-B36ADEIR.js +21 -0
  19. package/dist/{chunk-DFZL3AX7.js → chunk-C73VBPEF.js} +9 -5
  20. package/dist/{chunk-WH4U2VUE.js → chunk-CPQKWCJ2.js} +13 -5
  21. package/dist/{chunk-LEUEKK4G.js → chunk-EU7T7EB3.js} +2 -2
  22. package/dist/{chunk-QLG5IK7F.js → chunk-G3Z2FEBR.js} +4 -4
  23. package/dist/{chunk-ZPY2UAKM.js → chunk-J4X7ICH4.js} +3 -3
  24. package/dist/{chunk-XX4BRMWF.js → chunk-K4LNUT5L.js} +1 -1
  25. package/dist/{chunk-CI4W6XAU.js → chunk-KC62VURU.js} +3 -3
  26. package/dist/chunk-N5TBYXHW.js +17 -0
  27. package/dist/{chunk-653KGQS2.js → chunk-OIKD7YDY.js} +2 -2
  28. package/dist/{chunk-LYTUTXQP.js → chunk-PBJYCE2Z.js} +46 -4
  29. package/dist/{chunk-EMB5PG7V.js → chunk-QC3NP47A.js} +1 -1
  30. package/dist/{chunk-IHA62NGJ.js → chunk-QKFVMIAV.js} +1 -1
  31. package/dist/{chunk-LXBMVGVB.js → chunk-QZ47OZ25.js} +3 -3
  32. package/dist/{chunk-ZTYCCBU3.js → chunk-VFPLWUT7.js} +44 -26
  33. package/dist/{chunk-RK7EPQPG.js → chunk-YFTBCCVH.js} +1 -1
  34. package/dist/data.cjs +71 -18
  35. package/dist/data.js +5 -5
  36. package/dist/datePicker-DxuxWpgF.d.cts +285 -0
  37. package/dist/datePicker-DxuxWpgF.d.ts +285 -0
  38. package/dist/devtools.cjs +71 -18
  39. package/dist/devtools.js +4 -4
  40. package/dist/ecosystem.cjs +82 -21
  41. package/dist/ecosystem.js +7 -7
  42. package/dist/extras.cjs +131 -23
  43. package/dist/extras.d.cts +2 -2
  44. package/dist/extras.d.ts +2 -2
  45. package/dist/extras.js +21 -20
  46. package/dist/index.cjs +115 -37
  47. package/dist/index.d.cts +59 -5
  48. package/dist/index.d.ts +59 -5
  49. package/dist/index.js +10 -10
  50. package/dist/motion.cjs +69 -16
  51. package/dist/motion.js +3 -3
  52. package/dist/patterns.cjs +71 -18
  53. package/dist/patterns.js +5 -5
  54. package/dist/performance.cjs +69 -16
  55. package/dist/performance.js +4 -4
  56. package/dist/plugins.cjs +1421 -996
  57. package/dist/plugins.d.cts +132 -3
  58. package/dist/plugins.d.ts +132 -3
  59. package/dist/plugins.js +262 -11
  60. package/dist/routeMiddleware-B1sp4P7a.d.ts +688 -0
  61. package/dist/routeMiddleware-CedQTsLK.d.cts +688 -0
  62. package/dist/ssr.cjs +3607 -3524
  63. package/dist/ssr.d.cts +20 -671
  64. package/dist/ssr.d.ts +20 -671
  65. package/dist/ssr.js +15 -7
  66. package/dist/testing.cjs +71 -18
  67. package/dist/testing.js +2 -2
  68. package/dist/ui.cjs +78 -18
  69. package/dist/ui.js +8 -7
  70. package/dist/widgets.cjs +1352 -952
  71. package/dist/widgets.d.cts +100 -268
  72. package/dist/widgets.d.ts +100 -268
  73. package/dist/widgets.js +316 -7
  74. package/package.json +9 -1
@@ -1,10 +1,10 @@
1
- "use strict";(()=>{var Lo=Object.defineProperty;var _t=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Mo=(e,t)=>{for(var n in t)Lo(e,n,{get:t[n],enumerable:!0})};var xn={};Mo(xn,{DynamicComponent:()=>tl,ErrorBoundary:()=>Fc,ErrorDisplay:()=>pn,Fragment:()=>ol,KeepAlive:()=>al,Loading:()=>jc,MAX_DRAIN_TEARDOWNS:()=>le,Portal:()=>ul,SVG_NS:()=>R,Suspense:()=>kr,__renderParsedTemplate:()=>uo,__resetIdCounter:()=>to,a:()=>Ss,abbr:()=>vs,action:()=>qc,address:()=>rs,area:()=>Ws,array:()=>fl,article:()=>Xi,aside:()=>ns,asyncDerived:()=>ml,audio:()=>Us,autoResize:()=>Zr,b:()=>xs,base:()=>Fa,batch:()=>U,bdi:()=>Es,bdo:()=>Ts,bindDynamic:()=>hr,blockquote:()=>ls,body:()=>Gi,br:()=>ws,button:()=>Xe,canvas:()=>sa,caption:()=>da,catchError:()=>Wc,catchErrorAsync:()=>Uc,center:()=>lc,checkLeaks:()=>Dn,circle:()=>ja,cite:()=>ks,clickOutside:()=>Jr,clipPath:()=>ec,code:()=>tn,col:()=>fa,colgroup:()=>pa,context:()=>Gc,copyOnClick:()=>Xr,createId:()=>eo,customElement:()=>fc,data:()=>As,datalist:()=>xa,dd:()=>us,deepEqual:()=>We,deepSignal:()=>gl,defer:()=>Ol,defs:()=>Qa,del:()=>la,derived:()=>yn,details:()=>Da,dfn:()=>_s,dialog:()=>Ha,disableSSR:()=>Mr,dispose:()=>D,div:()=>_,dl:()=>ds,dt:()=>fs,each:()=>rl,effect:()=>Q,ellipse:()=>qa,em:()=>Cs,embed:()=>Xs,enableSSR:()=>Lr,enhance:()=>wt,enhanceAll:()=>kl,enqueueBatchedSignal:()=>De,external:()=>Lc,fieldset:()=>Ea,figcaption:()=>ps,figure:()=>ms,font:()=>uc,footer:()=>Qi,form:()=>Ta,g:()=>Wa,getAction:()=>Gr,getRequestScopedCache:()=>Rr,getRuntimeErrorHandler:()=>Nn,getSSRStore:()=>Oe,getSlot:()=>dl,h1:()=>os,h2:()=>is,h3:()=>Qt,h4:()=>ss,h5:()=>as,h6:()=>cs,head:()=>Ki,header:()=>Zi,hr:()=>gs,html:()=>lo,i:()=>Ns,iframe:()=>Zs,img:()=>Ks,input:()=>wa,ins:()=>ua,isBatching:()=>Rc,isSSR:()=>oe,kbd:()=>Rs,label:()=>ka,lazy:()=>wr,lazyIsland:()=>_l,legend:()=>Aa,li:()=>bs,line:()=>Ua,linearGradient:()=>rc,link:()=>za,longPress:()=>Yr,main:()=>ts,map:()=>Gs,mark:()=>Ls,marker:()=>cc,marquee:()=>dc,mask:()=>tc,match:()=>Xc,math:()=>ia,menu:()=>Ia,meta:()=>Va,meter:()=>_a,mount:()=>cl,mountIslands:()=>Ll,nav:()=>es,nextTick:()=>Il,noscript:()=>aa,object:()=>Qs,ol:()=>hs,on:()=>Tc,onCleanup:()=>vc,onMount:()=>St,onUnmount:()=>Sc,optgroup:()=>Ca,option:()=>Na,output:()=>Ra,p:()=>Zt,param:()=>ea,path:()=>Ka,pattern:()=>nc,picture:()=>ta,polygon:()=>Ga,polyline:()=>Ja,portal:()=>na,pre:()=>en,progress:()=>La,q:()=>Ms,radialGradient:()=>oc,reactiveArray:()=>pl,rect:()=>Ya,ref:()=>bl,registerAction:()=>qe,registerComponent:()=>Zc,registerDisposer:()=>x,registerIsland:()=>Cl,replaceChildrenSafely:()=>q,reportDrainRunaway:()=>be,reportError:()=>k,resolveComponent:()=>el,retrack:()=>ve,rp:()=>Os,rt:()=>Ds,ruby:()=>Hs,runInSSRContext:()=>Or,s:()=>Is,samp:()=>$s,script:()=>ca,section:()=>Yi,select:()=>Ma,setGlobalErrorHandler:()=>Kc,setMaxDrainIterations:()=>mr,setRuntimeErrorHandler:()=>Cn,show:()=>Jc,signal:()=>C,slot:()=>Pa,small:()=>Ps,source:()=>ra,span:()=>$,stop:()=>ic,store:()=>hl,strict:()=>vl,strictEffect:()=>xl,strong:()=>Bs,style:()=>Re,sub:()=>Fs,summary:()=>$a,sup:()=>zs,svg:()=>oa,symbol:()=>ac,table:()=>ma,tagFactory:()=>d,takePendingError:()=>bt,tbody:()=>ga,td:()=>ba,template:()=>Ba,text:()=>Xa,textarea:()=>Oa,tfoot:()=>ha,th:()=>ya,thead:()=>Sa,time:()=>Vs,title:()=>Ji,tr:()=>va,track:()=>Js,transition:()=>Hl,trapFocus:()=>Qr,trustHTML:()=>xo,tspan:()=>Za,u:()=>js,ul:()=>ys,unregisterComponent:()=>Qc,unregisterDisposer:()=>Ke,unregisterIsland:()=>Nl,untracked:()=>re,use:()=>sc,var_:()=>qs,video:()=>Ys,watch:()=>yl,when:()=>Yc,withSSR:()=>Dr,writable:()=>Sl});var _n=Symbol.for("sibujs.runtime-errors.v1");function Ct(){let e=globalThis,t=e[_n];if(t)return t;let n={handler:null,handlerDepth:0};return e[_n]=n,n}function Cn(e){let t=Ct(),n=t.handler;return t.handler=e,n}function Nn(){return Ct().handler}function Nt(e){if(e instanceof Error)return e;let t=typeof e=="string"?e:`Non-Error value thrown: ${Oo(e)}`;return new Error(t,{cause:e})}function Oo(e){if(typeof e=="symbol")return e.toString();try{return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}catch{return Object.prototype.toString.call(e)}}function Do(e){return e.name?`${e.phase} "${e.name}"`:e.phase}var Ho=Symbol.for("sibujs.reactive.v1");function Io(e){let t=globalThis[Ho];return t?.untracked?t.untracked(e):e()}var $o="sibu:error-propagate";function Po(e,t){let n=t.node;if(!n||typeof CustomEvent>"u")return!1;let r=Bo(n);if(!r)return!1;try{let o=new CustomEvent($o,{bubbles:!0,cancelable:!0,detail:{error:e,context:t}});return r.dispatchEvent(o)===!1}catch{return!1}}function Bo(e){let n=e;for(;n;){if(n.nodeType===1&&typeof n.dispatchEvent=="function")return n;n=n.parentNode}let r=e;return typeof r.dispatchEvent=="function"?r:null}function Fo(e,t){typeof console>"u"||console.error(`[SibuJS] Uncaught error during ${Do(t)}: ${e.message}`,e)}function k(e,t){let n=Nt(e);Io(()=>{if(Po(n,t))return;let r=Ct(),o=r.handler;if(o&&r.handlerDepth===0){r.handlerDepth++;try{o(e instanceof Error?e:n,t);return}catch(i){if(typeof console<"u"){let s=i instanceof Error?i.message:String(i);console.error(`[SibuJS] runtime error handler itself threw: ${s}`,i)}}finally{r.handlerDepth--}}Fo(n,t)})}function se(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:!0}function M(e,t){if(!e)throw new Error(`[SibuJS] ${t}`)}function j(e){{let t=e();t&&console.warn(`[SibuJS] ${t}`)}}function O(e){console.warn(`[SibuJS] ${e}`)}var ae=new WeakMap,le=1e4;function be(e,t,n){typeof console>"u"||console.error(`[SibuJS ${e}] runaway cleanup: stopped after running ${t} teardowns with ${n} still queued. Cleanup production did not stabilize before the teardown safety ceiling was reached \u2014 the remaining work was NOT run.`,{executed:t,remaining:n})}var Te=0;function ot(e){let t=e;for(;t?.closed;)t=t.forwardTo;return t??null}var K=[];function Rn(){return ot(K[K.length-1])}function Ln(e){return e===null&&K.length===0?!1:(K.push(ot(e)),!0)}function Mn(){K.pop()}function x(e,t){let n=ae.get(e);n||(n=[],ae.set(e,n)),n.push(t),Te++;let r=ot(K[K.length-1]);r&&r.entries.push([e,t])}function On(e){let t={entries:[],closed:!1},n=t.entries;K.push(t);let r;try{r=e()}catch(i){let s=0;try{for(;n.length>0;){if(s>=le){be("rollback",s,n.length);break}let[a,c]=n.pop();if(Ke(a,c)){s++;try{c()}catch(l){k(l,{phase:"cleanup",name:"disposer"})}}}}finally{t.closed=!0,n.length=0,K.pop()}throw i}t.closed=!0,K.pop();let o=ot(K[K.length-1]);if(o){for(let i of n)ae.get(i[0])?.includes(i[1])&&o.entries.push(i);t.forwardTo=o}return n.length=0,r}function Ke(e,t){let n=ae.get(e);if(!n)return!1;let r=n.indexOf(t);return r===-1?!1:(n.splice(r,1),Te--,n.length===0&&ae.delete(e),!0)}function D(e){let t=[e],n=[];for(;t.length>0;){let r=t.pop();n.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)t.push(o[i])}for(let r=n.length-1;r>=0;r--)zo(n[r])}function zo(e){if(!ae.has(e))return;let t=0,n=!1;for(;!n;){let r=ae.get(e);if(!r||r.length===0)break;let o=r.slice();ae.delete(e),Te-=o.length;for(let i=0;i<o.length;i++){if(t>=le){let s=o.slice(i),a=ae.get(e);ae.set(e,a?s.concat(a):s),Te+=s.length,be("dispose",t,s.length+(a?.length??0)),n=!0;break}t++;try{o[i]()}catch(s){k(s,{phase:"cleanup",name:"disposer"})}}}}function q(e,...t){for(let r=0;r<t.length;r++){let o=t[r];o.parentNode?.removeChild(o)}let n=Array.from(e.childNodes);for(let r=0;r<n.length;r++)D(n[r]);e.replaceChildren(...t)}function Dn(e=0){return e>0&&Te>e&&O(`checkLeaks: ${Te} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),Te}function $e(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}var Vo=/[A-Z]/,jo=/[A-Z]/g;function G(e){return Vo.test(e)?e.replace(jo,t=>String.fromCharCode(t.charCodeAt(0)+32)):e}function he(e){if(e.length<3)return!1;let t=e.toLowerCase();return t[0]==="o"&&t[1]==="n"&&t.charCodeAt(2)>=97&&t.charCodeAt(2)<=122}var qo=["http:","https:","mailto:","tel:","ftp:"],Wo=/^[\x00-\x20\x7f-\x9f]+|[\x00-\x20\x7f-\x9f]+$/g;function st(e){let t=$e(e).trim();if(!t)return"";let n=e.replace(Wo,"");if(t.length>=2&&(t[0]==="\\"||t[0]==="/")&&(t[1]==="\\"||t[1]==="/")&&(t[0]==="\\"||t[1]==="\\"))return"";let r=t.toLowerCase(),o=-1;for(let s=0;s<r.length;s++){let a=r.charCodeAt(s);if(a===58){o=s;break}if(a===47||a===63||a===35)break}if(o===-1)return n;let i=r.slice(0,o+1);return/^[a-z][a-z0-9+.-]*:$/.test(i)&&qo.indexOf(i)===-1?"":n}var Uo=/^\d+(\.\d+)?[wx]$/;function Rt(e){return e===" "||e===" "||e===`
2
- `||e==="\r"||e==="\f"}function Ko(e){let t=String(e),n=[],r=0,o=t.length;for(;r<o;){for(;r<o&&(Rt(t[r])||t[r]===",");)r++;if(r>=o)break;let i=r;for(;r<o&&!Rt(t[r]);)r++;let s=t.slice(i,r),a=[];if(s.endsWith(","))s=s.replace(/,+$/,"");else{let l="",u=!1;for(;r<o;){let m=t[r];if(u){l+=m,m===")"&&(u=!1),r++;continue}if(Rt(m)){l&&a.push(l),l="",r++;continue}if(m===","){r++;break}m==="("&&(u=!0),l+=m,r++}l&&a.push(l)}if(s===""||a.length>1||a.length===1&&!Uo.test(a[0]))continue;let c=st(s);c&&(c.startsWith(",")||c.endsWith(",")||n.push(a.length===1?`${c} ${a[0]}`:c))}return n.join(", ")}var Go=/[(:@\\]/;function Jo(e){return e===" "||e===" "||e===`
3
- `||e==="\r"||e==="\f"}function Hn(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function Yo(e){let t="";for(let n=0;n<e.length;n++){let r=e[n];if(r!=="\\"){t+=r;continue}if(n+1>=e.length)break;let o=e[n+1];if(o===`
1
+ "use strict";(()=>{var $o=Object.defineProperty;var Nt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Bo=(e,t)=>{for(var n in t)$o(e,n,{get:t[n],enumerable:!0})};var Tn={};Bo(Tn,{DynamicComponent:()=>uu,ErrorBoundary:()=>Gc,ErrorDisplay:()=>gn,Fragment:()=>fu,KeepAlive:()=>gu,Loading:()=>Xc,MAX_DRAIN_TEARDOWNS:()=>ce,Portal:()=>yu,SVG_NS:()=>R,Suspense:()=>Lr,__renderParsedTemplate:()=>yo,__resetIdCounter:()=>ao,a:()=>As,abbr:()=>Cs,action:()=>Zc,address:()=>ds,area:()=>Qs,array:()=>vu,article:()=>is,aside:()=>ls,asyncDerived:()=>Eu,audio:()=>ea,autoResize:()=>oo,b:()=>Ns,base:()=>Ga,batch:()=>K,bdi:()=>Rs,bdo:()=>Ls,bindDynamic:()=>Tr,blockquote:()=>hs,body:()=>ns,br:()=>Ms,button:()=>Qe,canvas:()=>ma,caption:()=>Sa,catchError:()=>Qc,catchErrorAsync:()=>eu,center:()=>hc,checkLeaks:()=>Pn,circle:()=>Xa,cite:()=>Os,clickOutside:()=>to,clipPath:()=>cc,code:()=>rn,col:()=>va,colgroup:()=>xa,context:()=>nu,copyOnClick:()=>ro,createId:()=>so,customElement:()=>vc,data:()=>Ds,datalist:()=>Na,dd:()=>ys,deepEqual:()=>Ke,deepSignal:()=>Tu,defer:()=>zu,defs:()=>ac,del:()=>ha,derived:()=>vn,details:()=>Va,dfn:()=>Hs,dialog:()=>Wa,disableSSR:()=>$r,dispose:()=>D,div:()=>A,dl:()=>Ss,dt:()=>vs,each:()=>du,effect:()=>Q,ellipse:()=>Za,em:()=>Is,embed:()=>ia,enableSSR:()=>Pr,enhance:()=>_t,enhanceAll:()=>Ou,enqueueBatchedSignal:()=>De,external:()=>Bc,fieldset:()=>Ra,figcaption:()=>xs,figure:()=>Es,font:()=>yc,footer:()=>as,form:()=>La,g:()=>Qa,getAction:()=>eo,getRequestScopedCache:()=>Ir,getRuntimeErrorHandler:()=>Mn,getSSRStore:()=>Oe,getSlot:()=>Su,h1:()=>fs,h2:()=>ps,h3:()=>tn,h4:()=>ms,h5:()=>gs,h6:()=>bs,head:()=>ts,header:()=>ss,hr:()=>Ts,html:()=>ho,i:()=>Ps,iframe:()=>sa,img:()=>ta,input:()=>Ma,ins:()=>ya,isBatching:()=>$c,isSSR:()=>re,kbd:()=>$s,label:()=>Oa,lazy:()=>Rr,lazyIsland:()=>Hu,legend:()=>Da,li:()=>ws,line:()=>ec,linearGradient:()=>dc,link:()=>Ja,longPress:()=>no,main:()=>us,map:()=>na,mark:()=>Bs,marker:()=>bc,marquee:()=>Sc,mask:()=>uc,match:()=>iu,math:()=>pa,menu:()=>ja,meta:()=>Ya,meter:()=>Ha,mount:()=>bu,mountIslands:()=>Bu,nav:()=>cs,nextTick:()=>ju,noscript:()=>ga,object:()=>aa,ol:()=>ks,on:()=>Lc,onCleanup:()=>Cc,onMount:()=>xt,onUnmount:()=>Ac,optgroup:()=>Ia,option:()=>Pa,output:()=>$a,p:()=>en,param:()=>ca,path:()=>tc,pattern:()=>lc,picture:()=>ua,polygon:()=>nc,polyline:()=>rc,portal:()=>la,pre:()=>nn,progress:()=>Ba,q:()=>Fs,radialGradient:()=>fc,reactiveArray:()=>xu,rect:()=>oc,ref:()=>wu,registerAction:()=>Ue,registerComponent:()=>su,registerDisposer:()=>x,registerIsland:()=>Iu,replaceChildrenSafely:()=>q,reportDrainRunaway:()=>ge,reportError:()=>_,resolveComponent:()=>cu,retrack:()=>Se,rp:()=>zs,rt:()=>Vs,ruby:()=>Ws,runInSSRContext:()=>Br,s:()=>js,samp:()=>qs,script:()=>ba,section:()=>os,select:()=>Fa,setGlobalErrorHandler:()=>tu,setMaxDrainIterations:()=>vr,setRuntimeErrorHandler:()=>Ln,show:()=>ru,signal:()=>C,slot:()=>Ua,small:()=>Us,source:()=>da,span:()=>P,stop:()=>pc,store:()=>ku,strict:()=>Cu,strictEffect:()=>Nu,strong:()=>Ks,style:()=>Re,sub:()=>Gs,summary:()=>qa,sup:()=>Js,svg:()=>fa,symbol:()=>gc,table:()=>Ea,tagFactory:()=>d,takePendingError:()=>yt,tbody:()=>Ta,td:()=>wa,template:()=>Ka,text:()=>ic,textarea:()=>za,tfoot:()=>ka,th:()=>_a,thead:()=>Aa,time:()=>Ys,title:()=>rs,tr:()=>Ca,track:()=>ra,transition:()=>Wu,trapFocus:()=>io,trustHTML:()=>Co,tspan:()=>sc,u:()=>Xs,ul:()=>_s,unregisterComponent:()=>au,unregisterDisposer:()=>Je,unregisterIsland:()=>Pu,untracked:()=>ne,use:()=>mc,var_:()=>Zs,video:()=>oa,watch:()=>_u,when:()=>ou,withSSR:()=>Fr,writable:()=>Au});var Rn=Symbol.for("sibujs.runtime-errors.v1");function Rt(){let e=globalThis,t=e[Rn];if(t)return t;let n={handler:null,handlerDepth:0};return e[Rn]=n,n}function Ln(e){let t=Rt(),n=t.handler;return t.handler=e,n}function Mn(){return Rt().handler}function Lt(e){if(e instanceof Error)return e;let t=typeof e=="string"?e:`Non-Error value thrown: ${Fo(e)}`;return new Error(t,{cause:e})}function Fo(e){if(typeof e=="symbol")return e.toString();try{return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}catch{return Object.prototype.toString.call(e)}}function zo(e){return e.name?`${e.phase} "${e.name}"`:e.phase}var Vo=Symbol.for("sibujs.reactive.v1");function Wo(e){let t=globalThis[Vo];return t?.untracked?t.untracked(e):e()}var jo="sibu:error-propagate";function qo(e,t){let n=t.node;if(!n||typeof CustomEvent>"u")return!1;let r=Uo(n);if(!r)return!1;try{let o=new CustomEvent(jo,{bubbles:!0,cancelable:!0,detail:{error:e,context:t}});return r.dispatchEvent(o)===!1}catch{return!1}}function Uo(e){let n=e;for(;n;){if(n.nodeType===1&&typeof n.dispatchEvent=="function")return n;n=n.parentNode}let r=e;return typeof r.dispatchEvent=="function"?r:null}function Ko(e,t){typeof console>"u"||console.error(`[SibuJS] Uncaught error during ${zo(t)}: ${e.message}`,e)}function _(e,t){let n=Lt(e);Wo(()=>{if(qo(n,t))return;let r=Rt(),o=r.handler;if(o&&r.handlerDepth===0){r.handlerDepth++;try{o(e instanceof Error?e:n,t);return}catch(i){if(typeof console<"u"){let s=i instanceof Error?i.message:String(i);console.error(`[SibuJS] runtime error handler itself threw: ${s}`,i)}}finally{r.handlerDepth--}}Ko(n,t)})}function ie(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:!0}function M(e,t){if(!e)throw new Error(`[SibuJS] ${t}`)}function j(e){{let t=e();t&&console.warn(`[SibuJS] ${t}`)}}function O(e){console.warn(`[SibuJS] ${e}`)}var se=new WeakMap,ce=1e4;function ge(e,t,n){typeof console>"u"||console.error(`[SibuJS ${e}] runaway cleanup: stopped after running ${t} teardowns with ${n} still queued. Cleanup production did not stabilize before the teardown safety ceiling was reached \u2014 the remaining work was NOT run.`,{executed:t,remaining:n})}var Ee=0;function st(e){let t=e;for(;t?.closed;)t=t.forwardTo;return t??null}var G=[];function On(){return st(G[G.length-1])}function Dn(e){return e===null&&G.length===0?!1:(G.push(st(e)),!0)}function Hn(){G.pop()}function x(e,t){let n=se.get(e);n||(n=[],se.set(e,n)),n.push(t),Ee++;let r=st(G[G.length-1]);r&&r.entries.push([e,t])}function In(e){let t={entries:[],closed:!1},n=t.entries;G.push(t);let r;try{r=e()}catch(i){let s=0;try{for(;n.length>0;){if(s>=ce){ge("rollback",s,n.length);break}let[a,c]=n.pop();if(Je(a,c)){s++;try{c()}catch(u){_(u,{phase:"cleanup",name:"disposer"})}}}}finally{t.closed=!0,n.length=0,G.pop()}throw i}t.closed=!0,G.pop();let o=st(G[G.length-1]);if(o){for(let i of n)se.get(i[0])?.includes(i[1])&&o.entries.push(i);t.forwardTo=o}return n.length=0,r}function Je(e,t){let n=se.get(e);if(!n)return!1;let r=n.indexOf(t);return r===-1?!1:(n.splice(r,1),Ee--,n.length===0&&se.delete(e),!0)}function D(e){let t=[e],n=[];for(;t.length>0;){let r=t.pop();n.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)t.push(o[i])}for(let r=n.length-1;r>=0;r--)Go(n[r])}function Go(e){if(!se.has(e))return;let t=0,n=!1;for(;!n;){let r=se.get(e);if(!r||r.length===0)break;let o=r.slice();se.delete(e),Ee-=o.length;for(let i=0;i<o.length;i++){if(t>=ce){let s=o.slice(i),a=se.get(e);se.set(e,a?s.concat(a):s),Ee+=s.length,ge("dispose",t,s.length+(a?.length??0)),n=!0;break}t++;try{o[i]()}catch(s){_(s,{phase:"cleanup",name:"disposer"})}}}}function q(e,...t){for(let r=0;r<t.length;r++){let o=t[r];o.parentNode?.removeChild(o)}let n=Array.from(e.childNodes);for(let r=0;r<n.length;r++)D(n[r]);e.replaceChildren(...t)}function Pn(e=0){return e>0&&Ee>e&&O(`checkLeaks: ${Ee} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),Ee}function Pe(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}var Jo=/[A-Z]/,Yo=/[A-Z]/g;function J(e){return Jo.test(e)?e.replace(Yo,t=>String.fromCharCode(t.charCodeAt(0)+32)):e}function be(e){if(e.length<3)return!1;let t=e.toLowerCase();return t[0]==="o"&&t[1]==="n"&&t.charCodeAt(2)>=97&&t.charCodeAt(2)<=122}var Xo=["http:","https:","mailto:","tel:","ftp:"],Zo=/^[\x00-\x20\x7f-\x9f]+|[\x00-\x20\x7f-\x9f]+$/g;function ct(e){let t=Pe(e).trim();if(!t)return"";let n=e.replace(Zo,"");if(t.length>=2&&(t[0]==="\\"||t[0]==="/")&&(t[1]==="\\"||t[1]==="/")&&(t[0]==="\\"||t[1]==="\\"))return"";let r=t.toLowerCase(),o=-1;for(let s=0;s<r.length;s++){let a=r.charCodeAt(s);if(a===58){o=s;break}if(a===47||a===63||a===35)break}if(o===-1)return n;let i=r.slice(0,o+1);return/^[a-z][a-z0-9+.-]*:$/.test(i)&&Xo.indexOf(i)===-1?"":n}var Qo=/^\d+(\.\d+)?[wx]$/;function Mt(e){return e===" "||e===" "||e===`
2
+ `||e==="\r"||e==="\f"}function ei(e){let t=String(e),n=[],r=0,o=t.length;for(;r<o;){for(;r<o&&(Mt(t[r])||t[r]===",");)r++;if(r>=o)break;let i=r;for(;r<o&&!Mt(t[r]);)r++;let s=t.slice(i,r),a=[];if(s.endsWith(","))s=s.replace(/,+$/,"");else{let u="",l=!1;for(;r<o;){let p=t[r];if(l){u+=p,p===")"&&(l=!1),r++;continue}if(Mt(p)){u&&a.push(u),u="",r++;continue}if(p===","){r++;break}p==="("&&(l=!0),u+=p,r++}u&&a.push(u)}if(s===""||a.length>1||a.length===1&&!Qo.test(a[0]))continue;let c=ct(s);c&&(c.startsWith(",")||c.endsWith(",")||n.push(a.length===1?`${c} ${a[0]}`:c))}return n.join(", ")}var ti=/[(:@\\]/;function ni(e){return e===" "||e===" "||e===`
3
+ `||e==="\r"||e==="\f"}function $n(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function ri(e){let t="";for(let n=0;n<e.length;n++){let r=e[n];if(r!=="\\"){t+=r;continue}if(n+1>=e.length)break;let o=e[n+1];if(o===`
4
4
  `||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
5
- `?2:1;continue}if(Hn(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&Hn(e[s]);)i+=e[s],s++;s<e.length&&Jo(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
6
- `?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;t+=c?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var In=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],Xo=4,Zo=5,Qo=8;function ei(e){if(!e)return"an element";let t=e.tagName.toLowerCase(),n=e.getAttribute("id");n&&(t+=`#${n}`);let r=e.getAttribute("class");return r&&(t+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${t}>`}var Lt=new Set,$n=100,Pn=!1;function it(e,t,n){j(()=>{let r=["url() in an inline style is an exfiltration channel: the browser fetches it immediately and the URL's path or query can carry page data off-origin","expression() executes arbitrary script in legacy engines","the javascript: scheme executes script","the vbscript: scheme executes script","-moz-binding loads and runs remote XBL","behavior: loads and runs a remote HTC script","@import pulls in a remote stylesheet","image-set() fetches remote images, the same exfiltration channel as url()","filter:progid activates legacy scriptable filters","image() fetches its string argument as a URL, the same exfiltration channel as url()","src() fetches its string argument as a URL, the same exfiltration channel as url()"],o=n?.property?`${n.property}: ${e}`:e,i=ei(n?.element),s=`${i}|${o}`;return Lt.has(s)?"":Lt.size>=$n?Pn?"":(Pn=!0,`${$n} distinct dropped style declarations have been reported; suppressing further ones for the rest of this session so they cannot flood the console. The declarations are still dropped \u2014 only the reporting stops. Fix the reported ones and reload to see any that remain.`):(Lt.add(s),`style declaration "${o}" was dropped by the style sanitizer on ${i} \u2014 ${r[t]}. The element renders without it, which usually looks like a missing image rather than an error. Sanctioned alternatives: for a content image use an <img> element (or a <picture>); for decoration, put the rule in a stylesheet and set a class instead \u2014 stylesheet CSS is not sanitized, only inline style attributes are. If this declaration is not yours, it came from untrusted data and the drop just prevented an exfiltration.`)})}function Bn(e){return(e.includes("\\")?Yo(e):e).toLowerCase().replace(/\s+/g,"")}function Mt(e){if(!Go.test(e))return-1;let t=Bn(e);for(let n=0;n<In.length;n++)if(t.includes(In[n]))return n;return-1}function at(e,t,n){let r=Ot(e,t);return r===-1?t:(it(t,r,{property:e,element:n?.element}),"")}function Ot(e,t){let n=Mt(t);if(n!==-1)return n;let r=G(e);return r==="behavior"?Zo:r==="-moz-binding"?Xo:(r==="filter"||r==="-ms-filter")&&Bn(t).includes("progid:")?Qo:-1}function ti(e){let t=[],n="",r=0,o="";for(let s=0;s<e.length;s++){let a=e[s];if(o){n+=a,a==="\\"&&s+1<e.length?n+=e[++s]:a===o&&(o="");continue}if(a==="\\"){n+=a,s+1<e.length&&(n+=e[++s]);continue}if(a==="/"&&e[s+1]==="*"){let c=e.indexOf("*/",s+2);if(c===-1)return null;s=c+1;continue}if(a==='"'||a==="'")o=a;else if(a==="("||a==="[")r++;else if(a===")"||a==="]"){if(--r<0)return null}else{if(a==="{"||a==="}")return null;if(a===";"&&r===0){t.push(n),n="";continue}}n+=a}if(o||r!==0)return null;t.push(n);let i=[];for(let s of t){let a=s.indexOf(":");if(a===-1)continue;let c=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(c))continue;let l=s.slice(a+1).trim(),u=/!\s*important\s*$/i.exec(l);if(u&&(l=l.slice(0,u.index).trim()),l==="")continue;let m=c.startsWith("--")?c:G(c);i.push([m,l,u!==null])}return i}function ni(e,t){let n=String(e),r=ti(n);if(r===null)return Mt(n)!==-1&&it(n,Mt(n),t),"";let o=[];for(let[i,s,a]of r){let c=Ot(i,s);if(c!==-1){it(s,c,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function ct(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return ni(n,t);let r=document.createElement("div");try{r.style.cssText=n}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),c=Ot(s,a);if(c!==-1){it(a,c,{property:s,element:t?.element});continue}let l=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${l?` !${l}`:""}`)}return o.join("; ")}var Dt=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),ri=new Set(["srcdoc"]);function Ge(e){return ri.has(e.toLowerCase())}function Fn(e){return Dt.has(e.toLowerCase())}function oi(e){let t=e.toLowerCase();return t==="style"||Dt.has(t)}function ii(e,t,n){let r=e.toLowerCase();return r==="srcset"?Ko(t):Dt.has(r)?st(t):r==="style"?ct(t,n):t}function zn(e,t,n){if(!oi(e))return t;let r=ii(e,t,n);return r===""?null:r}function we(e){return e===" "||e===" "||e===`
7
- `||e==="\r"||e==="\f"}function lt(e){let t=0,n=e.length;for(;t<n&&we(e[t]);)t++;for(;n>t&&we(e[n-1]);)n--;return e.slice(t,n)}var J=e=>({kind:"forbidden",reason:e});function si(e){let t=lt($e(e));if(t==="")return J("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return J("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return J("unparseable delay");for(;n<t.length&&we(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return J("unexpected text after delay");for(n++;n<t.length&&we(t[n]);)n++;let o=n;for(;n<t.length&&!we(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return J(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&we(t[n]);)n++;if(t[n]!=="=")return J("missing '=' after url");for(n++;n<t.length&&we(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let l=t.indexOf(a,n+1);if(l===-1)return J("unterminated quoted destination");if(s=t.slice(n+1,l),lt(t.slice(l+1))!=="")return J("trailing text after quoted destination")}else if(s=lt(t.slice(n)),/[;,]/.test(s))return J("multiple refresh assignments");if(s==="")return J("empty destination");let c=st(s);return c===""?J("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function Ht(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=G(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?J(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:lt($e(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:si(n)}var ai="http://www.w3.org/1999/xhtml",ci="http://www.w3.org/2000/svg",li=new Set(["script","iframe","object","embed","frame","frameset"]);function jn(e){return G(e)}function qn(e){return li.has(jn(e))}var ui=new Set(["script","style"]);function Wn(e){return ui.has(jn(e))}var L={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},di=new Set(["src","href","xlink:href","type","language"]),fi=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),It=new WeakSet;function Un(e){return e.namespaceURI===ai||e.namespaceURI===null}function Kn(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function pi(e){It.has(e)||(It.add(e),e.getAttribute("content")!==null&&Ht(Kn(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function mi(e,t,n,r){if(!Un(e))return L.None;let o=G(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&pi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return L.None;let i=Ht(Kn(e,o,n));return i.kind==="forbidden"?L.MetaRefreshForbidden:i.kind!=="not-refresh"&&It.has(e)?L.MetaRefreshReactive:L.None}function gi(e,t){if(t===null||G(e)!=="attributename")return L.None;let n=$e(t);return Fn(n)||he(n)||Ge(n)?L.AnimationTarget:L.None}var ut=new WeakSet;function Vn(e){if(e===null)return!1;let t=G(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function bi(e,t,n,r){if(!Un(e))return L.None;let o=G(t);return o==="href"?r==="static"||n===null?L.None:Vn(e.getAttribute("rel"))?L.StylesheetSource:(ut.add(e),L.None):o==="rel"&&Vn(n)&&ut.has(e)&&e.hasAttribute("href")?L.StylesheetSource:L.None}function $t(e,t,n,r){let o=e.localName;return o==="meta"?mi(e,t,n,r):o==="link"?bi(e,t,n,r):o==="script"?r==="static"||n===null?L.None:di.has(G(t))?L.ScriptSource:L.None:fi.has(o)&&e.namespaceURI===ci?gi(t,n):L.None}function Pt(e,t,n){e.localName!=="link"||G(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?ut.add(e):ut.delete(e))}var hi="http://www.w3.org/1999/xhtml",yi="http://www.w3.org/2000/svg",Si="http://www.w3.org/1999/xlink",vi="http://www.w3.org/XML/1998/namespace",xi=new Set(["checked","disabled","selected"]);function Ei(e){return e.namespaceURI===null||e.namespaceURI===hi}function Jn(e,t,n){j(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function Gn(e,t,n){e[t]=n}function Ti(e,t){if(e.namespaceURI!==yi)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Si:n.startsWith("xml:")?vi:null}function ee(e,t,n,r={}){let o=wi(e,t,n,r);return e.localName==="link"&&Pt(e,t,r.reactive?"reactive":"runtime"),o}function wi(e,t,n,r){let o=Ti(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(he(t))return O(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=$t(e,t,s,r.reactive?"reactive":"runtime");if(a!==L.None)return Jn(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(Ge(t))return O(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=Ei(e),l=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let f=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==f&&(o?e.setAttributeNS(o,t,f):e.setAttribute(t,f)),!0}return c&&xi.has(l)&&l in e?Gn(e,l,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let u=String(n);if(r.syncValueProperty!==!1&&c&&(l==="value"||l==="checked")&&l in e)return Gn(e,l,l==="checked"?!!n:u),!0;let m=u===""?"":zn(t,u,{element:e});return m===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===m||(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0)}function Bt(e,t,n){if(Ge(t))return O(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=$t(e,t,n,"static");return r!==L.None?(Jn("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Pt(e,t,"static"),!0)}var ki=4096,Ft=[];function Ai(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function _i(e,t,n){let r=Ft.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Ai();return o.sig=e,o.sub=t,o.epoch=n,o}function Yn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Ft.length<ki&&Ft.push(e)}function Ci(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function Xn(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Ni(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Ri(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var ne=null,ue=null,ye=0,Se=[],te=new Set,Li=[];function Mi(e){try{e()}catch(t){let n=e;k(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Oi(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ce=0,de=!1;function Vt(){ce===0&&(ue=ne,ne=null,de=!0),ce++}function jt(){ce--,ce===0&&(ne=ue,ue=null,de=!1)}function Zn(){return de}function Qn(e){Vt();try{return e()}finally{jt()}}var Y=null;function qt(){return Y}function mt(e,t){let n=Y;Y=e;try{return t()}finally{Y=n}}function Wt(e){let t=Y;return t===null?e:(...n)=>mt(t,()=>e(...n))}var Di=0;function Ut(e,t){let n=ne,r=0,o=null;de&&(r=ce,o=ue,ce=0,ue=null,de=!1),ne=t;let i=t;i._cap===void 0&&(i._cap=Rn());let s=Y;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(Y=a);let c=++Di;i._epoch=c,i._structDirty=!1;for(let l=i.depsHead??null;l!==null;l=l.subNext){let u=l.sig;l.prevActive=u.__activeNode??null,u.__activeNode=l}try{e()}finally{ne=n,Y=s,r!==0&&(ce=r,ue=o,de=!0);let l=i.depsHead??null;for(;l!==null;){let u=l.subNext,m=l.sig;m.__activeNode=l.prevActive,l.prevActive=null,l.epoch!==c&&(Ri(l),Xn(l),Yn(l)),l=u}}}function er(e,t){if(!t)return Kt(e);Pe(t);let n=ne,r=0,o=null;de&&(r=ce,o=ue,ce=0,ue=null,de=!1),ne=t;let i=t;i._scope===void 0&&(i._scope=Y);let s=Y;Y=i._scope;try{e()}finally{ne=n,Y=s,r!==0&&(ce=r,ue=o,de=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Pe(t))}function Kt(e,t){let n=()=>{let o=r;if(!(o._disposed||o._reentrant)){o._reentrant=!0;try{Ut(e,r)}finally{o._reentrant=!1}}},r=n;r.depsHead=null,r.depsTail=null,r._epoch=0,r._structDirty=!1,r._hasComputedDep=!1,r._runEpoch=0,r._runs=0,r._reentrant=!1,r._disposed=!1,r._errorPhase="binding",r._errorNode=t;try{n()}catch(o){throw r._disposed=!0,r._errorNode=void 0,Pe(r),o}return r._dispose??(r._dispose=()=>{r._disposed=!0,r._errorNode=void 0,Pe(r)})}function tr(e){if(!ne)return;let t=ne,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=_i(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Ni(t,i),Ci(n,i),t._structDirty=!0}function Pe(e){let t=e,n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;Xn(n),Yn(n),n=r}}var dt=1e3,ft=1e6,pt=0,ke=new Set;function nr(e){let t=dt;return Number.isFinite(e)&&e>0&&(dt=Math.floor(e)),t}function rr(e){let t=ft;return Number.isFinite(e)&&e>0&&(ft=Math.floor(e)),t}function Hi(e){let t=e;return t._runEpoch!==pt?(t._runEpoch=pt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>dt)}function Ii(e){let t=e.__name??"<unnamed>";k(new Error(`subscriber "${t}" fired more than ${dt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function $i(){k(new Error(`Notification drain exceeded ${ft} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function or(){let e=0;for(;e<Se.length;){if(e>=ft){$i();break}let t=Se[e++];if(te.delete(t),ke.size>0&&ke.has(t)||t._hasComputedDep===!0&&!Oi(t))continue;if(Hi(t)){Ii(t),ke.add(t);continue}let n=Ln(t._cap??null);try{Mi(t)}finally{n&&Mn()}}}function ir(){if(!(ye>0)){ye++,pt++;try{or()}finally{ye--,ye===0&&(Se.length=0,te.clear(),ke.size>0&&ke.clear())}}}function zt(e){e();let t=e._sig;if(!t)return;let n=Li,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else te.has(s)||(te.add(s),Se.push(s));i=i.sigNext}}}function sr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?zt(r):te.has(r)||(te.add(r),Se.push(r))),n=n.sigNext}}function ar(e){let n=e.subsHead;if(n){if(ye>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?zt(o):te.has(o)||(te.add(o),Se.push(o))),r=r.sigNext}return}ye++,pt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?zt(o):te.has(o)||(te.add(o),Se.push(o))),r=r.sigNext}or()}finally{ye--,ye===0&&(Se.length=0,te.clear(),ke.size>0&&ke.clear())}}}function cr(e){return e.__sc??0}function lr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function ur(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var dr="4.12.0",fr=Symbol.for("sibujs.reactive.v1");function Bi(){let e=globalThis,t=e[fr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,O(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${dr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:Vt,resumeTracking:jt,isTrackingSuspended:Zn,untracked:Qn,retrack:Ut,track:er,reactiveBinding:Kt,recordDependency:tr,cleanup:Pe,setMaxSubscriberRepeats:nr,setMaxDrainIterations:rr,drainNotificationQueue:ir,queueSignalNotification:sr,notifySubscribers:ar,getSubscriberCount:cr,getSubscriberDeps:lr,forEachSubscriber:ur,getOwnerScope:qt,runWithOwnerScope:mt,bindOwnerScope:Wt,version:dr};return e[fr]=n,n}var I=Bi(),Ae=I.suspendTracking,_e=I.resumeTracking,pr=I.isTrackingSuspended,re=I.untracked,ve=I.retrack,X=I.track,P=I.reactiveBinding,Ce=I.recordDependency,Ne=I.cleanup,ou=I.setMaxSubscriberRepeats,mr=I.setMaxDrainIterations,gr=I.drainNotificationQueue,br=I.queueSignalNotification,Be=I.notifySubscribers,iu=I.getSubscriberCount,su=I.getSubscriberDeps,au=I.forEachSubscriber,Fe=I.getOwnerScope??qt,gt=I.runWithOwnerScope??mt,z=I.bindOwnerScope??Wt;function Je(e,t,n){if(he(t))return ee(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){k(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}ee(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return P(r,e)}function hr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){k(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){k(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),ee(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=P(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Gt=["data-focus-key","id","name"],Fi=new Set(["text","search","url","tel","password",""]);function zi(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Fi.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function Ye(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<Gt.length;i++){let s=t.getAttribute(Gt[i]);if(s){r=Gt[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...zi(t)}}function Vi(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function ji(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function yr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function ze(e,t,n){if(!e||typeof document>"u")return;let r=document.activeElement;if(r===e.el||r&&r!==document.body&&r!==document.documentElement)return;if(e.el.isConnected){yr(e.el,e);return}let o=!1;if(e.attr&&e.value){let{el:i,count:s}=ji(t,`[${e.attr}=${Vi(e.value)}]`);if(i&&i.tagName===e.tag){yr(i,e);return}o=s>1}j(()=>{let i=e.attr?` (${e.attr}="${e.value}")`:"",s=o?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${i} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${s}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them.`})}function fe(e,t){let n=[];function r(){let o;try{o=t()}catch(u){k(u,{phase:"binding",name:"bindChildNode",node:e});return}let i=Ye(n);if(o==null||typeof o=="boolean"){for(let u=0;u<n.length;u++){let m=n[u];D(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,ze(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let u=new Set;for(let m=0;m<o.length;m++){let g=o[m];if(g==null||typeof g=="boolean")continue;let f=g instanceof Node?g:document.createTextNode(String(g));if(u.has(f)){O("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}u.add(f),a.push(f)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let u=new Set(n);c=new Set;for(let m=0;m<a.length;m++)u.has(a[m])&&c.add(a[m])}for(let u=0;u<n.length;u++){let m=n[u];c?.has(m)||(D(m),m.parentNode&&m.parentNode.removeChild(m))}let l=e;for(let u=0;u<a.length;u++){let m=a[u];l.nextSibling!==m&&s.insertBefore(m,l.nextSibling),l=m}n=a,ze(i,a,"bindChildNode")}return P(r,e)}function Jt(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function W(){typeof document>"u"&&Jt()}var R="http://www.w3.org/2000/svg",qi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var Yt=new Set,Sr=100,vr=!1,xr=new Map;function Er(e){let t=xr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),xr.set(e,t)),t}function Wi(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=P(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",ct(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let l=[];for(let u in a){if(!Object.hasOwn(a,u))continue;let m=a[u];if(m==null)continue;let g=Er(u);l.push(g),c.setProperty(g,at(g,String(m),{element:e}))}for(let u=0;u<o.length;u++)l.indexOf(o[u])===-1&&c.removeProperty(o[u]);o=l},e);x(e,s);return}if(typeof t=="string"){e.setAttribute("style",ct(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Er(r);if(typeof o=="function"){let s=o,a=P(()=>{n.style.setProperty(i,at(i,String(s()),{element:e}))},e);x(e,a)}else n.style.setProperty(i,at(i,String(o),{element:e}))}}function Ui(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=P(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);x(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=P(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let l=n[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);x(e,s)}else e.setAttribute("class",o)}function Xt(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),x(e,fe(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),x(e,fe(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),x(e,fe(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}function d(e,t){let n=qn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&Jt();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Xt(i,o),i):(j(()=>{let f=r.trim().split(/\s+/);if(f.length<2)return"";let p=0;for(let h=0;h<f.length;h++){let y=f[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&p++}if(p<2)return"";let b=`${e}|${r}`;return Yt.has(b)?"":Yt.size>=Sr?vr?"":(vr=!0,`tagFactory: ${Sr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(Yt.add(b),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return Xt(i,r),i;let s=r,a=s.class;a!=null&&Ui(i,a);let c=s.id;typeof c=="function"?x(i,Je(i,"id",c)):c!=null&&(typeof c=="string"&&qi.has(c.toLowerCase())&&O(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let l=o!==void 0?o:s.nodes;l!=null&&Xt(i,l);let u=s.on;if(u)for(let f in u){if(!Object.hasOwn(u,f))continue;let p=u[f];typeof p=="function"?i.addEventListener(f,p):O(`tagFactory: on.${f} handler is not a function (got ${typeof p}). Event listener was not attached.`)}let m=s.style;m!=null&&Wi(i,m);let g=s.ref;g&&(g.current=i);for(let f in s)switch(f){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,f))continue;let p=s[f];if(p==null||he(f))continue;typeof p=="function"?x(i,Je(i,f,p)):ee(i,f,p,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Du=d("html"),Ki=d("head"),Gi=d("body"),Ji=d("title"),_=d("div"),$=d("span"),Yi=d("section"),Xi=d("article"),Zi=d("header"),Qi=d("footer"),es=d("nav"),ts=d("main"),ns=d("aside"),rs=d("address"),Zt=d("p"),os=d("h1"),is=d("h2"),Qt=d("h3"),ss=d("h4"),as=d("h5"),cs=d("h6"),ls=d("blockquote"),us=d("dd"),ds=d("dl"),fs=d("dt"),ps=d("figcaption"),ms=d("figure"),gs=d("hr"),bs=d("li"),hs=d("ol"),ys=d("ul"),en=d("pre"),Ss=d("a"),vs=d("abbr"),xs=d("b"),Es=d("bdi"),Ts=d("bdo"),ws=d("br"),ks=d("cite"),tn=d("code"),As=d("data"),_s=d("dfn"),Cs=d("em"),Ns=d("i"),Rs=d("kbd"),Ls=d("mark"),Ms=d("q"),Os=d("rp"),Ds=d("rt"),Hs=d("ruby"),Is=d("s"),$s=d("samp"),Ps=d("small"),Bs=d("strong"),Fs=d("sub"),zs=d("sup"),Vs=d("time"),js=d("u"),qs=d("var"),Ws=d("area"),Us=d("audio"),Ks=d("img"),Gs=d("map"),Js=d("track"),Ys=d("video"),Xs=d("embed"),Zs=d("iframe"),Qs=d("object"),ea=d("param"),ta=d("picture"),na=d("portal"),ra=d("source"),oa=d("svg",R),ia=d("math"),sa=d("canvas"),aa=d("noscript"),ca=d("script"),la=d("del"),ua=d("ins"),da=d("caption"),fa=d("col"),pa=d("colgroup"),ma=d("table"),ga=d("tbody"),ba=d("td"),ha=d("tfoot"),ya=d("th"),Sa=d("thead"),va=d("tr"),Xe=d("button"),xa=d("datalist"),Ea=d("fieldset"),Ta=d("form"),wa=d("input"),ka=d("label"),Aa=d("legend"),_a=d("meter"),Ca=d("optgroup"),Na=d("option"),Ra=d("output"),La=d("progress"),Ma=d("select"),Oa=d("textarea"),Da=d("details"),Ha=d("dialog"),Ia=d("menu"),$a=d("summary"),Pa=d("slot"),Ba=d("template"),Fa=d("base"),za=d("link"),Va=d("meta"),Re=d("style"),ja=d("circle",R),qa=d("ellipse",R),Wa=d("g",R),Ua=d("line",R),Ka=d("path",R),Ga=d("polygon",R),Ja=d("polyline",R),Ya=d("rect",R),Xa=d("text",R),Za=d("tspan",R),Qa=d("defs",R),ec=d("clipPath",R),tc=d("mask",R),nc=d("pattern",R),rc=d("linearGradient",R),oc=d("radialGradient",R),ic=d("stop",R),sc=d("use",R),ac=d("symbol",R),cc=d("marker",R),lc=d("center"),uc=d("font"),dc=d("marquee"),fc=e=>d(e);var nn="__sibuPendingError";function Tr(e,t){let n=()=>e.parentNode?(k(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[nn]=t)})}function bt(e){let t=e,n=t[nn];if(n instanceof Error)return delete t[nn],n}function wr(e){let t=null;return function(){if(t)return t();let r=_({class:"sibu-lazy"}),o=!1;return e().then(z(i=>{if(o)return;t=i.default;let s=t();q(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));q(r,_({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Tr(r,s)}),r.appendChild($("sibu-lazy-loading","Loading...")),x(r,()=>{o=!0}),r}}function kr({nodes:e,fallback:t}){let n=_({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;x(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&D(s)});let a=z(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){q(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,q(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else q(n,c)}catch(c){let l=c instanceof Error?c:new Error(String(c));Tr(n,l)}});return queueMicrotask(a),n}function an(e,t){return()=>Fe()===e?t():gt(e,t)}function yt(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";k(n,{phase:r,name:t});return}}function rn(e,t,n,r,o){let i=yt(e,t);if(typeof i!="function")return;let s=an(o,i);r()||!n.isConnected?yt(s,"onUnmount"):_r(s,n)}var Ve=new WeakMap,Le=new WeakMap,pe=new Set,me=new Set,je=null,ht=0,pc=256;function on(e){let t=Ve.get(e);if(t){Ve.delete(e),pe.delete(e);for(let n of t)try{n()}catch{}}}function sn(e){Le.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Le.get(e);if(n){Le.delete(e),me.delete(e);for(let r of n)try{r()}catch{}}})}function mc(e){if(pe.size===0||e.nodeType!==1)return;let t=e;if(pe.has(t)&&t.isConnected&&on(t),t.firstElementChild)for(let n of Array.from(pe))n!==t&&n.isConnected&&t.contains(n)&&on(n)}function gc(e){if(me.size===0||e.nodeType!==1)return;let t=e;if(me.has(t)&&!t.isConnected&&sn(t),t.firstElementChild)for(let n of Array.from(me))n!==t&&!n.isConnected&&t.contains(n)&&sn(n)}function bc(){if(pe.size>0)for(let e of Array.from(pe))e.isConnected&&on(e);if(me.size>0)for(let e of Array.from(me))e.isConnected||sn(e)}function Ar(){je||typeof document>"u"||(je=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)mc(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)gc(t.removedNodes[n])}ht+=e.length,ht>=pc&&(ht=0,bc()),cn()}),je.observe(document.body,{childList:!0,subtree:!0}))}function cn(){je&&pe.size===0&&me.size===0&&(je.disconnect(),je=null,ht=0)}function hc(e,t){let n=Ve.get(e);return n||(n=[],Ve.set(e,n)),n.push(t),pe.add(e),Ar(),()=>{let r=Ve.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ve.delete(e),pe.delete(e))}cn()}}function yc(e,t){let n=Le.get(e);return n||(n=[],Le.set(e,n)),n.push(t),me.add(e),Ar(),()=>{let r=Le.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Le.delete(e),me.delete(e))}cn()}}function St(e,t){if(typeof document>"u")return;let n=Fe();if(e=an(n,e),t){let r=!1,o=()=>r;if(x(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||rn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){rn(e,"onMount",t,o,n);return}let i=hc(t,()=>{r||rn(e,"onMount",t,o,n)});x(t,i)})}else queueMicrotask(()=>{yt(e,"onMount")})}function Sc(e,t){typeof document>"u"||_r(an(Fe(),e),t)}function _r(e,t){let n=!1,r=()=>{n||(n=!0,yt(e,"onUnmount"))};x(t,r);let o=()=>{if(n)return;let i=yc(t,r);x(t,i)};t.isConnected?o():St(()=>{o()},t)}function vc(e,t){x(t,e)}function Z(e,t,n){try{e.emit(t,n)}catch{}}var ln=Symbol.for("sibujs.ssr.v1");function xc(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof _t=="function"&&(t=_t("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var xe=globalThis[ln]??(globalThis[ln]=xc()),Me=xe.als,V=xe.fallbackStore;xe.fallbackDepth??(xe.fallbackDepth=0);var Cr=!1;function Ec(){if(Cr||Me||!(typeof process<"u"&&!!process.versions?.node))return;Cr=!0;let t=process.versions.node;O(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function Oe(){if(Me){let e=Me.getStore();if(e)return e}return V}function Nr(){return Me?Me.getStore()??null:xe.fallbackDepth>0?V:null}function oe(){return Oe().ssr}function Rr(e){if(!oe())return null;let t=Oe(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Lr(){Oe().ssr=!0}function Mr(){Oe().ssr=!1}function Or(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Me)return Me.run(t,e);Ec();let n=V.ssr,r=V.suspenseIdCounter,o=V.idCounter,i=V.locale;V.ssr=!0,V.suspenseIdCounter=0,V.idCounter=0,V.locale=void 0,xe.fallbackDepth++;try{return e()}finally{xe.fallbackDepth--,V.ssr=n,V.suspenseIdCounter=r,V.idCounter=o,V.locale=i}}function Dr(e){let t=Oe(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Pr=globalThis;function Tc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,re(()=>t(o,void 0));else{let i=n;n=o,re(()=>t(o,i))}}}var Hr=100;function vt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Fe()?Ir(t):gt(n,()=>Ir(t))}function Ir(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){k(n,{phase:"cleanup"})}}function $r(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&vt(e),ve(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=Hr);e.rerunPending&&(e.rerunPending=!1,k(new Error(`effect re-requested itself ${Hr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function wc(e){if(e.disposed)return;e.disposed=!0;let t=Pr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&vt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ne(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Q(e,t){if(M(typeof e=="function","effect: argument must be a function."),oe())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&vt(n),ve(n.bodyFn,o),n.rerunPending&&$r(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{ve(n.bodyFn,n.subscriber),n.rerunPending&&$r(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&vt(n),Ne(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=Pr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Z(i,"effect:create",{effectFn:e}),()=>wc(n)}var Ze=0,un=new Set;function kc(e){Ze++;try{return e()}finally{Ze--,Ze===0&&Cc()}}function Ac(e){return Ze===0?!1:(un.add(e),!0)}function _c(){return Ze>0}function Cc(){try{for(let e of un)br(e)}finally{un.clear()}gr()}var Br=Symbol.for("sibujs.reactive.batch.v1");function Nc(){let e=globalThis,t=e[Br];if(t)return t;let n={batch:kc,enqueueBatchedSignal:Ac,isBatching:_c};return e[Br]=n,n}var dn=Nc(),U=dn.batch,De=dn.enqueueBatchedSignal,Rc=dn.isBatching;var fn=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Ce(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,l=typeof a=="function"?a(c):a;if(!o(c,l)){if(n.value=l,n.__v++,!0){let u=fn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&Z(u,"signal:update",{signal:n,name:r,oldValue:c,newValue:l})}De(n)||Be(n)}}:s=a=>{let c=n.value,l=typeof a=="function"?a(c):a;if(Object.is(l,c))return;n.value=l,n.__v++;let u=fn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&Z(u,"signal:update",{signal:n,name:r,oldValue:c,newValue:l}),De(n)||Be(n)},!0){let a=fn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Z(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Lc(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Mc=`
5
+ `?2:1;continue}if($n(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&$n(e[s]);)i+=e[s],s++;s<e.length&&ni(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
6
+ `?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;t+=c?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var Bn=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],oi=4,ii=5,si=8;function ai(e){if(!e)return"an element";let t=e.tagName.toLowerCase(),n=e.getAttribute("id");n&&(t+=`#${n}`);let r=e.getAttribute("class");return r&&(t+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${t}>`}var Ot=new Set,Fn=100,zn=!1;function at(e,t,n){j(()=>{let r=["url() in an inline style is an exfiltration channel: the browser fetches it immediately and the URL's path or query can carry page data off-origin","expression() executes arbitrary script in legacy engines","the javascript: scheme executes script","the vbscript: scheme executes script","-moz-binding loads and runs remote XBL","behavior: loads and runs a remote HTC script","@import pulls in a remote stylesheet","image-set() fetches remote images, the same exfiltration channel as url()","filter:progid activates legacy scriptable filters","image() fetches its string argument as a URL, the same exfiltration channel as url()","src() fetches its string argument as a URL, the same exfiltration channel as url()"],o=n?.property?`${n.property}: ${e}`:e,i=ai(n?.element),s=`${i}|${o}`;return Ot.has(s)?"":Ot.size>=Fn?zn?"":(zn=!0,`${Fn} distinct dropped style declarations have been reported; suppressing further ones for the rest of this session so they cannot flood the console. The declarations are still dropped \u2014 only the reporting stops. Fix the reported ones and reload to see any that remain.`):(Ot.add(s),`style declaration "${o}" was dropped by the style sanitizer on ${i} \u2014 ${r[t]}. The element renders without it, which usually looks like a missing image rather than an error. Sanctioned alternatives: for a content image use an <img> element (or a <picture>); for decoration, put the rule in a stylesheet and set a class instead \u2014 stylesheet CSS is not sanitized, only inline style attributes are. If this declaration is not yours, it came from untrusted data and the drop just prevented an exfiltration.`)})}function Vn(e){return(e.includes("\\")?ri(e):e).toLowerCase().replace(/\s+/g,"")}function Dt(e){if(!ti.test(e))return-1;let t=Vn(e);for(let n=0;n<Bn.length;n++)if(t.includes(Bn[n]))return n;return-1}function ut(e,t,n){let r=Ht(e,t);return r===-1?t:(at(t,r,{property:e,element:n?.element}),"")}function Ht(e,t){let n=Dt(t);if(n!==-1)return n;let r=J(e);return r==="behavior"?ii:r==="-moz-binding"?oi:(r==="filter"||r==="-ms-filter")&&Vn(t).includes("progid:")?si:-1}function ci(e){let t=[],n="",r=0,o="";for(let s=0;s<e.length;s++){let a=e[s];if(o){n+=a,a==="\\"&&s+1<e.length?n+=e[++s]:a===o&&(o="");continue}if(a==="\\"){n+=a,s+1<e.length&&(n+=e[++s]);continue}if(a==="/"&&e[s+1]==="*"){let c=e.indexOf("*/",s+2);if(c===-1)return null;s=c+1;continue}if(a==='"'||a==="'")o=a;else if(a==="("||a==="[")r++;else if(a===")"||a==="]"){if(--r<0)return null}else{if(a==="{"||a==="}")return null;if(a===";"&&r===0){t.push(n),n="";continue}}n+=a}if(o||r!==0)return null;t.push(n);let i=[];for(let s of t){let a=s.indexOf(":");if(a===-1)continue;let c=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(c))continue;let u=s.slice(a+1).trim(),l=/!\s*important\s*$/i.exec(u);if(l&&(u=u.slice(0,l.index).trim()),u==="")continue;let p=c.startsWith("--")?c:J(c);i.push([p,u,l!==null])}return i}function ui(e,t){let n=String(e),r=ci(n);if(r===null)return Dt(n)!==-1&&at(n,Dt(n),t),"";let o=[];for(let[i,s,a]of r){let c=Ht(i,s);if(c!==-1){at(s,c,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function lt(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return ui(n,t);let r=document.createElement("div");try{r.style.cssText=n}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),c=Ht(s,a);if(c!==-1){at(a,c,{property:s,element:t?.element});continue}let u=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${u?` !${u}`:""}`)}return o.join("; ")}var It=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),li=new Set(["srcdoc"]);function Ye(e){return li.has(e.toLowerCase())}function Wn(e){return It.has(e.toLowerCase())}function di(e){let t=e.toLowerCase();return t==="style"||It.has(t)}function fi(e,t,n){let r=e.toLowerCase();return r==="srcset"?ei(t):It.has(r)?ct(t):r==="style"?lt(t,n):t}function jn(e,t,n){if(!di(e))return t;let r=fi(e,t,n);return r===""?null:r}function Te(e){return e===" "||e===" "||e===`
7
+ `||e==="\r"||e==="\f"}function dt(e){let t=0,n=e.length;for(;t<n&&Te(e[t]);)t++;for(;n>t&&Te(e[n-1]);)n--;return e.slice(t,n)}var Y=e=>({kind:"forbidden",reason:e});function pi(e){let t=dt(Pe(e));if(t==="")return Y("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return Y("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return Y("unparseable delay");for(;n<t.length&&Te(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return Y("unexpected text after delay");for(n++;n<t.length&&Te(t[n]);)n++;let o=n;for(;n<t.length&&!Te(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return Y(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Te(t[n]);)n++;if(t[n]!=="=")return Y("missing '=' after url");for(n++;n<t.length&&Te(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return Y("unterminated quoted destination");if(s=t.slice(n+1,u),dt(t.slice(u+1))!=="")return Y("trailing text after quoted destination")}else if(s=dt(t.slice(n)),/[;,]/.test(s))return Y("multiple refresh assignments");if(s==="")return Y("empty destination");let c=ct(s);return c===""?Y("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function Pt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=J(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?Y(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:dt(Pe(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:pi(n)}var mi="http://www.w3.org/1999/xhtml",gi="http://www.w3.org/2000/svg",bi=new Set(["script","iframe","object","embed","frame","frameset"]);function Un(e){return J(e)}function Kn(e){return bi.has(Un(e))}var hi=new Set(["script","style"]);function Gn(e){return hi.has(Un(e))}var L={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},yi=new Set(["src","href","xlink:href","type","language"]),Si=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),$t=new WeakSet;function Jn(e){return e.namespaceURI===mi||e.namespaceURI===null}function Yn(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function vi(e){$t.has(e)||($t.add(e),e.getAttribute("content")!==null&&Pt(Yn(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function xi(e,t,n,r){if(!Jn(e))return L.None;let o=J(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&vi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return L.None;let i=Pt(Yn(e,o,n));return i.kind==="forbidden"?L.MetaRefreshForbidden:i.kind!=="not-refresh"&&$t.has(e)?L.MetaRefreshReactive:L.None}function Ei(e,t){if(t===null||J(e)!=="attributename")return L.None;let n=Pe(t);return Wn(n)||be(n)||Ye(n)?L.AnimationTarget:L.None}var ft=new WeakSet;function qn(e){if(e===null)return!1;let t=J(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function Ti(e,t,n,r){if(!Jn(e))return L.None;let o=J(t);return o==="href"?r==="static"||n===null?L.None:qn(e.getAttribute("rel"))?L.StylesheetSource:(ft.add(e),L.None):o==="rel"&&qn(n)&&ft.has(e)&&e.hasAttribute("href")?L.StylesheetSource:L.None}function Bt(e,t,n,r){let o=e.localName;return o==="meta"?xi(e,t,n,r):o==="link"?Ti(e,t,n,r):o==="script"?r==="static"||n===null?L.None:yi.has(J(t))?L.ScriptSource:L.None:Si.has(o)&&e.namespaceURI===gi?Ei(t,n):L.None}function Ft(e,t,n){e.localName!=="link"||J(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?ft.add(e):ft.delete(e))}var wi="http://www.w3.org/1999/xhtml",ki="http://www.w3.org/2000/svg",_i="http://www.w3.org/1999/xlink",Ai="http://www.w3.org/XML/1998/namespace",Ci=new Set(["checked","disabled","selected"]);function Ni(e){return e.namespaceURI===null||e.namespaceURI===wi}function Zn(e,t,n){j(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function Xn(e,t,n){e[t]=n}function Ri(e,t){if(e.namespaceURI!==ki)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?_i:n.startsWith("xml:")?Ai:null}function ee(e,t,n,r={}){let o=Li(e,t,n,r);return e.localName==="link"&&Ft(e,t,r.reactive?"reactive":"runtime"),o}function Li(e,t,n,r){let o=Ri(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(be(t))return O(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Bt(e,t,s,r.reactive?"reactive":"runtime");if(a!==L.None)return Zn(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(Ye(t))return O(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=Ni(e),u=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let m=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==m&&(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0}return c&&Ci.has(u)&&u in e?Xn(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let l=String(n);if(r.syncValueProperty!==!1&&c&&(u==="value"||u==="checked")&&u in e)return Xn(e,u,u==="checked"?!!n:l),!0;let p=l===""?"":jn(t,l,{element:e});return p===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===p||(o?e.setAttributeNS(o,t,p):e.setAttribute(t,p)),!0)}function zt(e,t,n){if(Ye(t))return O(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Bt(e,t,n,"static");return r!==L.None?(Zn("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Ft(e,t,"static"),!0)}var Mi=4096,Vt=[];function Oi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Di(e,t,n){let r=Vt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Oi();return o.sig=e,o.sub=t,o.epoch=n,o}function Qn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Vt.length<Mi&&Vt.push(e)}function Hi(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function er(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Ii(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Pi(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var te=null,ue=null,he=0,ye=[],F=new Set,$i=[];function Bi(e){try{e()}catch(t){let n=e;_(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Fi(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ae=0,le=!1;function jt(){ae===0&&(ue=te,te=null,le=!0),ae++}function qt(){ae--,ae===0&&(te=ue,ue=null,le=!1)}function tr(){return le}function nr(e){jt();try{return e()}finally{qt()}}var X=null;function Ut(){return X}function bt(e,t){let n=X;X=e;try{return t()}finally{X=n}}function Kt(e){let t=X;return t===null?e:(...n)=>bt(t,()=>e(...n))}var $e=null,zi=0;function Gt(e,t){let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._cap===void 0&&(i._cap=On());let s=X;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(X=a);let c=$e;c!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=c),i._tok!=null&&($e=i._tok);let u=++zi;i._epoch=u,i._structDirty=!1;for(let l=i.depsHead??null;l!==null;l=l.subNext){let p=l.sig;l.prevActive=p.__activeNode??null,p.__activeNode=l}try{e()}finally{te=n,X=s,$e=c,r!==0&&(ae=r,ue=o,le=!0);let l=i.depsHead??null;for(;l!==null;){let p=l.subNext,g=l.sig;g.__activeNode=l.prevActive,l.prevActive=null,l.epoch!==u&&(Pi(l),er(l),Qn(l)),l=p}}}function rr(e,t){if(!t)return Jt(e);Be(t);let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._scope===void 0&&(i._scope=X);let s=X;X=i._scope;try{e()}finally{te=n,X=s,r!==0&&(ae=r,ue=o,le=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Be(t))}function Jt(e,t,n){return ir(e,t,n===!0)._dispose}function or(e,t){let n=ir(e,t,!0);return{stop:n._dispose,run:r=>{let o=$e;$e=n._tok??null;try{return r()}finally{$e=o}}}}function ir(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{Gt(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o)},o}function sr(e){if(!te)return;let t=te,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=Di(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Ii(t,i),Hi(n,i),t._structDirty=!0}function Be(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;er(n),Qn(n),n=r}}var pt=1e3,mt=1e6,gt=0,we=new Set;function ar(e){let t=pt;return Number.isFinite(e)&&e>0&&(pt=Math.floor(e)),t}function cr(e){let t=mt;return Number.isFinite(e)&&e>0&&(mt=Math.floor(e)),t}function Vi(e){let t=e;return t._runEpoch!==gt?(t._runEpoch=gt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>pt)}function Wi(e){let t=e.__name??"<unnamed>";_(new Error(`subscriber "${t}" fired more than ${pt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function ji(){_(new Error(`Notification drain exceeded ${mt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function ur(){let e=0;for(;e<ye.length;){if(e>=mt){ji();break}let t=ye[e++];F.delete(t)&&(t._owner!=null&&F.size>0&&(qi(t),F.has(t))||lr(t))}}function qi(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;F.has(r)&&(t=r),n=r._owner??null}if(t===null)return;F.delete(t),lr(t)}}function lr(e){if(we.size>0&&we.has(e)||e._hasComputedDep===!0&&!Fi(e))return;if(Vi(e)){Wi(e),we.add(e);return}let t=Dn(e._cap??null);try{Bi(e)}finally{t&&Hn()}}function dr(){if(!(he>0)){he++,gt++;try{ur()}finally{he--,he===0&&(ye.length=0,F.clear(),we.size>0&&we.clear())}}}function Wt(e){e();let t=e._sig;if(!t)return;let n=$i,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else F.has(s)||(F.add(s),ye.push(s));i=i.sigNext}}}function fr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Wt(r):F.has(r)||(F.add(r),ye.push(r))),n=n.sigNext}}function pr(e){let n=e.subsHead;if(n){if(he>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Wt(o):F.has(o)||(F.add(o),ye.push(o))),r=r.sigNext}return}he++,gt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Wt(o):F.has(o)||(F.add(o),ye.push(o))),r=r.sigNext}ur()}finally{he--,he===0&&(ye.length=0,F.clear(),we.size>0&&we.clear())}}}function mr(e){return e.__sc??0}function gr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function br(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var hr="4.13.1",yr=Symbol.for("sibujs.reactive.v1");function Ki(){let e=globalThis,t=e[yr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,O(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${hr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:jt,resumeTracking:qt,isTrackingSuspended:tr,untracked:nr,retrack:Gt,track:rr,reactiveBinding:Jt,recordDependency:sr,cleanup:Be,setMaxSubscriberRepeats:ar,setMaxDrainIterations:cr,drainNotificationQueue:dr,queueSignalNotification:fr,notifySubscribers:pr,getSubscriberCount:mr,getSubscriberDeps:gr,forEachSubscriber:br,getOwnerScope:Ut,runWithOwnerScope:bt,bindOwnerScope:Kt,structuralBinding:or,version:hr};return e[yr]=n,n}var H=Ki(),ke=H.suspendTracking,_e=H.resumeTracking,Sr=H.isTrackingSuspended,ne=H.untracked,Se=H.retrack,Fe=H.track,$=H.reactiveBinding,Ae=H.recordDependency,Ce=H.cleanup,fl=H.setMaxSubscriberRepeats,vr=H.setMaxDrainIterations,xr=H.drainNotificationQueue,Er=H.queueSignalNotification,ze=H.notifySubscribers,pl=H.getSubscriberCount,ml=H.getSubscriberDeps,gl=H.forEachSubscriber,Ve=H.getOwnerScope??Ut,ht=H.runWithOwnerScope??bt,V=H.bindOwnerScope??Kt,Ne=H.structuralBinding??((e,t)=>({stop:H.reactiveBinding(e,t),run:n=>n()}));function Xe(e,t,n){if(be(t))return ee(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){_(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}ee(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return $(r,e)}function Tr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){_(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){_(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),ee(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=$(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Yt=["data-focus-key","id","name"],Gi=new Set(["text","search","url","tel","password",""]);function Ji(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Gi.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function Ze(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<Yt.length;i++){let s=t.getAttribute(Yt[i]);if(s){r=Yt[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...Ji(t)}}function Yi(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Xi(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function wr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function We(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){wr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Xi(t,`[${e.attr}=${Yi(e.value)}]`);if(s&&s.tagName===e.tag){wr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}j(()=>{let s=e.attr?` (${e.attr}="${e.value}")`:"",a=i?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${s} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${a}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them. If dropping focus is INTENDED here (closing a panel, say), pass { focus: "discard" } to when()/match() to silence this, or { focus: { restoreTo: element } } to send focus somewhere other than <body>.`})}function de(e,t){let n=[];function r(){let o;try{o=t()}catch(l){_(l,{phase:"binding",name:"bindChildNode",node:e});return}let i=Ze(n);if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let p=n[l];D(p),p.parentNode&&p.parentNode.removeChild(p)}n.length=0,We(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let l=new Set;for(let p=0;p<o.length;p++){let g=o[p];if(g==null||typeof g=="boolean")continue;let m=g instanceof Node?g:document.createTextNode(String(g));if(l.has(m)){O("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(m),a.push(m)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let l=new Set(n);c=new Set;for(let p=0;p<a.length;p++)l.has(a[p])&&c.add(a[p])}for(let l=0;l<n.length;l++){let p=n[l];c?.has(p)||(D(p),p.parentNode&&p.parentNode.removeChild(p))}let u=e;for(let l=0;l<a.length;l++){let p=a[l];u.nextSibling!==p&&s.insertBefore(p,u.nextSibling),u=p}n=a,We(i,a,"bindChildNode")}return $(r,e,!0)}function Xt(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function U(){typeof document>"u"&&Xt()}var R="http://www.w3.org/2000/svg",Zi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var Zt=new Set,kr=100,_r=!1,Ar=new Map;function Cr(e){let t=Ar.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Ar.set(e,t)),t}function Qi(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=$(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",lt(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let l in a){if(!Object.hasOwn(a,l))continue;let p=a[l];if(p==null)continue;let g=Cr(l);u.push(g),c.setProperty(g,ut(g,String(p),{element:e}))}for(let l=0;l<o.length;l++)u.indexOf(o[l])===-1&&c.removeProperty(o[l]);o=u},e);x(e,s);return}if(typeof t=="string"){e.setAttribute("style",lt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Cr(r);if(typeof o=="function"){let s=o,a=$(()=>{n.style.setProperty(i,ut(i,String(s()),{element:e}))},e);x(e,a)}else n.style.setProperty(i,ut(i,String(o),{element:e}))}}function es(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=$(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);x(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=$(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let u=n[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);x(e,s)}else e.setAttribute("class",o)}function Qt(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),x(e,de(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),x(e,de(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),x(e,de(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}function d(e,t){let n=Kn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&Xt();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Qt(i,o),i):(j(()=>{let m=r.trim().split(/\s+/);if(m.length<2)return"";let f=0;for(let h=0;h<m.length;h++){let S=m[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(S))return"";/[-:/0-9]/.test(S)&&f++}if(f<2)return"";let b=`${e}|${r}`;return Zt.has(b)?"":Zt.size>=kr?_r?"":(_r=!0,`tagFactory: ${kr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(Zt.add(b),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return Qt(i,r),i;let s=r,a=s.class;a!=null&&es(i,a);let c=s.id;typeof c=="function"?x(i,Xe(i,"id",c)):c!=null&&(typeof c=="string"&&Zi.has(c.toLowerCase())&&O(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&Qt(i,u);let l=s.on;if(l)for(let m in l){if(!Object.hasOwn(l,m))continue;let f=l[m];typeof f=="function"?i.addEventListener(m,f):O(`tagFactory: on.${m} handler is not a function (got ${typeof f}). Event listener was not attached.`)}let p=s.style;p!=null&&Qi(i,p);let g=s.ref;g&&(g.current=i);for(let m in s)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,m))continue;let f=s[m];if(f==null||be(m))continue;typeof f=="function"?x(i,Xe(i,m,f)):ee(i,m,f,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Vl=d("html"),ts=d("head"),ns=d("body"),rs=d("title"),A=d("div"),P=d("span"),os=d("section"),is=d("article"),ss=d("header"),as=d("footer"),cs=d("nav"),us=d("main"),ls=d("aside"),ds=d("address"),en=d("p"),fs=d("h1"),ps=d("h2"),tn=d("h3"),ms=d("h4"),gs=d("h5"),bs=d("h6"),hs=d("blockquote"),ys=d("dd"),Ss=d("dl"),vs=d("dt"),xs=d("figcaption"),Es=d("figure"),Ts=d("hr"),ws=d("li"),ks=d("ol"),_s=d("ul"),nn=d("pre"),As=d("a"),Cs=d("abbr"),Ns=d("b"),Rs=d("bdi"),Ls=d("bdo"),Ms=d("br"),Os=d("cite"),rn=d("code"),Ds=d("data"),Hs=d("dfn"),Is=d("em"),Ps=d("i"),$s=d("kbd"),Bs=d("mark"),Fs=d("q"),zs=d("rp"),Vs=d("rt"),Ws=d("ruby"),js=d("s"),qs=d("samp"),Us=d("small"),Ks=d("strong"),Gs=d("sub"),Js=d("sup"),Ys=d("time"),Xs=d("u"),Zs=d("var"),Qs=d("area"),ea=d("audio"),ta=d("img"),na=d("map"),ra=d("track"),oa=d("video"),ia=d("embed"),sa=d("iframe"),aa=d("object"),ca=d("param"),ua=d("picture"),la=d("portal"),da=d("source"),fa=d("svg",R),pa=d("math"),ma=d("canvas"),ga=d("noscript"),ba=d("script"),ha=d("del"),ya=d("ins"),Sa=d("caption"),va=d("col"),xa=d("colgroup"),Ea=d("table"),Ta=d("tbody"),wa=d("td"),ka=d("tfoot"),_a=d("th"),Aa=d("thead"),Ca=d("tr"),Qe=d("button"),Na=d("datalist"),Ra=d("fieldset"),La=d("form"),Ma=d("input"),Oa=d("label"),Da=d("legend"),Ha=d("meter"),Ia=d("optgroup"),Pa=d("option"),$a=d("output"),Ba=d("progress"),Fa=d("select"),za=d("textarea"),Va=d("details"),Wa=d("dialog"),ja=d("menu"),qa=d("summary"),Ua=d("slot"),Ka=d("template"),Ga=d("base"),Ja=d("link"),Ya=d("meta"),Re=d("style"),Xa=d("circle",R),Za=d("ellipse",R),Qa=d("g",R),ec=d("line",R),tc=d("path",R),nc=d("polygon",R),rc=d("polyline",R),oc=d("rect",R),ic=d("text",R),sc=d("tspan",R),ac=d("defs",R),cc=d("clipPath",R),uc=d("mask",R),lc=d("pattern",R),dc=d("linearGradient",R),fc=d("radialGradient",R),pc=d("stop",R),mc=d("use",R),gc=d("symbol",R),bc=d("marker",R),hc=d("center"),yc=d("font"),Sc=d("marquee"),vc=e=>d(e);var on="__sibuPendingError";function Nr(e,t){let n=()=>e.parentNode?(_(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[on]=t)})}function yt(e){let t=e,n=t[on];if(n instanceof Error)return delete t[on],n}function Rr(e){let t=null;return function(){if(t)return t();let r=A({class:"sibu-lazy"}),o=!1;return e().then(V(i=>{if(o)return;t=i.default;let s=t();q(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));q(r,A({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Nr(r,s)}),r.appendChild(P("sibu-lazy-loading","Loading...")),x(r,()=>{o=!0}),r}}function Lr({nodes:e,fallback:t}){let n=A({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;x(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&D(s)});let a=V(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){q(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,q(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else q(n,c)}catch(c){let u=c instanceof Error?c:new Error(String(c));Nr(n,u)}});return queueMicrotask(a),n}function un(e,t){return()=>Ve()===e?t():ht(e,t)}function vt(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";_(n,{phase:r,name:t});return}}function sn(e,t,n,r,o){let i=vt(e,t);if(typeof i!="function")return;let s=un(o,i);r()||!n.isConnected?vt(s,"onUnmount"):Or(s,n)}var je=new WeakMap,Le=new WeakMap,fe=new Set,pe=new Set,qe=null,St=0,xc=256;function an(e){let t=je.get(e);if(t){je.delete(e),fe.delete(e);for(let n of t)try{n()}catch{}}}function cn(e){Le.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Le.get(e);if(n){Le.delete(e),pe.delete(e);for(let r of n)try{r()}catch{}}})}function Ec(e){if(fe.size===0||e.nodeType!==1)return;let t=e;if(fe.has(t)&&t.isConnected&&an(t),t.firstElementChild)for(let n of Array.from(fe))n!==t&&n.isConnected&&t.contains(n)&&an(n)}function Tc(e){if(pe.size===0||e.nodeType!==1)return;let t=e;if(pe.has(t)&&!t.isConnected&&cn(t),t.firstElementChild)for(let n of Array.from(pe))n!==t&&!n.isConnected&&t.contains(n)&&cn(n)}function wc(){if(fe.size>0)for(let e of Array.from(fe))e.isConnected&&an(e);if(pe.size>0)for(let e of Array.from(pe))e.isConnected||cn(e)}function Mr(){qe||typeof document>"u"||(qe=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)Ec(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Tc(t.removedNodes[n])}St+=e.length,St>=xc&&(St=0,wc()),ln()}),qe.observe(document.body,{childList:!0,subtree:!0}))}function ln(){qe&&fe.size===0&&pe.size===0&&(qe.disconnect(),qe=null,St=0)}function kc(e,t){let n=je.get(e);return n||(n=[],je.set(e,n)),n.push(t),fe.add(e),Mr(),()=>{let r=je.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(je.delete(e),fe.delete(e))}ln()}}function _c(e,t){let n=Le.get(e);return n||(n=[],Le.set(e,n)),n.push(t),pe.add(e),Mr(),()=>{let r=Le.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Le.delete(e),pe.delete(e))}ln()}}function xt(e,t){if(typeof document>"u")return;let n=Ve();if(e=un(n,e),t){let r=!1,o=()=>r;if(x(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||sn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){sn(e,"onMount",t,o,n);return}let i=kc(t,()=>{r||sn(e,"onMount",t,o,n)});x(t,i)})}else queueMicrotask(()=>{vt(e,"onMount")})}function Ac(e,t){typeof document>"u"||Or(un(Ve(),e),t)}function Or(e,t){let n=!1,r=()=>{n||(n=!0,vt(e,"onUnmount"))};x(t,r);let o=()=>{if(n)return;let i=_c(t,r);x(t,i)};t.isConnected?o():xt(()=>{o()},t)}function Cc(e,t){x(t,e)}function Z(e,t,n){try{e.emit(t,n)}catch{}}var dn=Symbol.for("sibujs.ssr.v1");function Nc(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof Nt=="function"&&(t=Nt("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var ve=globalThis[dn]??(globalThis[dn]=Nc()),Me=ve.als,W=ve.fallbackStore;ve.fallbackDepth??(ve.fallbackDepth=0);var Dr=!1;function Rc(){if(Dr||Me||!(typeof process<"u"&&!!process.versions?.node))return;Dr=!0;let t=process.versions.node;O(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function Oe(){if(Me){let e=Me.getStore();if(e)return e}return W}function Hr(){return Me?Me.getStore()??null:ve.fallbackDepth>0?W:null}function re(){return Oe().ssr}function Ir(e){if(!re())return null;let t=Oe(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Pr(){Oe().ssr=!0}function $r(){Oe().ssr=!1}function Br(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Me)return Me.run(t,e);Rc();let n=W.ssr,r=W.suspenseIdCounter,o=W.idCounter,i=W.locale;W.ssr=!0,W.suspenseIdCounter=0,W.idCounter=0,W.locale=void 0,ve.fallbackDepth++;try{return e()}finally{ve.fallbackDepth--,W.ssr=n,W.suspenseIdCounter=r,W.idCounter=o,W.locale=i}}function Fr(e){let t=Oe(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var jr=globalThis;function Lc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,ne(()=>t(o,void 0));else{let i=n;n=o,ne(()=>t(o,i))}}}var zr=100;function Et(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Ve()?Vr(t):ht(n,()=>Vr(t))}function Vr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){_(n,{phase:"cleanup"})}}function Wr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Et(e),Se(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=zr);e.rerunPending&&(e.rerunPending=!1,_(new Error(`effect re-requested itself ${zr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Mc(e){if(e.disposed)return;e.disposed=!0;let t=jr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Et(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ce(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Q(e,t){if(M(typeof e=="function","effect: argument must be a function."),re())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&Et(n),Se(n.bodyFn,o),n.rerunPending&&Wr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{Se(n.bodyFn,n.subscriber),n.rerunPending&&Wr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Et(n),Ce(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=jr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Z(i,"effect:create",{effectFn:e}),()=>Mc(n)}var et=0,fn=new Set;function Oc(e){et++;try{return e()}finally{et--,et===0&&Ic()}}function Dc(e){return et===0?!1:(fn.add(e),!0)}function Hc(){return et>0}function Ic(){try{for(let e of fn)Er(e)}finally{fn.clear()}xr()}var qr=Symbol.for("sibujs.reactive.batch.v1");function Pc(){let e=globalThis,t=e[qr];if(t)return t;let n={batch:Oc,enqueueBatchedSignal:Dc,isBatching:Hc};return e[qr]=n,n}var pn=Pc(),K=pn.batch,De=pn.enqueueBatchedSignal,$c=pn.isBatching;var mn=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Ae(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(n.value=u,n.__v++,!0){let l=mn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u})}De(n)||ze(n)}}:s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(Object.is(u,c))return;n.value=u,n.__v++;let l=mn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u}),De(n)||ze(n)},!0){let a=mn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Z(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Bc(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Fc=`
8
8
  .sibu-error-display {
9
9
  border: 1px solid var(--sibu-err-border, #e5484d);
10
10
  border-radius: 10px;
@@ -185,11 +185,11 @@
185
185
  border: 1px solid #3a3a4e;
186
186
  }
187
187
  .sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
188
- `,Fr=!1;function Oc(){if(Fr||typeof document>"u")return;let e=Re({nodes:Mc});document.head.appendChild(e),Fr=!0}function Dc(e){let t=[],n=e.split(`
189
- `);for(let r of n){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){t.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&t.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return t}function zr(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=Dc(r),i=e.cause,s=i!=null?zr(i):null;return{code:t,message:n,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function Hc(e,t,n){let r=[];r.push(n),r.push(`[${e.code}] ${e.message}`),e.stack&&(r.push(""),r.push("Stack Trace:"),r.push(e.stack));let o=e.cause;for(;o;){if(r.push(""),r.push("Caused by:"),r.push(` [${o.code}] ${o.message}`),o.stack){let i=o.stack.split(`
188
+ `,Ur=!1;function zc(){if(Ur||typeof document>"u")return;let e=Re({nodes:Fc});document.head.appendChild(e),Ur=!0}function Vc(e){let t=[],n=e.split(`
189
+ `);for(let r of n){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){t.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&t.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return t}function Kr(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=Vc(r),i=e.cause,s=i!=null?Kr(i):null;return{code:t,message:n,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function Wc(e,t,n){let r=[];r.push(n),r.push(`[${e.code}] ${e.message}`),e.stack&&(r.push(""),r.push("Stack Trace:"),r.push(e.stack));let o=e.cause;for(;o;){if(r.push(""),r.push("Caused by:"),r.push(` [${o.code}] ${o.message}`),o.stack){let i=o.stack.split(`
190
190
  `).map(s=>` ${s}`).join(`
191
191
  `);r.push(i)}o=o.cause}if(t&&Object.keys(t).length>0){r.push(""),r.push("Metadata:");for(let[i,s]of Object.entries(t))r.push(` ${i}: ${String(s)}`)}return r.push(""),r.push("Environment:"),r.push(` Timestamp: ${new Date().toISOString()}`),typeof location<"u"&&r.push(` URL: ${location.href}`),typeof navigator<"u"&&navigator.userAgent&&r.push(` User Agent: ${navigator.userAgent}`),r.join(`
192
- `)}function Vr(e){let t=e.map((n,r)=>_({class:"sibu-err-frame",nodes:[$({class:"sibu-err-line",nodes:String(r+1)}),$({class:"sibu-err-fn",nodes:n.fn}),$({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return en({class:"sibu-err-stack",nodes:t})}function jr(e){return e?[_({class:"sibu-err-cause-label",nodes:"Caused by"}),_({class:"sibu-err-section",nodes:[_({class:"sibu-err-section-head",nodes:[$({nodes:`[${e.code}] ${e.message}`}),$({nodes:""})]}),e.frames.length>0?Vr(e.frames):_({class:"sibu-err-stack",nodes:"(no stack)"})]}),...jr(e.cause)]:[]}function Ic(e){let t=[];for(let[r,o]of Object.entries(e)){t.push(document.createElement("dt")),t[t.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),t.push(i)}let n=document.createElement("dl");n.className="sibu-err-meta";for(let r of t)n.appendChild(r);return n}function pn(e){Oc();let t=e.severity??"error",n=zr(e.error),r=e.alwaysShowDetails??se(),o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=C("Copy"),c=Xe({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=Hc(n,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(f).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=_({class:"sibu-err-header",nodes:[tn({class:"sibu-err-icon",nodes:n.code}),Qt({class:"sibu-err-title",nodes:o}),c,$({class:"sibu-err-timestamp",nodes:i})]}),u=[Zt({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0&&u.push(_({class:"sibu-err-section",nodes:[_({class:"sibu-err-section-head",nodes:[$({nodes:"Stack Trace"})]}),Vr(n.frames)]})),r&&u.push(...jr(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&u.push(_({class:"sibu-err-section",nodes:[_({class:"sibu-err-section-head",nodes:[$({nodes:"Metadata"})]}),Ic(e.metadata)]}));let m=[];e.onRetry&&m.push(Xe({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&m.push(Xe({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),m.length>0&&u.push(_({class:"sibu-err-actions",nodes:m}));let g=_({class:"sibu-err-body",nodes:u});return _({class:"sibu-error-display","data-severity":t,nodes:[l,g]})}var $c=`
192
+ `)}function Gr(e){let t=e.map((n,r)=>A({class:"sibu-err-frame",nodes:[P({class:"sibu-err-line",nodes:String(r+1)}),P({class:"sibu-err-fn",nodes:n.fn}),P({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return nn({class:"sibu-err-stack",nodes:t})}function Jr(e){return e?[A({class:"sibu-err-cause-label",nodes:"Caused by"}),A({class:"sibu-err-section",nodes:[A({class:"sibu-err-section-head",nodes:[P({nodes:`[${e.code}] ${e.message}`}),P({nodes:""})]}),e.frames.length>0?Gr(e.frames):A({class:"sibu-err-stack",nodes:"(no stack)"})]}),...Jr(e.cause)]:[]}function jc(e){let t=[];for(let[r,o]of Object.entries(e)){t.push(document.createElement("dt")),t[t.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),t.push(i)}let n=document.createElement("dl");n.className="sibu-err-meta";for(let r of t)n.appendChild(r);return n}function gn(e){zc();let t=e.severity??"error",n=Kr(e.error),r=e.alwaysShowDetails??ie(),o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=C("Copy"),c=Qe({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let m=Wc(n,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(m).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),u=A({class:"sibu-err-header",nodes:[rn({class:"sibu-err-icon",nodes:n.code}),tn({class:"sibu-err-title",nodes:o}),c,P({class:"sibu-err-timestamp",nodes:i})]}),l=[en({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0&&l.push(A({class:"sibu-err-section",nodes:[A({class:"sibu-err-section-head",nodes:[P({nodes:"Stack Trace"})]}),Gr(n.frames)]})),r&&l.push(...Jr(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&l.push(A({class:"sibu-err-section",nodes:[A({class:"sibu-err-section-head",nodes:[P({nodes:"Metadata"})]}),jc(e.metadata)]}));let p=[];e.onRetry&&p.push(Qe({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&p.push(Qe({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),p.length>0&&l.push(A({class:"sibu-err-actions",nodes:p}));let g=A({class:"sibu-err-body",nodes:l});return A({class:"sibu-error-display","data-severity":t,nodes:[u,g]})}var qc=`
193
193
  .sibu-error-boundary {
194
194
  position: relative;
195
195
  }
@@ -343,7 +343,7 @@
343
343
  .sibu-error-fallback .sibu-error-btn-reload:hover {
344
344
  background: #3a3a4e;
345
345
  }
346
- `,Pc=Symbol("sibujs.ErrorBoundary.resetKeyThrew"),qr=!1;function Bc(){if(!qr&&typeof document<"u"){let e=Re({nodes:$c});document.head.appendChild(e),qr=!0}}function Fc(e,t){let n=typeof e=="function"?e:t,r=typeof e=="function"?{}:e,{fallback:o,onError:i,resetKeys:s}=r;Bc();let[a,c]=C(null),l=()=>{m(),c(null)},u=null,m=()=>{if(!u)return;let S=u;u=null,S()},g=S=>{let E=new Array(S.length);for(let w=0;w<S.length;w++)try{E[w]=S[w]()}catch(H){k(H,{phase:"effect",name:"ErrorBoundary.resetKeys"}),E[w]=Pc}return E},f=()=>{let S=s;if(!S||S.length===0)return;m();let E=null;u=Q(()=>{let w=g(S);if(E===null){E=w;return}let H=w.length!==E.length;if(!H){for(let B=0;B<w.length;B++)if(!Object.is(w[B],E[B])){H=!0;break}}E=w,H&&l()})},p=S=>{let E=Nt(S);if(c(E),f(),i)try{i(E)}catch(w){k(w,{phase:"render",name:"ErrorBoundary onError callback"})}return E},b=(S,E)=>pn({error:S,severity:"error",onRetry:E}),h=S=>{let E=o||b;try{return E(S,l)}catch(w){return queueMicrotask(()=>{k(w,{phase:"render",name:"ErrorBoundary fallback",node:y.parentNode?y:void 0})}),document.createComment("error-boundary-failed")}},y=_({class:"sibu-error-boundary",nodes:()=>{let S=a();if(S)return h(S);try{let E=n();if(E&&typeof E.then=="function"){let w=_({class:"sibu-error-async"});w.appendChild($({class:"sibu-lazy-loading",nodes:"Loading..."}));let H=!1;return x(w,()=>{H=!0}),E.then(B=>{if(H){D(B);return}q(w,B)}).catch(z(B=>{if(H)return;let Ie=p(B);q(w,h(Ie))})),w}return E}catch(E){let w=p(E);return h(w)}}}),A=S=>{if(a())return;let w=S.detail?.error;w&&(S.preventDefault(),S.stopPropagation(),p(w))};return y.addEventListener("sibu:error-propagate",A),St(()=>{let S=document.createTreeWalker(y,NodeFilter.SHOW_ELEMENT),E=[],w=S.currentNode;for(;w;){let H=bt(w);H&&E.push(H),w=S.nextNode()}if(E.length===1)p(E[0]);else if(E.length>1){let H=globalThis.AggregateError;p(H?new H(E,`${E.length} pre-mount errors caught by ErrorBoundary`):new Error(E.map(B=>B.message).join("; ")))}},y),x(y,()=>{m(),y.removeEventListener("sibu:error-propagate",A)}),y}var zc=`
346
+ `,Uc=Symbol("sibujs.ErrorBoundary.resetKeyThrew"),Yr=!1;function Kc(){if(!Yr&&typeof document<"u"){let e=Re({nodes:qc});document.head.appendChild(e),Yr=!0}}function Gc(e,t){let n=typeof e=="function"?e:t,r=typeof e=="function"?{}:e,{fallback:o,onError:i,resetKeys:s}=r;Kc();let[a,c]=C(null),u=()=>{p(),c(null)},l=null,p=()=>{if(!l)return;let y=l;l=null,y()},g=y=>{let E=new Array(y.length);for(let k=0;k<y.length;k++)try{E[k]=y[k]()}catch(I){_(I,{phase:"effect",name:"ErrorBoundary.resetKeys"}),E[k]=Uc}return E},m=()=>{let y=s;if(!y||y.length===0)return;p();let E=null;l=Q(()=>{let k=g(y);if(E===null){E=k;return}let I=k.length!==E.length;if(!I){for(let B=0;B<k.length;B++)if(!Object.is(k[B],E[B])){I=!0;break}}E=k,I&&u()})},f=y=>{let E=Lt(y);if(c(E),m(),i)try{i(E)}catch(k){_(k,{phase:"render",name:"ErrorBoundary onError callback"})}return E},b=(y,E)=>gn({error:y,severity:"error",onRetry:E}),h=y=>{let E=o||b;try{return E(y,u)}catch(k){return queueMicrotask(()=>{_(k,{phase:"render",name:"ErrorBoundary fallback",node:S.parentNode?S:void 0})}),document.createComment("error-boundary-failed")}},S=A({class:"sibu-error-boundary",nodes:()=>{let y=a();if(y)return h(y);try{let E=n();if(E&&typeof E.then=="function"){let k=A({class:"sibu-error-async"});k.appendChild(P({class:"sibu-lazy-loading",nodes:"Loading..."}));let I=!1;return x(k,()=>{I=!0}),E.then(B=>{if(I){D(B);return}q(k,B)}).catch(V(B=>{if(I)return;let Ie=f(B);q(k,h(Ie))})),k}return E}catch(E){let k=f(E);return h(k)}}}),w=y=>{if(a())return;let k=y.detail?.error;k&&(y.preventDefault(),y.stopPropagation(),f(k))};return S.addEventListener("sibu:error-propagate",w),xt(()=>{let y=document.createTreeWalker(S,NodeFilter.SHOW_ELEMENT),E=[],k=y.currentNode;for(;k;){let I=yt(k);I&&E.push(I),k=y.nextNode()}if(E.length===1)f(E[0]);else if(E.length>1){let I=globalThis.AggregateError;f(I?new I(E,`${E.length} pre-mount errors caught by ErrorBoundary`):new Error(E.map(B=>B.message).join("; ")))}},S),x(S,()=>{p(),S.removeEventListener("sibu:error-propagate",w)}),S}var Jc=`
347
347
  @keyframes sibu-spin {
348
348
  to { transform: rotate(360deg); }
349
349
  }
@@ -396,5 +396,5 @@
396
396
  .sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
397
397
  .sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
398
398
  .sibu-loading-lg .sibu-loading-dots { gap: 6px; }
399
- `,Wr=!1;function Vc(){!Wr&&typeof document<"u"&&(document.head.appendChild(Re({nodes:zc})),Wr=!0)}function jc(e={}){Vc();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?_({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":t?void 0:"Loading"},[_({class:"sibu-loading-dots"},[$({class:"sibu-loading-dot"}),$({class:"sibu-loading-dot"}),$({class:"sibu-loading-dot"})]),t?$({class:"sibu-loading-text"},t):null]):_({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":t?void 0:"Loading"},[_({class:"sibu-loading-spinner"}),t?$({class:"sibu-loading-text"},t):null])}var mn=Symbol.for("sibujs.actions.v1"),Kr=globalThis[mn]??(globalThis[mn]=new Map);function qe(e,t){Kr.set(e,t)}function Gr(e){return Kr.get(e)}function qc(e,t,n){let r=typeof t=="string"?Gr(t):t;if(!r)throw new Error(`[SibuJS] No action registered under the name "${t}". Register it with registerAction() before applying it by name.`);let o=r(e,n);typeof o=="function"&&x(e,o)}var Jr=(e,t)=>{let n=e.ownerDocument,r=o=>{let i=o.target;typeof i?.nodeType=="number"&&e.contains(i)||t()};return n.addEventListener("pointerdown",r,!0),()=>n.removeEventListener("pointerdown",r,!0)},Ur=["pointerup","pointerleave","pointercancel"],Yr=(e,t)=>{let n=t.duration??500,r=null,o,i=()=>{r!==null&&(clearTimeout(r),r=null)},s=c=>{let l=c.pointerId;r!==null&&l!==o||(i(),o=l,r=setTimeout(()=>{r=null,t.callback()},n))},a=c=>{r!==null&&c.pointerId===o&&i()};e.addEventListener("pointerdown",s);for(let c of Ur)e.addEventListener(c,a);return()=>{i(),e.removeEventListener("pointerdown",s);for(let c of Ur)e.removeEventListener(c,a)}},Xr=(e,t)=>{let n=o=>k(o,{phase:"async",name:"copyOnClick",node:e}),r=()=>{try{let o=typeof t=="function"?t():e.textContent??"";Promise.resolve(navigator.clipboard.writeText(o)).catch(n)}catch(o){n(o)}};return e.addEventListener("click",r),()=>e.removeEventListener("click",r)},Zr=e=>{let t=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return t(),e.addEventListener("input",t),()=>e.removeEventListener("input",t)},Qr=e=>{let t='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',n=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(t));if(o.length===0)return;let i=o[0],s=o[o.length-1],a=e.ownerDocument.activeElement;r.shiftKey&&a===i?(r.preventDefault(),s.focus()):!r.shiftKey&&a===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)};qe("clickOutside",Jr);qe("longPress",Yr);qe("copyOnClick",Xr);qe("autoResize",Zr);qe("trapFocus",Qr);function xt(e){if(e===null||typeof e!="object"&&typeof e!="function")return null;let t;try{t=e.then}catch(n){return Promise.reject(n)}return typeof t!="function"?null:new Promise((n,r)=>{queueMicrotask(()=>{try{Reflect.apply(t,e,[n,r])}catch(o){r(o)}})})}var He=null;function Wc(e,t){try{let n=e(),r=xt(n);return r&&r.then(void 0,o=>{t?t(o,"async"):He?He(o,"async"):console.error("Unhandled async error in Sibu.catchError:",o)}),n}catch(n){return t?t(n,"sync"):He?He(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function Uc(e,t){try{return await e()}catch(n){return t?t(n,"async"):He?He(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function Kc(e){He=e}function Gc(e){let[t,n]=C(e),r=i=>{!!0||!oe()||O(`context.${i}() called during SSR. SibuJS context() is application-global \u2014 it is NOT isolated per request, so a concurrent request can observe this value. Do not use context() for request-specific SSR data; pass it explicitly or use request-scoped storage instead.`)};return{provide(i){r("provide");let s=t();return n(i),()=>n(s)},use(){return t},get(){return t()},set(i){r("set"),n(i)},withContext(i,s){r("withContext");let a=t();n(i);try{let c=s();return c!==null&&typeof c?.then=="function"&&O("context.withContext() received an async callback. Scoping is synchronous only \u2014 the previous value is restored as soon as the callback returns its promise, so anything after an `await` runs outside the scope."),c}finally{n(a)}}}}var gn=Symbol.for("sibujs.createId.v1"),bn=globalThis[gn]??(globalThis[gn]={n:0});function eo(e="sibu"){let t=Nr();return t?(t.idCounter=(t.idCounter??0)+1,`${e}-${t.idCounter}`):(bn.n++,`${e}-${bn.n}`)}function to(){bn.n=0}function Jc(e,t){let n=typeof t=="function"?t():t;return x(n,P(()=>{n.style.display=e()?"":"none"},n)),n}function no(e,t,n,r,o){let i=typeof n=="function"?n():n;if(i==null||typeof i=="boolean")return{node:null,owned:!1};let s=i instanceof Node?i:document.createTextNode(String(i)),a=s===n,c=r.has(s),l=!a&&!c;return r.add(s),c&&j(()=>`${o}: ${a?"a branch was given as an element rather than a function":"a branch factory returned a node it had already returned"}, so the SAME node is being re-attached \u2014 any state it accumulated while detached (input value, scroll position, classes set imperatively) comes back with it. Its reactive bindings are left intact rather than disposed, because the node is not this directive's to tear down. Return a FRESH node per call (\`() => div(\u2026)\`) for rebuild semantics, or keep this form deliberately when the reuse is what you want.`),e.insertBefore(s,t.nextSibling),{node:s,owned:l}}function Et(e,t){t&&D(e),e.parentNode?.removeChild(e)}function Yc(e,t,n){W();let r=document.createComment("when"),o=null,i,s=!1,a=!1,c=new WeakSet,l=!1,u=()=>{if(a)return;let g=e(),f=r.parentNode;if(!f||s&&Object.is(g,i))return;i=g;let p=o?Ye([o]):null;o?.parentNode&&(Et(o,l),o=null);let b=g?t:n!==void 0?n:null,h=re(()=>no(f,r,b,c,"when"));o=h.node,l=h.owned,ze(p,o?[o]:[],"when"),s=!0},m=P(u,r);return x(r,()=>{a=!0,m(),o&&Et(o,l),o=null}),s||queueMicrotask(z(()=>{!a&&!s&&r.parentNode&&u()})),r}function Xc(e,t,n){W();let r=document.createComment("match"),o=null,i,s=!1,a=!1,c=new WeakSet,l=!1,u=()=>{if(a)return;let g=String(e()),f=r.parentNode;if(!f||s&&g===i)return;i=g;let p=o?Ye([o]):null;o?.parentNode&&(Et(o,l),o=null);let b=Object.hasOwn(t,g)?t[g]:n,h=re(()=>no(f,r,b??null,c,"match"));o=h.node,l=h.owned,ze(p,o?[o]:[],"match"),s=!0},m=P(u,r);return x(r,()=>{a=!0,m(),o&&Et(o,l),o=null}),s||queueMicrotask(z(()=>{!a&&!s&&r.parentNode&&u()})),r}function Qe(e,t){let n=globalThis;return n[e]??(n[e]=t())}var Tt=Qe(Symbol.for("sibujs.components.registry.v1"),()=>new Map),ro=Qe(Symbol.for("sibujs.components.registryVersion.v1"),()=>C(0));function oo(){let[e,t]=ro;t(re(e)+1)}function Zc(e,t){Tt.set(e,t),oo()}function Qc(e){Tt.delete(e)&&oo()}function el(e){let t=Tt.get(e);return t?t():_(`[Component "${e}" not found]`)}function tl(e){let t=_({class:"sibu-dynamic"}),r={};function o(){let s=e(),a;typeof s=="function"?a=s:(ro[0](),a=Tt.get(s));let c=a??`missing:${s}`;if(c===r)return;let l=re(()=>a?a():_(`[Component "${s}" not found]`));r=c,q(t,l)}let i=X(o);return x(t,i),t}function io(e){return typeof e=="function"?io(e()):e instanceof Node?e:document.createTextNode(String(e))}function nl(e,t){if(t===0)return[];let n=[],r=new Array(t);for(let a=0;a<t;a++){let c=e[a],l=0,u=n.length;for(;l<u;){let m=l+u>>1;e[n[m]]<c?l=m+1:u=m}n[l]=a,r[a]=l>0?n[l-1]:-1}let o=n.length,i=new Array(o),s=n[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function rl(e,t,n){M(typeof e=="function","each: first argument must be a function that returns an array."),M(typeof t=="function","each: second argument must be a render function."),M(n&&typeof n.key=="function","each: options.key must be a function that returns a unique key per item."),W();let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,l=new Map,u=new Map,m=[],g=[],f=[],p=0,b=[],h=[],y=new Uint8Array(0),A=new Map,S=[],E=[],w=new Map,H=!1,B=!1,Ie=!1,To=n.key,En=()=>{if(Ie)return;let ie=e(),N=ie.length,Ee=r.parentNode;if(!Ee)return;B||(Ee.insertBefore(o,r.nextSibling),B=!0),h.length<N&&(h=new Array(N));for(let v=0;v<N;v++)h[v]=To(ie[v]);let ge=h;b.length<N&&(b=new Array(N)),u.clear(),w.clear();for(let v=0;v<N;v++)w.has(ge[v])&&O(`each: duplicate key "${String(ge[v])}" at index ${v} (first seen at ${w.get(ge[v])}). Keys must be unique \u2014 duplicates cause rows to be dropped or mis-ordered.`),w.set(ge[v],v);p=0;for(let v=0;v<N;v++){let F=ge[v],wn=l.get(F),Ue;if(wn!==void 0)Ue=wn,m[p]=Ue,g[p]=ie[v],f[p]=v,p++;else{let[kn,_o]=C(ie[v]),[An,Co]=C(v),At;try{Ae();try{At=io(t(kn,An))}finally{_e()}}catch(No){let Ro=ge[v];At=document.createComment(`each:error:${v}`),queueMicrotask(()=>{k(No,{phase:"render",name:`each row (key="${String(Ro)}")`,node:r.parentNode?r:void 0})})}Ue={node:At,item:kn,setItem:_o,index:An,setIndex:Co}}u.set(F,Ue),b[v]=Ue.node}for(let[v,F]of l)u.has(v)||(D(F.node),F.node.parentNode&&Ee.removeChild(F.node));if(N===0){c=0;let v=l;l=u,u=v,H=!0,p=0;return}A.clear();for(let v=0;v<c;v++)A.set(a[v],v);S.length<N&&(S=new Array(N),E=new Array(N));let tt=0;for(let v=0;v<N;v++){let F=A.get(ge[v]);F!==void 0&&(S[tt]=v,E[tt]=F,tt++)}let Tn=nl(E,tt);y.length<N?y=new Uint8Array(N):y.fill(0,0,N);for(let v=0;v<Tn.length;v++)y[S[Tn[v]]]=1;let nt=o;for(let v=N-1;v>=0;v--){let F=b[v];y[v]||F.nextSibling!==nt&&Ee.insertBefore(F,nt),nt=F}let rt=a===i?s:i;rt.length<N&&(rt.length=N);for(let v=0;v<N;v++)rt[v]=ge[v];a=rt,c=N;let Ao=l;l=u,u=Ao,H=!0,wo()};function wo(){if(p===0)return;let ie=p;p=0,U(()=>{for(let N=0;N<ie;N++){let Ee=m[N];Ee.setItem(g[N]),Ee.setIndex(f[N]),m[N]=void 0,g[N]=void 0}})}let ko=X(En);return x(r,()=>{if(!Ie){Ie=!0,ko();for(let ie of l.values())D(ie.node),ie.node.parentNode?.removeChild(ie.node);o.parentNode&&o.parentNode.removeChild(o),B=!1,l.clear(),u.clear(),w.clear(),A.clear(),c=0,m.length=0,g.length=0,f.length=0,p=0}}),H||queueMicrotask(z(()=>{!H&&!Ie&&r.parentNode&&En()})),r}function ol(e){W();let t=document.createDocumentFragment();for(let n of e)if(!(n==null||typeof n=="boolean"))if(Array.isArray(n))for(let r of n)r==null||typeof r=="boolean"||so(t,r);else so(t,n);return t}function so(e,t){if(t instanceof Node){e.appendChild(t);return}if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),x(n,fe(n,t));return}e.appendChild(document.createTextNode(String(t)))}var il=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ao=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),co=new WeakMap;function sl(e){let t=e.length-1,n=e[0];for(let f=0;f<t;f++)n+=`\0${f}\0${e[f+1]}`;let r=0,o=n.length;function i(){for(;r<o&&(n[r]===" "||n[r]===" "||n[r]===`
400
- `||n[r]==="\r");)r++}function s(){if(n.charCodeAt(r)!==0)return-1;let f=r;r++;let p=0;for(;r<o&&n.charCodeAt(r)!==0;)p=p*10+(n.charCodeAt(r)-48),r++;return r<o&&r++,p<0||p>=t?(r=f,-1):p}function a(){let f=r;for(;r<o;){let p=n.charCodeAt(r);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45)r++;else break}return n.slice(f,r)}function c(){if(i(),n[r]!=="=")return{kind:"bool"};r++,i();let f=s();if(f>=0)return{kind:"expr",idx:f};let p=n[r];if(p==='"'||p==="'"){r++;let b=[],h=[],y="";for(;r<o&&n[r]!==p;){let A=s();A>=0?(b.push(y),y="",h.push(A)):y+=n[r++]}return r<o&&r++,b.push(y),h.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:h}}{let b=[],h=[],y="";for(;r<o;){let A=n.charCodeAt(r);if(A===32||A===9||A===10||A===13||A===62)break;let S=s();S>=0?(b.push(y),y="",h.push(S)):y+=n[r++]}return b.push(y),h.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:h}}}function l(){let f=[];for(;r<o&&(i(),!(n[r]===">"||n[r]==="/"));){let p=r;for(;r<o;){let y=n.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let b=n.slice(p,r);if(!b)break;let h=c();b.startsWith("on:")?h.kind==="expr"&&f.push({t:3,name:b.slice(3),idx:h.idx}):h.kind==="bool"?f.push({t:4,name:b}):h.kind==="static"?f.push({t:0,name:b,value:h.value}):h.kind==="expr"?f.push({t:1,name:b,idx:h.idx}):h.kind==="mixed"&&f.push({t:2,name:b,statics:h.statics,exprs:h.exprs})}return f}function u(f){return f.replace(/\s+/g," ")}function m(f){let p="";for(;r<o&&n[r]!=="<";){let h=s();if(h>=0){let y=u(p);y&&f.push({t:1,value:y}),p="",f.push({t:2,idx:h})}else p+=n[r++]}let b=u(p);b&&f.push({t:1,value:b})}function g(){let f=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){let p=n[r+1];if(p==="!"){if(n.startsWith("<!--",r)){let S=n.indexOf("-->",r+4);r=S===-1?o:S+3}else if(n.startsWith("<![CDATA[",r)){let S=n.indexOf("]]>",r+9);r=S===-1?o:S+3}else{let S=n.indexOf(">",r);r=S===-1?o:S+1}continue}if(p==="?"){let S=n.indexOf(">",r);r=S===-1?o:S+1;continue}if(!(p>="a"&&p<="z")&&!(p>="A"&&p<="Z")){f.push({t:1,value:"<"}),r++;continue}r++;let b=a(),h=l();i();let y=il.has(b),A=n[r]==="/";if(A&&r++,r<o&&r++,y||A)f.push({t:0,el:{tag:b,svg:ao.has(b),attrs:h,children:[]}});else{let S=g();if(Wn(b)){for(let E=0;E<S.length;E++)if(S[E].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${b}> (raw-text context). Build the content separately and append it as a Node.`)}n[r]==="<"&&r+1<o&&n[r+1]==="/"&&(r+=2,a(),i(),r<o&&n[r]===">"&&r++),f.push({t:0,el:{tag:b,svg:ao.has(b),attrs:h,children:S}})}}else m(f);return f}return g()}function hn(e,t){let n=e.svg?document.createElementNS(R,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:Bt(n,o.name,o.value);break;case 1:{let i=o.name,s=t[o.idx];typeof s=="function"?x(n,Je(n,i,s)):ee(n,i,s,{syncValueProperty:!1,label:"html"});break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++){let a=t[o.exprs[s]];i+=(a==null?"":String(a))+o.statics[s+1]}ee(n,o.name,i,{syncValueProperty:!1,label:"html"});break}case 3:{let i=t[o.idx];typeof i=="function"?n.addEventListener(o.name,i):O(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:Bt(n,o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(hn(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(typeof i=="function"){let s=document.createComment("");n.appendChild(s),x(n,fe(s,i))}else if(i instanceof Node)n.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n}function lo(e,...t){let n=co.get(e);return n||(n=sl(e),co.set(e,n)),fo(n,t)}function uo(e,t){return fo(e,t)}function fo(e,t){if(W(),e.length===1&&e[0].t===0)return hn(e[0].el,t);let n=document.createElement("div");for(let r=0;r<e.length;r++){let o=e[r];switch(o.t){case 0:n.appendChild(hn(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(i instanceof Node)n.appendChild(i);else if(typeof i=="function"){let s=document.createComment("bind:htm");n.appendChild(s),x(n,fe(s,i))}else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n.childNodes.length===1&&n.firstChild instanceof Element?n.firstChild:n}function al(e,t,n){W();let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??10;s===0&&se()&&O("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,l=!1,u=!1,m=()=>{if(u)return;let f=e(),p=r.parentNode;if(!p||l&&f===a)return;c?.parentNode&&p.removeChild(c),a=f;let b=o.get(f);if(b){let h=i.indexOf(f);h!==-1&&(i.splice(h,1),i.push(f))}else{let h=t[f];if(!h){c=null,l=!0;return}if(b=h(),b.nodeType===11){let y=document.createElement("div");y.style.display="contents",y.appendChild(b),b=y}if(o.set(f,b),i.push(f),s>0&&i.length>s){let y=i.shift(),A=o.get(y);A&&(D(A),A.parentNode&&A.parentNode.removeChild(A),o.delete(y))}}p.insertBefore(b,r.nextSibling),c=b,l=!0},g=X(m);return l||queueMicrotask(z(()=>{!l&&r.parentNode&&m()})),x(r,()=>{u=!0,g();for(let f of o.values())D(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function cl(e,t){if(!t)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");M(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let n=()=>typeof performance<"u"?performance.now():0,r=n(),o=null,i=u=>{if(u instanceof DocumentFragment){let m=document.createComment(""),g=document.createComment("");u.insertBefore(m,u.firstChild),u.appendChild(g),o={start:m,end:g}}t.appendChild(u)},s;typeof e=="function"?s=On(()=>{let u=e();return i(u),u}):(s=e,i(s));let a=n()-r,c=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&Z(c,"app:init",{rootElement:s,container:t,duration:a});let l=o;return{node:s,unmount(){if(c&&Z(c,"app:unmount",{rootElement:s}),l){ll(l.start,l.end);return}D(s),s.parentNode?.removeChild(s)}}}function ll(e,t){let n=e.parentNode;if(!n&&!t.parentNode)return;let r=le;for(let a=e.nextSibling;a&&a!==t;a=a.nextSibling)r++;let o=e,i=null,s=!0;for(;;){e.parentNode!==n||t.parentNode!==n?s=!1:(e.previousSibling!==o||t.nextSibling!==i)&&(o=e.previousSibling,i=t.nextSibling,s=!!(e.compareDocumentPosition(t)&4));let a=e.nextSibling;if(!s||a===t)break;if(r--<=0){be("mount",le,1);return}D(a),a.parentNode===n&&n.removeChild(a)}s||k(new Error("[SibuJS mount] fragment markers lost"),{phase:"cleanup",name:"mount"}),e.parentNode?.removeChild(e),t.parentNode?.removeChild(t)}function ul(e,t){W();let n=document.createComment("portal"),r=t||document.body,o=null,i=!1,s=z(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(a){queueMicrotask(()=>{k(a,{phase:"render",name:"Portal",node:n.parentNode?n:void 0})})}});return queueMicrotask(s),x(n,()=>{i=!0,o&&(D(o),o.remove(),o=null)}),n}function dl(e,t="default"){if(e==null||!Object.hasOwn(e,t))return;let n=e[t];return typeof n=="function"?n:void 0}function po(e,t,n){return n.length===0?e.splice(t):e.splice(t,...n)}function fl(e=[]){let[t,n]=C([...e]);return[t,{push(...o){n(i=>[...i,...o])},pop(){let o;return n(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return n(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){n(i=>[...o,...i])},splice(o,...i){let s=[];return n(a=>{let c=[...a];return s=po(c,o,i),s.length===0&&i.length<=1?a:c}),s},remove(o){n(i=>i.filter((s,a)=>a!==o))},removeWhere(o){n(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){n([...o])},update(o,i){n(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){n(s=>s.map(a=>o(a)?i(a):a))},sort(o){n(i=>[...i].sort(o))},reverse(){n(o=>[...o].reverse())},filter(o){n(i=>i.filter(o))},map(o){n(i=>i.map(o))},clear(){n([])}}]}function pl(e=[]){let t=[...e],n=null,r={__v:0};function o(){n=null,r.__v++,De(r)||Be(r)}function i(){if(Ce(r),n===null){let a=t.slice();n=Object.freeze(a)}return n}return[i,{push(...a){a.length!==0&&(t.push(...a),o())},pop(){if(t.length===0)return;let a=t.pop();return o(),a},shift(){if(t.length===0)return;let a=t.shift();return o(),a},unshift(...a){a.length!==0&&(t.unshift(...a),o())},splice(a,...c){let l=po(t,a,c);return(l.length>0||c.length>1)&&o(),l},remove(a){a<0||a>=t.length||(t.splice(a,1),o())},removeWhere(a){let c=t.findIndex(a);c!==-1&&(t.splice(c,1),o())},set(a){t=[...a],o()},update(a,c){a<0||a>=t.length||Object.is(t[a],c)||(t[a]=c,o())},updateWhere(a,c){let l=!1;for(let u=0;u<t.length;u++)if(a(t[u])){let m=c(t[u]);Object.is(t[u],m)||(t[u]=m,l=!0)}l&&o()},sort(a){t.length<=1||(t.sort(a),o())},reverse(){t.length<=1||(t.reverse(),o())},filter(a){let c=t.filter(a);c.length!==t.length&&(t=c,o())},map(a){let c=!1;for(let l=0;l<t.length;l++){let u=a(t[l],l);Object.is(t[l],u)||(t[l]=u,c=!0)}c&&o()},clear(){t.length!==0&&(t=[],o())}}]}function ml(e,t){let[n,r]=C(t),[o,i]=C(!1),[s,a]=C(null),[c,l]=C(0),u=0,m=!1,g=null,f=()=>{if(g===null)return;let b=g;g=null;try{b.abort()}catch{}},p=Q(()=>{if(c(),m)return;f();let b=++u,h=typeof AbortController<"u"?new AbortController:null;g=h,U(()=>{i(!0),a(null)});let y=()=>m||b!==u,A;try{A=e({signal:h?h.signal:void 0})}catch(S){if(y())return;U(()=>{a(S),i(!1)});return}A.then(S=>{y()||(g=null,U(()=>{r(S),i(!1)}))},S=>{y()||(g=null,U(()=>{a(S),i(!1)}))})});return{value:n,loading:o,error:s,refresh:()=>{m||l(b=>b+1)},dispose:()=>{m||(m=!0,p(),f())}}}function We(e,t,n){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!1;let r=e,o=t;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp){let a=t;return e.source===a.source&&e.flags===a.flags}n||(n=new Map);let i=n.get(r);if(i?.has(o))return!0;if(i||(i=new Set,n.set(r,i)),i.add(o),e instanceof Map){let a=t;if(e.size!==a.size)return!1;for(let[c,l]of e)if(!a.has(c)||!We(l,a.get(c),n))return!1;return!0}if(e instanceof Set){let a=t;if(e.size!==a.size)return!1;for(let c of e)if(!a.has(c))return!1;return!0}if(e instanceof ArrayBuffer){let a=new Uint8Array(e),c=new Uint8Array(t);if(a.length!==c.length)return!1;for(let l=0;l<a.length;l++)if(a[l]!==c[l])return!1;return!0}if(e instanceof DataView){if(!(t instanceof DataView)||e.byteLength!==t.byteLength)return!1;for(let a=0;a<e.byteLength;a++)if(e.getUint8(a)!==t.getUint8(a))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){let a=e,c=t;if(a.length!==c.length)return!1;for(let l=0;l<a.length;l++)if(a[l]!==c[l])return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((a,c)=>We(a,t[c],n));if(e instanceof Number||e instanceof String||e instanceof Boolean)return Object.is(e.valueOf(),t.valueOf());if(typeof URL<"u"&&e instanceof URL)return e.href===t.href;if(e instanceof Error){let a=t;return e.name===a.name&&e.message===a.message&&We(e.cause,a.cause,n)&&mo(r,o,n)}let s=Object.getPrototypeOf(r);return s!==Object.prototype&&s!==null?!1:mo(r,o,n)}function mo(e,t,n){let r=Object.keys(e),o=Object.keys(t);return r.length!==o.length?!1:r.every(i=>Object.hasOwn(t,i)&&We(e[i],t[i],n))}function gl(e){return C(e,{equals:(t,n)=>We(t,n)})}function yn(e,t){M(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r=t?.equals,o={};o._d=!1,o._init=!1,o._f=!1,o._g=e,o.__v=0;let i=!1,s=!1,a,c=()=>{o._d||s||(o._d=!0)};c._c=1,c._sig=o;let l=()=>{let p=e();o._v=r&&o._init&&r(o._v,p)?o._v:p,o._d=!1,o._init=!0};try{X(()=>{o._v=e(),o._d=!1,o._init=!0},c)}catch(p){throw s=!0,Ne(c),p}let u=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,m=()=>{if(!o._d||s||a!==void 0)return;let p=o._v;i=!0;try{ve(l,c),Object.is(p,o._v)||o.__v++}catch(b){a={error:b},o.__v++,s?o._d=!0:o._f=!0}finally{i=!1,s&&Ne(c)}u&&!s&&!Object.is(p,o._v)&&Z(u,"computed:update",{signal:o,oldValue:p,newValue:o._v})};o._validate=m;let g=()=>{let{error:p}=a;throw a=void 0,s&&(o._d=!1),p};function f(){if(i)throw new Error(`[SibuJS] Circular dependency detected in derived${n?` "${n}"`:""}. A derived signal cannot read itself (directly or through a chain).`);return pr()||s?(o._d&&(m(),a!==void 0&&g()),o._v):(o._d&&(m(),a!==void 0&&(Ce(o),g())),Ce(o),o._v)}return n&&(f.__name=n,o.__name=n),f.__signal=o,f.dispose=()=>{if(s)return;s=!0,o._d=a!==void 0,Ne(c);let p=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(p)try{p.emit("computed:destroy",{signal:o,getter:f})}catch{}},u&&Z(u,"computed:create",{signal:o,name:n,getter:f}),f}function bl(e){let[t,n]=C(e);return{get current(){return t()},set current(r){n(r)}}}function go(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function hl(e){M(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t=Object.create(null);Object.keys(e).forEach(c=>{let[l,u]=C(e[c]);go(t,c,[l,u])});let n=new Proxy({},{get(c,l){if(typeof l=="string"&&Object.hasOwn(t,l)){let u=t[l][0];return u()}return Reflect.get(c,l)},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(t).forEach(l=>{go(c,l,t[l][0]())}),c};return[n,{setState:c=>{let l=r(),u=typeof c=="function"?c(l):c;U(()=>{Object.entries(u).forEach(([m,g])=>{Object.hasOwn(t,m)&&t[m][1](g)})})},reset:()=>{U(()=>{Object.keys(e).forEach(c=>{let l=t[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return Q(()=>{let u=r();if(l){l=!1;return}Ae();try{c(u)}finally{_e()}})},subscribeKey:(c,l)=>{let u,m=!0;return Q(()=>{let g=t[c][0]();if(m){u=g,m=!1;return}if(!Object.is(g,u)){let f=u;u=g,Ae();try{l(g,f)}finally{_e()}}})},getSnapshot:r}]}function yl(e,t){if(M(typeof e=="function","watch: first argument must be a getter function."),M(typeof t=="function","watch: second argument must be a callback function."),oe())return()=>{};let n,r=!0;return X(()=>{let s=e();if(r){n=s,r=!1;return}if(!Object.is(s,n)){let a=n;n=s,Ae();try{t(s,a)}finally{_e()}}})}function Sl(e,t,n){return[yn(e,n),i=>{U(()=>t(i))}]}function vl(e){let t=e();return se()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[SibuJS strict] second run threw:",n)}}),t}function xl(e){if(!se())return Q(e);let t=Q(e),n=null;return queueMicrotask(()=>{try{n=Q(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function bo(e,t){return oe()?()=>{}:P(e,t)}var Sn="data-sibu-enhanced",vn=new WeakMap;function ho(e,t){let n=0;for(;e.length>0;){let r=e.splice(0);for(let o=0;o<r.length;o++){if(n>=le){let i=r.length-o+e.length;e.length=0,be(t,n,i);return}n++;try{r[o]()}catch(i){typeof console<"u"&&console.error(`[SibuJS ${t}] teardown error:`,i)}}}}var yo=["text","attr","class","show","on","cleanup"];function So(e,t){if(t==null)return e;if(typeof t!="string")return t;let n=t.startsWith("@")?`[data-ref="${t.slice(1)}"]`:t;try{return e.querySelector(n)}catch{return null}}function et(e,t){return bo(t,e)}function El(e){if(e instanceof HTMLInputElement){if(e.type==="checkbox")return e.checked;if(e.type==="number"||e.type==="range")return e.value===""?null:Number(e.value)}return e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions,t=>t.value):e.value}function Tl(e,t){if(e instanceof HTMLInputElement&&e.type==="checkbox"){e.checked=!!t;return}if(e instanceof HTMLSelectElement&&e.multiple){let r=Array.isArray(t)?t.map(String):[];for(let o of Array.from(e.options))o.selected=r.includes(o.value);return}let n=t==null?"":String(t);e.value!==n&&(e.value=n)}function wl(e,t,n,r){let o=`ctx.each[${r}]`;if(se())for(let i of Object.keys(n))M(yo.includes(i),`${o}: unknown binding "${i}". Expected one of: ${yo.join(", ")}.`);if(n.text!==void 0&&(M(typeof n.text=="function",`${o}: "text" must be a function returning the value.`),e.text(t,n.text)),n.attr!==void 0)for(let i of Object.keys(n.attr)){let s=n.attr[i];M(typeof s=="function",`${o}: attr["${i}"] must be a function returning the value.`),e.attr(t,i,s)}if(n.class!==void 0)for(let i of Object.keys(n.class)){let s=n.class[i];M(typeof s=="function",`${o}: class["${i}"] must be a function returning a boolean.`),e.classed(t,i,s)}if(n.show!==void 0&&(M(typeof n.show=="function",`${o}: "show" must be a function returning a boolean.`),e.show(t,n.show)),n.on!==void 0)for(let i of Object.keys(n.on)){let s=n.on[i];M(typeof s=="function",`${o}: on["${String(i)}"] must be a function.`),e.on(t,i,s)}n.cleanup!==void 0&&(M(typeof n.cleanup=="function",`${o}: "cleanup" must be a function.`),e.cleanup(n.cleanup))}function wt(e,t){let n=typeof e=="string"?typeof document<"u"?document.querySelector(e):null:e;if(!n)return typeof console<"u"&&console.warn(`[SibuJS enhance] no element matched ${JSON.stringify(e)} \u2014 nothing enhanced.`),()=>{};if(n.getAttribute(Sn)==="true")return se()&&typeof console<"u"&&console.warn("[SibuJS enhance] element is already enhanced; ignoring re-enhance.",n),()=>{};let r=[],o=Symbol("sibujs.enhance"),i=!1,s=!1,a=g=>s?(j(()=>`enhance: ctx.${g}() was called after this enhancement was rolled back or disposed, so it was ignored. The setup is still running past the point where its transaction ended \u2014 usually an async setup continuing after an await, or a callback it queued before it threw. Registrations made now would belong to nothing: the root carries no enhancement marker and the disposer has already run, so nothing could ever release them.`),!0):!1,c=(g,f,p)=>{if(a(g))return;let b=So(n,f);if(!b){typeof console<"u"&&console.warn(`[SibuJS enhance] target ${JSON.stringify(f)} not found under`,n);return}p(b)},l={root:n,ref:g=>So(n,g),refs:g=>{let f=g.startsWith("@")?`[data-ref="${g.slice(1)}"]`:g;try{return Array.from(n.querySelectorAll(f))}catch{return[]}},on:(g,f,p,b)=>{c("on",g,h=>{let y=A=>p(A,h);h.addEventListener(f,y,b),r.push(()=>h.removeEventListener(f,y,b))})},text:(g,f)=>{c("text",g,p=>{r.push(et(p,()=>{let b=f(),h=b==null?"":String(b);p.textContent!==h&&(p.textContent=h)}))})},attr:(g,f,p)=>{c("attr",g,b=>{r.push(et(b,()=>{let h=p(),y=h==null?null:String(h);ee(b,f,y,{syncValueProperty:!1,label:"enhance attr()",reactive:!0})}))})},classed:(g,f,p)=>{c("classed",g,b=>{r.push(et(b,()=>{b.classList.toggle(f,!!p())}))})},show:(g,f)=>{c("show",g,p=>{let b=p.hidden;r.push(et(p,()=>{p.hidden=!f()})),r.push(()=>{p.hidden=b})})},model:(g,f,p)=>{c("model",g,b=>{let h=b,[y,A]=f,S=p?.event??(h instanceof HTMLSelectElement||h instanceof HTMLInputElement&&(h.type==="checkbox"||h.type==="radio")?"change":"input");r.push(et(b,()=>{Tl(h,y())}));let E=()=>A(El(h));h.addEventListener(S,E),r.push(()=>h.removeEventListener(S,E))})},each:(g,f)=>{if(a("each"))return;M(typeof f=="function","ctx.each: second argument must be a function.");let p=typeof g=="string"?l.refs(g):Array.from(g);for(let b=0;b<p.length;b++){let h=p[b],y=f(h,b);y!=null&&wl(l,h,y,b)}},cleanup:g=>{a("cleanup")||r.push(g)}},u;try{u=t(l);let g=u;if(g&&typeof g.then=="function")throw g.then(void 0,f=>{j(()=>`enhance: the promise returned by the setup also rejected: ${String(f)}`)}),new Error("[SibuJS enhance] the setup returned a promise, so its work did not complete inside the enhancement transaction. If it is a lazy import, register it as lazyIsland(() => import(\u2026)): an unwrapped loader is called as a setup, so its module is fetched but the setup it resolves to is discarded. If it is an async setup, make it synchronous \u2014 this enhancement has been rolled back, and ctx registrations made after this point are ignored.")}catch(g){throw ho(r,"enhance"),s=!0,g}typeof u=="function"&&r.push(u);let m=()=>{i||(i=!0,vn.get(n)===o&&(vn.delete(n),n.removeAttribute(Sn)),Ke(n,m),ho(r,"enhance"),s=!0)};return x(n,m),vn.set(n,o),n.setAttribute(Sn,"true"),m}function kl(e,t){if(typeof document>"u")return()=>{};let n=[];try{for(let r of Array.from(document.querySelectorAll(e)))n.push(wt(r,t))}catch(r){for(let o=n.length-1;o>=0;o--)try{n[o]()}catch(i){typeof console<"u"&&console.error("[SibuJS enhanceAll] rollback error:",i)}throw n.length=0,r}return()=>{for(let r of n.splice(0))r()}}var Al=/^[A-Za-z0-9_-]+$/,vo=Symbol.for("sibujs.islands.lazy"),kt=Qe(Symbol.for("sibujs.islands.registry.v1"),()=>new Map);function _l(e){return e[vo]=!0,e}function Cl(e,t){if(!Al.test(e))throw new Error(`[SibuJS islands] name must match [A-Za-z0-9_-]+ (got: ${JSON.stringify(e.slice(0,32))})`);kt.set(e,t)}function Nl(e){kt.delete(e)}async function Rl(e){if(typeof e=="function"&&e[vo]){let t=await e(),n=t.default??t;return typeof n=="function"?n:null}return e}function Ll(e=typeof document<"u"?document:null,t={}){if(!e||typeof e.querySelectorAll!="function")return()=>{};let n=[],r=[],o=!1;for(let i of Array.from(e.querySelectorAll("[data-sibu-island]"))){if(i.getAttribute("data-sibu-enhanced")==="true")continue;let s=i.getAttribute("data-sibu-island")??"";if(!kt.has(s)){typeof console<"u"&&console.warn(`[SibuJS islands] no island registered for "${s}" \u2014 skipping. Call registerIsland("${s}", ...).`);continue}let a=!1,c=()=>{if(a||o)return;a=!0;let u=kt.get(s);u&&Rl(u).then(m=>{if(!o){if(!m){typeof console<"u"&&console.warn(`[SibuJS islands] "${s}" loader produced no setup.`);return}try{let g=wt(i,m);if(o){g();return}r.push(g),i.setAttribute("data-sibu-hydrated","true")}catch(g){typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to mount:`,g)}}}).catch(m=>{typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to load:`,m)})},l=i.getAttribute("data-sibu-load")||"load";n.push(Ml(l,i,c,t))}return()=>{o=!0;for(let i of n.splice(0))i();for(let i of r.splice(0))i()}}function Ml(e,t,n,r){switch(e){case"idle":{if(typeof requestIdleCallback<"u"){let i=requestIdleCallback(n);return()=>cancelIdleCallback(i)}let o=setTimeout(n,1);return()=>clearTimeout(o)}case"visible":{if(typeof IntersectionObserver>"u")return queueMicrotask(n),()=>{};let o=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting&&(o.disconnect(),n())},{rootMargin:r.rootMargin,threshold:r.threshold});return o.observe(t),()=>o.disconnect()}case"interaction":{let o=["pointerdown","focusin","keydown","touchstart"],i=()=>{s(),n()},s=()=>{for(let a of o)t.removeEventListener(a,i)};for(let a of o)t.addEventListener(a,i,{passive:!0});return s}case"media":{let o=t.getAttribute("data-sibu-media")||"(min-width: 0px)";if(typeof matchMedia>"u")return queueMicrotask(n),()=>{};let i=matchMedia(o);if(i.matches)return queueMicrotask(n),()=>{};let s=()=>{i.matches&&(i.removeEventListener("change",s),n())};return i.addEventListener("change",s),()=>i.removeEventListener("change",s)}default:return queueMicrotask(n),()=>{}}}function xo(e){return e}var Ep=1024*1024;function Ol(e){let[t,n]=C(e()),r=!1,o=!1,i=t(),s=()=>{r=!1,!o&&n(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=X(()=>{i=e(),a()}),l=(()=>t());return l.dispose=()=>{o||(o=!0,c())},l}var Eo=16;function Dl(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:Eo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,Eo)}function Hl(){let[e,t]=C(!1),n=0;function r(o){n++,t(!0);let i=!1,s=()=>{i||(i=!0,n--,n===0&&t(!1))},a=c=>{s(),k(c,{phase:"async",name:"transition"})};Dl(()=>{try{let c=xt(o());c?c.then(s,a):s()}catch(c){a(c)}})}return{pending:e,start:r}}function Il(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}typeof globalThis<"u"&&(globalThis.Sibu={...xn});})();
399
+ `,Xr=!1;function Yc(){!Xr&&typeof document<"u"&&(document.head.appendChild(Re({nodes:Jc})),Xr=!0)}function Xc(e={}){Yc();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?A({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":t?void 0:"Loading"},[A({class:"sibu-loading-dots"},[P({class:"sibu-loading-dot"}),P({class:"sibu-loading-dot"}),P({class:"sibu-loading-dot"})]),t?P({class:"sibu-loading-text"},t):null]):A({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":t?void 0:"Loading"},[A({class:"sibu-loading-spinner"}),t?P({class:"sibu-loading-text"},t):null])}var bn=Symbol.for("sibujs.actions.v1"),Qr=globalThis[bn]??(globalThis[bn]=new Map);function Ue(e,t){Qr.set(e,t)}function eo(e){return Qr.get(e)}function Zc(e,t,n){let r=typeof t=="string"?eo(t):t;if(!r)throw new Error(`[SibuJS] No action registered under the name "${t}". Register it with registerAction() before applying it by name.`);let o=r(e,n);typeof o=="function"&&x(e,o)}var to=(e,t)=>{let n=e.ownerDocument,r=o=>{let i=o.target;typeof i?.nodeType=="number"&&e.contains(i)||t()};return n.addEventListener("pointerdown",r,!0),()=>n.removeEventListener("pointerdown",r,!0)},Zr=["pointerup","pointerleave","pointercancel"],no=(e,t)=>{let n=t.duration??500,r=null,o,i=()=>{r!==null&&(clearTimeout(r),r=null)},s=c=>{let u=c.pointerId;r!==null&&u!==o||(i(),o=u,r=setTimeout(()=>{r=null,t.callback()},n))},a=c=>{r!==null&&c.pointerId===o&&i()};e.addEventListener("pointerdown",s);for(let c of Zr)e.addEventListener(c,a);return()=>{i(),e.removeEventListener("pointerdown",s);for(let c of Zr)e.removeEventListener(c,a)}},ro=(e,t)=>{let n=o=>_(o,{phase:"async",name:"copyOnClick",node:e}),r=()=>{try{let o=typeof t=="function"?t():e.textContent??"";Promise.resolve(navigator.clipboard.writeText(o)).catch(n)}catch(o){n(o)}};return e.addEventListener("click",r),()=>e.removeEventListener("click",r)},oo=e=>{let t=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return t(),e.addEventListener("input",t),()=>e.removeEventListener("input",t)},io=e=>{let t='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',n=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(t));if(o.length===0)return;let i=o[0],s=o[o.length-1],a=e.ownerDocument.activeElement;r.shiftKey&&a===i?(r.preventDefault(),s.focus()):!r.shiftKey&&a===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)};Ue("clickOutside",to);Ue("longPress",no);Ue("copyOnClick",ro);Ue("autoResize",oo);Ue("trapFocus",io);function Tt(e){if(e===null||typeof e!="object"&&typeof e!="function")return null;let t;try{t=e.then}catch(n){return Promise.reject(n)}return typeof t!="function"?null:new Promise((n,r)=>{queueMicrotask(()=>{try{Reflect.apply(t,e,[n,r])}catch(o){r(o)}})})}var He=null;function Qc(e,t){try{let n=e(),r=Tt(n);return r&&r.then(void 0,o=>{t?t(o,"async"):He?He(o,"async"):console.error("Unhandled async error in Sibu.catchError:",o)}),n}catch(n){return t?t(n,"sync"):He?He(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function eu(e,t){try{return await e()}catch(n){return t?t(n,"async"):He?He(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function tu(e){He=e}function nu(e){let[t,n]=C(e),r=i=>{!!0||!re()||O(`context.${i}() called during SSR. SibuJS context() is application-global \u2014 it is NOT isolated per request, so a concurrent request can observe this value. Do not use context() for request-specific SSR data; pass it explicitly or use request-scoped storage instead.`)};return{provide(i){r("provide");let s=t();return n(i),()=>n(s)},use(){return t},get(){return t()},set(i){r("set"),n(i)},withContext(i,s){r("withContext");let a=t();n(i);try{let c=s();return c!==null&&typeof c?.then=="function"&&O("context.withContext() received an async callback. Scoping is synchronous only \u2014 the previous value is restored as soon as the callback returns its promise, so anything after an `await` runs outside the scope."),c}finally{n(a)}}}}var hn=Symbol.for("sibujs.createId.v1"),yn=globalThis[hn]??(globalThis[hn]={n:0});function so(e="sibu"){let t=Hr();return t?(t.idCounter=(t.idCounter??0)+1,`${e}-${t.idCounter}`):(yn.n++,`${e}-${yn.n}`)}function ao(){yn.n=0}function ru(e,t){let n=typeof t=="function"?t():t;return x(n,$(()=>{n.style.display=e()?"":"none"},n)),n}function co(e){return typeof e=="object"&&e!==null&&!(e instanceof Node)}function uo(e,t,n,r,o){let i=typeof n=="function"?n():n;if(i==null||typeof i=="boolean")return{node:null,owned:!1};let s=i instanceof Node?i:document.createTextNode(String(i)),a=s===n,c=r.has(s),u=!a&&!c;return r.add(s),c&&j(()=>`${o}: ${a?"a branch was given as an element rather than a function":"a branch factory returned a node it had already returned"}, so the SAME node is being re-attached \u2014 any state it accumulated while detached (input value, scroll position, classes set imperatively) comes back with it. Its reactive bindings are left intact rather than disposed, because the node is not this directive's to tear down. Return a FRESH node per call (\`() => div(\u2026)\`) for rebuild semantics, or keep this form deliberately when the reuse is what you want.`),e.insertBefore(s,t.nextSibling),{node:s,owned:u}}function wt(e,t){t&&D(e),e.parentNode?.removeChild(e)}function ou(e,t,n,r){U(),co(n)&&(r=n,n=void 0);let o=n,i=r?.focus,s=document.createComment("when"),a=null,c,u=!1,l=!1,p=new WeakSet,g=!1,m=()=>{if(l)return;let b=e(),h=s.parentNode;if(!h||u&&Object.is(b,c))return;c=b;let S=a?Ze([a]):null;a?.parentNode&&(wt(a,g),a=null);let w=b?t:o!==void 0?o:null,y=ne(()=>uo(h,s,w,p,"when"));a=y.node,g=y.owned,We(S,a?[a]:[],"when",i),u=!0},f=Ne(m,s);return x(s,()=>{l=!0,f.stop(),a&&wt(a,g),a=null}),u||queueMicrotask(V(()=>{!l&&!u&&s.parentNode&&f.run(m)})),s}function iu(e,t,n,r){U(),co(n)&&(r=n,n=void 0);let o=n,i=r?.focus,s=document.createComment("match"),a=null,c,u=!1,l=!1,p=new WeakSet,g=!1,m=()=>{if(l)return;let b=String(e()),h=s.parentNode;if(!h||u&&b===c)return;c=b;let S=a?Ze([a]):null;a?.parentNode&&(wt(a,g),a=null);let w=Object.hasOwn(t,b)?t[b]:o,y=ne(()=>uo(h,s,w??null,p,"match"));a=y.node,g=y.owned,We(S,a?[a]:[],"match",i),u=!0},f=Ne(m,s);return x(s,()=>{l=!0,f.stop(),a&&wt(a,g),a=null}),u||queueMicrotask(V(()=>{!l&&!u&&s.parentNode&&f.run(m)})),s}function tt(e,t){let n=globalThis;return n[e]??(n[e]=t())}var kt=tt(Symbol.for("sibujs.components.registry.v1"),()=>new Map),lo=tt(Symbol.for("sibujs.components.registryVersion.v1"),()=>C(0));function fo(){let[e,t]=lo;t(ne(e)+1)}function su(e,t){kt.set(e,t),fo()}function au(e){kt.delete(e)&&fo()}function cu(e){let t=kt.get(e);return t?t():A(`[Component "${e}" not found]`)}function uu(e){let t=A({class:"sibu-dynamic"}),r={};function o(){let s=e(),a;typeof s=="function"?a=s:(lo[0](),a=kt.get(s));let c=a??`missing:${s}`;if(c===r)return;let u=ne(()=>a?a():A(`[Component "${s}" not found]`));r=c,q(t,u)}let i=$(o,t,!0);return x(t,i),t}function po(e){return typeof e=="function"?po(e()):e instanceof Node?e:document.createTextNode(String(e))}function lu(e,t){if(t===0)return[];let n=[],r=new Array(t);for(let a=0;a<t;a++){let c=e[a],u=0,l=n.length;for(;u<l;){let p=u+l>>1;e[n[p]]<c?u=p+1:l=p}n[u]=a,r[a]=u>0?n[u-1]:-1}let o=n.length,i=new Array(o),s=n[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function du(e,t,n){M(typeof e=="function","each: first argument must be a function that returns an array."),M(typeof t=="function","each: second argument must be a render function."),M(n&&typeof n.key=="function","each: options.key must be a function that returns a unique key per item."),U();let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,u=new Map,l=new Map,p=[],g=[],m=[],f=0,b=[],h=[],S=new Uint8Array(0),w=new Map,y=[],E=[],k=new Map,I=!1,B=!1,Ie=!1,Ro=n.key,wn=()=>{if(Ie)return;let oe=e(),N=oe.length,xe=r.parentNode;if(!xe)return;B||(xe.insertBefore(o,r.nextSibling),B=!0),h.length<N&&(h=new Array(N));for(let v=0;v<N;v++)h[v]=Ro(oe[v]);let me=h;b.length<N&&(b=new Array(N)),l.clear(),k.clear();for(let v=0;v<N;v++)k.has(me[v])&&O(`each: duplicate key "${String(me[v])}" at index ${v} (first seen at ${k.get(me[v])}). Keys must be unique \u2014 duplicates cause rows to be dropped or mis-ordered.`),k.set(me[v],v);f=0;for(let v=0;v<N;v++){let z=me[v],An=u.get(z),Ge;if(An!==void 0)Ge=An,p[f]=Ge,g[f]=oe[v],m[f]=v,f++;else{let[Cn,Do]=C(oe[v]),[Nn,Ho]=C(v),Ct;try{ke();try{Ct=po(t(Cn,Nn))}finally{_e()}}catch(Io){let Po=me[v];Ct=document.createComment(`each:error:${v}`),queueMicrotask(()=>{_(Io,{phase:"render",name:`each row (key="${String(Po)}")`,node:r.parentNode?r:void 0})})}Ge={node:Ct,item:Cn,setItem:Do,index:Nn,setIndex:Ho}}l.set(z,Ge),b[v]=Ge.node}for(let[v,z]of u)l.has(v)||(D(z.node),z.node.parentNode&&xe.removeChild(z.node));if(N===0){c=0;let v=u;u=l,l=v,I=!0,f=0;return}w.clear();for(let v=0;v<c;v++)w.set(a[v],v);y.length<N&&(y=new Array(N),E=new Array(N));let rt=0;for(let v=0;v<N;v++){let z=w.get(me[v]);z!==void 0&&(y[rt]=v,E[rt]=z,rt++)}let _n=lu(E,rt);S.length<N?S=new Uint8Array(N):S.fill(0,0,N);for(let v=0;v<_n.length;v++)S[y[_n[v]]]=1;let ot=o;for(let v=N-1;v>=0;v--){let z=b[v];S[v]||z.nextSibling!==ot&&xe.insertBefore(z,ot),ot=z}let it=a===i?s:i;it.length<N&&(it.length=N);for(let v=0;v<N;v++)it[v]=me[v];a=it,c=N;let Oo=u;u=l,l=Oo,I=!0,Lo()};function Lo(){if(f===0)return;let oe=f;f=0,K(()=>{for(let N=0;N<oe;N++){let xe=p[N];xe.setItem(g[N]),xe.setIndex(m[N]),p[N]=void 0,g[N]=void 0}})}let kn=Ne(wn),Mo=kn.stop;return x(r,()=>{if(!Ie){Ie=!0,Mo();for(let oe of u.values())D(oe.node),oe.node.parentNode?.removeChild(oe.node);o.parentNode&&o.parentNode.removeChild(o),B=!1,u.clear(),l.clear(),k.clear(),w.clear(),c=0,p.length=0,g.length=0,m.length=0,f=0}}),I||queueMicrotask(V(()=>{!I&&!Ie&&r.parentNode&&kn.run(wn)})),r}function fu(e){U();let t=document.createDocumentFragment();for(let n of e)if(!(n==null||typeof n=="boolean"))if(Array.isArray(n))for(let r of n)r==null||typeof r=="boolean"||mo(t,r);else mo(t,n);return t}function mo(e,t){if(t instanceof Node){e.appendChild(t);return}if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),x(n,de(n,t));return}e.appendChild(document.createTextNode(String(t)))}var pu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),go=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),bo=new WeakMap;function mu(e){let t=e.length-1,n=e[0];for(let m=0;m<t;m++)n+=`\0${m}\0${e[m+1]}`;let r=0,o=n.length;function i(){for(;r<o&&(n[r]===" "||n[r]===" "||n[r]===`
400
+ `||n[r]==="\r");)r++}function s(){if(n.charCodeAt(r)!==0)return-1;let m=r;r++;let f=0;for(;r<o&&n.charCodeAt(r)!==0;)f=f*10+(n.charCodeAt(r)-48),r++;return r<o&&r++,f<0||f>=t?(r=m,-1):f}function a(){let m=r;for(;r<o;){let f=n.charCodeAt(r);if(f>=97&&f<=122||f>=65&&f<=90||f>=48&&f<=57||f===45)r++;else break}return n.slice(m,r)}function c(){if(i(),n[r]!=="=")return{kind:"bool"};r++,i();let m=s();if(m>=0)return{kind:"expr",idx:m};let f=n[r];if(f==='"'||f==="'"){r++;let b=[],h=[],S="";for(;r<o&&n[r]!==f;){let w=s();w>=0?(b.push(S),S="",h.push(w)):S+=n[r++]}return r<o&&r++,b.push(S),h.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:h}}{let b=[],h=[],S="";for(;r<o;){let w=n.charCodeAt(r);if(w===32||w===9||w===10||w===13||w===62)break;let y=s();y>=0?(b.push(S),S="",h.push(y)):S+=n[r++]}return b.push(S),h.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:h}}}function u(){let m=[];for(;r<o&&(i(),!(n[r]===">"||n[r]==="/"));){let f=r;for(;r<o;){let S=n.charCodeAt(r);if(S>=97&&S<=122||S>=65&&S<=90||S>=48&&S<=57||S===45||S===58||S===95||S===46)r++;else break}let b=n.slice(f,r);if(!b)break;let h=c();b.startsWith("on:")?h.kind==="expr"&&m.push({t:3,name:b.slice(3),idx:h.idx}):h.kind==="bool"?m.push({t:4,name:b}):h.kind==="static"?m.push({t:0,name:b,value:h.value}):h.kind==="expr"?m.push({t:1,name:b,idx:h.idx}):h.kind==="mixed"&&m.push({t:2,name:b,statics:h.statics,exprs:h.exprs})}return m}function l(m){return m.replace(/\s+/g," ")}function p(m){let f="";for(;r<o&&n[r]!=="<";){let h=s();if(h>=0){let S=l(f);S&&m.push({t:1,value:S}),f="",m.push({t:2,idx:h})}else f+=n[r++]}let b=l(f);b&&m.push({t:1,value:b})}function g(){let m=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){let f=n[r+1];if(f==="!"){if(n.startsWith("<!--",r)){let y=n.indexOf("-->",r+4);r=y===-1?o:y+3}else if(n.startsWith("<![CDATA[",r)){let y=n.indexOf("]]>",r+9);r=y===-1?o:y+3}else{let y=n.indexOf(">",r);r=y===-1?o:y+1}continue}if(f==="?"){let y=n.indexOf(">",r);r=y===-1?o:y+1;continue}if(!(f>="a"&&f<="z")&&!(f>="A"&&f<="Z")){m.push({t:1,value:"<"}),r++;continue}r++;let b=a(),h=u();i();let S=pu.has(b),w=n[r]==="/";if(w&&r++,r<o&&r++,S||w)m.push({t:0,el:{tag:b,svg:go.has(b),attrs:h,children:[]}});else{let y=g();if(Gn(b)){for(let E=0;E<y.length;E++)if(y[E].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${b}> (raw-text context). Build the content separately and append it as a Node.`)}n[r]==="<"&&r+1<o&&n[r+1]==="/"&&(r+=2,a(),i(),r<o&&n[r]===">"&&r++),m.push({t:0,el:{tag:b,svg:go.has(b),attrs:h,children:y}})}}else p(m);return m}return g()}function Sn(e,t){let n=e.svg?document.createElementNS(R,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:zt(n,o.name,o.value);break;case 1:{let i=o.name,s=t[o.idx];typeof s=="function"?x(n,Xe(n,i,s)):ee(n,i,s,{syncValueProperty:!1,label:"html"});break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++){let a=t[o.exprs[s]];i+=(a==null?"":String(a))+o.statics[s+1]}ee(n,o.name,i,{syncValueProperty:!1,label:"html"});break}case 3:{let i=t[o.idx];typeof i=="function"?n.addEventListener(o.name,i):O(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:zt(n,o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(Sn(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(typeof i=="function"){let s=document.createComment("");n.appendChild(s),x(n,de(s,i))}else if(i instanceof Node)n.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n}function ho(e,...t){let n=bo.get(e);return n||(n=mu(e),bo.set(e,n)),So(n,t)}function yo(e,t){return So(e,t)}function So(e,t){if(U(),e.length===1&&e[0].t===0)return Sn(e[0].el,t);let n=document.createElement("div");for(let r=0;r<e.length;r++){let o=e[r];switch(o.t){case 0:n.appendChild(Sn(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(i instanceof Node)n.appendChild(i);else if(typeof i=="function"){let s=document.createComment("bind:htm");n.appendChild(s),x(n,de(s,i))}else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n.childNodes.length===1&&n.firstChild instanceof Element?n.firstChild:n}function gu(e,t,n){U();let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??10;s===0&&ie()&&O("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,u=!1,l=!1,p=()=>{if(l)return;let f=e(),b=r.parentNode;if(!b||u&&f===a)return;c?.parentNode&&b.removeChild(c),a=f;let h=o.get(f);if(h){let S=i.indexOf(f);S!==-1&&(i.splice(S,1),i.push(f))}else{let S=t[f];if(!S){c=null,u=!0;return}if(h=S(),h.nodeType===11){let w=document.createElement("div");w.style.display="contents",w.appendChild(h),h=w}if(o.set(f,h),i.push(f),s>0&&i.length>s){let w=i.shift(),y=o.get(w);y&&(D(y),y.parentNode&&y.parentNode.removeChild(y),o.delete(w))}}b.insertBefore(h,r.nextSibling),c=h,u=!0},g=Ne(p),m=g.stop;return u||queueMicrotask(V(()=>{!u&&r.parentNode&&g.run(p)})),x(r,()=>{l=!0,m();for(let f of o.values())D(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function bu(e,t){if(!t)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");M(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let n=()=>typeof performance<"u"?performance.now():0,r=n(),o=null,i=l=>{if(l instanceof DocumentFragment){let p=document.createComment(""),g=document.createComment("");l.insertBefore(p,l.firstChild),l.appendChild(g),o={start:p,end:g}}t.appendChild(l)},s;typeof e=="function"?s=In(()=>{let l=e();return i(l),l}):(s=e,i(s));let a=n()-r,c=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&Z(c,"app:init",{rootElement:s,container:t,duration:a});let u=o;return{node:s,unmount(){if(c&&Z(c,"app:unmount",{rootElement:s}),u){hu(u.start,u.end);return}D(s),s.parentNode?.removeChild(s)}}}function hu(e,t){let n=e.parentNode;if(!n&&!t.parentNode)return;let r=ce;for(let a=e.nextSibling;a&&a!==t;a=a.nextSibling)r++;let o=e,i=null,s=!0;for(;;){e.parentNode!==n||t.parentNode!==n?s=!1:(e.previousSibling!==o||t.nextSibling!==i)&&(o=e.previousSibling,i=t.nextSibling,s=!!(e.compareDocumentPosition(t)&4));let a=e.nextSibling;if(!s||a===t)break;if(r--<=0){ge("mount",ce,1);return}D(a),a.parentNode===n&&n.removeChild(a)}s||_(new Error("[SibuJS mount] fragment markers lost"),{phase:"cleanup",name:"mount"}),e.parentNode?.removeChild(e),t.parentNode?.removeChild(t)}function yu(e,t){U();let n=document.createComment("portal"),r=t||document.body,o=null,i=!1,s=V(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(a){queueMicrotask(()=>{_(a,{phase:"render",name:"Portal",node:n.parentNode?n:void 0})})}});return queueMicrotask(s),x(n,()=>{i=!0,o&&(D(o),o.remove(),o=null)}),n}function Su(e,t="default"){if(e==null||!Object.hasOwn(e,t))return;let n=e[t];return typeof n=="function"?n:void 0}function vo(e,t,n){return n.length===0?e.splice(t):e.splice(t,...n)}function vu(e=[]){let[t,n]=C([...e]);return[t,{push(...o){n(i=>[...i,...o])},pop(){let o;return n(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return n(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){n(i=>[...o,...i])},splice(o,...i){let s=[];return n(a=>{let c=[...a];return s=vo(c,o,i),s.length===0&&i.length<=1?a:c}),s},remove(o){n(i=>i.filter((s,a)=>a!==o))},removeWhere(o){n(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){n([...o])},update(o,i){n(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){n(s=>s.map(a=>o(a)?i(a):a))},sort(o){n(i=>[...i].sort(o))},reverse(){n(o=>[...o].reverse())},filter(o){n(i=>i.filter(o))},map(o){n(i=>i.map(o))},clear(){n([])}}]}function xu(e=[]){let t=[...e],n=null,r={__v:0};function o(){n=null,r.__v++,De(r)||ze(r)}function i(){if(Ae(r),n===null){let a=t.slice();n=Object.freeze(a)}return n}return[i,{push(...a){a.length!==0&&(t.push(...a),o())},pop(){if(t.length===0)return;let a=t.pop();return o(),a},shift(){if(t.length===0)return;let a=t.shift();return o(),a},unshift(...a){a.length!==0&&(t.unshift(...a),o())},splice(a,...c){let u=vo(t,a,c);return(u.length>0||c.length>1)&&o(),u},remove(a){a<0||a>=t.length||(t.splice(a,1),o())},removeWhere(a){let c=t.findIndex(a);c!==-1&&(t.splice(c,1),o())},set(a){t=[...a],o()},update(a,c){a<0||a>=t.length||Object.is(t[a],c)||(t[a]=c,o())},updateWhere(a,c){let u=!1;for(let l=0;l<t.length;l++)if(a(t[l])){let p=c(t[l]);Object.is(t[l],p)||(t[l]=p,u=!0)}u&&o()},sort(a){t.length<=1||(t.sort(a),o())},reverse(){t.length<=1||(t.reverse(),o())},filter(a){let c=t.filter(a);c.length!==t.length&&(t=c,o())},map(a){let c=!1;for(let u=0;u<t.length;u++){let l=a(t[u],u);Object.is(t[u],l)||(t[u]=l,c=!0)}c&&o()},clear(){t.length!==0&&(t=[],o())}}]}function Eu(e,t){let[n,r]=C(t),[o,i]=C(!1),[s,a]=C(null),[c,u]=C(0),l=0,p=!1,g=null,m=()=>{if(g===null)return;let b=g;g=null;try{b.abort()}catch{}},f=Q(()=>{if(c(),p)return;m();let b=++l,h=typeof AbortController<"u"?new AbortController:null;g=h,K(()=>{i(!0),a(null)});let S=()=>p||b!==l,w;try{w=e({signal:h?h.signal:void 0})}catch(y){if(S())return;K(()=>{a(y),i(!1)});return}w.then(y=>{S()||(g=null,K(()=>{r(y),i(!1)}))},y=>{S()||(g=null,K(()=>{a(y),i(!1)}))})});return{value:n,loading:o,error:s,refresh:()=>{p||u(b=>b+1)},dispose:()=>{p||(p=!0,f(),m())}}}function Ke(e,t,n){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!1;let r=e,o=t;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp){let a=t;return e.source===a.source&&e.flags===a.flags}n||(n=new Map);let i=n.get(r);if(i?.has(o))return!0;if(i||(i=new Set,n.set(r,i)),i.add(o),e instanceof Map){let a=t;if(e.size!==a.size)return!1;for(let[c,u]of e)if(!a.has(c)||!Ke(u,a.get(c),n))return!1;return!0}if(e instanceof Set){let a=t;if(e.size!==a.size)return!1;for(let c of e)if(!a.has(c))return!1;return!0}if(e instanceof ArrayBuffer){let a=new Uint8Array(e),c=new Uint8Array(t);if(a.length!==c.length)return!1;for(let u=0;u<a.length;u++)if(a[u]!==c[u])return!1;return!0}if(e instanceof DataView){if(!(t instanceof DataView)||e.byteLength!==t.byteLength)return!1;for(let a=0;a<e.byteLength;a++)if(e.getUint8(a)!==t.getUint8(a))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){let a=e,c=t;if(a.length!==c.length)return!1;for(let u=0;u<a.length;u++)if(a[u]!==c[u])return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((a,c)=>Ke(a,t[c],n));if(e instanceof Number||e instanceof String||e instanceof Boolean)return Object.is(e.valueOf(),t.valueOf());if(typeof URL<"u"&&e instanceof URL)return e.href===t.href;if(e instanceof Error){let a=t;return e.name===a.name&&e.message===a.message&&Ke(e.cause,a.cause,n)&&xo(r,o,n)}let s=Object.getPrototypeOf(r);return s!==Object.prototype&&s!==null?!1:xo(r,o,n)}function xo(e,t,n){let r=Object.keys(e),o=Object.keys(t);return r.length!==o.length?!1:r.every(i=>Object.hasOwn(t,i)&&Ke(e[i],t[i],n))}function Tu(e){return C(e,{equals:(t,n)=>Ke(t,n)})}function vn(e,t){M(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r=t?.equals,o={};o._d=!1,o._init=!1,o._f=!1,o._g=e,o.__v=0;let i=!1,s=!1,a,c=()=>{o._d||s||(o._d=!0)};c._c=1,c._sig=o;let u=()=>{let f=e();o._v=r&&o._init&&r(o._v,f)?o._v:f,o._d=!1,o._init=!0};try{Fe(()=>{o._v=e(),o._d=!1,o._init=!0},c)}catch(f){throw s=!0,Ce(c),f}let l=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,p=()=>{if(!o._d||s||a!==void 0)return;let f=o._v;i=!0;try{Se(u,c),Object.is(f,o._v)||o.__v++}catch(b){a={error:b},o.__v++,s?o._d=!0:o._f=!0}finally{i=!1,s&&Ce(c)}l&&!s&&!Object.is(f,o._v)&&Z(l,"computed:update",{signal:o,oldValue:f,newValue:o._v})};o._validate=p;let g=()=>{let{error:f}=a;throw a=void 0,s&&(o._d=!1),f};function m(){if(i)throw new Error(`[SibuJS] Circular dependency detected in derived${n?` "${n}"`:""}. A derived signal cannot read itself (directly or through a chain).`);return Sr()||s?(o._d&&(p(),a!==void 0&&g()),o._v):(o._d&&(p(),a!==void 0&&(Ae(o),g())),Ae(o),o._v)}return n&&(m.__name=n,o.__name=n),m.__signal=o,m.dispose=()=>{if(s)return;s=!0,o._d=a!==void 0,Ce(c);let f=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(f)try{f.emit("computed:destroy",{signal:o,getter:m})}catch{}},l&&Z(l,"computed:create",{signal:o,name:n,getter:m}),m}function wu(e){let[t,n]=C(e);return{get current(){return t()},set current(r){n(r)}}}function Eo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ku(e){M(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t=Object.create(null);Object.keys(e).forEach(c=>{let[u,l]=C(e[c]);Eo(t,c,[u,l])});let n=new Proxy({},{get(c,u){if(typeof u=="string"&&Object.hasOwn(t,u)){let l=t[u][0];return l()}return Reflect.get(c,u)},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(t).forEach(u=>{Eo(c,u,t[u][0]())}),c};return[n,{setState:c=>{let u=r(),l=typeof c=="function"?c(u):c;K(()=>{Object.entries(l).forEach(([p,g])=>{Object.hasOwn(t,p)&&t[p][1](g)})})},reset:()=>{K(()=>{Object.keys(e).forEach(c=>{let u=t[c][1];u(e[c])})})},subscribe:c=>{let u=!0;return Q(()=>{let l=r();if(u){u=!1;return}ke();try{c(l)}finally{_e()}})},subscribeKey:(c,u)=>{let l,p=!0;return Q(()=>{let g=t[c][0]();if(p){l=g,p=!1;return}if(!Object.is(g,l)){let m=l;l=g,ke();try{u(g,m)}finally{_e()}}})},getSnapshot:r}]}function _u(e,t){if(M(typeof e=="function","watch: first argument must be a getter function."),M(typeof t=="function","watch: second argument must be a callback function."),re())return()=>{};let n,r=!0;return Fe(()=>{let s=e();if(r){n=s,r=!1;return}if(!Object.is(s,n)){let a=n;n=s,ke();try{t(s,a)}finally{_e()}}})}function Au(e,t,n){return[vn(e,n),i=>{K(()=>t(i))}]}function Cu(e){let t=e();return ie()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[SibuJS strict] second run threw:",n)}}),t}function Nu(e){if(!ie())return Q(e);let t=Q(e),n=null;return queueMicrotask(()=>{try{n=Q(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function To(e,t){return re()?()=>{}:$(e,t)}var xn="data-sibu-enhanced",En=new WeakMap;function wo(e,t){let n=0;for(;e.length>0;){let r=e.splice(0);for(let o=0;o<r.length;o++){if(n>=ce){let i=r.length-o+e.length;e.length=0,ge(t,n,i);return}n++;try{r[o]()}catch(i){typeof console<"u"&&console.error(`[SibuJS ${t}] teardown error:`,i)}}}}var ko=["text","attr","class","show","on","cleanup"];function _o(e,t){if(t==null)return e;if(typeof t!="string")return t;let n=t.startsWith("@")?`[data-ref="${t.slice(1)}"]`:t;try{return e.querySelector(n)}catch{return null}}function nt(e,t){return To(t,e)}function Ru(e){if(e instanceof HTMLInputElement){if(e.type==="checkbox")return e.checked;if(e.type==="number"||e.type==="range")return e.value===""?null:Number(e.value)}return e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions,t=>t.value):e.value}function Lu(e,t){if(e instanceof HTMLInputElement&&e.type==="checkbox"){e.checked=!!t;return}if(e instanceof HTMLSelectElement&&e.multiple){let r=Array.isArray(t)?t.map(String):[];for(let o of Array.from(e.options))o.selected=r.includes(o.value);return}let n=t==null?"":String(t);e.value!==n&&(e.value=n)}function Mu(e,t,n,r){let o=`ctx.each[${r}]`;if(ie())for(let i of Object.keys(n))M(ko.includes(i),`${o}: unknown binding "${i}". Expected one of: ${ko.join(", ")}.`);if(n.text!==void 0&&(M(typeof n.text=="function",`${o}: "text" must be a function returning the value.`),e.text(t,n.text)),n.attr!==void 0)for(let i of Object.keys(n.attr)){let s=n.attr[i];M(typeof s=="function",`${o}: attr["${i}"] must be a function returning the value.`),e.attr(t,i,s)}if(n.class!==void 0)for(let i of Object.keys(n.class)){let s=n.class[i];M(typeof s=="function",`${o}: class["${i}"] must be a function returning a boolean.`),e.classed(t,i,s)}if(n.show!==void 0&&(M(typeof n.show=="function",`${o}: "show" must be a function returning a boolean.`),e.show(t,n.show)),n.on!==void 0)for(let i of Object.keys(n.on)){let s=n.on[i];M(typeof s=="function",`${o}: on["${String(i)}"] must be a function.`),e.on(t,i,s)}n.cleanup!==void 0&&(M(typeof n.cleanup=="function",`${o}: "cleanup" must be a function.`),e.cleanup(n.cleanup))}function _t(e,t){let n=typeof e=="string"?typeof document<"u"?document.querySelector(e):null:e;if(!n)return typeof console<"u"&&console.warn(`[SibuJS enhance] no element matched ${JSON.stringify(e)} \u2014 nothing enhanced.`),()=>{};if(n.getAttribute(xn)==="true")return ie()&&typeof console<"u"&&console.warn("[SibuJS enhance] element is already enhanced; ignoring re-enhance.",n),()=>{};let r=[],o=Symbol("sibujs.enhance"),i=!1,s=!1,a=g=>s?(j(()=>`enhance: ctx.${g}() was called after this enhancement was rolled back or disposed, so it was ignored. The setup is still running past the point where its transaction ended \u2014 usually an async setup continuing after an await, or a callback it queued before it threw. Registrations made now would belong to nothing: the root carries no enhancement marker and the disposer has already run, so nothing could ever release them.`),!0):!1,c=(g,m,f)=>{if(a(g))return;let b=_o(n,m);if(!b){typeof console<"u"&&console.warn(`[SibuJS enhance] target ${JSON.stringify(m)} not found under`,n);return}f(b)},u={root:n,ref:g=>_o(n,g),refs:g=>{let m=g.startsWith("@")?`[data-ref="${g.slice(1)}"]`:g;try{return Array.from(n.querySelectorAll(m))}catch{return[]}},on:(g,m,f,b)=>{c("on",g,h=>{let S=w=>f(w,h);h.addEventListener(m,S,b),r.push(()=>h.removeEventListener(m,S,b))})},text:(g,m)=>{c("text",g,f=>{r.push(nt(f,()=>{let b=m(),h=b==null?"":String(b);f.textContent!==h&&(f.textContent=h)}))})},attr:(g,m,f)=>{c("attr",g,b=>{r.push(nt(b,()=>{let h=f(),S=h==null?null:String(h);ee(b,m,S,{syncValueProperty:!1,label:"enhance attr()",reactive:!0})}))})},classed:(g,m,f)=>{c("classed",g,b=>{r.push(nt(b,()=>{b.classList.toggle(m,!!f())}))})},show:(g,m)=>{c("show",g,f=>{let b=f.hidden;r.push(nt(f,()=>{f.hidden=!m()})),r.push(()=>{f.hidden=b})})},model:(g,m,f)=>{c("model",g,b=>{let h=b,[S,w]=m,y=f?.event??(h instanceof HTMLSelectElement||h instanceof HTMLInputElement&&(h.type==="checkbox"||h.type==="radio")?"change":"input");r.push(nt(b,()=>{Lu(h,S())}));let E=()=>w(Ru(h));h.addEventListener(y,E),r.push(()=>h.removeEventListener(y,E))})},each:(g,m)=>{if(a("each"))return;M(typeof m=="function","ctx.each: second argument must be a function.");let f=typeof g=="string"?u.refs(g):Array.from(g);for(let b=0;b<f.length;b++){let h=f[b],S=m(h,b);S!=null&&Mu(u,h,S,b)}},cleanup:g=>{a("cleanup")||r.push(g)}},l;try{l=t(u);let g=l;if(g&&typeof g.then=="function")throw g.then(void 0,m=>{j(()=>`enhance: the promise returned by the setup also rejected: ${String(m)}`)}),new Error("[SibuJS enhance] the setup returned a promise, so its work did not complete inside the enhancement transaction. If it is a lazy import, register it as lazyIsland(() => import(\u2026)): an unwrapped loader is called as a setup, so its module is fetched but the setup it resolves to is discarded. If it is an async setup, make it synchronous \u2014 this enhancement has been rolled back, and ctx registrations made after this point are ignored.")}catch(g){throw wo(r,"enhance"),s=!0,g}typeof l=="function"&&r.push(l);let p=()=>{i||(i=!0,En.get(n)===o&&(En.delete(n),n.removeAttribute(xn)),Je(n,p),wo(r,"enhance"),s=!0)};return x(n,p),En.set(n,o),n.setAttribute(xn,"true"),p}function Ou(e,t){if(typeof document>"u")return()=>{};let n=[];try{for(let r of Array.from(document.querySelectorAll(e)))n.push(_t(r,t))}catch(r){for(let o=n.length-1;o>=0;o--)try{n[o]()}catch(i){typeof console<"u"&&console.error("[SibuJS enhanceAll] rollback error:",i)}throw n.length=0,r}return()=>{for(let r of n.splice(0))r()}}var Du=/^[A-Za-z0-9_-]+$/,Ao=Symbol.for("sibujs.islands.lazy"),At=tt(Symbol.for("sibujs.islands.registry.v1"),()=>new Map);function Hu(e){return e[Ao]=!0,e}function Iu(e,t){if(!Du.test(e))throw new Error(`[SibuJS islands] name must match [A-Za-z0-9_-]+ (got: ${JSON.stringify(e.slice(0,32))})`);At.set(e,t)}function Pu(e){At.delete(e)}async function $u(e){if(typeof e=="function"&&e[Ao]){let t=await e(),n=t.default??t;return typeof n=="function"?n:null}return e}function Bu(e=typeof document<"u"?document:null,t={}){if(!e||typeof e.querySelectorAll!="function")return()=>{};let n=[],r=[],o=!1;for(let i of Array.from(e.querySelectorAll("[data-sibu-island]"))){if(i.getAttribute("data-sibu-enhanced")==="true")continue;let s=i.getAttribute("data-sibu-island")??"";if(!At.has(s)){typeof console<"u"&&console.warn(`[SibuJS islands] no island registered for "${s}" \u2014 skipping. Call registerIsland("${s}", ...).`);continue}let a=!1,c=()=>{if(a||o)return;a=!0;let l=At.get(s);l&&$u(l).then(p=>{if(!o){if(!p){typeof console<"u"&&console.warn(`[SibuJS islands] "${s}" loader produced no setup.`);return}try{let g=_t(i,p);if(o){g();return}r.push(g),i.setAttribute("data-sibu-hydrated","true")}catch(g){typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to mount:`,g)}}}).catch(p=>{typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to load:`,p)})},u=i.getAttribute("data-sibu-load")||"load";n.push(Fu(u,i,c,t))}return()=>{o=!0;for(let i of n.splice(0))i();for(let i of r.splice(0))i()}}function Fu(e,t,n,r){switch(e){case"idle":{if(typeof requestIdleCallback<"u"){let i=requestIdleCallback(n);return()=>cancelIdleCallback(i)}let o=setTimeout(n,1);return()=>clearTimeout(o)}case"visible":{if(typeof IntersectionObserver>"u")return queueMicrotask(n),()=>{};let o=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting&&(o.disconnect(),n())},{rootMargin:r.rootMargin,threshold:r.threshold});return o.observe(t),()=>o.disconnect()}case"interaction":{let o=["pointerdown","focusin","keydown","touchstart"],i=()=>{s(),n()},s=()=>{for(let a of o)t.removeEventListener(a,i)};for(let a of o)t.addEventListener(a,i,{passive:!0});return s}case"media":{let o=t.getAttribute("data-sibu-media")||"(min-width: 0px)";if(typeof matchMedia>"u")return queueMicrotask(n),()=>{};let i=matchMedia(o);if(i.matches)return queueMicrotask(n),()=>{};let s=()=>{i.matches&&(i.removeEventListener("change",s),n())};return i.addEventListener("change",s),()=>i.removeEventListener("change",s)}default:return queueMicrotask(n),()=>{}}}function Co(e){return e}var Rp=1024*1024;function zu(e){let[t,n]=C(e()),r=!1,o=!1,i=t(),s=()=>{r=!1,!o&&n(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=Fe(()=>{i=e(),a()}),u=(()=>t());return u.dispose=()=>{o||(o=!0,c())},u}var No=16;function Vu(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:No*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,No)}function Wu(){let[e,t]=C(!1),n=0;function r(o){n++,t(!0);let i=!1,s=()=>{i||(i=!0,n--,n===0&&t(!1))},a=c=>{s(),_(c,{phase:"async",name:"transition"})};Vu(()=>{try{let c=Tt(o());c?c.then(s,a):s()}catch(c){a(c)}})}return{pending:e,start:r}}function ju(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}typeof globalThis<"u"&&(globalThis.Sibu={...Tn});})();