@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
|
|
2
|
-
var
|
|
3
|
-
var f = (
|
|
4
|
-
const F = (
|
|
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
|
|
7
|
-
t && t.apply(
|
|
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
|
|
10
|
-
const S = (...
|
|
11
|
-
|
|
12
|
-
["[rwc]", ...
|
|
13
|
-
...Array.from(
|
|
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 = (
|
|
16
|
-
if (!
|
|
17
|
-
const
|
|
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 =
|
|
34
|
+
}, n = s.match(/@[rgbpycow]/g) || [], o = n.map((c) => {
|
|
35
35
|
const i = c.slice(1);
|
|
36
|
-
return
|
|
36
|
+
return e[i] || "color: inherit";
|
|
37
37
|
});
|
|
38
|
-
let r =
|
|
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
|
-
},
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
|
|
43
|
+
}, Bt = () => {
|
|
44
|
+
z = !0;
|
|
45
|
+
}, pt = () => {
|
|
46
|
+
z = !1;
|
|
47
47
|
};
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
let
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
}), (
|
|
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
|
|
70
|
-
let
|
|
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),
|
|
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
|
|
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(
|
|
87
|
-
}, o.initValue = Object.freeze(
|
|
88
|
-
|
|
89
|
-
|
|
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 =
|
|
92
|
-
|
|
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(
|
|
116
|
+
o.set(r(s));
|
|
95
117
|
}, o.pipe = (r, c) => {
|
|
96
118
|
c != null && c.name && o.setName(c.name);
|
|
97
|
-
const i =
|
|
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(
|
|
137
|
+
function w(s, t) {
|
|
116
138
|
var r;
|
|
117
|
-
const
|
|
118
|
-
S("current effect", `%c${
|
|
119
|
-
const n =
|
|
120
|
-
n.status = "active", n.children = /* @__PURE__ */ new Set(), n.effectId =
|
|
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
|
-
|
|
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 = (
|
|
128
|
-
function
|
|
129
|
-
const
|
|
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 = [
|
|
155
|
+
), o = [s[0]];
|
|
134
156
|
n.forEach((r, c) => {
|
|
135
|
-
o.push(r,
|
|
136
|
-
}),
|
|
137
|
-
}),
|
|
157
|
+
o.push(r, s[c + 1]);
|
|
158
|
+
}), e.set(o.join(""));
|
|
159
|
+
}), e;
|
|
138
160
|
}
|
|
139
|
-
function
|
|
140
|
-
const
|
|
141
|
-
return
|
|
142
|
-
const o =
|
|
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
|
-
}),
|
|
166
|
+
}), e;
|
|
145
167
|
}
|
|
146
|
-
function
|
|
147
|
-
let
|
|
168
|
+
function zt(s, t) {
|
|
169
|
+
let e = s(), n = t();
|
|
148
170
|
w(() => {
|
|
149
|
-
const o =
|
|
150
|
-
o !== r && (o !==
|
|
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
|
|
154
|
-
let t =
|
|
155
|
-
const
|
|
156
|
-
return
|
|
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() ===
|
|
181
|
+
r() === s.length && (t = Array.from(t).fill(void 0)), t[o] = n(), r() === s.length && e.set([...t]);
|
|
160
182
|
});
|
|
161
|
-
}),
|
|
183
|
+
}), e;
|
|
162
184
|
}
|
|
163
|
-
const
|
|
164
|
-
const t =
|
|
185
|
+
const Gt = (...s) => {
|
|
186
|
+
const t = j([]);
|
|
165
187
|
return w(() => {
|
|
166
|
-
t.set(
|
|
188
|
+
t.set(s.map((e) => e()));
|
|
167
189
|
}), t;
|
|
168
|
-
}, J = "eventProps", q = "EVENT_CONFIG",
|
|
169
|
-
Reflect.get(
|
|
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(
|
|
193
|
+
}), Reflect.get(s, P).push(
|
|
172
194
|
V(t)
|
|
173
195
|
);
|
|
174
|
-
},
|
|
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)[
|
|
180
|
-
bubbles: (
|
|
181
|
-
composed: (
|
|
182
|
-
}, Reflect.get(t, J).push(
|
|
183
|
-
},
|
|
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
|
-
|
|
207
|
+
s,
|
|
186
208
|
"start register static attr",
|
|
187
|
-
|
|
209
|
+
e.prototype[P]
|
|
188
210
|
);
|
|
189
211
|
const n = [];
|
|
190
|
-
if (
|
|
191
|
-
const r =
|
|
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
|
|
221
|
+
class o extends e {
|
|
200
222
|
constructor(...c) {
|
|
201
|
-
S("constructor", `%c${
|
|
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"),
|
|
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${
|
|
233
|
+
`%c${s}%c`
|
|
212
234
|
);
|
|
213
235
|
try {
|
|
214
236
|
a = JSON.parse(a);
|
|
215
237
|
} catch {
|
|
216
238
|
}
|
|
217
|
-
const 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
|
-
|
|
244
|
+
G(
|
|
223
245
|
this,
|
|
224
|
-
|
|
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${
|
|
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 =
|
|
264
|
+
)), this.checkInjects(), (C = e.prototype[J]) == null || C.forEach(
|
|
243
265
|
(h) => {
|
|
244
266
|
this[h] = (d) => {
|
|
245
|
-
const 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${
|
|
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),
|
|
289
|
+
d && this.shadow.appendChild(d), G(this, e.prototype.connectedCallback), this.appendSlotContent();
|
|
268
290
|
};
|
|
269
|
-
if (this.rootStyle && !
|
|
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(),
|
|
339
|
+
}), this.effectSet.clear(), this.shadow.replaceChildren(), this.replaceChildren(), G(this, e.prototype.disconnectedCallback);
|
|
318
340
|
}
|
|
319
341
|
}
|
|
320
|
-
return f(o, "observedAttributes",
|
|
321
|
-
`название тега ${
|
|
322
|
-
) : customElements.define(
|
|
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(
|
|
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:
|
|
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(
|
|
366
|
+
appendChild(e, n = !0) {
|
|
345
367
|
var o;
|
|
346
368
|
if (this.isSlotLazyLoading && n) {
|
|
347
|
-
if (
|
|
348
|
-
const r =
|
|
349
|
-
this.htmlSlotContent[r] || (this.htmlSlotContent[r] = []), (o = this.htmlSlotContent[r]) == null || o.push(
|
|
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(
|
|
373
|
+
} else return super.appendChild(e);
|
|
352
374
|
}
|
|
353
375
|
appendSlotContent() {
|
|
354
|
-
var
|
|
355
|
-
(
|
|
376
|
+
var e;
|
|
377
|
+
(e = this.appendAllSlotContent) == null || e.call(this);
|
|
356
378
|
}
|
|
357
|
-
inject(
|
|
358
|
-
return S("%cinject%c",
|
|
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(([
|
|
383
|
+
Object.entries(this.injects).forEach(([e, n]) => {
|
|
362
384
|
S(
|
|
363
385
|
"%cinject%c",
|
|
364
|
-
`%c${
|
|
386
|
+
`%c${e}%c`,
|
|
365
387
|
"from BaseElement (dispatch event)"
|
|
366
388
|
), this.shadow.dispatchEvent(
|
|
367
|
-
new CustomEvent(
|
|
389
|
+
new CustomEvent(e, {
|
|
368
390
|
detail: {
|
|
369
|
-
context:
|
|
391
|
+
context: e,
|
|
370
392
|
callback: (o) => w(() => {
|
|
371
393
|
n.set(o());
|
|
372
|
-
}, { name:
|
|
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(
|
|
381
|
-
this.modelValue =
|
|
402
|
+
setReactiveValue(e) {
|
|
403
|
+
this.modelValue = e;
|
|
382
404
|
}
|
|
383
405
|
}
|
|
384
406
|
f(_, "observedAttributes", []), f(_, "renderTagName", ""), f(_, "styles");
|
|
385
|
-
const
|
|
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 =
|
|
388
|
-
},
|
|
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
|
|
392
|
-
t.textContent =
|
|
413
|
+
const e = s();
|
|
414
|
+
t.textContent = rt(e);
|
|
393
415
|
}), t;
|
|
394
416
|
};
|
|
395
|
-
class
|
|
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((
|
|
421
|
+
f(this, "append", (...t) => (t.forEach((e) => {
|
|
400
422
|
var o;
|
|
401
|
-
const n =
|
|
402
|
-
n && ((o = this.hostElement) == null || o.appendChild(n),
|
|
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
|
-
|
|
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
|
|
436
|
+
const e = document.createDocumentFragment();
|
|
415
437
|
return t.forEach((o) => {
|
|
416
438
|
const r = o.hostElement;
|
|
417
|
-
r &&
|
|
418
|
-
}), (n = this.hostElement) == null || n.appendChild(
|
|
439
|
+
r && e.appendChild(r);
|
|
440
|
+
}), (n = this.hostElement) == null || n.appendChild(e), this;
|
|
419
441
|
});
|
|
420
|
-
f(this, "removeChild", (...t) => (t.forEach((
|
|
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 ===
|
|
445
|
+
(r) => r === e.hostElement
|
|
424
446
|
)) {
|
|
425
|
-
const r =
|
|
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
|
|
431
|
-
return
|
|
452
|
+
const e = this.hostElement;
|
|
453
|
+
return e ? (ct(e, t), this) : this;
|
|
432
454
|
});
|
|
433
455
|
f(this, "setHtmlContent", (t) => {
|
|
434
|
-
const
|
|
435
|
-
return
|
|
456
|
+
const e = this.hostElement;
|
|
457
|
+
return e ? (yt(e, t), this) : this;
|
|
436
458
|
});
|
|
437
|
-
f(this, "setAttribute", (t,
|
|
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
|
|
443
|
-
if (
|
|
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
|
|
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] =
|
|
475
|
+
c in n && (n[c] = e);
|
|
454
476
|
}
|
|
455
477
|
return this;
|
|
456
478
|
});
|
|
457
|
-
f(this, "setCustomAttribute", (t,
|
|
479
|
+
f(this, "setCustomAttribute", (t, e) => {
|
|
458
480
|
var o;
|
|
459
481
|
let n;
|
|
460
|
-
return typeof
|
|
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,
|
|
463
|
-
n.setAttribute(t,
|
|
484
|
+
f(this, "setReactiveAttribute", (t, e) => (this.addEffect((n) => {
|
|
485
|
+
n.setAttribute(t, e());
|
|
464
486
|
}, t), this));
|
|
465
|
-
f(this, "setReactiveCustomAttribute", (t,
|
|
466
|
-
n.setCustomAttribute(t,
|
|
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
|
|
470
|
-
return (
|
|
491
|
+
var e;
|
|
492
|
+
return (e = this.hostElement) == null || e.removeAttribute(V(t)), this;
|
|
471
493
|
});
|
|
472
494
|
f(this, "addStyle", (t) => {
|
|
473
|
-
const
|
|
474
|
-
return
|
|
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
|
-
|
|
501
|
+
e.style.setProperty(n, c);
|
|
480
502
|
} else
|
|
481
|
-
|
|
482
|
-
}) : typeof o == "string" && (r ?
|
|
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,
|
|
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((
|
|
512
|
+
f(this, "addClass", (...t) => (t.forEach((e) => {
|
|
491
513
|
var n;
|
|
492
|
-
typeof
|
|
493
|
-
...
|
|
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 =
|
|
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
|
|
505
|
-
return (n = this.hostElement) == null || n.classList.remove(...((
|
|
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((
|
|
529
|
+
f(this, "addReactiveClass", (t) => (Object.keys(t).forEach((e) => {
|
|
508
530
|
this.addEffect((n) => {
|
|
509
|
-
t[
|
|
531
|
+
t[e]() ? n.addClass(e) : n.removeClass(e);
|
|
510
532
|
});
|
|
511
533
|
}), this));
|
|
512
534
|
f(this, "removeClass", (...t) => {
|
|
513
|
-
var
|
|
514
|
-
return (
|
|
535
|
+
var e;
|
|
536
|
+
return (e = this.hostElement) == null || e.classList.remove(...t), this;
|
|
515
537
|
});
|
|
516
|
-
f(this, "replaceClass", (t,
|
|
538
|
+
f(this, "replaceClass", (t, e) => {
|
|
517
539
|
var n;
|
|
518
|
-
return (n = this.hostElement) == null || n.classList.replace(t,
|
|
540
|
+
return (n = this.hostElement) == null || n.classList.replace(t, e), this;
|
|
519
541
|
});
|
|
520
|
-
f(this, "addEffect", (t,
|
|
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 (
|
|
526
|
-
const i = (r = this.keyedEffects.get(
|
|
527
|
-
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: (
|
|
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
|
|
533
|
-
return (
|
|
554
|
+
var e;
|
|
555
|
+
return (e = this.hostElement) == null || e.appendChild(tt(t)), this;
|
|
534
556
|
});
|
|
535
557
|
f(this, "setReactiveContent", (t) => {
|
|
536
|
-
var
|
|
537
|
-
return this.clear(), (
|
|
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
|
|
545
|
-
|
|
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,
|
|
572
|
+
addEventlistener(t, e, n = !1) {
|
|
551
573
|
var o;
|
|
552
|
-
return (o = this.hostElement) == null || o.addEventListener(
|
|
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
|
|
581
|
+
class wt extends it {
|
|
556
582
|
constructor() {
|
|
557
583
|
super(...arguments);
|
|
558
|
-
f(this, "setReactiveValue", (
|
|
559
|
-
f(this, "setSlotTemplate", (
|
|
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(
|
|
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
|
|
569
|
-
},
|
|
570
|
-
classList: [...
|
|
571
|
-
}),
|
|
572
|
-
if (!t || !
|
|
573
|
-
const
|
|
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
|
-
|
|
602
|
+
e.filter((o) => o.startsWith(".")).forEach((o) => {
|
|
577
603
|
t != null && t.attributes || (t.attributes = {}), t.attributes[o.slice(1)] = t[o];
|
|
578
|
-
}),
|
|
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
|
-
}),
|
|
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 =
|
|
611
|
+
const n = s.deref();
|
|
586
612
|
if (n)
|
|
587
|
-
return
|
|
588
|
-
},
|
|
589
|
-
t && Object.entries(t).forEach(([
|
|
590
|
-
typeof n == "function" &&
|
|
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
|
-
},
|
|
593
|
-
const
|
|
594
|
-
|
|
595
|
-
g(
|
|
596
|
-
|
|
597
|
-
}) :
|
|
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
|
-
},
|
|
600
|
-
const
|
|
601
|
-
r && (g(r) ?
|
|
602
|
-
|
|
603
|
-
}) :
|
|
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
|
-
|
|
606
|
-
n(o,
|
|
631
|
+
e && Object.keys(e).forEach((o) => {
|
|
632
|
+
n(o, e[o]);
|
|
607
633
|
});
|
|
608
|
-
},
|
|
609
|
-
const
|
|
610
|
-
if (
|
|
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 &&
|
|
613
|
-
}),
|
|
614
|
-
}, W = (
|
|
615
|
-
const
|
|
616
|
-
return
|
|
617
|
-
},
|
|
618
|
-
const [
|
|
619
|
-
return n.length > 0 && o.addClass(...n), (...r) =>
|
|
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) ?
|
|
648
|
+
(c) => typeof c == "function" && !g(c) ? M(() => c(o)) : c
|
|
623
649
|
)
|
|
624
650
|
) ?? o;
|
|
625
|
-
},
|
|
651
|
+
}, M = (s) => {
|
|
626
652
|
const t = `getSignalContent_${Math.random().toString(36).substring(2, 15)}`;
|
|
627
|
-
return W("div").addStyle({ display: "contents" }).addEffect((
|
|
628
|
-
|
|
653
|
+
return W("div").addStyle({ display: "contents" }).addEffect((e) => {
|
|
654
|
+
e.clear(), D(new WeakRef(e), ...[s()].flat());
|
|
629
655
|
}, t);
|
|
630
|
-
},
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
695
|
+
j(Math.random().toString(36).substring(2, 15))
|
|
670
696
|
), r.set(
|
|
671
697
|
E,
|
|
672
|
-
() =>
|
|
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
|
-
() =>
|
|
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
|
|
711
|
+
var X;
|
|
686
712
|
E();
|
|
687
|
-
const A = m(b), $ = (
|
|
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
|
-
},
|
|
710
|
-
let t = [W("div")],
|
|
735
|
+
}, te = (s) => {
|
|
736
|
+
let t = [W("div")], e = !1;
|
|
711
737
|
return w(() => {
|
|
712
738
|
var r, c;
|
|
713
|
-
const n =
|
|
714
|
-
|
|
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
|
-
}),
|
|
740
|
-
},
|
|
741
|
-
const t =
|
|
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
|
|
746
|
-
s(
|
|
771
|
+
return typeof s == "string" ? e(s) : t.addEffect(() => {
|
|
772
|
+
e(s());
|
|
747
773
|
}), t;
|
|
748
|
-
},
|
|
749
|
-
if (typeof
|
|
750
|
-
n.style.display =
|
|
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 =
|
|
778
|
+
const o = s() ? "block" : "none";
|
|
753
779
|
n.style.display = o;
|
|
754
780
|
}
|
|
755
|
-
}),
|
|
781
|
+
}), oe = (s, t, e) => {
|
|
756
782
|
const n = [
|
|
757
|
-
|
|
783
|
+
st(s, t)
|
|
758
784
|
].flat();
|
|
759
|
-
return
|
|
785
|
+
return e && n.push(
|
|
760
786
|
...[
|
|
761
|
-
|
|
762
|
-
() => typeof
|
|
763
|
-
|
|
787
|
+
st(
|
|
788
|
+
() => typeof s == "boolean" ? !s : !s(),
|
|
789
|
+
e
|
|
764
790
|
)
|
|
765
791
|
].flat()
|
|
766
|
-
),
|
|
767
|
-
},
|
|
768
|
-
S("createCustomElement",
|
|
769
|
-
const
|
|
770
|
-
return
|
|
771
|
-
|
|
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
|
-
},
|
|
774
|
-
const
|
|
775
|
-
return Array.isArray(
|
|
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) ?
|
|
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(
|
|
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
|
-
|
|
813
|
+
D(new WeakRef(n), ...r);
|
|
788
814
|
}), n;
|
|
789
815
|
};
|
|
790
|
-
},
|
|
791
|
-
`${
|
|
792
|
-
F(t) ? t : t && typeof t == "string" ?
|
|
793
|
-
),
|
|
794
|
-
const
|
|
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
|
|
797
|
-
},
|
|
798
|
-
const n = t ?
|
|
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),
|
|
827
|
+
return o && !F(o) && c.unshift(o), xt(n, F(o) ? o : {})(...c);
|
|
802
828
|
};
|
|
803
|
-
},
|
|
804
|
-
|
|
805
|
-
(t,
|
|
806
|
-
|
|
829
|
+
}, ie = (s) => [
|
|
830
|
+
Ht(s),
|
|
831
|
+
(t, e) => {
|
|
832
|
+
ot(t, e)(s);
|
|
807
833
|
}
|
|
808
|
-
], l = {},
|
|
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
|
-
|
|
871
|
-
l[
|
|
872
|
-
let n = [...
|
|
873
|
-
return t && !F(t) && (n = [t].concat(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
|
|
877
|
-
function
|
|
878
|
-
let
|
|
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 -
|
|
907
|
+
o - e >= t && (s(...n), e = o);
|
|
882
908
|
};
|
|
883
909
|
}
|
|
884
|
-
const
|
|
885
|
-
const
|
|
910
|
+
const ps = (s, t) => M(() => {
|
|
911
|
+
const e = s();
|
|
886
912
|
let n = null;
|
|
887
|
-
return
|
|
888
|
-
(o, r) =>
|
|
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":
|
|
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, [...
|
|
937
|
+
t(o, r, [...s.peek()])
|
|
912
938
|
)
|
|
913
939
|
);
|
|
914
|
-
}),
|
|
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 =
|
|
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
|
-
() =>
|
|
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: () =>
|
|
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
|
-
|
|
944
|
-
templateFunc: () =>
|
|
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
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
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
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
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
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
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
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
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
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
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
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
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
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
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
|
};
|