@reactive-web-components/rwc 2.61.7 → 2.61.10

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,20 +1,20 @@
1
- var at = Object.defineProperty;
2
- var dt = (e, t, s) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var f = (e, t, s) => dt(e, typeof t != "symbol" ? t + "" : t, s);
4
- const F = (e) => e && typeof e == "object" && ("classList" in e || "attributes" in e || "customAttributes" in e || "reactiveClassList" in e || "listeners" in e || "customListeners" in e || "children" in e || "effects" in e || "style" in e || Object.keys(e).some(
1
+ var dt = Object.defineProperty;
2
+ var ht = (s, t, e) => t in s ? dt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var f = (s, t, e) => ht(s, typeof t != "symbol" ? t + "" : t, e);
4
+ const F = (s) => s && typeof s == "object" && ("classList" in s || "attributes" in s || "customAttributes" in s || "reactiveClassList" in s || "listeners" in s || "customListeners" in s || "children" in s || "effects" in s || "style" in s || Object.keys(s).some(
5
5
  (t) => t.startsWith(".") || t.startsWith("@") || t.startsWith("$")
6
- )) && !("hostElement" in e), ht = (e) => e && typeof e == "object" && "hostElement" in e && "append" in e && "set" in e && "addStyle" in e && "setAttribute" in e && "addClass" in e && "addEffect" in e && "addReactiveContent" in e && "setReactiveContent" in e && "clear" in e, K = (e, t, ...s) => {
7
- t && t.apply(e, s);
6
+ )) && !("hostElement" in s), ft = (s) => s && typeof s == "object" && "hostElement" in s && "append" in s && "set" in s && "addStyle" in s && "setAttribute" in s && "addClass" in s && "addEffect" in s && "addReactiveContent" in s && "setReactiveContent" in s && "clear" in s, G = (s, t, ...e) => {
7
+ t && t.apply(s, e);
8
8
  };
9
- let D = !0;
10
- const S = (...e) => {
11
- D && console.debug(
12
- ["[rwc]", ...e].join(" | "),
13
- ...Array.from(e.join("").matchAll(/%c/gm)).map((t, s) => s % 2 === 0 ? "color:red" : "color:inherit")
9
+ let z = !0;
10
+ const S = (...s) => {
11
+ z && console.debug(
12
+ ["[rwc]", ...s].join(" | "),
13
+ ...Array.from(s.join("").matchAll(/%c/gm)).map((t, e) => e % 2 === 0 ? "color:red" : "color:inherit")
14
14
  );
15
- }, V = (e) => e.replace(/([A-Z])/gm, (t) => `-${t.toLowerCase()}`), ft = (e) => e.replace(/-(\w)/gm, (t, s) => s.toUpperCase()), B = (e, ...t) => {
16
- if (!D) return;
17
- const s = {
15
+ }, V = (s) => s.replace(/([A-Z])/gm, (t) => `-${t.toLowerCase()}`), ut = (s) => s.replace(/-(\w)/gm, (t, e) => e.toUpperCase()), B = (s, ...t) => {
16
+ if (!z) return;
17
+ const e = {
18
18
  r: "color: #ff0000",
19
19
  // red
20
20
  g: "color: #00ff00",
@@ -31,70 +31,92 @@ const S = (...e) => {
31
31
  // orange
32
32
  w: "color: #808080"
33
33
  // gray (w for white/gray)
34
- }, n = e.match(/@[rgbpycow]/g) || [], o = n.map((c) => {
34
+ }, n = s.match(/@[rgbpycow]/g) || [], o = n.map((c) => {
35
35
  const i = c.slice(1);
36
- return s[i] || "color: inherit";
36
+ return e[i] || "color: inherit";
37
37
  });
38
- let r = e;
38
+ let r = s;
39
39
  n.forEach((c) => {
40
40
  const i = new RegExp(`\\${c}([^\\s,]+)`, "g");
41
41
  r = r.replace(i, "%c$1");
42
42
  }), console.log(r, ...o, ...t);
43
- }, kt = () => {
44
- D = !0;
45
- }, ut = () => {
46
- D = !1;
43
+ }, Bt = () => {
44
+ z = !0;
45
+ }, pt = () => {
46
+ z = !1;
47
47
  };
48
- ut();
49
- const Ft = (e, t) => {
50
- e.every(Boolean) && t(e);
51
- }, P = /* @__PURE__ */ new Set();
52
- let z = !1;
53
- const st = () => {
54
- if (z = !1, P.size === 0)
55
- return;
56
- const e = Array.from(P);
57
- P.clear(), e.forEach((t) => {
58
- t.status === "active" && (Y(t), O.push(t), t(), O.pop());
59
- }), P.size > 0 && (z = !0, Promise.resolve().then(st));
60
- }, pt = (e) => {
61
- P.add(e), z || (z = !0, Promise.resolve().then(st));
62
- }, O = [], Y = (e) => {
63
- var t, s, n, o;
64
- (t = e.children) == null || t.forEach((r) => {
48
+ pt();
49
+ const Vt = (s, t) => {
50
+ s.every(Boolean) && t(s);
51
+ }, k = /* @__PURE__ */ new Set();
52
+ let Y = !1, K = !1;
53
+ const mt = () => {
54
+ if (!K) {
55
+ K = !0;
56
+ try {
57
+ if (Y = !1, k.size === 0)
58
+ return;
59
+ const s = Array.from(k);
60
+ k.clear(), s.forEach((t) => {
61
+ if (t.status === "active") {
62
+ Z(t), O.push(t);
63
+ try {
64
+ t();
65
+ } catch (e) {
66
+ console.error("Error in effect:", e);
67
+ } finally {
68
+ O.pop();
69
+ }
70
+ }
71
+ }), k.size > 0 && nt();
72
+ } finally {
73
+ K = !1;
74
+ }
75
+ }
76
+ };
77
+ function Et() {
78
+ queueMicrotask(mt);
79
+ }
80
+ const nt = () => {
81
+ Y || (Y = !0, Et());
82
+ }, Ct = (s) => {
83
+ k.add(s), nt();
84
+ }, O = [], Z = (s) => {
85
+ var t, e, n, o;
86
+ (t = s.children) == null || t.forEach((r) => {
65
87
  var c;
66
88
  return (c = r.destroy) == null ? void 0 : c.call(r);
67
- }), (s = e.children) == null || s.clear(), (n = e.cleanupSet) == null || n.forEach((r) => r()), (o = e.cleanupSet) == null || o.clear();
89
+ }), (e = s.children) == null || e.clear(), (n = s.cleanupSet) == null || n.forEach((r) => r()), (o = s.cleanupSet) == null || o.clear();
68
90
  };
69
- function M(e, t) {
70
- let s = (t == null ? void 0 : t.signalCompareFn) || (() => !0);
91
+ function j(s, t) {
92
+ let e = (t == null ? void 0 : t.signalCompareFn) || (() => !0);
71
93
  const n = /* @__PURE__ */ new Set();
72
94
  function o() {
73
95
  var c;
74
96
  const r = O[O.length - 1];
75
- return r && !r.fake && !n.has(r) && r.status === "active" && (n.add(r), (c = r.cleanupSet) == null || c.add(() => n.delete(r))), !(t != null && t.name) && (r != null && r.effectId) && o.setName(r.effectId), e;
97
+ return r && !r.fake && !n.has(r) && r.status === "active" && (n.add(r), (c = r.cleanupSet) == null || c.add(() => n.delete(r))), !(t != null && t.name) && (r != null && r.effectId) && o.setName(r.effectId), s;
76
98
  }
77
99
  return o.signalId = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`, o.setName = function(r) {
78
100
  return o.signalId = `${r}_${Math.random().toString(36).substring(2, 15)}`, o;
79
101
  }, o.setCompareFn = function(r) {
80
- return s = r, o;
102
+ return e = r, o;
81
103
  }, o.clearSubscribers = function() {
82
104
  n.clear();
83
105
  }, o.getSubscribers = function() {
84
106
  return n;
85
107
  }, o.peek = function() {
86
- return Object.freeze(e);
87
- }, o.initValue = Object.freeze(e), o.forceSet = function(r) {
88
- e = r, n.forEach((c) => {
89
- pt(c);
108
+ return Object.freeze(s);
109
+ }, o.initValue = Object.freeze(s), o.forceSet = function(r) {
110
+ s = r, n.forEach((c) => {
111
+ Ct(c);
90
112
  });
91
- }, o.set = function(r, c = s) {
92
- e !== r && c(e, r) && o.forceSet(r);
113
+ }, o.set = function(r, c = e) {
114
+ s !== r && c(s, r) && o.forceSet(r);
93
115
  }, o.update = function(r) {
94
- o.set(r(e));
116
+ o.set(r(s));
95
117
  }, o.pipe = (r, c) => {
96
118
  c != null && c.name && o.setName(c.name);
97
- const i = M(null);
119
+ const i = j(null);
98
120
  return w(
99
121
  () => {
100
122
  const a = o();
@@ -112,83 +134,83 @@ function M(e, t) {
112
134
  ), i;
113
135
  }, o;
114
136
  }
115
- function w(e, t) {
137
+ function w(s, t) {
116
138
  var r;
117
- const s = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`;
118
- S("current effect", `%c${s}%c`);
119
- const n = e;
120
- n.status = "active", n.children = /* @__PURE__ */ new Set(), n.effectId = s;
139
+ const e = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`;
140
+ S("current effect", `%c${e}%c`);
141
+ const n = s;
142
+ n.status = "active", n.children = /* @__PURE__ */ new Set(), n.effectId = e;
121
143
  const o = O[O.length - 1];
122
144
  o && ((r = o.children) == null || r.add(n), n.parent = new WeakRef(o), n.destroy = () => {
123
145
  var c;
124
- Y(n), (c = o.children) == null || c.delete(n), n.destroy = void 0, n.status = "inactive";
146
+ Z(n), (c = o.children) == null || c.delete(n), n.destroy = void 0, n.status = "inactive";
125
147
  }), n.cleanupSet = /* @__PURE__ */ new Set(), O.push(n), n(), O.pop();
126
148
  }
127
- const g = (e) => !!e && ["object", "function"].includes(typeof e) && "set" in e && "update" in e && "forceSet" in e && "signalId" in e;
128
- function Nt(e, ...t) {
129
- const s = M("");
149
+ const g = (s) => !!s && ["object", "function"].includes(typeof s) && "set" in s && "update" in s && "forceSet" in s && "signalId" in s;
150
+ function Jt(s, ...t) {
151
+ const e = j("");
130
152
  return w(() => {
131
153
  const n = t.map(
132
154
  (r) => g(r) ? String(r()) : String(r)
133
- ), o = [e[0]];
155
+ ), o = [s[0]];
134
156
  n.forEach((r, c) => {
135
- o.push(r, e[c + 1]);
136
- }), s.set(o.join(""));
137
- }), s;
157
+ o.push(r, s[c + 1]);
158
+ }), e.set(o.join(""));
159
+ }), e;
138
160
  }
139
- function Bt(e, t) {
140
- const s = M(t ?? null), n = (o) => s.set(o);
141
- return e instanceof Promise ? e.then(n) : typeof e == "function" && w(() => {
142
- const o = e();
161
+ function qt(s, t) {
162
+ const e = j(t ?? null), n = (o) => e.set(o);
163
+ return s instanceof Promise ? s.then(n) : typeof s == "function" && w(() => {
164
+ const o = s();
143
165
  o instanceof Promise ? o.then(n) : g(o) ? w(() => n(o())) : n(o);
144
- }), s;
166
+ }), e;
145
167
  }
146
- function Vt(e, t) {
147
- let s = e(), n = t();
168
+ function zt(s, t) {
169
+ let e = s(), n = t();
148
170
  w(() => {
149
- const o = e(), r = t();
150
- o !== r && (o !== s ? t.set(o) : r !== n && e.set(r)), s = o, n = r;
171
+ const o = s(), r = t();
172
+ o !== r && (o !== e ? t.set(o) : r !== n && s.set(r)), e = o, n = r;
151
173
  });
152
174
  }
153
- function Jt(...e) {
154
- let t = e.map((n) => n());
155
- const s = M(t);
156
- return e.forEach((n, o) => {
175
+ function Dt(...s) {
176
+ let t = s.map((n) => n());
177
+ const e = j(t);
178
+ return s.forEach((n, o) => {
157
179
  w(() => {
158
180
  const r = () => t.filter((c) => c !== void 0).length;
159
- r() === e.length && (t = Array.from(t).fill(void 0)), t[o] = n(), r() === e.length && s.set([...t]);
181
+ r() === s.length && (t = Array.from(t).fill(void 0)), t[o] = n(), r() === s.length && e.set([...t]);
160
182
  });
161
- }), s;
183
+ }), e;
162
184
  }
163
- const qt = (...e) => {
164
- const t = M([]);
185
+ const Gt = (...s) => {
186
+ const t = j([]);
165
187
  return w(() => {
166
- t.set(e.map((s) => s()));
188
+ t.set(s.map((e) => e()));
167
189
  }), t;
168
- }, J = "eventProps", q = "EVENT_CONFIG", k = "observedAttributes", zt = () => (e, t) => {
169
- Reflect.get(e, k) || Reflect.defineProperty(e, k, {
190
+ }, J = "eventProps", q = "EVENT_CONFIG", P = "observedAttributes", Kt = () => (s, t) => {
191
+ Reflect.get(s, P) || Reflect.defineProperty(s, P, {
170
192
  value: []
171
- }), Reflect.get(e, k).push(
193
+ }), Reflect.get(s, P).push(
172
194
  V(t)
173
195
  );
174
- }, Dt = (e) => (t, s) => {
196
+ }, Yt = (s) => (t, e) => {
175
197
  Reflect.get(t, J) || Reflect.defineProperty(t, J, {
176
198
  value: []
177
199
  }), Reflect.get(t, q) || Reflect.defineProperty(t, q, {
178
200
  value: {}
179
- }), Reflect.get(t, q)[s] = {
180
- bubbles: (e == null ? void 0 : e.bubbles) ?? !1,
181
- composed: (e == null ? void 0 : e.composed) ?? !1
182
- }, Reflect.get(t, J).push(s);
183
- }, nt = (e, t = !1) => (s) => {
201
+ }), Reflect.get(t, q)[e] = {
202
+ bubbles: (s == null ? void 0 : s.bubbles) ?? !1,
203
+ composed: (s == null ? void 0 : s.composed) ?? !1
204
+ }, Reflect.get(t, J).push(e);
205
+ }, ot = (s, t = !1) => (e) => {
184
206
  S(
185
- e,
207
+ s,
186
208
  "start register static attr",
187
- s.prototype[k]
209
+ e.prototype[P]
188
210
  );
189
211
  const n = [];
190
- if (s.styles) {
191
- const r = s.styles, c = [];
212
+ if (e.styles) {
213
+ const r = e.styles, c = [];
192
214
  Array.isArray(r) ? c.push(...r) : c.push(r), c.forEach((i) => {
193
215
  const a = new CSSStyleSheet();
194
216
  a.replaceSync(i), n.push(a);
@@ -196,32 +218,32 @@ const qt = (...e) => {
196
218
  C.replaceSync(i.slice(i.indexOf("@property"))), document.adoptedStyleSheets.push(C);
197
219
  });
198
220
  }
199
- class o extends s {
221
+ class o extends e {
200
222
  constructor(...c) {
201
- S("constructor", `%c${e}%c`), super(t, ...c), n.length > 0 && this.shadow.adoptedStyleSheets.push(...n);
223
+ S("constructor", `%c${s}%c`), super(t, ...c), n.length > 0 && this.shadow.adoptedStyleSheets.push(...n);
202
224
  }
203
225
  render() {
204
- return S("rwc: render from new class"), s.prototype.render.call(this);
226
+ return S("rwc: render from new class"), e.prototype.render.call(this);
205
227
  }
206
228
  attributeChangedCallback(c, i, a) {
207
229
  S(
208
230
  "%cAttribute has changed.%c",
209
231
  `%c${c}%c`,
210
232
  `oldValue: ${i}, newValue: ${a}`,
211
- `%c${e}%c`
233
+ `%c${s}%c`
212
234
  );
213
235
  try {
214
236
  a = JSON.parse(a);
215
237
  } catch {
216
238
  }
217
- const C = ft(c);
239
+ const C = ut(c);
218
240
  if (C in this && g(this[C])) {
219
241
  const h = this[C];
220
242
  h.setName(c), a === null ? (h.set(h.initValue), this.removeAttribute(c)) : h.set(a);
221
243
  }
222
- K(
244
+ G(
223
245
  this,
224
- s.prototype.attributeChangedCallback,
246
+ e.prototype.attributeChangedCallback,
225
247
  c,
226
248
  i,
227
249
  a
@@ -230,7 +252,7 @@ const qt = (...e) => {
230
252
  connectedCallback() {
231
253
  const c = () => {
232
254
  var a, C;
233
- S("rwc: connectedCallback"), S("connectedCallback", `%c${e}%c`, this), (a = this.init) == null || a.call(this), this.providers && Object.keys(this.providers).length > 0 && (S("WRAPPER for providers", e), Object.entries(this.providers).forEach(
255
+ S("rwc: connectedCallback"), S("connectedCallback", `%c${s}%c`, this), (a = this.init) == null || a.call(this), this.providers && Object.keys(this.providers).length > 0 && (S("WRAPPER for providers", s), Object.entries(this.providers).forEach(
234
256
  ([h, d]) => {
235
257
  S("register provider", h, d()), this.addEventListener(h, (m) => {
236
258
  var u;
@@ -239,10 +261,10 @@ const qt = (...e) => {
239
261
  ((u = p.detail) == null ? void 0 : u.context) === h && (p.stopPropagation(), p.detail.callback(d));
240
262
  });
241
263
  }
242
- )), this.checkInjects(), (C = s.prototype[J]) == null || C.forEach(
264
+ )), this.checkInjects(), (C = e.prototype[J]) == null || C.forEach(
243
265
  (h) => {
244
266
  this[h] = (d) => {
245
- const m = s.prototype[q][h], { bubbles: p, composed: u } = m;
267
+ const m = e.prototype[q][h], { bubbles: p, composed: u } = m;
246
268
  g(d) ? w(() => {
247
269
  B("@oemit reactive value", d()), this.dispatchEvent(
248
270
  new CustomEvent(h, {
@@ -260,13 +282,13 @@ const qt = (...e) => {
260
282
  ));
261
283
  };
262
284
  }
263
- ), S("start render", `%c${e}%c`, e);
285
+ ), S("start render", `%c${s}%c`, s);
264
286
  const i = () => {
265
287
  S("rwc: insertRenderTemplate");
266
288
  const d = this.render().hostElement;
267
- d && this.shadow.appendChild(d), K(this, s.prototype.connectedCallback), this.appendSlotContent();
289
+ d && this.shadow.appendChild(d), G(this, e.prototype.connectedCallback), this.appendSlotContent();
268
290
  };
269
- if (this.rootStyle && !s.styles) {
291
+ if (this.rootStyle && !e.styles) {
270
292
  const h = (p) => p instanceof Promise || Array.isArray(p) && p.every((u) => u instanceof Promise), d = this.rootStyle, m = (p) => {
271
293
  const u = new CSSStyleSheet();
272
294
  u.replaceSync(p), this.shadow.adoptedStyleSheets.push(u);
@@ -314,15 +336,15 @@ const qt = (...e) => {
314
336
  this.allSlotContent = [], this.slotContent = {}, this.htmlSlotContent = {}, this.effectSet.forEach((c) => {
315
337
  var i, a;
316
338
  return (a = (i = c.deref()) == null ? void 0 : i.destroy) == null ? void 0 : a.call(i);
317
- }), this.effectSet.clear(), this.shadow.replaceChildren(), this.replaceChildren(), K(this, s.prototype.disconnectedCallback);
339
+ }), this.effectSet.clear(), this.shadow.replaceChildren(), this.replaceChildren(), G(this, e.prototype.disconnectedCallback);
318
340
  }
319
341
  }
320
- return f(o, "observedAttributes", s.prototype[k] ?? []), f(o, "renderTagName", e), o.toString = () => e, customElements.get(e) ? console.error(
321
- `название тега ${e} повторяется, компонент ${s.name} не зарегистрирован`
322
- ) : customElements.define(e, o), s.renderTagName = e, s;
342
+ return f(o, "observedAttributes", e.prototype[P] ?? []), f(o, "renderTagName", s), o.toString = () => s, customElements.get(s) ? console.error(
343
+ `название тега ${s} повторяется, компонент ${e.name} не зарегистрирован`
344
+ ) : customElements.define(s, o), e.renderTagName = s, e;
323
345
  };
324
346
  class _ extends HTMLElement {
325
- constructor(s = !1) {
347
+ constructor(e = !1) {
326
348
  super();
327
349
  f(this, "init");
328
350
  f(this, "isSlotLazyLoading", !1);
@@ -338,38 +360,38 @@ class _ extends HTMLElement {
338
360
  f(this, "htmlSlotContent", {});
339
361
  f(this, "shadow");
340
362
  f(this, "injects", {});
341
- this.shadow = this.attachShadow({ mode: s ? "closed" : "open" });
363
+ this.shadow = this.attachShadow({ mode: e ? "closed" : "open" });
342
364
  }
343
365
  // @ts-expect-error - appendChild is not defined in the HTMLElement interface
344
- appendChild(s, n = !0) {
366
+ appendChild(e, n = !0) {
345
367
  var o;
346
368
  if (this.isSlotLazyLoading && n) {
347
- if (s instanceof HTMLElement) {
348
- const r = s.slot || "default";
349
- this.htmlSlotContent[r] || (this.htmlSlotContent[r] = []), (o = this.htmlSlotContent[r]) == null || o.push(s);
369
+ if (e instanceof HTMLElement) {
370
+ const r = e.slot || "default";
371
+ this.htmlSlotContent[r] || (this.htmlSlotContent[r] = []), (o = this.htmlSlotContent[r]) == null || o.push(e);
350
372
  }
351
- } else return super.appendChild(s);
373
+ } else return super.appendChild(e);
352
374
  }
353
375
  appendSlotContent() {
354
- var s;
355
- (s = this.appendAllSlotContent) == null || s.call(this);
376
+ var e;
377
+ (e = this.appendAllSlotContent) == null || e.call(this);
356
378
  }
357
- inject(s) {
358
- return S("%cinject%c", s), this.injects[s] || (this.injects[s] = M(null)), this.injects[s];
379
+ inject(e) {
380
+ return S("%cinject%c", e), this.injects[e] || (this.injects[e] = j(null)), this.injects[e];
359
381
  }
360
382
  checkInjects() {
361
- Object.entries(this.injects).forEach(([s, n]) => {
383
+ Object.entries(this.injects).forEach(([e, n]) => {
362
384
  S(
363
385
  "%cinject%c",
364
- `%c${s}%c`,
386
+ `%c${e}%c`,
365
387
  "from BaseElement (dispatch event)"
366
388
  ), this.shadow.dispatchEvent(
367
- new CustomEvent(s, {
389
+ new CustomEvent(e, {
368
390
  detail: {
369
- context: s,
391
+ context: e,
370
392
  callback: (o) => w(() => {
371
393
  n.set(o());
372
- }, { name: s })
394
+ }, { name: e })
373
395
  },
374
396
  bubbles: !0,
375
397
  composed: !0
@@ -377,33 +399,33 @@ class _ extends HTMLElement {
377
399
  );
378
400
  });
379
401
  }
380
- setReactiveValue(s) {
381
- this.modelValue = s;
402
+ setReactiveValue(e) {
403
+ this.modelValue = e;
382
404
  }
383
405
  }
384
406
  f(_, "observedAttributes", []), f(_, "renderTagName", ""), f(_, "styles");
385
- const Gt = (e) => "render" in e && "setReactiveValue" in e, mt = "handleSlotContext", X = "onConnected", ot = (e) => typeof e == "string" ? e : JSON.stringify(e), Et = (e) => {
407
+ const Zt = (s) => "render" in s && "setReactiveValue" in s, bt = "handleSlotContext", Q = "onConnected", rt = (s) => typeof s == "string" ? s : JSON.stringify(s), St = (s) => {
386
408
  const t = document.createElement("span");
387
- return t.textContent = ot(e), t;
388
- }, rt = (e, t) => (e.appendChild(Et(t)), e), Ct = (e, t) => (e.replaceChildren(), rt(e, t)), Q = (e) => {
409
+ return t.textContent = rt(s), t;
410
+ }, ct = (s, t) => (s.appendChild(St(t)), s), yt = (s, t) => (s.replaceChildren(), ct(s, t)), tt = (s) => {
389
411
  const t = document.createElement("span");
390
412
  return w(() => {
391
- const s = e();
392
- t.textContent = ot(s);
413
+ const e = s();
414
+ t.textContent = rt(e);
393
415
  }), t;
394
416
  };
395
- class ct {
417
+ class it {
396
418
  constructor(t) {
397
419
  f(this, "wrapper");
398
420
  f(this, "keyedEffects", /* @__PURE__ */ new Map());
399
- f(this, "append", (...t) => (t.forEach((s) => {
421
+ f(this, "append", (...t) => (t.forEach((e) => {
400
422
  var o;
401
- const n = s.hostElement;
402
- n && ((o = this.hostElement) == null || o.appendChild(n), X in n && setTimeout(() => {
423
+ const n = e.hostElement;
424
+ n && ((o = this.hostElement) == null || o.appendChild(n), Q in n && setTimeout(() => {
403
425
  var r;
404
426
  (r = n.onConnected) == null || r.call(
405
427
  n,
406
- s,
428
+ e,
407
429
  n
408
430
  );
409
431
  }));
@@ -411,227 +433,231 @@ class ct {
411
433
  f(this, "set", (...t) => {
412
434
  var n;
413
435
  this.clear();
414
- const s = document.createDocumentFragment();
436
+ const e = document.createDocumentFragment();
415
437
  return t.forEach((o) => {
416
438
  const r = o.hostElement;
417
- r && s.appendChild(r);
418
- }), (n = this.hostElement) == null || n.appendChild(s), this;
439
+ r && e.appendChild(r);
440
+ }), (n = this.hostElement) == null || n.appendChild(e), this;
419
441
  });
420
- f(this, "removeChild", (...t) => (t.forEach((s) => {
442
+ f(this, "removeChild", (...t) => (t.forEach((e) => {
421
443
  var n, o;
422
444
  if (Array.from(((n = this.hostElement) == null ? void 0 : n.childNodes.values()) || []).some(
423
- (r) => r === s.hostElement
445
+ (r) => r === e.hostElement
424
446
  )) {
425
- const r = s.hostElement;
447
+ const r = e.hostElement;
426
448
  r && ((o = this.hostElement) == null || o.removeChild(r));
427
449
  }
428
450
  }), this));
429
451
  f(this, "addHtmlContent", (t) => {
430
- const s = this.hostElement;
431
- return s ? (rt(s, t), this) : this;
452
+ const e = this.hostElement;
453
+ return e ? (ct(e, t), this) : this;
432
454
  });
433
455
  f(this, "setHtmlContent", (t) => {
434
- const s = this.hostElement;
435
- return s ? (Ct(s, t), this) : this;
456
+ const e = this.hostElement;
457
+ return e ? (yt(e, t), this) : this;
436
458
  });
437
- f(this, "setAttribute", (t, s) => {
459
+ f(this, "setAttribute", (t, e) => {
438
460
  var r;
439
461
  const n = this.hostElement;
440
462
  if (!n) return this;
441
463
  let o;
442
- if (typeof s == "boolean" && !(n instanceof _))
443
- if (s)
464
+ if ((typeof e == "boolean" || e === null) && !(n instanceof _))
465
+ if (e)
444
466
  o = "";
445
467
  else {
446
468
  this.removeAttribute(t);
447
469
  const c = t.toLowerCase();
448
470
  return c in n && (n[c] = null), this;
449
471
  }
450
- else typeof s != "string" ? o = JSON.stringify(s) : o = s;
472
+ else typeof e != "string" ? o = JSON.stringify(e) : o = e;
451
473
  if ((r = this.hostElement) == null || r.setAttribute(V(t), o), !(n instanceof _)) {
452
474
  const c = t.toLowerCase();
453
- c in n && (n[c] = s);
475
+ c in n && (n[c] = e);
454
476
  }
455
477
  return this;
456
478
  });
457
- f(this, "setCustomAttribute", (t, s) => {
479
+ f(this, "setCustomAttribute", (t, e) => {
458
480
  var o;
459
481
  let n;
460
- return typeof s != "string" ? n = JSON.stringify(s) : n = s, (o = this.hostElement) == null || o.setAttribute(V(t), n), this;
482
+ return typeof e != "string" ? n = JSON.stringify(e) : n = e, (o = this.hostElement) == null || o.setAttribute(V(t), n), this;
461
483
  });
462
- f(this, "setReactiveAttribute", (t, s) => (this.addEffect((n) => {
463
- n.setAttribute(t, s());
484
+ f(this, "setReactiveAttribute", (t, e) => (this.addEffect((n) => {
485
+ n.setAttribute(t, e());
464
486
  }, t), this));
465
- f(this, "setReactiveCustomAttribute", (t, s) => (this.addEffect((n) => {
466
- n.setCustomAttribute(t, s());
487
+ f(this, "setReactiveCustomAttribute", (t, e) => (this.addEffect((n) => {
488
+ n.setCustomAttribute(t, e());
467
489
  }), this));
468
490
  f(this, "removeAttribute", (t) => {
469
- var s;
470
- return (s = this.hostElement) == null || s.removeAttribute(V(t)), this;
491
+ var e;
492
+ return (e = this.hostElement) == null || e.removeAttribute(V(t)), this;
471
493
  });
472
494
  f(this, "addStyle", (t) => {
473
- const s = this.hostElement;
474
- return s ? (Object.entries(t).forEach(([n, o]) => {
495
+ const e = this.hostElement;
496
+ return e ? (Object.entries(t).forEach(([n, o]) => {
475
497
  const r = n.startsWith("--");
476
498
  typeof o == "function" ? this.addEffect(() => {
477
499
  if (r) {
478
500
  const c = String(o() || "");
479
- s.style.setProperty(n, c);
501
+ e.style.setProperty(n, c);
480
502
  } else
481
- s.style[n] = o();
482
- }) : typeof o == "string" && (r ? s.style.setProperty(n, o) : s.style[n] = o);
503
+ e.style[n] = o();
504
+ }) : typeof o == "string" && (r ? e.style.setProperty(n, o) : e.style[n] = o);
483
505
  }), this) : this;
484
506
  });
485
- f(this, "onConnected", (t) => this.hostElement ? (Reflect.defineProperty(this.hostElement, X, {
507
+ f(this, "onConnected", (t) => this.hostElement ? (Reflect.defineProperty(this.hostElement, Q, {
486
508
  get() {
487
509
  return t;
488
510
  }
489
511
  }), this) : this);
490
- f(this, "addClass", (...t) => (t.forEach((s) => {
512
+ f(this, "addClass", (...t) => (t.forEach((e) => {
491
513
  var n;
492
- typeof s == "string" ? (n = this.hostElement) == null || n.classList.add(
493
- ...s.split(" ").flatMap((o) => o.split(`
514
+ typeof e == "string" ? (n = this.hostElement) == null || n.classList.add(
515
+ ...e.split(" ").flatMap((o) => o.split(`
494
516
  `)).map((o) => o.trim()).filter(Boolean)
495
517
  ) : (() => {
496
518
  let o = null;
497
519
  this.addEffect(() => {
498
- const r = s();
520
+ const r = e();
499
521
  r.length > 0 && (o ? this.replaceClass(o, r) : this.addClass(r), o = r);
500
522
  });
501
523
  })();
502
524
  }), this));
503
525
  f(this, "setClass", (...t) => {
504
- var s, n, o;
505
- return (n = this.hostElement) == null || n.classList.remove(...((s = this.hostElement) == null ? void 0 : s.classList) || []), (o = this.hostElement) == null || o.classList.add(...t), this;
526
+ var e, n, o;
527
+ return (n = this.hostElement) == null || n.classList.remove(...((e = this.hostElement) == null ? void 0 : e.classList) || []), (o = this.hostElement) == null || o.classList.add(...t), this;
506
528
  });
507
- f(this, "addReactiveClass", (t) => (Object.keys(t).forEach((s) => {
529
+ f(this, "addReactiveClass", (t) => (Object.keys(t).forEach((e) => {
508
530
  this.addEffect((n) => {
509
- t[s]() ? n.addClass(s) : n.removeClass(s);
531
+ t[e]() ? n.addClass(e) : n.removeClass(e);
510
532
  });
511
533
  }), this));
512
534
  f(this, "removeClass", (...t) => {
513
- var s;
514
- return (s = this.hostElement) == null || s.classList.remove(...t), this;
535
+ var e;
536
+ return (e = this.hostElement) == null || e.classList.remove(...t), this;
515
537
  });
516
- f(this, "replaceClass", (t, s) => {
538
+ f(this, "replaceClass", (t, e) => {
517
539
  var n;
518
- return (n = this.hostElement) == null || n.classList.replace(t, s), this;
540
+ return (n = this.hostElement) == null || n.classList.replace(t, e), this;
519
541
  });
520
- f(this, "addEffect", (t, s) => {
542
+ f(this, "addEffect", (t, e) => {
521
543
  var r, c;
522
544
  const n = this.hostElement;
523
545
  if (!n) return this;
524
546
  const o = () => t(this, n);
525
- if (s) {
526
- const i = (r = this.keyedEffects.get(s)) == null ? void 0 : r.deref();
527
- i && Y(i);
547
+ if (e) {
548
+ const i = (r = this.keyedEffects.get(e)) == null ? void 0 : r.deref();
549
+ i && Z(i);
528
550
  }
529
- return (c = n.effectSet) == null || c.add(new WeakRef(o)), o.component = this.wrapper, w(o, { name: (s == null ? void 0 : s.toString()) || n.tagName }), this;
551
+ return (c = n.effectSet) == null || c.add(new WeakRef(o)), o.component = this.wrapper, w(o, { name: (e == null ? void 0 : e.toString()) || n.tagName }), this;
530
552
  });
531
553
  f(this, "addReactiveContent", (t) => {
532
- var s;
533
- return (s = this.hostElement) == null || s.appendChild(Q(t)), this;
554
+ var e;
555
+ return (e = this.hostElement) == null || e.appendChild(tt(t)), this;
534
556
  });
535
557
  f(this, "setReactiveContent", (t) => {
536
- var s;
537
- return this.clear(), (s = this.hostElement) == null || s.appendChild(Q(t)), this;
558
+ var e;
559
+ return this.clear(), (e = this.hostElement) == null || e.appendChild(tt(t)), this;
538
560
  });
539
561
  f(this, "clear", () => {
540
562
  var t;
541
563
  return (t = this.hostElement) == null || t.replaceChildren(), this;
542
564
  });
543
565
  this.wrapper = t;
544
- const s = t.deref();
545
- s && (s.effectSet = /* @__PURE__ */ new Set());
566
+ const e = t.deref();
567
+ e && (e.effectSet = /* @__PURE__ */ new Set());
546
568
  }
547
569
  get hostElement() {
548
570
  return this.wrapper.deref();
549
571
  }
550
- addEventlistener(t, s, n = !1) {
572
+ addEventlistener(t, e, n = !1) {
551
573
  var o;
552
- return (o = this.hostElement) == null || o.addEventListener(t, (r) => s(r, this, this.hostElement), n), this;
574
+ return (o = this.hostElement) == null || o.addEventListener(
575
+ t,
576
+ (r) => e(r, this, this.hostElement),
577
+ n
578
+ ), this;
553
579
  }
554
580
  }
555
- class bt extends ct {
581
+ class wt extends it {
556
582
  constructor() {
557
583
  super(...arguments);
558
- f(this, "setReactiveValue", (s) => (this.hostElement instanceof _ && this.hostElement.setReactiveValue(s), this));
559
- f(this, "setSlotTemplate", (s) => {
584
+ f(this, "setReactiveValue", (e) => (this.hostElement instanceof _ && this.hostElement.setReactiveValue(e), this));
585
+ f(this, "setSlotTemplate", (e) => {
560
586
  var o;
561
587
  const n = (o = this.hostElement) == null ? void 0 : o.slotTemplate;
562
- return n && Object.entries(s).forEach(([r, c]) => {
588
+ return n && Object.entries(e).forEach(([r, c]) => {
563
589
  n[r] = c;
564
590
  }), this;
565
591
  });
566
592
  }
567
593
  }
568
- const Kt = () => () => {
569
- }, St = (e) => new bt(new WeakRef(e)), yt = (e) => new ct(new WeakRef(e)), wt = (e, ...t) => ({
570
- classList: [...e.map((s) => s.trim()).filter(Boolean), ...t]
571
- }), Yt = (e, ...t) => wt(e, ...t), it = (e, t) => {
572
- if (!t || !e.deref()) return;
573
- const s = Object.keys(t || {}).filter(
594
+ const Ut = () => () => {
595
+ }, vt = (s) => new wt(new WeakRef(s)), At = (s) => new it(new WeakRef(s)), Rt = (s, ...t) => ({
596
+ classList: [...s.map((e) => e.trim()).filter(Boolean), ...t]
597
+ }), Xt = (s, ...t) => Rt(s, ...t), lt = (s, t) => {
598
+ if (!t || !s.deref()) return;
599
+ const e = Object.keys(t || {}).filter(
574
600
  (o) => o.startsWith(".") || o.startsWith("@") || o.startsWith("$")
575
601
  );
576
- s.filter((o) => o.startsWith(".")).forEach((o) => {
602
+ e.filter((o) => o.startsWith(".")).forEach((o) => {
577
603
  t != null && t.attributes || (t.attributes = {}), t.attributes[o.slice(1)] = t[o];
578
- }), s.filter((o) => o.startsWith("@")).forEach((o) => {
604
+ }), e.filter((o) => o.startsWith("@")).forEach((o) => {
579
605
  t != null && t.listeners || (t.listeners = {});
580
606
  const r = o.slice(1);
581
607
  t.listeners[r] = t[o];
582
- }), s.filter((o) => o.startsWith("$")).forEach((o) => {
608
+ }), e.filter((o) => o.startsWith("$")).forEach((o) => {
583
609
  t != null && t.effects || (t.effects = []), t.effects.push(t[o]);
584
610
  });
585
- const n = e.deref();
611
+ const n = s.deref();
586
612
  if (n)
587
- return gt(n, t.classList), It(n, t.style), Ot(n, t.attributes), Lt(n, t.reactiveClassList), Rt(n, t.customAttributes), At(n, t.children), vt(n, t.effects), tt(n, t.listeners), tt(n, t.customListeners), n;
588
- }, tt = (e, t) => {
589
- t && Object.entries(t).forEach(([s, n]) => {
590
- typeof n == "function" && e.addEventlistener(s, n);
613
+ return Ot(n, t.classList), jt(n, t.style), Tt(n, t.attributes), Mt(n, t.reactiveClassList), It(n, t.customAttributes), Lt(n, t.children), gt(n, t.effects), et(n, t.listeners), et(n, t.customListeners), n;
614
+ }, et = (s, t) => {
615
+ t && Object.entries(t).forEach(([e, n]) => {
616
+ typeof n == "function" && s.addEventlistener(e, n);
591
617
  });
592
- }, vt = (e, t) => t == null ? void 0 : t.forEach((s) => e.addEffect(s)), At = (e, t) => G(new WeakRef(e), ...t || []) ?? e, Rt = (e, t) => {
593
- const s = t;
594
- s && Object.keys(s).forEach((n) => {
595
- g(s[n]) ? e.setReactiveCustomAttribute(n, s[n]) : typeof s[n] == "function" ? e.addEffect(() => {
596
- e.setCustomAttribute(n, s[n]());
597
- }) : e.setCustomAttribute(n, s[n]);
618
+ }, gt = (s, t) => t == null ? void 0 : t.forEach((e) => s.addEffect(e)), Lt = (s, t) => D(new WeakRef(s), ...t || []) ?? s, It = (s, t) => {
619
+ const e = t;
620
+ e && Object.keys(e).forEach((n) => {
621
+ g(e[n]) ? s.setReactiveCustomAttribute(n, e[n]) : typeof e[n] == "function" ? s.addEffect(() => {
622
+ s.setCustomAttribute(n, e[n]());
623
+ }) : s.setCustomAttribute(n, e[n]);
598
624
  });
599
- }, gt = (e, t) => e.addClass(...t || []), Lt = (e, t) => e.addReactiveClass(t || {}), It = (e, t) => e.addStyle(t || {}), Ot = (e, t) => {
600
- const s = t, n = (o, r) => {
601
- r && (g(r) ? e.setReactiveAttribute(o, r) : typeof r == "function" ? e.addEffect(() => {
602
- e.setAttribute(o, r());
603
- }) : e.setAttribute(o, r));
625
+ }, Ot = (s, t) => s.addClass(...t || []), Mt = (s, t) => s.addReactiveClass(t || {}), jt = (s, t) => s.addStyle(t || {}), Tt = (s, t) => {
626
+ const e = t, n = (o, r) => {
627
+ r !== void 0 && (g(r) ? s.setReactiveAttribute(o, r) : typeof r == "function" ? s.addEffect(() => {
628
+ s.setAttribute(o, r());
629
+ }) : s.setAttribute(o, r));
604
630
  };
605
- s && Object.keys(s).forEach((o) => {
606
- n(o, s[o]);
631
+ e && Object.keys(e).forEach((o) => {
632
+ n(o, e[o]);
607
633
  });
608
- }, G = (e, ...t) => {
609
- const s = e.deref();
610
- if (s)
634
+ }, D = (s, ...t) => {
635
+ const e = s.deref();
636
+ if (e)
611
637
  return t.forEach((n) => {
612
- typeof n == "string" ? n.trim().length > 0 && s.addHtmlContent(n) : g(n) ? s.addReactiveContent(n) : s.append(n);
613
- }), s;
614
- }, W = (e, t) => {
615
- const s = document.createElement(e), n = yt(s);
616
- return it(new WeakRef(n), t) ?? n;
617
- }, Z = (e, t) => {
618
- const [s, ...n] = e.split(" ").map((r) => r.trim()), o = W(s, t);
619
- return n.length > 0 && o.addClass(...n), (...r) => G(
638
+ typeof n == "string" ? n.trim().length > 0 && e.addHtmlContent(n) : g(n) ? e.addReactiveContent(n) : e.append(n);
639
+ }), e;
640
+ }, W = (s, t) => {
641
+ const e = document.createElement(s), n = At(e);
642
+ return lt(new WeakRef(n), t) ?? n;
643
+ }, U = (s, t) => {
644
+ const [e, ...n] = s.split(" ").map((r) => r.trim()), o = W(e, t);
645
+ return n.length > 0 && o.addClass(...n), (...r) => D(
620
646
  new WeakRef(o),
621
647
  ...r.filter(Boolean).flat().flatMap(
622
- (c) => typeof c == "function" && !g(c) ? j(() => c(o)) : c
648
+ (c) => typeof c == "function" && !g(c) ? M(() => c(o)) : c
623
649
  )
624
650
  ) ?? o;
625
- }, j = (e) => {
651
+ }, M = (s) => {
626
652
  const t = `getSignalContent_${Math.random().toString(36).substring(2, 15)}`;
627
- return W("div").addStyle({ display: "contents" }).addEffect((s) => {
628
- s.clear(), G(new WeakRef(s), ...[e()].flat());
653
+ return W("div").addStyle({ display: "contents" }).addEffect((e) => {
654
+ e.clear(), D(new WeakRef(e), ...[s()].flat());
629
655
  }, t);
630
- }, Zt = (e, t, s) => {
656
+ }, Qt = (s, t, e) => {
631
657
  const n = W("div").addStyle({ display: "contents" }), o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
632
658
  let a = [];
633
659
  const C = /* @__PURE__ */ new Set();
634
- let h = e.peek();
660
+ let h = s.peek();
635
661
  const d = (u) => {
636
662
  C.delete(u), o.delete(u), r.delete(u), c.delete(u), i.delete(u);
637
663
  }, m = (u) => {
@@ -642,7 +668,7 @@ const Kt = () => () => {
642
668
  return i.get(u);
643
669
  }, p = (u, y, x) => Array.from(x.children).indexOf(u) !== y;
644
670
  return w(() => {
645
- const u = e(), y = u.map(t).map((E) => typeof E == "string" ? E : E.toString()), x = new Set(y);
671
+ const u = s(), y = u.map(t).map((E) => typeof E == "string" ? E : E.toString()), x = new Set(y);
646
672
  i.clear(), y.forEach((E, b) => {
647
673
  i.set(E, b);
648
674
  }), a = y;
@@ -666,25 +692,25 @@ const Kt = () => () => {
666
692
  if (!o.has(E))
667
693
  S("create new element", E, A), o.set(
668
694
  E,
669
- M(Math.random().toString(36).substring(2, 15))
695
+ j(Math.random().toString(36).substring(2, 15))
670
696
  ), r.set(
671
697
  E,
672
- () => s(A, b, u).setCustomAttribute("data-key", E)
698
+ () => e(A, b, u).setCustomAttribute("data-key", E)
673
699
  );
674
700
  else if ($ && JSON.stringify(A) !== JSON.stringify($)) {
675
701
  const R = c.get(E);
676
702
  (v = o.get(E)) == null || v.set(Math.random().toString(36).substring(2, 15)), r.set(
677
703
  E,
678
- () => s(A, b, u).setCustomAttribute("data-key", E)
704
+ () => e(A, b, u).setCustomAttribute("data-key", E)
679
705
  ), R && R.parentNode && S("mark element for update", E);
680
706
  }
681
707
  }), h = [...u.map((E) => ({ ...E }))];
682
708
  const N = () => {
683
709
  o.forEach((E, b) => {
684
710
  S("key from setTimeout foreach currItemSignalMap", b), C.has(b) || (C.add(b), w(() => {
685
- var U;
711
+ var X;
686
712
  E();
687
- const A = m(b), $ = (U = r.get(b)) == null ? void 0 : U();
713
+ const A = m(b), $ = (X = r.get(b)) == null ? void 0 : X();
688
714
  if (!$ || !$.hostElement) return;
689
715
  const v = n.hostElement, R = $.hostElement;
690
716
  if (!v) return;
@@ -706,12 +732,12 @@ const Kt = () => () => {
706
732
  };
707
733
  Promise.resolve().then(() => N());
708
734
  }), n;
709
- }, Ut = (e) => {
710
- let t = [W("div")], s = !1;
735
+ }, te = (s) => {
736
+ let t = [W("div")], e = !1;
711
737
  return w(() => {
712
738
  var r, c;
713
- const n = e();
714
- s = Array.isArray(n);
739
+ const n = s();
740
+ e = Array.isArray(n);
715
741
  const o = [];
716
742
  o.push(...[n].flat()), o.length === 0 && o.push(
717
743
  W("div").addStyle({ display: "none" }).setAttribute("id", "empty_template")
@@ -736,47 +762,47 @@ const Kt = () => () => {
736
762
  } catch (i) {
737
763
  console.error(i);
738
764
  }
739
- }), s ? t : t[0];
740
- }, Xt = (e) => mt in e, Qt = (e) => {
741
- const t = Z("div")().addStyle({ display: "contents" }), s = (n) => {
765
+ }), e ? t : t[0];
766
+ }, ee = (s) => bt in s, se = (s) => {
767
+ const t = U("div")().addStyle({ display: "contents" }), e = (n) => {
742
768
  const o = t.hostElement;
743
769
  return o && (o.innerHTML = n), t;
744
770
  };
745
- return typeof e == "string" ? s(e) : t.addEffect(() => {
746
- s(e());
771
+ return typeof s == "string" ? e(s) : t.addEffect(() => {
772
+ e(s());
747
773
  }), t;
748
- }, lt = (e, t, s) => e ? j(t) : s ? j(s) : Z("div")().setAttribute("id", "empty_div_renderIf").addStyle({ display: "none" }), jt = (e, t, s) => j(() => lt(!!e(), t, s)), te = (e, t, s) => typeof e == "boolean" ? lt(e, t, s) : jt(e, t, s), et = (e, t) => j(t).addEffect((s, n) => {
749
- if (typeof e == "boolean")
750
- n.style.display = e ? "block" : "none";
774
+ }, at = (s, t, e) => s ? M(t) : e ? M(e) : U("div")().setAttribute("id", "empty_div_renderIf").addStyle({ display: "none" }), $t = (s, t, e) => M(() => at(!!s(), t, e)), ne = (s, t, e) => typeof s == "boolean" ? at(s, t, e) : $t(s, t, e), st = (s, t) => M(t).addEffect((e, n) => {
775
+ if (typeof s == "boolean")
776
+ n.style.display = s ? "block" : "none";
751
777
  else {
752
- const o = e() ? "block" : "none";
778
+ const o = s() ? "block" : "none";
753
779
  n.style.display = o;
754
780
  }
755
- }), ee = (e, t, s) => {
781
+ }), oe = (s, t, e) => {
756
782
  const n = [
757
- et(e, t)
783
+ st(s, t)
758
784
  ].flat();
759
- return s && n.push(
785
+ return e && n.push(
760
786
  ...[
761
- et(
762
- () => typeof e == "boolean" ? !e : !e(),
763
- s
787
+ st(
788
+ () => typeof s == "boolean" ? !s : !s(),
789
+ e
764
790
  )
765
791
  ].flat()
766
- ), j(() => n);
767
- }, Mt = (e, t) => {
768
- S("createCustomElement", e);
769
- const s = document.createElement(e), n = St(s);
770
- return s.init = () => {
771
- it(new WeakRef(n), t);
792
+ ), M(() => n);
793
+ }, _t = (s, t) => {
794
+ S("createCustomElement", s);
795
+ const e = document.createElement(s), n = vt(e);
796
+ return e.init = () => {
797
+ lt(new WeakRef(n), t);
772
798
  }, n;
773
- }, Tt = (e, t) => {
774
- const s = e.split(" ").slice(1).map((o) => o.trim()), n = Mt(e.split(" ")[0], t);
775
- return Array.isArray(s) && s.length > 0 && n.addClass(...s), (...o) => {
799
+ }, Wt = (s, t) => {
800
+ const e = s.split(" ").slice(1).map((o) => o.trim()), n = _t(s.split(" ")[0], t);
801
+ return Array.isArray(e) && e.length > 0 && n.addClass(...e), (...o) => {
776
802
  const r = o.filter(Boolean).flat().flatMap(
777
- (i) => typeof i == "function" && !g(i) ? j(() => i(n)) : i
803
+ (i) => typeof i == "function" && !g(i) ? M(() => i(n)) : i
778
804
  ), c = n.hostElement;
779
- return c && (c.allSlotContent = r, c.slotContent = r.filter(ht).reduce(
805
+ return c && (c.allSlotContent = r, c.slotContent = r.filter(ft).reduce(
780
806
  (i, a) => {
781
807
  var h;
782
808
  const C = ((h = a.hostElement) == null ? void 0 : h.getAttribute("slot")) || "default";
@@ -784,28 +810,28 @@ const Kt = () => () => {
784
810
  },
785
811
  {}
786
812
  ), c.appendAllSlotContent = () => {
787
- G(new WeakRef(n), ...r);
813
+ D(new WeakRef(n), ...r);
788
814
  }), n;
789
815
  };
790
- }, $t = (e, t, s) => Tt(
791
- `${e.renderTagName}${t && typeof t == "string" ? " " + t : ""}`,
792
- F(t) ? t : t && typeof t == "string" ? s : void 0
793
- ), se = () => {
794
- const e = () => {
816
+ }, xt = (s, t, e) => Wt(
817
+ `${s.renderTagName}${t && typeof t == "string" ? " " + t : ""}`,
818
+ F(t) ? t : t && typeof t == "string" ? e : void 0
819
+ ), re = () => {
820
+ const s = () => {
795
821
  };
796
- return e.oldValue = null, e;
797
- }, ne = () => ({}), _t = (e, t, s) => {
798
- const n = t ? nt(t, s)(e) : e;
822
+ return s.oldValue = null, s;
823
+ }, ce = () => ({}), Ht = (s, t, e) => {
824
+ const n = t ? ot(t, e)(s) : s;
799
825
  return (o, ...r) => {
800
826
  const c = [...r];
801
- return o && !F(o) && c.unshift(o), $t(n, F(o) ? o : {})(...c);
827
+ return o && !F(o) && c.unshift(o), xt(n, F(o) ? o : {})(...c);
802
828
  };
803
- }, oe = (e) => [
804
- _t(e),
805
- (t, s) => {
806
- nt(t, s)(e);
829
+ }, ie = (s) => [
830
+ Ht(s),
831
+ (t, e) => {
832
+ ot(t, e)(s);
807
833
  }
808
- ], l = {}, Wt = [
834
+ ], l = {}, kt = [
809
835
  "div",
810
836
  "span",
811
837
  "section",
@@ -867,25 +893,25 @@ const Kt = () => () => {
867
893
  "canvas",
868
894
  "slot"
869
895
  ];
870
- Wt.forEach((e) => {
871
- l[e] = (t, ...s) => {
872
- let n = [...s];
873
- return t && !F(t) && (n = [t].concat(n)), Z(e, F(t) ? t : {})(...n);
896
+ kt.forEach((s) => {
897
+ l[s] = (t, ...e) => {
898
+ let n = [...e];
899
+ return t && !F(t) && (n = [t].concat(n)), U(s, F(t) ? t : {})(...n);
874
900
  };
875
901
  });
876
- const xt = l.div, re = l.span, ce = l.section, ie = l.input, le = l.button, ae = l.table, de = l.tr, he = l.td, fe = l.th, ue = l.ul, pe = l.li, me = l.ol, Ee = l.form, Ce = l.label, be = l.select, Se = l.option, ye = l.textarea, we = l.img, ve = l.a, Ae = l.p, Re = l.h1, ge = l.h2, Le = l.h3, Ie = l.h4, Oe = l.h5, je = l.h6, Me = l.br, Te = l.hr, $e = l.pre, _e = l.code, We = l.nav, xe = l.header, He = l.footer, Pe = l.main, ke = l.aside, Fe = l.article, Ne = l.figure, Be = l.figcaption, Ve = l.blockquote, Je = l.cite, qe = l.small, ze = l.strong, De = l.em, Ge = l.b, Ke = l.i, Ye = l.u, Ze = l.s, Ue = l.sub, Xe = l.sup, Qe = l.mark, ts = l.del, es = l.ins, ss = l.details, ns = l.summary, os = l.progress, rs = l.meter, cs = l.audio, is = l.video, ls = l.canvas, as = l.slot, ds = (e) => (t) => e(t).addClass(...t.classList ?? []).addReactiveClass(t.reactiveClassList ?? {});
877
- function Ht(e, t) {
878
- let s = 0;
902
+ const Pt = l.div, le = l.span, ae = l.section, de = l.input, he = l.button, fe = l.table, ue = l.tr, pe = l.td, me = l.th, Ee = l.ul, Ce = l.li, be = l.ol, Se = l.form, ye = l.label, we = l.select, ve = l.option, Ae = l.textarea, Re = l.img, ge = l.a, Le = l.p, Ie = l.h1, Oe = l.h2, Me = l.h3, je = l.h4, Te = l.h5, $e = l.h6, _e = l.br, We = l.hr, xe = l.pre, He = l.code, ke = l.nav, Pe = l.header, Fe = l.footer, Ne = l.main, Be = l.aside, Ve = l.article, Je = l.figure, qe = l.figcaption, ze = l.blockquote, De = l.cite, Ge = l.small, Ke = l.strong, Ye = l.em, Ze = l.b, Ue = l.i, Xe = l.u, Qe = l.s, ts = l.sub, es = l.sup, ss = l.mark, ns = l.del, os = l.ins, rs = l.details, cs = l.summary, is = l.progress, ls = l.meter, as = l.audio, ds = l.video, hs = l.canvas, fs = l.slot, us = (s) => (t) => s(t).addClass(...t.classList ?? []).addReactiveClass(t.reactiveClassList ?? {});
903
+ function Ft(s, t) {
904
+ let e = 0;
879
905
  return (...n) => {
880
906
  const o = Date.now();
881
- o - s >= t && (e(...n), s = o);
907
+ o - e >= t && (s(...n), e = o);
882
908
  };
883
909
  }
884
- const hs = (e, t) => j(() => {
885
- const s = e();
910
+ const ps = (s, t) => M(() => {
911
+ const e = s();
886
912
  let n = null;
887
- return s.map(
888
- (o, r) => xt(
913
+ return e.map(
914
+ (o, r) => Pt(
889
915
  {
890
916
  "@dragstart": (c, i, a) => {
891
917
  n = a;
@@ -899,7 +925,7 @@ const hs = (e, t) => j(() => {
899
925
  "@dragover": (c) => {
900
926
  c.preventDefault();
901
927
  },
902
- "@dragenter": Ht((c, i, a) => {
928
+ "@dragenter": Ft((c, i, a) => {
903
929
  var C, h, d;
904
930
  if (c.preventDefault(), n) {
905
931
  let m = n, p = a;
@@ -908,21 +934,21 @@ const hs = (e, t) => j(() => {
908
934
  }
909
935
  }, 200)
910
936
  },
911
- t(o, r, [...e.peek()])
937
+ t(o, r, [...s.peek()])
912
938
  )
913
939
  );
914
- }), fs = (e, t, s) => {
940
+ }), ms = (s, t, e) => {
915
941
  let n = [], o = [];
916
942
  const r = W("div").addStyle({ display: "contents" }), c = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
917
943
  return w(() => {
918
- const a = e(), C = a.map(t);
944
+ const a = s(), C = a.map(t);
919
945
  o.filter((d) => !C.includes(d)).forEach((d) => {
920
946
  var m, p;
921
947
  c.delete(d), (p = (m = r.hostElement) == null ? void 0 : m.querySelector(`[data-key="${d}"]`)) == null || p.remove();
922
948
  }), C.forEach((d, m) => {
923
949
  o.includes(d) || c.set(
924
950
  d,
925
- () => s(a[m], m, a).setCustomAttribute(
951
+ () => e(a[m], m, a).setCustomAttribute(
926
952
  "data-key",
927
953
  d
928
954
  )
@@ -931,7 +957,7 @@ const hs = (e, t) => j(() => {
931
957
  var p;
932
958
  if (o.includes(d)) {
933
959
  JSON.stringify(n[o.indexOf(d)]) !== JSON.stringify(a[m]) && ((p = i.get(d)) == null || p.set({
934
- templateFunc: () => s(a[m], m, a),
960
+ templateFunc: () => e(a[m], m, a),
935
961
  items: a,
936
962
  itemsKey: C,
937
963
  index: m
@@ -940,8 +966,8 @@ const hs = (e, t) => j(() => {
940
966
  }
941
967
  i.set(
942
968
  d,
943
- M({
944
- templateFunc: () => s(a[m], m, a),
969
+ j({
970
+ templateFunc: () => e(a[m], m, a),
945
971
  items: a,
946
972
  itemsKey: C,
947
973
  index: m
@@ -974,124 +1000,124 @@ const hs = (e, t) => j(() => {
974
1000
  };
975
1001
  export {
976
1002
  _ as BaseElement,
977
- ve as a,
978
- Ot as addAttributeList,
979
- gt as addClassList,
980
- Rt as addCustomAttributes,
981
- Lt as addReactiveClassList,
982
- It as addStyleList,
983
- G as appendContentItem,
984
- Fe as article,
985
- ke as aside,
986
- cs as audio,
987
- Ge as b,
988
- Vt as bindReactiveSignals,
989
- Ve as blockquote,
990
- Me as br,
991
- le as button,
1003
+ ge as a,
1004
+ Tt as addAttributeList,
1005
+ Ot as addClassList,
1006
+ It as addCustomAttributes,
1007
+ Mt as addReactiveClassList,
1008
+ jt as addStyleList,
1009
+ D as appendContentItem,
1010
+ Ve as article,
1011
+ Be as aside,
1012
+ as as audio,
1013
+ Ze as b,
1014
+ zt as bindReactiveSignals,
1015
+ ze as blockquote,
1016
+ _e as br,
1017
+ he as button,
992
1018
  V as camelToKebab,
993
- ls as canvas,
994
- K as checkCall,
995
- Ft as checkRef,
996
- Je as cite,
997
- wt as classList,
998
- Yt as cls,
999
- _e as code,
1019
+ hs as canvas,
1020
+ G as checkCall,
1021
+ Vt as checkRef,
1022
+ De as cite,
1023
+ Rt as classList,
1024
+ Xt as cls,
1025
+ He as code,
1000
1026
  B as colorLog,
1001
- qt as combineLatest,
1002
- nt as component,
1003
- oe as configCustomComponent,
1004
- ds as createComponent,
1005
- $t as createCustom,
1006
- Tt as createCustomEl,
1007
- Mt as createCustomElement,
1008
- Z as createEl,
1027
+ Gt as combineLatest,
1028
+ ot as component,
1029
+ ie as configCustomComponent,
1030
+ us as createComponent,
1031
+ xt as createCustom,
1032
+ Wt as createCustomEl,
1033
+ _t as createCustomElement,
1034
+ U as createEl,
1009
1035
  W as createElement,
1010
- Bt as createSignal,
1011
- St as customElementHelpers,
1012
- hs as ddList,
1013
- ne as defineSlotTemplate,
1014
- ts as del,
1015
- ss as details,
1016
- ut as disableLogs,
1017
- xt as div,
1036
+ qt as createSignal,
1037
+ vt as customElementHelpers,
1038
+ ps as ddList,
1039
+ ce as defineSlotTemplate,
1040
+ ns as del,
1041
+ rs as details,
1042
+ pt as disableLogs,
1043
+ Pt as div,
1018
1044
  w as effect,
1019
- yt as elementHelpers,
1020
- De as em,
1021
- kt as enableLogs,
1022
- Dt as event,
1023
- Kt as eventEmitter,
1024
- Be as figcaption,
1025
- Ne as figure,
1026
- He as footer,
1027
- Jt as forkJoin,
1028
- Ee as form,
1029
- fs as getList,
1030
- j as getSignalContent,
1031
- Re as h1,
1032
- ge as h2,
1033
- Le as h3,
1034
- Ie as h4,
1035
- Oe as h5,
1036
- je as h6,
1037
- xe as header,
1038
- Te as hr,
1039
- Ke as i,
1040
- we as img,
1041
- it as initComponent,
1042
- ie as input,
1043
- es as ins,
1044
- Gt as isBaseElement,
1045
- ht as isComponentConfig,
1045
+ At as elementHelpers,
1046
+ Ye as em,
1047
+ Bt as enableLogs,
1048
+ Yt as event,
1049
+ Ut as eventEmitter,
1050
+ qe as figcaption,
1051
+ Je as figure,
1052
+ Fe as footer,
1053
+ Dt as forkJoin,
1054
+ Se as form,
1055
+ ms as getList,
1056
+ M as getSignalContent,
1057
+ Ie as h1,
1058
+ Oe as h2,
1059
+ Me as h3,
1060
+ je as h4,
1061
+ Te as h5,
1062
+ $e as h6,
1063
+ Pe as header,
1064
+ We as hr,
1065
+ Ue as i,
1066
+ Re as img,
1067
+ lt as initComponent,
1068
+ de as input,
1069
+ os as ins,
1070
+ Zt as isBaseElement,
1071
+ ft as isComponentConfig,
1046
1072
  F as isComponentInitConfig,
1047
1073
  g as isReactiveSignal,
1048
- Xt as isSlotTemplate,
1049
- ft as kebabToCamel,
1050
- Ce as label,
1051
- pe as li,
1052
- Pe as main,
1053
- Qe as mark,
1054
- rs as meter,
1055
- We as nav,
1056
- se as newEventEmitter,
1057
- me as ol,
1058
- Zt as oldGetList,
1059
- Se as option,
1060
- Ae as p,
1061
- $e as pre,
1062
- os as progress,
1074
+ ee as isSlotTemplate,
1075
+ ut as kebabToCamel,
1076
+ ye as label,
1077
+ Ce as li,
1078
+ Ne as main,
1079
+ ss as mark,
1080
+ ls as meter,
1081
+ ke as nav,
1082
+ re as newEventEmitter,
1083
+ be as ol,
1084
+ Qt as oldGetList,
1085
+ ve as option,
1086
+ Le as p,
1087
+ xe as pre,
1088
+ is as progress,
1063
1089
  S as projectLog,
1064
- zt as property,
1065
- Y as removeEffect,
1066
- lt as renderIf,
1067
- Nt as rs,
1068
- jt as rxRenderIf,
1069
- Ze as s,
1070
- ce as section,
1071
- be as select,
1072
- At as setChildren,
1073
- vt as setEffects,
1074
- tt as setListeners,
1075
- ee as show,
1076
- et as showIf,
1077
- M as signal,
1078
- Ut as signalComponent,
1079
- as as slot,
1080
- qe as small,
1081
- re as span,
1082
- ze as strong,
1083
- Ue as sub,
1084
- ns as summary,
1085
- Xe as sup,
1086
- ae as table,
1087
- he as td,
1088
- ye as textarea,
1089
- fe as th,
1090
- de as tr,
1091
- Ye as u,
1092
- ue as ul,
1093
- Qt as unsafeHtml,
1094
- _t as useCustomComponent,
1095
- is as video,
1096
- te as when
1090
+ Kt as property,
1091
+ Z as removeEffect,
1092
+ at as renderIf,
1093
+ Jt as rs,
1094
+ $t as rxRenderIf,
1095
+ Qe as s,
1096
+ ae as section,
1097
+ we as select,
1098
+ Lt as setChildren,
1099
+ gt as setEffects,
1100
+ et as setListeners,
1101
+ oe as show,
1102
+ st as showIf,
1103
+ j as signal,
1104
+ te as signalComponent,
1105
+ fs as slot,
1106
+ Ge as small,
1107
+ le as span,
1108
+ Ke as strong,
1109
+ ts as sub,
1110
+ cs as summary,
1111
+ es as sup,
1112
+ fe as table,
1113
+ pe as td,
1114
+ Ae as textarea,
1115
+ me as th,
1116
+ ue as tr,
1117
+ Xe as u,
1118
+ Ee as ul,
1119
+ se as unsafeHtml,
1120
+ Ht as useCustomComponent,
1121
+ ds as video,
1122
+ ne as when
1097
1123
  };