xote 7.0.0 → 7.1.0-beta.2

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.
@@ -1,6 +1,6 @@
1
- import { C as e, D as t, E as n, S as r, T as i, _ as a, a as o, b as s, d as c, g as l, h as u, i as d, l as f, m as p, n as m, p as h, r as g, s as _, v, w as y, x as b, y as x } from "./RuntimeAttr.res-DAZkL5CF.mjs";
1
+ import { C as e, D as t, E as n, S as r, T as i, _ as a, a as o, b as s, d as c, g as l, h as u, i as d, l as f, m as p, n as m, p as ee, r as h, s as g, v as _, w as v, x as y, y as b } from "./RuntimeAttr.res-DAZkL5CF.mjs";
2
2
  //#region node_modules/@rescript/core/src/Core__Type.res.mjs
3
- function S(e) {
3
+ function x(e) {
4
4
  switch (Object.prototype.toString.call(e)) {
5
5
  case "[object BigInt]": return {
6
6
  TAG: "BigInt",
@@ -36,10 +36,10 @@ function S(e) {
36
36
  };
37
37
  }
38
38
  }
39
- var C = { classify: S };
39
+ var S = { classify: x };
40
40
  //#endregion
41
41
  //#region node_modules/@rescript/core/src/Core__Array.res.mjs
42
- function w(e, t) {
42
+ function C(e, t) {
43
43
  let r = e.length, i = Array(r), a = 0;
44
44
  for (let o = 0; o < r; ++o) {
45
45
  let r = e[o], s = t(r);
@@ -49,7 +49,7 @@ function w(e, t) {
49
49
  }
50
50
  //#endregion
51
51
  //#region node_modules/rescript-signals/src/signals/Effect.res.mjs
52
- function T(t, n) {
52
+ function w(t, n) {
53
53
  let i = e(), o = { contents: void 0 }, s = r(i, "Effect", () => {
54
54
  let e = o.contents;
55
55
  e !== void 0 && e(), o.contents = t();
@@ -60,7 +60,7 @@ function T(t, n) {
60
60
  } catch (e) {
61
61
  throw u.contents = c, e;
62
62
  }
63
- s.level = h(s);
63
+ s.level = ee(s);
64
64
  let d = { contents: !1 };
65
65
  return { dispose: () => {
66
66
  if (d.contents) return;
@@ -69,19 +69,19 @@ function T(t, n) {
69
69
  e !== void 0 && e(), l(s);
70
70
  } };
71
71
  }
72
- function E(e, t) {
73
- T(e, t);
72
+ function T(e, t) {
73
+ w(e, t);
74
74
  }
75
75
  //#endregion
76
76
  //#region src/Effect.res.mjs
77
- var D = /* @__PURE__ */ t({
78
- run: () => k,
79
- runWithDisposer: () => O
80
- }), O = T, k = E;
77
+ var E = /* @__PURE__ */ t({
78
+ run: () => O,
79
+ runWithDisposer: () => D
80
+ }), D = w, O = T;
81
81
  //#endregion
82
82
  //#region node_modules/rescript-signals/src/signals/Computed.res.mjs
83
- function A(t, n) {
84
- let r = e(), i = (e, t) => !1, a = { contents: void 0 }, o = b(() => {
83
+ function k(t, n) {
84
+ let r = e(), i = (e, t) => !1, a = { contents: void 0 }, o = y(() => {
85
85
  let e = a.contents;
86
86
  e.value = t(), e.subs.version = e.subs.version + 1 | 0;
87
87
  }, !1), c = p.contents;
@@ -95,10 +95,10 @@ function A(t, n) {
95
95
  name: n,
96
96
  subs: o
97
97
  };
98
- return a.contents = u, o.lastGlobalVersion = s.contents, x(o), u;
98
+ return a.contents = u, o.lastGlobalVersion = s.contents, b(o), u;
99
99
  }
100
- function j(t, n, r) {
101
- let i = e(), a = { contents: void 0 }, o = b(() => {
100
+ function A(t, n, r) {
101
+ let i = e(), a = { contents: void 0 }, o = y(() => {
102
102
  let e = a.contents, n = e.value, r = t(), i;
103
103
  try {
104
104
  i = !e.equals(n, r);
@@ -120,22 +120,22 @@ function j(t, n, r) {
120
120
  name: r,
121
121
  subs: o
122
122
  };
123
- return a.contents = u, o.lastGlobalVersion = s.contents, x(o), u;
123
+ return a.contents = u, o.lastGlobalVersion = s.contents, b(o), u;
124
124
  }
125
- function ee(e, t, n) {
126
- return n === void 0 ? A(e, t) : j(e, n, t);
125
+ function te(e, t, n) {
126
+ return n === void 0 ? k(e, t) : A(e, n, t);
127
127
  }
128
- function te(e) {
129
- v(e.subs);
128
+ function ne(e) {
129
+ _(e.subs);
130
130
  }
131
131
  //#endregion
132
132
  //#region src/Computed.res.mjs
133
- var ne = /* @__PURE__ */ t({
134
- dispose: () => ae,
135
- make: () => M,
136
- makeWithEquals: () => ie,
137
- makeWithoutEquals: () => re
138
- }), re = A, ie = j, M = ee, ae = te, oe = "http://www.w3.org/2000/svg", se = /* @__PURE__ */ "svg.path.circle.ellipse.line.polygon.polyline.rect.g.defs.clipPath.mask.pattern.marker.symbol.use.text.tspan.image.foreignObject.linearGradient.radialGradient.stop.filter.feBlend.feColorMatrix.feComposite.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.animate.animateTransform.desc.title.metadata".split("."), ce = {};
133
+ var re = /* @__PURE__ */ t({
134
+ dispose: () => M,
135
+ make: () => j,
136
+ makeWithEquals: () => ae,
137
+ makeWithoutEquals: () => ie
138
+ }), ie = k, ae = A, j = te, M = ne, oe = "http://www.w3.org/2000/svg", se = /* @__PURE__ */ "svg.path.circle.ellipse.line.polygon.polyline.rect.g.defs.clipPath.mask.pattern.marker.symbol.use.text.tspan.image.foreignObject.linearGradient.radialGradient.stop.filter.feBlend.feColorMatrix.feComposite.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.animate.animateTransform.desc.title.metadata".split("."), ce = {};
139
139
  se.forEach((e) => {
140
140
  ce[e] = !0;
141
141
  });
@@ -157,7 +157,7 @@ function N(e, t, n) {
157
157
  e.value = n;
158
158
  return;
159
159
  default:
160
- m(t) ? g(n) ? e.setAttribute(t, "") : e.removeAttribute(t) : e.setAttribute(t, n);
160
+ m(t) ? h(n) ? e.setAttribute(t, "") : e.removeAttribute(t) : e.setAttribute(t, n);
161
161
  return;
162
162
  }
163
163
  }
@@ -180,113 +180,117 @@ function L(e, t) {
180
180
  e.disposers.push(t);
181
181
  }
182
182
  function de(e) {
183
- e.disposers.forEach((e) => e.dispose()), e.computeds.forEach(ae);
183
+ e.disposers.forEach((e) => e.dispose()), e.computeds.forEach(M);
184
184
  }
185
185
  function R(e, t) {
186
186
  e.__xote_owner__ = t;
187
187
  }
188
- function z(e) {
189
- return y(e.__xote_owner__);
188
+ function fe(e) {
189
+ return v(e.__xote_owner__);
190
190
  }
191
191
  //#endregion
192
192
  //#region src/RuntimeValue.res.mjs
193
- function B(e, t) {
193
+ function z(e, t) {
194
194
  let r = e.TAG;
195
195
  return r === void 0 ? !1 : n(r) === t;
196
196
  }
197
- function V(e) {
198
- let t = C.classify(e);
197
+ function B(e) {
198
+ let t = S.classify(e);
199
199
  if (typeof t != "object" || t.TAG !== "Object") return !1;
200
200
  let n = t._0;
201
- return Object.prototype.hasOwnProperty.call(n, "TAG") ? B(n, "Static") ? !0 : B(n, "Reactive") : !1;
201
+ return Object.prototype.hasOwnProperty.call(n, "TAG") ? z(n, "Static") ? !0 : z(n, "Reactive") : !1;
202
202
  }
203
- function fe(e) {
204
- let t = C.classify(e);
203
+ function pe(e) {
204
+ let t = S.classify(e);
205
205
  return typeof t == "object" ? t.TAG === "Function" : !1;
206
206
  }
207
- function pe(e) {
208
- let t = C.classify(e);
207
+ function me(e) {
208
+ let t = S.classify(e);
209
209
  return typeof t == "object" ? t.TAG === "Object" : !1;
210
210
  }
211
- function H(e, t) {
211
+ function V(e, t) {
212
212
  return e[t];
213
213
  }
214
214
  //#endregion
215
215
  //#region src/View.res.mjs
216
- var me = /* @__PURE__ */ t({
217
- $$null: () => Ue,
218
- Attr: () => ge,
219
- Attributes: () => he,
220
- Bool: () => et,
221
- Core: () => rt,
222
- DOM: () => tt,
223
- Float: () => Ze,
224
- For: () => Ne,
225
- Int: () => Ye,
226
- KeyedFor: () => Fe,
227
- Maybe: () => ze,
228
- Reactivity: () => nt,
216
+ var he = /* @__PURE__ */ t({
217
+ $$null: () => Ge,
218
+ Attr: () => _e,
219
+ Attributes: () => ge,
220
+ Bool: () => rt,
221
+ Core: () => ot,
222
+ DOM: () => it,
223
+ Float: () => et,
224
+ For: () => Fe,
225
+ Int: () => Qe,
226
+ KeyedFor: () => Le,
227
+ Maybe: () => Ve,
228
+ Reactivity: () => at,
229
229
  Render: () => xe,
230
- Show: () => Le,
231
- Text: () => qe,
232
- Value: () => Ve,
233
- attr: () => it,
230
+ Show: () => ze,
231
+ Text: () => Xe,
232
+ Value: () => Ue,
233
+ attr: () => st,
234
234
  bool: () => Oe,
235
- childrenToArray: () => Y,
236
- computedAttr: () => $,
237
- each: () => Ae,
238
- eachWithKey: () => je,
239
- element: () => He,
240
- empty: () => ot,
235
+ child: () => Je,
236
+ childrenToArray: () => J,
237
+ computedAttr: () => lt,
238
+ each: () => Me,
239
+ eachWithKey: () => Ne,
240
+ element: () => We,
241
+ empty: () => ut,
241
242
  float: () => De,
242
- fragment: () => J,
243
+ fragment: () => ke,
243
244
  int: () => Ee,
244
- isReactiveProp: () => st,
245
- mount: () => We,
246
- mountById: () => Ge,
247
- renderValuePrimitiveProps: () => Q,
248
- signalAttr: () => at,
245
+ isNode: () => Q,
246
+ isReactiveProp: () => dt,
247
+ mount: () => Ke,
248
+ mountById: () => qe,
249
+ renderValuePrimitiveProps: () => Z,
250
+ signalAttr: () => ct,
249
251
  signalFloat: () => Te,
250
- signalFragment: () => ke,
252
+ signalFragment: () => Ae,
251
253
  signalInt: () => we,
252
254
  signalText: () => Ce,
255
+ stringifyChild: () => $,
253
256
  text: () => Se,
254
- valuePrimitive: () => Z
257
+ tracked: () => je,
258
+ valuePrimitive: () => X
255
259
  });
256
- function U(e, t) {
260
+ function H(e, t) {
257
261
  return [e, {
258
262
  TAG: "Static",
259
263
  _0: t
260
264
  }];
261
265
  }
262
- function W(e, t) {
266
+ function U(e, t) {
263
267
  return [e, {
264
268
  TAG: "SignalValue",
265
269
  _0: t
266
270
  }];
267
271
  }
268
- function G(e, t) {
272
+ function W(e, t) {
269
273
  return [e, {
270
274
  TAG: "Compute",
271
275
  _0: t
272
276
  }];
273
277
  }
274
- var he = {
275
- $$static: U,
276
- signal: W,
277
- computed: G
278
- }, ge = {
279
- string: U,
280
- signal: W,
281
- compute: G
278
+ var ge = {
279
+ $$static: H,
280
+ signal: U,
281
+ computed: W
282
+ }, _e = {
283
+ string: H,
284
+ signal: U,
285
+ compute: W
282
286
  };
283
- function K(e) {
284
- let t = z(e);
285
- t !== void 0 && de(t), le(e).forEach(K);
287
+ function G(e) {
288
+ let t = fe(e);
289
+ t !== void 0 && de(t), le(e).forEach(G);
286
290
  }
287
- function _e(e, t) {
291
+ function ve(e, t) {
288
292
  if (e === t) return !0;
289
- let r = C.classify(e), i = C.classify(t);
293
+ let r = S.classify(e), i = S.classify(t);
290
294
  if (typeof r != "object" || r.TAG !== "Object" || typeof i != "object" || i.TAG !== "Object") return !1;
291
295
  let a = i._0, o = r._0, s = Object.keys(o), c = Object.keys(a);
292
296
  return s.length === c.length ? s.every((e) => {
@@ -294,14 +298,14 @@ function _e(e, t) {
294
298
  return t !== void 0 && r !== void 0 ? n(t) === n(r) : !1;
295
299
  }) : !1;
296
300
  }
297
- function ve(e) {
301
+ function ye(e) {
298
302
  Object.keys(e).forEach((t) => {
299
- _(e, t);
303
+ g(e, t);
300
304
  });
301
305
  }
302
- function ye(e) {
306
+ function be(e) {
303
307
  if (e.length === 0) return;
304
- let t = w(e, (e) => {
308
+ let t = C(e, (e) => {
305
309
  if (e.TAG === "Keyed") return {
306
310
  key: e.key,
307
311
  identity: e.identity,
@@ -310,7 +314,7 @@ function ye(e) {
310
314
  });
311
315
  if (t.length === e.length) return t;
312
316
  }
313
- function be(e, t, r) {
317
+ function K(e, t, r) {
314
318
  let a = {};
315
319
  e.forEach((e) => {
316
320
  a[e.key] = e;
@@ -321,7 +325,7 @@ function be(e, t, r) {
321
325
  }), o.forEach((e) => {
322
326
  let n = t[e];
323
327
  if (n !== void 0) {
324
- K(n.element), n.element.remove(), _(t, e);
328
+ G(n.element), n.element.remove(), g(t, e);
325
329
  return;
326
330
  }
327
331
  });
@@ -329,7 +333,7 @@ function be(e, t, r) {
329
333
  e.forEach((e) => {
330
334
  let n = t[e.key];
331
335
  if (n !== void 0) {
332
- if (_e(n.item, e.identity)) {
336
+ if (ve(n.item, e.identity)) {
333
337
  s.push(n);
334
338
  return;
335
339
  }
@@ -354,24 +358,24 @@ function be(e, t, r) {
354
358
  if (t !== void 0) {
355
359
  let i = n(t);
356
360
  if (i === e.element) {
357
- u.contents = y(i.nextSibling);
361
+ u.contents = v(i.nextSibling);
358
362
  return;
359
363
  }
360
364
  let a = c[e.key];
361
365
  if (a !== void 0) {
362
366
  let t = n(a);
363
367
  if (i === t) {
364
- K(t), r.replaceChild(e.element, t), u.contents = y(e.element.nextSibling);
368
+ G(t), r.replaceChild(e.element, t), u.contents = v(e.element.nextSibling);
365
369
  return;
366
370
  }
367
371
  }
368
- r.insertBefore(e.element, i), u.contents = y(e.element.nextSibling);
372
+ r.insertBefore(e.element, i), u.contents = v(e.element.nextSibling);
369
373
  return;
370
374
  }
371
375
  let i = c[e.key];
372
376
  if (i !== void 0) {
373
377
  let t = n(i);
374
- K(t), t.remove(), r.appendChild(e.element);
378
+ G(t), t.remove(), r.appendChild(e.element);
375
379
  return;
376
380
  }
377
381
  r.appendChild(e.element);
@@ -390,12 +394,12 @@ function q(e) {
390
394
  case "Static": return N(o, n, t._0);
391
395
  case "SignalValue":
392
396
  let e = t._0;
393
- return N(o, n, c(e)), L(s, O(() => {
397
+ return N(o, n, c(e)), L(s, D(() => {
394
398
  N(o, n, f(e));
395
399
  }, void 0));
396
400
  case "Compute":
397
401
  let r = t._0;
398
- return L(s, O(() => {
402
+ return L(s, D(() => {
399
403
  N(o, n, r());
400
404
  }, void 0));
401
405
  }
@@ -415,7 +419,7 @@ function q(e) {
415
419
  case "SignalText":
416
420
  let l = t._0, u = document.createTextNode(c(l)), p = F();
417
421
  return R(u, p), I(p, () => {
418
- L(p, O(() => {
422
+ L(p, D(() => {
419
423
  u.textContent = f(l);
420
424
  }, void 0));
421
425
  }), u;
@@ -426,56 +430,56 @@ function q(e) {
426
430
  m.appendChild(t);
427
431
  }), m;
428
432
  case "SignalFragment":
429
- let h = t._0, g = F(), v = document.createElement("div");
430
- v.setAttribute("style", "display: contents"), R(v, g);
431
- let y = {};
432
- return I(g, () => {
433
- L(g, O(() => {
434
- let e = f(h), t = ye(e);
435
- t === void 0 ? (ve(y), le(v).forEach(K), v.innerHTML = "", e.forEach((e) => {
433
+ let ee = t._0, h = F(), _ = document.createElement("div");
434
+ _.setAttribute("style", "display: contents"), R(_, h);
435
+ let v = {};
436
+ return I(h, () => {
437
+ L(h, D(() => {
438
+ let e = f(ee), t = be(e);
439
+ t === void 0 ? (ye(v), le(_).forEach(G), _.innerHTML = "", e.forEach((e) => {
436
440
  let t = q(e);
437
- v.appendChild(t);
438
- })) : be(t, y, v);
441
+ _.appendChild(t);
442
+ })) : K(t, v, _);
439
443
  }, void 0));
440
- }), v;
444
+ }), _;
441
445
  case "Keyed":
442
446
  e = t.child;
443
447
  continue;
444
448
  case "LazyComponent":
445
- let b = F(), x = q(I(b, t._0));
446
- return R(x, b), x;
449
+ let y = F(), b = q(I(y, t._0));
450
+ return R(b, y), b;
447
451
  case "KeyedList":
448
- let S = t.renderItem, C = t.keyFn, w = t.signal, T = F(), E = document.createComment(" keyed-list-start "), D = document.createComment(" keyed-list-end ");
449
- R(E, T);
450
- let k = {}, A = () => {
451
- let e = D.parentNode;
452
+ let x = t.renderItem, S = t.keyFn, C = t.signal, w = F(), T = document.createComment(" keyed-list-start "), E = document.createComment(" keyed-list-end ");
453
+ R(T, w);
454
+ let O = {}, k = () => {
455
+ let e = E.parentNode;
452
456
  if (e == null) return;
453
- let t = f(w), n = {};
457
+ let t = f(C), n = {};
454
458
  t.forEach((e) => {
455
- n[C(e)] = e;
459
+ n[S(e)] = e;
456
460
  });
457
461
  let r = [];
458
- Object.keys(k).forEach((e) => {
462
+ Object.keys(O).forEach((e) => {
459
463
  n[e] === void 0 && r.push(e);
460
464
  }), r.forEach((e) => {
461
- let t = k[e];
465
+ let t = O[e];
462
466
  if (t !== void 0) {
463
- K(t.element), t.element.remove(), _(k, e);
467
+ G(t.element), t.element.remove(), g(O, e);
464
468
  return;
465
469
  }
466
470
  });
467
471
  let i = [], a = {};
468
472
  t.forEach((e) => {
469
- let t = C(e), n = k[t];
473
+ let t = S(e), n = O[t];
470
474
  if (n !== void 0) {
471
475
  if (n.item !== e) {
472
476
  a[t] = !0;
473
477
  let n = {
474
478
  key: t,
475
479
  item: e,
476
- element: q(S(e))
480
+ element: q(x(e))
477
481
  };
478
- i.push(n), k[t] = n;
482
+ i.push(n), O[t] = n;
479
483
  return;
480
484
  }
481
485
  i.push(n);
@@ -484,49 +488,49 @@ function q(e) {
484
488
  let r = {
485
489
  key: t,
486
490
  item: e,
487
- element: q(S(e))
491
+ element: q(x(e))
488
492
  };
489
- i.push(r), k[t] = r;
493
+ i.push(r), O[t] = r;
490
494
  });
491
- let o = { contents: E.nextSibling };
495
+ let o = { contents: T.nextSibling };
492
496
  i.forEach((t) => {
493
497
  let n = o.contents;
494
498
  if (n == null) {
495
- e.insertBefore(t.element, D);
499
+ e.insertBefore(t.element, E);
496
500
  return;
497
501
  }
498
- if (n === D) {
499
- e.insertBefore(t.element, D);
502
+ if (n === E) {
503
+ e.insertBefore(t.element, E);
500
504
  return;
501
505
  }
502
506
  if (n === t.element) {
503
507
  o.contents = n.nextSibling;
504
508
  return;
505
509
  }
506
- d(a[t.key], !1) ? (K(n), e.replaceChild(t.element, n), o.contents = t.element.nextSibling) : (e.insertBefore(t.element, n), o.contents = t.element.nextSibling);
510
+ d(a[t.key], !1) ? (G(n), e.replaceChild(t.element, n), o.contents = t.element.nextSibling) : (e.insertBefore(t.element, n), o.contents = t.element.nextSibling);
507
511
  });
508
- }, j = document.createDocumentFragment();
509
- return j.appendChild(E), c(w).forEach((e) => {
510
- let t = C(e), n = q(S(e));
511
- k[t] = {
512
+ }, A = document.createDocumentFragment();
513
+ return A.appendChild(T), c(C).forEach((e) => {
514
+ let t = S(e), n = q(x(e));
515
+ O[t] = {
512
516
  key: t,
513
517
  item: e,
514
518
  element: n
515
- }, j.appendChild(n);
516
- }), j.appendChild(D), I(T, () => {
517
- L(T, O(() => {
518
- A();
519
+ }, A.appendChild(n);
520
+ }), A.appendChild(E), I(w, () => {
521
+ L(w, D(() => {
522
+ k();
519
523
  }, void 0));
520
- }), j;
524
+ }), A;
521
525
  }
522
526
  }
523
527
  }
524
528
  var xe = {
525
- disposeElement: K,
526
- shallowEqualIdentity: _e,
527
- clearKeyedItems: ve,
528
- getKeyedChildren: ye,
529
- reconcileKeyedChildren: be,
529
+ disposeElement: G,
530
+ shallowEqualIdentity: ve,
531
+ clearKeyedItems: ye,
532
+ getKeyedChildren: be,
533
+ reconcileKeyedChildren: K,
530
534
  render: q
531
535
  };
532
536
  function Se(e) {
@@ -538,19 +542,19 @@ function Se(e) {
538
542
  function Ce(e) {
539
543
  return {
540
544
  TAG: "SignalText",
541
- _0: M(e, void 0, void 0)
545
+ _0: j(e, void 0, void 0)
542
546
  };
543
547
  }
544
548
  function we(e) {
545
549
  return {
546
550
  TAG: "SignalText",
547
- _0: M(() => e().toString(), void 0, void 0)
551
+ _0: j(() => e().toString(), void 0, void 0)
548
552
  };
549
553
  }
550
554
  function Te(e) {
551
555
  return {
552
556
  TAG: "SignalText",
553
- _0: M(() => e().toString(), void 0, void 0)
557
+ _0: j(() => e().toString(), void 0, void 0)
554
558
  };
555
559
  }
556
560
  function Ee(e) {
@@ -571,28 +575,34 @@ function Oe(e) {
571
575
  _0: e ? "true" : "false"
572
576
  };
573
577
  }
574
- function J(e) {
578
+ function ke(e) {
575
579
  return {
576
580
  TAG: "Fragment",
577
581
  _0: e
578
582
  };
579
583
  }
580
- function ke(e) {
584
+ function Ae(e) {
581
585
  return {
582
586
  TAG: "SignalFragment",
583
587
  _0: e
584
588
  };
585
589
  }
586
- function Y(e) {
590
+ function je(e) {
591
+ return {
592
+ TAG: "SignalFragment",
593
+ _0: j(() => [e()], void 0, void 0)
594
+ };
595
+ }
596
+ function J(e) {
587
597
  return e === void 0 ? [] : e.TAG === "Fragment" ? e._0 : [e];
588
598
  }
589
- function Ae(e, t) {
599
+ function Me(e, t) {
590
600
  return {
591
601
  TAG: "SignalFragment",
592
- _0: M(() => f(e).map(t), void 0, void 0)
602
+ _0: j(() => f(e).map(t), void 0, void 0)
593
603
  };
594
604
  }
595
- function je(e, t, n) {
605
+ function Ne(e, t, n) {
596
606
  return {
597
607
  TAG: "KeyedList",
598
608
  signal: e,
@@ -600,11 +610,11 @@ function je(e, t, n) {
600
610
  renderItem: n
601
611
  };
602
612
  }
603
- function Me(e) {
613
+ function Pe(e) {
604
614
  let t = e.each, n = e.by;
605
615
  if (t.TAG === "Reactive") {
606
616
  let r = t._0;
607
- return n === void 0 ? Ae(r, e.render) : {
617
+ return n === void 0 ? Me(r, e.render) : {
608
618
  TAG: "KeyedList",
609
619
  signal: r,
610
620
  keyFn: n,
@@ -625,8 +635,8 @@ function Me(e) {
625
635
  }))
626
636
  };
627
637
  }
628
- var Ne = { make: Me };
629
- function Pe(e) {
638
+ var Fe = { make: Pe };
639
+ function Ie(e) {
630
640
  let t = e.each;
631
641
  return t.TAG === "Reactive" ? {
632
642
  TAG: "KeyedList",
@@ -643,53 +653,53 @@ function Pe(e) {
643
653
  }))
644
654
  };
645
655
  }
646
- var Fe = { make: Pe };
647
- function Ie(e) {
656
+ var Le = { make: Ie };
657
+ function Re(e) {
648
658
  let t = e.when_;
649
659
  if (t.TAG !== "Reactive") return t._0 ? {
650
660
  TAG: "Fragment",
651
- _0: Y(e.children)
661
+ _0: J(e.children)
652
662
  } : {
653
663
  TAG: "Fragment",
654
- _0: Y(e.fallback)
664
+ _0: J(e.fallback)
655
665
  };
656
666
  let n = t._0;
657
667
  return {
658
668
  TAG: "SignalFragment",
659
- _0: M(() => f(n) ? Y(e.children) : Y(e.fallback), void 0, void 0)
669
+ _0: j(() => f(n) ? J(e.children) : J(e.fallback), void 0, void 0)
660
670
  };
661
671
  }
662
- var Le = { make: Ie };
663
- function X(e, t) {
664
- return t === void 0 ? Y(e.fallback) : [e.render(n(t))];
672
+ var ze = { make: Re };
673
+ function Y(e, t) {
674
+ return t === void 0 ? J(e.fallback) : [e.render(n(t))];
665
675
  }
666
- function Re(e) {
676
+ function Be(e) {
667
677
  let t = e.value;
668
678
  if (t.TAG !== "Reactive") return {
669
679
  TAG: "Fragment",
670
- _0: X(e, t._0)
680
+ _0: Y(e, t._0)
671
681
  };
672
682
  let n = t._0;
673
683
  return {
674
684
  TAG: "SignalFragment",
675
- _0: M(() => X(e, f(n)), void 0, void 0)
685
+ _0: j(() => Y(e, f(n)), void 0, void 0)
676
686
  };
677
687
  }
678
- var ze = {
679
- renderValue: X,
680
- make: Re
688
+ var Ve = {
689
+ renderValue: Y,
690
+ make: Be
681
691
  };
682
- function Be(e) {
692
+ function He(e) {
683
693
  let t = e.value;
684
694
  if (t.TAG !== "Reactive") return e.render(t._0);
685
695
  let n = t._0;
686
696
  return {
687
697
  TAG: "SignalFragment",
688
- _0: M(() => [e.render(f(n))], void 0, void 0)
698
+ _0: j(() => [e.render(f(n))], void 0, void 0)
689
699
  };
690
700
  }
691
- var Ve = { make: Be };
692
- function He(e, t, n, r, i) {
701
+ var Ue = { make: He };
702
+ function We(e, t, n, r, i) {
693
703
  return {
694
704
  TAG: "Element",
695
705
  tag: e,
@@ -698,25 +708,25 @@ function He(e, t, n, r, i) {
698
708
  children: r === void 0 ? [] : r
699
709
  };
700
710
  }
701
- function Ue() {
711
+ function Ge() {
702
712
  return {
703
713
  TAG: "Text",
704
714
  _0: ""
705
715
  };
706
716
  }
707
- function We(e, t) {
717
+ function Ke(e, t) {
708
718
  let n = q(e);
709
719
  t.appendChild(n);
710
720
  }
711
- function Ge(e, t) {
721
+ function qe(e, t) {
712
722
  let n = document.getElementById(t);
713
723
  if (n == null) {
714
724
  console.error("Container element not found: " + t);
715
725
  return;
716
- } else return We(e, n);
726
+ } else return Ke(e, n);
717
727
  }
718
- function Z(e, t) {
719
- if (V(e)) {
728
+ function X(e, t) {
729
+ if (B(e)) {
720
730
  if (e.TAG !== "Reactive") return {
721
731
  TAG: "Text",
722
732
  _0: t(e._0)
@@ -724,10 +734,10 @@ function Z(e, t) {
724
734
  let n = e._0;
725
735
  return {
726
736
  TAG: "SignalText",
727
- _0: M(() => t(f(n)), void 0, void 0)
737
+ _0: j(() => t(f(n)), void 0, void 0)
728
738
  };
729
739
  }
730
- let n = C.classify(e);
740
+ let n = S.classify(e);
731
741
  if (typeof n != "object") return {
732
742
  TAG: "Text",
733
743
  _0: ""
@@ -735,7 +745,7 @@ function Z(e, t) {
735
745
  switch (n.TAG) {
736
746
  case "Object": return {
737
747
  TAG: "SignalText",
738
- _0: M(() => t(f(e)), void 0, void 0)
748
+ _0: j(() => t(f(e)), void 0, void 0)
739
749
  };
740
750
  case "Function": return Ce(() => t(e()));
741
751
  default: return {
@@ -744,34 +754,77 @@ function Z(e, t) {
744
754
  };
745
755
  }
746
756
  }
747
- function Q(e, t) {
748
- let r = H(e, "children"), i = H(e, "value");
757
+ function Z(e, t) {
758
+ let r = V(e, "children"), i = V(e, "value");
749
759
  return r === void 0 ? i === void 0 ? {
750
760
  TAG: "Text",
751
761
  _0: ""
752
- } : Z(n(i), t) : Z(n(r), t);
762
+ } : X(n(i), t) : X(n(r), t);
763
+ }
764
+ var Q = (function(e) {
765
+ if (typeof e != "object" || !e || typeof e.TAG != "string") return !1;
766
+ switch (e.TAG) {
767
+ case "Element":
768
+ case "Text":
769
+ case "SignalText":
770
+ case "Fragment":
771
+ case "SignalFragment":
772
+ case "Keyed":
773
+ case "LazyComponent":
774
+ case "KeyedList": return !0;
775
+ default: return !1;
776
+ }
777
+ }), $ = (function(e) {
778
+ return e == null ? "" : String(e);
779
+ });
780
+ function Je(e) {
781
+ if (Q(e)) return e;
782
+ let t = S.classify(e);
783
+ if (typeof t != "object") return {
784
+ TAG: "Text",
785
+ _0: ""
786
+ };
787
+ switch (t.TAG) {
788
+ case "Object": return {
789
+ TAG: "SignalText",
790
+ _0: j(() => $(f(e)), void 0, void 0)
791
+ };
792
+ case "Function":
793
+ let t = j(e, void 0, void 0);
794
+ return Q(c(t)) ? {
795
+ TAG: "SignalFragment",
796
+ _0: j(() => [f(t)], void 0, void 0)
797
+ } : {
798
+ TAG: "SignalText",
799
+ _0: j(() => $(f(t)), void 0, void 0)
800
+ };
801
+ default: return {
802
+ TAG: "Text",
803
+ _0: $(e)
804
+ };
805
+ }
753
806
  }
754
- function Ke(e) {
755
- return Q(e, (e) => e);
807
+ function Ye(e) {
808
+ return Z(e, (e) => e);
756
809
  }
757
- var qe = { make: Ke };
758
- function Je(e) {
759
- return Q(e, (e) => e.toString());
810
+ var Xe = { make: Ye };
811
+ function Ze(e) {
812
+ return Z(e, (e) => e.toString());
760
813
  }
761
- var Ye = { make: Je };
762
- function Xe(e) {
763
- return Q(e, (e) => e.toString());
814
+ var Qe = { make: Ze };
815
+ function $e(e) {
816
+ return Z(e, (e) => e.toString());
764
817
  }
765
- var Ze = { make: Xe };
766
- function Qe(e) {
818
+ var et = { make: $e };
819
+ function tt(e) {
767
820
  return e ? "true" : "false";
768
821
  }
769
- function $e(e) {
770
- return Q(e, Qe);
822
+ function nt(e) {
823
+ return Z(e, tt);
771
824
  }
772
- var et = {
773
- toString: Qe,
774
- make: $e
775
- }, tt, nt, rt, it = U, at = W, $ = G, ot = Ue, st = V;
825
+ var rt = {
826
+ toString: tt,
827
+ make: nt
828
+ }, it, at, ot, st = H, ct = U, lt = W, ut = Ge, dt = B;
776
829
  //#endregion
777
- export { O as C, D as S, I as _, He as a, ne as b, ke as c, pe as d, V as f, z as g, de as h, $ as i, Se as l, F as m, me as n, J as o, L as p, it as r, at as s, xe as t, fe as u, R as v, M as x, N as y };
830
+ export { D as C, E as S, I as _, We as a, re as b, Ae as c, me as d, B as f, fe as g, de as h, lt as i, Se as l, F as m, he as n, ke as o, L as p, st as r, ct as s, xe as t, pe as u, R as v, j as x, N as y };