sibujs 4.13.0 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.cjs +1 -1
- package/dist/browser.js +4 -4
- package/dist/build.cjs +1 -1
- package/dist/build.js +10 -10
- package/dist/cdn.dev.global.js +1 -1
- package/dist/cdn.full.dev.global.js +1 -1
- package/dist/cdn.full.global.js +1 -1
- package/dist/cdn.global.js +1 -1
- package/dist/{chunk-G6366I2A.js → chunk-22OPSWMF.js} +1 -1
- package/dist/{chunk-ENFRHCMK.js → chunk-2NC56RGY.js} +1 -1
- package/dist/{chunk-MNEITZ27.js → chunk-2O6JJCUR.js} +4 -4
- package/dist/{chunk-HVVRXRGO.js → chunk-4UTGDVSA.js} +1 -1
- package/dist/{chunk-7K7W4AA5.js → chunk-5RIBLY2N.js} +4 -4
- package/dist/{chunk-L3QHS4O4.js → chunk-5XUGJM3J.js} +1 -1
- package/dist/{chunk-3C56VNCK.js → chunk-ADZHPN2B.js} +1 -1
- package/dist/{chunk-ZE5LF44R.js → chunk-C73VBPEF.js} +5 -5
- package/dist/{chunk-346BYZL2.js → chunk-CPQKWCJ2.js} +2 -2
- package/dist/{chunk-CK5F2IR5.js → chunk-EU7T7EB3.js} +2 -2
- package/dist/{chunk-QV5WEOFD.js → chunk-G3Z2FEBR.js} +4 -4
- package/dist/{chunk-24L5RDPS.js → chunk-J4X7ICH4.js} +3 -3
- package/dist/{chunk-HDKDBC6V.js → chunk-K4LNUT5L.js} +1 -1
- package/dist/{chunk-M25RIH6Y.js → chunk-KC62VURU.js} +3 -3
- package/dist/{chunk-IV74C2YX.js → chunk-OIKD7YDY.js} +2 -2
- package/dist/{chunk-C2FAO6VQ.js → chunk-PBJYCE2Z.js} +4 -4
- package/dist/{chunk-BRRRVLHQ.js → chunk-QC3NP47A.js} +1 -1
- package/dist/{chunk-GNSRXK34.js → chunk-QKFVMIAV.js} +1 -1
- package/dist/{chunk-F4W7WYXY.js → chunk-QZ47OZ25.js} +3 -3
- package/dist/{chunk-Z3EZX6DZ.js → chunk-VFPLWUT7.js} +9 -9
- package/dist/{chunk-YJ57VR6Y.js → chunk-YFTBCCVH.js} +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.js +5 -5
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +1 -1
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +3 -3
- package/dist/extras.js +20 -20
- package/dist/index.cjs +1 -1
- package/dist/index.js +10 -10
- package/dist/motion.cjs +1 -1
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +1 -1
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +1 -1
- package/dist/performance.js +4 -4
- package/dist/plugins.cjs +3 -3
- package/dist/plugins.js +7 -7
- package/dist/ssr.cjs +1 -1
- package/dist/ssr.js +7 -7
- package/dist/testing.cjs +1 -1
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +7 -7
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +6 -6
- package/package.json +1 -1
package/dist/browser.cjs
CHANGED
|
@@ -751,7 +751,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
751
751
|
}
|
|
752
752
|
|
|
753
753
|
// src/reactivity/track.ts
|
|
754
|
-
var _runtimeVersion = true ? "4.13.
|
|
754
|
+
var _runtimeVersion = true ? "4.13.1" : "dev";
|
|
755
755
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
756
756
|
function resolveReactiveApi() {
|
|
757
757
|
const g = globalThis;
|
package/dist/browser.js
CHANGED
|
@@ -36,15 +36,15 @@ import {
|
|
|
36
36
|
visibility,
|
|
37
37
|
wakeLock,
|
|
38
38
|
windowSize
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-EU7T7EB3.js";
|
|
40
40
|
import "./chunk-52XFPGSN.js";
|
|
41
41
|
import "./chunk-62BDYGAG.js";
|
|
42
42
|
import "./chunk-7ZHH77QA.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-QC3NP47A.js";
|
|
44
44
|
import "./chunk-EXXSN3BW.js";
|
|
45
45
|
import "./chunk-7XHATCIH.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-QKFVMIAV.js";
|
|
47
|
+
import "./chunk-4UTGDVSA.js";
|
|
48
48
|
import "./chunk-NYNYSPK7.js";
|
|
49
49
|
export {
|
|
50
50
|
__resetSpeechCoordinator,
|
package/dist/build.cjs
CHANGED
|
@@ -1990,7 +1990,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
|
|
1992
1992
|
// src/reactivity/track.ts
|
|
1993
|
-
var _runtimeVersion = true ? "4.13.
|
|
1993
|
+
var _runtimeVersion = true ? "4.13.1" : "dev";
|
|
1994
1994
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
1995
1995
|
function resolveReactiveApi() {
|
|
1996
1996
|
const g2 = globalThis;
|
package/dist/build.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
index_exports
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-VFPLWUT7.js";
|
|
4
|
+
import "./chunk-5XUGJM3J.js";
|
|
5
5
|
import "./chunk-2F4PSJ5Z.js";
|
|
6
6
|
import "./chunk-AM6DZLBM.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-ADZHPN2B.js";
|
|
8
|
+
import "./chunk-22OPSWMF.js";
|
|
9
9
|
import "./chunk-62BDYGAG.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-CPQKWCJ2.js";
|
|
11
|
+
import "./chunk-K4LNUT5L.js";
|
|
12
12
|
import "./chunk-F2UWOZ6J.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-YFTBCCVH.js";
|
|
14
14
|
import "./chunk-7ZHH77QA.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-QC3NP47A.js";
|
|
16
16
|
import {
|
|
17
17
|
isEventHandlerAttr,
|
|
18
18
|
isHtmlContentAttribute,
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
} from "./chunk-EXXSN3BW.js";
|
|
21
21
|
import "./chunk-7XHATCIH.js";
|
|
22
22
|
import "./chunk-5HZXGZ6T.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-QKFVMIAV.js";
|
|
24
|
+
import "./chunk-4UTGDVSA.js";
|
|
25
25
|
import "./chunk-NYNYSPK7.js";
|
|
26
26
|
|
|
27
27
|
// src/build/analyzer.ts
|
package/dist/cdn.dev.global.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
`||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
|
|
5
5
|
`?2:1;continue}if($n(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&$n(e[s]);)i+=e[s],s++;s<e.length&&ni(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
|
|
6
6
|
`?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;t+=c?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var Bn=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],oi=4,ii=5,si=8;function ai(e){if(!e)return"an element";let t=e.tagName.toLowerCase(),n=e.getAttribute("id");n&&(t+=`#${n}`);let r=e.getAttribute("class");return r&&(t+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${t}>`}var Ot=new Set,Fn=100,zn=!1;function at(e,t,n){j(()=>{let r=["url() in an inline style is an exfiltration channel: the browser fetches it immediately and the URL's path or query can carry page data off-origin","expression() executes arbitrary script in legacy engines","the javascript: scheme executes script","the vbscript: scheme executes script","-moz-binding loads and runs remote XBL","behavior: loads and runs a remote HTC script","@import pulls in a remote stylesheet","image-set() fetches remote images, the same exfiltration channel as url()","filter:progid activates legacy scriptable filters","image() fetches its string argument as a URL, the same exfiltration channel as url()","src() fetches its string argument as a URL, the same exfiltration channel as url()"],o=n?.property?`${n.property}: ${e}`:e,i=ai(n?.element),s=`${i}|${o}`;return Ot.has(s)?"":Ot.size>=Fn?zn?"":(zn=!0,`${Fn} distinct dropped style declarations have been reported; suppressing further ones for the rest of this session so they cannot flood the console. The declarations are still dropped \u2014 only the reporting stops. Fix the reported ones and reload to see any that remain.`):(Ot.add(s),`style declaration "${o}" was dropped by the style sanitizer on ${i} \u2014 ${r[t]}. The element renders without it, which usually looks like a missing image rather than an error. Sanctioned alternatives: for a content image use an <img> element (or a <picture>); for decoration, put the rule in a stylesheet and set a class instead \u2014 stylesheet CSS is not sanitized, only inline style attributes are. If this declaration is not yours, it came from untrusted data and the drop just prevented an exfiltration.`)})}function Vn(e){return(e.includes("\\")?ri(e):e).toLowerCase().replace(/\s+/g,"")}function Dt(e){if(!ti.test(e))return-1;let t=Vn(e);for(let n=0;n<Bn.length;n++)if(t.includes(Bn[n]))return n;return-1}function ut(e,t,n){let r=Ht(e,t);return r===-1?t:(at(t,r,{property:e,element:n?.element}),"")}function Ht(e,t){let n=Dt(t);if(n!==-1)return n;let r=J(e);return r==="behavior"?ii:r==="-moz-binding"?oi:(r==="filter"||r==="-ms-filter")&&Vn(t).includes("progid:")?si:-1}function ci(e){let t=[],n="",r=0,o="";for(let s=0;s<e.length;s++){let a=e[s];if(o){n+=a,a==="\\"&&s+1<e.length?n+=e[++s]:a===o&&(o="");continue}if(a==="\\"){n+=a,s+1<e.length&&(n+=e[++s]);continue}if(a==="/"&&e[s+1]==="*"){let c=e.indexOf("*/",s+2);if(c===-1)return null;s=c+1;continue}if(a==='"'||a==="'")o=a;else if(a==="("||a==="[")r++;else if(a===")"||a==="]"){if(--r<0)return null}else{if(a==="{"||a==="}")return null;if(a===";"&&r===0){t.push(n),n="";continue}}n+=a}if(o||r!==0)return null;t.push(n);let i=[];for(let s of t){let a=s.indexOf(":");if(a===-1)continue;let c=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(c))continue;let u=s.slice(a+1).trim(),l=/!\s*important\s*$/i.exec(u);if(l&&(u=u.slice(0,l.index).trim()),u==="")continue;let p=c.startsWith("--")?c:J(c);i.push([p,u,l!==null])}return i}function ui(e,t){let n=String(e),r=ci(n);if(r===null)return Dt(n)!==-1&&at(n,Dt(n),t),"";let o=[];for(let[i,s,a]of r){let c=Ht(i,s);if(c!==-1){at(s,c,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function lt(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return ui(n,t);let r=document.createElement("div");try{r.style.cssText=n}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),c=Ht(s,a);if(c!==-1){at(a,c,{property:s,element:t?.element});continue}let u=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${u?` !${u}`:""}`)}return o.join("; ")}var It=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),li=new Set(["srcdoc"]);function Ye(e){return li.has(e.toLowerCase())}function Wn(e){return It.has(e.toLowerCase())}function di(e){let t=e.toLowerCase();return t==="style"||It.has(t)}function fi(e,t,n){let r=e.toLowerCase();return r==="srcset"?ei(t):It.has(r)?ct(t):r==="style"?lt(t,n):t}function jn(e,t,n){if(!di(e))return t;let r=fi(e,t,n);return r===""?null:r}function Te(e){return e===" "||e===" "||e===`
|
|
7
|
-
`||e==="\r"||e==="\f"}function dt(e){let t=0,n=e.length;for(;t<n&&Te(e[t]);)t++;for(;n>t&&Te(e[n-1]);)n--;return e.slice(t,n)}var Y=e=>({kind:"forbidden",reason:e});function pi(e){let t=dt(Pe(e));if(t==="")return Y("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return Y("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return Y("unparseable delay");for(;n<t.length&&Te(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return Y("unexpected text after delay");for(n++;n<t.length&&Te(t[n]);)n++;let o=n;for(;n<t.length&&!Te(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return Y(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Te(t[n]);)n++;if(t[n]!=="=")return Y("missing '=' after url");for(n++;n<t.length&&Te(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return Y("unterminated quoted destination");if(s=t.slice(n+1,u),dt(t.slice(u+1))!=="")return Y("trailing text after quoted destination")}else if(s=dt(t.slice(n)),/[;,]/.test(s))return Y("multiple refresh assignments");if(s==="")return Y("empty destination");let c=ct(s);return c===""?Y("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function Pt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=J(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?Y(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:dt(Pe(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:pi(n)}var mi="http://www.w3.org/1999/xhtml",gi="http://www.w3.org/2000/svg",bi=new Set(["script","iframe","object","embed","frame","frameset"]);function Un(e){return J(e)}function Kn(e){return bi.has(Un(e))}var hi=new Set(["script","style"]);function Gn(e){return hi.has(Un(e))}var L={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},yi=new Set(["src","href","xlink:href","type","language"]),Si=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),$t=new WeakSet;function Jn(e){return e.namespaceURI===mi||e.namespaceURI===null}function Yn(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function vi(e){$t.has(e)||($t.add(e),e.getAttribute("content")!==null&&Pt(Yn(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function xi(e,t,n,r){if(!Jn(e))return L.None;let o=J(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&vi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return L.None;let i=Pt(Yn(e,o,n));return i.kind==="forbidden"?L.MetaRefreshForbidden:i.kind!=="not-refresh"&&$t.has(e)?L.MetaRefreshReactive:L.None}function Ei(e,t){if(t===null||J(e)!=="attributename")return L.None;let n=Pe(t);return Wn(n)||be(n)||Ye(n)?L.AnimationTarget:L.None}var ft=new WeakSet;function qn(e){if(e===null)return!1;let t=J(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function Ti(e,t,n,r){if(!Jn(e))return L.None;let o=J(t);return o==="href"?r==="static"||n===null?L.None:qn(e.getAttribute("rel"))?L.StylesheetSource:(ft.add(e),L.None):o==="rel"&&qn(n)&&ft.has(e)&&e.hasAttribute("href")?L.StylesheetSource:L.None}function Bt(e,t,n,r){let o=e.localName;return o==="meta"?xi(e,t,n,r):o==="link"?Ti(e,t,n,r):o==="script"?r==="static"||n===null?L.None:yi.has(J(t))?L.ScriptSource:L.None:Si.has(o)&&e.namespaceURI===gi?Ei(t,n):L.None}function Ft(e,t,n){e.localName!=="link"||J(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?ft.add(e):ft.delete(e))}var wi="http://www.w3.org/1999/xhtml",ki="http://www.w3.org/2000/svg",_i="http://www.w3.org/1999/xlink",Ai="http://www.w3.org/XML/1998/namespace",Ci=new Set(["checked","disabled","selected"]);function Ni(e){return e.namespaceURI===null||e.namespaceURI===wi}function Zn(e,t,n){j(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function Xn(e,t,n){e[t]=n}function Ri(e,t){if(e.namespaceURI!==ki)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?_i:n.startsWith("xml:")?Ai:null}function ee(e,t,n,r={}){let o=Li(e,t,n,r);return e.localName==="link"&&Ft(e,t,r.reactive?"reactive":"runtime"),o}function Li(e,t,n,r){let o=Ri(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(be(t))return O(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Bt(e,t,s,r.reactive?"reactive":"runtime");if(a!==L.None)return Zn(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(Ye(t))return O(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=Ni(e),u=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let m=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==m&&(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0}return c&&Ci.has(u)&&u in e?Xn(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let l=String(n);if(r.syncValueProperty!==!1&&c&&(u==="value"||u==="checked")&&u in e)return Xn(e,u,u==="checked"?!!n:l),!0;let p=l===""?"":jn(t,l,{element:e});return p===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===p||(o?e.setAttributeNS(o,t,p):e.setAttribute(t,p)),!0)}function zt(e,t,n){if(Ye(t))return O(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Bt(e,t,n,"static");return r!==L.None?(Zn("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Ft(e,t,"static"),!0)}var Mi=4096,Vt=[];function Oi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Di(e,t,n){let r=Vt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Oi();return o.sig=e,o.sub=t,o.epoch=n,o}function Qn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Vt.length<Mi&&Vt.push(e)}function Hi(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function er(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Ii(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Pi(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var te=null,ue=null,he=0,ye=[],F=new Set,$i=[];function Bi(e){try{e()}catch(t){let n=e;_(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Fi(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ae=0,le=!1;function jt(){ae===0&&(ue=te,te=null,le=!0),ae++}function qt(){ae--,ae===0&&(te=ue,ue=null,le=!1)}function tr(){return le}function nr(e){jt();try{return e()}finally{qt()}}var X=null;function Ut(){return X}function bt(e,t){let n=X;X=e;try{return t()}finally{X=n}}function Kt(e){let t=X;return t===null?e:(...n)=>bt(t,()=>e(...n))}var $e=null,zi=0;function Gt(e,t){let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._cap===void 0&&(i._cap=On());let s=X;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(X=a);let c=$e;c!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=c),i._tok!=null&&($e=i._tok);let u=++zi;i._epoch=u,i._structDirty=!1;for(let l=i.depsHead??null;l!==null;l=l.subNext){let p=l.sig;l.prevActive=p.__activeNode??null,p.__activeNode=l}try{e()}finally{te=n,X=s,$e=c,r!==0&&(ae=r,ue=o,le=!0);let l=i.depsHead??null;for(;l!==null;){let p=l.subNext,g=l.sig;g.__activeNode=l.prevActive,l.prevActive=null,l.epoch!==u&&(Pi(l),er(l),Qn(l)),l=p}}}function rr(e,t){if(!t)return Jt(e);Be(t);let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._scope===void 0&&(i._scope=X);let s=X;X=i._scope;try{e()}finally{te=n,X=s,r!==0&&(ae=r,ue=o,le=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Be(t))}function Jt(e,t,n){return ir(e,t,n===!0)._dispose}function or(e,t){let n=ir(e,t,!0);return{stop:n._dispose,run:r=>{let o=$e;$e=n._tok??null;try{return r()}finally{$e=o}}}}function ir(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{Gt(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o)},o}function sr(e){if(!te)return;let t=te,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=Di(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Ii(t,i),Hi(n,i),t._structDirty=!0}function Be(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;er(n),Qn(n),n=r}}var pt=1e3,mt=1e6,gt=0,we=new Set;function ar(e){let t=pt;return Number.isFinite(e)&&e>0&&(pt=Math.floor(e)),t}function cr(e){let t=mt;return Number.isFinite(e)&&e>0&&(mt=Math.floor(e)),t}function Vi(e){let t=e;return t._runEpoch!==gt?(t._runEpoch=gt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>pt)}function Wi(e){let t=e.__name??"<unnamed>";_(new Error(`subscriber "${t}" fired more than ${pt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function ji(){_(new Error(`Notification drain exceeded ${mt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function ur(){let e=0;for(;e<ye.length;){if(e>=mt){ji();break}let t=ye[e++];F.delete(t)&&(t._owner!=null&&F.size>0&&(qi(t),F.has(t))||lr(t))}}function qi(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;F.has(r)&&(t=r),n=r._owner??null}if(t===null)return;F.delete(t),lr(t)}}function lr(e){if(we.size>0&&we.has(e)||e._hasComputedDep===!0&&!Fi(e))return;if(Vi(e)){Wi(e),we.add(e);return}let t=Dn(e._cap??null);try{Bi(e)}finally{t&&Hn()}}function dr(){if(!(he>0)){he++,gt++;try{ur()}finally{he--,he===0&&(ye.length=0,F.clear(),we.size>0&&we.clear())}}}function Wt(e){e();let t=e._sig;if(!t)return;let n=$i,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else F.has(s)||(F.add(s),ye.push(s));i=i.sigNext}}}function fr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Wt(r):F.has(r)||(F.add(r),ye.push(r))),n=n.sigNext}}function pr(e){let n=e.subsHead;if(n){if(he>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Wt(o):F.has(o)||(F.add(o),ye.push(o))),r=r.sigNext}return}he++,gt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Wt(o):F.has(o)||(F.add(o),ye.push(o))),r=r.sigNext}ur()}finally{he--,he===0&&(ye.length=0,F.clear(),we.size>0&&we.clear())}}}function mr(e){return e.__sc??0}function gr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function br(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var hr="4.13.0",yr=Symbol.for("sibujs.reactive.v1");function Ki(){let e=globalThis,t=e[yr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,O(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${hr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:jt,resumeTracking:qt,isTrackingSuspended:tr,untracked:nr,retrack:Gt,track:rr,reactiveBinding:Jt,recordDependency:sr,cleanup:Be,setMaxSubscriberRepeats:ar,setMaxDrainIterations:cr,drainNotificationQueue:dr,queueSignalNotification:fr,notifySubscribers:pr,getSubscriberCount:mr,getSubscriberDeps:gr,forEachSubscriber:br,getOwnerScope:Ut,runWithOwnerScope:bt,bindOwnerScope:Kt,structuralBinding:or,version:hr};return e[yr]=n,n}var H=Ki(),ke=H.suspendTracking,_e=H.resumeTracking,Sr=H.isTrackingSuspended,ne=H.untracked,Se=H.retrack,Fe=H.track,$=H.reactiveBinding,Ae=H.recordDependency,Ce=H.cleanup,fl=H.setMaxSubscriberRepeats,vr=H.setMaxDrainIterations,xr=H.drainNotificationQueue,Er=H.queueSignalNotification,ze=H.notifySubscribers,pl=H.getSubscriberCount,ml=H.getSubscriberDeps,gl=H.forEachSubscriber,Ve=H.getOwnerScope??Ut,ht=H.runWithOwnerScope??bt,V=H.bindOwnerScope??Kt,Ne=H.structuralBinding??((e,t)=>({stop:H.reactiveBinding(e,t),run:n=>n()}));function Xe(e,t,n){if(be(t))return ee(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){_(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}ee(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return $(r,e)}function Tr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){_(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){_(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),ee(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=$(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Yt=["data-focus-key","id","name"],Gi=new Set(["text","search","url","tel","password",""]);function Ji(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Gi.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function Ze(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<Yt.length;i++){let s=t.getAttribute(Yt[i]);if(s){r=Yt[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...Ji(t)}}function Yi(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Xi(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function wr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function We(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){wr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Xi(t,`[${e.attr}=${Yi(e.value)}]`);if(s&&s.tagName===e.tag){wr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}j(()=>{let s=e.attr?` (${e.attr}="${e.value}")`:"",a=i?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${s} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${a}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them. If dropping focus is INTENDED here (closing a panel, say), pass { focus: "discard" } to when()/match() to silence this, or { focus: { restoreTo: element } } to send focus somewhere other than <body>.`})}function de(e,t){let n=[];function r(){let o;try{o=t()}catch(l){_(l,{phase:"binding",name:"bindChildNode",node:e});return}let i=Ze(n);if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let p=n[l];D(p),p.parentNode&&p.parentNode.removeChild(p)}n.length=0,We(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let l=new Set;for(let p=0;p<o.length;p++){let g=o[p];if(g==null||typeof g=="boolean")continue;let m=g instanceof Node?g:document.createTextNode(String(g));if(l.has(m)){O("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(m),a.push(m)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let l=new Set(n);c=new Set;for(let p=0;p<a.length;p++)l.has(a[p])&&c.add(a[p])}for(let l=0;l<n.length;l++){let p=n[l];c?.has(p)||(D(p),p.parentNode&&p.parentNode.removeChild(p))}let u=e;for(let l=0;l<a.length;l++){let p=a[l];u.nextSibling!==p&&s.insertBefore(p,u.nextSibling),u=p}n=a,We(i,a,"bindChildNode")}return $(r,e,!0)}function Xt(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function U(){typeof document>"u"&&Xt()}var R="http://www.w3.org/2000/svg",Zi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var Zt=new Set,kr=100,_r=!1,Ar=new Map;function Cr(e){let t=Ar.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Ar.set(e,t)),t}function Qi(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=$(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",lt(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let l in a){if(!Object.hasOwn(a,l))continue;let p=a[l];if(p==null)continue;let g=Cr(l);u.push(g),c.setProperty(g,ut(g,String(p),{element:e}))}for(let l=0;l<o.length;l++)u.indexOf(o[l])===-1&&c.removeProperty(o[l]);o=u},e);x(e,s);return}if(typeof t=="string"){e.setAttribute("style",lt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Cr(r);if(typeof o=="function"){let s=o,a=$(()=>{n.style.setProperty(i,ut(i,String(s()),{element:e}))},e);x(e,a)}else n.style.setProperty(i,ut(i,String(o),{element:e}))}}function es(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=$(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);x(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=$(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let u=n[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);x(e,s)}else e.setAttribute("class",o)}function Qt(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),x(e,de(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),x(e,de(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),x(e,de(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}function d(e,t){let n=Kn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&Xt();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Qt(i,o),i):(j(()=>{let m=r.trim().split(/\s+/);if(m.length<2)return"";let f=0;for(let h=0;h<m.length;h++){let S=m[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(S))return"";/[-:/0-9]/.test(S)&&f++}if(f<2)return"";let b=`${e}|${r}`;return Zt.has(b)?"":Zt.size>=kr?_r?"":(_r=!0,`tagFactory: ${kr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(Zt.add(b),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return Qt(i,r),i;let s=r,a=s.class;a!=null&&es(i,a);let c=s.id;typeof c=="function"?x(i,Xe(i,"id",c)):c!=null&&(typeof c=="string"&&Zi.has(c.toLowerCase())&&O(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&Qt(i,u);let l=s.on;if(l)for(let m in l){if(!Object.hasOwn(l,m))continue;let f=l[m];typeof f=="function"?i.addEventListener(m,f):O(`tagFactory: on.${m} handler is not a function (got ${typeof f}). Event listener was not attached.`)}let p=s.style;p!=null&&Qi(i,p);let g=s.ref;g&&(g.current=i);for(let m in s)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,m))continue;let f=s[m];if(f==null||be(m))continue;typeof f=="function"?x(i,Xe(i,m,f)):ee(i,m,f,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Vl=d("html"),ts=d("head"),ns=d("body"),rs=d("title"),A=d("div"),P=d("span"),os=d("section"),is=d("article"),ss=d("header"),as=d("footer"),cs=d("nav"),us=d("main"),ls=d("aside"),ds=d("address"),en=d("p"),fs=d("h1"),ps=d("h2"),tn=d("h3"),ms=d("h4"),gs=d("h5"),bs=d("h6"),hs=d("blockquote"),ys=d("dd"),Ss=d("dl"),vs=d("dt"),xs=d("figcaption"),Es=d("figure"),Ts=d("hr"),ws=d("li"),ks=d("ol"),_s=d("ul"),nn=d("pre"),As=d("a"),Cs=d("abbr"),Ns=d("b"),Rs=d("bdi"),Ls=d("bdo"),Ms=d("br"),Os=d("cite"),rn=d("code"),Ds=d("data"),Hs=d("dfn"),Is=d("em"),Ps=d("i"),$s=d("kbd"),Bs=d("mark"),Fs=d("q"),zs=d("rp"),Vs=d("rt"),Ws=d("ruby"),js=d("s"),qs=d("samp"),Us=d("small"),Ks=d("strong"),Gs=d("sub"),Js=d("sup"),Ys=d("time"),Xs=d("u"),Zs=d("var"),Qs=d("area"),ea=d("audio"),ta=d("img"),na=d("map"),ra=d("track"),oa=d("video"),ia=d("embed"),sa=d("iframe"),aa=d("object"),ca=d("param"),ua=d("picture"),la=d("portal"),da=d("source"),fa=d("svg",R),pa=d("math"),ma=d("canvas"),ga=d("noscript"),ba=d("script"),ha=d("del"),ya=d("ins"),Sa=d("caption"),va=d("col"),xa=d("colgroup"),Ea=d("table"),Ta=d("tbody"),wa=d("td"),ka=d("tfoot"),_a=d("th"),Aa=d("thead"),Ca=d("tr"),Qe=d("button"),Na=d("datalist"),Ra=d("fieldset"),La=d("form"),Ma=d("input"),Oa=d("label"),Da=d("legend"),Ha=d("meter"),Ia=d("optgroup"),Pa=d("option"),$a=d("output"),Ba=d("progress"),Fa=d("select"),za=d("textarea"),Va=d("details"),Wa=d("dialog"),ja=d("menu"),qa=d("summary"),Ua=d("slot"),Ka=d("template"),Ga=d("base"),Ja=d("link"),Ya=d("meta"),Re=d("style"),Xa=d("circle",R),Za=d("ellipse",R),Qa=d("g",R),ec=d("line",R),tc=d("path",R),nc=d("polygon",R),rc=d("polyline",R),oc=d("rect",R),ic=d("text",R),sc=d("tspan",R),ac=d("defs",R),cc=d("clipPath",R),uc=d("mask",R),lc=d("pattern",R),dc=d("linearGradient",R),fc=d("radialGradient",R),pc=d("stop",R),mc=d("use",R),gc=d("symbol",R),bc=d("marker",R),hc=d("center"),yc=d("font"),Sc=d("marquee"),vc=e=>d(e);var on="__sibuPendingError";function Nr(e,t){let n=()=>e.parentNode?(_(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[on]=t)})}function yt(e){let t=e,n=t[on];if(n instanceof Error)return delete t[on],n}function Rr(e){let t=null;return function(){if(t)return t();let r=A({class:"sibu-lazy"}),o=!1;return e().then(V(i=>{if(o)return;t=i.default;let s=t();q(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));q(r,A({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Nr(r,s)}),r.appendChild(P("sibu-lazy-loading","Loading...")),x(r,()=>{o=!0}),r}}function Lr({nodes:e,fallback:t}){let n=A({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;x(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&D(s)});let a=V(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){q(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,q(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else q(n,c)}catch(c){let u=c instanceof Error?c:new Error(String(c));Nr(n,u)}});return queueMicrotask(a),n}function un(e,t){return()=>Ve()===e?t():ht(e,t)}function vt(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";_(n,{phase:r,name:t});return}}function sn(e,t,n,r,o){let i=vt(e,t);if(typeof i!="function")return;let s=un(o,i);r()||!n.isConnected?vt(s,"onUnmount"):Or(s,n)}var je=new WeakMap,Le=new WeakMap,fe=new Set,pe=new Set,qe=null,St=0,xc=256;function an(e){let t=je.get(e);if(t){je.delete(e),fe.delete(e);for(let n of t)try{n()}catch{}}}function cn(e){Le.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Le.get(e);if(n){Le.delete(e),pe.delete(e);for(let r of n)try{r()}catch{}}})}function Ec(e){if(fe.size===0||e.nodeType!==1)return;let t=e;if(fe.has(t)&&t.isConnected&&an(t),t.firstElementChild)for(let n of Array.from(fe))n!==t&&n.isConnected&&t.contains(n)&&an(n)}function Tc(e){if(pe.size===0||e.nodeType!==1)return;let t=e;if(pe.has(t)&&!t.isConnected&&cn(t),t.firstElementChild)for(let n of Array.from(pe))n!==t&&!n.isConnected&&t.contains(n)&&cn(n)}function wc(){if(fe.size>0)for(let e of Array.from(fe))e.isConnected&&an(e);if(pe.size>0)for(let e of Array.from(pe))e.isConnected||cn(e)}function Mr(){qe||typeof document>"u"||(qe=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)Ec(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Tc(t.removedNodes[n])}St+=e.length,St>=xc&&(St=0,wc()),ln()}),qe.observe(document.body,{childList:!0,subtree:!0}))}function ln(){qe&&fe.size===0&&pe.size===0&&(qe.disconnect(),qe=null,St=0)}function kc(e,t){let n=je.get(e);return n||(n=[],je.set(e,n)),n.push(t),fe.add(e),Mr(),()=>{let r=je.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(je.delete(e),fe.delete(e))}ln()}}function _c(e,t){let n=Le.get(e);return n||(n=[],Le.set(e,n)),n.push(t),pe.add(e),Mr(),()=>{let r=Le.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Le.delete(e),pe.delete(e))}ln()}}function xt(e,t){if(typeof document>"u")return;let n=Ve();if(e=un(n,e),t){let r=!1,o=()=>r;if(x(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||sn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){sn(e,"onMount",t,o,n);return}let i=kc(t,()=>{r||sn(e,"onMount",t,o,n)});x(t,i)})}else queueMicrotask(()=>{vt(e,"onMount")})}function Ac(e,t){typeof document>"u"||Or(un(Ve(),e),t)}function Or(e,t){let n=!1,r=()=>{n||(n=!0,vt(e,"onUnmount"))};x(t,r);let o=()=>{if(n)return;let i=_c(t,r);x(t,i)};t.isConnected?o():xt(()=>{o()},t)}function Cc(e,t){x(t,e)}function Z(e,t,n){try{e.emit(t,n)}catch{}}var dn=Symbol.for("sibujs.ssr.v1");function Nc(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof Nt=="function"&&(t=Nt("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var ve=globalThis[dn]??(globalThis[dn]=Nc()),Me=ve.als,W=ve.fallbackStore;ve.fallbackDepth??(ve.fallbackDepth=0);var Dr=!1;function Rc(){if(Dr||Me||!(typeof process<"u"&&!!process.versions?.node))return;Dr=!0;let t=process.versions.node;O(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function Oe(){if(Me){let e=Me.getStore();if(e)return e}return W}function Hr(){return Me?Me.getStore()??null:ve.fallbackDepth>0?W:null}function re(){return Oe().ssr}function Ir(e){if(!re())return null;let t=Oe(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Pr(){Oe().ssr=!0}function $r(){Oe().ssr=!1}function Br(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Me)return Me.run(t,e);Rc();let n=W.ssr,r=W.suspenseIdCounter,o=W.idCounter,i=W.locale;W.ssr=!0,W.suspenseIdCounter=0,W.idCounter=0,W.locale=void 0,ve.fallbackDepth++;try{return e()}finally{ve.fallbackDepth--,W.ssr=n,W.suspenseIdCounter=r,W.idCounter=o,W.locale=i}}function Fr(e){let t=Oe(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var jr=globalThis;function Lc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,ne(()=>t(o,void 0));else{let i=n;n=o,ne(()=>t(o,i))}}}var zr=100;function Et(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Ve()?Vr(t):ht(n,()=>Vr(t))}function Vr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){_(n,{phase:"cleanup"})}}function Wr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Et(e),Se(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=zr);e.rerunPending&&(e.rerunPending=!1,_(new Error(`effect re-requested itself ${zr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Mc(e){if(e.disposed)return;e.disposed=!0;let t=jr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Et(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ce(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Q(e,t){if(M(typeof e=="function","effect: argument must be a function."),re())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&Et(n),Se(n.bodyFn,o),n.rerunPending&&Wr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{Se(n.bodyFn,n.subscriber),n.rerunPending&&Wr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Et(n),Ce(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=jr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Z(i,"effect:create",{effectFn:e}),()=>Mc(n)}var et=0,fn=new Set;function Oc(e){et++;try{return e()}finally{et--,et===0&&Ic()}}function Dc(e){return et===0?!1:(fn.add(e),!0)}function Hc(){return et>0}function Ic(){try{for(let e of fn)Er(e)}finally{fn.clear()}xr()}var qr=Symbol.for("sibujs.reactive.batch.v1");function Pc(){let e=globalThis,t=e[qr];if(t)return t;let n={batch:Oc,enqueueBatchedSignal:Dc,isBatching:Hc};return e[qr]=n,n}var pn=Pc(),K=pn.batch,De=pn.enqueueBatchedSignal,$c=pn.isBatching;var mn=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Ae(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(n.value=u,n.__v++,!0){let l=mn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u})}De(n)||ze(n)}}:s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(Object.is(u,c))return;n.value=u,n.__v++;let l=mn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u}),De(n)||ze(n)},!0){let a=mn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Z(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Bc(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Fc=`
|
|
7
|
+
`||e==="\r"||e==="\f"}function dt(e){let t=0,n=e.length;for(;t<n&&Te(e[t]);)t++;for(;n>t&&Te(e[n-1]);)n--;return e.slice(t,n)}var Y=e=>({kind:"forbidden",reason:e});function pi(e){let t=dt(Pe(e));if(t==="")return Y("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return Y("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return Y("unparseable delay");for(;n<t.length&&Te(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return Y("unexpected text after delay");for(n++;n<t.length&&Te(t[n]);)n++;let o=n;for(;n<t.length&&!Te(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return Y(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Te(t[n]);)n++;if(t[n]!=="=")return Y("missing '=' after url");for(n++;n<t.length&&Te(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return Y("unterminated quoted destination");if(s=t.slice(n+1,u),dt(t.slice(u+1))!=="")return Y("trailing text after quoted destination")}else if(s=dt(t.slice(n)),/[;,]/.test(s))return Y("multiple refresh assignments");if(s==="")return Y("empty destination");let c=ct(s);return c===""?Y("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function Pt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=J(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?Y(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:dt(Pe(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:pi(n)}var mi="http://www.w3.org/1999/xhtml",gi="http://www.w3.org/2000/svg",bi=new Set(["script","iframe","object","embed","frame","frameset"]);function Un(e){return J(e)}function Kn(e){return bi.has(Un(e))}var hi=new Set(["script","style"]);function Gn(e){return hi.has(Un(e))}var L={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},yi=new Set(["src","href","xlink:href","type","language"]),Si=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),$t=new WeakSet;function Jn(e){return e.namespaceURI===mi||e.namespaceURI===null}function Yn(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function vi(e){$t.has(e)||($t.add(e),e.getAttribute("content")!==null&&Pt(Yn(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function xi(e,t,n,r){if(!Jn(e))return L.None;let o=J(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&vi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return L.None;let i=Pt(Yn(e,o,n));return i.kind==="forbidden"?L.MetaRefreshForbidden:i.kind!=="not-refresh"&&$t.has(e)?L.MetaRefreshReactive:L.None}function Ei(e,t){if(t===null||J(e)!=="attributename")return L.None;let n=Pe(t);return Wn(n)||be(n)||Ye(n)?L.AnimationTarget:L.None}var ft=new WeakSet;function qn(e){if(e===null)return!1;let t=J(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function Ti(e,t,n,r){if(!Jn(e))return L.None;let o=J(t);return o==="href"?r==="static"||n===null?L.None:qn(e.getAttribute("rel"))?L.StylesheetSource:(ft.add(e),L.None):o==="rel"&&qn(n)&&ft.has(e)&&e.hasAttribute("href")?L.StylesheetSource:L.None}function Bt(e,t,n,r){let o=e.localName;return o==="meta"?xi(e,t,n,r):o==="link"?Ti(e,t,n,r):o==="script"?r==="static"||n===null?L.None:yi.has(J(t))?L.ScriptSource:L.None:Si.has(o)&&e.namespaceURI===gi?Ei(t,n):L.None}function Ft(e,t,n){e.localName!=="link"||J(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?ft.add(e):ft.delete(e))}var wi="http://www.w3.org/1999/xhtml",ki="http://www.w3.org/2000/svg",_i="http://www.w3.org/1999/xlink",Ai="http://www.w3.org/XML/1998/namespace",Ci=new Set(["checked","disabled","selected"]);function Ni(e){return e.namespaceURI===null||e.namespaceURI===wi}function Zn(e,t,n){j(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function Xn(e,t,n){e[t]=n}function Ri(e,t){if(e.namespaceURI!==ki)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?_i:n.startsWith("xml:")?Ai:null}function ee(e,t,n,r={}){let o=Li(e,t,n,r);return e.localName==="link"&&Ft(e,t,r.reactive?"reactive":"runtime"),o}function Li(e,t,n,r){let o=Ri(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(be(t))return O(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Bt(e,t,s,r.reactive?"reactive":"runtime");if(a!==L.None)return Zn(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(Ye(t))return O(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=Ni(e),u=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let m=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==m&&(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0}return c&&Ci.has(u)&&u in e?Xn(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let l=String(n);if(r.syncValueProperty!==!1&&c&&(u==="value"||u==="checked")&&u in e)return Xn(e,u,u==="checked"?!!n:l),!0;let p=l===""?"":jn(t,l,{element:e});return p===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===p||(o?e.setAttributeNS(o,t,p):e.setAttribute(t,p)),!0)}function zt(e,t,n){if(Ye(t))return O(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Bt(e,t,n,"static");return r!==L.None?(Zn("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Ft(e,t,"static"),!0)}var Mi=4096,Vt=[];function Oi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Di(e,t,n){let r=Vt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Oi();return o.sig=e,o.sub=t,o.epoch=n,o}function Qn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Vt.length<Mi&&Vt.push(e)}function Hi(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function er(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Ii(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Pi(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var te=null,ue=null,he=0,ye=[],F=new Set,$i=[];function Bi(e){try{e()}catch(t){let n=e;_(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Fi(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ae=0,le=!1;function jt(){ae===0&&(ue=te,te=null,le=!0),ae++}function qt(){ae--,ae===0&&(te=ue,ue=null,le=!1)}function tr(){return le}function nr(e){jt();try{return e()}finally{qt()}}var X=null;function Ut(){return X}function bt(e,t){let n=X;X=e;try{return t()}finally{X=n}}function Kt(e){let t=X;return t===null?e:(...n)=>bt(t,()=>e(...n))}var $e=null,zi=0;function Gt(e,t){let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._cap===void 0&&(i._cap=On());let s=X;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(X=a);let c=$e;c!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=c),i._tok!=null&&($e=i._tok);let u=++zi;i._epoch=u,i._structDirty=!1;for(let l=i.depsHead??null;l!==null;l=l.subNext){let p=l.sig;l.prevActive=p.__activeNode??null,p.__activeNode=l}try{e()}finally{te=n,X=s,$e=c,r!==0&&(ae=r,ue=o,le=!0);let l=i.depsHead??null;for(;l!==null;){let p=l.subNext,g=l.sig;g.__activeNode=l.prevActive,l.prevActive=null,l.epoch!==u&&(Pi(l),er(l),Qn(l)),l=p}}}function rr(e,t){if(!t)return Jt(e);Be(t);let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._scope===void 0&&(i._scope=X);let s=X;X=i._scope;try{e()}finally{te=n,X=s,r!==0&&(ae=r,ue=o,le=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Be(t))}function Jt(e,t,n){return ir(e,t,n===!0)._dispose}function or(e,t){let n=ir(e,t,!0);return{stop:n._dispose,run:r=>{let o=$e;$e=n._tok??null;try{return r()}finally{$e=o}}}}function ir(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{Gt(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o)},o}function sr(e){if(!te)return;let t=te,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=Di(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Ii(t,i),Hi(n,i),t._structDirty=!0}function Be(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;er(n),Qn(n),n=r}}var pt=1e3,mt=1e6,gt=0,we=new Set;function ar(e){let t=pt;return Number.isFinite(e)&&e>0&&(pt=Math.floor(e)),t}function cr(e){let t=mt;return Number.isFinite(e)&&e>0&&(mt=Math.floor(e)),t}function Vi(e){let t=e;return t._runEpoch!==gt?(t._runEpoch=gt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>pt)}function Wi(e){let t=e.__name??"<unnamed>";_(new Error(`subscriber "${t}" fired more than ${pt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function ji(){_(new Error(`Notification drain exceeded ${mt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function ur(){let e=0;for(;e<ye.length;){if(e>=mt){ji();break}let t=ye[e++];F.delete(t)&&(t._owner!=null&&F.size>0&&(qi(t),F.has(t))||lr(t))}}function qi(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;F.has(r)&&(t=r),n=r._owner??null}if(t===null)return;F.delete(t),lr(t)}}function lr(e){if(we.size>0&&we.has(e)||e._hasComputedDep===!0&&!Fi(e))return;if(Vi(e)){Wi(e),we.add(e);return}let t=Dn(e._cap??null);try{Bi(e)}finally{t&&Hn()}}function dr(){if(!(he>0)){he++,gt++;try{ur()}finally{he--,he===0&&(ye.length=0,F.clear(),we.size>0&&we.clear())}}}function Wt(e){e();let t=e._sig;if(!t)return;let n=$i,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else F.has(s)||(F.add(s),ye.push(s));i=i.sigNext}}}function fr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Wt(r):F.has(r)||(F.add(r),ye.push(r))),n=n.sigNext}}function pr(e){let n=e.subsHead;if(n){if(he>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Wt(o):F.has(o)||(F.add(o),ye.push(o))),r=r.sigNext}return}he++,gt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Wt(o):F.has(o)||(F.add(o),ye.push(o))),r=r.sigNext}ur()}finally{he--,he===0&&(ye.length=0,F.clear(),we.size>0&&we.clear())}}}function mr(e){return e.__sc??0}function gr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function br(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var hr="4.13.1",yr=Symbol.for("sibujs.reactive.v1");function Ki(){let e=globalThis,t=e[yr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,O(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${hr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:jt,resumeTracking:qt,isTrackingSuspended:tr,untracked:nr,retrack:Gt,track:rr,reactiveBinding:Jt,recordDependency:sr,cleanup:Be,setMaxSubscriberRepeats:ar,setMaxDrainIterations:cr,drainNotificationQueue:dr,queueSignalNotification:fr,notifySubscribers:pr,getSubscriberCount:mr,getSubscriberDeps:gr,forEachSubscriber:br,getOwnerScope:Ut,runWithOwnerScope:bt,bindOwnerScope:Kt,structuralBinding:or,version:hr};return e[yr]=n,n}var H=Ki(),ke=H.suspendTracking,_e=H.resumeTracking,Sr=H.isTrackingSuspended,ne=H.untracked,Se=H.retrack,Fe=H.track,$=H.reactiveBinding,Ae=H.recordDependency,Ce=H.cleanup,fl=H.setMaxSubscriberRepeats,vr=H.setMaxDrainIterations,xr=H.drainNotificationQueue,Er=H.queueSignalNotification,ze=H.notifySubscribers,pl=H.getSubscriberCount,ml=H.getSubscriberDeps,gl=H.forEachSubscriber,Ve=H.getOwnerScope??Ut,ht=H.runWithOwnerScope??bt,V=H.bindOwnerScope??Kt,Ne=H.structuralBinding??((e,t)=>({stop:H.reactiveBinding(e,t),run:n=>n()}));function Xe(e,t,n){if(be(t))return ee(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){_(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}ee(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return $(r,e)}function Tr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){_(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){_(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),ee(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=$(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Yt=["data-focus-key","id","name"],Gi=new Set(["text","search","url","tel","password",""]);function Ji(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Gi.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function Ze(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<Yt.length;i++){let s=t.getAttribute(Yt[i]);if(s){r=Yt[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...Ji(t)}}function Yi(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Xi(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function wr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function We(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){wr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Xi(t,`[${e.attr}=${Yi(e.value)}]`);if(s&&s.tagName===e.tag){wr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}j(()=>{let s=e.attr?` (${e.attr}="${e.value}")`:"",a=i?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${s} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${a}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them. If dropping focus is INTENDED here (closing a panel, say), pass { focus: "discard" } to when()/match() to silence this, or { focus: { restoreTo: element } } to send focus somewhere other than <body>.`})}function de(e,t){let n=[];function r(){let o;try{o=t()}catch(l){_(l,{phase:"binding",name:"bindChildNode",node:e});return}let i=Ze(n);if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let p=n[l];D(p),p.parentNode&&p.parentNode.removeChild(p)}n.length=0,We(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let l=new Set;for(let p=0;p<o.length;p++){let g=o[p];if(g==null||typeof g=="boolean")continue;let m=g instanceof Node?g:document.createTextNode(String(g));if(l.has(m)){O("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(m),a.push(m)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let l=new Set(n);c=new Set;for(let p=0;p<a.length;p++)l.has(a[p])&&c.add(a[p])}for(let l=0;l<n.length;l++){let p=n[l];c?.has(p)||(D(p),p.parentNode&&p.parentNode.removeChild(p))}let u=e;for(let l=0;l<a.length;l++){let p=a[l];u.nextSibling!==p&&s.insertBefore(p,u.nextSibling),u=p}n=a,We(i,a,"bindChildNode")}return $(r,e,!0)}function Xt(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function U(){typeof document>"u"&&Xt()}var R="http://www.w3.org/2000/svg",Zi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var Zt=new Set,kr=100,_r=!1,Ar=new Map;function Cr(e){let t=Ar.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Ar.set(e,t)),t}function Qi(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=$(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",lt(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let l in a){if(!Object.hasOwn(a,l))continue;let p=a[l];if(p==null)continue;let g=Cr(l);u.push(g),c.setProperty(g,ut(g,String(p),{element:e}))}for(let l=0;l<o.length;l++)u.indexOf(o[l])===-1&&c.removeProperty(o[l]);o=u},e);x(e,s);return}if(typeof t=="string"){e.setAttribute("style",lt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Cr(r);if(typeof o=="function"){let s=o,a=$(()=>{n.style.setProperty(i,ut(i,String(s()),{element:e}))},e);x(e,a)}else n.style.setProperty(i,ut(i,String(o),{element:e}))}}function es(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=$(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);x(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=$(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let u=n[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);x(e,s)}else e.setAttribute("class",o)}function Qt(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),x(e,de(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),x(e,de(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),x(e,de(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}function d(e,t){let n=Kn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&Xt();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Qt(i,o),i):(j(()=>{let m=r.trim().split(/\s+/);if(m.length<2)return"";let f=0;for(let h=0;h<m.length;h++){let S=m[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(S))return"";/[-:/0-9]/.test(S)&&f++}if(f<2)return"";let b=`${e}|${r}`;return Zt.has(b)?"":Zt.size>=kr?_r?"":(_r=!0,`tagFactory: ${kr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(Zt.add(b),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return Qt(i,r),i;let s=r,a=s.class;a!=null&&es(i,a);let c=s.id;typeof c=="function"?x(i,Xe(i,"id",c)):c!=null&&(typeof c=="string"&&Zi.has(c.toLowerCase())&&O(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&Qt(i,u);let l=s.on;if(l)for(let m in l){if(!Object.hasOwn(l,m))continue;let f=l[m];typeof f=="function"?i.addEventListener(m,f):O(`tagFactory: on.${m} handler is not a function (got ${typeof f}). Event listener was not attached.`)}let p=s.style;p!=null&&Qi(i,p);let g=s.ref;g&&(g.current=i);for(let m in s)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,m))continue;let f=s[m];if(f==null||be(m))continue;typeof f=="function"?x(i,Xe(i,m,f)):ee(i,m,f,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Vl=d("html"),ts=d("head"),ns=d("body"),rs=d("title"),A=d("div"),P=d("span"),os=d("section"),is=d("article"),ss=d("header"),as=d("footer"),cs=d("nav"),us=d("main"),ls=d("aside"),ds=d("address"),en=d("p"),fs=d("h1"),ps=d("h2"),tn=d("h3"),ms=d("h4"),gs=d("h5"),bs=d("h6"),hs=d("blockquote"),ys=d("dd"),Ss=d("dl"),vs=d("dt"),xs=d("figcaption"),Es=d("figure"),Ts=d("hr"),ws=d("li"),ks=d("ol"),_s=d("ul"),nn=d("pre"),As=d("a"),Cs=d("abbr"),Ns=d("b"),Rs=d("bdi"),Ls=d("bdo"),Ms=d("br"),Os=d("cite"),rn=d("code"),Ds=d("data"),Hs=d("dfn"),Is=d("em"),Ps=d("i"),$s=d("kbd"),Bs=d("mark"),Fs=d("q"),zs=d("rp"),Vs=d("rt"),Ws=d("ruby"),js=d("s"),qs=d("samp"),Us=d("small"),Ks=d("strong"),Gs=d("sub"),Js=d("sup"),Ys=d("time"),Xs=d("u"),Zs=d("var"),Qs=d("area"),ea=d("audio"),ta=d("img"),na=d("map"),ra=d("track"),oa=d("video"),ia=d("embed"),sa=d("iframe"),aa=d("object"),ca=d("param"),ua=d("picture"),la=d("portal"),da=d("source"),fa=d("svg",R),pa=d("math"),ma=d("canvas"),ga=d("noscript"),ba=d("script"),ha=d("del"),ya=d("ins"),Sa=d("caption"),va=d("col"),xa=d("colgroup"),Ea=d("table"),Ta=d("tbody"),wa=d("td"),ka=d("tfoot"),_a=d("th"),Aa=d("thead"),Ca=d("tr"),Qe=d("button"),Na=d("datalist"),Ra=d("fieldset"),La=d("form"),Ma=d("input"),Oa=d("label"),Da=d("legend"),Ha=d("meter"),Ia=d("optgroup"),Pa=d("option"),$a=d("output"),Ba=d("progress"),Fa=d("select"),za=d("textarea"),Va=d("details"),Wa=d("dialog"),ja=d("menu"),qa=d("summary"),Ua=d("slot"),Ka=d("template"),Ga=d("base"),Ja=d("link"),Ya=d("meta"),Re=d("style"),Xa=d("circle",R),Za=d("ellipse",R),Qa=d("g",R),ec=d("line",R),tc=d("path",R),nc=d("polygon",R),rc=d("polyline",R),oc=d("rect",R),ic=d("text",R),sc=d("tspan",R),ac=d("defs",R),cc=d("clipPath",R),uc=d("mask",R),lc=d("pattern",R),dc=d("linearGradient",R),fc=d("radialGradient",R),pc=d("stop",R),mc=d("use",R),gc=d("symbol",R),bc=d("marker",R),hc=d("center"),yc=d("font"),Sc=d("marquee"),vc=e=>d(e);var on="__sibuPendingError";function Nr(e,t){let n=()=>e.parentNode?(_(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[on]=t)})}function yt(e){let t=e,n=t[on];if(n instanceof Error)return delete t[on],n}function Rr(e){let t=null;return function(){if(t)return t();let r=A({class:"sibu-lazy"}),o=!1;return e().then(V(i=>{if(o)return;t=i.default;let s=t();q(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));q(r,A({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Nr(r,s)}),r.appendChild(P("sibu-lazy-loading","Loading...")),x(r,()=>{o=!0}),r}}function Lr({nodes:e,fallback:t}){let n=A({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;x(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&D(s)});let a=V(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){q(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,q(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else q(n,c)}catch(c){let u=c instanceof Error?c:new Error(String(c));Nr(n,u)}});return queueMicrotask(a),n}function un(e,t){return()=>Ve()===e?t():ht(e,t)}function vt(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";_(n,{phase:r,name:t});return}}function sn(e,t,n,r,o){let i=vt(e,t);if(typeof i!="function")return;let s=un(o,i);r()||!n.isConnected?vt(s,"onUnmount"):Or(s,n)}var je=new WeakMap,Le=new WeakMap,fe=new Set,pe=new Set,qe=null,St=0,xc=256;function an(e){let t=je.get(e);if(t){je.delete(e),fe.delete(e);for(let n of t)try{n()}catch{}}}function cn(e){Le.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Le.get(e);if(n){Le.delete(e),pe.delete(e);for(let r of n)try{r()}catch{}}})}function Ec(e){if(fe.size===0||e.nodeType!==1)return;let t=e;if(fe.has(t)&&t.isConnected&&an(t),t.firstElementChild)for(let n of Array.from(fe))n!==t&&n.isConnected&&t.contains(n)&&an(n)}function Tc(e){if(pe.size===0||e.nodeType!==1)return;let t=e;if(pe.has(t)&&!t.isConnected&&cn(t),t.firstElementChild)for(let n of Array.from(pe))n!==t&&!n.isConnected&&t.contains(n)&&cn(n)}function wc(){if(fe.size>0)for(let e of Array.from(fe))e.isConnected&&an(e);if(pe.size>0)for(let e of Array.from(pe))e.isConnected||cn(e)}function Mr(){qe||typeof document>"u"||(qe=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)Ec(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Tc(t.removedNodes[n])}St+=e.length,St>=xc&&(St=0,wc()),ln()}),qe.observe(document.body,{childList:!0,subtree:!0}))}function ln(){qe&&fe.size===0&&pe.size===0&&(qe.disconnect(),qe=null,St=0)}function kc(e,t){let n=je.get(e);return n||(n=[],je.set(e,n)),n.push(t),fe.add(e),Mr(),()=>{let r=je.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(je.delete(e),fe.delete(e))}ln()}}function _c(e,t){let n=Le.get(e);return n||(n=[],Le.set(e,n)),n.push(t),pe.add(e),Mr(),()=>{let r=Le.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Le.delete(e),pe.delete(e))}ln()}}function xt(e,t){if(typeof document>"u")return;let n=Ve();if(e=un(n,e),t){let r=!1,o=()=>r;if(x(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||sn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){sn(e,"onMount",t,o,n);return}let i=kc(t,()=>{r||sn(e,"onMount",t,o,n)});x(t,i)})}else queueMicrotask(()=>{vt(e,"onMount")})}function Ac(e,t){typeof document>"u"||Or(un(Ve(),e),t)}function Or(e,t){let n=!1,r=()=>{n||(n=!0,vt(e,"onUnmount"))};x(t,r);let o=()=>{if(n)return;let i=_c(t,r);x(t,i)};t.isConnected?o():xt(()=>{o()},t)}function Cc(e,t){x(t,e)}function Z(e,t,n){try{e.emit(t,n)}catch{}}var dn=Symbol.for("sibujs.ssr.v1");function Nc(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof Nt=="function"&&(t=Nt("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var ve=globalThis[dn]??(globalThis[dn]=Nc()),Me=ve.als,W=ve.fallbackStore;ve.fallbackDepth??(ve.fallbackDepth=0);var Dr=!1;function Rc(){if(Dr||Me||!(typeof process<"u"&&!!process.versions?.node))return;Dr=!0;let t=process.versions.node;O(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function Oe(){if(Me){let e=Me.getStore();if(e)return e}return W}function Hr(){return Me?Me.getStore()??null:ve.fallbackDepth>0?W:null}function re(){return Oe().ssr}function Ir(e){if(!re())return null;let t=Oe(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Pr(){Oe().ssr=!0}function $r(){Oe().ssr=!1}function Br(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Me)return Me.run(t,e);Rc();let n=W.ssr,r=W.suspenseIdCounter,o=W.idCounter,i=W.locale;W.ssr=!0,W.suspenseIdCounter=0,W.idCounter=0,W.locale=void 0,ve.fallbackDepth++;try{return e()}finally{ve.fallbackDepth--,W.ssr=n,W.suspenseIdCounter=r,W.idCounter=o,W.locale=i}}function Fr(e){let t=Oe(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var jr=globalThis;function Lc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,ne(()=>t(o,void 0));else{let i=n;n=o,ne(()=>t(o,i))}}}var zr=100;function Et(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Ve()?Vr(t):ht(n,()=>Vr(t))}function Vr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){_(n,{phase:"cleanup"})}}function Wr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Et(e),Se(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=zr);e.rerunPending&&(e.rerunPending=!1,_(new Error(`effect re-requested itself ${zr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Mc(e){if(e.disposed)return;e.disposed=!0;let t=jr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Et(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ce(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Q(e,t){if(M(typeof e=="function","effect: argument must be a function."),re())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&Et(n),Se(n.bodyFn,o),n.rerunPending&&Wr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{Se(n.bodyFn,n.subscriber),n.rerunPending&&Wr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Et(n),Ce(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=jr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Z(i,"effect:create",{effectFn:e}),()=>Mc(n)}var et=0,fn=new Set;function Oc(e){et++;try{return e()}finally{et--,et===0&&Ic()}}function Dc(e){return et===0?!1:(fn.add(e),!0)}function Hc(){return et>0}function Ic(){try{for(let e of fn)Er(e)}finally{fn.clear()}xr()}var qr=Symbol.for("sibujs.reactive.batch.v1");function Pc(){let e=globalThis,t=e[qr];if(t)return t;let n={batch:Oc,enqueueBatchedSignal:Dc,isBatching:Hc};return e[qr]=n,n}var pn=Pc(),K=pn.batch,De=pn.enqueueBatchedSignal,$c=pn.isBatching;var mn=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Ae(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(n.value=u,n.__v++,!0){let l=mn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u})}De(n)||ze(n)}}:s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(Object.is(u,c))return;n.value=u,n.__v++;let l=mn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u}),De(n)||ze(n)},!0){let a=mn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Z(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Bc(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Fc=`
|
|
8
8
|
.sibu-error-display {
|
|
9
9
|
border: 1px solid var(--sibu-err-border, #e5484d);
|
|
10
10
|
border-radius: 10px;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
`||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
|
|
5
5
|
`?2:1;continue}if(Gn(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&Gn(e[s]);)i+=e[s],s++;s<e.length&&di(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
|
|
6
6
|
`?2:1);let a=Number.parseInt(i,16),u=a===0||a>1114111||a>=55296&&a<=57343;t+=u?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var Jn=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],pi=4,mi=5,gi=8;function bi(e){if(!e)return"an element";let t=e.tagName.toLowerCase(),n=e.getAttribute("id");n&&(t+=`#${n}`);let r=e.getAttribute("class");return r&&(t+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${t}>`}var qt=new Set,Yn=100,Xn=!1;function ht(e,t,n){ne(()=>{let r=["url() in an inline style is an exfiltration channel: the browser fetches it immediately and the URL's path or query can carry page data off-origin","expression() executes arbitrary script in legacy engines","the javascript: scheme executes script","the vbscript: scheme executes script","-moz-binding loads and runs remote XBL","behavior: loads and runs a remote HTC script","@import pulls in a remote stylesheet","image-set() fetches remote images, the same exfiltration channel as url()","filter:progid activates legacy scriptable filters","image() fetches its string argument as a URL, the same exfiltration channel as url()","src() fetches its string argument as a URL, the same exfiltration channel as url()"],o=n?.property?`${n.property}: ${e}`:e,i=bi(n?.element),s=`${i}|${o}`;return qt.has(s)?"":qt.size>=Yn?Xn?"":(Xn=!0,`${Yn} distinct dropped style declarations have been reported; suppressing further ones for the rest of this session so they cannot flood the console. The declarations are still dropped \u2014 only the reporting stops. Fix the reported ones and reload to see any that remain.`):(qt.add(s),`style declaration "${o}" was dropped by the style sanitizer on ${i} \u2014 ${r[t]}. The element renders without it, which usually looks like a missing image rather than an error. Sanctioned alternatives: for a content image use an <img> element (or a <picture>); for decoration, put the rule in a stylesheet and set a class instead \u2014 stylesheet CSS is not sanitized, only inline style attributes are. If this declaration is not yours, it came from untrusted data and the drop just prevented an exfiltration.`)})}function Zn(e){return(e.includes("\\")?fi(e):e).toLowerCase().replace(/\s+/g,"")}function Ut(e){if(!ci.test(e))return-1;let t=Zn(e);for(let n=0;n<Jn.length;n++)if(t.includes(Jn[n]))return n;return-1}function vt(e,t,n){let r=Kt(e,t);return r===-1?t:(ht(t,r,{property:e,element:n?.element}),"")}function Kt(e,t){let n=Ut(t);if(n!==-1)return n;let r=ae(e);return r==="behavior"?mi:r==="-moz-binding"?pi:(r==="filter"||r==="-ms-filter")&&Zn(t).includes("progid:")?gi:-1}function hi(e){let t=[],n="",r=0,o="";for(let s=0;s<e.length;s++){let a=e[s];if(o){n+=a,a==="\\"&&s+1<e.length?n+=e[++s]:a===o&&(o="");continue}if(a==="\\"){n+=a,s+1<e.length&&(n+=e[++s]);continue}if(a==="/"&&e[s+1]==="*"){let u=e.indexOf("*/",s+2);if(u===-1)return null;s=u+1;continue}if(a==='"'||a==="'")o=a;else if(a==="("||a==="[")r++;else if(a===")"||a==="]"){if(--r<0)return null}else{if(a==="{"||a==="}")return null;if(a===";"&&r===0){t.push(n),n="";continue}}n+=a}if(o||r!==0)return null;t.push(n);let i=[];for(let s of t){let a=s.indexOf(":");if(a===-1)continue;let u=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(u))continue;let l=s.slice(a+1).trim(),c=/!\s*important\s*$/i.exec(l);if(c&&(l=l.slice(0,c.index).trim()),l==="")continue;let m=u.startsWith("--")?u:ae(u);i.push([m,l,c!==null])}return i}function yi(e,t){let n=String(e),r=hi(n);if(r===null)return Ut(n)!==-1&&ht(n,Ut(n),t),"";let o=[];for(let[i,s,a]of r){let u=Kt(i,s);if(u!==-1){ht(s,u,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function St(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return yi(n,t);let r=document.createElement("div");try{r.style.cssText=n}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),u=Kt(s,a);if(u!==-1){ht(a,u,{property:s,element:t?.element});continue}let l=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${l?` !${l}`:""}`)}return o.join("; ")}var Gt=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),vi=new Set(["srcdoc"]);function ut(e){return vi.has(e.toLowerCase())}function Qn(e){return Gt.has(e.toLowerCase())}function Si(e){let t=e.toLowerCase();return t==="style"||Gt.has(t)}function xi(e,t,n){let r=e.toLowerCase();return r==="srcset"?li(t):Gt.has(r)?yt(t):r==="style"?St(t,n):t}function er(e,t,n){if(!Si(e))return t;let r=xi(e,t,n);return r===""?null:r}function Oe(e){return e===" "||e===" "||e===`
|
|
7
|
-
`||e==="\r"||e==="\f"}function xt(e){let t=0,n=e.length;for(;t<n&&Oe(e[t]);)t++;for(;n>t&&Oe(e[n-1]);)n--;return e.slice(t,n)}var ue=e=>({kind:"forbidden",reason:e});function wi(e){let t=xt(Ke(e));if(t==="")return ue("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return ue("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return ue("unparseable delay");for(;n<t.length&&Oe(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return ue("unexpected text after delay");for(n++;n<t.length&&Oe(t[n]);)n++;let o=n;for(;n<t.length&&!Oe(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return ue(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Oe(t[n]);)n++;if(t[n]!=="=")return ue("missing '=' after url");for(n++;n<t.length&&Oe(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let l=t.indexOf(a,n+1);if(l===-1)return ue("unterminated quoted destination");if(s=t.slice(n+1,l),xt(t.slice(l+1))!=="")return ue("trailing text after quoted destination")}else if(s=xt(t.slice(n)),/[;,]/.test(s))return ue("multiple refresh assignments");if(s==="")return ue("empty destination");let u=yt(s);return u===""?ue("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:u}}function Jt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=ae(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?ue(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:xt(Ke(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:wi(n)}var Ti="http://www.w3.org/1999/xhtml",Ei="http://www.w3.org/2000/svg",ki=new Set(["script","iframe","object","embed","frame","frameset"]);function nr(e){return ae(e)}function rr(e){return ki.has(nr(e))}var _i=new Set(["script","style"]);function or(e){return _i.has(nr(e))}var B={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Ci=new Set(["src","href","xlink:href","type","language"]),Ai=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Yt=new WeakSet;function ir(e){return e.namespaceURI===Ti||e.namespaceURI===null}function sr(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function Ni(e){Yt.has(e)||(Yt.add(e),e.getAttribute("content")!==null&&Jt(sr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Ri(e,t,n,r){if(!ir(e))return B.None;let o=ae(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Ni(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return B.None;let i=Jt(sr(e,o,n));return i.kind==="forbidden"?B.MetaRefreshForbidden:i.kind!=="not-refresh"&&Yt.has(e)?B.MetaRefreshReactive:B.None}function Li(e,t){if(t===null||ae(e)!=="attributename")return B.None;let n=Ke(t);return Qn(n)||_e(n)||ut(n)?B.AnimationTarget:B.None}var wt=new WeakSet;function tr(e){if(e===null)return!1;let t=ae(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function Mi(e,t,n,r){if(!ir(e))return B.None;let o=ae(t);return o==="href"?r==="static"||n===null?B.None:tr(e.getAttribute("rel"))?B.StylesheetSource:(wt.add(e),B.None):o==="rel"&&tr(n)&&wt.has(e)&&e.hasAttribute("href")?B.StylesheetSource:B.None}function Xt(e,t,n,r){let o=e.localName;return o==="meta"?Ri(e,t,n,r):o==="link"?Mi(e,t,n,r):o==="script"?r==="static"||n===null?B.None:Ci.has(ae(t))?B.ScriptSource:B.None:Ai.has(o)&&e.namespaceURI===Ei?Li(t,n):B.None}function Zt(e,t,n){e.localName!=="link"||ae(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?wt.add(e):wt.delete(e))}var Oi="http://www.w3.org/1999/xhtml",Pi="http://www.w3.org/2000/svg",Di="http://www.w3.org/1999/xlink",$i="http://www.w3.org/XML/1998/namespace",Hi=new Set(["checked","disabled","selected"]);function Ii(e){return e.namespaceURI===null||e.namespaceURI===Oi}function ur(e,t,n){ne(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function ar(e,t,n){e[t]=n}function Bi(e,t){if(e.namespaceURI!==Pi)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Di:n.startsWith("xml:")?$i:null}function de(e,t,n,r={}){let o=Vi(e,t,n,r);return e.localName==="link"&&Zt(e,t,r.reactive?"reactive":"runtime"),o}function Vi(e,t,n,r){let o=Bi(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(_e(t))return D(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Xt(e,t,s,r.reactive?"reactive":"runtime");if(a!==B.None)return ur(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(ut(t))return D(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let u=Ii(e),l=u?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let g=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==g&&(o?e.setAttributeNS(o,t,g):e.setAttribute(t,g)),!0}return u&&Hi.has(l)&&l in e?ar(e,l,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let c=String(n);if(r.syncValueProperty!==!1&&u&&(l==="value"||l==="checked")&&l in e)return ar(e,l,l==="checked"?!!n:c),!0;let m=c===""?"":er(t,c,{element:e});return m===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===m||(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0)}function Qt(e,t,n){if(ut(t))return D(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Xt(e,t,n,"static");return r!==B.None?(ur("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Zt(e,t,"static"),!0)}var ji=4096,en=[];function Fi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function zi(e,t,n){let r=en.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Fi();return o.sig=e,o.sub=t,o.epoch=n,o}function lr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,en.length<ji&&en.push(e)}function Wi(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function cr(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function qi(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Ui(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var fe=null,Se=null,Ce=0,Ae=[],X=new Set,Ki=[];function Gi(e){try{e()}catch(t){let n=e;M(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Ji(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ye=0,xe=!1;function nn(){ye===0&&(Se=fe,fe=null,xe=!0),ye++}function rn(){ye--,ye===0&&(fe=Se,Se=null,xe=!1)}function dr(){return xe}function fr(e){nn();try{return e()}finally{rn()}}var le=null;function on(){return le}function _t(e,t){let n=le;le=e;try{return t()}finally{le=n}}function sn(e){let t=le;return t===null?e:(...n)=>_t(t,()=>e(...n))}var Ge=null,Yi=0;function an(e,t){let n=fe,r=0,o=null;xe&&(r=ye,o=Se,ye=0,Se=null,xe=!1),fe=t;let i=t;i._cap===void 0&&(i._cap=zn());let s=le;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(le=a);let u=Ge;u!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=u),i._tok!=null&&(Ge=i._tok);let l=++Yi;i._epoch=l,i._structDirty=!1;for(let c=i.depsHead??null;c!==null;c=c.subNext){let m=c.sig;c.prevActive=m.__activeNode??null,m.__activeNode=c}try{e()}finally{fe=n,le=s,Ge=u,r!==0&&(ye=r,Se=o,xe=!0);let c=i.depsHead??null;for(;c!==null;){let m=c.subNext,h=c.sig;h.__activeNode=c.prevActive,c.prevActive=null,c.epoch!==l&&(Ui(c),cr(c),lr(c)),c=m}}}function pr(e,t){if(!t)return un(e);Je(t);let n=fe,r=0,o=null;xe&&(r=ye,o=Se,ye=0,Se=null,xe=!1),fe=t;let i=t;i._scope===void 0&&(i._scope=le);let s=le;le=i._scope;try{e()}finally{fe=n,le=s,r!==0&&(ye=r,Se=o,xe=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let u=a.sig;u.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Je(t))}function un(e,t,n){return gr(e,t,n===!0)._dispose}function mr(e,t){let n=gr(e,t,!0);return{stop:n._dispose,run:r=>{let o=Ge;Ge=n._tok??null;try{return r()}finally{Ge=o}}}}function gr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{an(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Je(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Je(o)},o}function br(e){if(!fe)return;let t=fe,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=zi(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,qi(t,i),Wi(n,i),t._structDirty=!0}function Je(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;cr(n),lr(n),n=r}}var Tt=1e3,Et=1e6,kt=0,Pe=new Set;function hr(e){let t=Tt;return Number.isFinite(e)&&e>0&&(Tt=Math.floor(e)),t}function yr(e){let t=Et;return Number.isFinite(e)&&e>0&&(Et=Math.floor(e)),t}function Xi(e){let t=e;return t._runEpoch!==kt?(t._runEpoch=kt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>Tt)}function Zi(e){let t=e.__name??"<unnamed>";M(new Error(`subscriber "${t}" fired more than ${Tt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function Qi(){M(new Error(`Notification drain exceeded ${Et} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function vr(){let e=0;for(;e<Ae.length;){if(e>=Et){Qi();break}let t=Ae[e++];X.delete(t)&&(t._owner!=null&&X.size>0&&(es(t),X.has(t))||Sr(t))}}function es(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;X.has(r)&&(t=r),n=r._owner??null}if(t===null)return;X.delete(t),Sr(t)}}function Sr(e){if(Pe.size>0&&Pe.has(e)||e._hasComputedDep===!0&&!Ji(e))return;if(Xi(e)){Zi(e),Pe.add(e);return}let t=Wn(e._cap??null);try{Gi(e)}finally{t&&qn()}}function xr(){if(!(Ce>0)){Ce++,kt++;try{vr()}finally{Ce--,Ce===0&&(Ae.length=0,X.clear(),Pe.size>0&&Pe.clear())}}}function tn(e){e();let t=e._sig;if(!t)return;let n=Ki,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else X.has(s)||(X.add(s),Ae.push(s));i=i.sigNext}}}function wr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?tn(r):X.has(r)||(X.add(r),Ae.push(r))),n=n.sigNext}}function Tr(e){let n=e.subsHead;if(n){if(Ce>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?tn(o):X.has(o)||(X.add(o),Ae.push(o))),r=r.sigNext}return}Ce++,kt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?tn(o):X.has(o)||(X.add(o),Ae.push(o))),r=r.sigNext}vr()}finally{Ce--,Ce===0&&(Ae.length=0,X.clear(),Pe.size>0&&Pe.clear())}}}function Er(e){return e.__sc??0}function kr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function _r(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Cr="4.13.0",Ar=Symbol.for("sibujs.reactive.v1");function ns(){let e=globalThis,t=e[Ar];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,D(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${Cr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:nn,resumeTracking:rn,isTrackingSuspended:dr,untracked:fr,retrack:an,track:pr,reactiveBinding:un,recordDependency:br,cleanup:Je,setMaxSubscriberRepeats:hr,setMaxDrainIterations:yr,drainNotificationQueue:xr,queueSignalNotification:wr,notifySubscribers:Tr,getSubscriberCount:Er,getSubscriberDeps:kr,forEachSubscriber:_r,getOwnerScope:on,runWithOwnerScope:_t,bindOwnerScope:sn,structuralBinding:mr,version:Cr};return e[Ar]=n,n}var z=ns(),De=z.suspendTracking,$e=z.resumeTracking,Nr=z.isTrackingSuspended,pe=z.untracked,Ne=z.retrack,Ye=z.track,J=z.reactiveBinding,He=z.recordDependency,Ie=z.cleanup,jc=z.setMaxSubscriberRepeats,Rr=z.setMaxDrainIterations,Lr=z.drainNotificationQueue,Mr=z.queueSignalNotification,Xe=z.notifySubscribers,Fc=z.getSubscriberCount,zc=z.getSubscriberDeps,Wc=z.forEachSubscriber,Ze=z.getOwnerScope??on,Ct=z.runWithOwnerScope??_t,Q=z.bindOwnerScope??sn,Be=z.structuralBinding??((e,t)=>({stop:z.reactiveBinding(e,t),run:n=>n()}));function lt(e,t,n){if(_e(t))return de(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){M(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}de(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return J(r,e)}function Or(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(u){M(u,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(u){M(u,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),de(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=J(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var ln=["data-focus-key","id","name"],rs=new Set(["text","search","url","tel","password",""]);function os(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&rs.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function ct(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<ln.length;i++){let s=t.getAttribute(ln[i]);if(s){r=ln[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...os(t)}}function is(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function ss(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let u=0;u<a.length;u++)r++,n??(n=a[u]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Pr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Qe(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){Pr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=ss(t,`[${e.attr}=${is(e.value)}]`);if(s&&s.tagName===e.tag){Pr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}ne(()=>{let s=e.attr?` (${e.attr}="${e.value}")`:"",a=i?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${s} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${a}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them. If dropping focus is INTENDED here (closing a panel, say), pass { focus: "discard" } to when()/match() to silence this, or { focus: { restoreTo: element } } to send focus somewhere other than <body>.`})}function we(e,t){let n=[];function r(){let o;try{o=t()}catch(c){M(c,{phase:"binding",name:"bindChildNode",node:e});return}let i=ct(n);if(o==null||typeof o=="boolean"){for(let c=0;c<n.length;c++){let m=n[c];F(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,Qe(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let c=new Set;for(let m=0;m<o.length;m++){let h=o[m];if(h==null||typeof h=="boolean")continue;let g=h instanceof Node?h:document.createTextNode(String(h));if(c.has(g)){D("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}c.add(g),a.push(g)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let u;if(n.length>0&&a.length>0){let c=new Set(n);u=new Set;for(let m=0;m<a.length;m++)c.has(a[m])&&u.add(a[m])}for(let c=0;c<n.length;c++){let m=n[c];u?.has(m)||(F(m),m.parentNode&&m.parentNode.removeChild(m))}let l=e;for(let c=0;c<a.length;c++){let m=a[c];l.nextSibling!==m&&s.insertBefore(m,l.nextSibling),l=m}n=a,Qe(i,a,"bindChildNode")}return J(r,e,!0)}function cn(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function oe(){typeof document>"u"&&cn()}var I="http://www.w3.org/2000/svg",as=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var dn=new Set,Dr=100,$r=!1,Hr=new Map;function Ir(e){let t=Hr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Hr.set(e,t)),t}function us(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=J(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",St(String(a),{element:e}));return}let u=e.style;i&&(e.removeAttribute("style"),i=!1);let l=[];for(let c in a){if(!Object.hasOwn(a,c))continue;let m=a[c];if(m==null)continue;let h=Ir(c);l.push(h),u.setProperty(h,vt(h,String(m),{element:e}))}for(let c=0;c<o.length;c++)l.indexOf(o[c])===-1&&u.removeProperty(o[c]);o=l},e);_(e,s);return}if(typeof t=="string"){e.setAttribute("style",St(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Ir(r);if(typeof o=="function"){let s=o,a=J(()=>{n.style.setProperty(i,vt(i,String(s()),{element:e}))},e);_(e,a)}else n.style.setProperty(i,vt(i,String(o),{element:e}))}}function ls(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=J(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);_(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=J(()=>{let a="";for(let u in n){if(!Object.hasOwn(n,u))continue;let l=n[u];(typeof l=="function"?l():l)&&(a=a?`${a} ${u}`:u)}e.setAttribute("class",a)},e);_(e,s)}else e.setAttribute("class",o)}function fn(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),_(e,we(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),_(e,we(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),_(e,we(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}function p(e,t){let n=rr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&cn();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),fn(i,o),i):(ne(()=>{let g=r.trim().split(/\s+/);if(g.length<2)return"";let d=0;for(let b=0;b<g.length;b++){let y=g[b];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&d++}if(d<2)return"";let f=`${e}|${r}`;return dn.has(f)?"":dn.size>=Dr?$r?"":($r=!0,`tagFactory: ${Dr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(dn.add(f),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return fn(i,r),i;let s=r,a=s.class;a!=null&&ls(i,a);let u=s.id;typeof u=="function"?_(i,lt(i,"id",u)):u!=null&&(typeof u=="string"&&as.has(u.toLowerCase())&&D(`tagFactory: element id="${u}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=u);let l=o!==void 0?o:s.nodes;l!=null&&fn(i,l);let c=s.on;if(c)for(let g in c){if(!Object.hasOwn(c,g))continue;let d=c[g];typeof d=="function"?i.addEventListener(g,d):D(`tagFactory: on.${g} handler is not a function (got ${typeof d}). Event listener was not attached.`)}let m=s.style;m!=null&&us(i,m);let h=s.ref;h&&(h.current=i);for(let g in s)switch(g){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,g))continue;let d=s[g];if(d==null||_e(g))continue;typeof d=="function"?_(i,lt(i,g,d)):de(i,g,d,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var hd=p("html"),cs=p("head"),ds=p("body"),fs=p("title"),P=p("div"),q=p("span"),ps=p("section"),ms=p("article"),gs=p("header"),bs=p("footer"),hs=p("nav"),ys=p("main"),vs=p("aside"),Ss=p("address"),pn=p("p"),xs=p("h1"),ws=p("h2"),mn=p("h3"),Ts=p("h4"),Es=p("h5"),ks=p("h6"),_s=p("blockquote"),Cs=p("dd"),As=p("dl"),Ns=p("dt"),Rs=p("figcaption"),Ls=p("figure"),Ms=p("hr"),Os=p("li"),Ps=p("ol"),Ds=p("ul"),gn=p("pre"),$s=p("a"),Hs=p("abbr"),Is=p("b"),Bs=p("bdi"),Vs=p("bdo"),js=p("br"),Fs=p("cite"),bn=p("code"),zs=p("data"),Ws=p("dfn"),qs=p("em"),Us=p("i"),Ks=p("kbd"),Gs=p("mark"),Js=p("q"),Ys=p("rp"),Xs=p("rt"),Zs=p("ruby"),Qs=p("s"),ea=p("samp"),ta=p("small"),na=p("strong"),ra=p("sub"),oa=p("sup"),ia=p("time"),sa=p("u"),aa=p("var"),ua=p("area"),la=p("audio"),ca=p("img"),da=p("map"),fa=p("track"),pa=p("video"),ma=p("embed"),ga=p("iframe"),ba=p("object"),ha=p("param"),ya=p("picture"),va=p("portal"),Sa=p("source"),xa=p("svg",I),wa=p("math"),Ta=p("canvas"),Ea=p("noscript"),ka=p("script"),_a=p("del"),Ca=p("ins"),Aa=p("caption"),Na=p("col"),Ra=p("colgroup"),La=p("table"),Ma=p("tbody"),Oa=p("td"),Pa=p("tfoot"),Da=p("th"),$a=p("thead"),Ha=p("tr"),dt=p("button"),Ia=p("datalist"),Ba=p("fieldset"),Va=p("form"),ja=p("input"),Fa=p("label"),za=p("legend"),Wa=p("meter"),qa=p("optgroup"),Ua=p("option"),Ka=p("output"),Ga=p("progress"),Ja=p("select"),Ya=p("textarea"),Xa=p("details"),Za=p("dialog"),Qa=p("menu"),eu=p("summary"),tu=p("slot"),nu=p("template"),ru=p("base"),ou=p("link"),iu=p("meta"),Ve=p("style"),su=p("circle",I),au=p("ellipse",I),uu=p("g",I),lu=p("line",I),cu=p("path",I),du=p("polygon",I),fu=p("polyline",I),pu=p("rect",I),mu=p("text",I),gu=p("tspan",I),bu=p("defs",I),hu=p("clipPath",I),yu=p("mask",I),vu=p("pattern",I),Su=p("linearGradient",I),xu=p("radialGradient",I),wu=p("stop",I),Tu=p("use",I),Eu=p("symbol",I),ku=p("marker",I),_u=p("center"),Cu=p("font"),Au=p("marquee"),Nu=e=>p(e);var hn="__sibuPendingError";function Br(e,t){let n=()=>e.parentNode?(M(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[hn]=t)})}function At(e){let t=e,n=t[hn];if(n instanceof Error)return delete t[hn],n}function Vr(e){let t=null;return function(){if(t)return t();let r=P({class:"sibu-lazy"}),o=!1;return e().then(Q(i=>{if(o)return;t=i.default;let s=t();re(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));re(r,P({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Br(r,s)}),r.appendChild(q("sibu-lazy-loading","Loading...")),_(r,()=>{o=!0}),r}}function jr({nodes:e,fallback:t}){let n=P({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;_(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&F(s)});let a=Q(()=>{if(!o)try{let u=e();if(s=u,u.classList.contains("sibu-lazy")){if(!u.querySelector(".sibu-lazy-loading")){re(n,u);return}i=new MutationObserver(()=>{if(o)return;u.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,re(n,u))}),i.observe(u,{childList:!0,subtree:!0})}else re(n,u)}catch(u){let l=u instanceof Error?u:new Error(String(u));Br(n,l)}});return queueMicrotask(a),n}function xn(e,t){return()=>Ze()===e?t():Ct(e,t)}function Rt(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";M(n,{phase:r,name:t});return}}function yn(e,t,n,r,o){let i=Rt(e,t);if(typeof i!="function")return;let s=xn(o,i);r()||!n.isConnected?Rt(s,"onUnmount"):zr(s,n)}var et=new WeakMap,je=new WeakMap,Te=new Set,Ee=new Set,tt=null,Nt=0,Ru=256;function vn(e){let t=et.get(e);if(t){et.delete(e),Te.delete(e);for(let n of t)try{n()}catch{}}}function Sn(e){je.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=je.get(e);if(n){je.delete(e),Ee.delete(e);for(let r of n)try{r()}catch{}}})}function Lu(e){if(Te.size===0||e.nodeType!==1)return;let t=e;if(Te.has(t)&&t.isConnected&&vn(t),t.firstElementChild)for(let n of Array.from(Te))n!==t&&n.isConnected&&t.contains(n)&&vn(n)}function Mu(e){if(Ee.size===0||e.nodeType!==1)return;let t=e;if(Ee.has(t)&&!t.isConnected&&Sn(t),t.firstElementChild)for(let n of Array.from(Ee))n!==t&&!n.isConnected&&t.contains(n)&&Sn(n)}function Ou(){if(Te.size>0)for(let e of Array.from(Te))e.isConnected&&vn(e);if(Ee.size>0)for(let e of Array.from(Ee))e.isConnected||Sn(e)}function Fr(){tt||typeof document>"u"||(tt=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++)Lu(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Mu(t.removedNodes[n])}Nt+=e.length,Nt>=Ru&&(Nt=0,Ou()),wn()}),tt.observe(document.body,{childList:!0,subtree:!0}))}function wn(){tt&&Te.size===0&&Ee.size===0&&(tt.disconnect(),tt=null,Nt=0)}function Pu(e,t){let n=et.get(e);return n||(n=[],et.set(e,n)),n.push(t),Te.add(e),Fr(),()=>{let r=et.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(et.delete(e),Te.delete(e))}wn()}}function Du(e,t){let n=je.get(e);return n||(n=[],je.set(e,n)),n.push(t),Ee.add(e),Fr(),()=>{let r=je.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(je.delete(e),Ee.delete(e))}wn()}}function Lt(e,t){if(typeof document>"u")return;let n=Ze();if(e=xn(n,e),t){let r=!1,o=()=>r;if(_(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||yn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){yn(e,"onMount",t,o,n);return}let i=Pu(t,()=>{r||yn(e,"onMount",t,o,n)});_(t,i)})}else queueMicrotask(()=>{Rt(e,"onMount")})}function $u(e,t){typeof document>"u"||zr(xn(Ze(),e),t)}function zr(e,t){let n=!1,r=()=>{n||(n=!0,Rt(e,"onUnmount"))};_(t,r);let o=()=>{if(n)return;let i=Du(t,r);_(t,i)};t.isConnected?o():Lt(()=>{o()},t)}function Hu(e,t){_(t,e)}function ce(e,t,n){try{e.emit(t,n)}catch{}}var Tn=Symbol.for("sibujs.ssr.v1");function Iu(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof jt=="function"&&(t=jt("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Re=globalThis[Tn]??(globalThis[Tn]=Iu()),Fe=Re.als,ee=Re.fallbackStore;Re.fallbackDepth??(Re.fallbackDepth=0);var Wr=!1;function Bu(){if(Wr||Fe||!(typeof process<"u"&&!!process.versions?.node))return;Wr=!0;let t=process.versions.node;D(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function ze(){if(Fe){let e=Fe.getStore();if(e)return e}return ee}function qr(){return Fe?Fe.getStore()??null:Re.fallbackDepth>0?ee:null}function me(){return ze().ssr}function Ur(e){if(!me())return null;let t=ze(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Kr(){ze().ssr=!0}function Gr(){ze().ssr=!1}function Jr(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Fe)return Fe.run(t,e);Bu();let n=ee.ssr,r=ee.suspenseIdCounter,o=ee.idCounter,i=ee.locale;ee.ssr=!0,ee.suspenseIdCounter=0,ee.idCounter=0,ee.locale=void 0,Re.fallbackDepth++;try{return e()}finally{Re.fallbackDepth--,ee.ssr=n,ee.suspenseIdCounter=r,ee.idCounter=o,ee.locale=i}}function Yr(e){let t=ze(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var eo=globalThis;function Vu(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,pe(()=>t(o,void 0));else{let i=n;n=o,pe(()=>t(o,i))}}}var Xr=100;function Mt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Ze()?Zr(t):Ct(n,()=>Zr(t))}function Zr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){M(n,{phase:"cleanup"})}}function Qr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Mt(e),Ne(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=Xr);e.rerunPending&&(e.rerunPending=!1,M(new Error(`effect re-requested itself ${Xr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function ju(e){if(e.disposed)return;e.disposed=!0;let t=eo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Mt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ie(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function te(e,t){if(j(typeof e=="function","effect: argument must be a function."),me())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&Mt(n),Ne(n.bodyFn,o),n.rerunPending&&Qr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{Ne(n.bodyFn,n.subscriber),n.rerunPending&&Qr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Mt(n),Ie(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=eo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&ce(i,"effect:create",{effectFn:e}),()=>ju(n)}var ft=0,En=new Set;function Fu(e){ft++;try{return e()}finally{ft--,ft===0&&qu()}}function zu(e){return ft===0?!1:(En.add(e),!0)}function Wu(){return ft>0}function qu(){try{for(let e of En)Mr(e)}finally{En.clear()}Lr()}var to=Symbol.for("sibujs.reactive.batch.v1");function Uu(){let e=globalThis,t=e[to];if(t)return t;let n={batch:Fu,enqueueBatchedSignal:zu,isBatching:Wu};return e[to]=n,n}var kn=Uu(),U=kn.batch,We=kn.enqueueBatchedSignal,Ku=kn.isBatching;var _n=globalThis;function A(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return He(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let u=n.value,l=typeof a=="function"?a(u):a;if(!o(u,l)){if(n.value=l,n.__v++,!0){let c=_n.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&ce(c,"signal:update",{signal:n,name:r,oldValue:u,newValue:l})}We(n)||Xe(n)}}:s=a=>{let u=n.value,l=typeof a=="function"?a(u):a;if(Object.is(l,u))return;n.value=l,n.__v++;let c=_n.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&ce(c,"signal:update",{signal:n,name:r,oldValue:u,newValue:l}),We(n)||Xe(n)},!0){let a=_n.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&ce(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Gu(e){let[t,n]=A(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Ju=`
|
|
7
|
+
`||e==="\r"||e==="\f"}function xt(e){let t=0,n=e.length;for(;t<n&&Oe(e[t]);)t++;for(;n>t&&Oe(e[n-1]);)n--;return e.slice(t,n)}var ue=e=>({kind:"forbidden",reason:e});function wi(e){let t=xt(Ke(e));if(t==="")return ue("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return ue("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return ue("unparseable delay");for(;n<t.length&&Oe(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return ue("unexpected text after delay");for(n++;n<t.length&&Oe(t[n]);)n++;let o=n;for(;n<t.length&&!Oe(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return ue(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Oe(t[n]);)n++;if(t[n]!=="=")return ue("missing '=' after url");for(n++;n<t.length&&Oe(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let l=t.indexOf(a,n+1);if(l===-1)return ue("unterminated quoted destination");if(s=t.slice(n+1,l),xt(t.slice(l+1))!=="")return ue("trailing text after quoted destination")}else if(s=xt(t.slice(n)),/[;,]/.test(s))return ue("multiple refresh assignments");if(s==="")return ue("empty destination");let u=yt(s);return u===""?ue("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:u}}function Jt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=ae(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?ue(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:xt(Ke(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:wi(n)}var Ti="http://www.w3.org/1999/xhtml",Ei="http://www.w3.org/2000/svg",ki=new Set(["script","iframe","object","embed","frame","frameset"]);function nr(e){return ae(e)}function rr(e){return ki.has(nr(e))}var _i=new Set(["script","style"]);function or(e){return _i.has(nr(e))}var B={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Ci=new Set(["src","href","xlink:href","type","language"]),Ai=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Yt=new WeakSet;function ir(e){return e.namespaceURI===Ti||e.namespaceURI===null}function sr(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function Ni(e){Yt.has(e)||(Yt.add(e),e.getAttribute("content")!==null&&Jt(sr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Ri(e,t,n,r){if(!ir(e))return B.None;let o=ae(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Ni(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return B.None;let i=Jt(sr(e,o,n));return i.kind==="forbidden"?B.MetaRefreshForbidden:i.kind!=="not-refresh"&&Yt.has(e)?B.MetaRefreshReactive:B.None}function Li(e,t){if(t===null||ae(e)!=="attributename")return B.None;let n=Ke(t);return Qn(n)||_e(n)||ut(n)?B.AnimationTarget:B.None}var wt=new WeakSet;function tr(e){if(e===null)return!1;let t=ae(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function Mi(e,t,n,r){if(!ir(e))return B.None;let o=ae(t);return o==="href"?r==="static"||n===null?B.None:tr(e.getAttribute("rel"))?B.StylesheetSource:(wt.add(e),B.None):o==="rel"&&tr(n)&&wt.has(e)&&e.hasAttribute("href")?B.StylesheetSource:B.None}function Xt(e,t,n,r){let o=e.localName;return o==="meta"?Ri(e,t,n,r):o==="link"?Mi(e,t,n,r):o==="script"?r==="static"||n===null?B.None:Ci.has(ae(t))?B.ScriptSource:B.None:Ai.has(o)&&e.namespaceURI===Ei?Li(t,n):B.None}function Zt(e,t,n){e.localName!=="link"||ae(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?wt.add(e):wt.delete(e))}var Oi="http://www.w3.org/1999/xhtml",Pi="http://www.w3.org/2000/svg",Di="http://www.w3.org/1999/xlink",$i="http://www.w3.org/XML/1998/namespace",Hi=new Set(["checked","disabled","selected"]);function Ii(e){return e.namespaceURI===null||e.namespaceURI===Oi}function ur(e,t,n){ne(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function ar(e,t,n){e[t]=n}function Bi(e,t){if(e.namespaceURI!==Pi)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Di:n.startsWith("xml:")?$i:null}function de(e,t,n,r={}){let o=Vi(e,t,n,r);return e.localName==="link"&&Zt(e,t,r.reactive?"reactive":"runtime"),o}function Vi(e,t,n,r){let o=Bi(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(_e(t))return D(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Xt(e,t,s,r.reactive?"reactive":"runtime");if(a!==B.None)return ur(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(ut(t))return D(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let u=Ii(e),l=u?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let g=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==g&&(o?e.setAttributeNS(o,t,g):e.setAttribute(t,g)),!0}return u&&Hi.has(l)&&l in e?ar(e,l,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let c=String(n);if(r.syncValueProperty!==!1&&u&&(l==="value"||l==="checked")&&l in e)return ar(e,l,l==="checked"?!!n:c),!0;let m=c===""?"":er(t,c,{element:e});return m===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===m||(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0)}function Qt(e,t,n){if(ut(t))return D(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Xt(e,t,n,"static");return r!==B.None?(ur("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Zt(e,t,"static"),!0)}var ji=4096,en=[];function Fi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function zi(e,t,n){let r=en.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Fi();return o.sig=e,o.sub=t,o.epoch=n,o}function lr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,en.length<ji&&en.push(e)}function Wi(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function cr(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function qi(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Ui(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var fe=null,Se=null,Ce=0,Ae=[],X=new Set,Ki=[];function Gi(e){try{e()}catch(t){let n=e;M(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Ji(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ye=0,xe=!1;function nn(){ye===0&&(Se=fe,fe=null,xe=!0),ye++}function rn(){ye--,ye===0&&(fe=Se,Se=null,xe=!1)}function dr(){return xe}function fr(e){nn();try{return e()}finally{rn()}}var le=null;function on(){return le}function _t(e,t){let n=le;le=e;try{return t()}finally{le=n}}function sn(e){let t=le;return t===null?e:(...n)=>_t(t,()=>e(...n))}var Ge=null,Yi=0;function an(e,t){let n=fe,r=0,o=null;xe&&(r=ye,o=Se,ye=0,Se=null,xe=!1),fe=t;let i=t;i._cap===void 0&&(i._cap=zn());let s=le;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(le=a);let u=Ge;u!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=u),i._tok!=null&&(Ge=i._tok);let l=++Yi;i._epoch=l,i._structDirty=!1;for(let c=i.depsHead??null;c!==null;c=c.subNext){let m=c.sig;c.prevActive=m.__activeNode??null,m.__activeNode=c}try{e()}finally{fe=n,le=s,Ge=u,r!==0&&(ye=r,Se=o,xe=!0);let c=i.depsHead??null;for(;c!==null;){let m=c.subNext,h=c.sig;h.__activeNode=c.prevActive,c.prevActive=null,c.epoch!==l&&(Ui(c),cr(c),lr(c)),c=m}}}function pr(e,t){if(!t)return un(e);Je(t);let n=fe,r=0,o=null;xe&&(r=ye,o=Se,ye=0,Se=null,xe=!1),fe=t;let i=t;i._scope===void 0&&(i._scope=le);let s=le;le=i._scope;try{e()}finally{fe=n,le=s,r!==0&&(ye=r,Se=o,xe=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let u=a.sig;u.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Je(t))}function un(e,t,n){return gr(e,t,n===!0)._dispose}function mr(e,t){let n=gr(e,t,!0);return{stop:n._dispose,run:r=>{let o=Ge;Ge=n._tok??null;try{return r()}finally{Ge=o}}}}function gr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{an(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Je(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Je(o)},o}function br(e){if(!fe)return;let t=fe,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=zi(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,qi(t,i),Wi(n,i),t._structDirty=!0}function Je(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;cr(n),lr(n),n=r}}var Tt=1e3,Et=1e6,kt=0,Pe=new Set;function hr(e){let t=Tt;return Number.isFinite(e)&&e>0&&(Tt=Math.floor(e)),t}function yr(e){let t=Et;return Number.isFinite(e)&&e>0&&(Et=Math.floor(e)),t}function Xi(e){let t=e;return t._runEpoch!==kt?(t._runEpoch=kt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>Tt)}function Zi(e){let t=e.__name??"<unnamed>";M(new Error(`subscriber "${t}" fired more than ${Tt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function Qi(){M(new Error(`Notification drain exceeded ${Et} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function vr(){let e=0;for(;e<Ae.length;){if(e>=Et){Qi();break}let t=Ae[e++];X.delete(t)&&(t._owner!=null&&X.size>0&&(es(t),X.has(t))||Sr(t))}}function es(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;X.has(r)&&(t=r),n=r._owner??null}if(t===null)return;X.delete(t),Sr(t)}}function Sr(e){if(Pe.size>0&&Pe.has(e)||e._hasComputedDep===!0&&!Ji(e))return;if(Xi(e)){Zi(e),Pe.add(e);return}let t=Wn(e._cap??null);try{Gi(e)}finally{t&&qn()}}function xr(){if(!(Ce>0)){Ce++,kt++;try{vr()}finally{Ce--,Ce===0&&(Ae.length=0,X.clear(),Pe.size>0&&Pe.clear())}}}function tn(e){e();let t=e._sig;if(!t)return;let n=Ki,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else X.has(s)||(X.add(s),Ae.push(s));i=i.sigNext}}}function wr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?tn(r):X.has(r)||(X.add(r),Ae.push(r))),n=n.sigNext}}function Tr(e){let n=e.subsHead;if(n){if(Ce>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?tn(o):X.has(o)||(X.add(o),Ae.push(o))),r=r.sigNext}return}Ce++,kt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?tn(o):X.has(o)||(X.add(o),Ae.push(o))),r=r.sigNext}vr()}finally{Ce--,Ce===0&&(Ae.length=0,X.clear(),Pe.size>0&&Pe.clear())}}}function Er(e){return e.__sc??0}function kr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function _r(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Cr="4.13.1",Ar=Symbol.for("sibujs.reactive.v1");function ns(){let e=globalThis,t=e[Ar];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,D(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${Cr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:nn,resumeTracking:rn,isTrackingSuspended:dr,untracked:fr,retrack:an,track:pr,reactiveBinding:un,recordDependency:br,cleanup:Je,setMaxSubscriberRepeats:hr,setMaxDrainIterations:yr,drainNotificationQueue:xr,queueSignalNotification:wr,notifySubscribers:Tr,getSubscriberCount:Er,getSubscriberDeps:kr,forEachSubscriber:_r,getOwnerScope:on,runWithOwnerScope:_t,bindOwnerScope:sn,structuralBinding:mr,version:Cr};return e[Ar]=n,n}var z=ns(),De=z.suspendTracking,$e=z.resumeTracking,Nr=z.isTrackingSuspended,pe=z.untracked,Ne=z.retrack,Ye=z.track,J=z.reactiveBinding,He=z.recordDependency,Ie=z.cleanup,jc=z.setMaxSubscriberRepeats,Rr=z.setMaxDrainIterations,Lr=z.drainNotificationQueue,Mr=z.queueSignalNotification,Xe=z.notifySubscribers,Fc=z.getSubscriberCount,zc=z.getSubscriberDeps,Wc=z.forEachSubscriber,Ze=z.getOwnerScope??on,Ct=z.runWithOwnerScope??_t,Q=z.bindOwnerScope??sn,Be=z.structuralBinding??((e,t)=>({stop:z.reactiveBinding(e,t),run:n=>n()}));function lt(e,t,n){if(_e(t))return de(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){M(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}de(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return J(r,e)}function Or(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(u){M(u,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(u){M(u,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),de(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=J(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var ln=["data-focus-key","id","name"],rs=new Set(["text","search","url","tel","password",""]);function os(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&rs.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function ct(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<ln.length;i++){let s=t.getAttribute(ln[i]);if(s){r=ln[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...os(t)}}function is(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function ss(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let u=0;u<a.length;u++)r++,n??(n=a[u]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Pr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Qe(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){Pr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=ss(t,`[${e.attr}=${is(e.value)}]`);if(s&&s.tagName===e.tag){Pr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}ne(()=>{let s=e.attr?` (${e.attr}="${e.value}")`:"",a=i?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${s} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${a}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them. If dropping focus is INTENDED here (closing a panel, say), pass { focus: "discard" } to when()/match() to silence this, or { focus: { restoreTo: element } } to send focus somewhere other than <body>.`})}function we(e,t){let n=[];function r(){let o;try{o=t()}catch(c){M(c,{phase:"binding",name:"bindChildNode",node:e});return}let i=ct(n);if(o==null||typeof o=="boolean"){for(let c=0;c<n.length;c++){let m=n[c];F(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,Qe(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let c=new Set;for(let m=0;m<o.length;m++){let h=o[m];if(h==null||typeof h=="boolean")continue;let g=h instanceof Node?h:document.createTextNode(String(h));if(c.has(g)){D("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}c.add(g),a.push(g)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let u;if(n.length>0&&a.length>0){let c=new Set(n);u=new Set;for(let m=0;m<a.length;m++)c.has(a[m])&&u.add(a[m])}for(let c=0;c<n.length;c++){let m=n[c];u?.has(m)||(F(m),m.parentNode&&m.parentNode.removeChild(m))}let l=e;for(let c=0;c<a.length;c++){let m=a[c];l.nextSibling!==m&&s.insertBefore(m,l.nextSibling),l=m}n=a,Qe(i,a,"bindChildNode")}return J(r,e,!0)}function cn(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function oe(){typeof document>"u"&&cn()}var I="http://www.w3.org/2000/svg",as=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var dn=new Set,Dr=100,$r=!1,Hr=new Map;function Ir(e){let t=Hr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Hr.set(e,t)),t}function us(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=J(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",St(String(a),{element:e}));return}let u=e.style;i&&(e.removeAttribute("style"),i=!1);let l=[];for(let c in a){if(!Object.hasOwn(a,c))continue;let m=a[c];if(m==null)continue;let h=Ir(c);l.push(h),u.setProperty(h,vt(h,String(m),{element:e}))}for(let c=0;c<o.length;c++)l.indexOf(o[c])===-1&&u.removeProperty(o[c]);o=l},e);_(e,s);return}if(typeof t=="string"){e.setAttribute("style",St(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Ir(r);if(typeof o=="function"){let s=o,a=J(()=>{n.style.setProperty(i,vt(i,String(s()),{element:e}))},e);_(e,a)}else n.style.setProperty(i,vt(i,String(o),{element:e}))}}function ls(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=J(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);_(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=J(()=>{let a="";for(let u in n){if(!Object.hasOwn(n,u))continue;let l=n[u];(typeof l=="function"?l():l)&&(a=a?`${a} ${u}`:u)}e.setAttribute("class",a)},e);_(e,s)}else e.setAttribute("class",o)}function fn(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),_(e,we(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),_(e,we(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),_(e,we(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}function p(e,t){let n=rr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&cn();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),fn(i,o),i):(ne(()=>{let g=r.trim().split(/\s+/);if(g.length<2)return"";let d=0;for(let b=0;b<g.length;b++){let y=g[b];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&d++}if(d<2)return"";let f=`${e}|${r}`;return dn.has(f)?"":dn.size>=Dr?$r?"":($r=!0,`tagFactory: ${Dr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(dn.add(f),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return fn(i,r),i;let s=r,a=s.class;a!=null&&ls(i,a);let u=s.id;typeof u=="function"?_(i,lt(i,"id",u)):u!=null&&(typeof u=="string"&&as.has(u.toLowerCase())&&D(`tagFactory: element id="${u}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=u);let l=o!==void 0?o:s.nodes;l!=null&&fn(i,l);let c=s.on;if(c)for(let g in c){if(!Object.hasOwn(c,g))continue;let d=c[g];typeof d=="function"?i.addEventListener(g,d):D(`tagFactory: on.${g} handler is not a function (got ${typeof d}). Event listener was not attached.`)}let m=s.style;m!=null&&us(i,m);let h=s.ref;h&&(h.current=i);for(let g in s)switch(g){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,g))continue;let d=s[g];if(d==null||_e(g))continue;typeof d=="function"?_(i,lt(i,g,d)):de(i,g,d,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var hd=p("html"),cs=p("head"),ds=p("body"),fs=p("title"),P=p("div"),q=p("span"),ps=p("section"),ms=p("article"),gs=p("header"),bs=p("footer"),hs=p("nav"),ys=p("main"),vs=p("aside"),Ss=p("address"),pn=p("p"),xs=p("h1"),ws=p("h2"),mn=p("h3"),Ts=p("h4"),Es=p("h5"),ks=p("h6"),_s=p("blockquote"),Cs=p("dd"),As=p("dl"),Ns=p("dt"),Rs=p("figcaption"),Ls=p("figure"),Ms=p("hr"),Os=p("li"),Ps=p("ol"),Ds=p("ul"),gn=p("pre"),$s=p("a"),Hs=p("abbr"),Is=p("b"),Bs=p("bdi"),Vs=p("bdo"),js=p("br"),Fs=p("cite"),bn=p("code"),zs=p("data"),Ws=p("dfn"),qs=p("em"),Us=p("i"),Ks=p("kbd"),Gs=p("mark"),Js=p("q"),Ys=p("rp"),Xs=p("rt"),Zs=p("ruby"),Qs=p("s"),ea=p("samp"),ta=p("small"),na=p("strong"),ra=p("sub"),oa=p("sup"),ia=p("time"),sa=p("u"),aa=p("var"),ua=p("area"),la=p("audio"),ca=p("img"),da=p("map"),fa=p("track"),pa=p("video"),ma=p("embed"),ga=p("iframe"),ba=p("object"),ha=p("param"),ya=p("picture"),va=p("portal"),Sa=p("source"),xa=p("svg",I),wa=p("math"),Ta=p("canvas"),Ea=p("noscript"),ka=p("script"),_a=p("del"),Ca=p("ins"),Aa=p("caption"),Na=p("col"),Ra=p("colgroup"),La=p("table"),Ma=p("tbody"),Oa=p("td"),Pa=p("tfoot"),Da=p("th"),$a=p("thead"),Ha=p("tr"),dt=p("button"),Ia=p("datalist"),Ba=p("fieldset"),Va=p("form"),ja=p("input"),Fa=p("label"),za=p("legend"),Wa=p("meter"),qa=p("optgroup"),Ua=p("option"),Ka=p("output"),Ga=p("progress"),Ja=p("select"),Ya=p("textarea"),Xa=p("details"),Za=p("dialog"),Qa=p("menu"),eu=p("summary"),tu=p("slot"),nu=p("template"),ru=p("base"),ou=p("link"),iu=p("meta"),Ve=p("style"),su=p("circle",I),au=p("ellipse",I),uu=p("g",I),lu=p("line",I),cu=p("path",I),du=p("polygon",I),fu=p("polyline",I),pu=p("rect",I),mu=p("text",I),gu=p("tspan",I),bu=p("defs",I),hu=p("clipPath",I),yu=p("mask",I),vu=p("pattern",I),Su=p("linearGradient",I),xu=p("radialGradient",I),wu=p("stop",I),Tu=p("use",I),Eu=p("symbol",I),ku=p("marker",I),_u=p("center"),Cu=p("font"),Au=p("marquee"),Nu=e=>p(e);var hn="__sibuPendingError";function Br(e,t){let n=()=>e.parentNode?(M(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[hn]=t)})}function At(e){let t=e,n=t[hn];if(n instanceof Error)return delete t[hn],n}function Vr(e){let t=null;return function(){if(t)return t();let r=P({class:"sibu-lazy"}),o=!1;return e().then(Q(i=>{if(o)return;t=i.default;let s=t();re(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));re(r,P({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Br(r,s)}),r.appendChild(q("sibu-lazy-loading","Loading...")),_(r,()=>{o=!0}),r}}function jr({nodes:e,fallback:t}){let n=P({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;_(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&F(s)});let a=Q(()=>{if(!o)try{let u=e();if(s=u,u.classList.contains("sibu-lazy")){if(!u.querySelector(".sibu-lazy-loading")){re(n,u);return}i=new MutationObserver(()=>{if(o)return;u.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,re(n,u))}),i.observe(u,{childList:!0,subtree:!0})}else re(n,u)}catch(u){let l=u instanceof Error?u:new Error(String(u));Br(n,l)}});return queueMicrotask(a),n}function xn(e,t){return()=>Ze()===e?t():Ct(e,t)}function Rt(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";M(n,{phase:r,name:t});return}}function yn(e,t,n,r,o){let i=Rt(e,t);if(typeof i!="function")return;let s=xn(o,i);r()||!n.isConnected?Rt(s,"onUnmount"):zr(s,n)}var et=new WeakMap,je=new WeakMap,Te=new Set,Ee=new Set,tt=null,Nt=0,Ru=256;function vn(e){let t=et.get(e);if(t){et.delete(e),Te.delete(e);for(let n of t)try{n()}catch{}}}function Sn(e){je.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=je.get(e);if(n){je.delete(e),Ee.delete(e);for(let r of n)try{r()}catch{}}})}function Lu(e){if(Te.size===0||e.nodeType!==1)return;let t=e;if(Te.has(t)&&t.isConnected&&vn(t),t.firstElementChild)for(let n of Array.from(Te))n!==t&&n.isConnected&&t.contains(n)&&vn(n)}function Mu(e){if(Ee.size===0||e.nodeType!==1)return;let t=e;if(Ee.has(t)&&!t.isConnected&&Sn(t),t.firstElementChild)for(let n of Array.from(Ee))n!==t&&!n.isConnected&&t.contains(n)&&Sn(n)}function Ou(){if(Te.size>0)for(let e of Array.from(Te))e.isConnected&&vn(e);if(Ee.size>0)for(let e of Array.from(Ee))e.isConnected||Sn(e)}function Fr(){tt||typeof document>"u"||(tt=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++)Lu(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Mu(t.removedNodes[n])}Nt+=e.length,Nt>=Ru&&(Nt=0,Ou()),wn()}),tt.observe(document.body,{childList:!0,subtree:!0}))}function wn(){tt&&Te.size===0&&Ee.size===0&&(tt.disconnect(),tt=null,Nt=0)}function Pu(e,t){let n=et.get(e);return n||(n=[],et.set(e,n)),n.push(t),Te.add(e),Fr(),()=>{let r=et.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(et.delete(e),Te.delete(e))}wn()}}function Du(e,t){let n=je.get(e);return n||(n=[],je.set(e,n)),n.push(t),Ee.add(e),Fr(),()=>{let r=je.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(je.delete(e),Ee.delete(e))}wn()}}function Lt(e,t){if(typeof document>"u")return;let n=Ze();if(e=xn(n,e),t){let r=!1,o=()=>r;if(_(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||yn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){yn(e,"onMount",t,o,n);return}let i=Pu(t,()=>{r||yn(e,"onMount",t,o,n)});_(t,i)})}else queueMicrotask(()=>{Rt(e,"onMount")})}function $u(e,t){typeof document>"u"||zr(xn(Ze(),e),t)}function zr(e,t){let n=!1,r=()=>{n||(n=!0,Rt(e,"onUnmount"))};_(t,r);let o=()=>{if(n)return;let i=Du(t,r);_(t,i)};t.isConnected?o():Lt(()=>{o()},t)}function Hu(e,t){_(t,e)}function ce(e,t,n){try{e.emit(t,n)}catch{}}var Tn=Symbol.for("sibujs.ssr.v1");function Iu(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof jt=="function"&&(t=jt("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Re=globalThis[Tn]??(globalThis[Tn]=Iu()),Fe=Re.als,ee=Re.fallbackStore;Re.fallbackDepth??(Re.fallbackDepth=0);var Wr=!1;function Bu(){if(Wr||Fe||!(typeof process<"u"&&!!process.versions?.node))return;Wr=!0;let t=process.versions.node;D(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function ze(){if(Fe){let e=Fe.getStore();if(e)return e}return ee}function qr(){return Fe?Fe.getStore()??null:Re.fallbackDepth>0?ee:null}function me(){return ze().ssr}function Ur(e){if(!me())return null;let t=ze(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Kr(){ze().ssr=!0}function Gr(){ze().ssr=!1}function Jr(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Fe)return Fe.run(t,e);Bu();let n=ee.ssr,r=ee.suspenseIdCounter,o=ee.idCounter,i=ee.locale;ee.ssr=!0,ee.suspenseIdCounter=0,ee.idCounter=0,ee.locale=void 0,Re.fallbackDepth++;try{return e()}finally{Re.fallbackDepth--,ee.ssr=n,ee.suspenseIdCounter=r,ee.idCounter=o,ee.locale=i}}function Yr(e){let t=ze(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var eo=globalThis;function Vu(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,pe(()=>t(o,void 0));else{let i=n;n=o,pe(()=>t(o,i))}}}var Xr=100;function Mt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Ze()?Zr(t):Ct(n,()=>Zr(t))}function Zr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){M(n,{phase:"cleanup"})}}function Qr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Mt(e),Ne(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=Xr);e.rerunPending&&(e.rerunPending=!1,M(new Error(`effect re-requested itself ${Xr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function ju(e){if(e.disposed)return;e.disposed=!0;let t=eo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Mt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ie(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function te(e,t){if(j(typeof e=="function","effect: argument must be a function."),me())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&Mt(n),Ne(n.bodyFn,o),n.rerunPending&&Qr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{Ne(n.bodyFn,n.subscriber),n.rerunPending&&Qr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Mt(n),Ie(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=eo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&ce(i,"effect:create",{effectFn:e}),()=>ju(n)}var ft=0,En=new Set;function Fu(e){ft++;try{return e()}finally{ft--,ft===0&&qu()}}function zu(e){return ft===0?!1:(En.add(e),!0)}function Wu(){return ft>0}function qu(){try{for(let e of En)Mr(e)}finally{En.clear()}Lr()}var to=Symbol.for("sibujs.reactive.batch.v1");function Uu(){let e=globalThis,t=e[to];if(t)return t;let n={batch:Fu,enqueueBatchedSignal:zu,isBatching:Wu};return e[to]=n,n}var kn=Uu(),U=kn.batch,We=kn.enqueueBatchedSignal,Ku=kn.isBatching;var _n=globalThis;function A(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return He(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let u=n.value,l=typeof a=="function"?a(u):a;if(!o(u,l)){if(n.value=l,n.__v++,!0){let c=_n.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&ce(c,"signal:update",{signal:n,name:r,oldValue:u,newValue:l})}We(n)||Xe(n)}}:s=a=>{let u=n.value,l=typeof a=="function"?a(u):a;if(Object.is(l,u))return;n.value=l,n.__v++;let c=_n.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&ce(c,"signal:update",{signal:n,name:r,oldValue:u,newValue:l}),We(n)||Xe(n)},!0){let a=_n.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&ce(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Gu(e){let[t,n]=A(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Ju=`
|
|
8
8
|
.sibu-error-display {
|
|
9
9
|
border: 1px solid var(--sibu-err-border, #e5484d);
|
|
10
10
|
border-radius: 10px;
|