sibujs 2.0.0 → 2.1.0

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 (60) hide show
  1. package/dist/browser.cjs +144 -102
  2. package/dist/browser.js +4 -4
  3. package/dist/build.cjs +183 -102
  4. package/dist/build.js +10 -10
  5. package/dist/cdn.global.js +7 -7
  6. package/dist/{chunk-MIUAXB7K.js → chunk-3DZP6OIT.js} +2 -2
  7. package/dist/{chunk-ITX6OO3F.js → chunk-45YP72ZQ.js} +1 -1
  8. package/dist/{chunk-ND2664SF.js → chunk-AMK2TYNW.js} +13 -9
  9. package/dist/{chunk-R73P76YZ.js → chunk-CWBVQML6.js} +1 -1
  10. package/dist/{chunk-54EDRCEF.js → chunk-DRUZZAK4.js} +1 -1
  11. package/dist/{chunk-3NSGB5JN.js → chunk-GWWURC5M.js} +2 -2
  12. package/dist/{chunk-SAHNHTFC.js → chunk-KGYT6UO6.js} +3 -3
  13. package/dist/{chunk-52YJLLRO.js → chunk-NASX6ST2.js} +1 -1
  14. package/dist/{chunk-O2MNQFLP.js → chunk-O6EFQ3KT.js} +5 -5
  15. package/dist/{chunk-GTBNNBJ6.js → chunk-OJ3P4ECI.js} +1 -1
  16. package/dist/{chunk-7JDB7I65.js → chunk-ON5MMR2J.js} +4 -4
  17. package/dist/{chunk-KLRMB5ZS.js → chunk-P2HSJDDN.js} +2 -2
  18. package/dist/{chunk-VLPPXTYG.js → chunk-QO3WC6FS.js} +145 -93
  19. package/dist/{chunk-CC65Y57T.js → chunk-RDTDJCAB.js} +1 -1
  20. package/dist/{chunk-JXMMDLBY.js → chunk-TH2ILCYW.js} +8 -4
  21. package/dist/{chunk-3LR7GLWQ.js → chunk-V6C4FADE.js} +3 -3
  22. package/dist/{chunk-WOMYAHHI.js → chunk-WANSMF2L.js} +4 -4
  23. package/dist/{chunk-DFPFITST.js → chunk-WIPZPFBQ.js} +1 -1
  24. package/dist/{chunk-HB24TBAF.js → chunk-WZA53FXU.js} +38 -10
  25. package/dist/{chunk-JA6667UN.js → chunk-ZAQSMOED.js} +4 -4
  26. package/dist/data.cjs +176 -102
  27. package/dist/data.js +6 -6
  28. package/dist/devtools.cjs +148 -91
  29. package/dist/devtools.d.cts +1 -1
  30. package/dist/devtools.d.ts +1 -1
  31. package/dist/devtools.js +4 -4
  32. package/dist/ecosystem.cjs +176 -102
  33. package/dist/ecosystem.js +7 -7
  34. package/dist/extras.cjs +182 -104
  35. package/dist/extras.d.cts +1 -1
  36. package/dist/extras.d.ts +1 -1
  37. package/dist/extras.js +19 -19
  38. package/dist/index.cjs +185 -102
  39. package/dist/index.d.cts +15 -1
  40. package/dist/index.d.ts +15 -1
  41. package/dist/index.js +14 -10
  42. package/dist/{introspect-BWNjNw64.d.cts → introspect-2TOlQ7oa.d.cts} +3 -1
  43. package/dist/{introspect-cY2pg9pW.d.ts → introspect-DnIpHQQz.d.ts} +3 -1
  44. package/dist/motion.cjs +78 -62
  45. package/dist/motion.js +3 -3
  46. package/dist/patterns.cjs +176 -102
  47. package/dist/patterns.js +5 -5
  48. package/dist/performance.cjs +142 -89
  49. package/dist/performance.js +4 -4
  50. package/dist/plugins.cjs +142 -89
  51. package/dist/plugins.js +6 -6
  52. package/dist/ssr.cjs +144 -102
  53. package/dist/ssr.js +7 -7
  54. package/dist/testing.cjs +66 -28
  55. package/dist/testing.js +2 -2
  56. package/dist/ui.cjs +174 -89
  57. package/dist/ui.js +6 -6
  58. package/dist/widgets.cjs +176 -102
  59. package/dist/widgets.js +6 -6
  60. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- "use strict";var Sibu=(()=>{var Fe=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var ai=Object.getOwnPropertyNames;var ci=Object.prototype.hasOwnProperty;var ht=(e,t)=>{for(var n in t)Fe(e,n,{get:t[n],enumerable:!0})},li=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ai(t))!ci.call(e,o)&&o!==n&&Fe(e,o,{get:()=>t[o],enumerable:!(r=si(t,o))||r.enumerable});return e};var ui=e=>li(Fe({},"__esModule",{value:!0}),e);var Zi={};ht(Zi,{DynamicComponent:()=>oo,ErrorBoundary:()=>Xo,ErrorDisplay:()=>ze,Fragment:()=>eo,KeepAlive:()=>lo,Loading:()=>ti,Portal:()=>to,SVG_NS:()=>k,Suspense:()=>st,__resetIdCounter:()=>To,a:()=>Qt,abbr:()=>Xt,action:()=>uo,address:()=>Dt,area:()=>En,array:()=>Ro,article:()=>Nt,aside:()=>Ot,asyncDerived:()=>Do,audio:()=>Cn,autoResize:()=>go,b:()=>en,base:()=>vr,batch:()=>z,bdi:()=>tn,bdo:()=>nn,bindDynamic:()=>je,blockquote:()=>qt,body:()=>At,br:()=>rn,button:()=>ae,canvas:()=>Bn,caption:()=>Un,catchError:()=>ho,catchErrorAsync:()=>yo,center:()=>jr,checkLeaks:()=>wt,circle:()=>wr,cite:()=>on,clickOutside:()=>fo,clipPath:()=>Hr,code:()=>Oe,col:()=>Kn,colgroup:()=>Wn,context:()=>Bo,copyOnClick:()=>mo,createId:()=>vo,customElement:()=>Kr,data:()=>sn,datalist:()=>tr,dd:()=>jt,deepEqual:()=>fe,deepSignal:()=>Ho,defer:()=>Uo,defs:()=>$r,del:()=>jn,derived:()=>De,details:()=>mr,dfn:()=>an,dialog:()=>gr,disableSSR:()=>Eo,dispose:()=>M,div:()=>T,dl:()=>Vt,dt:()=>Ut,each:()=>Qr,effect:()=>O,ellipse:()=>kr,em:()=>cn,embed:()=>Mn,enableSSR:()=>ko,enqueueBatchedSignal:()=>ce,fieldset:()=>nr,figcaption:()=>Kt,figure:()=>Wt,font:()=>Vr,footer:()=>Rt,form:()=>rr,g:()=>Er,getSSRStore:()=>ue,getSlot:()=>io,h1:()=>Pt,h2:()=>zt,h3:()=>$e,h4:()=>Ft,h5:()=>Bt,h6:()=>It,head:()=>Ct,header:()=>Mt,hr:()=>Jt,html:()=>Ke,i:()=>ln,iframe:()=>Rn,img:()=>An,input:()=>or,ins:()=>Vn,isBatching:()=>So,isSSR:()=>de,kbd:()=>un,label:()=>ir,lazy:()=>it,legend:()=>sr,li:()=>Gt,line:()=>Cr,linearGradient:()=>Pr,link:()=>Tr,longPress:()=>po,main:()=>Ht,map:()=>_n,mark:()=>dn,marker:()=>qr,marquee:()=>Ur,mask:()=>Or,match:()=>co,math:()=>Fn,menu:()=>br,meta:()=>Sr,meter:()=>ar,mount:()=>Gr,nav:()=>$t,nextTick:()=>jo,noscript:()=>In,object:()=>$n,ol:()=>Zt,on:()=>_o,onCleanup:()=>Fo,onMount:()=>ve,onUnmount:()=>zo,optgroup:()=>cr,option:()=>lr,output:()=>ur,p:()=>Re,param:()=>Hn,path:()=>Ar,pattern:()=>Dr,picture:()=>On,polygon:()=>_r,polyline:()=>Lr,portal:()=>Dn,pre:()=>He,progress:()=>dr,q:()=>fn,radialGradient:()=>zr,reactiveArray:()=>$o,rect:()=>Nr,ref:()=>Mo,registerComponent:()=>no,registerDisposer:()=>v,resolveComponent:()=>Je,rp:()=>pn,rt:()=>mn,ruby:()=>gn,runInSSRContext:()=>Co,s:()=>bn,samp:()=>hn,script:()=>qn,section:()=>Lt,select:()=>fr,setGlobalErrorHandler:()=>xo,show:()=>so,signal:()=>C,slot:()=>yr,small:()=>yn,source:()=>Pn,span:()=>A,stop:()=>Fr,store:()=>No,strict:()=>Io,strictEffect:()=>qo,strong:()=>xn,style:()=>K,sub:()=>vn,summary:()=>hr,sup:()=>Tn,svg:()=>zn,symbol:()=>Ir,table:()=>Jn,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>Gn,td:()=>Zn,template:()=>xr,text:()=>Mr,textarea:()=>pr,tfoot:()=>Yn,th:()=>Qn,thead:()=>Xn,time:()=>Sn,title:()=>_t,tr:()=>er,track:()=>Ln,transition:()=>Ko,trapFocus:()=>bo,trustHTML:()=>at,tspan:()=>Rr,u:()=>wn,ul:()=>Yt,unregisterComponent:()=>ro,untracked:()=>U,use:()=>Br,var_:()=>kn,video:()=>Nn,watch:()=>Lo,when:()=>ao,withSSR:()=>Ao,writable:()=>Oo});var lt={};ht(lt,{DynamicComponent:()=>oo,ErrorBoundary:()=>Xo,ErrorDisplay:()=>ze,Fragment:()=>eo,KeepAlive:()=>lo,Loading:()=>ti,Portal:()=>to,SVG_NS:()=>k,Suspense:()=>st,__resetIdCounter:()=>To,a:()=>Qt,abbr:()=>Xt,action:()=>uo,address:()=>Dt,area:()=>En,array:()=>Ro,article:()=>Nt,aside:()=>Ot,asyncDerived:()=>Do,audio:()=>Cn,autoResize:()=>go,b:()=>en,base:()=>vr,batch:()=>z,bdi:()=>tn,bdo:()=>nn,bindDynamic:()=>je,blockquote:()=>qt,body:()=>At,br:()=>rn,button:()=>ae,canvas:()=>Bn,caption:()=>Un,catchError:()=>ho,catchErrorAsync:()=>yo,center:()=>jr,checkLeaks:()=>wt,circle:()=>wr,cite:()=>on,clickOutside:()=>fo,clipPath:()=>Hr,code:()=>Oe,col:()=>Kn,colgroup:()=>Wn,context:()=>Bo,copyOnClick:()=>mo,createId:()=>vo,customElement:()=>Kr,data:()=>sn,datalist:()=>tr,dd:()=>jt,deepEqual:()=>fe,deepSignal:()=>Ho,defer:()=>Uo,defs:()=>$r,del:()=>jn,derived:()=>De,details:()=>mr,dfn:()=>an,dialog:()=>gr,disableSSR:()=>Eo,dispose:()=>M,div:()=>T,dl:()=>Vt,dt:()=>Ut,each:()=>Qr,effect:()=>O,ellipse:()=>kr,em:()=>cn,embed:()=>Mn,enableSSR:()=>ko,enqueueBatchedSignal:()=>ce,fieldset:()=>nr,figcaption:()=>Kt,figure:()=>Wt,font:()=>Vr,footer:()=>Rt,form:()=>rr,g:()=>Er,getSSRStore:()=>ue,getSlot:()=>io,h1:()=>Pt,h2:()=>zt,h3:()=>$e,h4:()=>Ft,h5:()=>Bt,h6:()=>It,head:()=>Ct,header:()=>Mt,hr:()=>Jt,html:()=>Ke,i:()=>ln,iframe:()=>Rn,img:()=>An,input:()=>or,ins:()=>Vn,isBatching:()=>So,isSSR:()=>de,kbd:()=>un,label:()=>ir,lazy:()=>it,legend:()=>sr,li:()=>Gt,line:()=>Cr,linearGradient:()=>Pr,link:()=>Tr,longPress:()=>po,main:()=>Ht,map:()=>_n,mark:()=>dn,marker:()=>qr,marquee:()=>Ur,mask:()=>Or,match:()=>co,math:()=>Fn,menu:()=>br,meta:()=>Sr,meter:()=>ar,mount:()=>Gr,nav:()=>$t,nextTick:()=>jo,noscript:()=>In,object:()=>$n,ol:()=>Zt,on:()=>_o,onCleanup:()=>Fo,onMount:()=>ve,onUnmount:()=>zo,optgroup:()=>cr,option:()=>lr,output:()=>ur,p:()=>Re,param:()=>Hn,path:()=>Ar,pattern:()=>Dr,picture:()=>On,polygon:()=>_r,polyline:()=>Lr,portal:()=>Dn,pre:()=>He,progress:()=>dr,q:()=>fn,radialGradient:()=>zr,reactiveArray:()=>$o,rect:()=>Nr,ref:()=>Mo,registerComponent:()=>no,registerDisposer:()=>v,resolveComponent:()=>Je,rp:()=>pn,rt:()=>mn,ruby:()=>gn,runInSSRContext:()=>Co,s:()=>bn,samp:()=>hn,script:()=>qn,section:()=>Lt,select:()=>fr,setGlobalErrorHandler:()=>xo,show:()=>so,signal:()=>C,slot:()=>yr,small:()=>yn,source:()=>Pn,span:()=>A,stop:()=>Fr,store:()=>No,strict:()=>Io,strictEffect:()=>qo,strong:()=>xn,style:()=>K,sub:()=>vn,summary:()=>hr,sup:()=>Tn,svg:()=>zn,symbol:()=>Ir,table:()=>Jn,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>Gn,td:()=>Zn,template:()=>xr,text:()=>Mr,textarea:()=>pr,tfoot:()=>Yn,th:()=>Qn,thead:()=>Xn,time:()=>Sn,title:()=>_t,tr:()=>er,track:()=>Ln,transition:()=>Ko,trapFocus:()=>bo,trustHTML:()=>at,tspan:()=>Rr,u:()=>wn,ul:()=>Yt,unregisterComponent:()=>ro,untracked:()=>U,use:()=>Br,var_:()=>kn,video:()=>Nn,watch:()=>Lo,when:()=>ao,withSSR:()=>Ao,writable:()=>Oo});function E(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var yt=E();function $(e,t){if(yt&&!e)throw new Error(`[SibuJS] ${t}`)}function w(e){yt&&console.warn(`[SibuJS] ${e}`)}var di=["http:","https:","mailto:","tel:","ftp:"];function I(e){let t=e.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!t)return"";let n=t.toLowerCase(),r=-1;for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);if(s===58){r=i;break}if(s===47||s===63||s===35)break}if(r===-1)return t;let o=n.slice(0,r+1);return/^[a-z][a-z0-9+.-]*:$/.test(o)&&di.indexOf(o)===-1?"":t}function he(e){let t=e.split(","),n=[];for(let r=0;r<t.length;r++){let o=t[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i)continue;let s=I(i[1]);s&&n.push(i[2]?`${s}${i[2]}`:s)}return n.join(", ")}function Be(e){let n=e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(r,o)=>{let i=Number.parseInt(o,16);if(!Number.isFinite(i)||i<0||i>1114111)return"";try{return String.fromCodePoint(i)}catch{return""}}).toLowerCase().replace(/\s+/g,"");return n.includes("url(")||n.includes("expression(")||n.includes("javascript:")||n.includes("vbscript:")||n.includes("-moz-binding")||n.includes("behavior:")||n.includes("@import")||n.includes("image-set(")||n.includes("filter:progid")?"":e}var fi=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data"]);function V(e){return fi.has(e)}var pi=E(),te=new Array(32),ne=32,P=-1,B=null,W="__s",D=0,L=[],H=new Set,mi=[];function X(e){try{e()}catch(t){pi&&w(`Subscriber threw during notification: ${t instanceof Error?t.message:String(t)}`)}}var Ae=0,_e=!1;function Ie(e,t){let n=B;B=t;try{e()}finally{B=n}}function S(e,t){t||(t=e),xt(t),++P,P>=ne&&(ne*=2,te.length=ne),te[P]=t,B=t;try{e()}finally{P--,B=P>=0?te[P]:null}return()=>xt(t)}function gi(){Ae===0&&(++P,P>=ne&&(ne*=2,te.length=ne),te[P]=null,B=null,_e=!0),Ae++}function bi(){Ae--,Ae===0&&(P--,B=P>=0?te[P]:null,_e=!1)}function U(e){gi();try{return e()}finally{bi()}}function re(e){if(!B)return;let t=B;if(t._dep===e)return;let n=t._deps;if(n){if(n.has(e))return;n.add(e)}else if(t._dep!==void 0){let o=new Set;o.add(t._dep),o.add(e),t._deps=o,t._dep=void 0}else t._dep=e;let r=e[W];r||(r=new Set,e[W]=r),r.add(B),r.size===1?e.__f=B:e.__f!==void 0&&(e.__f=void 0)}function vt(e){let t=e[W];if(t)for(let n of t)n._c?ye(n):H.has(n)||(H.add(n),L.push(n))}var ee=1e5;function Tt(){if(!(D>0)){D++;try{let e=0;for(;e<L.length;){if(e>=ee){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${ee} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}X(L[e]),e++}}finally{D--,D===0&&(L.length=0,H.clear())}}}function ye(e){e();let t=e._sig;if(!t)return;let n=mi,r=n.length;for(n.push(t);n.length>r;){let o=n.pop(),i=o.__f;if(i){if(i._c){let a=i._sig;a._d||(a._d=!0,n.push(a))}else H.has(i)||(H.add(i),L.push(i));continue}let s=o[W];if(s)for(let a of s)if(a._c){let c=a._sig;c&&!c._d?(c._d=!0,n.push(c)):c||a()}else H.has(a)||(H.add(a),L.push(a))}}function Le(e){let t=e.__f;if(t){if(D>0){t._c?ye(t):H.has(t)||(H.add(t),L.push(t));return}D++;try{t._c?ye(t):X(t);let r=0;for(;r<L.length;){if(r>=ee){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${ee} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}X(L[r]),r++}}finally{D--,D===0&&(L.length=0,H.clear())}return}let n=e[W];if(!(!n||n.size===0)){if(D>0){for(let r of n)r._c?ye(r):H.has(r)||(H.add(r),L.push(r));return}D++;try{let r=0,o=!1;for(let s of n)s._c&&(o=!0),L[r++]=s;if(o){for(let s=0;s<r;s++)L[s]._c&&ye(L[s]);for(let s=0;s<r;s++){let a=L[s];!a._c&&!H.has(a)&&(H.add(a),X(a))}}else for(let s=0;s<r;s++)X(L[s]);let i=r;for(;i<L.length;){if(i-r>=ee){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${ee} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}X(L[i]),i++}}finally{D--,D===0&&(L.length=0,H.clear())}}}function xt(e){let t=e,n=t._dep;if(n!==void 0){let o=n[W];o&&(o.delete(e),n.__f===e?n.__f=o.size===1?o.values().next().value:void 0:o.size===1&&n.__f===void 0&&(n.__f=o.values().next().value)),t._dep=void 0;return}let r=t._deps;if(!(!r||r.size===0)){for(let o of r){let i=o[W];i&&(i.delete(e),o.__f===e?o.__f=i.size===1?i.values().next().value:void 0:i.size===1&&o.__f===void 0&&(o.__f=i.values().next().value))}r.clear()}}var Ne=E();function qe(e,t,n){e[t]=n}function hi(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}function Me(e,t,n){if(hi(t))return Ne&&w(`bindAttribute: refusing to bind event-handler attribute "${t}". Use on:{ ${t.slice(2)}: fn } instead.`),()=>{};function r(){let i;try{i=n()}catch(a){Ne&&w(`bindAttribute: getter for "${t}" threw: ${a instanceof Error?a.message:String(a)}`);return}if(typeof i=="boolean"){t in e&&(t==="checked"||t==="disabled"||t==="selected")?qe(e,t,i):i?e.setAttribute(t,""):e.removeAttribute(t);return}let s=String(i);(t==="value"||t==="checked")&&t in e?qe(e,t,t==="checked"?!!i:s):e.setAttribute(t,V(t)?I(s):s)}return S(r)}function je(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){Ne&&w(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof n=="function"?n():n}catch(l){Ne&&w(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;r!==null&&r!==s&&e.removeAttribute(r);let c=String(a);(s==="value"||s==="checked")&&s in e?qe(e,s,s==="checked"?!!a:c):e.setAttribute(s,V(s)?I(c):c),r=s}let i=S(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var St=E();function J(e,t){let n=[];function r(){let o;try{o=t()}catch(l){St&&w(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let d=n[l];d.parentNode&&d.parentNode.removeChild(d)}n.length=0;return}let i=e.parentNode;if(!i){n.length=0;return}let s;if(Array.isArray(o)){s=[];let l=new Set;for(let d=0;d<o.length;d++){let m=o[d];if(m==null||typeof m=="boolean")continue;let b=m instanceof Node?m:document.createTextNode(String(m));if(l.has(b)){St&&w("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(b),s.push(b)}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a;if(n.length>0&&s.length>0){let l=new Set(n);a=new Set;for(let d=0;d<s.length;d++)l.has(s[d])&&a.add(s[d])}for(let l=0;l<n.length;l++){let d=n[l];a?.has(d)||d.parentNode&&d.parentNode.removeChild(d)}let c=e.nextSibling;for(let l=0;l<s.length;l++){let d=s[l];a?.has(d)&&d.parentNode===i?d.nextSibling!==c&&i.insertBefore(d,c):i.insertBefore(d,c)}n=s}return S(r)}var oe=new WeakMap,ie=E(),se=0;function v(e,t){let n=oe.get(e);n||(n=[],oe.set(e,n)),n.push(t),ie&&se++}function M(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--){let o=n[r],i=oe.get(o);if(i){let s=i.slice();oe.delete(o),ie&&(se-=s.length);for(let c of s)try{c()}catch(l){ie&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",l)}let a=0;for(;a++<8;){let c=oe.get(o);if(!c||c.length===0)break;let l=c.slice();oe.delete(o),ie&&(se-=l.length);for(let d of l)try{d()}catch(m){ie&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",m)}}}}}function wt(e=0){return ie?(e>0&&se>e&&w(`checkLeaks: ${se} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),se):0}var k="http://www.w3.org/2000/svg",kt=E(),yi=new Set(["script","iframe","object","embed","frame","frameset"]);function xi(e){let t=e.toLowerCase();if(yi.has(t))throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`)}var vi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Ti(e,t,n){e[t]=n}var Et=new Map;function Si(e){let t=Et.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Et.set(e,t)),t}function wi(e,t){if(typeof t=="function"){let r=S(()=>{e.setAttribute("style",t())});v(e,r);return}if(typeof t=="string"){e.setAttribute("style",t);return}let n=e;for(let r in t){let o=t[r],i=Si(r);if(typeof o=="function"){let s=o,a=S(()=>{n.style.setProperty(i,Be(String(s())))});v(e,a)}else n.style.setProperty(i,Be(String(o)))}}function ki(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=S(()=>{e.setAttribute("class",t())});v(e,i);return}let n=t,r=!1,o="";for(let i in n){let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=S(()=>{let a="";for(let c in n){let l=n[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)});v(e,s)}else e.setAttribute("class",o)}function Ve(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),v(e,J(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),v(e,J(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),v(e,J(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)))}}}var u=(e,t)=>(n,r)=>{xi(e);let o=t?document.createElementNS(t,e):document.createElement(e);if(n===void 0)return o;if(typeof n=="string")return r!==void 0?(o.setAttribute("class",n),Ve(o,r),o):(o.textContent=n,o);if(typeof n=="number")return o.textContent=String(n),o;if(Array.isArray(n)||n instanceof Node||typeof n=="function")return Ve(o,n),o;let i=n,s=i.class;s!=null&&ki(o,s);let a=i.id;a!=null&&(kt&&typeof a=="string"&&vi.has(a.toLowerCase())&&w(`tagFactory: element id="${a}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),o.id=a);let c=r!==void 0?r:i.nodes;c!=null&&Ve(o,c);let l=i.on;if(l)for(let b in l){let f=l[b];typeof f=="function"?o.addEventListener(b,f):kt&&w(`tagFactory: on.${b} handler is not a function (got ${typeof f}). Event listener was not attached.`)}let d=i.style;d!=null&&wi(o,d);let m=i.ref;m&&(m.current=o);for(let b in i)switch(b){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let f=i[b];if(f==null)continue;let p=b.toLowerCase();if(p[0]==="o"&&p[1]==="n")continue;if(typeof f=="function")v(o,Me(o,b,f));else if(typeof f=="boolean")b in o&&(b==="checked"||b==="disabled"||b==="selected")?Ti(o,b,f):f?o.setAttribute(b,""):o.removeAttribute(b);else{let g=String(f);p==="srcset"?o.setAttribute(b,he(g)):V(p)?o.setAttribute(b,I(g)):o.setAttribute(b,g)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var xs=u("html"),Ct=u("head"),At=u("body"),_t=u("title"),T=u("div"),A=u("span"),Lt=u("section"),Nt=u("article"),Mt=u("header"),Rt=u("footer"),$t=u("nav"),Ht=u("main"),Ot=u("aside"),Dt=u("address"),Re=u("p"),Pt=u("h1"),zt=u("h2"),$e=u("h3"),Ft=u("h4"),Bt=u("h5"),It=u("h6"),qt=u("blockquote"),jt=u("dd"),Vt=u("dl"),Ut=u("dt"),Kt=u("figcaption"),Wt=u("figure"),Jt=u("hr"),Gt=u("li"),Zt=u("ol"),Yt=u("ul"),He=u("pre"),Qt=u("a"),Xt=u("abbr"),en=u("b"),tn=u("bdi"),nn=u("bdo"),rn=u("br"),on=u("cite"),Oe=u("code"),sn=u("data"),an=u("dfn"),cn=u("em"),ln=u("i"),un=u("kbd"),dn=u("mark"),fn=u("q"),pn=u("rp"),mn=u("rt"),gn=u("ruby"),bn=u("s"),hn=u("samp"),yn=u("small"),xn=u("strong"),vn=u("sub"),Tn=u("sup"),Sn=u("time"),wn=u("u"),kn=u("var"),En=u("area"),Cn=u("audio"),An=u("img"),_n=u("map"),Ln=u("track"),Nn=u("video"),Mn=u("embed"),Rn=u("iframe"),$n=u("object"),Hn=u("param"),On=u("picture"),Dn=u("portal"),Pn=u("source"),zn=u("svg",k),Fn=u("math"),Bn=u("canvas"),In=u("noscript"),qn=u("script"),jn=u("del"),Vn=u("ins"),Un=u("caption"),Kn=u("col"),Wn=u("colgroup"),Jn=u("table"),Gn=u("tbody"),Zn=u("td"),Yn=u("tfoot"),Qn=u("th"),Xn=u("thead"),er=u("tr"),ae=u("button"),tr=u("datalist"),nr=u("fieldset"),rr=u("form"),or=u("input"),ir=u("label"),sr=u("legend"),ar=u("meter"),cr=u("optgroup"),lr=u("option"),ur=u("output"),dr=u("progress"),fr=u("select"),pr=u("textarea"),mr=u("details"),gr=u("dialog"),br=u("menu"),hr=u("summary"),yr=u("slot"),xr=u("template"),vr=u("base"),Tr=u("link"),Sr=u("meta"),K=u("style"),wr=u("circle",k),kr=u("ellipse",k),Er=u("g",k),Cr=u("line",k),Ar=u("path",k),_r=u("polygon",k),Lr=u("polyline",k),Nr=u("rect",k),Mr=u("text",k),Rr=u("tspan",k),$r=u("defs",k),Hr=u("clipPath",k),Or=u("mask",k),Dr=u("pattern",k),Pr=u("linearGradient",k),zr=u("radialGradient",k),Fr=u("stop",k),Br=u("use",k),Ir=u("symbol",k),qr=u("marker",k),jr=u("center"),Vr=u("font"),Ur=u("marquee"),Kr=e=>u(e);var Ei=E(),Ci=new Set(["script","style"]),Ai=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Wr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Jr=new WeakMap;function _i(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]===`
2
- `||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 y=[],N=[],F="";for(;r<o&&n[r]!==p;){let Se=s();Se>=0?(y.push(F),F="",N.push(Se)):F+=n[r++]}return r<o&&r++,y.push(F),N.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:N}}let g=r;for(;r<o;){let y=n.charCodeAt(r);if(y===32||y===9||y===10||y===13||y===62||y===47)break;r++}return{kind:"static",value:n.slice(g,r)}}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 g=n.slice(p,r);if(!g)break;let x=c();g.startsWith("on:")?x.kind==="expr"&&f.push({t:3,name:g.slice(3),idx:x.idx}):x.kind==="bool"?f.push({t:4,name:g}):x.kind==="static"?f.push({t:0,name:g,value:x.value}):x.kind==="expr"?f.push({t:1,name:g,idx:x.idx}):x.kind==="mixed"&&f.push({t:2,name:g,statics:x.statics,exprs:x.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function m(f){let p="";for(;r<o&&n[r]!=="<";){let x=s();if(x>=0){let y=d(p);y&&f.push({t:1,value:y}),p="",f.push({t:2,idx:x})}else p+=n[r++]}let g=d(p);g&&f.push({t:1,value:g})}function b(){let f=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){r++;let p=a(),g=l();i();let x=Ai.has(p),y=n[r]==="/";if(y&&r++,r<o&&r++,x||y)f.push({t:0,el:{tag:p,svg:Wr.has(p),attrs:g,children:[]}});else{let N=b();if(Ci.has(p.toLowerCase())){for(let F=0;F<N.length;F++)if(N[F].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${p}> (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:p,svg:Wr.has(p),attrs:g,children:N}})}}else m(f);return f}return b()}function Ue(e,t){let n=e.svg?document.createElementNS(k,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:n.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=i.toLowerCase();if(s[0]==="o"&&s[1]==="n")break;let a=t[o.idx];if(typeof a=="function")v(n,Me(n,i,a));else if(a!=null){let c=String(a);s==="srcset"?n.setAttribute(i,he(c)):V(s)?n.setAttribute(i,I(c)):n.setAttribute(i,c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++){let c=t[o.exprs[a]];i+=(c==null?"":String(c))+o.statics[a+1]}let s=o.name.toLowerCase();s==="srcset"?n.setAttribute(o.name,he(i)):V(s)?n.setAttribute(o.name,I(i)):n.setAttribute(o.name,i);break}case 3:{let i=t[o.idx];typeof i=="function"?n.addEventListener(o.name,i):Ei&&w(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:n.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(Ue(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),v(n,J(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 Ke(e,...t){let n=Jr.get(e);if(n||(n=_i(e),Jr.set(e,n)),n.length===1&&n[0].t===0)return Ue(n[0].el,t);let r=document.createElement("div");for(let o=0;o<n.length;o++){let i=n[o];switch(i.t){case 0:r.appendChild(Ue(i.el,t));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=t[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),v(r,J(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let c=s[a];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else s!=null&&typeof s!="boolean"&&r.appendChild(document.createTextNode(String(s)));break}}}return r.childNodes.length===1&&r.firstChild instanceof Element?r.firstChild:r}function Gr(e,t){if(!t)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");$(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=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-n:0;t.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:t,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),M(r),r.parentNode&&r.parentNode.removeChild(r)}}}var Zr=E();function Yr(e){return typeof e=="function"?Yr(e()):e instanceof Node?e:document.createTextNode(String(e))}function Li(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,d=n.length;for(;l<d;){let m=l+d>>1;e[n[m]]<c?l=m+1:d=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 Qr(e,t,n){$(typeof e=="function","each: first argument must be a function that returns an array."),$(typeof t=="function","each: second argument must be a render function."),$(n&&typeof n.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,l=new Map,d=new Map,m=[],b=[],f=new Uint8Array(0),p=new Map,g=[],x=[],y=new Map,N=!1,F=!1,Se=n.key,ut=()=>{let dt=e(),_=dt.length,we=r.parentNode;if(!we)return;F||(we.insertBefore(o,r.nextSibling),F=!0),b.length<_&&(b=new Array(_));for(let h=0;h<_;h++)b[h]=Se(dt[h]);let ge=b;m.length<_&&(m=new Array(_)),d.clear(),y.clear();for(let h=0;h<_;h++)y.set(ge[h],h);for(let h=0;h<_;h++){let R=ge[h],pt=l.get(R),be;if(pt!==void 0)be=pt;else{let mt=R,oi=()=>U(()=>e()[y.get(mt)]),ii=()=>y.get(mt);try{be=Yr(t(oi,ii))}catch(Q){Zr&&w(`each: render threw for item at index ${h} (key="${ge[h]}"): ${Q instanceof Error?Q.message:String(Q)}`),be=document.createComment(`each:error:${h}`);let gt=Q instanceof Error?Q:new Error(String(Q));queueMicrotask(()=>{try{let bt=r.parentNode;bt?.dispatchEvent?bt.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:gt}})):Zr&&w(`each: error not surfaced \u2014 anchor detached: ${gt.message}`)}catch{}})}}d.set(R,be),m[h]=be}for(let[h,R]of l)d.has(h)||(M(R),R.parentNode&&we.removeChild(R));if(_===0){c=0;let h=l;l=d,d=h;return}p.clear();for(let h=0;h<c;h++)p.set(a[h],h);g.length<_&&(g=new Array(_),x=new Array(_));let ke=0;for(let h=0;h<_;h++){let R=p.get(ge[h]);R!==void 0&&(g[ke]=h,x[ke]=R,ke++)}let ft=Li(x,ke);f.length<_?f=new Uint8Array(_):f.fill(0,0,_);for(let h=0;h<ft.length;h++)f[g[ft[h]]]=1;let Ee=o;for(let h=_-1;h>=0;h--){let R=m[h];f[h]||R.nextSibling!==Ee&&we.insertBefore(R,Ee),Ee=R}let Ce=a===i?s:i;Ce.length<_&&(Ce.length=_);for(let h=0;h<_;h++)Ce[h]=ge[h];a=Ce,c=_;let ri=l;l=d,d=ri,N=!0},ni=S(ut);return v(r,ni),N||queueMicrotask(()=>{!N&&r.parentNode&&ut()}),r}function eo(e){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"||t.appendChild(Xr(r));else t.appendChild(Xr(n));return t}function Xr(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let t=e();return t instanceof Node?t:document.createTextNode(String(t??""))}return document.createTextNode(String(e))}function to(e,t){let n=document.createComment("portal"),r=t||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){typeof console<"u"&&console.error("[Portal] Render error:",s);let a=s instanceof Error?s:new Error(String(s));queueMicrotask(()=>{try{let c=n.parentNode;c?.dispatchEvent&&c.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:a}}))}catch{}})}}),v(n,()=>{i=!0,o&&(M(o),o.remove(),o=null)}),n}var We=new Map;function no(e,t){We.set(e,t)}function ro(e){We.delete(e)}function Je(e){let t=We.get(e);return t?t():T({nodes:`[Component "${e}" not found]`})}function oo(e){let t=T({class:"sibu-dynamic"});function n(){let o=e(),i;typeof o=="function"?i=o():i=Je(o);for(let s of Array.from(t.childNodes))M(s);t.replaceChildren(i)}let r=S(n);return v(t,r),t}function io(e,t="default"){return e?.[t]}function so(e,t){return S(()=>{t.style.display=e()?"":"none"}),t}function ao(e,t,n){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let c=e(),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let d=c?t():n?n():null;if(d!=null){let m=d instanceof Node?d:document.createTextNode(String(d));l.insertBefore(m,r.nextSibling),o=m}s=!0};return S(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function co(e,t,n){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let c=String(e()),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let d=t[c]||n;if(d){let m=d();if(m!=null){let b=m instanceof Node?m:document.createTextNode(String(m));l.insertBefore(b,r.nextSibling),o=b}}s=!0};return S(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function lo(e,t,n){let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??10;s===0&&E()&&w("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,l=!1,d=!1,m=()=>{if(d)return;let f=e(),p=r.parentNode;if(!p||l&&f===a)return;c?.parentNode&&p.removeChild(c),a=f;let g=o.get(f);if(g){let x=i.indexOf(f);x!==-1&&(i.splice(x,1),i.push(f))}else{let x=t[f];if(!x){c=null,l=!0;return}if(g=x(),o.set(f,g),i.push(f),s>0&&i.length>s){let y=i.shift(),N=o.get(y);N&&(M(N),N.parentNode&&N.parentNode.removeChild(N),o.delete(y))}}p.insertBefore(g,r.nextSibling),c=g,l=!0},b=S(m);return l||queueMicrotask(()=>{!l&&r.parentNode&&m()}),v(r,()=>{d=!0,b();for(let f of o.values())M(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function uo(e,t,n){let r=t(e,n);typeof r=="function"&&v(e,r)}var fo=(e,t)=>{let n=r=>{e.contains(r.target)||t()};return document.addEventListener("pointerdown",n,!0),()=>document.removeEventListener("pointerdown",n,!0)},po=(e,t)=>{let n=t.duration??500,r=null,o=()=>{r=setTimeout(()=>{t.callback(),r=null},n)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},mo=(e,t)=>{let n=()=>{let r=typeof t=="function"?t():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",n),()=>e.removeEventListener("click",n)},go=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)},bo=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];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)};var G=null;function ho(e,t){try{let n=e();return n&&typeof n.then=="function"&&n.catch(r=>{t?t(r,"async"):G?G(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),n}catch(n){return t?t(n,"sync"):G?G(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function yo(e,t){try{return await e()}catch(n){return t?t(n,"async"):G?G(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function xo(e){G=e}var Ge=0;function vo(e="sibu"){return Ge++,`${e}-${Ge}`}function To(){Ge=0}var xe=0,Ze=new Set;function z(e){xe++;try{return e()}finally{xe--,xe===0&&Ni()}}function ce(e){return xe===0?!1:(Ze.add(e),!0)}function So(){return xe>0}function Ni(){try{for(let e of Ze)vt(e)}finally{Ze.clear()}Tt()}var wo=globalThis,Ye=E();function C(e,t){let n={value:e},r=Ye?t?.name:void 0,o=t?.equals;r&&(n.__name=r);function i(){return re(n),n.value}i.__signal=n,r&&(i.__name=r);function s(a){let c=typeof a=="function"?a(n.value):a;if(!(o?o(n.value,c):Object.is(c,n.value))){if(Ye){let l=n.value;n.value=c;let d=wo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:n,name:r,oldValue:l,newValue:c})}else n.value=c;ce(n)||Le(n)}}if(Ye){let a=wo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}var le=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let e=Function("return typeof require==='function'?require:null")();if(e){let t=e("node:async_hooks");le=new t.AsyncLocalStorage}}}catch{le=null}var Z={ssr:!1,suspenseIdCounter:0};function ue(){if(le){let e=le.getStore();if(e)return e}return Z}function de(){return ue().ssr}function ko(){ue().ssr=!0}function Eo(){ue().ssr=!1}function Co(e){let t={ssr:!0,suspenseIdCounter:0};if(le)return le.run(t,e);let n=Z.ssr,r=Z.suspenseIdCounter;Z.ssr=!0,Z.suspenseIdCounter=0;try{return e()}finally{Z.ssr=n,Z.suspenseIdCounter=r}}function Ao(e){let t=ue(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Qe=globalThis;function _o(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,U(()=>t(o,void 0));else{let i=n;n=o,U(()=>t(o,i))}}}function O(e,t){if($(typeof e=="function","effect: argument must be a function."),de())return()=>{};let n=t?.onError,r=[],o=f=>{r.push(f)},i=()=>{if(r.length===0)return;let f=r;r=[];for(let p=f.length-1;p>=0;p--)try{f[p]()}catch(g){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw:",g)}},s=()=>e(o),a=n?()=>{try{s()}catch(f){n(f)}}:s,c=()=>{},l=!1,d=()=>{if(l){Qe.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.warn("[SibuJS] effect re-entered itself while running \u2014 the triggering update will be ignored. Wrap mutual writes in `batch()` or split the effect to avoid this.");return}l=!0;try{i(),c(),c=S(a,d)}finally{l=!1}};l=!0;try{c=S(a,d)}finally{l=!1}let m=Qe.__SIBU_DEVTOOLS_GLOBAL_HOOK__;m&&m.emit("effect:create",{effectFn:e});let b=!1;return()=>{if(b)return;b=!0;let f=Qe.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(f)try{f.emit("effect:destroy",{effectFn:e})}catch{}try{i()}catch(p){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",p)}try{c()}catch(p){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",p)}}}function De(e,t){$(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r=t?.equals,o={};o._d=!1,o._g=e;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o,S(()=>{let l=!0;try{o._v=e(),o._d=!1,l=!1}finally{l&&(o._d=!0)}},i);let s=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,a=!1;function c(){if(a)throw new Error(`[SibuJS] Circular dependency detected in derived${n?` "${n}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(_e){if(o._d){a=!0;let l=!0;try{Ie(()=>{o._v=e(),o._d=!1,l=!1},i)}finally{a=!1,l&&(o._d=!0)}}return o._v}if(re(o),o._d){let l=o._v;a=!0;let d=!0;try{Ie(()=>{let m=e();o._v=r&&o._v!==void 0&&r(o._v,m)?o._v:m,o._d=!1,d=!1},i)}finally{a=!1,d&&(o._d=!0)}s&&l!==o._v&&s.emit("computed:update",{signal:o,oldValue:l,newValue:o._v})}return o._v}return n&&(c.__name=n,o.__name=n),c.__signal=o,s&&s.emit("computed:create",{signal:o,name:n,getter:c}),c}function Lo(e,t){if($(typeof e=="function","watch: first argument must be a getter function."),$(typeof t=="function","watch: second argument must be a callback function."),de())return()=>{};let n,r=!0;return S(()=>{let s=e();if(r){n=s,r=!1;return}Object.is(s,n)||(t(s,n),n=s)})}function No(e){$(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t={};Object.keys(e).forEach(c=>{let[l,d]=C(e[c]);t[c]=[l,d]});let n=new Proxy({},{get(c,l){if(l in t){let d=t[l][0];return d()}},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=>{c[l]=t[l][0]()}),c};return[n,{setState:c=>{let l=r(),d=typeof c=="function"?c(l):c;z(()=>{Object.entries(d).forEach(([m,b])=>{m in t&&t[m][1](b)})})},reset:()=>{z(()=>{Object.keys(e).forEach(c=>{let l=t[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return O(()=>{let d=r();if(l){l=!1;return}c(d)})},subscribeKey:(c,l)=>{let d,m=!0;return O(()=>{let b=t[c][0]();if(m){d=b,m=!1;return}if(!Object.is(b,d)){let f=d;d=b,l(b,f)}})},getSnapshot:r}]}function Mo(e){let[t,n]=C(e);return{get current(){return t()},set current(r){n(r)}}}function Ro(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=0,...s){let a=[];return n(c=>{let l=[...c];return a=l.splice(o,i,...s),l}),a},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 $o(e=[]){let t=[...e],n=null,r={};function o(){n=null,ce(r)||Le(r)}function i(){if(re(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=0,...l){let d=t.splice(a,c,...l);return(d.length>0||l.length>0)&&o(),d},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 d=0;d<t.length;d++)if(a(t[d])){let m=c(t[d]);Object.is(t[d],m)||(t[d]=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 d=a(t[l],l);Object.is(t[l],d)||(t[l]=d,c=!0)}c&&o()},clear(){t.length!==0&&(t=[],o())}}]}function fe(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 c=t;return e.source===c.source&&e.flags===c.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 c=t;if(e.size!==c.size)return!1;for(let[l,d]of e)if(!c.has(l)||!fe(d,c.get(l),n))return!1;return!0}if(e instanceof Set){let c=t;if(e.size!==c.size)return!1;for(let l of e)if(!c.has(l))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),l=new Uint8Array(t);if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){let c=e,l=t;if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((c,l)=>fe(c,t[l],n));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>fe(r[c],o[c],n))}function Ho(e){return C(e,{equals:(t,n)=>fe(t,n)})}function Oo(e,t,n){return[De(e,n),i=>{z(()=>t(i))}]}function Do(e,t){let[n,r]=C(t),[o,i]=C(!1),[s,a]=C(null),[c,l]=C(0),d=0;return O(()=>{c();let m=++d;z(()=>{i(!0),a(null)});let b;try{b=e()}catch(f){z(()=>{a(f),i(!1)});return}b.then(f=>{m===d&&z(()=>{r(f),i(!1)})},f=>{m===d&&z(()=>{a(f),i(!1)})})}),{value:n,loading:o,error:s,refresh:()=>l(m=>m+1)}}function nt(e,t){try{return e()}catch(n){w(`${t}: callback threw: ${n instanceof Error?n.message:String(n)}`);return}}function Xe(e,t,n){let r=nt(e,t);typeof r=="function"&&n&&v(n,r)}var pe=new WeakMap,Y=new WeakMap,q=new Set,j=new Set,me=null,Pe=0,Mi=256;function et(e){let t=pe.get(e);if(t){pe.delete(e),q.delete(e);for(let n of t)try{n()}catch{}}}function tt(e){Y.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Y.get(e);if(n){Y.delete(e),j.delete(e);for(let r of n)try{r()}catch{}}})}function Ri(e){if(q.size===0||e.nodeType!==1)return;let t=e;if(q.has(t)&&t.isConnected&&et(t),t.firstElementChild)for(let n of Array.from(q))n!==t&&n.isConnected&&t.contains(n)&&et(n)}function $i(e){if(j.size===0||e.nodeType!==1)return;let t=e;if(j.has(t)&&!t.isConnected&&tt(t),t.firstElementChild)for(let n of Array.from(j))n!==t&&!n.isConnected&&t.contains(n)&&tt(n)}function Hi(){if(q.size>0)for(let e of Array.from(q))e.isConnected&&et(e);if(j.size>0)for(let e of Array.from(j))e.isConnected||tt(e)}function Po(){me||typeof document>"u"||(me=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++)Ri(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)$i(t.removedNodes[n])}Pe+=e.length,Pe>=Mi&&(Pe=0,Hi()),rt()}),me.observe(document.body,{childList:!0,subtree:!0}))}function rt(){me&&q.size===0&&j.size===0&&(me.disconnect(),me=null,Pe=0)}function Oi(e,t){let n=pe.get(e);return n||(n=[],pe.set(e,n)),n.push(t),q.add(e),Po(),()=>{let r=pe.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(pe.delete(e),q.delete(e))}rt()}}function Di(e,t){let n=Y.get(e);return n||(n=[],Y.set(e,n)),n.push(t),j.add(e),Po(),()=>{let r=Y.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Y.delete(e),j.delete(e))}rt()}}function ve(e,t){if(!(typeof document>"u"))if(t){let n=!1;if(v(t,()=>{n=!0}),t.isConnected){queueMicrotask(()=>{n||Xe(e,"onMount",t)});return}queueMicrotask(()=>{if(n)return;if(t.isConnected){Xe(e,"onMount",t);return}let r=Oi(t,()=>{n||Xe(e,"onMount",t)});v(t,r)})}else queueMicrotask(()=>{nt(e,"onMount")})}function zo(e,t){if(typeof document>"u")return;let n=!1,r=()=>{n||(n=!0,nt(e,"onUnmount"))};v(t,r);let o=()=>{if(n)return;let i=Di(t,r);v(t,i)};t.isConnected?o():ve(()=>{o()},t)}function Fo(e,t){v(t,e)}function Bo(e){let[t,n]=C(e);return{provide(o){let i=t();return n(o),()=>n(i)},use(){return t},get(){return t()},set(o){n(o)},withContext(o,i){let s=t();n(o);try{return i()}finally{n(s)}}}}function Io(e){let t=e();return E()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[SibuJS strict] second run threw:",n)}}),t}function qo(e){if(!E())return O(e);let t=O(e),n=null;return queueMicrotask(()=>{try{n=O(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function jo(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function Uo(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=S(()=>{i=e(),a()}),l=(()=>t());return l.dispose=()=>{o||(o=!0,c())},l}var Vo=16;function Pi(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:Vo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,Vo)}function Ko(){let[e,t]=C(!1);function n(r){t(!0),Pi(()=>{let o;try{o=r()}catch{t(!1);return}o&&typeof o.then=="function"?o.then(()=>t(!1),()=>t(!1)):t(!1)})}return{pending:e,start:n}}var ot="__sibuPendingError";function Wo(e,t){let n=()=>{try{return e.parentNode?(e.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:t}})),!0):!1}catch{return!1}};e.parentNode&&n()||queueMicrotask(()=>{n()||(e[ot]=t)})}function Te(e){let t=e,n=t[ot];if(n instanceof Error)return delete t[ot],n}function it(e){let t=null;return function(){if(t)return t();let r=T({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;t=i.default;let s=t();r.replaceChildren(s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));w(`[SibuJS] lazy() failed to load component: ${s.message}`),r.replaceChildren(T({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Wo(r,s)}),r.appendChild(A("sibu-lazy-loading","Loading...")),v(r,()=>{o=!0}),r}}function st({nodes:e,fallback:t}){let n=T({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null;return v(n,()=>{o=!0,i&&(i.disconnect(),i=null)}),queueMicrotask(()=>{if(!o)try{let s=e();if(s.classList.contains("sibu-lazy")){if(!s.querySelector(".sibu-lazy-loading")){n.replaceChildren(s);return}i=new MutationObserver(()=>{if(o)return;s.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,n.replaceChildren(s))}),i.observe(s,{childList:!0,subtree:!0})}else n.replaceChildren(s)}catch(s){let a=s instanceof Error?s:new Error(String(s));w(`[SibuJS] Suspense nodes() threw: ${a.message}`),Wo(n,a)}}),n}var tc=E();function at(e){return e}var nc=1024*1024;var zi=E(),Fi=`
1
+ "use strict";var Sibu=(()=>{var je=Object.defineProperty;var mi=Object.getOwnPropertyDescriptor;var gi=Object.getOwnPropertyNames;var bi=Object.prototype.hasOwnProperty;var Tt=(e,t)=>{for(var n in t)je(e,n,{get:t[n],enumerable:!0})},hi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of gi(t))!bi.call(e,o)&&o!==n&&je(e,o,{get:()=>t[o],enumerable:!(r=mi(t,o))||r.enumerable});return e};var yi=e=>hi(je({},"__esModule",{value:!0}),e);var cs={};Tt(cs,{DynamicComponent:()=>po,ErrorBoundary:()=>ai,ErrorDisplay:()=>Ie,Fragment:()=>co,KeepAlive:()=>yo,Loading:()=>li,Portal:()=>lo,SVG_NS:()=>E,Suspense:()=>ut,__resetIdCounter:()=>Lo,a:()=>an,abbr:()=>cn,action:()=>xo,address:()=>Vt,area:()=>$n,array:()=>Bo,article:()=>zt,aside:()=>qt,asyncDerived:()=>Vo,audio:()=>Hn,autoResize:()=>wo,b:()=>ln,base:()=>_r,batch:()=>P,bdi:()=>un,bdo:()=>dn,bindDynamic:()=>Je,blockquote:()=>Zt,body:()=>Ot,br:()=>fn,button:()=>se,canvas:()=>Jn,caption:()=>Yn,catchError:()=>ko,catchErrorAsync:()=>Co,center:()=>Qr,checkLeaks:()=>Mt,circle:()=>Mr,cite:()=>pn,clickOutside:()=>vo,clipPath:()=>jr,code:()=>Pe,col:()=>er,colgroup:()=>tr,context:()=>Jo,copyOnClick:()=>So,createId:()=>_o,customElement:()=>eo,data:()=>mn,datalist:()=>lr,dd:()=>Qt,deepEqual:()=>de,deepSignal:()=>jo,defer:()=>Yo,defs:()=>Ir,del:()=>Qn,derived:()=>Fe,details:()=>Sr,dfn:()=>gn,dialog:()=>wr,disableSSR:()=>$o,dispose:()=>M,div:()=>T,dl:()=>Xt,dt:()=>Yt,each:()=>so,effect:()=>O,ellipse:()=>Rr,em:()=>bn,embed:()=>Fn,enableSSR:()=>Ro,enqueueBatchedSignal:()=>ae,fieldset:()=>ur,figcaption:()=>en,figure:()=>tn,font:()=>Xr,footer:()=>Bt,form:()=>dr,g:()=>$r,getSSRStore:()=>le,getSlot:()=>mo,h1:()=>Kt,h2:()=>Ut,h3:()=>Oe,h4:()=>Wt,h5:()=>Jt,h6:()=>Gt,head:()=>Ht,header:()=>Ft,hr:()=>nn,html:()=>Qe,i:()=>hn,iframe:()=>Bn,img:()=>On,input:()=>fr,ins:()=>Xn,isBatching:()=>No,isSSR:()=>ue,kbd:()=>yn,label:()=>pr,lazy:()=>lt,legend:()=>mr,li:()=>rn,line:()=>Hr,linearGradient:()=>Kr,link:()=>Lr,longPress:()=>To,main:()=>jt,map:()=>Dn,mark:()=>xn,marker:()=>Zr,marquee:()=>Yr,mask:()=>qr,match:()=>ho,math:()=>Wn,menu:()=>Er,meta:()=>Nr,meter:()=>gr,mount:()=>ro,nav:()=>It,nextTick:()=>Qo,noscript:()=>Gn,object:()=>In,ol:()=>on,on:()=>Do,onCleanup:()=>Wo,onMount:()=>ve,onUnmount:()=>Uo,optgroup:()=>br,option:()=>hr,output:()=>yr,p:()=>He,param:()=>jn,path:()=>Or,pattern:()=>Vr,picture:()=>qn,polygon:()=>Dr,polyline:()=>Pr,portal:()=>Vn,pre:()=>De,progress:()=>xr,q:()=>vn,radialGradient:()=>Ur,reactiveArray:()=>Io,rect:()=>zr,ref:()=>Fo,registerComponent:()=>uo,registerDisposer:()=>v,resolveComponent:()=>Ye,retrack:()=>te,rp:()=>Tn,rt:()=>Sn,ruby:()=>wn,runInSSRContext:()=>Ho,s:()=>En,samp:()=>kn,script:()=>Zn,section:()=>Pt,select:()=>vr,setGlobalErrorHandler:()=>Ao,setMaxDrainIterations:()=>Ue,show:()=>go,signal:()=>C,slot:()=>Cr,small:()=>Cn,source:()=>Kn,span:()=>A,stop:()=>Wr,store:()=>zo,strict:()=>Go,strictEffect:()=>Zo,strong:()=>An,style:()=>J,sub:()=>_n,summary:()=>kr,sup:()=>Ln,svg:()=>Un,symbol:()=>Gr,table:()=>nr,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>rr,td:()=>or,template:()=>Ar,text:()=>Fr,textarea:()=>Tr,tfoot:()=>ir,th:()=>sr,thead:()=>ar,time:()=>Nn,title:()=>Dt,tr:()=>cr,track:()=>Pn,transition:()=>ei,trapFocus:()=>Eo,trustHTML:()=>dt,tspan:()=>Br,u:()=>Mn,ul:()=>sn,unregisterComponent:()=>fo,untracked:()=>W,use:()=>Jr,var_:()=>Rn,video:()=>zn,watch:()=>Po,when:()=>bo,withSSR:()=>Oo,writable:()=>qo});var pt={};Tt(pt,{DynamicComponent:()=>po,ErrorBoundary:()=>ai,ErrorDisplay:()=>Ie,Fragment:()=>co,KeepAlive:()=>yo,Loading:()=>li,Portal:()=>lo,SVG_NS:()=>E,Suspense:()=>ut,__resetIdCounter:()=>Lo,a:()=>an,abbr:()=>cn,action:()=>xo,address:()=>Vt,area:()=>$n,array:()=>Bo,article:()=>zt,aside:()=>qt,asyncDerived:()=>Vo,audio:()=>Hn,autoResize:()=>wo,b:()=>ln,base:()=>_r,batch:()=>P,bdi:()=>un,bdo:()=>dn,bindDynamic:()=>Je,blockquote:()=>Zt,body:()=>Ot,br:()=>fn,button:()=>se,canvas:()=>Jn,caption:()=>Yn,catchError:()=>ko,catchErrorAsync:()=>Co,center:()=>Qr,checkLeaks:()=>Mt,circle:()=>Mr,cite:()=>pn,clickOutside:()=>vo,clipPath:()=>jr,code:()=>Pe,col:()=>er,colgroup:()=>tr,context:()=>Jo,copyOnClick:()=>So,createId:()=>_o,customElement:()=>eo,data:()=>mn,datalist:()=>lr,dd:()=>Qt,deepEqual:()=>de,deepSignal:()=>jo,defer:()=>Yo,defs:()=>Ir,del:()=>Qn,derived:()=>Fe,details:()=>Sr,dfn:()=>gn,dialog:()=>wr,disableSSR:()=>$o,dispose:()=>M,div:()=>T,dl:()=>Xt,dt:()=>Yt,each:()=>so,effect:()=>O,ellipse:()=>Rr,em:()=>bn,embed:()=>Fn,enableSSR:()=>Ro,enqueueBatchedSignal:()=>ae,fieldset:()=>ur,figcaption:()=>en,figure:()=>tn,font:()=>Xr,footer:()=>Bt,form:()=>dr,g:()=>$r,getSSRStore:()=>le,getSlot:()=>mo,h1:()=>Kt,h2:()=>Ut,h3:()=>Oe,h4:()=>Wt,h5:()=>Jt,h6:()=>Gt,head:()=>Ht,header:()=>Ft,hr:()=>nn,html:()=>Qe,i:()=>hn,iframe:()=>Bn,img:()=>On,input:()=>fr,ins:()=>Xn,isBatching:()=>No,isSSR:()=>ue,kbd:()=>yn,label:()=>pr,lazy:()=>lt,legend:()=>mr,li:()=>rn,line:()=>Hr,linearGradient:()=>Kr,link:()=>Lr,longPress:()=>To,main:()=>jt,map:()=>Dn,mark:()=>xn,marker:()=>Zr,marquee:()=>Yr,mask:()=>qr,match:()=>ho,math:()=>Wn,menu:()=>Er,meta:()=>Nr,meter:()=>gr,mount:()=>ro,nav:()=>It,nextTick:()=>Qo,noscript:()=>Gn,object:()=>In,ol:()=>on,on:()=>Do,onCleanup:()=>Wo,onMount:()=>ve,onUnmount:()=>Uo,optgroup:()=>br,option:()=>hr,output:()=>yr,p:()=>He,param:()=>jn,path:()=>Or,pattern:()=>Vr,picture:()=>qn,polygon:()=>Dr,polyline:()=>Pr,portal:()=>Vn,pre:()=>De,progress:()=>xr,q:()=>vn,radialGradient:()=>Ur,reactiveArray:()=>Io,rect:()=>zr,ref:()=>Fo,registerComponent:()=>uo,registerDisposer:()=>v,resolveComponent:()=>Ye,retrack:()=>te,rp:()=>Tn,rt:()=>Sn,ruby:()=>wn,runInSSRContext:()=>Ho,s:()=>En,samp:()=>kn,script:()=>Zn,section:()=>Pt,select:()=>vr,setGlobalErrorHandler:()=>Ao,setMaxDrainIterations:()=>Ue,show:()=>go,signal:()=>C,slot:()=>Cr,small:()=>Cn,source:()=>Kn,span:()=>A,stop:()=>Wr,store:()=>zo,strict:()=>Go,strictEffect:()=>Zo,strong:()=>An,style:()=>J,sub:()=>_n,summary:()=>kr,sup:()=>Ln,svg:()=>Un,symbol:()=>Gr,table:()=>nr,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>rr,td:()=>or,template:()=>Ar,text:()=>Fr,textarea:()=>Tr,tfoot:()=>ir,th:()=>sr,thead:()=>ar,time:()=>Nn,title:()=>Dt,tr:()=>cr,track:()=>Pn,transition:()=>ei,trapFocus:()=>Eo,trustHTML:()=>dt,tspan:()=>Br,u:()=>Mn,ul:()=>sn,unregisterComponent:()=>fo,untracked:()=>W,use:()=>Jr,var_:()=>Rn,video:()=>zn,watch:()=>Po,when:()=>bo,withSSR:()=>Oo,writable:()=>qo});function k(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var St=k();function $(e,t){if(St&&!e)throw new Error(`[SibuJS] ${t}`)}function w(e){St&&console.warn(`[SibuJS] ${e}`)}var xi=["http:","https:","mailto:","tel:","ftp:"];function q(e){let t=e.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!t)return"";let n=t.toLowerCase(),r=-1;for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);if(s===58){r=i;break}if(s===47||s===63||s===35)break}if(r===-1)return t;let o=n.slice(0,r+1);return/^[a-z][a-z0-9+.-]*:$/.test(o)&&xi.indexOf(o)===-1?"":t}function be(e){let t=e.split(","),n=[];for(let r=0;r<t.length;r++){let o=t[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i)continue;let s=q(i[1]);s&&n.push(i[2]?`${s}${i[2]}`:s)}return n.join(", ")}function qe(e){let n=e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(r,o)=>{let i=Number.parseInt(o,16);if(!Number.isFinite(i)||i<0||i>1114111)return"";try{return String.fromCodePoint(i)}catch{return""}}).toLowerCase().replace(/\s+/g,"");return n.includes("url(")||n.includes("expression(")||n.includes("javascript:")||n.includes("vbscript:")||n.includes("-moz-binding")||n.includes("behavior:")||n.includes("@import")||n.includes("image-set(")||n.includes("filter:progid")?"":e}var vi=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data"]);function U(e){return vi.has(e)}var Ti=k(),Ke=32,Si=128,G=new Array(Ke),I=Ke,H=-1,B=null,j="__s";function Ae(e,t){let n=t.size;n===0?(e.__f=void 0,delete e[j]):n===1?e.__f=t.values().next().value:e.__f=void 0}var D=0,F=[],N=new Set,wi=[];function Et(e){try{e()}catch(t){Ti&&w(`Subscriber threw during notification: ${t instanceof Error?t.message:String(t)}`)}}var _e=0,Ne=!1,Ei=0;function te(e,t){let n=B;B=t;let r=t,o=++Ei;r._epoch=o;try{e()}finally{B=n,ki(r,o)}}function ki(e,t){if(e._dep!==void 0){if(e._depEpoch!==t){let o=e._dep,i=o[j];i?.delete(e)&&Ae(o,i),e._dep=void 0,e._depEpoch=void 0}return}let n=e._deps;if(!n||n.size===0)return;let r;for(let[o,i]of n)i!==t&&(r??(r=[])).push(o);if(r)for(let o of r){n.delete(o);let i=o,s=i[j];s?.delete(e)&&Ae(i,s)}}function S(e,t){t||(t=e),wt(t),++H,H>=I&&(I*=2,G.length=I),G[H]=t,B=t;try{e()}finally{H--,B=H>=0?G[H]:null,H<0&&I>Si&&(I=Math.max(Ke,I>>>1),G.length=I)}return()=>wt(t)}function Ci(){_e===0&&(++H,H>=I&&(I*=2,G.length=I),G[H]=null,B=null,Ne=!0),_e++}function Ai(){_e--,_e===0&&(H--,B=H>=0?G[H]:null,Ne=!1)}function W(e){Ci();try{return e()}finally{Ai()}}function ne(e){if(!B)return;let t=B,n=t._epoch;if(t._dep===e){t._depEpoch=n;return}let r=t._deps;if(r)r.set(e,n);else if(t._dep!==void 0){let a=new Map;a.set(t._dep,t._depEpoch),a.set(e,n),t._deps=a,t._dep=void 0,t._depEpoch=void 0}else t._dep=e,t._depEpoch=n;let o=e,i=o[j];i||(i=new Set,o[j]=i);let s=i.size;i.add(B),i.size!==s&&(i.size===1?o.__f=B:o.__f!==void 0&&(o.__f=void 0))}function kt(e){let t=e[j];if(t)for(let n of t)n._c?he(n):N.has(n)||(N.add(n),F.push(n))}var Ct=50,Le=1e6,ye=0;function Ue(e){let t=Le;return Number.isFinite(e)&&e>0&&(Le=Math.floor(e)),t}function At(e){let t=e;return t._runEpoch!==ye?(t._runEpoch=ye,t._runs=1,!1):++t._runs>Ct}function _t(e){if(typeof console<"u"){let t=e.__name??"<unnamed>";console.error(`[SibuJS] subscriber "${t}" fired more than ${Ct} times \u2014 likely a write-reads-self cycle between effects/signals. Breaking to prevent infinite loop.`)}}function _i(){typeof console<"u"&&console.error(`[SibuJS] Notification drain exceeded ${Le} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`)}function Ve(){let e=0;for(;e<F.length;){if(e>=Le){_i();break}let t=F[e++];if(At(t)){_t(t);break}N.delete(t),Et(t)}}function Lt(){if(!(D>0)){D++,ye++;try{Ve()}finally{D--,D===0&&(F.length=0,N.clear())}}}function he(e){e();let t=e._sig;if(!t)return;let n=wi,r=n.length;for(n.push(t);n.length>r;){let o=n.pop(),i=o.__f;if(i){if(i._c){let a=i._sig;a._d||(a._d=!0,n.push(a))}else N.has(i)||(N.add(i),F.push(i));continue}let s=o[j];if(s)for(let a of s)if(a._c){let c=a._sig;c&&!c._d?(c._d=!0,n.push(c)):c||a()}else N.has(a)||(N.add(a),F.push(a))}}function Me(e){let t=e.__f;if(t){if(D>0){t._c?he(t):N.has(t)||(N.add(t),F.push(t));return}D++,ye++;try{t._c?he(t):At(t)?_t(t):Et(t),Ve()}finally{D--,D===0&&(F.length=0,N.clear())}return}let n=e[j];if(!(!n||n.size===0)){if(D>0){for(let r of n)r._c?he(r):N.has(r)||(N.add(r),F.push(r));return}D++,ye++;try{for(let r of n)r._c?he(r):N.has(r)||(N.add(r),F.push(r));Ve()}finally{D--,D===0&&(F.length=0,N.clear())}}}function wt(e){let t=e,n=t._dep;if(n!==void 0){let o=n,i=o[j];i?.delete(e)&&Ae(o,i),t._dep=void 0,t._depEpoch=void 0;return}let r=t._deps;if(!(!r||r.size===0)){for(let o of r.keys()){let i=o,s=i[j];s?.delete(e)&&Ae(i,s)}r.clear()}}var Re=k();function We(e,t,n){e[t]=n}function Li(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}function $e(e,t,n){if(Li(t))return Re&&w(`bindAttribute: refusing to bind event-handler attribute "${t}". Use on:{ ${t.slice(2)}: fn } instead.`),()=>{};function r(){let i;try{i=n()}catch(a){Re&&w(`bindAttribute: getter for "${t}" threw: ${a instanceof Error?a.message:String(a)}`);return}if(typeof i=="boolean"){t in e&&(t==="checked"||t==="disabled"||t==="selected")?We(e,t,i):i?e.setAttribute(t,""):e.removeAttribute(t);return}let s=String(i);(t==="value"||t==="checked")&&t in e?We(e,t,t==="checked"?!!i:s):e.setAttribute(t,U(t)?q(s):s)}return S(r)}function Je(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){Re&&w(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof n=="function"?n():n}catch(l){Re&&w(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;r!==null&&r!==s&&e.removeAttribute(r);let c=String(a);(s==="value"||s==="checked")&&s in e?We(e,s,s==="checked"?!!a:c):e.setAttribute(s,U(s)?q(c):c),r=s}let i=S(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Nt=k();function Z(e,t){let n=[];function r(){let o;try{o=t()}catch(l){Nt&&w(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let d=n[l];d.parentNode&&d.parentNode.removeChild(d)}n.length=0;return}let i=e.parentNode;if(!i){n.length=0;return}let s;if(Array.isArray(o)){s=[];let l=new Set;for(let d=0;d<o.length;d++){let m=o[d];if(m==null||typeof m=="boolean")continue;let b=m instanceof Node?m:document.createTextNode(String(m));if(l.has(b)){Nt&&w("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(b),s.push(b)}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a;if(n.length>0&&s.length>0){let l=new Set(n);a=new Set;for(let d=0;d<s.length;d++)l.has(s[d])&&a.add(s[d])}for(let l=0;l<n.length;l++){let d=n[l];a?.has(d)||d.parentNode&&d.parentNode.removeChild(d)}let c=e.nextSibling;for(let l=0;l<s.length;l++){let d=s[l];a?.has(d)&&d.parentNode===i?d.nextSibling!==c&&i.insertBefore(d,c):i.insertBefore(d,c)}n=s}return S(r)}var re=new WeakMap,oe=k(),ie=0;function v(e,t){let n=re.get(e);n||(n=[],re.set(e,n)),n.push(t),oe&&ie++}function M(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--){let o=n[r],i=re.get(o);if(i){let s=i.slice();re.delete(o),oe&&(ie-=s.length);for(let c of s)try{c()}catch(l){oe&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",l)}let a=0;for(;a++<8;){let c=re.get(o);if(!c||c.length===0)break;let l=c.slice();re.delete(o),oe&&(ie-=l.length);for(let d of l)try{d()}catch(m){oe&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",m)}}}}}function Mt(e=0){return oe?(e>0&&ie>e&&w(`checkLeaks: ${ie} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),ie):0}var E="http://www.w3.org/2000/svg",Rt=k(),Ni=new Set(["script","iframe","object","embed","frame","frameset"]);function Mi(e){let t=e.toLowerCase();if(Ni.has(t))throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`)}var Ri=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function $i(e,t,n){e[t]=n}var $t=new Map;function Hi(e){let t=$t.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),$t.set(e,t)),t}function Oi(e,t){if(typeof t=="function"){let r=S(()=>{e.setAttribute("style",t())});v(e,r);return}if(typeof t=="string"){e.setAttribute("style",t);return}let n=e;for(let r in t){let o=t[r],i=Hi(r);if(typeof o=="function"){let s=o,a=S(()=>{n.style.setProperty(i,qe(String(s())))});v(e,a)}else n.style.setProperty(i,qe(String(o)))}}function Di(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=S(()=>{e.setAttribute("class",t())});v(e,i);return}let n=t,r=!1,o="";for(let i in n){let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=S(()=>{let a="";for(let c in n){let l=n[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)});v(e,s)}else e.setAttribute("class",o)}function Ge(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),v(e,Z(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),v(e,Z(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),v(e,Z(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)))}}}var u=(e,t)=>(n,r)=>{Mi(e);let o=t?document.createElementNS(t,e):document.createElement(e);if(n===void 0)return o;if(typeof n=="string")return r!==void 0?(o.setAttribute("class",n),Ge(o,r),o):(o.textContent=n,o);if(typeof n=="number")return o.textContent=String(n),o;if(Array.isArray(n)||n instanceof Node||typeof n=="function")return Ge(o,n),o;let i=n,s=i.class;s!=null&&Di(o,s);let a=i.id;a!=null&&(Rt&&typeof a=="string"&&Ri.has(a.toLowerCase())&&w(`tagFactory: element id="${a}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),o.id=a);let c=r!==void 0?r:i.nodes;c!=null&&Ge(o,c);let l=i.on;if(l)for(let b in l){let f=l[b];typeof f=="function"?o.addEventListener(b,f):Rt&&w(`tagFactory: on.${b} handler is not a function (got ${typeof f}). Event listener was not attached.`)}let d=i.style;d!=null&&Oi(o,d);let m=i.ref;m&&(m.current=o);for(let b in i)switch(b){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let f=i[b];if(f==null)continue;let p=b.toLowerCase();if(p[0]==="o"&&p[1]==="n")continue;if(typeof f=="function")v(o,$e(o,b,f));else if(typeof f=="boolean")b in o&&(b==="checked"||b==="disabled"||b==="selected")?$i(o,b,f):f?o.setAttribute(b,""):o.removeAttribute(b);else{let g=String(f);p==="srcset"?o.setAttribute(b,be(g)):U(p)?o.setAttribute(b,q(g)):o.setAttribute(b,g)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var Ms=u("html"),Ht=u("head"),Ot=u("body"),Dt=u("title"),T=u("div"),A=u("span"),Pt=u("section"),zt=u("article"),Ft=u("header"),Bt=u("footer"),It=u("nav"),jt=u("main"),qt=u("aside"),Vt=u("address"),He=u("p"),Kt=u("h1"),Ut=u("h2"),Oe=u("h3"),Wt=u("h4"),Jt=u("h5"),Gt=u("h6"),Zt=u("blockquote"),Qt=u("dd"),Xt=u("dl"),Yt=u("dt"),en=u("figcaption"),tn=u("figure"),nn=u("hr"),rn=u("li"),on=u("ol"),sn=u("ul"),De=u("pre"),an=u("a"),cn=u("abbr"),ln=u("b"),un=u("bdi"),dn=u("bdo"),fn=u("br"),pn=u("cite"),Pe=u("code"),mn=u("data"),gn=u("dfn"),bn=u("em"),hn=u("i"),yn=u("kbd"),xn=u("mark"),vn=u("q"),Tn=u("rp"),Sn=u("rt"),wn=u("ruby"),En=u("s"),kn=u("samp"),Cn=u("small"),An=u("strong"),_n=u("sub"),Ln=u("sup"),Nn=u("time"),Mn=u("u"),Rn=u("var"),$n=u("area"),Hn=u("audio"),On=u("img"),Dn=u("map"),Pn=u("track"),zn=u("video"),Fn=u("embed"),Bn=u("iframe"),In=u("object"),jn=u("param"),qn=u("picture"),Vn=u("portal"),Kn=u("source"),Un=u("svg",E),Wn=u("math"),Jn=u("canvas"),Gn=u("noscript"),Zn=u("script"),Qn=u("del"),Xn=u("ins"),Yn=u("caption"),er=u("col"),tr=u("colgroup"),nr=u("table"),rr=u("tbody"),or=u("td"),ir=u("tfoot"),sr=u("th"),ar=u("thead"),cr=u("tr"),se=u("button"),lr=u("datalist"),ur=u("fieldset"),dr=u("form"),fr=u("input"),pr=u("label"),mr=u("legend"),gr=u("meter"),br=u("optgroup"),hr=u("option"),yr=u("output"),xr=u("progress"),vr=u("select"),Tr=u("textarea"),Sr=u("details"),wr=u("dialog"),Er=u("menu"),kr=u("summary"),Cr=u("slot"),Ar=u("template"),_r=u("base"),Lr=u("link"),Nr=u("meta"),J=u("style"),Mr=u("circle",E),Rr=u("ellipse",E),$r=u("g",E),Hr=u("line",E),Or=u("path",E),Dr=u("polygon",E),Pr=u("polyline",E),zr=u("rect",E),Fr=u("text",E),Br=u("tspan",E),Ir=u("defs",E),jr=u("clipPath",E),qr=u("mask",E),Vr=u("pattern",E),Kr=u("linearGradient",E),Ur=u("radialGradient",E),Wr=u("stop",E),Jr=u("use",E),Gr=u("symbol",E),Zr=u("marker",E),Qr=u("center"),Xr=u("font"),Yr=u("marquee"),eo=e=>u(e);var Pi=k(),zi=new Set(["script","style"]),Fi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),to=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),no=new WeakMap;function Bi(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]===`
2
+ `||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 x=[],L=[],z="";for(;r<o&&n[r]!==p;){let Se=s();Se>=0?(x.push(z),z="",L.push(Se)):z+=n[r++]}return r<o&&r++,x.push(z),L.length===0?{kind:"static",value:x[0]}:{kind:"mixed",statics:x,exprs:L}}let g=r;for(;r<o;){let x=n.charCodeAt(r);if(x===32||x===9||x===10||x===13||x===62||x===47)break;r++}return{kind:"static",value:n.slice(g,r)}}function l(){let f=[];for(;r<o&&(i(),!(n[r]===">"||n[r]==="/"));){let p=r;for(;r<o;){let x=n.charCodeAt(r);if(x>=97&&x<=122||x>=65&&x<=90||x>=48&&x<=57||x===45||x===58||x===95||x===46)r++;else break}let g=n.slice(p,r);if(!g)break;let h=c();g.startsWith("on:")?h.kind==="expr"&&f.push({t:3,name:g.slice(3),idx:h.idx}):h.kind==="bool"?f.push({t:4,name:g}):h.kind==="static"?f.push({t:0,name:g,value:h.value}):h.kind==="expr"?f.push({t:1,name:g,idx:h.idx}):h.kind==="mixed"&&f.push({t:2,name:g,statics:h.statics,exprs:h.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function m(f){let p="";for(;r<o&&n[r]!=="<";){let h=s();if(h>=0){let x=d(p);x&&f.push({t:1,value:x}),p="",f.push({t:2,idx:h})}else p+=n[r++]}let g=d(p);g&&f.push({t:1,value:g})}function b(){let f=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){r++;let p=a(),g=l();i();let h=Fi.has(p),x=n[r]==="/";if(x&&r++,r<o&&r++,h||x)f.push({t:0,el:{tag:p,svg:to.has(p),attrs:g,children:[]}});else{let L=b();if(zi.has(p.toLowerCase())){for(let z=0;z<L.length;z++)if(L[z].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${p}> (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:p,svg:to.has(p),attrs:g,children:L}})}}else m(f);return f}return b()}function Ze(e,t){let n=e.svg?document.createElementNS(E,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:n.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=i.toLowerCase();if(s[0]==="o"&&s[1]==="n")break;let a=t[o.idx];if(typeof a=="function")v(n,$e(n,i,a));else if(a!=null){let c=String(a);s==="srcset"?n.setAttribute(i,be(c)):U(s)?n.setAttribute(i,q(c)):n.setAttribute(i,c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++){let c=t[o.exprs[a]];i+=(c==null?"":String(c))+o.statics[a+1]}let s=o.name.toLowerCase();s==="srcset"?n.setAttribute(o.name,be(i)):U(s)?n.setAttribute(o.name,q(i)):n.setAttribute(o.name,i);break}case 3:{let i=t[o.idx];typeof i=="function"?n.addEventListener(o.name,i):Pi&&w(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:n.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(Ze(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),v(n,Z(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 Qe(e,...t){let n=no.get(e);if(n||(n=Bi(e),no.set(e,n)),n.length===1&&n[0].t===0)return Ze(n[0].el,t);let r=document.createElement("div");for(let o=0;o<n.length;o++){let i=n[o];switch(i.t){case 0:r.appendChild(Ze(i.el,t));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=t[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),v(r,Z(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let c=s[a];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else s!=null&&typeof s!="boolean"&&r.appendChild(document.createTextNode(String(s)));break}}}return r.childNodes.length===1&&r.firstChild instanceof Element?r.firstChild:r}function ro(e,t){if(!t)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");$(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=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-n:0;t.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:t,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),M(r),r.parentNode&&r.parentNode.removeChild(r)}}}var oo=k();function io(e){return typeof e=="function"?io(e()):e instanceof Node?e:document.createTextNode(String(e))}function Ii(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,d=n.length;for(;l<d;){let m=l+d>>1;e[n[m]]<c?l=m+1:d=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 so(e,t,n){$(typeof e=="function","each: first argument must be a function that returns an array."),$(typeof t=="function","each: second argument must be a render function."),$(n&&typeof n.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,l=new Map,d=new Map,m=[],b=[],f=new Uint8Array(0),p=new Map,g=[],h=[],x=new Map,L=!1,z=!1,Se=n.key,mt=()=>{let gt=e(),_=gt.length,we=r.parentNode;if(!we)return;z||(we.insertBefore(o,r.nextSibling),z=!0),b.length<_&&(b=new Array(_));for(let y=0;y<_;y++)b[y]=Se(gt[y]);let me=b;m.length<_&&(m=new Array(_)),d.clear(),x.clear();for(let y=0;y<_;y++)x.set(me[y],y);for(let y=0;y<_;y++){let R=me[y],ht=l.get(R),ge;if(ht!==void 0)ge=ht;else{let yt=R,fi=()=>W(()=>e()[x.get(yt)]),pi=()=>x.get(yt);try{ge=io(t(fi,pi))}catch(ee){oo&&w(`each: render threw for item at index ${y} (key="${me[y]}"): ${ee instanceof Error?ee.message:String(ee)}`),ge=document.createComment(`each:error:${y}`);let xt=ee instanceof Error?ee:new Error(String(ee));queueMicrotask(()=>{try{let vt=r.parentNode;vt?.dispatchEvent?vt.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:xt}})):oo&&w(`each: error not surfaced \u2014 anchor detached: ${xt.message}`)}catch{}})}}d.set(R,ge),m[y]=ge}for(let[y,R]of l)d.has(y)||(M(R),R.parentNode&&we.removeChild(R));if(_===0){c=0;let y=l;l=d,d=y;return}p.clear();for(let y=0;y<c;y++)p.set(a[y],y);g.length<_&&(g=new Array(_),h=new Array(_));let Ee=0;for(let y=0;y<_;y++){let R=p.get(me[y]);R!==void 0&&(g[Ee]=y,h[Ee]=R,Ee++)}let bt=Ii(h,Ee);f.length<_?f=new Uint8Array(_):f.fill(0,0,_);for(let y=0;y<bt.length;y++)f[g[bt[y]]]=1;let ke=o;for(let y=_-1;y>=0;y--){let R=m[y];f[y]||R.nextSibling!==ke&&we.insertBefore(R,ke),ke=R}let Ce=a===i?s:i;Ce.length<_&&(Ce.length=_);for(let y=0;y<_;y++)Ce[y]=me[y];a=Ce,c=_;let di=l;l=d,d=di,L=!0},ui=S(mt);return v(r,ui),L||queueMicrotask(()=>{!L&&r.parentNode&&mt()}),r}function co(e){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"||t.appendChild(ao(r));else t.appendChild(ao(n));return t}function ao(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let t=e();return t instanceof Node?t:document.createTextNode(String(t??""))}return document.createTextNode(String(e))}function lo(e,t){let n=document.createComment("portal"),r=t||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){typeof console<"u"&&console.error("[Portal] Render error:",s);let a=s instanceof Error?s:new Error(String(s));queueMicrotask(()=>{try{let c=n.parentNode;c?.dispatchEvent&&c.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:a}}))}catch{}})}}),v(n,()=>{i=!0,o&&(M(o),o.remove(),o=null)}),n}var Xe=new Map;function uo(e,t){Xe.set(e,t)}function fo(e){Xe.delete(e)}function Ye(e){let t=Xe.get(e);return t?t():T({nodes:`[Component "${e}" not found]`})}function po(e){let t=T({class:"sibu-dynamic"});function n(){let o=e(),i;typeof o=="function"?i=o():i=Ye(o);for(let s of Array.from(t.childNodes))M(s);t.replaceChildren(i)}let r=S(n);return v(t,r),t}function mo(e,t="default"){return e?.[t]}function go(e,t){return S(()=>{t.style.display=e()?"":"none"}),t}function bo(e,t,n){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let c=e(),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let d=c?t():n?n():null;if(d!=null){let m=d instanceof Node?d:document.createTextNode(String(d));l.insertBefore(m,r.nextSibling),o=m}s=!0};return S(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function ho(e,t,n){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let c=String(e()),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let d=t[c]||n;if(d){let m=d();if(m!=null){let b=m instanceof Node?m:document.createTextNode(String(m));l.insertBefore(b,r.nextSibling),o=b}}s=!0};return S(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function yo(e,t,n){let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??10;s===0&&k()&&w("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,l=!1,d=!1,m=()=>{if(d)return;let f=e(),p=r.parentNode;if(!p||l&&f===a)return;c?.parentNode&&p.removeChild(c),a=f;let g=o.get(f);if(g){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(g=h(),o.set(f,g),i.push(f),s>0&&i.length>s){let x=i.shift(),L=o.get(x);L&&(M(L),L.parentNode&&L.parentNode.removeChild(L),o.delete(x))}}p.insertBefore(g,r.nextSibling),c=g,l=!0},b=S(m);return l||queueMicrotask(()=>{!l&&r.parentNode&&m()}),v(r,()=>{d=!0,b();for(let f of o.values())M(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function xo(e,t,n){let r=t(e,n);typeof r=="function"&&v(e,r)}var vo=(e,t)=>{let n=r=>{e.contains(r.target)||t()};return document.addEventListener("pointerdown",n,!0),()=>document.removeEventListener("pointerdown",n,!0)},To=(e,t)=>{let n=t.duration??500,r=null,o=()=>{r=setTimeout(()=>{t.callback(),r=null},n)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},So=(e,t)=>{let n=()=>{let r=typeof t=="function"?t():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",n),()=>e.removeEventListener("click",n)},wo=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)},Eo=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];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)};var Q=null;function ko(e,t){try{let n=e();return n&&typeof n.then=="function"&&n.catch(r=>{t?t(r,"async"):Q?Q(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),n}catch(n){return t?t(n,"sync"):Q?Q(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function Co(e,t){try{return await e()}catch(n){return t?t(n,"async"):Q?Q(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function Ao(e){Q=e}var et=0;function _o(e="sibu"){return et++,`${e}-${et}`}function Lo(){et=0}var xe=0,tt=new Set;function P(e){xe++;try{return e()}finally{xe--,xe===0&&ji()}}function ae(e){return xe===0?!1:(tt.add(e),!0)}function No(){return xe>0}function ji(){try{for(let e of tt)kt(e)}finally{tt.clear()}Lt()}var Mo=globalThis,nt=k();function C(e,t){let n={value:e},r=nt?t?.name:void 0,o=t?.equals;r&&(n.__name=r);function i(){return ne(n),n.value}i.__signal=n,r&&(i.__name=r);function s(a){let c=typeof a=="function"?a(n.value):a;if(!(o?o(n.value,c):Object.is(c,n.value))){if(nt){let l=n.value;n.value=c;let d=Mo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:n,name:r,oldValue:l,newValue:c})}else n.value=c;ae(n)||Me(n)}}if(nt){let a=Mo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}var ce=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let e=Function("return typeof require==='function'?require:null")();if(e){let t=e("node:async_hooks");ce=new t.AsyncLocalStorage}}}catch{ce=null}var X={ssr:!1,suspenseIdCounter:0};function le(){if(ce){let e=ce.getStore();if(e)return e}return X}function ue(){return le().ssr}function Ro(){le().ssr=!0}function $o(){le().ssr=!1}function Ho(e){let t={ssr:!0,suspenseIdCounter:0};if(ce)return ce.run(t,e);let n=X.ssr,r=X.suspenseIdCounter;X.ssr=!0,X.suspenseIdCounter=0;try{return e()}finally{X.ssr=n,X.suspenseIdCounter=r}}function Oo(e){let t=le(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var ze=globalThis;function Do(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,W(()=>t(o,void 0));else{let i=n;n=o,W(()=>t(o,i))}}}function O(e,t){if($(typeof e=="function","effect: argument must be a function."),ue())return()=>{};let n=t?.onError,r=[],o=g=>{r.push(g)},i=()=>{if(r.length===0)return;let g=r;r=[];for(let h=g.length-1;h>=0;h--)try{g[h]()}catch(x){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw:",x)}},s=()=>e(o),a=n?()=>{try{s()}catch(g){n(g)}}:s,c=()=>{},l=!1,d=!1,m=100,b=()=>{if(l){d=!0;return}l=!0;try{let g=0;do if(d=!1,i(),c(),c=S(a,b),++g>m){ze.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.error(`[SibuJS] effect re-requested itself ${m}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),d=!1;break}while(d)}finally{l=!1,d=!1}};l=!0;try{let g=0;do if(d=!1,i(),c(),c=S(a,b),++g>m){ze.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.error(`[SibuJS] effect re-requested itself ${m}+ times on initial run \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),d=!1;break}while(d)}finally{l=!1,d=!1}let f=ze.__SIBU_DEVTOOLS_GLOBAL_HOOK__;f&&f.emit("effect:create",{effectFn:e});let p=!1;return()=>{if(p)return;p=!0;let g=ze.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(g)try{g.emit("effect:destroy",{effectFn:e})}catch{}try{i()}catch(h){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",h)}try{c()}catch(h){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",h)}}}function Fe(e,t){$(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r=t?.equals,o={};o._d=!1,o._g=e;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o,S(()=>{let l=!0;try{o._v=e(),o._d=!1,l=!1}finally{l&&(o._d=!0)}},i);let s=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,a=!1;function c(){if(a)throw new Error(`[SibuJS] Circular dependency detected in derived${n?` "${n}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(Ne){if(o._d){a=!0;let l=!0;try{te(()=>{o._v=e(),o._d=!1,l=!1},i)}finally{a=!1,l&&(o._d=!0)}}return o._v}if(ne(o),o._d){let l=o._v;a=!0;let d=!0;try{te(()=>{let m=e();o._v=r&&o._v!==void 0&&r(o._v,m)?o._v:m,o._d=!1,d=!1},i)}finally{a=!1,d&&(o._d=!0)}s&&l!==o._v&&s.emit("computed:update",{signal:o,oldValue:l,newValue:o._v})}return o._v}return n&&(c.__name=n,o.__name=n),c.__signal=o,s&&s.emit("computed:create",{signal:o,name:n,getter:c}),c}function Po(e,t){if($(typeof e=="function","watch: first argument must be a getter function."),$(typeof t=="function","watch: second argument must be a callback function."),ue())return()=>{};let n,r=!0;return S(()=>{let s=e();if(r){n=s,r=!1;return}Object.is(s,n)||(t(s,n),n=s)})}function zo(e){$(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t={};Object.keys(e).forEach(c=>{let[l,d]=C(e[c]);t[c]=[l,d]});let n=new Proxy({},{get(c,l){if(l in t){let d=t[l][0];return d()}},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=>{c[l]=t[l][0]()}),c};return[n,{setState:c=>{let l=r(),d=typeof c=="function"?c(l):c;P(()=>{Object.entries(d).forEach(([m,b])=>{m in t&&t[m][1](b)})})},reset:()=>{P(()=>{Object.keys(e).forEach(c=>{let l=t[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return O(()=>{let d=r();if(l){l=!1;return}c(d)})},subscribeKey:(c,l)=>{let d,m=!0;return O(()=>{let b=t[c][0]();if(m){d=b,m=!1;return}if(!Object.is(b,d)){let f=d;d=b,l(b,f)}})},getSnapshot:r}]}function Fo(e){let[t,n]=C(e);return{get current(){return t()},set current(r){n(r)}}}function Bo(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=0,...s){let a=[];return n(c=>{let l=[...c];return a=l.splice(o,i,...s),l}),a},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 Io(e=[]){let t=[...e],n=null,r={};function o(){n=null,ae(r)||Me(r)}function i(){if(ne(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=0,...l){let d=t.splice(a,c,...l);return(d.length>0||l.length>0)&&o(),d},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 d=0;d<t.length;d++)if(a(t[d])){let m=c(t[d]);Object.is(t[d],m)||(t[d]=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 d=a(t[l],l);Object.is(t[l],d)||(t[l]=d,c=!0)}c&&o()},clear(){t.length!==0&&(t=[],o())}}]}function de(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 c=t;return e.source===c.source&&e.flags===c.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 c=t;if(e.size!==c.size)return!1;for(let[l,d]of e)if(!c.has(l)||!de(d,c.get(l),n))return!1;return!0}if(e instanceof Set){let c=t;if(e.size!==c.size)return!1;for(let l of e)if(!c.has(l))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),l=new Uint8Array(t);if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){let c=e,l=t;if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((c,l)=>de(c,t[l],n));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>de(r[c],o[c],n))}function jo(e){return C(e,{equals:(t,n)=>de(t,n)})}function qo(e,t,n){return[Fe(e,n),i=>{P(()=>t(i))}]}function Vo(e,t){let[n,r]=C(t),[o,i]=C(!1),[s,a]=C(null),[c,l]=C(0),d=0;return O(()=>{c();let m=++d;P(()=>{i(!0),a(null)});let b;try{b=e()}catch(f){P(()=>{a(f),i(!1)});return}b.then(f=>{m===d&&P(()=>{r(f),i(!1)})},f=>{m===d&&P(()=>{a(f),i(!1)})})}),{value:n,loading:o,error:s,refresh:()=>l(m=>m+1)}}function st(e,t){try{return e()}catch(n){w(`${t}: callback threw: ${n instanceof Error?n.message:String(n)}`);return}}function rt(e,t,n){let r=st(e,t);typeof r=="function"&&n&&v(n,r)}var fe=new WeakMap,Y=new WeakMap,V=new Set,K=new Set,pe=null,Be=0,qi=256;function ot(e){let t=fe.get(e);if(t){fe.delete(e),V.delete(e);for(let n of t)try{n()}catch{}}}function it(e){Y.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Y.get(e);if(n){Y.delete(e),K.delete(e);for(let r of n)try{r()}catch{}}})}function Vi(e){if(V.size===0||e.nodeType!==1)return;let t=e;if(V.has(t)&&t.isConnected&&ot(t),t.firstElementChild)for(let n of Array.from(V))n!==t&&n.isConnected&&t.contains(n)&&ot(n)}function Ki(e){if(K.size===0||e.nodeType!==1)return;let t=e;if(K.has(t)&&!t.isConnected&&it(t),t.firstElementChild)for(let n of Array.from(K))n!==t&&!n.isConnected&&t.contains(n)&&it(n)}function Ui(){if(V.size>0)for(let e of Array.from(V))e.isConnected&&ot(e);if(K.size>0)for(let e of Array.from(K))e.isConnected||it(e)}function Ko(){pe||typeof document>"u"||(pe=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++)Vi(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Ki(t.removedNodes[n])}Be+=e.length,Be>=qi&&(Be=0,Ui()),at()}),pe.observe(document.body,{childList:!0,subtree:!0}))}function at(){pe&&V.size===0&&K.size===0&&(pe.disconnect(),pe=null,Be=0)}function Wi(e,t){let n=fe.get(e);return n||(n=[],fe.set(e,n)),n.push(t),V.add(e),Ko(),()=>{let r=fe.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(fe.delete(e),V.delete(e))}at()}}function Ji(e,t){let n=Y.get(e);return n||(n=[],Y.set(e,n)),n.push(t),K.add(e),Ko(),()=>{let r=Y.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Y.delete(e),K.delete(e))}at()}}function ve(e,t){if(!(typeof document>"u"))if(t){let n=!1;if(v(t,()=>{n=!0}),t.isConnected){queueMicrotask(()=>{n||rt(e,"onMount",t)});return}queueMicrotask(()=>{if(n)return;if(t.isConnected){rt(e,"onMount",t);return}let r=Wi(t,()=>{n||rt(e,"onMount",t)});v(t,r)})}else queueMicrotask(()=>{st(e,"onMount")})}function Uo(e,t){if(typeof document>"u")return;let n=!1,r=()=>{n||(n=!0,st(e,"onUnmount"))};v(t,r);let o=()=>{if(n)return;let i=Ji(t,r);v(t,i)};t.isConnected?o():ve(()=>{o()},t)}function Wo(e,t){v(t,e)}function Jo(e){let[t,n]=C(e);return{provide(o){let i=t();return n(o),()=>n(i)},use(){return t},get(){return t()},set(o){n(o)},withContext(o,i){let s=t();n(o);try{return i()}finally{n(s)}}}}function Go(e){let t=e();return k()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[SibuJS strict] second run threw:",n)}}),t}function Zo(e){if(!k())return O(e);let t=O(e),n=null;return queueMicrotask(()=>{try{n=O(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function Qo(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function Yo(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=S(()=>{i=e(),a()}),l=(()=>t());return l.dispose=()=>{o||(o=!0,c())},l}var Xo=16;function Gi(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:Xo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,Xo)}function ei(){let[e,t]=C(!1);function n(r){t(!0),Gi(()=>{let o;try{o=r()}catch{t(!1);return}o&&typeof o.then=="function"?o.then(()=>t(!1),()=>t(!1)):t(!1)})}return{pending:e,start:n}}var ct="__sibuPendingError";function ti(e,t){let n=()=>{try{return e.parentNode?(e.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:t}})),!0):!1}catch{return!1}};e.parentNode&&n()||queueMicrotask(()=>{n()||(e[ct]=t)})}function Te(e){let t=e,n=t[ct];if(n instanceof Error)return delete t[ct],n}function lt(e){let t=null;return function(){if(t)return t();let r=T({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;t=i.default;let s=t();r.replaceChildren(s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));w(`[SibuJS] lazy() failed to load component: ${s.message}`),r.replaceChildren(T({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),ti(r,s)}),r.appendChild(A("sibu-lazy-loading","Loading...")),v(r,()=>{o=!0}),r}}function ut({nodes:e,fallback:t}){let n=T({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null;return v(n,()=>{o=!0,i&&(i.disconnect(),i=null)}),queueMicrotask(()=>{if(!o)try{let s=e();if(s.classList.contains("sibu-lazy")){if(!s.querySelector(".sibu-lazy-loading")){n.replaceChildren(s);return}i=new MutationObserver(()=>{if(o)return;s.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,n.replaceChildren(s))}),i.observe(s,{childList:!0,subtree:!0})}else n.replaceChildren(s)}catch(s){let a=s instanceof Error?s:new Error(String(s));w(`[SibuJS] Suspense nodes() threw: ${a.message}`),ti(n,a)}}),n}var pc=k();function dt(e){return e}var mc=1024*1024;var Zi=k(),Qi=`
3
3
  .sibu-error-display {
4
4
  border: 1px solid var(--sibu-err-border, #e5484d);
5
5
  border-radius: 10px;
@@ -180,11 +180,11 @@
180
180
  border: 1px solid #3a3a4e;
181
181
  }
182
182
  .sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
183
- `,Jo=!1;function Bi(){if(Jo||typeof document>"u")return;let e=K({nodes:Fi});document.head.appendChild(e),Jo=!0}function Ii(e){let t=[],n=e.split(`
184
- `);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 Go(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=Ii(r),i=e.cause,s=i!=null?Go(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 qi(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(`
183
+ `,ni=!1;function Xi(){if(ni||typeof document>"u")return;let e=J({nodes:Qi});document.head.appendChild(e),ni=!0}function Yi(e){let t=[],n=e.split(`
184
+ `);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 ri(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=Yi(r),i=e.cause,s=i!=null?ri(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 es(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(`
185
185
  `).map(s=>` ${s}`).join(`
186
186
  `);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(`
187
- `)}function Zo(e){let t=e.map((n,r)=>T({class:"sibu-err-frame",nodes:[A({class:"sibu-err-line",nodes:String(r+1)}),A({class:"sibu-err-fn",nodes:n.fn}),A({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return He({class:"sibu-err-stack",nodes:t})}function Yo(e){return e?[T({class:"sibu-err-cause-label",nodes:"Caused by"}),T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:`[${e.code}] ${e.message}`}),A({nodes:""})]}),e.frames.length>0?Zo(e.frames):T({class:"sibu-err-stack",nodes:"(no stack)"})]}),...Yo(e.cause)]:[]}function ji(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 ze(e){Bi();let t=e.severity??"error",n=Go(e.error),r=e.alwaysShowDetails??zi,o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=C("Copy"),c=ae({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=qi(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=T({class:"sibu-err-header",nodes:[Oe({class:"sibu-err-icon",nodes:n.code}),$e({class:"sibu-err-title",nodes:o}),c,A({class:"sibu-err-timestamp",nodes:i})]}),d=[Re({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:"Stack Trace"})]}),Zo(n.frames)]})),r&&d.push(...Yo(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:"Metadata"})]}),ji(e.metadata)]}));let m=[];e.onRetry&&m.push(ae({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&m.push(ae({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),m.length>0&&d.push(T({class:"sibu-err-actions",nodes:m}));let b=T({class:"sibu-err-body",nodes:d});return T({class:"sibu-error-display","data-severity":t,nodes:[l,b]})}var Vi=`
187
+ `)}function oi(e){let t=e.map((n,r)=>T({class:"sibu-err-frame",nodes:[A({class:"sibu-err-line",nodes:String(r+1)}),A({class:"sibu-err-fn",nodes:n.fn}),A({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return De({class:"sibu-err-stack",nodes:t})}function ii(e){return e?[T({class:"sibu-err-cause-label",nodes:"Caused by"}),T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:`[${e.code}] ${e.message}`}),A({nodes:""})]}),e.frames.length>0?oi(e.frames):T({class:"sibu-err-stack",nodes:"(no stack)"})]}),...ii(e.cause)]:[]}function ts(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 Ie(e){Xi();let t=e.severity??"error",n=ri(e.error),r=e.alwaysShowDetails??Zi,o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=C("Copy"),c=se({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=es(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=T({class:"sibu-err-header",nodes:[Pe({class:"sibu-err-icon",nodes:n.code}),Oe({class:"sibu-err-title",nodes:o}),c,A({class:"sibu-err-timestamp",nodes:i})]}),d=[He({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:"Stack Trace"})]}),oi(n.frames)]})),r&&d.push(...ii(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:"Metadata"})]}),ts(e.metadata)]}));let m=[];e.onRetry&&m.push(se({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&m.push(se({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),m.length>0&&d.push(T({class:"sibu-err-actions",nodes:m}));let b=T({class:"sibu-err-body",nodes:d});return T({class:"sibu-error-display","data-severity":t,nodes:[l,b]})}var ns=`
188
188
  .sibu-error-boundary {
189
189
  position: relative;
190
190
  }
@@ -338,7 +338,7 @@
338
338
  .sibu-error-fallback .sibu-error-btn-reload:hover {
339
339
  background: #3a3a4e;
340
340
  }
341
- `,Qo=!1;function Ui(){if(!Qo&&typeof document<"u"){let e=K({nodes:Vi});document.head.appendChild(e),Qo=!0}}var Ki=50,ct=new WeakMap;function Wi(e,t,n){let r=ct.get(e);r||(r=new Map,ct.set(e,r));let o=t.message,i=r.get(o);if(i)r.delete(o),r.set(o,i);else if(i=()=>e(t,n),r.set(o,i),r.size>Ki){let s=r.keys().next().value;s!==void 0&&r.delete(s)}return i()}function Xo({nodes:e,fallback:t,onError:n,resetKeys:r}){Ui();let[o,i]=C(null),s=()=>{if(t){let f=o(),p=ct.get(t);f&&p&&p.delete(f.message)}i(null)},a=null;if(r&&r.length>0){let f=!1;a=O(()=>{for(let p of r)try{p()}catch(g){typeof console<"u"&&console.warn("[SibuJS ErrorBoundary] resetKeys getter threw:",g)}if(!f){f=!0;return}o()!==null&&s()})}let c=f=>{let p=f instanceof Error?f:new Error(String(f));if(i(p),n)try{n(p)}catch(g){typeof console<"u"&&console.error("[SibuJS ErrorBoundary] onError callback threw:",g)}return p},l=(f,p)=>ze({error:f,severity:"error",onRetry:p}),d=f=>{let p=t||l;try{return Wi(p,f,s)}catch(g){let x=g instanceof Error?g:new Error(String(g));return queueMicrotask(()=>{m.parentNode&&m.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:x}}))}),document.createComment("error-boundary-failed")}},m=T({class:"sibu-error-boundary",nodes:()=>{let f=o();if(f)return d(f);try{let p=e();if(p&&typeof p.then=="function"){let g=T({class:"sibu-error-async"});return g.appendChild(A({class:"sibu-lazy-loading",nodes:"Loading..."})),p.then(x=>{g.replaceChildren(x)}).catch(x=>{let y=c(x);g.replaceChildren(d(y))}),g}return p}catch(p){let g=c(p);return d(g)}}}),b=f=>{if(o())return;f.stopPropagation();let g=f.detail?.error;g&&c(g)};return m.addEventListener("sibu:error-propagate",b),ve(()=>{let f=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT),p=[],g=f.currentNode;for(;g;){let x=Te(g);x&&p.push(x),g=f.nextNode()}if(p.length===1)c(p[0]);else if(p.length>1){let x=globalThis.AggregateError;c(x?new x(p,`${p.length} pre-mount errors caught by ErrorBoundary`):new Error(p.map(y=>y.message).join("; ")))}},m),v(m,()=>{a&&a(),m.removeEventListener("sibu:error-propagate",b)}),m}var Ji=`
341
+ `,si=!1;function rs(){if(!si&&typeof document<"u"){let e=J({nodes:ns});document.head.appendChild(e),si=!0}}var os=50,ft=new WeakMap;function is(e,t,n){let r=ft.get(e);r||(r=new Map,ft.set(e,r));let o=t.message,i=r.get(o);if(i)r.delete(o),r.set(o,i);else if(i=()=>e(t,n),r.set(o,i),r.size>os){let s=r.keys().next().value;s!==void 0&&r.delete(s)}return i()}function ai({nodes:e,fallback:t,onError:n,resetKeys:r}){rs();let[o,i]=C(null),s=()=>{if(t){let f=o(),p=ft.get(t);f&&p&&p.delete(f.message)}i(null)},a=null;if(r&&r.length>0){let f=!1;a=O(()=>{for(let p of r)try{p()}catch(g){typeof console<"u"&&console.warn("[SibuJS ErrorBoundary] resetKeys getter threw:",g)}if(!f){f=!0;return}o()!==null&&s()})}let c=f=>{let p=f instanceof Error?f:new Error(String(f));if(i(p),n)try{n(p)}catch(g){typeof console<"u"&&console.error("[SibuJS ErrorBoundary] onError callback threw:",g)}return p},l=(f,p)=>Ie({error:f,severity:"error",onRetry:p}),d=f=>{let p=t||l;try{return is(p,f,s)}catch(g){let h=g instanceof Error?g:new Error(String(g));return queueMicrotask(()=>{m.parentNode&&m.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:h}}))}),document.createComment("error-boundary-failed")}},m=T({class:"sibu-error-boundary",nodes:()=>{let f=o();if(f)return d(f);try{let p=e();if(p&&typeof p.then=="function"){let g=T({class:"sibu-error-async"});return g.appendChild(A({class:"sibu-lazy-loading",nodes:"Loading..."})),p.then(h=>{g.replaceChildren(h)}).catch(h=>{let x=c(h);g.replaceChildren(d(x))}),g}return p}catch(p){let g=c(p);return d(g)}}}),b=f=>{if(o())return;f.stopPropagation();let g=f.detail?.error;g&&c(g)};return m.addEventListener("sibu:error-propagate",b),ve(()=>{let f=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT),p=[],g=f.currentNode;for(;g;){let h=Te(g);h&&p.push(h),g=f.nextNode()}if(p.length===1)c(p[0]);else if(p.length>1){let h=globalThis.AggregateError;c(h?new h(p,`${p.length} pre-mount errors caught by ErrorBoundary`):new Error(p.map(x=>x.message).join("; ")))}},m),v(m,()=>{a&&a(),m.removeEventListener("sibu:error-propagate",b)}),m}var ss=`
342
342
  @keyframes sibu-spin {
343
343
  to { transform: rotate(360deg); }
344
344
  }
@@ -391,4 +391,4 @@
391
391
  .sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
392
392
  .sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
393
393
  .sibu-loading-lg .sibu-loading-dots { gap: 6px; }
394
- `,ei=!1;function Gi(){!ei&&typeof document<"u"&&(document.head.appendChild(K({nodes:Ji})),ei=!0)}function ti(e={}){Gi();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-dots",nodes:[A({class:"sibu-loading-dot"}),A({class:"sibu-loading-dot"}),A({class:"sibu-loading-dot"})]}),t?A({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)}):T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-spinner"}),t?A({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=lt);return ui(Zi);})();
394
+ `,ci=!1;function as(){!ci&&typeof document<"u"&&(document.head.appendChild(J({nodes:ss})),ci=!0)}function li(e={}){as();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-dots",nodes:[A({class:"sibu-loading-dot"}),A({class:"sibu-loading-dot"}),A({class:"sibu-loading-dot"})]}),t?A({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)}):T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-spinner"}),t?A({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=pt);return yi(cs);})();
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  effect
3
- } from "./chunk-HB24TBAF.js";
3
+ } from "./chunk-WZA53FXU.js";
4
4
  import {
5
5
  signal
6
- } from "./chunk-CC65Y57T.js";
6
+ } from "./chunk-RDTDJCAB.js";
7
7
  import {
8
8
  devWarn,
9
9
  isDev
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-2RA7SHDA.js";
4
4
  import {
5
5
  track
6
- } from "./chunk-VLPPXTYG.js";
6
+ } from "./chunk-QO3WC6FS.js";
7
7
  import {
8
8
  devAssert
9
9
  } from "./chunk-LMLD24FC.js";
@@ -139,28 +139,28 @@ import {
139
139
  use,
140
140
  var_,
141
141
  video
142
- } from "./chunk-R73P76YZ.js";
142
+ } from "./chunk-CWBVQML6.js";
143
143
  import {
144
144
  watch
145
- } from "./chunk-ITX6OO3F.js";
145
+ } from "./chunk-45YP72ZQ.js";
146
146
  import {
147
147
  trustHTML
148
148
  } from "./chunk-JYD2PWXH.js";
149
149
  import {
150
150
  context
151
- } from "./chunk-GTBNNBJ6.js";
151
+ } from "./chunk-OJ3P4ECI.js";
152
152
  import {
153
153
  SVG_NS,
154
154
  bindChildNode,
155
155
  tagFactory
156
- } from "./chunk-KLRMB5ZS.js";
156
+ } from "./chunk-P2HSJDDN.js";
157
157
  import {
158
158
  bindAttribute,
159
159
  bindDynamic
160
- } from "./chunk-DFPFITST.js";
160
+ } from "./chunk-WIPZPFBQ.js";
161
161
  import {
162
162
  derived
163
- } from "./chunk-54EDRCEF.js";
163
+ } from "./chunk-DRUZZAK4.js";
164
164
  import {
165
165
  checkLeaks,
166
166
  dispose,
@@ -174,7 +174,7 @@ import {
174
174
  import {
175
175
  effect,
176
176
  on
177
- } from "./chunk-HB24TBAF.js";
177
+ } from "./chunk-WZA53FXU.js";
178
178
  import {
179
179
  disableSSR,
180
180
  enableSSR,
@@ -188,13 +188,15 @@ import {
188
188
  enqueueBatchedSignal,
189
189
  isBatching,
190
190
  signal
191
- } from "./chunk-CC65Y57T.js";
191
+ } from "./chunk-RDTDJCAB.js";
192
192
  import {
193
193
  notifySubscribers,
194
194
  recordDependency,
195
+ retrack,
196
+ setMaxDrainIterations,
195
197
  track,
196
198
  untracked
197
- } from "./chunk-VLPPXTYG.js";
199
+ } from "./chunk-QO3WC6FS.js";
198
200
  import {
199
201
  __export,
200
202
  devAssert,
@@ -354,6 +356,7 @@ __export(index_exports, {
354
356
  registerComponent: () => registerComponent,
355
357
  registerDisposer: () => registerDisposer,
356
358
  resolveComponent: () => resolveComponent,
359
+ retrack: () => retrack,
357
360
  rp: () => rp,
358
361
  rt: () => rt,
359
362
  ruby: () => ruby,
@@ -364,6 +367,7 @@ __export(index_exports, {
364
367
  section: () => section,
365
368
  select: () => select,
366
369
  setGlobalErrorHandler: () => setGlobalErrorHandler,
370
+ setMaxDrainIterations: () => setMaxDrainIterations,
367
371
  show: () => show,
368
372
  signal: () => signal,
369
373
  slot: () => slot,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SVG_NS,
3
3
  tagFactory
4
- } from "./chunk-KLRMB5ZS.js";
4
+ } from "./chunk-P2HSJDDN.js";
5
5
 
6
6
  // src/core/rendering/html.ts
7
7
  var html = tagFactory("html");
@@ -3,7 +3,7 @@ import {
3
3
  retrack,
4
4
  track,
5
5
  trackingSuspended
6
- } from "./chunk-VLPPXTYG.js";
6
+ } from "./chunk-QO3WC6FS.js";
7
7
  import {
8
8
  devAssert
9
9
  } from "./chunk-LMLD24FC.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  effect
3
- } from "./chunk-HB24TBAF.js";
3
+ } from "./chunk-WZA53FXU.js";
4
4
  import {
5
5
  batch,
6
6
  signal
7
- } from "./chunk-CC65Y57T.js";
7
+ } from "./chunk-RDTDJCAB.js";
8
8
 
9
9
  // src/browser/media.ts
10
10
  function media(query) {
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  div,
3
3
  span
4
- } from "./chunk-R73P76YZ.js";
4
+ } from "./chunk-CWBVQML6.js";
5
5
  import {
6
6
  sanitizeUrl
7
7
  } from "./chunk-UCS6AMJ7.js";
8
8
  import {
9
9
  effect
10
- } from "./chunk-HB24TBAF.js";
10
+ } from "./chunk-WZA53FXU.js";
11
11
  import {
12
12
  batch,
13
13
  signal
14
- } from "./chunk-CC65Y57T.js";
14
+ } from "./chunk-RDTDJCAB.js";
15
15
 
16
16
  // src/platform/head.ts
17
17
  var HEAD_URL_ATTRS = /* @__PURE__ */ new Set(["href", "src"]);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  signal
3
- } from "./chunk-CC65Y57T.js";
3
+ } from "./chunk-RDTDJCAB.js";
4
4
 
5
5
  // src/ui/transition.ts
6
6
  function transition(element, options = {}) {
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  bindAttribute
3
- } from "./chunk-DFPFITST.js";
3
+ } from "./chunk-WIPZPFBQ.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-54EDRCEF.js";
6
+ } from "./chunk-DRUZZAK4.js";
7
7
  import {
8
8
  dispose,
9
9
  registerDisposer
10
10
  } from "./chunk-2UPRY23K.js";
11
11
  import {
12
12
  effect
13
- } from "./chunk-HB24TBAF.js";
13
+ } from "./chunk-WZA53FXU.js";
14
14
  import {
15
15
  signal
16
- } from "./chunk-CC65Y57T.js";
16
+ } from "./chunk-RDTDJCAB.js";
17
17
  import {
18
18
  track
19
- } from "./chunk-VLPPXTYG.js";
19
+ } from "./chunk-QO3WC6FS.js";
20
20
 
21
21
  // src/ui/form.ts
22
22
  function required(message = "This field is required") {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  signal
3
- } from "./chunk-CC65Y57T.js";
3
+ } from "./chunk-RDTDJCAB.js";
4
4
 
5
5
  // src/core/rendering/context.ts
6
6
  function context(defaultValue) {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  watch
3
- } from "./chunk-ITX6OO3F.js";
3
+ } from "./chunk-45YP72ZQ.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-54EDRCEF.js";
6
+ } from "./chunk-DRUZZAK4.js";
7
7
  import {
8
8
  stripHtml
9
9
  } from "./chunk-UCS6AMJ7.js";
10
10
  import {
11
11
  effect
12
- } from "./chunk-HB24TBAF.js";
12
+ } from "./chunk-WZA53FXU.js";
13
13
  import {
14
14
  batch,
15
15
  signal
16
- } from "./chunk-CC65Y57T.js";
16
+ } from "./chunk-RDTDJCAB.js";
17
17
 
18
18
  // src/widgets/Combobox.ts
19
19
  var comboboxIdCounter = 0;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  bindAttribute
3
- } from "./chunk-DFPFITST.js";
3
+ } from "./chunk-WIPZPFBQ.js";
4
4
  import {
5
5
  registerDisposer
6
6
  } from "./chunk-2UPRY23K.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-UCS6AMJ7.js";
13
13
  import {
14
14
  track
15
- } from "./chunk-VLPPXTYG.js";
15
+ } from "./chunk-QO3WC6FS.js";
16
16
  import {
17
17
  devWarn,
18
18
  isDev