nuclo 0.3.6 → 0.3.8
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/README.md +46 -34
- package/dist/nuclo.cjs +1 -1
- package/dist/nuclo.cjs.map +1 -1
- package/dist/nuclo.mjs +1 -1
- package/dist/nuclo.mjs.map +1 -1
- package/dist/ssr/nuclo.ssr.cjs.map +1 -1
- package/dist/ssr/nuclo.ssr.mjs.map +1 -1
- package/package.json +1 -1
- package/types/core/base.d.ts +0 -17
- package/types/core/events.d.ts +14 -0
- package/types/features/on.d.ts +1 -1
- package/types/svg/base.d.ts +7 -5
package/README.md
CHANGED
|
@@ -15,15 +15,16 @@ import 'nuclo';
|
|
|
15
15
|
|
|
16
16
|
let count = 0;
|
|
17
17
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
)
|
|
18
|
+
const Counter = () =>
|
|
19
|
+
div(
|
|
20
|
+
h1(() => `Count: ${count}`),
|
|
21
|
+
button('Increment', { onClick: () => {
|
|
22
|
+
count++;
|
|
23
|
+
update();
|
|
24
|
+
} })
|
|
25
|
+
);
|
|
25
26
|
|
|
26
|
-
render(
|
|
27
|
+
render(Counter, document.body);
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
## Why nuclo?
|
|
@@ -31,7 +32,7 @@ render(counter, document.body);
|
|
|
31
32
|
- **State-Dependent Values** – Pass a function for any text, attribute, condition, or list that depends on state; Nuclo can evaluate it again later
|
|
32
33
|
- **Explicit and Predictable** – Reevaluation doesn't happen on mutation — you trigger it yourself with a simple `update()` call
|
|
33
34
|
- **Real DOM, No Virtual Layer** – Nuclo creates and updates real DOM nodes directly; there's no virtual DOM to diff
|
|
34
|
-
- **Tiny Footprint** – ~
|
|
35
|
+
- **Tiny Footprint** – ~14.5 KB gzipped, zero dependencies
|
|
35
36
|
- **Global Tag Builders** – Natural API with global functions for all HTML and SVG elements
|
|
36
37
|
- **TypeScript-First** – Full type definitions for all 175 HTML and SVG builders
|
|
37
38
|
- **Targeted DOM Updates** – `update()` re-runs registered state-dependent values and only touches DOM where values changed
|
|
@@ -90,26 +91,35 @@ import 'nuclo';
|
|
|
90
91
|
|
|
91
92
|
// Now use div(), update(), on(), list(), when(), render(), etc. globally
|
|
92
93
|
let count = 0;
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
);
|
|
97
|
-
|
|
94
|
+
const App = () =>
|
|
95
|
+
div(
|
|
96
|
+
h1(() => `Count: ${count}`),
|
|
97
|
+
button('Click', { onClick: () => { count++; update(); } })
|
|
98
|
+
);
|
|
99
|
+
render(App, document.body);
|
|
98
100
|
```
|
|
99
101
|
|
|
102
|
+
Pass the component (`render(App, root)`), not the built tree (`render(App(), root)`). The DOM is the same, but only the component form can be rebuilt later by `forceUpdate()`.
|
|
103
|
+
|
|
100
104
|
### TypeScript Setup
|
|
101
105
|
|
|
102
|
-
|
|
106
|
+
Nuclo ships its own types. You need two things:
|
|
107
|
+
|
|
108
|
+
- `"moduleResolution": "bundler"`. `node16` and `nodenext` are not supported yet.
|
|
109
|
+
- The `DOM` lib. TypeScript includes it by default when you do not set `lib`.
|
|
110
|
+
|
|
111
|
+
If any file in the project imports `'nuclo'`, every file sees the global types, and you need nothing else. If no file imports it, for example in a separate tsconfig for tests, add the types yourself:
|
|
103
112
|
|
|
104
113
|
```json
|
|
105
114
|
{
|
|
106
115
|
"compilerOptions": {
|
|
116
|
+
"moduleResolution": "bundler",
|
|
107
117
|
"types": ["nuclo/types"]
|
|
108
118
|
}
|
|
109
119
|
}
|
|
110
120
|
```
|
|
111
121
|
|
|
112
|
-
Or
|
|
122
|
+
Or add this to a `.d.ts` file:
|
|
113
123
|
|
|
114
124
|
```ts
|
|
115
125
|
/// <reference types="nuclo/types" />
|
|
@@ -126,13 +136,14 @@ import 'nuclo';
|
|
|
126
136
|
|
|
127
137
|
let count = 0;
|
|
128
138
|
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
);
|
|
139
|
+
const App = () =>
|
|
140
|
+
div(
|
|
141
|
+
h1(() => `Count: ${count}`),
|
|
142
|
+
button('Increment', { onClick: () => { count++; update(); } }),
|
|
143
|
+
button('Reset', { onClick: () => { count = 0; update(); } })
|
|
144
|
+
);
|
|
134
145
|
|
|
135
|
-
render(
|
|
146
|
+
render(App, document.body);
|
|
136
147
|
```
|
|
137
148
|
|
|
138
149
|
### Todo List
|
|
@@ -153,7 +164,7 @@ function addTodo() {
|
|
|
153
164
|
update();
|
|
154
165
|
}
|
|
155
166
|
|
|
156
|
-
const
|
|
167
|
+
const App = () => div(
|
|
157
168
|
{ className: 'todo-app' },
|
|
158
169
|
|
|
159
170
|
// Input
|
|
@@ -185,7 +196,7 @@ const app = div(
|
|
|
185
196
|
)
|
|
186
197
|
);
|
|
187
198
|
|
|
188
|
-
render(
|
|
199
|
+
render(App, document.body);
|
|
189
200
|
```
|
|
190
201
|
|
|
191
202
|
### Real-time Search Filter
|
|
@@ -209,7 +220,7 @@ function filteredUsers() {
|
|
|
209
220
|
);
|
|
210
221
|
}
|
|
211
222
|
|
|
212
|
-
const
|
|
223
|
+
const App = () => div(
|
|
213
224
|
h1('User Directory'),
|
|
214
225
|
|
|
215
226
|
input(
|
|
@@ -237,7 +248,7 @@ const app = div(
|
|
|
237
248
|
)
|
|
238
249
|
);
|
|
239
250
|
|
|
240
|
-
render(
|
|
251
|
+
render(App, document.body);
|
|
241
252
|
```
|
|
242
253
|
|
|
243
254
|
### Loading States & Async
|
|
@@ -269,7 +280,7 @@ async function fetchProducts() {
|
|
|
269
280
|
update();
|
|
270
281
|
}
|
|
271
282
|
|
|
272
|
-
const
|
|
283
|
+
const App = () => div(
|
|
273
284
|
div(
|
|
274
285
|
input(
|
|
275
286
|
{
|
|
@@ -303,7 +314,7 @@ const app = div(
|
|
|
303
314
|
)
|
|
304
315
|
);
|
|
305
316
|
|
|
306
|
-
render(
|
|
317
|
+
render(App, document.body);
|
|
307
318
|
```
|
|
308
319
|
|
|
309
320
|
---
|
|
@@ -484,7 +495,7 @@ div({
|
|
|
484
495
|
|
|
485
496
|
`onMount` may return a cleanup function (no arguments) — it's called on destroy exactly like a separate `onDestroy` would be, so a subscription started in `onMount` can be released right next to where it's opened.
|
|
486
497
|
|
|
487
|
-
Because nuclo builds a tree off-document before attaching it in one shot, `onMount` can't fire the instant the element is built — it's queued and fires once `render()`/`hydrate()`/`update()` finishes inserting that element, with it already connected. `onDestroy` fires
|
|
498
|
+
Because nuclo builds a tree off-document before attaching it in one shot, `onMount` can't fire the instant the element is built — it's queued and fires once `render()`/`hydrate()`/`update()` finishes inserting that element, with it already connected. `onDestroy` fires when nuclo removes the element itself (a `list()` row is removed, a `when()` branch switches, or `forceUpdate()` drops it). If you remove an element yourself — a raw `node.remove()` or `innerHTML = ''` — its `onDestroy` and cleanups never run, and timers keep running. To tear down an app with cleanup, wrap it in `when()` and switch the condition off. Nuclo's own bookkeeping is WeakMap-based, so it never keeps a removed element alive — no manual cleanup registry to manage.
|
|
488
499
|
|
|
489
500
|
#### `scope(...ids)`
|
|
490
501
|
|
|
@@ -616,14 +627,15 @@ import 'nuclo';
|
|
|
616
627
|
import { renderToString, getCssText } from 'nuclo/ssr';
|
|
617
628
|
import { App } from './app.ts';
|
|
618
629
|
|
|
619
|
-
const html = renderToString(App
|
|
620
|
-
const styles = getCssText();
|
|
630
|
+
const html = renderToString(App);
|
|
621
631
|
|
|
622
|
-
const page = `<!doctype html><html><head><style>${
|
|
632
|
+
const page = `<!doctype html><html><head><style id="nuclo-styles">${getCssText()}</style></head>
|
|
623
633
|
<body><div id="app">${html}</div></body></html>`;
|
|
624
634
|
```
|
|
625
635
|
|
|
626
|
-
|
|
636
|
+
Keep `id="nuclo-styles"` on the style tag — the client reuses that element and adds only new rules. Without the id, the client injects a second stylesheet with every rule again.
|
|
637
|
+
|
|
638
|
+
On the client, call `hydrate(App, document.getElementById('app')!)` instead of `render()` to attach Nuclo runtimes to the existing markup without re-creating DOM nodes. Don't strip HTML comments from the server output — `hydrate()` needs the `<!-- text-N -->` markers.
|
|
627
639
|
|
|
628
640
|
`nuclo/ssr` also exports `renderManyToString(inputs)` for rendering a batch of trees at once, and `renderToStringWithContainer(input, containerTag?, containerAttrs?)` to wrap the output in a container element without a second serialization pass.
|
|
629
641
|
|
|
@@ -768,7 +780,7 @@ These markers identify conditional and list boundaries in the DOM.
|
|
|
768
780
|
### Gotchas
|
|
769
781
|
|
|
770
782
|
**Parameter count decides what a function modifier means.**
|
|
771
|
-
A modifier with **zero declared parameters** is treated as dynamic text (or a dynamic `
|
|
783
|
+
A modifier with **zero declared parameters** is treated as dynamic text (or a dynamic `cx()` className) and is called with no arguments. A modifier with **one or more declared parameters** is a node-modifier function receiving `(element, index)`. Default and rest parameters don't count as declared parameters (`fn.length` is 0), so these are all treated as *dynamic text*, not node modifiers:
|
|
772
784
|
|
|
773
785
|
```ts
|
|
774
786
|
div((el = fallback) => el.id); // dynamic text — el is undefined!
|
package/dist/nuclo.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e,t){typeof console<`u`&&console.error(`nuclo: ${e}`,t)}const t=typeof window<`u`&&typeof document<`u`,n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new WeakMap,i=/* @__PURE__ */ new Set,a=/* @__PURE__ */ new WeakMap;function o(e,t,i){let a=r.get(e);if(a){a.resolver=t,a.lastValue=i;return}let o=new WeakRef(e);n.add(o),r.set(e,{ref:o,resolver:t,lastValue:i})}function s(e){let t=a.get(e);if(!t){let n=new WeakRef(e);t={ref:n,attributeResolvers:[]},i.add(n),a.set(e,t)}return t}function c(e){let t=r.get(e);t&&(n.delete(t.ref),r.delete(e))}function l(e){let t=a.get(e);t&&(i.delete(t.ref),a.delete(e))}function u(e){if(e.nodeType===Node.ELEMENT_NODE){let t=e;Fe(t),l(t)}else e.nodeType===Node.TEXT_NODE&&c(e);let t=ye()?Array.from(e.childNodes):e.childNodes;for(let e=0;e<t.length;e++)u(t[e]);e.nodeType===Node.ELEMENT_NODE&&ve(e)}function d(e){let t=Array.from(e.childNodes);for(let e=0;e<t.length;e++)d(t[e]);e.nodeType===Node.ELEMENT_NODE&&ve(e)}function f(t){if(!t?.parentNode)return!1;try{return u(t),t.parentNode?.removeChild(t),!0}catch(t){return e(`Failed to remove child node`,t),!1}}function p(t,n,r){try{return t.insertBefore(n,r),!0}catch(t){return e(`Failed to insert node before reference`,t),!1}}function m(e,t){return{start:document.createComment(`${e}-start-${t}`),end:document.createComment(`${e}-end`)}}function h(e,t){let n=e.nextSibling;for(;n&&n!==t;){let e=n.nextSibling;f(n),n=e}}function g(e,t){let n=t.parentNode;if(n)for(let r=0;r<e.length;r++)p(n,e[r],t)}function ee(e,t,n){let r=e,i=Object.getOwnPropertyDescriptor(r,`appendChild`),a=r.insertBefore;r.appendChild=function(e){return a.call(r,e,t)};try{return n()}finally{i?Object.defineProperty(r,"appendChild",i):Reflect.deleteProperty(r,`appendChild`)}}const _=Symbol.for(`nuclo.serializing.v1`),v=globalThis,y=v[_]??(v[_]={on:!1});function b(){return y.on}let x=!1,S=!1,C=/* @__PURE__ */ new WeakMap;function w(){return x}function T(){return x&&S}function E(e=!1){x=!0,S=e,C=/* @__PURE__ */ new WeakMap}function te(){x=!1,S=!1}function D(e){let t=x;x=!1;try{return e()}finally{x=t}}function O(e){let t=C.get(e);return t===void 0?e.firstChild:t}function k(e,t){C.set(e,t)}function A(e){return e.nodeType===3&&!/\S/.test(e.textContent||``)}function ne(e){let t=O(e),n=!1;for(;t&&A(t);)t=t.nextSibling,n=!0;n&&k(e,t)}function j(e){let t=O(e);return t&&k(e,t.nextSibling),t}function re(e){let t=O(e);if(!t||t.nodeType!==3)return null;if(A(t)){let e=t.nextSibling;for(;e&&A(e);)e=e.nextSibling;if(e&&e.nodeType===8&&(e.textContent??``).trimStart().startsWith(`text-`))return null}return j(e),t}function ie(e,t){ne(e);let n=O(e),r=t+`-start-`;if(!n||n.nodeType!==8||!n.textContent?.startsWith(r))return null;j(e);let i=t+`-end`,a=0;for(let e=n.nextSibling;e;e=e.nextSibling){if(e.nodeType!==8)continue;let t=e.textContent;if(t===i){if(a===0)return{start:n,end:e,recreated:!1};a--}else t?.startsWith(r)&&a++}let o=document.createComment(i);return e.insertBefore(o,n.nextSibling),{start:n,end:o,recreated:!0}}function ae(e,t){if(!x)return null;ne(e);let n=O(e);return n&&n.nodeType===1&&n.tagName.toLowerCase()===t?j(e):null}function oe(e,t){if(!t)return;let n=O(e);for(;n;){let e=n===t?null:n.nextSibling;f(n),n=e}k(e,null)}const M=/* @__PURE__ */ new WeakMap;let se=0,ce=[];function le(){return!t||b()}function ue(e){let t=M.get(e);return t||(t={mount:null,destroy:null,state:0},M.set(e,t),se++,ce.push(new WeakRef(e))),t}function de(e,t){return e===null?t:Array.isArray(e)?(e.push(t),e):[e,t]}function fe(e,t){if(le())return;let n=ue(e);n.state!==2&&(n.state!==0&&T()||(n.mount=de(n.mount,t)))}function pe(e,t){if(le())return;let n=ue(e);n.state!==2&&(n.state!==0&&T()||(n.destroy=de(n.destroy,t)))}function me(t,n,r){if(r.state===1)try{let e=n(t);typeof e==`function`&&(M.get(t)?.state===2?he(t,e):r.destroy=de(r.destroy,e))}catch(t){e(`Error in mount callback`,t)}}function he(t,n){try{n(t)}catch(t){e(`Error in destroy callback`,t)}}function ge(e){let t=M.get(e);if(t.state!==0)return;t.state=1;let n=t.mount;if(t.mount=null,n!==null){if(Array.isArray(n))for(let r=0;r<n.length;r++)me(e,n[r],t);else me(e,n,t)}}function _e(){if(ce.length===0)return;let e=ce;ce=[];for(let t=0;t<e.length;t++){let n=e[t].deref();n&&ge(n)}}function ve(e){let t=M.get(e);if(!t||t.state===2)return;let n=t.state===1;if(t.state=2,se--,n){let n=t.destroy;if(n!==null){if(Array.isArray(n))for(let t=0;t<n.length;t++)he(e,n[t]);else he(e,n)}}t.mount=null,t.destroy=null}function ye(){return se>0}const be=Symbol(`nuclo.factory.tag`),xe=Symbol(`nuclo.factory.mods`),Se=Symbol(`nuclo.event.modifier`);let Ce=0;const we=[];let N=0;function Te(){return N>=we.length&&we.push(()=>null),we[N++]}function Ee(e,t,n){e[be]=t,e[xe]=n}function P(e){return typeof e==`function`?e[xe]:void 0}function F(e){return typeof e==`function`?e[be]:void 0}function De(e){return e[Se]=!0,e}function Oe(e){return typeof e==`function`&&e[Se]===!0}function ke(){return Ce>0}function Ae(e,t,n){Ce++;try{return e(t,n)}finally{Ce--}}function je(){return N}function Me(e){for(;N>e;){let e=we[--N];e[be]=void 0,e[xe]=void 0}}const I=/* @__PURE__ */ new WeakMap;function Ne(e,t){let n=I.get(e);n?Array.isArray(n)?n.includes(t)||n.push(t):n!==t&&I.set(e,[n,t]):I.set(e,t)}function Pe(e,t){e.removeEventListener(t.type,t.wrapped,t.capture)}function Fe(e){let t=I.get(e);if(t){if(Array.isArray(t))for(let n=0;n<t.length;n++)Pe(e,t[n]);else Pe(e,t);I.delete(e)}}function Ie(e){}function Le(e,n){return t?function(t){if(!t)return;let r=t;e===`mount`?fe(r,n):pe(r,n)}:Ie}function Re(t,n,r){return{type:t,wrapped:function(r){let i=this;try{n.call(i,r)}catch(n){e(`Error in '${t}' listener`,n)}},capture:r}}function ze(e,n,r){if(e===`mount`||e===`destroy`)return Le(e,n);if(!t)return Ie;let i=Re(e,n,r===!0||typeof r==`object`&&!!r&&r.capture===!0);return De(function(t){if(!t||typeof t.addEventListener!=`function`)return;let n=t;n.addEventListener(e,i.wrapped,r),Ne(n,i)})}const Be=/* @__PURE__ */ new Set([`onMount`,`onDestroy`]),Ve=/* @__PURE__ */ new WeakMap;function He(e){if(e.length<=2||e.charCodeAt(0)!==111||e.charCodeAt(1)!==110)return null;let t=e.charCodeAt(2);return t<65||t>90||Be.has(e)?null:e===`onDoubleClick`?`ondblclick`:e.toLowerCase()}function Ue(e,t,n){if(t in e){e[t]=n;return}let r=t.slice(2),i=Ve.get(e);if(i){for(let t=0;t<i.length;t+=2){if(i[t]!==r)continue;let a=i[t+1];if(a===n)return;e.removeEventListener(r,a),e.addEventListener(r,n),i[t+1]=n;return}e.addEventListener(r,n),i.push(r,n);return}e.addEventListener(r,n),Ve.set(e,[r,n])}function We(e){return e===null||typeof e!=`object`&&typeof e!=`function`}function L(e){return e instanceof Node?!0:typeof e!=`object`||!e?!1:typeof e.nodeType==`number`}function Ge(e){return typeof e==`object`&&!!e}function R(e){return typeof e==`function`}function Ke(e){return R(e)&&e.length===0}function z(e){return e==null||typeof e==`object`||typeof e==`function`?``:String(e)}function qe(e,n){let r=z(n),i=document.createTextNode(r);return t&&!b()&&o(i,e,r),i}function Je(t){for(let i of n){let a=i.deref(),o=a&&r.get(a);if(!o||!a.isConnected){a&&r.delete(a),n.delete(i);continue}if(t&&!t.contains(a))continue;let s;try{s=z(o.resolver())}catch(t){e(`Failed to update reactive text node`,t),s=``}s!==o.lastValue&&(a.textContent=s,o.lastValue=s)}}function Ye(e,t){let n=[],r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i==null){n.push({kind:4});continue}let a=typeof i;if(a===`function`){let e=P(i);if(e!==void 0){let t=F(i);if(!t)return null;let r=Ye(t,e);if(!r)return null;n.push({kind:3,child:r});continue}if(i.length===0){let e;try{e=i()}catch{return null}if(e==null||typeof e!=`object`&&typeof e!=`function`){n.push({kind:2});continue}return null}if(Oe(i)){n.push({kind:5});continue}return null}if(a===`object`){if(L(i))return null;let e=i,t=Object.keys(e),a=[];for(let n=0;n<t.length;n++){let i=t[n],o=e[i];if(o==null){a.push({key:i,kind:3,prop:!1});continue}if(i===`style`)return null;let s=typeof o;if(s===`function`){let e=He(i);if(e){a.push({key:i,kind:1,prop:!1,value:e});continue}if(i===`className`&&o.length===0){if(r++)return null;a.push({key:i,kind:2,prop:!1});continue}return null}if(s===`object`||i===`className`&&r++)return null;a.push({key:i,kind:0,prop:!1,value:o})}n.push({kind:0,keys:a});continue}n.push({kind:1})}return{tag:e,slots:n}}function Xe(e,t){let n=e.slots,r=t.firstChild;for(let e=0;e<n.length;e++){let i=n[e];switch(i.kind){case 0:{let e=i.keys;for(let n=0;n<e.length;n++){let r=e[n];r.kind===0?r.prop=r.key in t:r.kind===2&&t.removeAttribute(`class`)}break}case 1:case 2:r&&=r.nextSibling;break;case 3:if(!r)return;Xe(i.child,r),r=r.nextSibling}}}function Ze(e,t,n,r){let i=e.slots;if(t.length!==i.length)return!1;let a=n.firstChild;for(let e=0;e<i.length;e++){let o=i[e],s=t[e];switch(o.kind){case 0:{if(typeof s!=`object`||!s)return!1;let e=s,t=o.keys,i=0;for(let t in e)i++;if(i!==t.length)return!1;for(let i=0;i<t.length;i++){let a=t[i],o=e[a.key];switch(a.kind){case 0:if(o==null||typeof o==`object`||typeof o==`function`)return!1;if(o===a.value)break;if(a.prop){let e=n;e[a.key]!==o&&(e[a.key]=o)}else{let e=String(o);n.getAttribute(a.key)!==e&&n.setAttribute(a.key,e)}break;case 1:{if(typeof o!=`function`)return!1;let e=a.value;e===`onclick`?n.onclick=o:Ue(n,e,o);break}case 2:{if(typeof o!=`function`||o.length!==0)return!1;let e=o,t;try{t=e()}catch{return!1}let i=t?String(t):``;i&&(n.className=i),r.push(1,n,e,i);break}case 3:if(o!=null)return!1}}break}case 1:if(s==null||typeof s==`object`||typeof s==`function`||!a)return!1;a.nodeValue=String(s),a=a.nextSibling;break;case 2:{if(typeof s!=`function`||s.length!==0||P(s)!==void 0||!a)return!1;let e;try{e=s()}catch{return!1}if(e!=null&&(typeof e==`object`||typeof e==`function`))return!1;let t=z(e),n=a;n.nodeValue=t,r.push(0,n,s,t),a=n.nextSibling;break}case 3:{let e=P(s);if(e===void 0||F(s)!==o.child.tag||!a||!Ze(o.child,e,a,r))return!1;a=a.nextSibling;break}case 4:if(s!=null)return!1;break;case 5:if(!Oe(s))return!1;s(n,0)}}return!0}function Qe(e,t,n,r){let i=e.slots;if(t.length!==i.length)return!1;let a=n.firstChild;for(let e=0;e<i.length;e++){let o=i[e],s=t[e];switch(o.kind){case 0:{if(typeof s!=`object`||!s)return!1;let e=s,t=o.keys,i=0;for(let a in e){if(i>=t.length)return!1;let o=t[i];if(o.key!==a)return!1;i++;let s=e[a];if(o.kind===2){if(typeof s!=`function`||s.length!==0)return!1;l(n),r.push(1,n,s,n.className)}}if(i!==t.length)return!1;break}case 1:if(!a)return!1;a=a.nextSibling;break;case 2:{if(typeof s!=`function`||s.length!==0||!a||a.nodeType!==3)return!1;let e=a;c(e),r.push(0,e,s,e.nodeValue??``),a=e.nextSibling;break}case 3:{let e=P(s);if(e===void 0||F(s)!==o.child.tag||!a||!Qe(o.child,e,a,r))return!1;a=a.nextSibling;break}case 4:if(s!=null)return!1;break;case 5:if(!Oe(s))return!1}}return!0}function $e(e){for(let t=0;t<e.length;t+=4){let n;try{n=e[t+2]()}catch{continue}if(e[t]===0){let r=z(n);r!==e[t+3]&&(e[t+1].nodeValue=r,e[t+3]=r)}else{let r=n?String(n):``;r!==e[t+3]&&(e[t+1].className=r,e[t+3]=r)}}}function et(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const B=/* @__PURE__ */ new Set,V=/* @__PURE__ */ new WeakMap,tt=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{B.delete(e)}):null;let H=0;function nt(e,t){let n=V.get(e);if(V.set(e,t),n)return;let r=new WeakRef(e);B.add(r),tt?.register(e,r)}function rt(e){return Array.isArray(e)?e:Array.from(e)}function it(e,t,n){let r=typeof e==`function`?e(t,n):e;return typeof r==`object`&&r&&`tagName`in r?r:null}function at(e,t,n){return it(e.renderItem(t,n),e.host,n)}const U=[];function ot(e){return U.length>e?U.slice(e):null}function st(e,t,n){let r=je();try{return ct(e,t,n)}finally{Me(r)}}function ct(e,n,r){e.lastRenderLeaves=null;let i=e.template,a=t&&!w()&&!b(),o=i&&a?Ae(e.renderItem,n,r):e.renderItem(n,r);if(i!==null&&a){let t=P(o);if(t!==void 0){if(i===void 0){let n=F(o),i=n?Ye(n,t):null,a=it(o,e.host,r);if(i&&a){let n=a.cloneNode(!0);Xe(i,n);let r=U.length,o=!1;try{o=Qe(i,t,a,U),o&&(e.lastRenderLeaves=ot(r))}finally{U.length=r}if(!o)return e.template=null,e.lastRenderLeaves=null,a;e.template={tmpl:i,skeleton:n}}else e.template=null;return a}let a=i.skeleton.cloneNode(!0),s=U.length;try{if(F(o)===i.tmpl.tag&&Ze(i.tmpl,t,a,U))return e.lastRenderLeaves=ot(s),a}finally{U.length=s}return e.template=null,at(e,n,r)}if(i===void 0)e.template=null;else return e.template=null,at(e,n,r)}return it(o,e.host,r)}function lt(e,n,r,i){if(r.parentNode!==n||i.parentNode!==n)return!1;if(ye())for(let t=0;t<e.length;t++){let n=e[t].element;n&&d(n)}if(t&&n.firstChild===r&&n.lastChild===i)return n.textContent=``,n.appendChild(r),n.appendChild(i),!0;for(let t=0;t<e.length;t++){let r=e[t].element;r&&r.parentNode===n&&n.removeChild(r)}return!0}function ut(e){let t=e.length;if(t===0)return[];let n=Array(t),r=[];for(let i=0;i<t;i++){let t=e[i],a=0,o=r.length;for(;a<o;){let n=a+o>>1;e[r[n]]<t?a=n+1:o=n}n[i]=a>0?r[a-1]:-1,a===r.length?r.push(i):r[a]=i}let i=r.length,a=r[i-1],o=Array(i);for(;i>0;)o[--i]=a,a=n[a];return o}function dt(e,t,n,r,i,a,o){let s=document.createDocumentFragment();for(let t=r;t<i;t++){let r=n[t],i=st(e,r,t);if(!i)continue;let a=e.lastRenderLeaves;o.push({item:r,element:i,dyn:a,dynCreatedAt:a?e.currentFlushEpoch:void 0}),e.lastRenderLeaves=null,s.appendChild(i)}s.firstChild&&t.insertBefore(s,a)}function ft(e){let{startMarker:t,endMarker:n}=e,r=t.parentNode??e.host,i=rt(e.itemsProvider());if(et(e.lastSyncedItems,i))return;let a=e.records,o=a.length,s=i.length;if(s===0){if(o>0&&!lt(a,r,t,n))for(let e=0;e<o;e++)f(a[e].element);e.records=[],e.lastSyncedItems=[],e.allRecordsCreatedAt=void 0;return}let c=0,l=Math.min(o,s);for(;c<l&&a[c].item===i[c];)c++;let u=0,d=l-c;for(;u<d&&a[o-1-u].item===i[s-1-u];)u++;let p=c,m=o-u,h=c,g=s-u;if(p===m){let t=m<o?a[m].element:n;if(m===o)dt(e,r,i,h,g,t,a),e.allRecordsCreatedAt=o===0?e.currentFlushEpoch:void 0;else{let n=[];dt(e,r,i,h,g,t,n),e.records=a.slice(0,p).concat(n,a.slice(p)),e.allRecordsCreatedAt=void 0}e.lastSyncedItems=i.slice();return}if(h===g){for(let e=p;e<m;e++)f(a[e].element);a.splice(p,m-p),e.allRecordsCreatedAt=void 0,e.lastSyncedItems=i.slice();return}let ee=m-p,_=g-h,v=Array(_).fill(-1),y=new Uint8Array(ee),b=0,x=Math.min(m,g);for(let e=c;e<x;e++)a[e].item===i[e]&&(v[e-h]=e,y[e-p]=1,b++);let S=b,C=/* @__PURE__ */ new Map;for(let e=m-1;e>=p;e--){if(y[e-p])continue;let t=a[e].item,n=C.get(t);n===void 0?C.set(t,e):typeof n==`number`?C.set(t,[n,e]):n.push(e)}for(let e=0;e<_;e++){if(v[e]!==-1)continue;let t=C.get(i[h+e]);if(t===void 0)continue;let n;typeof t==`number`?(n=t,C.delete(i[h+e])):(n=t.pop(),t.length===0&&C.delete(i[h+e])),v[e]=n,y[n-p]=1,b++}if(b===0&&p===0&&m===o){if(!lt(a,r,t,n))for(let e=0;e<o;e++)f(a[e].element);let c=[];dt(e,r,i,0,s,n,c),e.records=c,e.allRecordsCreatedAt=e.currentFlushEpoch,e.lastSyncedItems=i.slice();return}for(let e=p;e<m;e++)y[e-p]||f(a[e].element);let w=null,T=b-S<=8&&S>=32;if(b>0&&!T){let e=[],t=[];for(let n=0;n<_;n++)v[n]!==-1&&(e.push(v[n]),t.push(n));w=new Uint8Array(_);let n=ut(e);for(let e=0;e<n.length;e++)w[t[n[e]]]=1}let E=Array(_),te=0,D=m<o?a[m].element:n,O=null;for(let t=_-1;t>=0;t--){let n=v[t];if(n===-1){let n=i[h+t],r=st(e,n,h+t);if(!r){E[t]=null,te++;continue}let a=e.lastRenderLeaves;E[t]={item:n,element:r,dyn:a,dynCreatedAt:a?e.currentFlushEpoch:void 0},e.lastRenderLeaves=null,O??=document.createDocumentFragment(),O.insertBefore(r,O.firstChild);continue}let o=a[n];E[t]=o;let s=o.element;if(O&&O.firstChild){let e=O.firstChild;r.insertBefore(O,D),D=e,O=null}(w?!w[t]:!(T&&n===h+t))&&r.insertBefore(s,D),D=s}O&&O.firstChild&&r.insertBefore(O,D);let k=Array(p+(_-te)+(o-m)),A=0;for(let e=0;e<p;e++)k[A++]=a[e];for(let e=0;e<_;e++){let t=E[e];t&&(k[A++]=t)}for(let e=m;e<o;e++)k[A++]=a[e];e.records=k,e.allRecordsCreatedAt=void 0,e.lastSyncedItems=i.slice()}function pt(e,t,n,r,i,a,o){return{itemsProvider:e,renderItem:t,startMarker:n,endMarker:r,records:i,host:a,lastSyncedItems:o,template:void 0,lastRenderLeaves:null,currentFlushEpoch:void 0,allRecordsCreatedAt:void 0}}function mt(e,t,n,r){return w()?gt(e,t,n,r):ht(e,t,n,r)}function ht(e,n,r,i){let{start:a,end:o}=m(`list`,i),s=pt(e,n,a,o,[],r,[]),c=r;return c.appendChild(a),c.appendChild(o),ft(s),t&&!b()&&nt(a,s),s}function gt(e,n,r,i){let a=r,o=ie(a,`list`);if(!o)return ht(e,n,r,i);let{start:s,end:c}=o,l=rt(e()),u=[];for(let e=0;e<l.length;e++){let t=it(n(l[e],e),r,e);t&&u.push({item:l[e],element:t,dyn:null,dynCreatedAt:void 0})}let d=O(a);for(;d&&d!==c;){let e=d.nextSibling;f(d),d=e}let p=c;for(let e=u.length-1;e>=0;e--){let t=u[e].element;(t.parentNode!==a||t.nextSibling!==p)&&a.insertBefore(t,p),p=t}k(a,c.nextSibling);let m=pt(e,n,s,c,u,r,l.slice());return t&&!b()&&nt(s,m),m}function _t(e){let t=[];H++;for(let n of B){let r=n.deref();if(!r){t.push(n);continue}let i=V.get(r);if(!i){t.push(n);continue}if(!r.isConnected||!i.endMarker.isConnected){V.delete(r),t.push(n);continue}if(e&&!e.contains(r))continue;i.currentFlushEpoch=H;try{ft(i)}finally{i.currentFlushEpoch=void 0}if(i.allRecordsCreatedAt===H)continue;let a=i.records;for(let e=0;e<a.length;e++){if(a[e].dynCreatedAt===H)continue;let t=a[e].dyn;t&&$e(t)}}for(let e of t)B.delete(e)}const vt={};function yt(t,n){let r;try{r=n.resolver()}catch(t){e(`Failed to resolve reactive attribute: ${n.key}`,t);return}let i=typeof r!=`object`||!r;if(!(i&&Object.is(r,n.lastValue)))try{n.apply(t,n.key,r),n.lastValue=i?r:vt}catch(t){e(`Failed to apply reactive attribute: ${n.key}`,t)}}function bt(e,n,r,i){let a=e,o={key:n,resolver:r,apply:i,lastValue:vt};if(t&&!b()){let e=s(a).attributeResolvers,t=0;for(;t<e.length&&e[t].key!==n;)t++;e[t]=o}yt(a,o)}function xt(e){for(let t of i){let n=t.deref(),r=n&&a.get(n);if(!r||!n.isConnected){n&&a.delete(n),i.delete(t);continue}if(e&&!e.contains(n))continue;let o=r.attributeResolvers;for(let e=0;e<o.length;e++)yt(n,o[e])}}function St(t,n){let r=t.style;if(r&&n)for(let t in n){let i=n[t];try{r[t]=i==null?``:String(i)}catch{e(`Failed to set style property '${t}'`)}}}function Ct(e,t,n){St(e,n)}function wt(e,t){R(t)?bt(e,`style`,t,Ct):St(e,t)}const W=/* @__PURE__ */ new WeakMap,Tt=/* @__PURE__ */ new WeakSet;function Et(e,t){let n=t.length,r=0;for(let i=0;i<=n;i++)(i===n||t.charCodeAt(i)===32)&&(i>r&&e.add(t.substring(r,i)),r=i+1)}function Dt(e){let t=``;for(let n of e)t&&(t+=` `),t+=n;return t}function Ot(e){if(e.className&&!W.has(e)){let t=/* @__PURE__ */ new Set;Et(t,e.className),W.set(e,t)}Tt.add(e)}function kt(e){W.delete(e),Tt.delete(e)}function At(e){return Tt.has(e)}function jt(e,t){if(!t)return;let n=W.get(e);n||(n=/* @__PURE__ */ new Set,W.set(e,n)),Et(n,t)}function Mt(e,t){let n=W.get(e);if(!n||n.size===0){let n=t||``;e.className!==n&&(e.className=n);return}if(!t){e.className=Dt(n);return}let r=Dt(n),i=t.length,a=0;for(let e=0;e<=i;e++)if(e===i||t.charCodeAt(e)===32){if(e>a){let i=t.substring(a,e);n.has(i)||(r+=` `+i)}a=e+1}e.className=r}function Nt(e,t){if(!t)return;let n=e.className;if(n&&n!==t){let r=/* @__PURE__ */ new Set;Et(r,n),Et(r,t),e.className=Dt(r)}else e.className=t}function Pt(e,t,n,r){if(n!=null){if(r&&t===`className`&&e instanceof HTMLElement){Nt(e,String(n));return}if(e instanceof Element&&e.namespaceURI===`http://www.w3.org/2000/svg`)e.setAttribute(t,String(n));else if(t in e)try{e[t]=n}catch{e instanceof Element&&e.setAttribute(t,String(n))}else e instanceof Element&&e.setAttribute(t,String(n))}}function Ft(e,t,n){Mt(e,String(n||``))}function It(e,t,n,r=!1){if(n==null)return;let i=t;if(i===`style`){wt(e,n);return}if(R(n)){if(i===`onMount`){fe(e,n);return}if(i===`onDestroy`){pe(e,n);return}if(i===`onClick`){e.onclick=n;return}if(i.charCodeAt(0)===111&&i.charCodeAt(1)===110){let t=He(i);if(t){Ue(e,t,n);return}if(i in e){e[i]=n;return}}if(n.length===0){let t=n;i===`className`&&e instanceof HTMLElement?(Ot(e),bt(e,i,t,Ft)):bt(e,i,t,Pt);return}}if(i===`className`&&e instanceof HTMLElement&&At(e)){let t=String(n||``);t&&(jt(e,t),Nt(e,t));return}Pt(e,i,n,r)}function Lt(e,t,n=!0){for(let r in t){let i=r,a=t[r];It(e,i,a,n&&i===`className`)}}function Rt(e){return Ge(e)&&!L(e)&&`className`in e&&typeof e.className==`string`&&Object.keys(e).length===1}function zt(e){ne(e);let t=O(e);return!!t&&t.nodeType===8&&t.textContent?.trimStart().startsWith(`text-`)===!0}function Bt(e,t){let n=O(e);if(n&&n.nodeType===3)return j(e),n.textContent!==t&&(n.textContent=t),n;let r=document.createTextNode(t);return e.insertBefore(r,n),k(e,n),r}function Vt(t,n,r){if(n==null)return null;if(R(n)){if(Ke(n))try{let e=n();if(Rt(e))return Lt(t,{className:()=>{let e=n();return Rt(e)?e.className:``}}),null;if(We(e)){if(w()){let r=t,i=z(e);if(T()){let e=re(r);if(e)return e.textContent!==i&&(e.textContent=i),o(e,n,i),null}if(zt(r))return j(r),o(Bt(r,i),n,i),null}return Ht(r,qe(n,e))}return null}catch(t){return e(`Error evaluating reactive text function:`,t),Ht(r,qe(Ut,``))}let i=n(t,r);return i==null?null:We(i)?Ht(r,document.createTextNode(String(i))):L(i)?i:(Ge(i)&&Lt(t,i),null)}let i=n;if(We(i)){if(w()){let e=t,n=String(i);if(T()){let t=re(e);if(t)return t.textContent!==n&&(t.textContent=n),null}if(zt(e))return j(e),Bt(e,n),null}return Ht(r,document.createTextNode(String(i)))}return L(i)?i:(Lt(t,i),null)}function Ht(e,n){if(t&&!w()&&!b())return n;let r=document.createDocumentFragment();return r.appendChild(document.createComment(` text-${e} `)),r.appendChild(n),r}function Ut(){return``}const Wt=/* @__PURE__ */ new Set,G=/* @__PURE__ */ new WeakMap,Gt=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{Wt.delete(e)}):null;function Kt(e,t){for(let t=0;t<e.length;t++){let n=e[t].condition;if(typeof n==`function`?n():n)return t}return t.length>0?-1:null}function qt(e){let{groups:t,elseContent:n,host:r,index:i,endMarker:a}=e,o=Kt(t,n);o===e.activeIndex||(h(e.startMarker,e.endMarker),e.activeIndex=o,o===null)||g(Qt(o>=0?t[o].content:n,r,i,a),a)}function Jt(e){let t=G.get(e.startMarker);if(G.set(e.startMarker,e),t)return;let n=new WeakRef(e.startMarker);Wt.add(n),Gt?.register(e.startMarker,n)}function Yt(e){return G.get(e)}function Xt(t){let n=[];for(let r of Wt){let i=r.deref();if(i===void 0){n.push(r);continue}let a=G.get(i);if(!a){n.push(r);continue}if(!i.isConnected||!a.endMarker.isConnected){G.delete(i),n.push(r);continue}if(!t||t.contains(i))try{qt(a)}catch(t){e(`when() branch threw during update; unregistering this conditional`,t),G.delete(i),n.push(r)}}for(let e of n)Wt.delete(e)}function Zt(e,t,n,r){return!R(e)||Ke(e)?Vt(t,e,n):ee(t,r,()=>{let r=Vt(t,e,n);return r&&!r.parentNode?r:null})}function Qt(e,t,n,r){let i=[];for(let a of e){let e=Zt(a,t,n,r);e&&i.push(e)}return i}function $t(e,t){return`when-start-${e}-b${t===null?`n`:t}`}function en(e){let t=/-b(n|-?\d+)$/.exec(e||``);if(t)return t[1]===`n`?null:parseInt(t[1],10)}var tn=class e{groups;elseContent;constructor(e,t){this.groups=e,this.elseContent=t}cloneWith(t,n){return new e(t?[...this.groups,t]:this.groups,n??this.elseContent)}render(e,t){return w()?this.hydrateRender(e,t):this.freshRender(e,t)}freshRender(e,t){let{start:n,end:r}=m(`when`,t),i=this.createRuntimeFromMarkers(e,t,n,r),a=e;return a.appendChild(n),a.appendChild(r),qt(i),n.textContent=$t(t,i.activeIndex),n}hydrateRender(e,t){let n=e,r=ie(n,`when`);if(!r)return this.freshRender(e,t);let{start:i,end:a}=r,o=Kt(this.groups,this.elseContent),s=Yt(i),c=s?s.activeIndex:en(i.textContent);if(!r.recreated&&(c===void 0||c===o)){if(o!==null){let n=o>=0?this.groups[o].content:this.elseContent;for(let r of n)Vt(e,r,t)}}else if(h(i,a),o!==null){let n=o>=0?this.groups[o].content:this.elseContent,r=a;D(()=>{g(Qt(n,e,t,r),r)})}return k(n,a.nextSibling),this.createRuntimeFromMarkers(e,t,i,a,o),i}createRuntimeFromMarkers(e,n,r,i,a=null){let o={startMarker:r,endMarker:i,host:e,index:n,groups:this.groups,elseContent:this.elseContent,activeIndex:a};return t&&!b()&&Jt(o),o}};function nn(e){return Object.assign(function(t,n){return e.render(t,n)},{when:function(t,...n){return nn(e.cloneWith({condition:t,content:n}))},else:function(...t){return nn(e.cloneWith(void 0,t))}})}function rn(e,...t){return nn(new tn([{condition:e,content:t}],[]))}const an=/* @__PURE__ */ new Map;function on(e){let t=[],n=/* @__PURE__ */ new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();e&&(n.has(e)||(n.add(e),t.push(e)))}return t}function sn(e,t){let n=an.get(e);n||(n=/* @__PURE__ */ new Set,an.set(e,n));for(let e of n)if(e.deref()===t)return;n.add(new WeakRef(t))}function cn(e){let t=on(e);if(t.length===0)return[];let n=/* @__PURE__ */ new Set;for(let e of t){let t=an.get(e);if(!t)continue;let r=[];for(let e of t){let t=e.deref();if(t===void 0){r.push(e);continue}if(!t.isConnected){r.push(e);continue}n.add(t)}for(let e of r)t.delete(e);t.size===0&&an.delete(e)}return Array.from(n)}function ln(...e){let n=on(e);return function(e){if(t&&!b()&&e instanceof Element)for(let t of n)sn(t,e)}}const un=[_t,Xt,xt,Je];function dn(...e){let t;if(e.length>0){let n=cn(e);if(n.length===1){let e=n[0];t={contains:t=>e.contains(t)}}else t={contains:e=>{for(let t of n)if(t.contains(e))return!0;return!1}}}for(let e of un)e(t);_e()}function fn(e,t){return function(n,r){return mt(e,t,n,r).startMarker}}const K=[],pn=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{let t=K.indexOf(e);t!==-1&&K.splice(t,1)}):null;function mn(e){if(Ke(e)){let t=e();if(R(t))return{build:t,component:e}}return{build:e,component:null}}function hn(e,n){if(!n||!t||!e||e.nodeType!==1)return;let r={root:new WeakRef(e),component:n};K.push(r),pn?.register(e,r,r)}function gn(e,t,n=0){let{build:r,component:i}=mn(e),a=t||document.body,o=r(a,n);return a.appendChild(o),_e(),hn(o,i),o}function _n(e,t){let{build:n,component:r}=mn(e),i=yn(n,t,!1,null);return hn(i,r),i}function vn(t,n){if(t!==void 0)return yn(mn(t).build,n,!0,null);let r=0;for(let t=0;t<K.length;t++){let n=K[t],i=n.root.deref(),a=i?.parentNode;if(!i||!i.isConnected||!a||a.nodeType!==1){pn?.unregister(n);continue}try{let e=yn(n.component(),a,!0,i);e!==i&&(n.root=new WeakRef(e),pn?.unregister(n),pn?.register(e,n,n))}catch(t){e(`forceUpdate(): component threw; keeping this root's previous DOM`,t)}K[r++]=n}K.length=r}function yn(e,t,n,r){let i=t||document.body,a=i;E(n),r&&k(a,r);let o;try{o=e(i,0);let t=o;if(t&&t.nodeType===1&&t.parentNode!==a){let e=O(a);if(e){let n=e.nextSibling;a.insertBefore(t,e),f(e),k(a,n)}else a.appendChild(t),k(a,null)}}finally{te()}return _e(),o}function bn(){return{atomCache:/* @__PURE__ */ new Map,atomMeta:/* @__PURE__ */ new Map,rawKeys:/* @__PURE__ */ new Set,baseRules:[],queryRules:/* @__PURE__ */ new Map,styleEpoch:0,cssTextCache:null,sheet:null,sheetDocument:null,baseRuleCount:0,groupRules:/* @__PURE__ */ new Map,externalRules:null,hasExternalGroups:!1}}const xn=Symbol.for(`nuclo.style.engine.v1`),Sn=globalThis;let Cn;function q(){return Cn??=Sn[xn]??(Sn[xn]=bn())}function wn(e){for(let t of e){let e=q();e.queryRules.has(t)||e.queryRules.set(t,[])}}function Tn(e,t){let n=q();try{let r=e.cssRules.length;e.insertRule(t+`{}`,r);let i=e.cssRules[r];return n.groupRules.set(t,i),n.groupRules.set(J(i),i),i}catch{return null}}const En=/* @__PURE__ */ new WeakMap;function J(e){let t=En.get(e);if(t!==void 0)return t;let n=e.cssText,r=n.indexOf(`{`),i=(r===-1?n:n.slice(0,r)).trim();return En.set(e,i),i}function Dn(e){return e instanceof CSSStyleRule?e.selectorText:J(e)}function On(e,t){let n=q();if(!n.externalRules)return;let r=X(t,Dn(e)),i=n.externalRules.get(r);i||(i=/* @__PURE__ */ new Set,n.externalRules.set(r,i)),i.add(e.cssText)}function kn(e,t){let n=q();if(!n.externalRules)return!1;let r=X(t,Dn(e)),i=n.externalRules.get(r);return i?.delete(e.cssText)?(i.size===0&&n.externalRules.delete(r),n.externalRules.size===0&&(n.externalRules=null),!0):!1}function An(e){let t=q();for(let n=0;n<e.length;n++){let r=e[n];if(r instanceof CSSStyleRule){On(r,void 0);continue}let i=J(r);if(`cssRules`in r&&!i.startsWith(`@keyframes`)){let e=r;t.hasExternalGroups=!0,t.groupRules.set(i,e);for(let t=0;t<e.cssRules.length;t++)On(e.cssRules[t],i)}else On(r,void 0)}}function jn(e,t){let n=q();try{e.insertRule(t,n.baseRuleCount);let r=e.cssRules[n.baseRuleCount];if(kn(r,void 0)){e.deleteRule(n.baseRuleCount);return}n.baseRuleCount++}catch{}}function Mn(e,t){let n=q();try{let r=e.cssRules.length;e.insertRule(t,r);let i=e.cssRules[r];n.externalRules&&kn(i,J(e))&&e.deleteRule(r)}catch{}}function Nn(e,t){let n=q(),r=n.groupRules.get(t);if(r)return r;if(!n.hasExternalGroups)return Tn(e,t);try{let r=e.cssRules.length;e.insertRule(t+`{}`,r);let i=J(e.cssRules[r]);e.deleteRule(r);let a=n.groupRules.get(i);if(a)return n.groupRules.set(t,a),a}catch{return null}return Tn(e,t)}function Y(){let e=q();if(typeof document>`u`||typeof document.getElementById!=`function`)return null;if(e.sheet&&e.sheetDocument===document&&e.sheet.ownerNode&&e.sheet.ownerNode.isConnected)return e.sheet;let t=document.getElementById(`nuclo-styles`),n;if(t?.tagName===`STYLE`?n=t:(n=document.createElement(`style`),n.id=`nuclo-styles`,t?t.replaceWith(n):document.head.appendChild(n)),e.sheet=n.sheet,e.sheetDocument=document,e.groupRules.clear(),e.baseRuleCount=0,e.externalRules=null,e.hasExternalGroups=!1,!e.sheet)return null;if(e.sheet.cssRules.length>0){let t=0;for(;t<e.sheet.cssRules.length;){let n=e.sheet.cssRules[t];if(!(n instanceof CSSStyleRule)&&`cssRules`in n&&!J(n).startsWith(`@keyframes`))break;t++}e.baseRuleCount=t,e.externalRules=/* @__PURE__ */ new Map,An(e.sheet.cssRules)}for(let t of e.baseRules)jn(e.sheet,t);for(let[t,n]of e.queryRules){let r=Nn(e.sheet,t);if(r)for(let e of n)Mn(r,e)}return e.sheet}function Pn(e,t){let n=q(),r=Y();if(t===void 0)n.baseRules.push(e);else{let r=n.queryRules.get(t);r||(r=[],n.queryRules.set(t,r)),r.push(e)}if(n.cssTextCache=null,r){if(t===void 0)jn(r,e);else{let n=Nn(r,t);n&&Mn(n,e)}}}function Fn(e){let t=2166136261,n=2128831035;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,16777619),n=Math.imul(n^i,2246822507)}return(t>>>0).toString(36)+((n>>>9)%1296).toString(36)}function X(e,t){return(e===void 0?`-`:`+`+e.length+`:`+e)+t.length+`:`+t}function In(e,t){return e+t.length+`:`+t}function Ln(e,t){let n=``,r=0;for(let i=0;i<e.length;i++){let a=e.charCodeAt(i);if(a===92&&i+1<e.length){n+=e[i]+e[++i];continue}if(r!==0){n+=e[i],a===r&&(r=0);continue}a===34||a===39?(r=a,n+=e[i]):n+=a===38?t:e[i]}return n}function Rn(e,t){let n=`.`+e;return n+Ln(t,n)}function zn(e){if(e.length===0||e===`-`)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n>=97&&n<=122||n>=65&&n<=90||n===45||n===95||t>0&&n>=48&&n<=57))return!1}if(e.charCodeAt(0)===45&&e.length>1){let t=e.charCodeAt(1);if(t>=48&&t<=57)return!1}return!0}function Bn(e,t,n,r,i=!1){let a=q(),o=X(e,t);for(let[e,t]of n)o=In(In(o,e),t);r!==void 0&&!zn(r)&&(console.warn(`[nuclo] css() name ${JSON.stringify(r)} is not a valid CSS class name (letters, digits, - and _ only, not starting with a digit); falling back to a generated name.`),r=void 0);let s=r===void 0?`a`+o:`n`+In(``,r)+o,c=a.atomCache.get(s);if(c!==void 0)return Y(),c;r===void 0?c=`n`+Fn(s):(c=i?r:r+`-`+Fn(s),a.atomMeta.has(c)&&console.warn(`[nuclo] css() name ${JSON.stringify(c)} is already used by a different style. Both rules are emitted under the same class, so they will override each other — rename one.`));let l=``;for(let[e,t]of n)l+=(l?`;`:``)+e+`:`+t;return a.atomCache.set(s,c),a.atomMeta.set(c,{query:e,suffix:t,decls:n,name:r}),Pn(Rn(c,t)+`{`+l+`}`,e),c}function Vn(e,t){let n=q(),r=n.atomMeta.get(e),i=n.atomMeta.get(t);if(!r||!i)return t;let a=[...r.decls,...i.decls],o=/* @__PURE__ */ new Map;for(let e=0;e<a.length;e++)o.set(a[e][0],e);let s=a.filter((e,t)=>o.get(e[0])===t);return Bn(r.query,r.suffix,s,r.name??i.name)}function Hn(e){let t=q().atomMeta.get(e);return t===void 0?void 0:X(t.query,t.suffix)}function Z(){return(Cn??Sn[xn])?.styleEpoch??0}function Un(e,t){let n=q();if(n.rawKeys.has(e)){Y();return}n.rawKeys.add(e),Pn(t,void 0)}function Wn(){let e=q();if(e.cssTextCache!==null)return e.cssTextCache;let t=e.baseRules.join(``);for(let[n,r]of e.queryRules)r.length>0&&(t+=n+`{`+r.join(``)+`}`);return e.cssTextCache=t,t}function Gn(){let e=q();e.atomCache.clear(),e.atomMeta.clear(),e.rawKeys.clear(),e.baseRules.length=0,e.queryRules.clear(),e.groupRules.clear(),e.cssTextCache=null,e.baseRuleCount=0,e.sheet=null,e.sheetDocument=null,e.externalRules=null,e.hasExternalGroups=!1,e.styleEpoch++,typeof document<`u`&&document.getElementById(`nuclo-styles`)?.remove()}function Kn(e){let t=0;for(;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)break}if(t===e.length)return e;let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);n+=t>=65&&t<=90?`-`+String.fromCharCode(t+32):e[r]}return n}const qn={hover:`:hover`,focus:`:focus`,focusVisible:`:focus-visible`,focusWithin:`:focus-within`,active:`:active`,visited:`:visited`,disabled:`:disabled`,enabled:`:enabled`,checked:`:checked`,required:`:required`,invalid:`:invalid`,valid:`:valid`,readOnly:`:read-only`,first:`:first-child`,last:`:last-child`,only:`:only-child`,odd:`:nth-child(odd)`,even:`:nth-child(even)`,empty:`:empty`,placeholderShown:`:placeholder-shown`,placeholder:`::placeholder`,before:`::before`,after:`::after`,selection:`::selection`,marker:`::marker`,firstLine:`::first-line`,firstLetter:`::first-letter`},Jn={bg:[`background`],p:[`padding`],px:[`padding-left`,`padding-right`],py:[`padding-top`,`padding-bottom`],pt:[`padding-top`],pr:[`padding-right`],pb:[`padding-bottom`],pl:[`padding-left`],m:[`margin`],mx:[`margin-left`,`margin-right`],my:[`margin-top`,`margin-bottom`],mt:[`margin-top`],mr:[`margin-right`],mb:[`margin-bottom`],ml:[`margin-left`],w:[`width`],h:[`height`],minW:[`min-width`],maxW:[`max-width`],minH:[`min-height`],maxH:[`max-height`],size:[`width`,`height`],text:[`font-size`],font:[`font-family`],weight:[`font-weight`],leading:[`line-height`],tracking:[`letter-spacing`],align:[`text-align`],items:[`align-items`],justify:[`justify-content`],z:[`z-index`],rounded:[`border-radius`],shadow:[`box-shadow`],select:[`user-select`]},Yn={row:{display:`flex`,"flex-direction":`row`},col:{display:`flex`,"flex-direction":`column`},center:{"align-items":`center`,"justify-content":`center`},truncate:{overflow:`hidden`,"text-overflow":`ellipsis`,"white-space":`nowrap`}},Xn={background:`colors`,"background-color":`colors`,color:`colors`,"border-color":`colors`,"border-top-color":`colors`,"border-right-color":`colors`,"border-bottom-color":`colors`,"border-left-color":`colors`,"outline-color":`colors`,"caret-color":`colors`,"text-decoration-color":`colors`,"font-family":`fonts`,"box-shadow":`shadows`,"border-radius":`radii`},Zn=/* @__PURE__ */ new Set([`z-index`,`opacity`,`font-weight`,`line-height`,`flex`,`flex-grow`,`flex-shrink`,`order`,`aspect-ratio`,`zoom`,`scale`,`column-count`,`orphans`,`widows`,`tab-size`,`animation-iteration-count`,`grid-column`,`grid-row`]),Qn=/* @__PURE__ */ new Map;function $n(e){if(!/[A-Z]/.test(e))return e;let t=Qn.get(e);return t===void 0&&(t=Kn(e),Qn.size>=512&&Qn.clear(),Qn.set(e,t)),t}function er(e){return e.charCodeAt(0)===64?e:`@media `+e}function tr(e,t){return e!==void 0&&e.startsWith(`@media`)&&t.startsWith(`@media`)?e+` and`+t.slice(6):t}function nr(e,t){for(let n in t){let r=t[n],i=e[n];e[n]=typeof r==`object`&&r&&!Array.isArray(r)&&typeof i==`object`&&i&&!Array.isArray(i)?nr({...i},r):r}return e}var rr=class{className;constructor(e){this.className=e}toString(){return this.className}};function Q(e){return new rr(e)}function ir(e,t){let n=Hn(t);if(n===void 0){e.set(t,t);return}let r=e.get(n);r===void 0||r===t?e.set(n,t):e.set(n,Vn(r,t))}function ar(e,t){let n=0;for(let r=0;r<=e.length;r++){let i=r===e.length?32:e.charCodeAt(r);(i===32||i===9||i===10||i===12||i===13)&&(r>n&&ir(t,e.slice(n,r)),n=r+1)}}function or(e,t){for(let n of e)n&&(typeof n==`string`?ar(n,t):Array.isArray(n)?or(n,t):ar(n.className,t))}function sr(e){let t=/* @__PURE__ */ new Map;or(e,t);let n=``;for(let e of t.values())n+=(n?` `:``)+e;return n}const cr=/* @__PURE__ */ new WeakMap;function lr(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function ur(...e){if(e.length===0)return Q(``);if(e.length===1){let t=e[0];if(!t)return Q(``);if(!Array.isArray(t)){let e=typeof t==`string`?t:t.className;if(!/[\t\n\f\r ]/.test(e))return Q(e)}}if(e.length===2&&lr(e[0])&&lr(e[1])){let t=e[0],n=e[1],r=Z(),i=cr.get(t),a=i?.get(n);if(a!==void 0&&a.epoch===r&&a.first===e[0].className&&a.second===e[1].className)return Y(),a.result;let o=Q(sr(e)),s=i??/* @__PURE__ */ new WeakMap;return s.set(n,{epoch:r,first:e[0].className,second:e[1].className,result:o}),i||cr.set(t,s),o}return Q(sr(e))}const dr=X(void 0,``);function fr(e={}){let t=e.screens??{};wn(Object.values(t).map(er));let n=/* @__PURE__ */ new WeakMap;function r(t,n){if(typeof n==`number`)return n===0||Zn.has(t)?String(n):n+`px`;let r=Xn[t];if(r!==void 0){let t=e[r]?.[n];if(t!==void 0)return t}return n}function i(e,t,n){let r=X(t,n),i=e.get(r);return i||(i={query:t,suffix:n,decls:[]},e.set(r,i)),i}function a(e,n,o,s){for(let c in e){let l=e[c];if(l==null||l===!1)continue;if(typeof l==`object`){if(c===`raw`){let e=l,t=i(s,n,o).decls;for(let n in e)t.push([n,r(n,e[n])]);continue}let e=qn[c];if(e!==void 0){a(l,n,o+e,s);continue}let u=t[c];if(u!==void 0){a(l,tr(n,er(u)),o,s);continue}let d=c.charCodeAt(0);if(d===38){a(l,n,Ln(c,`&`+o).slice(1),s);continue}if(d===64){a(l,tr(n,c),o,s);continue}continue}if(l===!0){let e=Yn[c];if(e){let t=i(s,n,o).decls;for(let n in e)t.push([n,e[n]])}continue}let u=Jn[c];if(u!==void 0){let e=i(s,n,o).decls;for(let t of u)e.push([t,r(t,l)])}else{let e=$n(c);i(s,n,o).decls.push([e,r(e,l)])}}}function o(e,t){let r=typeof e==`string`,i=r?t:e,o=r?e:void 0;if(i==null)return Q(``);let s=Z(),c=n.get(i);if(c!==void 0&&c.epoch===s&&c.name===o)return Y(),c.result;let l=/* @__PURE__ */ new Map;a(i,void 0,``,l);let u=[];for(let e of l.values()){if(e.decls.length===0)continue;let t=e.query===void 0&&e.suffix===``;u.push(Bn(e.query,e.suffix,e.decls,o,t))}let d=Q(u.join(` `));return n.set(i,{epoch:s,name:o,result:d}),d}function s(e){let t=/* @__PURE__ */ new Map;a(e,void 0,``,t);let n=``;for(let[e,r]of t.get(dr)?.decls??[])n+=(n?`;`:``)+e+`:`+r;return n}function c(e){let t=``;for(let n in e)t+=n+`{`+s(e[n])+`}`;let n=`nk`+Fn(t);return Un(n,`@keyframes `+n+`{`+t+`}`),n}function l(e,t){let n=e+`{`+s(t)+`}`;Un(`g|`+n,n)}function u(e){let t=e=>e===!0?`true`:e===!1?`false`:String(e),n=e.variants??{},r=Object.keys(n),i=e.defaultVariants??{},a=e.base??null,s=(e.compoundVariants??[]).map(e=>{let{css:n,...r}=e,i={};for(let e in r)i[e]=t(r[e]);return{conditions:i,style:n}}),c=/* @__PURE__ */ new Map,l=Z();return function(e){let u=Z();l!==u&&(c.clear(),l=u);let d={};for(let n of r){let r=(e?e[n]:void 0)??i[n];r!=null&&(d[n]=t(r))}let f=``;for(let e of r){let t=d[e];f+=e.length+`:`+e,f+=t===void 0?`-`:`+`+t.length+`:`+t}let p=c.get(f);if(p)return Y(),p;let m={};a&&(m=nr(m,a));for(let e of r){let t=d[e];if(t!==void 0){let r=n[e][t];r&&(m=nr(m,r))}}for(let e of s){let t=!0;for(let n in e.conditions)if(d[n]!==e.conditions[n]){t=!1;break}t&&(m=nr(m,e.style))}let h=o(m);return c.set(f,h),h}}return{css:o,cx:ur,variants:u,keyframes:c,globalStyle:l,theme:e}}let pr;function $(){return pr??=fr({})}const mr=(e,t)=>typeof e==`string`?$().css(e,t):$().css(e),hr=e=>$().variants(e),gr=e=>$().keyframes(e),_r=(e,t)=>$().globalStyle(e,t);function vr(e,t,n=0){let r=n,i=e,a=T();for(let n=0;n<t.length;n+=1){let o=t[n];if(o==null)continue;let s=Vt(e,o,r);if(s){if(s.parentNode!==i){if(a){let e=O(i);i.insertBefore(s,e),k(i,e)}else i.appendChild(s)}else a&&O(i)===s&&j(i);r+=1}}}function yr(e){Fe(e),l(e),kt(e),e.removeAttribute(`class`),e.removeAttribute(`style`)}function br(e,t,n){if(ke()){let n=Te();return Ee(n,e,t),n}let r=function(r,i=0){let a=r?ae(r,e):null;a&&T()&&yr(a);let o=a??(n?document.createElementNS(`http://www.w3.org/2000/svg`,e):document.createElement(e)),s=a?o.lastChild:null;return vr(o,t,i),a&&oe(o,s),o};return n||Ee(r,e,t),r}function xr(e){return(...t)=>br(e,t,!1)}function Sr(e){return(...t)=>br(e,t,!0)}const Cr=/* @__PURE__ */ `a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr`.split(`.`),wr=/* @__PURE__ */ `a.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.svg.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`);function Tr(e,t,n,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let i=r(n);return Object.defineProperty(e,t,{value:i,configurable:!0,enumerable:!0,writable:!0}),i},set(n){Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}})}function Er(e,t){t in e&&typeof e[t]!=`function`||(Tr(e,t,t,xr),t===`var`&&Tr(e,`var_`,t,xr))}function Dr(e,t){let n=`${t}Svg`;n in e||Tr(e,n,t,Sr)}function Or(e=globalThis){let t=`__nuclo_tags_registered`;if(!e[t]){for(let t=0;t<wr.length;t++)Dr(e,wr[t]);for(let t=0;t<Cr.length;t++)Er(e,Cr[t]);e[t]=!0}}function kr(){Or();let e=globalThis;e.list=fn,e.update=dn,e.when=rn,e.on=ze,e.scope=ln,e.render=gn,e.hydrate=_n,e.forceUpdate=vn,e.createCss=fr,e.css=mr,e.cx=ur,e.variants=hr,e.keyframes=gr,e.globalStyle=_r}kr(),exports.createCss=fr,exports.css=mr,exports.cx=ur,exports.forceUpdate=vn,exports.getCssText=Wn,exports.globalStyle=_r,exports.hydrate=_n,exports.keyframes=gr,exports.list=fn,exports.on=ze,exports.render=gn,exports.resetStyles=Gn,exports.scope=ln,exports.update=dn,exports.variants=hr,exports.when=rn;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e,t){typeof console<`u`&&console.error(`nuclo: ${e}`,t)}const t=typeof window<`u`&&typeof document<`u`,n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new WeakMap,i=/* @__PURE__ */ new Set,a=/* @__PURE__ */ new WeakMap;function o(e,t,i){let a=r.get(e);if(a){a.resolver=t,a.lastValue=i;return}let o=new WeakRef(e);n.add(o),r.set(e,{ref:o,resolver:t,lastValue:i})}function s(e){let t=a.get(e);if(!t){let n=new WeakRef(e);t={ref:n,attributeResolvers:[]},i.add(n),a.set(e,t)}return t}function c(e){let t=r.get(e);t&&(n.delete(t.ref),r.delete(e))}function l(e){let t=a.get(e);t&&(i.delete(t.ref),a.delete(e))}function u(e){if(e.nodeType===Node.ELEMENT_NODE){let t=e;Fe(t),l(t)}else e.nodeType===Node.TEXT_NODE&&c(e);let t=ye()?Array.from(e.childNodes):e.childNodes;for(let e=0;e<t.length;e++)u(t[e]);e.nodeType===Node.ELEMENT_NODE&&ve(e)}function d(e){let t=Array.from(e.childNodes);for(let e=0;e<t.length;e++)d(t[e]);e.nodeType===Node.ELEMENT_NODE&&ve(e)}function f(t){if(!t?.parentNode)return!1;try{return u(t),t.parentNode?.removeChild(t),!0}catch(t){return e(`Failed to remove child node`,t),!1}}function p(t,n,r){try{return t.insertBefore(n,r),!0}catch(t){return e(`Failed to insert node before reference`,t),!1}}function m(e,t){return{start:document.createComment(`${e}-start-${t}`),end:document.createComment(`${e}-end`)}}function h(e,t){let n=e.nextSibling;for(;n&&n!==t;){let e=n.nextSibling;f(n),n=e}}function g(e,t){let n=t.parentNode;if(n)for(let r=0;r<e.length;r++)p(n,e[r],t)}function ee(e,t,n){let r=e,i=Object.getOwnPropertyDescriptor(r,`appendChild`),a=r.insertBefore;r.appendChild=function(e){return a.call(r,e,t)};try{return n()}finally{i?Object.defineProperty(r,"appendChild",i):Reflect.deleteProperty(r,`appendChild`)}}const _=Symbol.for(`nuclo.serializing.v1`),v=globalThis,y=v[_]??(v[_]={on:!1});function b(){return y.on}let x=!1,S=!1,C=/* @__PURE__ */ new WeakMap;function w(){return x}function T(){return x&&S}function E(e=!1){x=!0,S=e,C=/* @__PURE__ */ new WeakMap}function te(){x=!1,S=!1}function D(e){let t=x;x=!1;try{return e()}finally{x=t}}function O(e){let t=C.get(e);return t===void 0?e.firstChild:t}function k(e,t){C.set(e,t)}function A(e){return e.nodeType===3&&!/\S/.test(e.textContent||``)}function ne(e){let t=O(e),n=!1;for(;t&&A(t);)t=t.nextSibling,n=!0;n&&k(e,t)}function j(e){let t=O(e);return t&&k(e,t.nextSibling),t}function re(e){let t=O(e);if(!t||t.nodeType!==3)return null;if(A(t)){let e=t.nextSibling;for(;e&&A(e);)e=e.nextSibling;if(e&&e.nodeType===8&&(e.textContent??``).trimStart().startsWith(`text-`))return null}return j(e),t}function ie(e,t){ne(e);let n=O(e),r=t+`-start-`;if(!n||n.nodeType!==8||!n.textContent?.startsWith(r))return null;j(e);let i=t+`-end`,a=0;for(let e=n.nextSibling;e;e=e.nextSibling){if(e.nodeType!==8)continue;let t=e.textContent;if(t===i){if(a===0)return{start:n,end:e,recreated:!1};a--}else t?.startsWith(r)&&a++}let o=document.createComment(i);return e.insertBefore(o,n.nextSibling),{start:n,end:o,recreated:!0}}function ae(e,t){if(!x)return null;ne(e);let n=O(e);return n&&n.nodeType===1&&n.tagName.toLowerCase()===t?j(e):null}function oe(e,t){if(!t)return;let n=O(e);for(;n;){let e=n===t?null:n.nextSibling;f(n),n=e}k(e,null)}const M=/* @__PURE__ */ new WeakMap;let se=0,ce=[];function le(){return!t||b()}function ue(e){let t=M.get(e);return t||(t={mount:null,destroy:null,state:0},M.set(e,t),se++,ce.push(new WeakRef(e))),t}function de(e,t){return e===null?t:Array.isArray(e)?(e.push(t),e):[e,t]}function fe(e,t){if(le())return;let n=ue(e);n.state!==2&&(n.state!==0&&T()||(n.mount=de(n.mount,t)))}function pe(e,t){if(le())return;let n=ue(e);n.state!==2&&(n.state!==0&&T()||(n.destroy=de(n.destroy,t)))}function me(t,n,r){if(r.state===1)try{let e=n(t);typeof e==`function`&&(M.get(t)?.state===2?he(t,e):r.destroy=de(r.destroy,e))}catch(t){e(`Error in mount callback`,t)}}function he(t,n){try{n(t)}catch(t){e(`Error in destroy callback`,t)}}function ge(e){let t=M.get(e);if(t.state!==0)return;t.state=1;let n=t.mount;if(t.mount=null,n!==null){if(Array.isArray(n))for(let r=0;r<n.length;r++)me(e,n[r],t);else me(e,n,t)}}function _e(){if(ce.length===0)return;let e=ce;ce=[];for(let t=0;t<e.length;t++){let n=e[t].deref();n&&ge(n)}}function ve(e){let t=M.get(e);if(!t||t.state===2)return;let n=t.state===1;if(t.state=2,se--,n){let n=t.destroy;if(n!==null){if(Array.isArray(n))for(let t=0;t<n.length;t++)he(e,n[t]);else he(e,n)}}t.mount=null,t.destroy=null}function ye(){return se>0}const be=Symbol(`nuclo.factory.tag`),xe=Symbol(`nuclo.factory.mods`),Se=Symbol(`nuclo.event.modifier`);let Ce=0;const we=[];let N=0;function Te(){return N>=we.length&&we.push(()=>null),we[N++]}function Ee(e,t,n){e[be]=t,e[xe]=n}function P(e){return typeof e==`function`?e[xe]:void 0}function F(e){return typeof e==`function`?e[be]:void 0}function De(e){return e[Se]=!0,e}function Oe(e){return typeof e==`function`&&e[Se]===!0}function ke(){return Ce>0}function Ae(e,t,n){Ce++;try{return e(t,n)}finally{Ce--}}function je(){return N}function Me(e){for(;N>e;){let e=we[--N];e[be]=void 0,e[xe]=void 0}}const I=/* @__PURE__ */ new WeakMap;function Ne(e,t){let n=I.get(e);n?Array.isArray(n)?n.includes(t)||n.push(t):n!==t&&I.set(e,[n,t]):I.set(e,t)}function Pe(e,t){e.removeEventListener(t.type,t.wrapped,t.capture)}function Fe(e){let t=I.get(e);if(t){if(Array.isArray(t))for(let n=0;n<t.length;n++)Pe(e,t[n]);else Pe(e,t);I.delete(e)}}function Ie(e){}function Le(e,n){return t?function(t){if(!t)return;let r=t;e===`mount`?fe(r,n):pe(r,n)}:Ie}function Re(t,n,r){return{type:t,wrapped:function(r){let i=this;try{n.call(i,r)}catch(n){e(`Error in '${t}' listener`,n)}},capture:r}}function ze(e,n,r){if(e===`mount`||e===`destroy`)return Le(e,n);if(!t)return Ie;let i=Re(e,n,r===!0||typeof r==`object`&&!!r&&r.capture===!0);return De(function(t){if(!t||typeof t.addEventListener!=`function`)return;let n=t;n.addEventListener(e,i.wrapped,r),Ne(n,i)})}const Be=/* @__PURE__ */ new Set([`onMount`,`onDestroy`]),Ve=/* @__PURE__ */ new WeakMap;function He(e){if(e.length<=2||e.charCodeAt(0)!==111||e.charCodeAt(1)!==110)return null;let t=e.charCodeAt(2);return t<65||t>90||Be.has(e)?null:e===`onDoubleClick`?`ondblclick`:e.toLowerCase()}function Ue(e,t,n){if(t in e){e[t]=n;return}let r=t.slice(2),i=Ve.get(e);if(i){for(let t=0;t<i.length;t+=2){if(i[t]!==r)continue;let a=i[t+1];if(a===n)return;e.removeEventListener(r,a),e.addEventListener(r,n),i[t+1]=n;return}e.addEventListener(r,n),i.push(r,n);return}e.addEventListener(r,n),Ve.set(e,[r,n])}function We(e){return e===null||typeof e!=`object`&&typeof e!=`function`}function Ge(e){return e instanceof Node?!0:typeof e!=`object`||!e?!1:typeof e.nodeType==`number`}function Ke(e){return typeof e==`object`&&!!e}function L(e){return typeof e==`function`}function qe(e){return L(e)&&e.length===0}function R(e){return e==null||typeof e==`object`||typeof e==`function`?``:String(e)}function Je(e,n){let r=R(n),i=document.createTextNode(r);return t&&!b()&&o(i,e,r),i}function Ye(t){for(let i of n){let a=i.deref(),o=a&&r.get(a);if(!o||!a.isConnected){a&&r.delete(a),n.delete(i);continue}if(t&&!t.contains(a))continue;let s;try{s=R(o.resolver())}catch(t){e(`Failed to update reactive text node`,t),s=``}s!==o.lastValue&&(a.textContent=s,o.lastValue=s)}}function Xe(e,t){let n=[],r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i==null){n.push({kind:4});continue}let a=typeof i;if(a===`function`){let e=P(i);if(e!==void 0){let t=F(i);if(!t)return null;let r=Xe(t,e);if(!r)return null;n.push({kind:3,child:r});continue}if(i.length===0){let e;try{e=i()}catch{return null}if(e==null||typeof e!=`object`&&typeof e!=`function`){n.push({kind:2});continue}return null}if(Oe(i)){n.push({kind:5});continue}return null}if(a===`object`){if(Ge(i))return null;let e=i,t=Object.keys(e),a=[];for(let n=0;n<t.length;n++){let i=t[n],o=e[i];if(o==null){a.push({key:i,kind:3,prop:!1});continue}if(i===`style`)return null;let s=typeof o;if(s===`function`){let e=He(i);if(e){a.push({key:i,kind:1,prop:!1,value:e});continue}if(i===`className`&&o.length===0){if(r++)return null;a.push({key:i,kind:2,prop:!1});continue}return null}if(s===`object`||i===`className`&&r++)return null;a.push({key:i,kind:0,prop:!1,value:o})}n.push({kind:0,keys:a});continue}n.push({kind:1})}return{tag:e,slots:n}}function Ze(e,t){let n=e.slots,r=t.firstChild;for(let e=0;e<n.length;e++){let i=n[e];switch(i.kind){case 0:{let e=i.keys;for(let n=0;n<e.length;n++){let r=e[n];r.kind===0?r.prop=r.key in t:r.kind===2&&t.removeAttribute(`class`)}break}case 1:case 2:r&&=r.nextSibling;break;case 3:if(!r)return;Ze(i.child,r),r=r.nextSibling}}}function Qe(e,t,n,r){let i=e.slots;if(t.length!==i.length)return!1;let a=n.firstChild;for(let e=0;e<i.length;e++){let o=i[e],s=t[e];switch(o.kind){case 0:{if(typeof s!=`object`||!s)return!1;let e=s,t=o.keys,i=0;for(let t in e)i++;if(i!==t.length)return!1;for(let i=0;i<t.length;i++){let a=t[i],o=e[a.key];switch(a.kind){case 0:if(o==null||typeof o==`object`||typeof o==`function`)return!1;if(o===a.value)break;if(a.prop){let e=n;e[a.key]!==o&&(e[a.key]=o)}else{let e=String(o);n.getAttribute(a.key)!==e&&n.setAttribute(a.key,e)}break;case 1:{if(typeof o!=`function`)return!1;let e=a.value;e===`onclick`?n.onclick=o:Ue(n,e,o);break}case 2:{if(typeof o!=`function`||o.length!==0)return!1;let e=o,t;try{t=e()}catch{return!1}let i=t?String(t):``;i&&(n.className=i),r.push(1,n,e,i);break}case 3:if(o!=null)return!1}}break}case 1:if(s==null||typeof s==`object`||typeof s==`function`||!a)return!1;a.nodeValue=String(s),a=a.nextSibling;break;case 2:{if(typeof s!=`function`||s.length!==0||P(s)!==void 0||!a)return!1;let e;try{e=s()}catch{return!1}if(e!=null&&(typeof e==`object`||typeof e==`function`))return!1;let t=R(e),n=a;n.nodeValue=t,r.push(0,n,s,t),a=n.nextSibling;break}case 3:{let e=P(s);if(e===void 0||F(s)!==o.child.tag||!a||!Qe(o.child,e,a,r))return!1;a=a.nextSibling;break}case 4:if(s!=null)return!1;break;case 5:if(!Oe(s))return!1;s(n,0)}}return!0}function $e(e,t,n,r){let i=e.slots;if(t.length!==i.length)return!1;let a=n.firstChild;for(let e=0;e<i.length;e++){let o=i[e],s=t[e];switch(o.kind){case 0:{if(typeof s!=`object`||!s)return!1;let e=s,t=o.keys,i=0;for(let a in e){if(i>=t.length)return!1;let o=t[i];if(o.key!==a)return!1;i++;let s=e[a];if(o.kind===2){if(typeof s!=`function`||s.length!==0)return!1;l(n),r.push(1,n,s,n.className)}}if(i!==t.length)return!1;break}case 1:if(!a)return!1;a=a.nextSibling;break;case 2:{if(typeof s!=`function`||s.length!==0||!a||a.nodeType!==3)return!1;let e=a;c(e),r.push(0,e,s,e.nodeValue??``),a=e.nextSibling;break}case 3:{let e=P(s);if(e===void 0||F(s)!==o.child.tag||!a||!$e(o.child,e,a,r))return!1;a=a.nextSibling;break}case 4:if(s!=null)return!1;break;case 5:if(!Oe(s))return!1}}return!0}function et(e){for(let t=0;t<e.length;t+=4){let n;try{n=e[t+2]()}catch{continue}if(e[t]===0){let r=R(n);r!==e[t+3]&&(e[t+1].nodeValue=r,e[t+3]=r)}else{let r=n?String(n):``;r!==e[t+3]&&(e[t+1].className=r,e[t+3]=r)}}}function tt(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const nt=/* @__PURE__ */ new Set,rt=/* @__PURE__ */ new WeakMap,it=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{nt.delete(e)}):null;let z=0;function at(e,t){let n=rt.get(e);if(rt.set(e,t),n)return;let r=new WeakRef(e);nt.add(r),it?.register(e,r)}function ot(e){return Array.isArray(e)?e:Array.from(e)}function B(e,t,n){let r=typeof e==`function`?e(t,n):e;return typeof r==`object`&&r&&`tagName`in r?r:null}function st(e,t,n){return B(e.renderItem(t,n),e.host,n)}const V=[];function ct(e){return V.length>e?V.slice(e):null}function lt(e,t,n){let r=je();try{return ut(e,t,n)}finally{Me(r)}}function ut(e,n,r){e.lastRenderLeaves=null;let i=e.template,a=t&&!w()&&!b(),o=i&&a?Ae(e.renderItem,n,r):e.renderItem(n,r);if(i!==null&&a){let t=P(o);if(t!==void 0){if(i===void 0){let n=F(o),i=n?Xe(n,t):null,a=B(o,e.host,r);if(i&&a){let n=a.cloneNode(!0);Ze(i,n);let r=V.length,o=!1;try{o=$e(i,t,a,V),o&&(e.lastRenderLeaves=ct(r))}finally{V.length=r}if(!o)return e.template=null,e.lastRenderLeaves=null,a;e.template={tmpl:i,skeleton:n}}else e.template=null;return a}let a=i.skeleton.cloneNode(!0),s=V.length;try{if(F(o)===i.tmpl.tag&&Qe(i.tmpl,t,a,V))return e.lastRenderLeaves=ct(s),a}finally{V.length=s}return e.template=null,st(e,n,r)}if(i===void 0)e.template=null;else return e.template=null,st(e,n,r)}return B(o,e.host,r)}function dt(e,n,r,i){if(r.parentNode!==n||i.parentNode!==n)return!1;if(ye())for(let t=0;t<e.length;t++){let n=e[t].element;n&&d(n)}if(t&&n.firstChild===r&&n.lastChild===i)return n.textContent=``,n.appendChild(r),n.appendChild(i),!0;for(let t=0;t<e.length;t++){let r=e[t].element;r&&r.parentNode===n&&n.removeChild(r)}return!0}function ft(e){let t=e.length;if(t===0)return[];let n=Array(t),r=[];for(let i=0;i<t;i++){let t=e[i],a=0,o=r.length;for(;a<o;){let n=a+o>>1;e[r[n]]<t?a=n+1:o=n}n[i]=a>0?r[a-1]:-1,a===r.length?r.push(i):r[a]=i}let i=r.length,a=r[i-1],o=Array(i);for(;i>0;)o[--i]=a,a=n[a];return o}function pt(e,t,n,r,i,a,o){let s=document.createDocumentFragment();for(let t=r;t<i;t++){let r=n[t],i=lt(e,r,t);if(!i)continue;let a=e.lastRenderLeaves;o.push({item:r,element:i,dyn:a,dynCreatedAt:a?e.currentFlushEpoch:void 0}),e.lastRenderLeaves=null,s.appendChild(i)}s.firstChild&&t.insertBefore(s,a)}function mt(e){let{startMarker:t,endMarker:n}=e,r=t.parentNode??e.host,i=ot(e.itemsProvider());if(tt(e.lastSyncedItems,i))return;let a=e.records,o=a.length,s=i.length;if(s===0){if(o>0&&!dt(a,r,t,n))for(let e=0;e<o;e++)f(a[e].element);e.records=[],e.lastSyncedItems=[],e.allRecordsCreatedAt=void 0;return}let c=0,l=Math.min(o,s);for(;c<l&&a[c].item===i[c];)c++;let u=0,d=l-c;for(;u<d&&a[o-1-u].item===i[s-1-u];)u++;let p=c,m=o-u,h=c,g=s-u;if(p===m){let t=m<o?a[m].element:n;if(m===o)pt(e,r,i,h,g,t,a),e.allRecordsCreatedAt=o===0?e.currentFlushEpoch:void 0;else{let n=[];pt(e,r,i,h,g,t,n),e.records=a.slice(0,p).concat(n,a.slice(p)),e.allRecordsCreatedAt=void 0}e.lastSyncedItems=i.slice();return}if(h===g){for(let e=p;e<m;e++)f(a[e].element);a.splice(p,m-p),e.allRecordsCreatedAt=void 0,e.lastSyncedItems=i.slice();return}let ee=m-p,_=g-h,v=Array(_).fill(-1),y=new Uint8Array(ee),b=0,x=Math.min(m,g);for(let e=c;e<x;e++)a[e].item===i[e]&&(v[e-h]=e,y[e-p]=1,b++);let S=b,C=/* @__PURE__ */ new Map;for(let e=m-1;e>=p;e--){if(y[e-p])continue;let t=a[e].item,n=C.get(t);n===void 0?C.set(t,e):typeof n==`number`?C.set(t,[n,e]):n.push(e)}for(let e=0;e<_;e++){if(v[e]!==-1)continue;let t=C.get(i[h+e]);if(t===void 0)continue;let n;typeof t==`number`?(n=t,C.delete(i[h+e])):(n=t.pop(),t.length===0&&C.delete(i[h+e])),v[e]=n,y[n-p]=1,b++}if(b===0&&p===0&&m===o){if(!dt(a,r,t,n))for(let e=0;e<o;e++)f(a[e].element);let c=[];pt(e,r,i,0,s,n,c),e.records=c,e.allRecordsCreatedAt=e.currentFlushEpoch,e.lastSyncedItems=i.slice();return}for(let e=p;e<m;e++)y[e-p]||f(a[e].element);let w=null,T=b-S<=8&&S>=32;if(b>0&&!T){let e=[],t=[];for(let n=0;n<_;n++)v[n]!==-1&&(e.push(v[n]),t.push(n));w=new Uint8Array(_);let n=ft(e);for(let e=0;e<n.length;e++)w[t[n[e]]]=1}let E=Array(_),te=0,D=m<o?a[m].element:n,O=null;for(let t=_-1;t>=0;t--){let n=v[t];if(n===-1){let n=i[h+t],r=lt(e,n,h+t);if(!r){E[t]=null,te++;continue}let a=e.lastRenderLeaves;E[t]={item:n,element:r,dyn:a,dynCreatedAt:a?e.currentFlushEpoch:void 0},e.lastRenderLeaves=null,O??=document.createDocumentFragment(),O.insertBefore(r,O.firstChild);continue}let o=a[n];E[t]=o;let s=o.element;if(O&&O.firstChild){let e=O.firstChild;r.insertBefore(O,D),D=e,O=null}(w?!w[t]:!(T&&n===h+t))&&r.insertBefore(s,D),D=s}O&&O.firstChild&&r.insertBefore(O,D);let k=Array(p+(_-te)+(o-m)),A=0;for(let e=0;e<p;e++)k[A++]=a[e];for(let e=0;e<_;e++){let t=E[e];t&&(k[A++]=t)}for(let e=m;e<o;e++)k[A++]=a[e];e.records=k,e.allRecordsCreatedAt=void 0,e.lastSyncedItems=i.slice()}function ht(e,t,n,r,i,a,o){return{itemsProvider:e,renderItem:t,startMarker:n,endMarker:r,records:i,host:a,lastSyncedItems:o,template:void 0,lastRenderLeaves:null,currentFlushEpoch:void 0,allRecordsCreatedAt:void 0}}function gt(e,t,n,r){return w()?vt(e,t,n,r):_t(e,t,n,r)}function _t(e,n,r,i){let{start:a,end:o}=m(`list`,i),s=ht(e,n,a,o,[],r,[]),c=r;return c.appendChild(a),c.appendChild(o),mt(s),t&&!b()&&at(a,s),s}function vt(e,n,r,i){let a=r,o=ie(a,`list`);if(!o)return _t(e,n,r,i);let{start:s,end:c}=o,l=ot(e()),u=[];for(let e=0;e<l.length;e++){let t=B(n(l[e],e),r,e);t&&u.push({item:l[e],element:t,dyn:null,dynCreatedAt:void 0})}let d=O(a);for(;d&&d!==c;){let e=d.nextSibling;f(d),d=e}let p=c;for(let e=u.length-1;e>=0;e--){let t=u[e].element;(t.parentNode!==a||t.nextSibling!==p)&&a.insertBefore(t,p),p=t}k(a,c.nextSibling);let m=ht(e,n,s,c,u,r,l.slice());return t&&!b()&&at(s,m),m}function yt(e){let t=[];z++;for(let n of nt){let r=n.deref();if(!r){t.push(n);continue}let i=rt.get(r);if(!i){t.push(n);continue}if(!r.isConnected||!i.endMarker.isConnected){rt.delete(r),t.push(n);continue}if(e&&!e.contains(r))continue;i.currentFlushEpoch=z;try{mt(i)}finally{i.currentFlushEpoch=void 0}if(i.allRecordsCreatedAt===z)continue;let a=i.records;for(let e=0;e<a.length;e++){if(a[e].dynCreatedAt===z)continue;let t=a[e].dyn;t&&et(t)}}for(let e of t)nt.delete(e)}const bt={};function xt(t,n){let r;try{r=n.resolver()}catch(t){e(`Failed to resolve reactive attribute: ${n.key}`,t);return}let i=typeof r!=`object`||!r;if(!(i&&Object.is(r,n.lastValue)))try{n.apply(t,n.key,r),n.lastValue=i?r:bt}catch(t){e(`Failed to apply reactive attribute: ${n.key}`,t)}}function St(e,n,r,i){let a=e,o={key:n,resolver:r,apply:i,lastValue:bt};if(t&&!b()){let e=s(a).attributeResolvers,t=0;for(;t<e.length&&e[t].key!==n;)t++;e[t]=o}xt(a,o)}function Ct(e){for(let t of i){let n=t.deref(),r=n&&a.get(n);if(!r||!n.isConnected){n&&a.delete(n),i.delete(t);continue}if(e&&!e.contains(n))continue;let o=r.attributeResolvers;for(let e=0;e<o.length;e++)xt(n,o[e])}}function wt(t,n){let r=t.style;if(r&&n)for(let t in n){let i=n[t];try{r[t]=i==null?``:String(i)}catch{e(`Failed to set style property '${t}'`)}}}function Tt(e,t,n){wt(e,n)}function Et(e,t){L(t)?St(e,`style`,t,Tt):wt(e,t)}const H=/* @__PURE__ */ new WeakMap,Dt=/* @__PURE__ */ new WeakSet;function Ot(e){return e instanceof HTMLElement?e.className:e.getAttribute(`class`)||``}function U(e,t){e instanceof HTMLElement?e.className=t:e.setAttribute(`class`,t)}function kt(e,t){let n=t.length,r=0;for(let i=0;i<=n;i++)(i===n||t.charCodeAt(i)===32)&&(i>r&&e.add(t.substring(r,i)),r=i+1)}function At(e){let t=``;for(let n of e)t&&(t+=` `),t+=n;return t}function jt(e){let t=Ot(e);if(t&&!H.has(e)){let n=/* @__PURE__ */ new Set;kt(n,t),H.set(e,n)}Dt.add(e)}function Mt(e){H.delete(e),Dt.delete(e)}function Nt(e){return Dt.has(e)}function Pt(e,t){if(!t)return;let n=H.get(e);n||(n=/* @__PURE__ */ new Set,H.set(e,n)),kt(n,t)}function Ft(e,t){let n=H.get(e);if(!n||n.size===0){let n=t||``;Ot(e)!==n&&U(e,n);return}if(!t){U(e,At(n));return}let r=At(n),i=t.length,a=0;for(let e=0;e<=i;e++)if(e===i||t.charCodeAt(e)===32){if(e>a){let i=t.substring(a,e);n.has(i)||(r+=` `+i)}a=e+1}U(e,r)}function It(e,t){if(!t)return;let n=Ot(e);if(n&&n!==t){let r=/* @__PURE__ */ new Set;kt(r,n),kt(r,t),U(e,At(r))}else U(e,t)}function Lt(e,t,n,r){if(n!=null){if(r&&t===`className`){It(e,String(n));return}if(e instanceof Element&&e.namespaceURI===`http://www.w3.org/2000/svg`)e.setAttribute(t===`className`?`class`:t,String(n));else if(t in e)try{e[t]=n}catch{e instanceof Element&&e.setAttribute(t,String(n))}else e instanceof Element&&e.setAttribute(t,String(n))}}function Rt(e,t,n){Ft(e,String(n||``))}function zt(e,t,n,r=!1){if(n==null)return;let i=t;if(i===`style`){Et(e,n);return}if(L(n)){if(i===`onMount`){fe(e,n);return}if(i===`onDestroy`){pe(e,n);return}if(i===`onClick`){e.onclick=n;return}if(i.charCodeAt(0)===111&&i.charCodeAt(1)===110){let t=He(i);if(t){Ue(e,t,n);return}if(i in e){e[i]=n;return}}if(n.length===0){let t=n;i===`className`?(jt(e),St(e,i,t,Rt)):St(e,i,t,Lt);return}}let a=e;if(i===`className`&&Nt(a)){let e=String(n||``);e&&(Pt(a,e),It(a,e));return}Lt(a,i,n,r)}function Bt(e,t,n=!0){for(let r in t){let i=r,a=t[r];zt(e,i,a,n&&i===`className`)}}function Vt(e){return Ke(e)&&!Ge(e)&&`className`in e&&typeof e.className==`string`&&Object.keys(e).length===1}function Ht(e){ne(e);let t=O(e);return!!t&&t.nodeType===8&&t.textContent?.trimStart().startsWith(`text-`)===!0}function Ut(e,t){let n=O(e);if(n&&n.nodeType===3)return j(e),n.textContent!==t&&(n.textContent=t),n;let r=document.createTextNode(t);return e.insertBefore(r,n),k(e,n),r}function W(t,n,r){if(n==null)return null;if(L(n)){if(qe(n))try{let e=n();if(Vt(e))return Bt(t,{className:()=>{let e=n();return Vt(e)?e.className:``}}),null;if(We(e)){if(w()){let r=t,i=R(e);if(T()){let e=re(r);if(e)return e.textContent!==i&&(e.textContent=i),o(e,n,i),null}if(Ht(r))return j(r),o(Ut(r,i),n,i),null}return Wt(r,Je(n,e))}return null}catch(t){return e(`Error evaluating reactive text function:`,t),Wt(r,Je(Gt,``))}let i=n(t,r);return i==null?null:We(i)?Wt(r,document.createTextNode(String(i))):Ge(i)?i:(Ke(i)&&Bt(t,i),null)}let i=n;if(We(i)){if(w()){let e=t,n=String(i);if(T()){let t=re(e);if(t)return t.textContent!==n&&(t.textContent=n),null}if(Ht(e))return j(e),Ut(e,n),null}return Wt(r,document.createTextNode(String(i)))}return Ge(i)?i:(Bt(t,i),null)}function Wt(e,n){if(t&&!w()&&!b())return n;let r=document.createDocumentFragment();return r.appendChild(document.createComment(` text-${e} `)),r.appendChild(n),r}function Gt(){return``}const Kt=/* @__PURE__ */ new Set,G=/* @__PURE__ */ new WeakMap,qt=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{Kt.delete(e)}):null;function Jt(e,t){for(let t=0;t<e.length;t++){let n=e[t].condition;if(typeof n==`function`?n():n)return t}return t.length>0?-1:null}function Yt(e){let{groups:t,elseContent:n,host:r,index:i,endMarker:a}=e,o=Jt(t,n);o===e.activeIndex||(h(e.startMarker,e.endMarker),e.activeIndex=o,o===null)||g(en(o>=0?t[o].content:n,r,i,a),a)}function Xt(e){let t=G.get(e.startMarker);if(G.set(e.startMarker,e),t)return;let n=new WeakRef(e.startMarker);Kt.add(n),qt?.register(e.startMarker,n)}function Zt(e){return G.get(e)}function Qt(t){let n=[];for(let r of Kt){let i=r.deref();if(i===void 0){n.push(r);continue}let a=G.get(i);if(!a){n.push(r);continue}if(!i.isConnected||!a.endMarker.isConnected){G.delete(i),n.push(r);continue}if(!t||t.contains(i))try{Yt(a)}catch(t){e(`when() branch threw during update; unregistering this conditional`,t),G.delete(i),n.push(r)}}for(let e of n)Kt.delete(e)}function $t(e,t,n,r){return!L(e)||qe(e)?W(t,e,n):ee(t,r,()=>{let r=W(t,e,n);return r&&!r.parentNode?r:null})}function en(e,t,n,r){let i=[];for(let a of e){let e=$t(a,t,n,r);e&&i.push(e)}return i}function tn(e,t){return`when-start-${e}-b${t===null?`n`:t}`}function nn(e){let t=/-b(n|-?\d+)$/.exec(e||``);if(t)return t[1]===`n`?null:parseInt(t[1],10)}var rn=class e{groups;elseContent;constructor(e,t){this.groups=e,this.elseContent=t}cloneWith(t,n){return new e(t?[...this.groups,t]:this.groups,n??this.elseContent)}render(e,t){return w()?this.hydrateRender(e,t):this.freshRender(e,t)}freshRender(e,t){let{start:n,end:r}=m(`when`,t),i=this.createRuntimeFromMarkers(e,t,n,r),a=e;return a.appendChild(n),a.appendChild(r),Yt(i),n.textContent=tn(t,i.activeIndex),n}hydrateRender(e,t){let n=e,r=ie(n,`when`);if(!r)return this.freshRender(e,t);let{start:i,end:a}=r,o=Jt(this.groups,this.elseContent),s=Zt(i),c=s?s.activeIndex:nn(i.textContent);if(!r.recreated&&(c===void 0||c===o)){if(o!==null){let n=o>=0?this.groups[o].content:this.elseContent;for(let r of n)W(e,r,t)}}else if(h(i,a),o!==null){let n=o>=0?this.groups[o].content:this.elseContent,r=a;D(()=>{g(en(n,e,t,r),r)})}return k(n,a.nextSibling),this.createRuntimeFromMarkers(e,t,i,a,o),i}createRuntimeFromMarkers(e,n,r,i,a=null){let o={startMarker:r,endMarker:i,host:e,index:n,groups:this.groups,elseContent:this.elseContent,activeIndex:a};return t&&!b()&&Xt(o),o}};function an(e){return Object.assign(function(t,n){return e.render(t,n)},{when:function(t,...n){return an(e.cloneWith({condition:t,content:n}))},else:function(...t){return an(e.cloneWith(void 0,t))}})}function on(e,...t){return an(new rn([{condition:e,content:t}],[]))}const K=/* @__PURE__ */ new Map;function sn(e){let t=[],n=/* @__PURE__ */ new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();e&&(n.has(e)||(n.add(e),t.push(e)))}return t}function cn(e,t){let n=K.get(e);n||(n=/* @__PURE__ */ new Set,K.set(e,n));for(let e of n)if(e.deref()===t)return;n.add(new WeakRef(t))}function ln(e){let t=sn(e);if(t.length===0)return[];let n=/* @__PURE__ */ new Set;for(let e of t){let t=K.get(e);if(!t)continue;let r=[];for(let e of t){let t=e.deref();if(t===void 0){r.push(e);continue}if(!t.isConnected){r.push(e);continue}n.add(t)}for(let e of r)t.delete(e);t.size===0&&K.delete(e)}return Array.from(n)}function un(...e){let n=sn(e);return function(e){if(t&&!b()&&e instanceof Element)for(let t of n)cn(t,e)}}const dn=[yt,Qt,Ct,Ye];function fn(...e){let t;if(e.length>0){let n=ln(e);if(n.length===1){let e=n[0];t={contains:t=>e.contains(t)}}else t={contains:e=>{for(let t of n)if(t.contains(e))return!0;return!1}}}for(let e of dn)e(t);_e()}function pn(e,t){return function(n,r){return gt(e,t,n,r).startMarker}}const q=[],mn=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{let t=q.indexOf(e);t!==-1&&q.splice(t,1)}):null;function hn(e){if(qe(e)){let t=e();if(L(t))return{build:t,component:e}}return{build:e,component:null}}function gn(e,n){if(!n||!t||!e||e.nodeType!==1)return;let r={root:new WeakRef(e),component:n};q.push(r),mn?.register(e,r,r)}function _n(e,t,n=0){let{build:r,component:i}=hn(e),a=t||document.body,o=r(a,n);return a.appendChild(o),_e(),gn(o,i),o}function vn(e,t){let{build:n,component:r}=hn(e),i=bn(n,t,!1,null);return gn(i,r),i}function yn(t,n){if(t!==void 0)return bn(hn(t).build,n,!0,null);let r=0;for(let t=0;t<q.length;t++){let n=q[t],i=n.root.deref(),a=i?.parentNode;if(!i||!i.isConnected||!a||a.nodeType!==1){mn?.unregister(n);continue}try{let e=bn(n.component(),a,!0,i);e!==i&&(n.root=new WeakRef(e),mn?.unregister(n),mn?.register(e,n,n))}catch(t){e(`forceUpdate(): component threw; keeping this root's previous DOM`,t)}q[r++]=n}q.length=r}function bn(e,t,n,r){let i=t||document.body,a=i;E(n),r&&k(a,r);let o;try{o=e(i,0);let t=o;if(t&&t.nodeType===1&&t.parentNode!==a){let e=O(a);if(e){let n=e.nextSibling;a.insertBefore(t,e),f(e),k(a,n)}else a.appendChild(t),k(a,null)}}finally{te()}return _e(),o}function xn(){return{atomCache:/* @__PURE__ */ new Map,atomMeta:/* @__PURE__ */ new Map,rawKeys:/* @__PURE__ */ new Set,baseRules:[],queryRules:/* @__PURE__ */ new Map,styleEpoch:0,cssTextCache:null,sheet:null,sheetDocument:null,baseRuleCount:0,groupRules:/* @__PURE__ */ new Map,externalRules:null,hasExternalGroups:!1}}const Sn=Symbol.for(`nuclo.style.engine.v1`),Cn=globalThis;let wn;function J(){return wn??=Cn[Sn]??(Cn[Sn]=xn())}function Tn(e){for(let t of e){let e=J();e.queryRules.has(t)||e.queryRules.set(t,[])}}function En(e,t){let n=J();try{let r=e.cssRules.length;e.insertRule(t+`{}`,r);let i=e.cssRules[r];return n.groupRules.set(t,i),n.groupRules.set(Y(i),i),i}catch{return null}}const Dn=/* @__PURE__ */ new WeakMap;function Y(e){let t=Dn.get(e);if(t!==void 0)return t;let n=e.cssText,r=n.indexOf(`{`),i=(r===-1?n:n.slice(0,r)).trim();return Dn.set(e,i),i}function On(e){return e instanceof CSSStyleRule?e.selectorText:Y(e)}function kn(e,t){let n=J();if(!n.externalRules)return;let r=Z(t,On(e)),i=n.externalRules.get(r);i||(i=/* @__PURE__ */ new Set,n.externalRules.set(r,i)),i.add(e.cssText)}function An(e,t){let n=J();if(!n.externalRules)return!1;let r=Z(t,On(e)),i=n.externalRules.get(r);return i?.delete(e.cssText)?(i.size===0&&n.externalRules.delete(r),n.externalRules.size===0&&(n.externalRules=null),!0):!1}function jn(e){let t=J();for(let n=0;n<e.length;n++){let r=e[n];if(r instanceof CSSStyleRule){kn(r,void 0);continue}let i=Y(r);if(`cssRules`in r&&!i.startsWith(`@keyframes`)){let e=r;t.hasExternalGroups=!0,t.groupRules.set(i,e);for(let t=0;t<e.cssRules.length;t++)kn(e.cssRules[t],i)}else kn(r,void 0)}}function Mn(e,t){let n=J();try{e.insertRule(t,n.baseRuleCount);let r=e.cssRules[n.baseRuleCount];if(An(r,void 0)){e.deleteRule(n.baseRuleCount);return}n.baseRuleCount++}catch{}}function Nn(e,t){let n=J();try{let r=e.cssRules.length;e.insertRule(t,r);let i=e.cssRules[r];n.externalRules&&An(i,Y(e))&&e.deleteRule(r)}catch{}}function Pn(e,t){let n=J(),r=n.groupRules.get(t);if(r)return r;if(!n.hasExternalGroups)return En(e,t);try{let r=e.cssRules.length;e.insertRule(t+`{}`,r);let i=Y(e.cssRules[r]);e.deleteRule(r);let a=n.groupRules.get(i);if(a)return n.groupRules.set(t,a),a}catch{return null}return En(e,t)}function X(){let e=J();if(typeof document>`u`||typeof document.getElementById!=`function`)return null;if(e.sheet&&e.sheetDocument===document&&e.sheet.ownerNode&&e.sheet.ownerNode.isConnected)return e.sheet;let t=document.getElementById(`nuclo-styles`),n;if(t?.tagName===`STYLE`?n=t:(n=document.createElement(`style`),n.id=`nuclo-styles`,t?t.replaceWith(n):document.head.appendChild(n)),e.sheet=n.sheet,e.sheetDocument=document,e.groupRules.clear(),e.baseRuleCount=0,e.externalRules=null,e.hasExternalGroups=!1,!e.sheet)return null;if(e.sheet.cssRules.length>0){let t=0;for(;t<e.sheet.cssRules.length;){let n=e.sheet.cssRules[t];if(!(n instanceof CSSStyleRule)&&`cssRules`in n&&!Y(n).startsWith(`@keyframes`))break;t++}e.baseRuleCount=t,e.externalRules=/* @__PURE__ */ new Map,jn(e.sheet.cssRules)}for(let t of e.baseRules)Mn(e.sheet,t);for(let[t,n]of e.queryRules){let r=Pn(e.sheet,t);if(r)for(let e of n)Nn(r,e)}return e.sheet}function Fn(e,t){let n=J(),r=X();if(t===void 0)n.baseRules.push(e);else{let r=n.queryRules.get(t);r||(r=[],n.queryRules.set(t,r)),r.push(e)}if(n.cssTextCache=null,r){if(t===void 0)Mn(r,e);else{let n=Pn(r,t);n&&Nn(n,e)}}}function In(e){let t=2166136261,n=2128831035;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,16777619),n=Math.imul(n^i,2246822507)}return(t>>>0).toString(36)+((n>>>9)%1296).toString(36)}function Z(e,t){return(e===void 0?`-`:`+`+e.length+`:`+e)+t.length+`:`+t}function Ln(e,t){return e+t.length+`:`+t}function Rn(e,t){let n=``,r=0;for(let i=0;i<e.length;i++){let a=e.charCodeAt(i);if(a===92&&i+1<e.length){n+=e[i]+e[++i];continue}if(r!==0){n+=e[i],a===r&&(r=0);continue}a===34||a===39?(r=a,n+=e[i]):n+=a===38?t:e[i]}return n}function zn(e,t){let n=`.`+e;return n+Rn(t,n)}function Bn(e){if(e.length===0||e===`-`)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n>=97&&n<=122||n>=65&&n<=90||n===45||n===95||t>0&&n>=48&&n<=57))return!1}if(e.charCodeAt(0)===45&&e.length>1){let t=e.charCodeAt(1);if(t>=48&&t<=57)return!1}return!0}function Vn(e,t,n,r,i=!1){let a=J(),o=Z(e,t);for(let[e,t]of n)o=Ln(Ln(o,e),t);r!==void 0&&!Bn(r)&&(console.warn(`[nuclo] css() name ${JSON.stringify(r)} is not a valid CSS class name (letters, digits, - and _ only, not starting with a digit); falling back to a generated name.`),r=void 0);let s=r===void 0?`a`+o:`n`+Ln(``,r)+o,c=a.atomCache.get(s);if(c!==void 0)return X(),c;r===void 0?c=`n`+In(s):(c=i?r:r+`-`+In(s),a.atomMeta.has(c)&&console.warn(`[nuclo] css() name ${JSON.stringify(c)} is already used by a different style. Both rules are emitted under the same class, so they will override each other — rename one.`));let l=``;for(let[e,t]of n)l+=(l?`;`:``)+e+`:`+t;return a.atomCache.set(s,c),a.atomMeta.set(c,{query:e,suffix:t,decls:n,name:r}),Fn(zn(c,t)+`{`+l+`}`,e),c}function Hn(e,t){let n=J(),r=n.atomMeta.get(e),i=n.atomMeta.get(t);if(!r||!i)return t;let a=[...r.decls,...i.decls],o=/* @__PURE__ */ new Map;for(let e=0;e<a.length;e++)o.set(a[e][0],e);let s=a.filter((e,t)=>o.get(e[0])===t);return Vn(r.query,r.suffix,s,r.name??i.name)}function Un(e){let t=J().atomMeta.get(e);return t===void 0?void 0:Z(t.query,t.suffix)}function Wn(){return(wn??Cn[Sn])?.styleEpoch??0}function Gn(e,t){let n=J();if(n.rawKeys.has(e)){X();return}n.rawKeys.add(e),Fn(t,void 0)}function Kn(){let e=J();if(e.cssTextCache!==null)return e.cssTextCache;let t=e.baseRules.join(``);for(let[n,r]of e.queryRules)r.length>0&&(t+=n+`{`+r.join(``)+`}`);return e.cssTextCache=t,t}function qn(){let e=J();e.atomCache.clear(),e.atomMeta.clear(),e.rawKeys.clear(),e.baseRules.length=0,e.queryRules.clear(),e.groupRules.clear(),e.cssTextCache=null,e.baseRuleCount=0,e.sheet=null,e.sheetDocument=null,e.externalRules=null,e.hasExternalGroups=!1,e.styleEpoch++,typeof document<`u`&&document.getElementById(`nuclo-styles`)?.remove()}function Jn(e){let t=0;for(;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)break}if(t===e.length)return e;let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);n+=t>=65&&t<=90?`-`+String.fromCharCode(t+32):e[r]}return n}const Yn={hover:`:hover`,focus:`:focus`,focusVisible:`:focus-visible`,focusWithin:`:focus-within`,active:`:active`,visited:`:visited`,disabled:`:disabled`,enabled:`:enabled`,checked:`:checked`,required:`:required`,invalid:`:invalid`,valid:`:valid`,readOnly:`:read-only`,first:`:first-child`,last:`:last-child`,only:`:only-child`,odd:`:nth-child(odd)`,even:`:nth-child(even)`,empty:`:empty`,placeholderShown:`:placeholder-shown`,placeholder:`::placeholder`,before:`::before`,after:`::after`,selection:`::selection`,marker:`::marker`,firstLine:`::first-line`,firstLetter:`::first-letter`},Xn={bg:[`background`],p:[`padding`],px:[`padding-left`,`padding-right`],py:[`padding-top`,`padding-bottom`],pt:[`padding-top`],pr:[`padding-right`],pb:[`padding-bottom`],pl:[`padding-left`],m:[`margin`],mx:[`margin-left`,`margin-right`],my:[`margin-top`,`margin-bottom`],mt:[`margin-top`],mr:[`margin-right`],mb:[`margin-bottom`],ml:[`margin-left`],w:[`width`],h:[`height`],minW:[`min-width`],maxW:[`max-width`],minH:[`min-height`],maxH:[`max-height`],size:[`width`,`height`],text:[`font-size`],font:[`font-family`],weight:[`font-weight`],leading:[`line-height`],tracking:[`letter-spacing`],align:[`text-align`],items:[`align-items`],justify:[`justify-content`],z:[`z-index`],rounded:[`border-radius`],shadow:[`box-shadow`],select:[`user-select`]},Zn={row:{display:`flex`,"flex-direction":`row`},col:{display:`flex`,"flex-direction":`column`},center:{"align-items":`center`,"justify-content":`center`},truncate:{overflow:`hidden`,"text-overflow":`ellipsis`,"white-space":`nowrap`}},Qn={background:`colors`,"background-color":`colors`,color:`colors`,"border-color":`colors`,"border-top-color":`colors`,"border-right-color":`colors`,"border-bottom-color":`colors`,"border-left-color":`colors`,"outline-color":`colors`,"caret-color":`colors`,"text-decoration-color":`colors`,"font-family":`fonts`,"box-shadow":`shadows`,"border-radius":`radii`},$n=/* @__PURE__ */ new Set([`z-index`,`opacity`,`font-weight`,`line-height`,`flex`,`flex-grow`,`flex-shrink`,`order`,`aspect-ratio`,`zoom`,`scale`,`column-count`,`orphans`,`widows`,`tab-size`,`animation-iteration-count`,`grid-column`,`grid-row`]),er=/* @__PURE__ */ new Map;function tr(e){if(!/[A-Z]/.test(e))return e;let t=er.get(e);return t===void 0&&(t=Jn(e),er.size>=512&&er.clear(),er.set(e,t)),t}function nr(e){return e.charCodeAt(0)===64?e:`@media `+e}function rr(e,t){return e!==void 0&&e.startsWith(`@media`)&&t.startsWith(`@media`)?e+` and`+t.slice(6):t}function ir(e,t){for(let n in t){let r=t[n],i=e[n];e[n]=typeof r==`object`&&r&&!Array.isArray(r)&&typeof i==`object`&&i&&!Array.isArray(i)?ir({...i},r):r}return e}var ar=class{className;constructor(e){this.className=e}toString(){return this.className}};function Q(e){return new ar(e)}function or(e,t){let n=Un(t);if(n===void 0){e.set(t,t);return}let r=e.get(n);r===void 0||r===t?e.set(n,t):e.set(n,Hn(r,t))}function sr(e,t){let n=0;for(let r=0;r<=e.length;r++){let i=r===e.length?32:e.charCodeAt(r);(i===32||i===9||i===10||i===12||i===13)&&(r>n&&or(t,e.slice(n,r)),n=r+1)}}function cr(e,t){for(let n of e)n&&(typeof n==`string`?sr(n,t):Array.isArray(n)?cr(n,t):sr(n.className,t))}function lr(e){let t=/* @__PURE__ */ new Map;cr(e,t);let n=``;for(let e of t.values())n+=(n?` `:``)+e;return n}const ur=/* @__PURE__ */ new WeakMap;function dr(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function fr(...e){if(e.length===0)return Q(``);if(e.length===1){let t=e[0];if(!t)return Q(``);if(!Array.isArray(t)){let e=typeof t==`string`?t:t.className;if(!/[\t\n\f\r ]/.test(e))return Q(e)}}if(e.length===2&&dr(e[0])&&dr(e[1])){let t=e[0],n=e[1],r=Wn(),i=ur.get(t),a=i?.get(n);if(a!==void 0&&a.epoch===r&&a.first===e[0].className&&a.second===e[1].className)return X(),a.result;let o=Q(lr(e)),s=i??/* @__PURE__ */ new WeakMap;return s.set(n,{epoch:r,first:e[0].className,second:e[1].className,result:o}),i||ur.set(t,s),o}return Q(lr(e))}const pr=Z(void 0,``);function mr(e={}){let t=e.screens??{};Tn(Object.values(t).map(nr));let n=/* @__PURE__ */ new WeakMap;function r(t,n){if(typeof n==`number`)return n===0||$n.has(t)?String(n):n+`px`;let r=Qn[t];if(r!==void 0){let t=e[r]?.[n];if(t!==void 0)return t}return n}function i(e,t,n){let r=Z(t,n),i=e.get(r);return i||(i={query:t,suffix:n,decls:[]},e.set(r,i)),i}function a(e,n,o,s){for(let c in e){let l=e[c];if(l==null||l===!1)continue;if(typeof l==`object`){if(c===`raw`){let e=l,t=i(s,n,o).decls;for(let n in e)t.push([n,r(n,e[n])]);continue}let e=Yn[c];if(e!==void 0){a(l,n,o+e,s);continue}let u=t[c];if(u!==void 0){a(l,rr(n,nr(u)),o,s);continue}let d=c.charCodeAt(0);if(d===38){a(l,n,Rn(c,`&`+o).slice(1),s);continue}if(d===64){a(l,rr(n,c),o,s);continue}continue}if(l===!0){let e=Zn[c];if(e){let t=i(s,n,o).decls;for(let n in e)t.push([n,e[n]])}continue}let u=Xn[c];if(u!==void 0){let e=i(s,n,o).decls;for(let t of u)e.push([t,r(t,l)])}else{let e=tr(c);i(s,n,o).decls.push([e,r(e,l)])}}}function o(e,t){let r=typeof e==`string`,i=r?t:e,o=r?e:void 0;if(i==null)return Q(``);let s=Wn(),c=n.get(i);if(c!==void 0&&c.epoch===s&&c.name===o)return X(),c.result;let l=/* @__PURE__ */ new Map;a(i,void 0,``,l);let u=[];for(let e of l.values()){if(e.decls.length===0)continue;let t=e.query===void 0&&e.suffix===``;u.push(Vn(e.query,e.suffix,e.decls,o,t))}let d=Q(u.join(` `));return n.set(i,{epoch:s,name:o,result:d}),d}function s(e){let t=/* @__PURE__ */ new Map;a(e,void 0,``,t);let n=``;for(let[e,r]of t.get(pr)?.decls??[])n+=(n?`;`:``)+e+`:`+r;return n}function c(e){let t=``;for(let n in e)t+=n+`{`+s(e[n])+`}`;let n=`nk`+In(t);return Gn(n,`@keyframes `+n+`{`+t+`}`),n}function l(e,t){let n=e+`{`+s(t)+`}`;Gn(`g|`+n,n)}function u(e){let t=e=>e===!0?`true`:e===!1?`false`:String(e),n=e.variants??{},r=Object.keys(n),i=e.defaultVariants??{},a=e.base??null,s=(e.compoundVariants??[]).map(e=>{let{css:n,...r}=e,i={};for(let e in r)i[e]=t(r[e]);return{conditions:i,style:n}}),c=/* @__PURE__ */ new Map,l=Wn();return function(e){let u=Wn();l!==u&&(c.clear(),l=u);let d={};for(let n of r){let r=(e?e[n]:void 0)??i[n];r!=null&&(d[n]=t(r))}let f=``;for(let e of r){let t=d[e];f+=e.length+`:`+e,f+=t===void 0?`-`:`+`+t.length+`:`+t}let p=c.get(f);if(p)return X(),p;let m={};a&&(m=ir(m,a));for(let e of r){let t=d[e];if(t!==void 0){let r=n[e][t];r&&(m=ir(m,r))}}for(let e of s){let t=!0;for(let n in e.conditions)if(d[n]!==e.conditions[n]){t=!1;break}t&&(m=ir(m,e.style))}let h=o(m);return c.set(f,h),h}}return{css:o,cx:fr,variants:u,keyframes:c,globalStyle:l,theme:e}}let hr;function $(){return hr??=mr({})}const gr=(e,t)=>typeof e==`string`?$().css(e,t):$().css(e),_r=e=>$().variants(e),vr=e=>$().keyframes(e),yr=(e,t)=>$().globalStyle(e,t);function br(e,t,n=0){let r=n,i=e,a=T();for(let n=0;n<t.length;n+=1){let o=t[n];if(o==null)continue;let s=W(e,o,r);if(s){if(s.parentNode!==i){if(a){let e=O(i);i.insertBefore(s,e),k(i,e)}else i.appendChild(s)}else a&&O(i)===s&&j(i);r+=1}}}function xr(e,t){Mt(e),e.removeAttribute(`class`),t&&(Fe(e),l(e),e.removeAttribute(`style`))}function Sr(e,t,n){if(ke()){let n=Te();return Ee(n,e,t),n}let r=function(r,i=0){let a=r?ae(r,e):null;a&&xr(a,T());let o=a??(n?document.createElementNS(`http://www.w3.org/2000/svg`,e):document.createElement(e)),s=a?o.lastChild:null;return br(o,t,i),a&&oe(o,s),o};return n||Ee(r,e,t),r}function Cr(e){return(...t)=>Sr(e,t,!1)}function wr(e){return(...t)=>Sr(e,t,!0)}const Tr=/* @__PURE__ */ `a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr`.split(`.`),Er=/* @__PURE__ */ `a.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.svg.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`);function Dr(e,t,n,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let i=r(n);return Object.defineProperty(e,t,{value:i,configurable:!0,enumerable:!0,writable:!0}),i},set(n){Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}})}function Or(e,t){t in e&&typeof e[t]!=`function`||(Dr(e,t,t,Cr),t===`var`&&Dr(e,`var_`,t,Cr))}function kr(e,t){let n=`${t}Svg`;n in e||Dr(e,n,t,wr)}function Ar(e=globalThis){let t=`__nuclo_tags_registered`;if(!e[t]){for(let t=0;t<Er.length;t++)kr(e,Er[t]);for(let t=0;t<Tr.length;t++)Or(e,Tr[t]);e[t]=!0}}function jr(){Ar();let e=globalThis;e.list=pn,e.update=fn,e.when=on,e.on=ze,e.scope=un,e.render=_n,e.hydrate=vn,e.forceUpdate=yn,e.createCss=mr,e.css=gr,e.cx=fr,e.variants=_r,e.keyframes=vr,e.globalStyle=yr}jr(),exports.createCss=mr,exports.css=gr,exports.cx=fr,exports.forceUpdate=yn,exports.getCssText=Kn,exports.globalStyle=yr,exports.hydrate=vn,exports.keyframes=vr,exports.list=pn,exports.on=ze,exports.render=_n,exports.resetStyles=qn,exports.scope=un,exports.update=fn,exports.variants=_r,exports.when=on;
|
|
2
2
|
//# sourceMappingURL=nuclo.cjs.map
|