@popcorn245/cornfield-components 0.48.0 → 0.49.0

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,2192 +0,0 @@
1
- // \0rolldown/runtime.js
2
- var e = Object.defineProperty, t = (t, n) => {
3
- let r = {};
4
- for (var i in t) e(r, i, {
5
- get: t[i],
6
- enumerable: !0
7
- });
8
- return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
- }, n = {
10
- allRenderFn: !1,
11
- element: !0,
12
- event: !0,
13
- hasRenderFn: !0,
14
- hostListener: !0,
15
- hostListenerTargetWindow: !0,
16
- hostListenerTargetDocument: !0,
17
- hostListenerTargetBody: !0,
18
- hostListenerTarget: !0,
19
- member: !0,
20
- method: !0,
21
- mode: !0,
22
- observeAttribute: !0,
23
- prop: !0,
24
- propMutable: !0,
25
- reflect: !0,
26
- scoped: !0,
27
- shadowDom: !0,
28
- shadowModeClosed: !1,
29
- slot: !0,
30
- cssAnnotations: !0,
31
- state: !0,
32
- style: !0,
33
- formAssociated: !0,
34
- svg: !0,
35
- updatable: !0,
36
- vdomAttribute: !0,
37
- vdomXlink: !0,
38
- vdomClass: !0,
39
- vdomFunctional: !0,
40
- vdomKey: !0,
41
- vdomListener: !0,
42
- vdomRef: !0,
43
- vdomPropOrAttr: !0,
44
- vdomPropOrAttrPrefix: !0,
45
- vdomRender: !0,
46
- vdomStyle: !0,
47
- vdomText: !0,
48
- propChangeCallback: !0,
49
- taskQueue: !0,
50
- lifecycle: !0,
51
- serializer: !0,
52
- deserializer: !0,
53
- patchAll: !0,
54
- patchChildren: !0,
55
- patchClone: !0,
56
- patchInsert: !0,
57
- hotModuleReplacement: !1,
58
- isDebug: !1,
59
- isDev: !1,
60
- isTesting: !1,
61
- hydrateServerSide: !1,
62
- hydrateClientSide: !0,
63
- lifecycleDOMEvents: !1,
64
- lazyLoad: !1,
65
- profile: !1,
66
- slotRelocation: !0,
67
- lightDomPatches: !0,
68
- slotChildNodes: !0,
69
- slotCloneNode: !0,
70
- slotDomMutations: !0,
71
- slotTextContent: !0,
72
- hydratedAttribute: !1,
73
- hydratedClass: !0,
74
- invisiblePrehydration: !0,
75
- staticHydrationStyles: !1,
76
- propBoolean: !0,
77
- propNumber: !0,
78
- propString: !0,
79
- constructableCSS: !0,
80
- devTools: !1,
81
- shadowDelegatesFocus: !0,
82
- shadowSlotAssignmentManual: !1,
83
- shadowClonable: !0,
84
- shadowSerializable: !0,
85
- initializeNextTick: !1,
86
- asyncLoading: !0,
87
- asyncQueue: !1
88
- }, r = /* @__PURE__ */ t({
89
- Computed: () => S,
90
- Effect: () => C,
91
- Signal: () => v,
92
- action: () => oe,
93
- batch: () => o,
94
- computed: () => te,
95
- createModel: () => le,
96
- effect: () => ae,
97
- signal: () => y,
98
- untracked: () => l
99
- }), i = Symbol.for("preact-signals");
100
- function a() {
101
- if (d > 1) d--;
102
- else {
103
- var e, t = !1;
104
- for ((function() {
105
- var e = h;
106
- for (h = void 0; e !== void 0;) {
107
- var t = e.S;
108
- if (t.v === e.v) for (var n = t.t; n !== void 0; n = n.x) n.i === e.i && (n.i = t.i);
109
- e = e.o;
110
- }
111
- })(); u !== void 0;) {
112
- var n = u;
113
- for (u = void 0, f++; n !== void 0;) {
114
- var r = n.u;
115
- if (n.u = void 0, n.f &= -3, !(8 & n.f) && b(n)) try {
116
- n.c();
117
- } catch (n) {
118
- t ||= (e = n, !0);
119
- }
120
- n = r;
121
- }
122
- }
123
- if (f = 0, d--, t) throw e;
124
- }
125
- }
126
- function o(e) {
127
- if (d > 0) return e();
128
- m = ++p, d++;
129
- try {
130
- return e();
131
- } finally {
132
- a();
133
- }
134
- }
135
- var s, c = void 0;
136
- function l(e) {
137
- var t = c, n = s;
138
- c = void 0, s = void 0;
139
- try {
140
- return e();
141
- } finally {
142
- c = t, s = n;
143
- }
144
- }
145
- var u = void 0, d = 0, f = 0, p = 0, m = 0, h = void 0, g = 0;
146
- function _(e) {
147
- if (c !== void 0) {
148
- var t = e.n;
149
- if (t === void 0 || t.t !== c) return t = {
150
- i: 0,
151
- S: e,
152
- p: c.s,
153
- n: void 0,
154
- t: c,
155
- e: void 0,
156
- x: void 0,
157
- r: t
158
- }, c.s !== void 0 && (c.s.n = t), c.s = t, e.n = t, 32 & c.f && e.S(t), t;
159
- if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = c.s, t.n = void 0, c.s.n = t, c.s = t), t;
160
- }
161
- }
162
- function v(e, t) {
163
- this.v = e, this.i = 0, this.n = void 0, this.t = void 0, this.l = 0, this.W = t?.watched, this.Z = t?.unwatched, this.name = t?.name;
164
- }
165
- v.prototype.brand = i, v.prototype.h = function() {
166
- return !0;
167
- }, v.prototype.S = function(e) {
168
- var t = this, n = this.t;
169
- n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? l(function() {
170
- var e;
171
- (e = t.W) == null || e.call(t);
172
- }) : n.e = e);
173
- }, v.prototype.U = function(e) {
174
- var t = this;
175
- if (this.t !== void 0) {
176
- var n = e.e, r = e.x;
177
- n !== void 0 && (n.x = r, e.e = void 0), r !== void 0 && (r.e = n, e.x = void 0), e === this.t && (this.t = r, r === void 0 && l(function() {
178
- var e;
179
- (e = t.Z) == null || e.call(t);
180
- }));
181
- }
182
- }, v.prototype.subscribe = function(e) {
183
- var t = this;
184
- return ae(function() {
185
- var n = t.value;
186
- l(function() {
187
- return e(n);
188
- });
189
- }, { name: "sub" });
190
- }, v.prototype.valueOf = function() {
191
- return this.value;
192
- }, v.prototype.toString = function() {
193
- return this.value + "";
194
- }, v.prototype.toJSON = function() {
195
- return this.value;
196
- }, v.prototype.peek = function() {
197
- var e = this;
198
- return l(function() {
199
- return e.value;
200
- });
201
- }, Object.defineProperty(v.prototype, "value", {
202
- get: function() {
203
- var e = _(this);
204
- return e !== void 0 && (e.i = this.i), this.v;
205
- },
206
- set: function(e) {
207
- if (e !== this.v) {
208
- if (f > 100) throw Error("Cycle detected");
209
- (function(e) {
210
- d !== 0 && f === 0 && e.l !== m && (e.l = m, h = {
211
- S: e,
212
- v: e.v,
213
- i: e.i,
214
- o: h
215
- });
216
- })(this), this.v = e, this.i++, g++, d++;
217
- try {
218
- for (var t = this.t; t !== void 0; t = t.x) t.t.N();
219
- } finally {
220
- a();
221
- }
222
- }
223
- }
224
- });
225
- function y(e, t) {
226
- return new v(e, t);
227
- }
228
- function b(e) {
229
- for (var t = e.s; t !== void 0; t = t.n) if (t.S.i !== t.i || !t.S.h() || t.S.i !== t.i) return !0;
230
- return !1;
231
- }
232
- function ee(e) {
233
- for (var t = e.s; t !== void 0; t = t.n) {
234
- var n = t.S.n;
235
- if (n !== void 0 && (t.r = n), t.S.n = t, t.i = -1, t.n === void 0) {
236
- e.s = t;
237
- break;
238
- }
239
- }
240
- }
241
- function x(e) {
242
- for (var t = e.s, n = void 0; t !== void 0;) {
243
- var r = t.p;
244
- t.i === -1 ? (t.S.U(t), r !== void 0 && (r.n = t.n), t.n !== void 0 && (t.n.p = r)) : n = t, t.S.n = t.r, t.r !== void 0 && (t.r = void 0), t = r;
245
- }
246
- e.s = n;
247
- }
248
- function S(e, t) {
249
- v.call(this, void 0, t), this.x = e, this.s = void 0, this.g = g - 1, this.f = 4;
250
- }
251
- S.prototype = new v(), S.prototype.h = function() {
252
- if (this.f &= -3, 1 & this.f) return !1;
253
- if ((36 & this.f) == 32 || (this.f &= -5, this.g === g)) return !0;
254
- if (this.g = g, this.f |= 1, this.i > 0 && !b(this)) return this.f &= -2, !0;
255
- var e = c;
256
- try {
257
- ee(this), c = this;
258
- var t = this.x();
259
- (16 & this.f || this.v !== t || this.i === 0) && (this.v = t, this.f &= -17, this.i++);
260
- } catch (e) {
261
- this.v = e, this.f |= 16, this.i++;
262
- }
263
- return c = e, x(this), this.f &= -2, !0;
264
- }, S.prototype.S = function(e) {
265
- if (this.t === void 0) {
266
- this.f |= 36;
267
- for (var t = this.s; t !== void 0; t = t.n) t.S.S(t);
268
- }
269
- v.prototype.S.call(this, e);
270
- }, S.prototype.U = function(e) {
271
- if (this.t !== void 0 && (v.prototype.U.call(this, e), this.t === void 0)) {
272
- this.f &= -33;
273
- for (var t = this.s; t !== void 0; t = t.n) t.S.U(t);
274
- }
275
- }, S.prototype.N = function() {
276
- if (!(2 & this.f)) {
277
- this.f |= 6;
278
- for (var e = this.t; e !== void 0; e = e.x) e.t.N();
279
- }
280
- }, Object.defineProperty(S.prototype, "value", { get: function() {
281
- if (1 & this.f) throw Error("Cycle detected");
282
- var e = _(this);
283
- if (this.h(), e !== void 0 && (e.i = this.i), 16 & this.f) throw this.v;
284
- return this.v;
285
- } });
286
- function te(e, t) {
287
- return new S(e, t);
288
- }
289
- function ne(e) {
290
- var t = e.j;
291
- if (e.j = void 0, typeof t == "function") {
292
- d++;
293
- var n = c;
294
- c = void 0;
295
- try {
296
- t();
297
- } catch (t) {
298
- throw e.f &= -2, e.f |= 8, re(e), t;
299
- } finally {
300
- c = n, a();
301
- }
302
- }
303
- }
304
- function re(e) {
305
- for (var t = e.s; t !== void 0; t = t.n) t.S.U(t);
306
- e.x = void 0, e.s = void 0, ne(e);
307
- }
308
- function ie(e) {
309
- if (c !== this) throw Error("Out-of-order effect");
310
- x(this), c = e, this.f &= -2;
311
- try {
312
- 8 & this.f && re(this);
313
- } finally {
314
- a();
315
- }
316
- }
317
- function C(e, t) {
318
- this.x = e, this.j = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, s && s.push(this);
319
- }
320
- C.prototype.c = function() {
321
- var e = this.S();
322
- try {
323
- if (8 & this.f || this.x === void 0) return;
324
- var t = this.x();
325
- typeof t == "function" && (this.j = t);
326
- } finally {
327
- e();
328
- }
329
- }, C.prototype.S = function() {
330
- if (1 & this.f) throw Error("Cycle detected");
331
- this.f |= 1, this.f &= -9, ne(this), ee(this), d++;
332
- var e = c;
333
- return c = this, ie.bind(this, e);
334
- }, C.prototype.N = function() {
335
- 2 & this.f || (this.f |= 2, this.u = u, u = this);
336
- }, C.prototype.d = function() {
337
- this.f |= 8, 1 & this.f || re(this);
338
- }, C.prototype.dispose = function() {
339
- this.d();
340
- };
341
- function ae(e, t) {
342
- var n = new C(e, t);
343
- try {
344
- n.c();
345
- } catch (e) {
346
- throw n.d(), e;
347
- }
348
- var r = n.d.bind(n);
349
- return r[Symbol.dispose] = r, r;
350
- }
351
- function oe(e) {
352
- return function() {
353
- var t = arguments, n = this;
354
- return o(function() {
355
- return l(function() {
356
- return e.apply(n, [].slice.call(t));
357
- });
358
- });
359
- };
360
- }
361
- function se() {
362
- var e = s;
363
- return s = [], function() {
364
- var t = s;
365
- return s && e && (e = e.concat(s)), s = e, t;
366
- };
367
- }
368
- var ce = function(e, t) {
369
- t.push(e);
370
- for (var n = Object.prototype.toString.call(e) === "[object Object]", r = Object.create(null), i = e; i && i !== Object.prototype; i = n && Object.getPrototypeOf(i)) {
371
- var a = Object.getOwnPropertyDescriptors(i);
372
- for (var o in a) if (!r[o]) {
373
- r[o] = !0;
374
- var s = a[o].value;
375
- typeof s == "function" ? o !== "constructor" && (e[o] = oe(s)) : i === e && typeof s == "object" && s && !("brand" in s) && t.indexOf(s) < 0 && ce(s, t);
376
- }
377
- }
378
- };
379
- function le(e) {
380
- return function() {
381
- var t, n, r = se();
382
- try {
383
- n = e.apply(void 0, [].slice.call(arguments));
384
- } catch (e) {
385
- var i = s;
386
- if (s = void 0, i) try {
387
- o(function() {
388
- for (var e = 0; e < i.length; e++) try {
389
- i[e].dispose();
390
- } catch {}
391
- });
392
- } catch {}
393
- throw e;
394
- } finally {
395
- t = r();
396
- }
397
- return ce(n, []), n[Symbol.dispose] = oe(function() {
398
- if (t) for (var e = 0; e < t.length; e++) t[e].dispose();
399
- t = void 0;
400
- }), n;
401
- };
402
- }
403
- // node_modules/@stencil/core/dist/runtime/client/runtime.js
404
- var w = {
405
- isSlotReference: 1,
406
- isSlotFallback: 2,
407
- isHost: 4
408
- }, T = {
409
- isElementConstructor: 1,
410
- proxyState: 2
411
- }, E = {
412
- isTmpDisconnected: 1,
413
- appLoaded: 2,
414
- queueSync: 4,
415
- queueMask: 6
416
- }, D = {
417
- ElementNode: 1,
418
- TextNode: 3,
419
- CommentNode: 8,
420
- DocumentNode: 9,
421
- DocumentTypeNode: 10,
422
- DocumentFragment: 11
423
- }, ue = "s-id", de = "sty-id", fe = "c-id", pe = "slot-fb{display:contents}slot-fb[hidden]{display:none}", me = "http://www.w3.org/1999/xlink", he = 1e3, ge = [
424
- "formAssociatedCallback",
425
- "formResetCallback",
426
- "formDisabledCallback",
427
- "formStateRestoreCallback"
428
- ], _e = {
429
- isBrowser: !0,
430
- isServer: !1,
431
- isDev: n.isDev,
432
- isTesting: n.isTesting
433
- }, O = {
434
- String: 1,
435
- Number: 2,
436
- Boolean: 4,
437
- Any: 8,
438
- Unknown: 16,
439
- State: 32,
440
- Method: 64,
441
- Event: 128,
442
- Element: 256,
443
- ReflectAttr: 512,
444
- Mutable: 1024,
445
- Getter: 2048,
446
- Setter: 4096,
447
- Prop: 31,
448
- HasAttribute: 31,
449
- PropLike: 63
450
- }, ve = { Immediate: 1 }, ye = {
451
- Cancellable: 1,
452
- Composed: 2,
453
- Bubbles: 4
454
- }, k = {
455
- Passive: 1,
456
- Capture: 2,
457
- TargetDocument: 4,
458
- TargetWindow: 8,
459
- TargetBody: 16
460
- }, A = {
461
- hasConnected: 1,
462
- hasRendered: 2,
463
- isWaitingForChildren: 4,
464
- isConstructingInstance: 8,
465
- isQueuedForUpdate: 16,
466
- hasInitializedComponent: 32,
467
- hasLoadedComponent: 64,
468
- isWatchReady: 128,
469
- isListenReady: 256,
470
- needsRerender: 512,
471
- hasFiredConnected: 1024,
472
- hasFailedLoad: 2048,
473
- devOnRender: 4096,
474
- devOnDidLoad: 8192
475
- }, be = 2, j = {
476
- shadowDomEncapsulation: 1,
477
- scopedCssEncapsulation: be,
478
- hasSlotRelocation: 4,
479
- shadowDelegatesFocus: 16,
480
- hasMode: 32,
481
- needsScopedEncapsulation: be,
482
- formAssociated: 64,
483
- shadowNeedsScopedCss: 128,
484
- hasSlot: 256,
485
- hasModernPropertyDecls: 512,
486
- shadowSlotAssignmentManual: 1024,
487
- shadowModeClosed: 2048,
488
- patchChildren: 4096,
489
- patchClone: 8192,
490
- patchInsert: 16384,
491
- patchAll: 32768,
492
- shadowClonable: 65536,
493
- shadowSerializable: 1 << 17
494
- }, xe = "http://www.w3.org/2000/svg", Se = {
495
- ELEMENT_NODE: 1,
496
- ATTRIBUTE_NODE: 2,
497
- TEXT_NODE: 3,
498
- CDATA_SECTION_NODE: 4,
499
- ENTITY_REFERENCE_NODE: 5,
500
- ENTITY_NODE: 6,
501
- PROCESSING_INSTRUCTION_NODE: 7,
502
- COMMENT_NODE: 8,
503
- DOCUMENT_NODE: 9,
504
- DOCUMENT_TYPE_NODE: 10,
505
- DOCUMENT_FRAGMENT_NODE: 11,
506
- NOTATION_NODE: 12
507
- };
508
- function Ce(e, t, n) {
509
- let r = typeof HTMLElement < "u" ? HTMLElement.prototype : null;
510
- for (; e && e !== r;) {
511
- let r = Object.getOwnPropertyDescriptor(e, t);
512
- if (r && (!n || r.get)) return r;
513
- e = Object.getPrototypeOf(e);
514
- }
515
- }
516
- var we = (e, t) => {
517
- let r = t.$cmpMeta$;
518
- Object.entries(r.$members$ ?? {}).map(([r, [i]]) => {
519
- if ((n.state || n.prop) && (i & O.Prop || i & O.State)) {
520
- let n = e[r], i = Ce(Object.getPrototypeOf(e), r, !0) || Object.getOwnPropertyDescriptor(e, r);
521
- i && Object.defineProperty(e, r, {
522
- get() {
523
- return i.get.call(this);
524
- },
525
- set(e) {
526
- i.set.call(this, e);
527
- },
528
- configurable: !0,
529
- enumerable: !0
530
- }), t.$instanceValues$.has(r) ? e[r] = t.$instanceValues$.get(r) : n !== void 0 && e[r] !== n && (e[r] = n);
531
- }
532
- });
533
- }, M = (e) => {
534
- if (e.__s_ghr) return e.__s_ghr();
535
- }, Te = (e, t) => {
536
- let r = {
537
- $flags$: 0,
538
- $hostElement$: e,
539
- $cmpMeta$: t,
540
- $instanceValues$: /* @__PURE__ */ new Map(),
541
- $serializerValues$: /* @__PURE__ */ new Map()
542
- };
543
- n.isDev && (r.$renderCount$ = 0), n.method && n.lazyLoad && (r.$onInstancePromise$ = new Promise((e) => r.$onInstanceResolve$ = e)), n.asyncLoading && (r.$onReadyPromise$ = new Promise((e) => r.$onReadyResolve$ = e), e["s-rp"] = r.$onReadyPromise$, n.lazyLoad || (r.$onFirstConnectPromise$ = new Promise((e) => r.$onFirstConnectResolve$ = e), e["s-fc"] = r.$onFirstConnectPromise$), e["s-p"] ||= [], e["s-rc"] ||= [], e["s-pc"] ||= []), n.lazyLoad && (r.$fetchedCbList$ = []);
544
- let i = r;
545
- return e.__s_ghr = () => i, !n.lazyLoad && t.$flags$ & j.hasModernPropertyDecls && (n.state || n.prop) && we(e, r), i;
546
- }, Ee = (e, t) => t in e, N = (e, t) => (0, console.error)(e, t), De = n.isTesting ? ["STENCIL:"] : ["%cstencil", "color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"], Oe = (...e) => console.error(...De, ...e), P = (...e) => console.warn(...De, ...e), ke = /*@__PURE__*/ new Map(), Ae = /*@__PURE__*/ new Map(), je = "./", Me = (e, t, r) => {
547
- let i = e.$tagName$.replace(/-/g, "_"), a = e.$lazyBundleId$;
548
- if (n.isDev && typeof a != "string") {
549
- Oe(`Trying to lazily load component <${e.$tagName$}> with style mode "${t.$modeName$}", but it does not exist.`);
550
- return;
551
- }
552
- if (!a) return;
553
- let o = !n.hotModuleReplacement && ke.get(a);
554
- if (o) return o[i];
555
- let s = Ae.get(a) ?? 0, c = [s > 0 ? `s-retry=${s}` : "", n.hotModuleReplacement && r ? `s-hmr=${r}` : ""].filter(Boolean).join("&");
556
- return import(
557
- /* @vite-ignore */
558
- /* webpackInclude: /\.entry\.js$/ */
559
- /* webpackExclude: /\.system\.entry\.js$/ */
560
- /* webpackMode: "lazy" */
561
- `${je}${`${a}.entry.js${c ? "?" + c : ""}`}`
562
- ).then((e) => (n.hotModuleReplacement || (Ae.delete(a), ke.set(a, e)), e[i]), (e) => {
563
- Ae.set(a, s + 1), N(e, t.$hostElement$);
564
- });
565
- }, F = /*@__PURE__*/ new Map(), Ne = [], Pe = () => !1, I = typeof window < "u" ? window : {}, Fe = I.HTMLElement || class {}, L = {
566
- $flags$: 0,
567
- $resourcesUrl$: "",
568
- jmp: (e) => e(),
569
- raf: (e) => requestAnimationFrame(e),
570
- ael: (e, t, n, r) => e.addEventListener(t, n, r),
571
- rel: (e, t, n, r) => e.removeEventListener(t, n, r),
572
- ce: (e, t) => new CustomEvent(e, t)
573
- }, Ie = /*@__PURE__*/ (() => {
574
- let e = !1;
575
- try {
576
- I.document?.addEventListener("e", null, Object.defineProperty({}, "passive", { get() {
577
- e = !0;
578
- } }));
579
- } catch {}
580
- return e;
581
- })(), Le = (e) => Promise.resolve(e), Re = n.constructableCSS ? /*@__PURE__*/ (() => {
582
- try {
583
- return I.document.adoptedStyleSheets ? typeof new CSSStyleSheet().replaceSync == "function" : !1;
584
- } catch {}
585
- return !1;
586
- })() : !1, ze = Re ? !!I.document && Object.getOwnPropertyDescriptor(I.document.adoptedStyleSheets, "length").writable : !1, Be = 0, Ve = !1, He = [], R = [], Ue = [], We = () => I.document?.hidden ? setTimeout(Je, 16) : L.raf(Je), Ge = (e, t) => (n) => {
587
- e.push(n), Ve || (Ve = !0, t && L.$flags$ & E.queueSync ? Ye(Je) : We());
588
- }, Ke = (e) => {
589
- for (let t = 0; t < e.length; t++) try {
590
- e[t](performance.now());
591
- } catch (e) {
592
- N(e);
593
- }
594
- e.length = 0;
595
- }, qe = (e, t) => {
596
- let n = 0, r = 0;
597
- for (; n < e.length && (r = performance.now()) < t;) try {
598
- e[n++](r);
599
- } catch (e) {
600
- N(e);
601
- }
602
- n === e.length ? e.length = 0 : n !== 0 && e.splice(0, n);
603
- }, Je = () => {
604
- if (n.asyncQueue && Be++, Ke(He), n.asyncQueue) {
605
- let e = (L.$flags$ & E.queueMask) === E.appLoaded ? performance.now() + 14 * Math.ceil(1 / 10 * Be) : Infinity;
606
- qe(R, e), qe(Ue, e), R.length > 0 && (Ue.push(...R), R.length = 0), (Ve = He.length + R.length + Ue.length > 0) ? We() : Be = 0;
607
- } else Ke(R), (Ve = He.length > 0) && We();
608
- }, Ye = (e) => Le().then(e), Xe = /*@__PURE__*/ Ge(R, !0);
609
- function Ze(e) {
610
- if (!e || !Re) return;
611
- let t = new CSSStyleSheet();
612
- return t.replaceSync(e), t;
613
- }
614
- var Qe;
615
- function $e(e) {
616
- let t = n.shadowModeClosed && !!(e.$flags$ & j.shadowModeClosed), r = { mode: t ? "closed" : "open" }, i = this.constructor._registry;
617
- i && (r.customElementRegistry = i), n.shadowDelegatesFocus && (r.delegatesFocus = !!(e.$flags$ & j.shadowDelegatesFocus)), n.shadowSlotAssignmentManual && e.$flags$ & j.shadowSlotAssignmentManual && (r.slotAssignment = "manual"), n.shadowClonable && (r.clonable = !!(e.$flags$ & j.shadowClonable)), n.shadowSerializable && (r.serializable = !!(e.$flags$ & j.shadowSerializable));
618
- let a = this.attachShadow(r);
619
- n.shadowModeClosed && t && (this.__shadowRoot = a), Qe === void 0 && (Qe = Ze("") ?? null), Qe && (ze ? a.adoptedStyleSheets.push(Qe) : a.adoptedStyleSheets = [...a.adoptedStyleSheets, Qe]);
620
- }
621
- var et = (e) => {
622
- let t = V(e, "childNodes");
623
- e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && nt(t, e.tagName).forEach((e) => {
624
- e.nodeType === D.ElementNode && e.tagName === "SLOT-FB" && (e.hidden = !!rt(e, z(e), !1).length);
625
- });
626
- let n = 0;
627
- for (n = 0; n < t.length; n++) {
628
- let e = t[n];
629
- e.nodeType === D.ElementNode && V(e, "childNodes").length && et(e);
630
- }
631
- }, tt = (e) => {
632
- let t = [];
633
- for (let n = 0; n < e.length; n++) {
634
- let r = e[n]["s-nr"] || void 0;
635
- r && r.isConnected && t.push(r);
636
- }
637
- return t;
638
- };
639
- function nt(e, t, n) {
640
- let r = 0, i = [], a;
641
- for (; r < e.length; r++) {
642
- if (a = e[r], a["s-sr"] && (!t || a["s-hn"] === t) && (n === void 0 || z(a) === n) && (i.push(a), n !== void 0)) return i;
643
- i = [...i, ...nt(V(a, "childNodes"), t, n)];
644
- }
645
- return i;
646
- }
647
- var rt = (e, t, n = !0) => {
648
- let r = [];
649
- (n && e["s-sr"] || !e["s-sr"]) && r.push(e);
650
- let i = e;
651
- for (; i = i.nextSibling;) z(i) === t && (n || !i["s-sr"]) && r.push(i);
652
- return r;
653
- }, it = (e, t) => e.nodeType === D.ElementNode ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : typeof e["s-sa"] == "string" ? e["s-sa"] === t : t === "", at = (e, t, r, i) => {
654
- if (e["s-ol"] && e["s-ol"].isConnected) return;
655
- let a = document.createTextNode("");
656
- if (a["s-nr"] = e, !t["s-cr"] || !t["s-cr"].parentNode) return;
657
- let o = t["s-cr"].parentNode, s = r ? V(o, "prepend") : V(o, "appendChild");
658
- if (n.hydrateClientSide && i !== void 0) {
659
- a["s-oo"] = i;
660
- let e = V(o, "childNodes"), t = [a];
661
- e.forEach((e) => {
662
- e["s-nr"] && t.push(e);
663
- }), t.sort((e, t) => !e["s-oo"] || e["s-oo"] < (t["s-oo"] || 0) ? -1 : +(!t["s-oo"] || t["s-oo"] < e["s-oo"])), t.forEach((e) => s.call(o, e));
664
- } else s.call(o, a);
665
- e["s-ol"] = a, e["s-sh"] = t["s-hn"];
666
- }, z = (e) => typeof e["s-sn"] == "string" ? e["s-sn"] : e.nodeType === 1 && e.getAttribute("slot") || void 0;
667
- function ot(e) {
668
- if (e.assignedElements || e.assignedNodes || !e["s-sr"]) return;
669
- let t = (t) => function(e) {
670
- let r = [], i = this["s-sn"];
671
- e?.flatten && (n.isDev ? console.error("Flattening is not supported for Stencil non-shadow slots. You can use `.childNodes` for nested slot fallback content.") : console.error("Flattening not supported for Stencil non-shadow slots"));
672
- let a = this["s-cr"].parentElement;
673
- return (a.__childNodes ? a.childNodes : tt(a.childNodes)).forEach((e) => {
674
- i === z(e) && r.push(e);
675
- }), t ? r.filter((e) => e.nodeType === D.ElementNode) : r;
676
- }.bind(e);
677
- e.assignedElements = t(!0), e.assignedNodes = t(!1);
678
- }
679
- function st(e) {
680
- e.name = e["s-sn"] || "", e.dispatchEvent(new CustomEvent("slotchange", {
681
- bubbles: !1,
682
- cancelable: !1,
683
- composed: !1
684
- }));
685
- }
686
- function ct(e, t) {
687
- if (t ||= e["s-ol"]?.parentElement, !t) return {
688
- slotNode: null,
689
- slotName: ""
690
- };
691
- let n = e["s-sn"] = z(e) || "";
692
- return {
693
- slotNode: nt(V(t, "childNodes"), t.tagName, n)[0],
694
- slotName: n
695
- };
696
- }
697
- var lt = (e) => {
698
- dt(e), mt(e), pt(e), ht(e), gt(e), _t(e), vt(e), ft(e);
699
- }, ut = (e) => {
700
- if (e.__cloneNode) return;
701
- let t = e.__cloneNode = e.cloneNode;
702
- e.cloneNode = function(e) {
703
- let r = this, i = n.shadowDom ? !!r.shadowRoot : !1, a = t.call(r, i ? e : !1);
704
- if (n.slot && !i && e) {
705
- let e = 0, t, n, r = [
706
- "s-id",
707
- "s-cr",
708
- "s-lr",
709
- "s-rc",
710
- "s-sc",
711
- "s-p",
712
- "s-cn",
713
- "s-sr",
714
- "s-sn",
715
- "s-hn",
716
- "s-ol",
717
- "s-nr",
718
- "s-si",
719
- "s-rf",
720
- "s-scs"
721
- ], i = this.__childNodes || this.childNodes;
722
- for (; e < i.length; e++) t = i[e]["s-nr"], n = r.every((t) => !i[e][t]), t && (a.__appendChild ? a.__appendChild(t.cloneNode(!0)) : a.appendChild(t.cloneNode(!0))), n && a.appendChild(i[e].cloneNode(!0));
723
- }
724
- return a;
725
- };
726
- }, dt = (e) => {
727
- e.__appendChild || (e.__appendChild = e.appendChild, e.appendChild = function(e) {
728
- let { slotName: t, slotNode: n } = ct(e, this);
729
- if (n) {
730
- at(e, n);
731
- let r = rt(n, t), i = r[r.length - 1], a = V(V(i, "parentNode"), "insertBefore")(e, i.nextSibling);
732
- return st(n), et(this), a;
733
- }
734
- return this.__appendChild(e);
735
- });
736
- }, ft = (e) => {
737
- e.__removeChild || (e.__removeChild = e.removeChild, e.removeChild = function(e) {
738
- if (e && e["s-sn"] !== void 0 && nt(this.__childNodes || this.childNodes, this.tagName, e["s-sn"]) && e.isConnected) e.remove(), et(this);
739
- else return this.__removeChild(e);
740
- });
741
- }, pt = (e) => {
742
- e.__prepend || (e.__prepend = e.prepend, e.prepend = function(...t) {
743
- t.forEach((t) => {
744
- typeof t == "string" && (t = this.ownerDocument.createTextNode(t));
745
- let n = (t["s-sn"] = z(t)) || "", r = nt(V(this, "childNodes"), this.tagName, n)[0];
746
- if (r) {
747
- at(t, r, !0);
748
- let e = rt(r, n)[0], i = V(V(e, "parentNode"), "insertBefore")(t, V(e, "nextSibling"));
749
- return st(r), i;
750
- }
751
- return t.nodeType === 1 && t.getAttribute("slot") && (t.hidden = !0), e.__prepend(t);
752
- });
753
- });
754
- }, mt = (e) => {
755
- e.__append || (e.__append = e.append, e.append = function(...e) {
756
- e.forEach((e) => {
757
- typeof e == "string" && (e = this.ownerDocument.createTextNode(e)), this.appendChild(e);
758
- });
759
- });
760
- }, ht = (e) => {
761
- if (e.__insertAdjacentHTML) return;
762
- let t = e.insertAdjacentHTML;
763
- e.insertAdjacentHTML = function(e, n) {
764
- if (e !== "afterbegin" && e !== "beforeend") return t.call(this, e, n);
765
- let r = this.ownerDocument.createElement("_"), i;
766
- if (r.innerHTML = n, e === "afterbegin") for (; i = r.firstChild;) this.prepend(i);
767
- else if (e === "beforeend") for (; i = r.firstChild;) this.append(i);
768
- };
769
- }, gt = (e) => {
770
- if (e.__insertBefore) return;
771
- let t = e;
772
- t.__insertBefore || (t.__insertBefore = e.insertBefore, e.insertBefore = function(e, t) {
773
- let { slotName: n, slotNode: r } = ct(e, this), i = this.__childNodes ? this.childNodes : tt(this.childNodes);
774
- if (r) {
775
- let a = !1;
776
- if (i.forEach((i) => {
777
- if (i === t || t === null) {
778
- if (a = !0, t === null || n !== t["s-sn"]) {
779
- this.appendChild(e);
780
- return;
781
- }
782
- n === t["s-sn"] && (at(e, r), V(V(t, "parentNode"), "insertBefore")(e, t), st(r));
783
- }
784
- }), a) return e;
785
- }
786
- let a = t?.__parentNode;
787
- return a && !this.isSameNode(a) ? this.appendChild(e) : this.__insertBefore(e, t);
788
- });
789
- }, _t = (e) => {
790
- B("textContent", e), Object.defineProperty(e, "textContent", {
791
- get: function() {
792
- let e = "";
793
- return (this.__childNodes ? this.childNodes : tt(this.childNodes)).forEach((t) => e += t.textContent || ""), e;
794
- },
795
- set: function(e) {
796
- (this.__childNodes ? this.childNodes : tt(this.childNodes)).forEach((e) => {
797
- e["s-ol"] && e["s-ol"].remove(), e.remove();
798
- }), this.insertAdjacentHTML("beforeend", e);
799
- }
800
- });
801
- }, vt = (e) => {
802
- class t extends Array {
803
- item(e) {
804
- return this[e];
805
- }
806
- }
807
- B("children", e), Object.defineProperty(e, "children", { get() {
808
- return this.childNodes.filter((e) => e.nodeType === 1);
809
- } }), Object.defineProperty(e, "childElementCount", { get() {
810
- return this.children.length;
811
- } }), B("firstChild", e), Object.defineProperty(e, "firstChild", { get() {
812
- return this.childNodes[0] || null;
813
- } }), B("lastChild", e), Object.defineProperty(e, "lastChild", { get() {
814
- return this.childNodes[this.childNodes.length - 1] || null;
815
- } }), B("childNodes", e), Object.defineProperty(e, "childNodes", { get() {
816
- let e = new t();
817
- return this["s-cr"] ? (e.push(...tt(this.__childNodes)), e) : (e.push(...Array.from(this.__childNodes)), e);
818
- } });
819
- }, yt = (e) => {
820
- e && e.__nextSibling === void 0 && globalThis.Node && (bt(e), St(e), wt(e), e.nodeType === Node.ELEMENT_NODE && (xt(e), Ct(e)));
821
- }, bt = (e) => {
822
- e && !e.__nextSibling && (B("nextSibling", e), Object.defineProperty(e, "nextSibling", { get: function() {
823
- let e = this["s-ol"]?.parentNode.childNodes, t = e?.indexOf(this);
824
- return e && t > -1 ? e[t + 1] || null : this.__nextSibling;
825
- } }));
826
- }, xt = (e) => {
827
- e && !e.__nextElementSibling && (B("nextElementSibling", e), Object.defineProperty(e, "nextElementSibling", { get: function() {
828
- let e = this["s-ol"]?.parentNode.children, t = e?.indexOf(this);
829
- return e && t > -1 ? e[t + 1] || null : this.__nextElementSibling;
830
- } }));
831
- }, St = (e) => {
832
- e && !e.__previousSibling && (B("previousSibling", e), Object.defineProperty(e, "previousSibling", { get: function() {
833
- let e = this["s-ol"]?.parentNode.childNodes, t = e?.indexOf(this);
834
- return e && t > -1 ? e[t - 1] || null : this.__previousSibling;
835
- } }));
836
- }, Ct = (e) => {
837
- e && !e.__previousElementSibling && (B("previousElementSibling", e), Object.defineProperty(e, "previousElementSibling", { get: function() {
838
- let e = this["s-ol"]?.parentNode.children, t = e?.indexOf(this);
839
- return e && t > -1 ? e[t - 1] || null : this.__previousElementSibling;
840
- } }));
841
- }, wt = (e) => {
842
- e && !e.__parentNode && (B("parentNode", e), Object.defineProperty(e, "parentNode", {
843
- get: function() {
844
- return this["s-ol"]?.parentNode || this.__parentNode;
845
- },
846
- set: function(e) {
847
- this.__parentNode = e;
848
- }
849
- }));
850
- }, Tt = [
851
- "children",
852
- "nextElementSibling",
853
- "previousElementSibling"
854
- ], Et = [
855
- "childNodes",
856
- "firstChild",
857
- "lastChild",
858
- "nextSibling",
859
- "previousSibling",
860
- "textContent",
861
- "parentNode"
862
- ];
863
- function B(e, t) {
864
- if (!globalThis.Node || !globalThis.Element) return;
865
- let n;
866
- Tt.includes(e) ? n = Object.getOwnPropertyDescriptor(Element.prototype, e) : Et.includes(e) && (n = Object.getOwnPropertyDescriptor(Node.prototype, e)), n ||= Object.getOwnPropertyDescriptor(t, e), n && Object.defineProperty(t, "__" + e, n);
867
- }
868
- function V(e, t) {
869
- if ("__" + t in e) {
870
- let n = e["__" + t];
871
- return typeof n == "function" ? n.bind(e) : n;
872
- }
873
- return typeof e[t] == "function" ? e[t].bind(e) : e[t];
874
- }
875
- var Dt = (e) => n.lazyLoad ? M(e)?.$hostElement$ : e, Ot = (e) => n.shadowModeClosed && e.__shadowRoot ? e.__shadowRoot : e.shadowRoot, kt = 0, H = (e, t = "") => {
876
- if (n.profile && performance.mark) {
877
- let n = `st:${e}:${t}:${kt++}`;
878
- return performance.mark(n), () => performance.measure(`[Stencil] ${e}() <${t}>`, n);
879
- }
880
- return () => {};
881
- }, At = (e, t) => n.profile && performance.mark ? (performance.getEntriesByName(e, "mark").length === 0 && performance.mark(e), () => {
882
- performance.getEntriesByName(t, "measure").length === 0 && performance.measure(t, e);
883
- }) : () => {};
884
- function jt(e) {
885
- return e.head?.querySelector("meta[name=\"csp-nonce\"]")?.getAttribute("content") ?? void 0;
886
- }
887
- var U = /*@__PURE__*/ new WeakMap(), Mt = (e) => {
888
- let t = U.get(e);
889
- return t || (t = /* @__PURE__ */ new Set(), U.set(e, t)), t;
890
- }, Nt = (e, t, n = !1) => {
891
- ze ? n ? e.adoptedStyleSheets.unshift(t) : e.adoptedStyleSheets.push(t) : e.adoptedStyleSheets = n ? [t, ...e.adoptedStyleSheets] : [...e.adoptedStyleSheets, t];
892
- }, Pt = (e, t) => {
893
- let n = new (e.defaultView ?? (e.ownerDocument?.defaultView) ?? I).CSSStyleSheet();
894
- return n.replaceSync(t), n;
895
- }, Ft = (e) => e ? typeof e == "string" ? e + pe : e : pe, It = (e, t, n) => {
896
- if (Re && n) {
897
- let n = F.get(e) ?? new CSSStyleSheet();
898
- n.replaceSync(t), F.set(e, n);
899
- } else F.set(e, t);
900
- }, Lt = (e, t, r) => {
901
- let i = zt(t, r);
902
- if (!I.document) return i;
903
- let a = F.get(i);
904
- t.$flags$ & j.hasSlotRelocation && (a = Ft(a));
905
- let o = n.hydrateServerSide && n.shadowModeClosed && t.$flags$ & j.shadowNeedsScopedCss && t.$flags$ & j.shadowModeClosed;
906
- if (e.nodeType !== D.DocumentFragment && !o && (e = I.document), a) {
907
- if (typeof a == "string") {
908
- e = e.head || e;
909
- let r = Mt(e), s, c = (n.hydrateClientSide || n.hotModuleReplacement) && e.querySelector(`[sty-id="${i}"]`);
910
- if (c) c.textContent = a;
911
- else if (!r.has(i)) {
912
- s = I.document.createElement("style"), s.textContent = a;
913
- let c = L.$nonce$ ?? jt(I.document);
914
- if (c != null && s.setAttribute("nonce", c), (n.hydrateServerSide && (t.$flags$ & j.scopedCssEncapsulation || t.$flags$ & j.shadowNeedsScopedCss || t.$flags$ & j.shadowDomEncapsulation) || n.hotModuleReplacement) && s.setAttribute(de, i), n.hotModuleReplacement && t.$flags$ & j.hasSlotRelocation && s.setAttribute("data-slot-fb", ""), !(t.$flags$ & j.shadowDomEncapsulation)) {
915
- if (e.nodeName === "HEAD") {
916
- let t = e.querySelectorAll("link[rel=preconnect]"), n = t.length > 0 ? t[t.length - 1].nextSibling : e.querySelector("style");
917
- e.insertBefore(s, n?.parentNode === e ? n : null);
918
- } else if ("host" in e) {
919
- if (Re) {
920
- let t = Pt(e, a);
921
- Nt(e, t, !0);
922
- } else {
923
- let t = e.querySelector("style");
924
- t && !n.hotModuleReplacement ? t.textContent = a + t.textContent : e.prepend(s);
925
- }
926
- } else e.append(s);
927
- }
928
- t.$flags$ & j.shadowDomEncapsulation && (o ? e.prepend(s) : e.insertBefore(s, null)), r && r.add(i);
929
- }
930
- } else if (n.constructableCSS) {
931
- let t = Mt(e);
932
- if (!t.has(i)) {
933
- let r = e.defaultView ?? e.ownerDocument.defaultView, o;
934
- if (a.constructor === r.CSSStyleSheet) o = a;
935
- else {
936
- o = new r.CSSStyleSheet();
937
- for (let e = 0; e < a.cssRules.length; e++) o.insertRule(a.cssRules[e].cssText, e);
938
- }
939
- if (Nt(e, o), t.add(i), n.hydrateClientSide && "host" in e) {
940
- let t = e.querySelector(`[${de}="${i}"]`);
941
- t && Xe(() => t.remove());
942
- }
943
- }
944
- }
945
- }
946
- return i;
947
- }, Rt = (e) => {
948
- let t = e.$cmpMeta$, r = e.$hostElement$, i = t.$flags$, a = H("attachStyles", t.$tagName$), o;
949
- o = (n.shadowDom ? Ot(r) : null) || (n.hydrateServerSide && n.shadowModeClosed && i & j.shadowNeedsScopedCss && i & j.shadowModeClosed ? r : r.getRootNode());
950
- let s = Lt(o, t, e.$modeName$);
951
- (n.shadowDom || n.scoped) && n.cssAnnotations && i & j.needsScopedEncapsulation && (r["s-sc"] = s, r.classList.add(s + "-h")), a();
952
- }, zt = (e, t) => "sc-" + (n.mode && t && e.$flags$ & j.hasMode ? e.$tagName$ + "-" + t : e.$tagName$), Bt = (e) => e.replace(/\/\*!@([^/]+)\*\/[^{]+\{/g, "$1{"), Vt = () => {
953
- if (!I.document) return;
954
- let e = I.document.querySelectorAll(`[${de}]`), t = 0;
955
- for (; t < e.length; t++) {
956
- let n = e[t].getAttribute(de), r = F.get(n), i = r === void 0 || r instanceof CSSStyleSheet;
957
- It(n, Bt(e[t].innerHTML), i);
958
- }
959
- }, Ht = (e) => e != null && e !== void 0, Ut = (e) => (e = typeof e, e === "object" || e === "function"), Wt = () => globalThis[Symbol.for("stencil.preact-signals-core")] ??= r, W = (e, t) => Wt().effect(e, t);
960
- function Gt(e, t) {
961
- return Wt().signal(e, t);
962
- }
963
- var Kt = (e, t, r) => {
964
- let i = Dt(e);
965
- return { emit: (e) => (n.isDev && !i.isConnected && P(`The "${t}" event was emitted, but the dispatcher node is no longer connected to the dom.`), qt(i, t, {
966
- bubbles: !!(r & ye.Bubbles),
967
- composed: !!(r & ye.Composed),
968
- cancelable: !!(r & ye.Cancellable),
969
- detail: e
970
- })) };
971
- }, qt = (e, t, n) => {
972
- let r = L.ce(t, n);
973
- return e.dispatchEvent(r), r;
974
- }, Jt = () => customElements, Yt = (e) => e.constructor._registry ?? Jt(), G = /* @__PURE__ */ new WeakMap(), Xt = (e) => {
975
- if (!n.vdomSignals) return;
976
- let t = G.get(e);
977
- t && (t.forEach((e) => e()), G.delete(e));
978
- }, Zt = (e, t, r, i, a, o, s) => {
979
- if (r === i) return;
980
- if (n.vdomSignals && $n(i)) {
981
- let n = G.get(e) ?? /* @__PURE__ */ new Map();
982
- n.get(t)?.(), G.has(e) || G.set(e, n);
983
- let s = r;
984
- n.set(t, W(() => {
985
- let n = i.value;
986
- Zt(e, t, s, n, a, o), s = n;
987
- }));
988
- return;
989
- }
990
- if (n.vdomSignals && $n(r)) {
991
- let n = G.get(e);
992
- n && (n.get(t)?.(), n.delete(t));
993
- }
994
- let c = Ee(e, t), l = t.toLowerCase();
995
- if (n.vdomClass && t === "class") {
996
- let t = e.classList, a = tn(r), o = tn(i);
997
- if (n.hydrateClientSide && (e["s-si"] || e["s-sc"]) && s) {
998
- let n = e["s-sc"] || e["s-si"];
999
- o.push(n), a.forEach((e) => {
1000
- e.startsWith(n) && o.push(e);
1001
- }), o = [...new Set(o)].filter((e) => e), t.add(...o);
1002
- } else t.remove(...a.filter((e) => e && !o.includes(e))), t.add(...o.filter((e) => e && !a.includes(e)));
1003
- } else if (n.vdomStyle && t === "style") {
1004
- if (n.updatable) for (let t in r) i && i[t] != null || (!n.hydrateServerSide && t.includes("-") ? e.style.removeProperty(t) : e.style[t] = "");
1005
- for (let t in i) r && i[t] === r[t] || (!n.hydrateServerSide && t.includes("-") ? e.style.setProperty(t, i[t]) : e.style[t] = i[t]);
1006
- } else if (!(n.vdomKey && t === "key")) {
1007
- if (n.vdomRef && t === "ref") i && kn(i, e);
1008
- else if (n.vdomListener && (n.lazyLoad ? !c : !e.__lookupSetter__(t)) && t[0] === "o" && t[1] === "n") {
1009
- if (t = t[2] === "-" ? t.slice(3) : Ee(I, l) ? l.slice(2) : l[2] + t.slice(3), r || i) {
1010
- let n = t.endsWith(nn);
1011
- t = t.replace(/*@__PURE__*/ RegExp(nn + "$"), ""), r && L.rel(e, t, r, n), i && L.ael(e, t, i, n);
1012
- }
1013
- } else if (n.vdomPropOrAttrPrefix && t[0] === "a" && t.startsWith("attr:")) {
1014
- let r = t.slice(5), a;
1015
- if (n.member) {
1016
- let t = M(e);
1017
- if (t && t.$cmpMeta$ && t.$cmpMeta$.$members$) {
1018
- let e = t.$cmpMeta$.$members$[r];
1019
- e && e[1] && (a = e[1]);
1020
- }
1021
- }
1022
- a ||= r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), i == null || i === !1 ? (i !== !1 || e.getAttribute(a) === "") && e.removeAttribute(a) : e.setAttribute(a, i === !0 ? "" : i);
1023
- return;
1024
- } else if (n.vdomPropOrAttrPrefix && t[0] === "p" && t.startsWith("prop:")) {
1025
- let n = t.slice(5);
1026
- try {
1027
- e[n] = i;
1028
- } catch {}
1029
- return;
1030
- } else if (n.vdomPropOrAttr) {
1031
- let s = Ut(i);
1032
- if (!n.lazyLoad) {
1033
- let n = l.startsWith("aria-") || l.startsWith("data-");
1034
- if (!c && !n && e.tagName?.includes("-") && e.tagName !== "SLOT-FB" && !customElements.get(e.tagName.toLowerCase()) && (e["s-pp"] ||= /* @__PURE__ */ new Map(), e["s-pp"].set(t, i), s || /[A-Z]/.test(t))) return;
1035
- }
1036
- if ((c || s && i !== null) && !a) try {
1037
- if (e.tagName.includes("-")) e[t] !== i && (e[t] = i);
1038
- else {
1039
- let n = i ?? "";
1040
- t === "list" ? c = !1 : (r == null || e[t] !== n) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = n : e.setAttribute(t, n));
1041
- }
1042
- } catch {}
1043
- let u = !1;
1044
- n.vdomXlink && l !== (l = l.replace(/^xlink:?/, "")) && (t = l, u = !0), i == null || i === !1 ? (i !== !1 || e.getAttribute(t) === "" || o & w.isHost && !$t(t)) && (n.vdomXlink && u ? e.removeAttributeNS(me, t) : e.removeAttribute(t)) : (!c || o & w.isHost || a) && !s && e.nodeType === D.ElementNode && (i = i === !0 ? "" : i, n.vdomXlink && u ? e.setAttributeNS(me, t, i) : e.setAttribute(t, i));
1045
- }
1046
- }
1047
- }, Qt = /*@__PURE__*/ new Set([
1048
- "draggable",
1049
- "contenteditable",
1050
- "spellcheck"
1051
- ]), $t = (e) => Qt.has(e) || e.startsWith("aria-"), en = /\s/, tn = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(en)), nn = "Capture", rn = (e, t, r, i) => {
1052
- let a = e && e.$attrs$ || {}, o = t.$attrs$ || {}, s = Object.keys(a), c = Object.keys(o);
1053
- if (!n.updatable && c.length === 0 || n.updatable && s.length === 0 && c.length === 0) return;
1054
- let l = t.$elm$.nodeType === D.DocumentFragment && t.$elm$.host ? t.$elm$.host : t.$elm$;
1055
- if (n.updatable) for (let e of an(s)) e in o || Zt(l, e, a[e], void 0, r, t.$flags$, i);
1056
- for (let e of an(c)) Zt(l, e, a[e], o[e], r, t.$flags$, i);
1057
- };
1058
- function an(e) {
1059
- return n.vdomRef && e.includes("ref") ? [...e.filter((e) => e !== "ref"), "ref"] : e;
1060
- }
1061
- var on, sn, K, cn, ln = !1, un = !1, dn = !1, q = !1, fn = [], pn = [], mn = /* @__PURE__ */ new WeakMap(), hn = (e) => {
1062
- let t = e.$elm$;
1063
- t && (gn(t), Xt(t)), e.$children$?.forEach(hn);
1064
- }, gn = (e) => {
1065
- let t = mn.get(e);
1066
- t && (t(), mn.delete(e));
1067
- }, _n = (e, t) => {
1068
- mn.set(e, W(() => {
1069
- e.data = String(t.value);
1070
- }));
1071
- }, vn = (e, t, r) => {
1072
- let i = t.$children$[r], a = 0, o, s, c;
1073
- if (n.slotRelocation && !ln && (dn = !0, i.$tag$ === "slot" && (i.$flags$ |= i.$children$ ? w.isSlotFallback : w.isSlotReference)), n.isDev && i.$elm$ && Oe(`The JSX ${i.$text$ === null ? `"${String(i.$tag$)}" element` : `"${i.$text$}" text`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`), n.vdomText && i.$text$ != null) o = i.$elm$ = I.document.createTextNode(i.$text$), n.vdomSignals && i.$signal$ && _n(o, i.$signal$);
1074
- else if (n.slotRelocation && i.$flags$ & w.isSlotReference) o = i.$elm$ = n.isDebug || n.hydrateServerSide ? Nn(i) : I.document.createTextNode(""), typeof i.$attrs$?.slot == "string" && (o["s-sa"] = i.$attrs$.slot), n.vdomAttribute && rn(null, i, q);
1075
- else {
1076
- if (n.svg && !q && (q = i.$tag$ === "svg"), !I.document) throw Error("No DOM environment available for rendering.");
1077
- let t = !ln && n.slotRelocation && i.$flags$ & w.isSlotFallback ? "slot-fb" : i.$tag$, r = cn !== I.customElements && t.includes("-") ? { customElementRegistry: cn } : void 0;
1078
- if (o = i.$elm$ = n.svg && q ? I.document.createElementNS(xe, t) : I.document.createElement(t, r), n.svg && q && i.$tag$ === "foreignObject" && (q = !1), n.vdomAttribute && rn(null, i, q), (n.scoped || n.hydrateServerSide && j.shadowNeedsScopedCss) && Ht(on) && o["s-si"] !== on && o.classList.add(o["s-si"] = on), i.$children$) {
1079
- let t = i.$tag$ === "template" ? o.content : o;
1080
- for (a = 0; a < i.$children$.length; ++a) s = vn(e, i, a), s && t.appendChild(s);
1081
- }
1082
- n.svg && (i.$tag$ === "svg" ? q = !1 : o.tagName === "foreignObject" && (q = !0));
1083
- }
1084
- return o["s-hn"] = K, n.slotRelocation && i.$flags$ & (w.isSlotFallback | w.isSlotReference) && (o["s-sr"] = !0, o["s-cr"] = sn, o["s-sn"] = i.$name$ || "", o["s-rf"] = i.$attrs$?.ref, ot(o), c = e && e.$children$ && e.$children$[r], c && c.$tag$ === i.$tag$ && e.$elm$ && yn(e.$elm$), (n.scoped || n.hydrateServerSide && j.shadowNeedsScopedCss) && jn(sn, o, t.$elm$, e?.$elm$)), o;
1085
- }, yn = (e) => {
1086
- L.$flags$ |= E.isTmpDisconnected;
1087
- let t = e.closest(K.toLowerCase());
1088
- if (t != null) {
1089
- let n = Array.from(t.__childNodes || t.childNodes).find((e) => e["s-cr"]), r = Array.from(e.__childNodes || e.childNodes);
1090
- for (let e of n ? r.reverse() : r) e["s-sh"] != null && (X(t, e, n ?? null), e["s-sh"] = void 0, dn = !0);
1091
- }
1092
- L.$flags$ &= ~E.isTmpDisconnected;
1093
- }, bn = (e, t) => {
1094
- L.$flags$ |= E.isTmpDisconnected;
1095
- let n = Array.from(e.__childNodes || e.childNodes);
1096
- if (e["s-sr"]) {
1097
- let t = e;
1098
- for (; t = t.nextSibling;) t && t["s-sn"] === e["s-sn"] && t["s-sh"] === K && n.push(t);
1099
- }
1100
- for (let e = n.length - 1; e >= 0; e--) {
1101
- let r = n[e];
1102
- r["s-hn"] !== K && r["s-ol"] && (X(Tn(r).parentNode, r, Tn(r)), r["s-ol"].remove(), r["s-ol"] = void 0, r["s-sh"] = void 0, dn = !0), t && bn(r, t);
1103
- }
1104
- L.$flags$ &= ~E.isTmpDisconnected;
1105
- }, xn = (e, t, r, i, a, o) => {
1106
- let s = n.slotRelocation && e["s-cr"] && e["s-cr"].parentNode || e, c;
1107
- if (n.shadowDom && s.tagName === K) {
1108
- let e = Ot(s);
1109
- e && (s = e);
1110
- }
1111
- for (r.$tag$ === "template" && (s = s.content); a <= o; ++a) i[a] && (c = vn(null, r, a), c && (i[a].$elm$ = c, X(s, c, n.slotRelocation ? Tn(t) : t)));
1112
- }, Sn = (e, t, r) => {
1113
- for (let i = t; i <= r; ++i) {
1114
- let t = e[i];
1115
- if (t) {
1116
- let e = t.$elm$;
1117
- On(t), n.vdomSignals && hn(t), e && (n.slotRelocation && (un = !0, e["s-ol"] ? e["s-ol"].remove() : bn(e, !0)), e.remove());
1118
- }
1119
- }
1120
- }, Cn = (e, t, r, i, a = !1) => {
1121
- let o = 0, s = 0, c = 0, l = 0, u = t.length - 1, d = t[0], f = t[u], p = i.length - 1, m = i[0], h = i[p], g, _, v = r.$tag$ === "template" ? e.content : e;
1122
- for (; o <= u && s <= p;) if (d == null) d = t[++o];
1123
- else if (f == null) f = t[--u];
1124
- else if (m == null) m = i[++s];
1125
- else if (h == null) h = i[--p];
1126
- else if (wn(d, m, a)) J(d, m, a), d = t[++o], m = i[++s];
1127
- else if (wn(f, h, a)) J(f, h, a), f = t[--u], h = i[--p];
1128
- else if (wn(d, h, a)) n.slotRelocation && (d.$tag$ === "slot" || h.$tag$ === "slot") && bn(d.$elm$.parentNode, !1), J(d, h, a), X(v, d.$elm$, f.$elm$.nextSibling), d = t[++o], h = i[--p];
1129
- else if (wn(f, m, a)) n.slotRelocation && (d.$tag$ === "slot" || h.$tag$ === "slot") && bn(f.$elm$.parentNode, !1), J(f, m, a), X(v, f.$elm$, d.$elm$), f = t[--u], m = i[++s];
1130
- else {
1131
- if (c = -1, n.vdomKey) {
1132
- for (l = o; l <= u; ++l) if (t[l] && t[l].$key$ !== null && t[l].$key$ === m.$key$) {
1133
- c = l;
1134
- break;
1135
- }
1136
- }
1137
- n.vdomKey && c >= 0 ? (_ = t[c], _.$tag$ === m.$tag$ ? (J(_, m, a), t[c] = void 0, g = _.$elm$) : g = vn(t && t[s], r, s), m = i[++s]) : (g = vn(t && t[s], r, s), m = i[++s]), g && (n.slotRelocation ? X(Tn(d.$elm$).parentNode, g, Tn(d.$elm$)) : X(d.$elm$.parentNode, g, d.$elm$));
1138
- }
1139
- o > u ? xn(e, i[p + 1] == null ? null : i[p + 1].$elm$, r, i, s, p) : n.updatable && s > p && Sn(t, o, u);
1140
- }, wn = (e, t, r = !1) => e.$tag$ === t.$tag$ ? n.slotRelocation && e.$tag$ === "slot" ? e.$name$ === t.$name$ : n.vdomKey && !r ? e.$key$ === t.$key$ : (r && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : !1, Tn = (e) => e && e["s-ol"] || e, J = (e, t, r = !1) => {
1141
- let i = t.$elm$ = e.$elm$, a = e.$children$, o = t.$children$, s = t.$tag$, c = t.$text$, l;
1142
- !n.vdomText || c == null ? (n.svg && (q = s === "svg" || s !== "foreignObject" && q), (n.vdomAttribute || n.reflect) && (n.slot && s === "slot" && !ln && e.$name$ !== t.$name$ && (t.$elm$["s-sn"] = t.$name$ || "", yn(t.$elm$.parentElement)), rn(e, t, q, r)), n.updatable && a !== null && o !== null ? Cn(i, a, t, o, r) : o === null ? !r && n.updatable && a !== null ? Sn(a, 0, a.length - 1) : n.hydrateClientSide && r && n.updatable && a !== null && o === null && (t.$children$ = a) : (n.updatable && n.vdomText && e.$text$ !== null && (i.textContent = ""), xn(i, null, t, o, 0, o.length - 1)), n.svg && q && s === "svg" && (q = !1)) : n.vdomText && n.slotRelocation && (l = i["s-cr"]) ? l.parentNode.textContent = c : n.vdomText && (n.vdomSignals && t.$signal$ ? t.$signal$ !== e.$signal$ && (gn(i), _n(i, t.$signal$)) : (n.vdomSignals && e.$signal$ && gn(i), e.$text$ !== c && (i.data = c)));
1143
- }, Y = [], En = () => {
1144
- for (let e of Y.slice()) {
1145
- let t = e.$nodeToRelocate$;
1146
- if (!t["s-sr"]) continue;
1147
- let n = rt(t, t["s-sn"] || "", !1);
1148
- for (let t of n) {
1149
- if (!t["s-ol"]) continue;
1150
- let n = Y.find((e) => e.$nodeToRelocate$ === t);
1151
- n || (n = { $nodeToRelocate$: t }, Y.push(n)), n.$slotRefNode$ = e.$slotRefNode$, e.$slotRefNode$ && (t["s-sh"] = e.$slotRefNode$["s-hn"]);
1152
- }
1153
- }
1154
- }, Dn = (e) => {
1155
- let t, n, r, i = e.__childNodes || e.childNodes;
1156
- for (let e of i) {
1157
- if (e["s-sr"] && (t = e["s-cr"]) && t.parentNode) {
1158
- n = t.parentNode.__childNodes || t.parentNode.childNodes;
1159
- let i = e["s-sn"];
1160
- for (r = n.length - 1; r >= 0; r--) if (t = n[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== e["s-hn"] && (!t["s-sh"] || t["s-sh"] !== e["s-hn"])) {
1161
- if (it(t, i)) {
1162
- let n = Y.find((e) => e.$nodeToRelocate$ === t);
1163
- un = !0, t["s-sn"] = t["s-sn"] || i, n ? (n.$nodeToRelocate$["s-sh"] = e["s-hn"], n.$slotRefNode$ = e) : (t["s-sh"] = e["s-hn"], Y.push({
1164
- $slotRefNode$: e,
1165
- $nodeToRelocate$: t
1166
- })), t["s-sr"] && Y.map((e) => {
1167
- it(e.$nodeToRelocate$, t["s-sn"]) && (n = Y.find((e) => e.$nodeToRelocate$ === t), n && !e.$slotRefNode$ && (e.$slotRefNode$ = n.$slotRefNode$));
1168
- });
1169
- } else Y.some((e) => e.$nodeToRelocate$ === t) || Y.push({ $nodeToRelocate$: t });
1170
- }
1171
- }
1172
- e.nodeType === D.ElementNode && Dn(e);
1173
- }
1174
- }, On = (e) => {
1175
- n.vdomRef && (e.$attrs$ && e.$attrs$.ref && fn.push(() => e.$attrs$.ref(null)), e.$children$ && e.$children$.map(On));
1176
- }, kn = (e, t) => {
1177
- n.vdomRef && pn.push(() => e(t));
1178
- }, An = () => {
1179
- n.vdomRef && (fn.forEach((e) => e()), fn.length = 0, pn.forEach((e) => e()), pn.length = 0);
1180
- }, X = (e, t, r, i) => {
1181
- if (n.slotRelocation) {
1182
- if (n.scoped && typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"]) jn(t["s-cr"], t, e, t.parentElement);
1183
- else if (typeof t["s-sn"] == "string") {
1184
- let a = t["s-hn"] && e.closest?.(t["s-hn"]);
1185
- (n.lightDomPatches || n.slotChildNodes || n.patchAll && a && M(a)?.$cmpMeta$.$flags$ & j.patchAll) && e.getRootNode().nodeType !== Se.DOCUMENT_FRAGMENT_NODE && wt(t), e.insertBefore(t, r);
1186
- let { slotNode: o } = ct(t);
1187
- return o && !i && st(o), t;
1188
- }
1189
- }
1190
- return n.slotRelocation && e?.__insertBefore ? e.__insertBefore(t, r) : e?.insertBefore(t, r);
1191
- };
1192
- function jn(e, t, n, r) {
1193
- let i;
1194
- if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (i = t["s-si"] || e.parentNode["s-sc"])) {
1195
- let e = t["s-sn"], a = t["s-hn"];
1196
- if (n.classList?.add(i + "-s"), r && r.classList?.contains(i + "-s")) {
1197
- let t = (r.__childNodes || r.childNodes)[0], n = !1;
1198
- for (; t;) {
1199
- if (t["s-sn"] !== e && t["s-hn"] === a && t["s-sr"]) {
1200
- n = !0;
1201
- break;
1202
- }
1203
- t = t.nextSibling;
1204
- }
1205
- n || r.classList.remove(i + "-s");
1206
- }
1207
- }
1208
- }
1209
- var Mn = (e, t, r = !1) => {
1210
- let i = e.$hostElement$, a = e.$cmpMeta$, o = e.$vnode$ || Q(null, null), s = ir(t) ? t : nr(null, null, t);
1211
- if (K = i.tagName, cn = Yt(i), n.isDev && Array.isArray(t) && t.some(ir)) throw Error(`The <Host> must be the single root component.
1212
- Looks like the render() function of "${K.toLowerCase()}" is returning an array that contains the <Host>.
1213
-
1214
- The render() function should look like this instead:
1215
-
1216
- render() {
1217
- // Do not return an array
1218
- return (
1219
- <Host>{content}</Host>
1220
- );
1221
- }
1222
- `);
1223
- if (n.reflect && a.$attrsToReflect$ && (s.$attrs$ = s.$attrs$ || {}, a.$attrsToReflect$.forEach(([t, r]) => {
1224
- n.serializer && e.$serializerValues$.has(t) ? s.$attrs$[r] = e.$serializerValues$.get(t) : s.$attrs$[r] = i[t];
1225
- })), r && s.$attrs$) for (let e of Object.keys(s.$attrs$)) i.hasAttribute(e) && ![
1226
- "key",
1227
- "ref",
1228
- "style",
1229
- "class"
1230
- ].includes(e) && (s.$attrs$[e] = i[e]);
1231
- if (s.$tag$ = null, s.$flags$ |= w.isHost, e.$vnode$ = s, s.$elm$ = o.$elm$ = n.shadowDom && Ot(i) || i, (n.scoped || n.shadowDom) && (on = i["s-sc"]), ln = !!(a.$flags$ & j.shadowDomEncapsulation) && !(a.$flags$ & j.shadowNeedsScopedCss), n.slotRelocation && (sn = i["s-cr"], un = !1), J(o, s, r), n.slotRelocation) {
1232
- if (L.$flags$ |= E.isTmpDisconnected, dn) {
1233
- Dn(s.$elm$), En();
1234
- for (let e of Y) {
1235
- let t = e.$nodeToRelocate$;
1236
- if (!t["s-ol"] && I.document) {
1237
- let e = n.isDebug || n.hydrateServerSide ? Pn(t) : I.document.createTextNode("");
1238
- e["s-nr"] = t, X(t.parentNode, t["s-ol"] = e, t, r);
1239
- }
1240
- }
1241
- for (let e of Y) {
1242
- let t = e.$nodeToRelocate$, i = e.$slotRefNode$;
1243
- if (t.nodeType === D.ElementNode && r && (t["s-ih"] = !!t.hidden), i) {
1244
- let e = i.parentNode, a = i.nextSibling;
1245
- if (!n.hydrateServerSide && a && a.nodeType === D.ElementNode) {
1246
- let n = t["s-ol"]?.previousSibling;
1247
- for (; n;) {
1248
- let r = n["s-nr"] ?? null;
1249
- if (r && r["s-sn"] === t["s-sn"] && e === (r.__parentNode || r.parentNode)) {
1250
- for (r = r.nextSibling; r === t || r?.["s-sr"];) r = r?.nextSibling;
1251
- if (!r || !r["s-nr"]) {
1252
- a = r;
1253
- break;
1254
- }
1255
- }
1256
- n = n.previousSibling;
1257
- }
1258
- }
1259
- let o = t.__parentNode || t.parentNode, s = t.__nextSibling || t.nextSibling;
1260
- if ((!a && e !== o || s !== a) && t !== a) {
1261
- if (X(e, t, a, r), t.nodeType === D.CommentNode && t.nodeValue.startsWith("s-nt-")) {
1262
- let e = I.document.createTextNode(t.nodeValue.replace(/^s-nt-/, ""));
1263
- e["s-hn"] = t["s-hn"], e["s-sn"] = t["s-sn"], e["s-sh"] = t["s-sh"], e["s-sr"] = t["s-sr"], e["s-ol"] = t["s-ol"], e["s-ol"]["s-nr"] = e, X(t.parentNode, e, t, r), t.parentNode.removeChild(t);
1264
- }
1265
- t.nodeType === D.ElementNode && t.tagName !== "SLOT-FB" && (t.hidden = t["s-ih"] ?? !1);
1266
- }
1267
- t && typeof i["s-rf"] == "function" && i["s-rf"](i);
1268
- } else t.nodeType === D.ElementNode && (t.hidden = !0);
1269
- }
1270
- }
1271
- un && et(s.$elm$), L.$flags$ &= ~E.isTmpDisconnected, Y.length = 0;
1272
- }
1273
- if (n.slotRelocation && !ln && !(a.$flags$ & j.shadowDomEncapsulation) && i["s-cr"]) {
1274
- let e = s.$elm$.__childNodes || s.$elm$.childNodes;
1275
- for (let t of e) if (t["s-hn"] !== K && t["s-sh"] !== K) {
1276
- if (r && t["s-ih"] == null && (t["s-ih"] = t.hidden ?? !1), t.nodeType === D.ElementNode) t.hidden = !0;
1277
- else if (t.nodeType === D.TextNode && t.nodeValue.trim()) {
1278
- let e = I.document.createComment("s-nt-" + t.nodeValue);
1279
- e["s-sn"] = t["s-sn"], X(t.parentNode, e, t, r), t.parentNode.removeChild(t);
1280
- }
1281
- }
1282
- }
1283
- sn = void 0, An();
1284
- }, Nn = (e) => I.document?.createComment(`<slot${e.$name$ ? " name=\"" + e.$name$ + "\"" : ""}> (host=${K.toLowerCase()})`), Pn = (e) => I.document?.createComment("org-location for " + (e.localName ? `<${e.localName}> (host=${e["s-hn"]})` : `[${e.textContent}]`)), Fn = (e) => (e.$onFirstConnectPromise$ ||= new Promise((t) => e.$onFirstConnectResolve$ = t), e.$onFirstConnectPromise$), In = (e) => {
1285
- e.$flags$ |= A.hasFiredConnected, e.$onFirstConnectResolve$?.(), e.$onFirstConnectResolve$ = void 0;
1286
- }, Ln = async (e, t) => {
1287
- let r = M(e);
1288
- !n.lazyLoad && !r && (await t.whenDefined(e.tagName.toLowerCase()), r = M(e)), r && !(r.$flags$ & A.hasFiredConnected) && await Fn(r);
1289
- }, Rn = (e, t) => {
1290
- if (n.asyncLoading && t && !e.$onRenderResolve$ && t["s-p"]) {
1291
- let n = t["s-p"].push(new Promise((r) => e.$onRenderResolve$ = () => {
1292
- t["s-p"].splice(n - 1, 1), r();
1293
- }));
1294
- t["s-pc"] && t["s-pc"].push(Fn(e));
1295
- }
1296
- }, zn = (e, t) => {
1297
- if (n.updatable && (e.$flags$ |= A.isQueuedForUpdate), n.asyncLoading && e.$flags$ & A.isWaitingForChildren) {
1298
- e.$flags$ |= A.needsRerender;
1299
- return;
1300
- }
1301
- Rn(e, e.$ancestorComponent$);
1302
- let r = () => Bn(e, t);
1303
- if (t) {
1304
- let t = n.asyncLoading ? e.$hostElement$["s-pc"] : void 0;
1305
- if (t && t.length > 0) return Promise.all(t).then(r).catch(r);
1306
- queueMicrotask(() => {
1307
- r();
1308
- });
1309
- } else return n.taskQueue ? Xe(r) : r();
1310
- }, Bn = (e, t) => {
1311
- let r = e.$hostElement$, i = H("scheduleUpdate", e.$cmpMeta$.$tagName$), a = n.lazyLoad ? e.$lazyInstance$ : r;
1312
- if (!a) {
1313
- if (n.isDev) throw Error(`Can't render <${r.tagName.toLowerCase()} /> - compiled without externalRuntime: true. See https://stenciljs.com/docs/custom-elements#externalruntime`);
1314
- return;
1315
- }
1316
- let o;
1317
- if (t) n.lazyLoad && (n.hostListener && (e.$flags$ |= A.isListenReady, e.$queuedListeners$ &&= (e.$queuedListeners$.map(([e, t]) => Z(a, e, t, r)), void 0)), e.$fetchedCbList$.length && e.$fetchedCbList$.forEach((e) => e(r))), n.lifecycleDOMEvents && Yn(r, "componentWillLoad"), o = Z(a, "componentWillLoad", void 0, r);
1318
- else {
1319
- if (n.updatable && e.$queuedPropChanges$) {
1320
- let t = e.$queuedPropChanges$;
1321
- if (e.$queuedPropChanges$ = void 0, Z(a, "componentShouldUpdate", t, r) === !1) {
1322
- e.$flags$ &= ~A.isQueuedForUpdate;
1323
- return;
1324
- }
1325
- }
1326
- n.lifecycleDOMEvents && Yn(r, "componentWillUpdate"), o = Z(a, "componentWillUpdate", void 0, r);
1327
- }
1328
- return n.lifecycleDOMEvents && Yn(r, "componentWillRender"), o = Vn(o, () => Z(a, "componentWillRender", void 0, r)), i(), Vn(o, () => Un(e, a, t));
1329
- }, Vn = (e, t) => {
1330
- if (Hn(e)) return e.then(t).catch((e) => {
1331
- console.error(e), t();
1332
- });
1333
- let n = t();
1334
- return Hn(n) ? n : void 0;
1335
- }, Hn = (e) => e instanceof Promise || e && e.then && typeof e.then == "function", Un = (e, t, r) => {
1336
- let i = e.$hostElement$, a = H("update", e.$cmpMeta$.$tagName$), o = i["s-rc"];
1337
- n.style && r && Rt(e);
1338
- let s = H("render", e.$cmpMeta$.$tagName$);
1339
- if (n.isDev && (e.$flags$ |= A.devOnRender), n.hydrateServerSide) return Gn(e, t, i, r).then(() => {
1340
- Wn(e, i, o, r, s, a);
1341
- });
1342
- Gn(e, t, i, r), Wn(e, i, o, r, s, a);
1343
- }, Wn = (e, t, r, i, a, o) => {
1344
- if (n.isDev && (e.$renderCount$ = e.$renderCount$ === void 0 ? 1 : e.$renderCount$ + 1, e.$flags$ &= ~A.devOnRender), n.hydrateServerSide) try {
1345
- Zn(t), i && (e.$cmpMeta$.$flags$ & j.shadowDomEncapsulation ? t["s-en"] = "" : e.$cmpMeta$.$flags$ & j.scopedCssEncapsulation && (t["s-en"] = "c"));
1346
- } catch (e) {
1347
- N(e, t);
1348
- }
1349
- if (n.asyncLoading && r && (r.map((e) => e()), t["s-rc"] = void 0), a(), o(), n.asyncLoading) {
1350
- let n = t["s-p"] ?? [], r = () => Kn(e);
1351
- n.length === 0 ? r() : (Promise.all(n).then(r).catch(r), e.$flags$ |= A.isWaitingForChildren, n.length = 0);
1352
- } else Kn(e);
1353
- }, Gn = (e, t, r, i) => {
1354
- let a = !!n.allRenderFn, o = !!n.lazyLoad, s = !!n.updatable;
1355
- try {
1356
- if (t = (a || t.render) && t.render(), s && (e.$flags$ &= ~A.isQueuedForUpdate), (s || o) && (e.$flags$ |= A.hasRendered), n.hasRenderFn || n.reflect) {
1357
- if (n.vdomRender || n.reflect) {
1358
- if (n.hydrateServerSide) return Promise.resolve(t).then((t) => Mn(e, t, i));
1359
- Mn(e, t, i);
1360
- } else {
1361
- let n = r.shadowRoot;
1362
- e.$cmpMeta$.$flags$ & j.shadowDomEncapsulation ? n.textContent = t : r.textContent = t;
1363
- }
1364
- }
1365
- } catch (t) {
1366
- N(t, e.$hostElement$);
1367
- }
1368
- return null;
1369
- }, Kn = (e) => {
1370
- let t = e.$cmpMeta$.$tagName$, r = e.$hostElement$, i = H("postUpdate", t), a = n.lazyLoad ? e.$lazyInstance$ : r, o = e.$ancestorComponent$;
1371
- n.isDev && (e.$flags$ |= A.devOnRender), Z(a, "componentDidRender", void 0, r), n.isDev && (e.$flags$ &= ~A.devOnRender), n.lifecycleDOMEvents && Yn(r, "componentDidRender"), e.$flags$ & A.hasLoadedComponent ? (n.isDev && (e.$flags$ |= A.devOnRender), Z(a, "componentDidUpdate", void 0, r), n.isDev && (e.$flags$ &= ~A.devOnRender), n.lifecycleDOMEvents && Yn(r, "componentDidUpdate"), i()) : (e.$flags$ |= A.hasLoadedComponent, n.asyncLoading && n.cssAnnotations && Xn(r), n.isDev && (e.$flags$ |= A.devOnDidLoad), Z(a, "componentDidLoad", void 0, r), n.isDev && (e.$flags$ &= ~A.devOnDidLoad), n.lifecycleDOMEvents && Yn(r, "componentDidLoad"), n.propChangeCallback && (e.$flags$ |= A.isWatchReady), i(), n.asyncLoading && (e.$onReadyResolve$(r), o || Jn(t))), n.method && n.lazyLoad && e.$onInstanceResolve$(r), n.asyncLoading && (e.$onRenderResolve$ &&= (e.$onRenderResolve$(), void 0), e.$flags$ & A.needsRerender && Ye(() => zn(e, !1)), e.$flags$ &= ~(A.isWaitingForChildren | A.needsRerender));
1372
- }, qn = (e) => {
1373
- if (n.updatable && (_e.isBrowser || _e.isTesting)) {
1374
- let t = M(e), n = t?.$hostElement$?.isConnected;
1375
- return n && (t.$flags$ & (A.hasRendered | A.isQueuedForUpdate)) === A.hasRendered && zn(t, !1), n;
1376
- }
1377
- return !1;
1378
- }, Jn = (e) => {
1379
- n.asyncQueue && (L.$flags$ |= E.appLoaded), Ye(() => qt(I, "appload", { detail: { namespace: "app" } })), n.hydrateClientSide && L.$orgLocNodes$?.size && L.$orgLocNodes$.clear(), n.profile && performance.measure && performance.measure(`[Stencil] app initial load (by ${e})`, "st:app:start");
1380
- }, Z = (e, t, n, r) => {
1381
- if (e && e[t]) try {
1382
- return e[t](n);
1383
- } catch (e) {
1384
- N(e, r);
1385
- }
1386
- }, Yn = (e, t) => {
1387
- n.lifecycleDOMEvents && qt(e, "stencil_" + t, {
1388
- bubbles: !0,
1389
- composed: !0,
1390
- detail: { namespace: "app" }
1391
- });
1392
- }, Xn = (e) => n.hydratedClass ? e.classList.add(n.hydratedSelectorName ?? "hydrated") : n.hydratedAttribute ? e.setAttribute(n.hydratedSelectorName ?? "hydrated", "") : void 0, Zn = (e) => {
1393
- let t = e.children;
1394
- if (t != null) for (let e = 0, n = t.length; e < n; e++) {
1395
- let n = t[e];
1396
- typeof n.connectedCallback == "function" && n.connectedCallback(), Zn(n);
1397
- }
1398
- }, Qn = Symbol.for("stencil.signals"), $n = (e) => typeof e == "object" && !!e && typeof e.peek == "function" && typeof e.subscribe == "function", er = (e, t, r) => {
1399
- if (t.$signalValues$) return;
1400
- t.$signalValues$ = /* @__PURE__ */ new Map();
1401
- let i = [], a = n.lazyLoad ? t.$lazyInstance$ : e;
1402
- for (let [o, [s]] of Object.entries(r.$members$ ?? {})) {
1403
- if (!(s & O.PropLike)) continue;
1404
- let c = Gt(t.$instanceValues$.get(o));
1405
- t.$signalValues$.set(o, c);
1406
- let l = c.peek();
1407
- if (i.push(W(() => {
1408
- let e = c.value;
1409
- if (t.$flags$ & A.hasRendered) {
1410
- if (a?.componentShouldUpdate) {
1411
- let n = t.$queuedPropChanges$ ||= {};
1412
- n[o] = {
1413
- newVal: e,
1414
- oldVal: n[o]?.oldVal ?? l
1415
- };
1416
- }
1417
- t.$flags$ & A.isQueuedForUpdate || zn(t, !1);
1418
- }
1419
- l = e;
1420
- })), n.propChangeCallback && r.$watchers$?.[o]) {
1421
- let a = r.$watchers$[o], s = c.peek();
1422
- i.push(W(() => {
1423
- let r = c.value, i = t.$flags$;
1424
- a.forEach((a) => {
1425
- try {
1426
- let [[c, l]] = Object.entries(a);
1427
- if (i & A.isWatchReady || l & ve.Immediate) {
1428
- let i = n.lazyLoad ? t.$lazyInstance$ : e;
1429
- i && i[c](r, s, o);
1430
- }
1431
- } catch (t) {
1432
- N(t, e);
1433
- }
1434
- }), s = r;
1435
- }));
1436
- }
1437
- }
1438
- let o = a?.__stencilEffects ?? [];
1439
- for (let t of o) i.push(W(() => {
1440
- try {
1441
- a[t]();
1442
- } catch (t) {
1443
- N(t, e);
1444
- }
1445
- }));
1446
- e[Qn] = new Map([...t.$signalValues$].filter(([e]) => (r.$members$?.[e]?.[0] ?? 0) & O.Prop)), t.$signalCleanup$ = () => {
1447
- i.forEach((e) => e()), e[Qn] = void 0;
1448
- };
1449
- }, tr = (e, t) => {
1450
- let r = n.lazyLoad ? t.$lazyInstance$ : e, i = r?.__stencilEffects ?? [];
1451
- if (!i.length) return;
1452
- let a = [];
1453
- for (let t of i) a.push(W(() => {
1454
- try {
1455
- r[t]();
1456
- } catch (t) {
1457
- N(t, e);
1458
- }
1459
- }));
1460
- t.$signalCleanup$ = () => a.forEach((e) => e());
1461
- }, nr = (e, t, ...r) => {
1462
- typeof e == "string" && (e = Ii(e));
1463
- let i = null, a = null, o = null, s = !1, c = !1, l = [], u = (t) => {
1464
- for (let r = 0; r < t.length; r++) if (i = t[r], Array.isArray(i)) u(i);
1465
- else if (i != null && typeof i != "boolean") {
1466
- if (n.vdomSignals && $n(i)) {
1467
- let e = Q(null, String(i.peek()));
1468
- e.$signal$ = i, l.push(e), c = !1;
1469
- } else {
1470
- if (s = typeof e != "function" && !Ut(i)) i = String(i);
1471
- else if (typeof e != "function" && i.$flags$ === void 0) {
1472
- n.isDev ? Oe("vNode passed as children has unexpected type.\n Make sure it's using the correct h() function.\n Empty objects can also be the cause, look for JSX comments that became objects.") : N("Invalid vNode child");
1473
- continue;
1474
- }
1475
- s && c ? l[l.length - 1].$text$ += i : l.push(s ? Q(null, i) : i), c = s;
1476
- }
1477
- }
1478
- };
1479
- if (u(r), t && typeof t == "object" && (n.isDev && e === "input" && cr(t), n.vdomKey && t.key && (a = t.key), n.slotRelocation && t.name && (o = t.name), n.vdomClass)) {
1480
- let e = t.class;
1481
- e && !(n.vdomSignals && $n(e)) && (t.class = typeof e == "object" ? Object.keys(e).filter((t) => e[t]).join(" ") : e);
1482
- }
1483
- if (n.isDev && l.some(ir) && Oe("The <Host> must be used once, and be the single root component of the render() function."), n.vdomFunctional && typeof e == "function") return e(t === null ? {} : t, l, ar);
1484
- let d = Q(e, null);
1485
- return d.$attrs$ = t, l.length > 0 && (d.$children$ = l), n.vdomKey && (d.$key$ = a), n.slotRelocation && (d.$name$ = o), d;
1486
- }, Q = (e, t) => {
1487
- let r = {
1488
- $flags$: 0,
1489
- $tag$: e,
1490
- $text$: t ?? null,
1491
- $elm$: null,
1492
- $children$: null
1493
- };
1494
- return n.vdomAttribute && (r.$attrs$ = null), n.vdomKey && (r.$key$ = null), n.slotRelocation && (r.$name$ = null), r;
1495
- }, rr = {}, ir = (e) => e && e.$tag$ === rr, ar = {
1496
- forEach: (e, t) => e.map(or).forEach(t),
1497
- map: (e, t) => e.map(or).map(t).map(sr)
1498
- }, or = (e) => ({
1499
- vattrs: e.$attrs$,
1500
- vchildren: e.$children$,
1501
- vkey: e.$key$,
1502
- vname: e.$name$,
1503
- vtag: e.$tag$,
1504
- vtext: e.$text$
1505
- }), sr = (e) => {
1506
- if (typeof e.vtag == "function") {
1507
- let t = { ...e.vattrs };
1508
- return e.vkey && (t.key = e.vkey), e.vname && (t.name = e.vname), nr(e.vtag, t, ...e.vchildren || []);
1509
- }
1510
- let t = Q(e.vtag, e.vtext);
1511
- return t.$attrs$ = e.vattrs, t.$children$ = e.vchildren, t.$key$ = e.vkey, t.$name$ = e.vname, t;
1512
- }, cr = (e) => {
1513
- let t = Object.keys(e), n = t.indexOf("value");
1514
- if (n === -1) return;
1515
- let r = t.indexOf("type"), i = t.indexOf("min"), a = t.indexOf("max"), o = t.indexOf("step");
1516
- (n < r || n < i || n < a || n < o) && P("The \"value\" prop of <input> should be set after \"min\", \"max\", \"type\" and \"step\"");
1517
- }, lr = (e, t, r, i) => {
1518
- let a = H("hydrateClient", t), o = Ot(e), s = [], c = [], l = [], u = n.shadowDom && o ? [] : null, d = Q(t, null);
1519
- d.$elm$ = e;
1520
- let f;
1521
- if (n.scoped) {
1522
- let t = i.$cmpMeta$;
1523
- t && t.$flags$ & j.needsScopedEncapsulation && e["s-sc"] ? (f = e["s-sc"], e.classList.add(f + "-h")) : e["s-sc"] && delete e["s-sc"];
1524
- }
1525
- !I.document || L.$orgLocNodes$ && L.$orgLocNodes$.size || dr(I.document.body, L.$orgLocNodes$ = /* @__PURE__ */ new Map()), e[ue] = r, e.removeAttribute(ue), i.$vnode$ = ur(d, s, c, u, e, e, r, l);
1526
- let p = 0, m = s.length, h;
1527
- for (; p < m; p++) {
1528
- h = s[p];
1529
- let r = h.$hostId$ + "." + h.$nodeId$, i = L.$orgLocNodes$.get(r), a = h.$elm$;
1530
- if (!o) a["s-hn"] = Ii(t).toUpperCase(), h.$tag$ === "slot" && (a["s-cr"] = e["s-cr"]);
1531
- else if (h.$tag$?.toString().includes("-") && h.$tag$ !== "slot-fb" && !h.$elm$.shadowRoot) {
1532
- let e = M(h.$elm$);
1533
- if (e) {
1534
- let t = zt(e.$cmpMeta$, n.mode ? h.$elm$.getAttribute("s-mode") : void 0), r = I.document.querySelector(`style[sty-id="${t}"]`);
1535
- r && u.unshift(r.cloneNode(!0));
1536
- }
1537
- }
1538
- if (h.$tag$ === "slot" && (h.$name$ = h.$elm$["s-sn"] || h.$elm$.name || null, h.$children$ ? (h.$flags$ |= w.isSlotFallback, h.$elm$.childNodes.length || h.$children$.forEach((e) => {
1539
- h.$elm$.appendChild(e.$elm$);
1540
- })) : h.$flags$ |= w.isSlotReference), i && i.isConnected) {
1541
- let e = i.parentNode;
1542
- i.parentElement.shadowRoot && i["s-en"] === "" && e.insertBefore(a, i.nextSibling), e.removeChild(i), o || (a["s-oo"] = parseInt(h.$nodeId$));
1543
- }
1544
- i && !i["s-id"] && L.$orgLocNodes$.delete(r);
1545
- }
1546
- let g = [], _ = l.length, v = 0, y, b, ee, x, S = 0;
1547
- for (; v < _; v++) if (y = l[v], y && y.length) for (ee = y.length, b = 0; b < ee; b++) {
1548
- x = y[b];
1549
- let e = x.hostId;
1550
- if (g[e] || (g[e] = L.$orgLocNodes$.get(x.hostId)), !g[e]) continue;
1551
- let t = g[e], r = x.node, a = x.slot;
1552
- t.shadowRoot && r.parentElement !== t && t.insertBefore(r, y[b - 1]?.node?.nextSibling), t.shadowRoot && o || (a["s-cr"] ||= (a["s-cr"] = t["s-cr"], !a["s-cr"] && t.shadowRoot ? t : (t.__childNodes || t.childNodes)[0]), at(r, a, !1, r["s-oo"] || S), r.parentElement?.shadowRoot && r.getAttribute && r.getAttribute("slot") && r.removeAttribute("slot"), (n.lightDomPatches || n.slotChildNodes || n.patchAll && i.$cmpMeta$.$flags$ & j.patchAll) && yt(r)), S = (r["s-oo"] || S) + 1;
1553
- }
1554
- if (n.scoped && f && c.length && c.forEach((e) => {
1555
- e.$elm$.parentElement.classList.add(f + "-s");
1556
- }), n.shadowDom && o && !o.childNodes.length) {
1557
- let t = 0, n = u.length;
1558
- if (n) {
1559
- for (; t < n; t++) {
1560
- let e = u[t];
1561
- e && o.appendChild(e);
1562
- }
1563
- Array.from(e.childNodes).forEach((e) => {
1564
- typeof e["s-en"] != "string" && typeof e["s-sn"] != "string" && (e.nodeType === D.ElementNode && e.slot && e.hidden ? e.removeAttribute("hidden") : e.nodeType === D.CommentNode && !e.nodeValue && e.parentNode.removeChild(e));
1565
- });
1566
- }
1567
- }
1568
- i.$hostElement$ = e, a();
1569
- }, ur = (e, t, r, i, a, o, s, c = []) => {
1570
- let l, u, d, f, p = a["s-sc"];
1571
- if (o.nodeType === D.ElementNode) {
1572
- if (l = o.getAttribute(fe), l && (u = l.split("."), u[0] === s || u[0] === "0")) {
1573
- d = fr({
1574
- $hostId$: u[0],
1575
- $nodeId$: u[1],
1576
- $depth$: u[2],
1577
- $index$: u[3],
1578
- $tag$: o.tagName.toLowerCase(),
1579
- $elm$: o,
1580
- $attrs$: { class: o.className || "" }
1581
- }), t.push(d), o.removeAttribute(fe), e.$children$ || (e.$children$ = []), n.scoped && p && u[0] === s && (o["s-si"] = p, d.$attrs$.class += " " + p);
1582
- let a = d.$elm$.getAttribute("s-sn");
1583
- typeof a == "string" && (d.$tag$ === "slot-fb" && (pr(a, u[2], d, o, e, t, r, i, c), n.scoped && p && o.classList.add(p)), d.$elm$["s-sn"] = a, d.$elm$.removeAttribute("s-sn")), d.$index$ !== void 0 && (e.$children$[d.$index$] = d), e = d, i && d.$depth$ === "0" && (i[d.$index$] = d.$elm$);
1584
- }
1585
- if (o.shadowRoot) for (f = o.shadowRoot.childNodes.length - 1; f >= 0; f--) ur(e, t, r, i, a, o.shadowRoot.childNodes[f], s, c);
1586
- let m = o.__childNodes || o.childNodes;
1587
- for (f = m.length - 1; f >= 0; f--) ur(e, t, r, i, a, m[f], s, c);
1588
- } else if (o.nodeType === D.CommentNode) u = o.nodeValue.split("."), (u[1] === s || u[1] === "0") && (l = u[0], d = fr({
1589
- $hostId$: u[1],
1590
- $nodeId$: u[2],
1591
- $depth$: u[3],
1592
- $index$: u[4] || "0",
1593
- $elm$: o
1594
- }), l === "t" ? (d.$elm$ = hr(o, D.TextNode), d.$elm$ && d.$elm$.nodeType === D.TextNode && (d.$text$ = d.$elm$.textContent, t.push(d), o.remove(), s === d.$hostId$ && (e.$children$ || (e.$children$ = []), e.$children$[d.$index$] = d), i && d.$depth$ === "0" && (i[d.$index$] = d.$elm$))) : l === "c" ? (d.$elm$ = hr(o, D.CommentNode), d.$elm$ && d.$elm$.nodeType === D.CommentNode && (t.push(d), o.remove())) : d.$hostId$ === s && (l === "s" ? pr(o["s-sn"] = u[5] || "", u[2], d, o, e, t, r, i, c) : l === "r" && (n.shadowDom && i ? o.remove() : n.slotRelocation && (a["s-cr"] = o, o["s-cn"] = !0))));
1595
- else if (e && e.$tag$ === "style") {
1596
- let t = Q(null, o.textContent);
1597
- t.$elm$ = o, t.$index$ = "0", e.$children$ = [t];
1598
- }
1599
- return e;
1600
- }, dr = (e, t) => {
1601
- if (e.nodeType === D.ElementNode) {
1602
- let n = e["s-id"] || e.getAttribute("s-id");
1603
- n && t.set(n, e);
1604
- let r = 0;
1605
- if (e.shadowRoot) for (; r < e.shadowRoot.childNodes.length; r++) dr(e.shadowRoot.childNodes[r], t);
1606
- let i = e.__childNodes || e.childNodes;
1607
- for (r = 0; r < i.length; r++) dr(i[r], t);
1608
- } else if (e.nodeType === D.CommentNode) {
1609
- let n = e.nodeValue.split(".");
1610
- n[0] === "o" && (t.set(n[1] + "." + n[2], e), e.nodeValue = "", e["s-en"] = n[3]);
1611
- }
1612
- }, fr = (e) => ({
1613
- $flags$: 0,
1614
- $index$: "0",
1615
- ...e
1616
- });
1617
- function pr(e, t, r, i, a, o, s, c, l) {
1618
- i["s-sr"] = !0, r.$name$ = e || null, r.$tag$ = "slot";
1619
- let u = a?.$elm$ ? a.$elm$["s-id"] || a.$elm$.getAttribute("s-id") : "";
1620
- if (n.shadowDom && c && I.document) {
1621
- let n = r.$elm$ = I.document.createElement(r.$tag$);
1622
- r.$name$ && r.$elm$.setAttribute("name", e), a.$elm$.shadowRoot && u && u !== r.$hostId$ ? V(a.$elm$, "insertBefore")(n, V(a.$elm$, "children")[0]) : V(V(i, "parentNode"), "insertBefore")(n, i), mr(l, t, e, i, r.$hostId$), i.remove(), r.$depth$ === "0" && (c[r.$index$] = r.$elm$);
1623
- } else {
1624
- let n = r.$elm$, o = u && u !== r.$hostId$ && a.$elm$.shadowRoot;
1625
- mr(l, t, e, i, o ? u : r.$hostId$), ot(i), o && a.$elm$.insertBefore(n, a.$elm$.children[0]);
1626
- }
1627
- o.push(r), s.push(r), a.$children$ ||= [], a.$children$[r.$index$] = r;
1628
- }
1629
- var mr = (e, t, n, r, i) => {
1630
- let a = r.nextSibling, o = e[t] ||= [];
1631
- if (a && !a.nodeValue?.startsWith("s.")) do {
1632
- let e = a.getAttribute && a.getAttribute("slot");
1633
- (e || a["s-sn"]) !== n && (n !== "" || a["s-sn"] || e || a.nodeType !== D.CommentNode && a.nodeType !== D.TextNode) || (a["s-sn"] = n, o.push({
1634
- slot: r,
1635
- node: a,
1636
- hostId: i
1637
- })), a = a.nextSibling;
1638
- } while (a && !a.nodeValue?.startsWith("s."));
1639
- }, hr = (e, t) => {
1640
- let n = e;
1641
- do
1642
- n = n.nextSibling;
1643
- while (n && (n.nodeType !== t || !n.nodeValue));
1644
- return n;
1645
- }, gr = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), _r = (e) => {
1646
- let t = [], n = 0;
1647
- return e = e.replace(/(\[\s*part~=\s*("[^"]*"|'[^']*')\s*\])/g, (e, r) => {
1648
- let i = `__part-${n}__`;
1649
- return t.push(r), n++, i;
1650
- }), e = e.replace(/(\[[^\]]*\])/g, (e, r) => {
1651
- let i = `__ph-${n}__`;
1652
- return t.push(r), n++, i;
1653
- }), {
1654
- content: e.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (e, r, i) => {
1655
- let a = `__ph-${n}__`;
1656
- return t.push(i), n++, r + a;
1657
- }),
1658
- placeholders: t
1659
- };
1660
- }, vr = (e, t) => (t = t.replace(/__part-(\d+)__/g, (t, n) => e[+n]), t.replace(/__ph-(\d+)__/g, (t, n) => e[+n])), yr = "-shadowcsshost", br = "-shadowcssslotted", xr = "-shadowcsscontext", Sr = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", Cr, wr, Tr, Er = () => Cr ??= RegExp("(-shadowcsshost" + Sr, "gim"), Dr = () => wr ??= RegExp("(-shadowcsscontext" + Sr, "gim"), Or = () => Tr ??= RegExp("(-shadowcssslotted" + Sr, "gim"), $ = "-shadowcsshost-no-combinator", kr = /-shadowcsshost-no-combinator([^\s]*)/, Ar = [/::shadow/g, /::content/g], jr = /__part-(\d+)__/g, Mr = /-shadowcsshost/gim, Nr = (e) => {
1661
- let t = gr(e);
1662
- return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`, "g");
1663
- }, Pr = /\/\*\s*[\s\S]*?\*\//g, Fr = (e) => e.replace(Pr, ""), Ir = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g, Lr = (e) => e.match(Ir) || [], Rr = /(\s*)([^;{}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g, zr = /([{}])/g, Br = /(^.*?[^\\])??((:+)(.*)|$)/, Vr = "{", Hr = "}", Ur = "%BLOCK%", Wr = (e, t) => {
1664
- let n = Gr(e), r = 0;
1665
- return n.escapedString.replace(Rr, (...e) => {
1666
- let i = e[2], a = "", o = e[4], s = "";
1667
- o && o.startsWith("{%BLOCK%") && (a = n.blocks[r++], o = o.substring(8), s = "{");
1668
- let c = t({
1669
- selector: i,
1670
- content: a
1671
- });
1672
- return `${e[1]}${c.selector}${e[3]}${s}${c.content}${o}`;
1673
- });
1674
- }, Gr = (e) => {
1675
- let t = e.split(zr), n = [], r = [], i = 0, a = [];
1676
- for (let e = 0; e < t.length; e++) {
1677
- let o = t[e];
1678
- o === Hr && i--, i > 0 ? a.push(o) : (a.length > 0 && (r.push(a.join("")), n.push(Ur), a = []), n.push(o)), o === Vr && i++;
1679
- }
1680
- return a.length > 0 && (r.push(a.join("")), n.push(Ur)), {
1681
- escapedString: n.join(""),
1682
- blocks: r
1683
- };
1684
- }, Kr = (e) => {
1685
- let t = [];
1686
- e = e.replace(/@supports\s+selector\s*\(\s*([^)]*)\s*\)/g, (e, n) => {
1687
- let r = `__supports_${t.length}__`;
1688
- return t.push(n), `@supports selector(${r})`;
1689
- });
1690
- let n = Nr("::slotted"), r = Nr(":host"), i = Nr(":host-context");
1691
- return e = e.replace(i, `$1${xr}`).replace(r, `$1${yr}`).replace(n, `$1${br}`), t.forEach((t, n) => {
1692
- e = e.replace(`__supports_${n}__`, t);
1693
- }), e;
1694
- }, qr = (e, t, n) => e.replace(t, (...e) => {
1695
- if (e[2]) {
1696
- let t = e[2].split(","), r = [];
1697
- for (let i = 0; i < t.length; i++) {
1698
- let a = t[i].trim();
1699
- if (!a) break;
1700
- r.push(n($, a, e[3]));
1701
- }
1702
- return r.join(",");
1703
- }
1704
- return $ + e[3];
1705
- }), Jr = (e, t, n) => e + t.replace(yr, "") + n, Yr = (e) => qr(e, Er(), Jr), Xr = (e, t, n) => t.indexOf(yr) > -1 ? Jr(e, t, n) : e + t + n + ", " + t + " " + e + n, Zr = (e, t) => {
1706
- let n = "." + t + " > ", r = [];
1707
- return e = e.replace(Or(), (...e) => {
1708
- if (e[2]) {
1709
- let t = e[2].trim(), i = e[3], a = n + t + i, o = "";
1710
- for (let t = e[4] - 1; t >= 0; t--) {
1711
- let n = e[5][t];
1712
- if (n === "}" || n === ",") break;
1713
- o = n + o;
1714
- }
1715
- let s = (o + a).trim(), c = `${o.trimEnd()}${a.trim()}`.trim();
1716
- if (s !== c) {
1717
- let e = `${c}, ${s}`;
1718
- r.push({
1719
- orgSelector: s,
1720
- updatedSelector: e
1721
- });
1722
- }
1723
- return a;
1724
- }
1725
- return $ + e[3];
1726
- }), {
1727
- selectors: r,
1728
- cssText: e
1729
- };
1730
- }, Qr = (e) => qr(e, Dr(), Xr), $r = (e) => Ar.reduce((e, t) => e.replace(t, " "), e), ei = (e) => (e = e.replace(/\[/g, "\\[").replace(/\]/g, "\\]"), RegExp("^(" + e + ")([>\\s~+[.,{:][\\s\\S]*)?$", "m")), ti = (e, t) => !ei(t).test(e), ni = (e, t) => e.replace(Br, (e, n = "", r, i = "", a = "") => n + t + i + a), ri = (e, t, n) => {
1731
- if (Mr.lastIndex = 0, Mr.test(e)) {
1732
- let t = `.${n}`;
1733
- return e.replace(kr, (e, n) => ni(n, t)).replace(Mr, t + " ");
1734
- }
1735
- return t + " " + e;
1736
- }, ii = (e, t, n) => {
1737
- t = t.replace(/\[is=([^\]]*)\]/g, (e, ...t) => t[0]);
1738
- let r = "." + t, i = (e) => {
1739
- let i = e.trim();
1740
- if (!i) return "";
1741
- if (e.indexOf($) > -1) i = ri(e, t, n);
1742
- else {
1743
- let t = e.replace(Mr, "");
1744
- t.length > 0 && (i = ni(t, r));
1745
- }
1746
- return i;
1747
- }, a = _r(e);
1748
- e = a.content;
1749
- let o = "", s = 0, c, l = /( |>|\+|~(?!=))(?=(?:[^()]*\([^()]*\))*[^()]*$)\s*/g, u = !(e.indexOf($) > -1);
1750
- for (; (c = l.exec(e)) !== null;) {
1751
- let t = c[1], n = e.slice(s, c.index).trim();
1752
- u ||= n.indexOf($) > -1;
1753
- let r = u ? i(n) : n;
1754
- o += `${r} ${t} `, s = l.lastIndex;
1755
- }
1756
- let d = e.substring(s);
1757
- return u = !d.match(jr) && (u || d.indexOf($) > -1), o += u ? i(d) : d, vr(a.placeholders, o);
1758
- }, ai = (e, t, n, r) => e.split(",").map((e) => r && e.indexOf("." + r) > -1 ? e.trim() : ti(e, t) ? ii(e, t, n).trim() : e.trim()).join(", "), oi = (e) => e.startsWith("@media") || e.startsWith("@supports") || e.startsWith("@page") || e.startsWith("@document") || e.startsWith("@layer") || e.startsWith("@container"), si = (e, t, n, r, i) => Wr(e, (e) => {
1759
- let a = e.selector, o = e.content;
1760
- return e.selector[0] === "@" ? oi(e.selector) && (o = si(e.content, t, n, r, i)) : a = ai(e.selector, t, n, r), {
1761
- selector: a.replace(/\s{2,}/g, " ").trim(),
1762
- content: o
1763
- };
1764
- }), ci = (e, t, n, r, i) => {
1765
- e = Kr(e), e = Yr(e), e = Qr(e);
1766
- let a = Zr(e, r);
1767
- return e = a.cssText, e = $r(e), t && (e = si(e, t, n, r, i)), e = li(e, n), e = e.replace(/>\s*\*\s+([^{, ]+)/gm, " $1 "), {
1768
- cssText: e.trim(),
1769
- slottedSelectors: a.selectors.map((e) => ({
1770
- orgSelector: li(e.orgSelector, n),
1771
- updatedSelector: li(e.updatedSelector, n)
1772
- }))
1773
- };
1774
- }, li = (e, t) => e.replace(/-shadowcsshost-no-combinator/g, `.${t}`), ui = (e) => {
1775
- let t = /([^\s,{][^,{]*?)::part\(\s*([^)]+?)\s*\)((?:[:.][^,{]*)*)/g;
1776
- return Wr(e, (e) => (e.selector[0] === "@" || (e.selector = e.selector.split(",").map((n) => {
1777
- let r = [n.trim()], i;
1778
- for (; (i = t.exec(n)) !== null;) {
1779
- let t = i[1].trimEnd(), a = i[2].trim().split(/\s+/), o = i[3] || "", s = a.flatMap((t) => e.selector.includes(`[part~="${t}"]`) ? [] : [`[part~="${t}"]`]).join(""), c = `${t} ${s}${o}`;
1780
- s && c !== n.trim() && r.push(c);
1781
- }
1782
- return r.join(", ");
1783
- }).join(", ")), e));
1784
- }, di = (e, t, n) => {
1785
- let r = t + "-h", i = t + "-s", a = Lr(e);
1786
- e = Fr(e);
1787
- let o = [];
1788
- if (n) {
1789
- let t = (e) => {
1790
- let t = `/*!@___${o.length}___*/`, n = `/*!@${e.selector}*/`;
1791
- return o.push({
1792
- placeholder: t,
1793
- comment: n
1794
- }), e.selector = t + e.selector, e;
1795
- }, n = (e) => Wr(e, (e) => e.selector[0] === "@" ? (oi(e.selector) && (e.content = n(e.content)), e) : t(e));
1796
- e = n(e);
1797
- }
1798
- let s = ci(e, t, r, i, n);
1799
- return e = [s.cssText, ...a].join("\n"), n && o.forEach(({ placeholder: t, comment: n }) => {
1800
- e = e.replace(t, n);
1801
- }), s.slottedSelectors.forEach((t) => {
1802
- let n = RegExp(gr(t.orgSelector) + "(?=\\s*[,{]|$)", "g");
1803
- e = e.replace(n, t.updatedSelector);
1804
- }), e = ui(e), e;
1805
- }, fi = (e) => Ne.map((t) => t(e)).find((e) => !!e), pi = (e) => {
1806
- if (!e) return;
1807
- let t = Object.keys(e);
1808
- if (t.length === 0) return;
1809
- let n = !1;
1810
- for (let r of t) {
1811
- if (n) break;
1812
- for (let t of e[r]) if (typeof t == "string") {
1813
- n = !0;
1814
- break;
1815
- }
1816
- }
1817
- if (!n) return e;
1818
- let r = {};
1819
- for (let n of t) r[n] = e[n].map((e) => typeof e == "string" ? { [e]: 0 } : e);
1820
- return r;
1821
- }, mi = (e, t) => e != null && !Ut(e) ? n.propBoolean && t & O.Boolean ? e === "" || !!e : n.propNumber && t & O.Number ? typeof e == "string" ? parseFloat(e) : typeof e == "number" ? e : NaN : n.propString && t & O.String ? String(e) : e : e, hi = (e, t, n, r, i) => {
1822
- let a = (i) => {
1823
- let a = r;
1824
- for (let e of t.$serializers$[n]) {
1825
- let [[t]] = Object.entries(e);
1826
- a = i[t](a, n);
1827
- }
1828
- e.$serializerValues$.set(n, a);
1829
- };
1830
- i ? a(i) : e.$fetchedCbList$.push(() => a(e.$lazyInstance$));
1831
- }, gi = (e, t) => {
1832
- if (n.signalBacking) {
1833
- let n = M(e)?.$signalValues$?.get(t);
1834
- if (n !== void 0) return n.value;
1835
- }
1836
- return M(e).$instanceValues$.get(t);
1837
- }, _i = (e, t, r, i) => {
1838
- let a = M(e);
1839
- if (n.signalBacking) {
1840
- let o = a?.$signalValues$?.get(t);
1841
- if (o !== void 0) {
1842
- let s = mi(r, i.$members$[t][0]);
1843
- if (n.serializer && n.reflect && i.$attrsToReflect$ && i.$serializers$?.[t]) {
1844
- let r = n.lazyLoad ? a.$hostElement$ : e;
1845
- hi(a, i, t, s, n.lazyLoad ? a.$lazyInstance$ : r);
1846
- }
1847
- Number.isNaN(o.peek()) && Number.isNaN(s) || (o.value = s);
1848
- return;
1849
- }
1850
- }
1851
- if (!a) {
1852
- if (n.lazyLoad) throw Error(n.isDev ? `Couldn't find host element for "${i.$tagName$}". This usually happens when integrating a 3rd party Stencil component with another Stencil runtime. See https://github.com/stenciljs/core/issues/5457` : `Host element not found for "${i.$tagName$}"`);
1853
- return;
1854
- }
1855
- if (n.serializer && a.$serializerValues$.has(t) && a.$serializerValues$.get(t) === r) return;
1856
- let o = n.lazyLoad ? a.$hostElement$ : e, s = a.$instanceValues$.get(t), c = a.$flags$, l = n.lazyLoad ? a.$lazyInstance$ : o;
1857
- r = mi(r, i.$members$[t][0]);
1858
- let u = r !== s && !(Number.isNaN(s) && Number.isNaN(r));
1859
- if ((!n.lazyLoad || !(c & A.isConstructingInstance) || s === void 0) && u) {
1860
- if (a.$instanceValues$.set(t, r), n.serializer && n.reflect && i.$attrsToReflect$ && i.$serializers$?.[t] && hi(a, i, t, r, l), n.isDev && (a.$flags$ & A.devOnRender ? P(`The state/prop "${t}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`, "\nElement", o, "\nNew value", r, "\nOld value", s) : a.$flags$ & A.devOnDidLoad && P(`The state/prop "${t}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`, "\nElement", o, "\nNew value", r, "\nOld value", s)), n.propChangeCallback && i.$watchers$) {
1861
- let e = i.$watchers$[t];
1862
- e && e.map((e) => {
1863
- try {
1864
- let [[i, o]] = Object.entries(e);
1865
- if (c & A.isWatchReady || o & ve.Immediate) {
1866
- if (n.signalBacking && !a.$signalValues$) return;
1867
- l ? l[i](r, s, t) : a.$fetchedCbList$.push(() => {
1868
- a.$lazyInstance$[i](r, s, t);
1869
- });
1870
- }
1871
- } catch (e) {
1872
- N(e, o);
1873
- }
1874
- });
1875
- }
1876
- if (n.updatable && c & A.hasRendered) {
1877
- if (l.componentShouldUpdate) {
1878
- let e = a.$queuedPropChanges$ ||= {};
1879
- e[t] = {
1880
- newVal: r,
1881
- oldVal: e[t]?.oldVal ?? s
1882
- };
1883
- }
1884
- c & A.isQueuedForUpdate || zn(a, !1);
1885
- }
1886
- }
1887
- }, vi = (e) => e == null || e === !1 ? null : e === !0 ? "" : String(e), yi = (e, t) => {
1888
- let n = e.$lazyInstance$;
1889
- if (n) {
1890
- for (let [r, [i]] of Object.entries(t.$members$ ?? {})) if (i & O.Setter && e.$instanceValues$.has(r)) {
1891
- let t = e.$instanceValues$.get(r);
1892
- n[r] !== t && (n[r] = t);
1893
- }
1894
- }
1895
- }, bi = (e, t, r) => {
1896
- let i = e.prototype;
1897
- if (n.isTesting) {
1898
- if (i.__stencilAugmented) return;
1899
- i.__stencilAugmented = !0;
1900
- }
1901
- if (n.formAssociated && t.$flags$ & j.formAssociated && r & T.isElementConstructor && ge.forEach((e) => {
1902
- let t = i[e];
1903
- Object.defineProperty(i, e, { value(...r) {
1904
- let i = M(this), a = n.lazyLoad ? i?.$lazyInstance$ : this;
1905
- if (!a) i?.$onReadyPromise$?.then((t) => {
1906
- let n = t[e];
1907
- typeof n == "function" && n.call(t, ...r);
1908
- });
1909
- else {
1910
- let i = n.lazyLoad ? a[e] : t;
1911
- typeof i == "function" && i.call(a, ...r);
1912
- }
1913
- } });
1914
- }), n.member && t.$members$ || n.propChangeCallback) {
1915
- n.propChangeCallback && (e.watchers && !t.$watchers$ && (t.$watchers$ = pi(e.watchers)), e.deserializers && !t.$deserializers$ && (t.$deserializers$ = e.deserializers), e.serializers && !t.$serializers$ && (t.$serializers$ = e.serializers));
1916
- let a = Object.entries(t.$members$ ?? {});
1917
- if (a.map(([e, [a]]) => {
1918
- if ((n.prop || n.state) && (a & O.Prop || (!n.lazyLoad || r & T.proxyState) && a & O.State)) {
1919
- let { get: o, set: s } = Ce(i, e) || {};
1920
- o && (t.$members$[e][0] |= O.Getter), s && (t.$members$[e][0] |= O.Setter), (r & T.isElementConstructor || !o) && Object.defineProperty(i, e, {
1921
- get() {
1922
- if (n.lazyLoad) {
1923
- if ((t.$members$[e][0] & O.Getter) === 0) return gi(this, e);
1924
- let n = M(this);
1925
- return n ? n.$lazyInstance$ ? n.$lazyInstance$[e] : gi(this, e) : i[e];
1926
- }
1927
- if (!n.lazyLoad) return o ? o.apply(this) : gi(this, e);
1928
- },
1929
- configurable: !0,
1930
- enumerable: !0
1931
- }), Object.defineProperty(i, e, { set(i) {
1932
- let o = M(this);
1933
- if (o) {
1934
- if (n.isDev && (r & T.isElementConstructor) === 0 && (t.$members$[e][0] & O.Setter) === 0 && (o && o.$flags$ & A.isConstructingInstance) === 0 && (a & O.Prop) !== 0 && (a & O.Mutable) === 0 && P(`@Prop() "${e}" on <${t.$tagName$}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`), s) (a & O.State ? this[e] : o.$hostElement$[e]) === void 0 && o.$instanceValues$.get(e) && (i = o.$instanceValues$.get(e)), s.apply(this, [mi(i, a)]), i = a & O.State ? this[e] : o.$hostElement$[e], _i(this, e, i, t);
1935
- else if (!n.lazyLoad) _i(this, e, i, t);
1936
- else if (n.lazyLoad) {
1937
- if ((r & T.isElementConstructor) === 0 || (t.$members$[e][0] & O.Setter) === 0) {
1938
- _i(this, e, i, t);
1939
- return;
1940
- }
1941
- let n = mi(i, a);
1942
- if (o.$lazyInstance$) {
1943
- let r = o.$lazyInstance$[e];
1944
- !o.$instanceValues$.get(e) && r && o.$instanceValues$.set(e, r), o.$lazyInstance$[e] = n, _i(this, e, o.$lazyInstance$[e], t);
1945
- } else o.$instanceValues$.set(e, n);
1946
- }
1947
- }
1948
- } });
1949
- } else n.lazyLoad && n.method && r & T.isElementConstructor && a & O.Method && Object.defineProperty(i, e, { value(...t) {
1950
- let n = M(this);
1951
- return n?.$onInstancePromise$?.then(() => n.$lazyInstance$?.[e](...t));
1952
- } });
1953
- }), n.observeAttribute && (!n.lazyLoad || r & T.isElementConstructor)) {
1954
- let r = /* @__PURE__ */ new Map();
1955
- i.attributeChangedCallback = function(e, o, s) {
1956
- L.jmp(() => {
1957
- let c = r.get(e), l = M(this);
1958
- if (n.serializer && l.$serializerValues$.has(c) && l.$serializerValues$.get(c) === s) return;
1959
- if (this.hasOwnProperty(c) && n.lazyLoad && (s = this[c], delete this[c]), n.deserializer && t.$deserializers$ && t.$deserializers$[c]) {
1960
- let e = (e, t) => {
1961
- let n = t?.[e](s, c);
1962
- n !== this[c] && (this[c] = n);
1963
- };
1964
- for (let r of t.$deserializers$[c]) {
1965
- let [[t]] = Object.entries(r);
1966
- n.lazyLoad ? l.$lazyInstance$ ? e(t, l.$lazyInstance$) : l.$fetchedCbList$.push(() => {
1967
- e(t, l.$lazyInstance$);
1968
- }) : e(t, this);
1969
- }
1970
- return;
1971
- }
1972
- if (i.hasOwnProperty(c) && typeof this[c] == "number" && this[c] == s) return;
1973
- if (c == null) {
1974
- let r = l?.$flags$;
1975
- if (l && r && !(r & A.isConstructingInstance) && s !== o) {
1976
- let i = n.lazyLoad ? l.$hostElement$ : this, a = n.lazyLoad ? l.$lazyInstance$ : i;
1977
- (t.$watchers$?.[e])?.forEach((t) => {
1978
- let [[n, i]] = Object.entries(t);
1979
- a[n] != null && (r & A.isWatchReady || i & ve.Immediate) && a[n](s, o, e);
1980
- });
1981
- }
1982
- return;
1983
- }
1984
- let u = a.find(([e]) => e === c), d = u ? u[1][0] : 0, f = d & O.Boolean;
1985
- if (n.reflect && d & O.ReflectAttr && d & O.Any && !Ut(this[c]) && vi(this[c]) === s) return;
1986
- let p = f && s === null && this[c] === void 0;
1987
- f && (n.isDev && s === "false" && P(`<${t.$tagName$} ${e}="false">: boolean attributes are true when present, regardless of value. Remove the attribute or set the "${c}" property to false instead.`), s = s !== null);
1988
- let m = Object.getOwnPropertyDescriptor(i, c);
1989
- p || s == this[c] || m.get && !m.set || (this[c] = s);
1990
- });
1991
- }, e.observedAttributes = Array.from(/* @__PURE__ */ new Set([...Object.keys(t.$watchers$ ?? {}), ...a.filter(([e, t]) => t[0] & O.HasAttribute).map(([e, i]) => {
1992
- let a = i[1] || e;
1993
- return r.set(a, e), n.reflect && i[0] & O.ReflectAttr && t.$attrsToReflect$?.push([e, a]), a;
1994
- })]));
1995
- }
1996
- }
1997
- return e;
1998
- }, xi = async (e, t, r, i) => {
1999
- let a;
2000
- try {
2001
- if ((t.$flags$ & A.hasInitializedComponent) === 0) {
2002
- t.$flags$ |= A.hasInitializedComponent, t.$flags$ &= ~A.hasFailedLoad;
2003
- let o = r.$lazyBundleId$;
2004
- if (n.lazyLoad && o) {
2005
- let o = Me(r, t, i);
2006
- if (o && "then" in o) {
2007
- let e = At(`st:load:${r.$tagName$}:${t.$modeName$}`, `[Stencil] Load module for <${r.$tagName$}>`);
2008
- a = await o, e();
2009
- } else a = o;
2010
- if (!a) throw t.$flags$ &= ~A.hasInitializedComponent, t.$loadRetryCount$ = (t.$loadRetryCount$ ?? 0) + 1, t.$loadRetryCount$ < 3 && (t.$flags$ |= A.hasFailedLoad), Error(`Constructor for "${r.$tagName$}#${t.$modeName$}" was not found`);
2011
- n.member && !a.isProxied && (n.propChangeCallback && (r.$watchers$ = pi(a.watchers), r.$serializers$ = a.serializers, r.$deserializers$ = a.deserializers), bi(a, r, T.proxyState), a.isProxied = !0);
2012
- let s = H("createInstance", r.$tagName$);
2013
- n.member && (t.$flags$ |= A.isConstructingInstance);
2014
- try {
2015
- new a(t);
2016
- } catch (t) {
2017
- N(t, e);
2018
- }
2019
- n.member && (t.$flags$ &= ~A.isConstructingInstance, yi(t, r)), s(), n.asyncLoading && t.$ancestorComponent$ && await Ln(t.$ancestorComponent$, Yt(e)), n.slotRelocation && r.$flags$ & j.hasSlotRelocation ? queueMicrotask(() => {
2020
- Si(t.$lazyInstance$, e), n.asyncLoading && In(t);
2021
- }) : (Si(t.$lazyInstance$, e), n.asyncLoading && In(t));
2022
- } else a = e.constructor;
2023
- if (n.style && a && a.style) {
2024
- let o;
2025
- typeof a.style == "string" ? o = a.style : n.mode && typeof a.style != "string" && (t.$modeName$ = fi(e), t.$modeName$ && (o = a.style[t.$modeName$]), n.hydrateServerSide && t.$modeName$ && e.setAttribute("s-mode", t.$modeName$));
2026
- let s = zt(r, t.$modeName$);
2027
- if (!F.has(s) || n.hotModuleReplacement && i) {
2028
- let e = H("registerStyles", r.$tagName$);
2029
- n.hydrateServerSide && n.shadowDom && (r.$flags$ & j.shadowNeedsScopedCss ? o = di(o, s, !0) : Pe() && (o = ui(o))), It(s, o, !!(r.$flags$ & j.shadowDomEncapsulation)), e();
2030
- }
2031
- }
2032
- }
2033
- n.signalBacking && r.$members$ ? er(e, t, r) : n.vdomSignals && tr(e, t);
2034
- let o = t.$ancestorComponent$, s = () => zn(t, !0);
2035
- n.asyncLoading && o && o["s-rc"] ? o["s-rc"].push(s) : s();
2036
- } catch (r) {
2037
- N(r, e), n.asyncLoading && t.$onRenderResolve$ && (t.$onRenderResolve$(), t.$onRenderResolve$ = void 0), n.asyncLoading && In(t), n.asyncLoading && t.$onReadyResolve$ && !(t.$flags$ & A.hasFailedLoad) && t.$onReadyResolve$(e);
2038
- }
2039
- }, Si = (e, t) => {
2040
- n.lazyLoad && Z(e, "connectedCallback", void 0, t);
2041
- }, Ci = (e) => {
2042
- if ((L.$flags$ & E.isTmpDisconnected) === 0) {
2043
- let t = M(e);
2044
- if (!t) return;
2045
- let r = t.$cmpMeta$, i = H("connectedCallback", r.$tagName$);
2046
- if (t.$flags$ & A.hasConnected) Mi(e, t, r.$listeners$), t?.$lazyInstance$ ? Si(t.$lazyInstance$, e) : t.$flags$ & A.hasFailedLoad ? setTimeout(() => xi(e, t, r), he) : t?.$onReadyPromise$ && t.$onReadyPromise$.then(() => Si(t.$lazyInstance$, e));
2047
- else {
2048
- t.$flags$ |= A.hasConnected;
2049
- let i;
2050
- if (n.hydrateClientSide && (i = e.getAttribute(ue), i)) {
2051
- if (n.shadowDom && r.$flags$ & j.shadowDomEncapsulation) {
2052
- let t = Ot(e), i = n.mode ? Lt(t, r, e.getAttribute("s-mode")) : Lt(t, r);
2053
- e.classList.remove(i + "-h", i + "-s");
2054
- } else n.scoped && r.$flags$ & j.scopedCssEncapsulation && (e["s-sc"] = zt(r, n.mode ? e.getAttribute("s-mode") : void 0));
2055
- lr(e, r.$tagName$, i, t);
2056
- }
2057
- if (n.slotRelocation && !i && (n.hydrateServerSide || (n.slot || n.shadowDom) && r.$flags$ & j.hasSlotRelocation) && wi(e), n.asyncLoading) {
2058
- let r = e;
2059
- for (; r = r.parentNode || r.host;) if (n.hydrateClientSide && !r["s-p"] && r.nodeType === D.ElementNode && r.hasAttribute("s-id") && (r["s-p"] = [], r["s-rc"] = [], r["s-pc"] = []), r["s-p"]) {
2060
- Rn(t, t.$ancestorComponent$ = r);
2061
- break;
2062
- }
2063
- }
2064
- if (n.prop && !n.hydrateServerSide && r.$members$ && Object.entries(r.$members$).map(([t, [n]]) => {
2065
- if (n & O.Prop && Object.prototype.hasOwnProperty.call(e, t)) {
2066
- if (r.$flags$ & j.hasModernPropertyDecls) {
2067
- let n = Object.getOwnPropertyDescriptor(e, t);
2068
- if (n && (n.get || n.set)) return;
2069
- }
2070
- let n = e[t];
2071
- delete e[t], e[t] = n;
2072
- }
2073
- }), !n.lazyLoad && n.prop && !n.hydrateServerSide) {
2074
- let t = e["s-pp"];
2075
- t && (delete e["s-pp"], t.forEach((t, n) => {
2076
- e[n] = t;
2077
- }));
2078
- }
2079
- n.initializeNextTick ? Ye(() => xi(e, t, r)) : xi(e, t, r);
2080
- }
2081
- i();
2082
- }
2083
- }, wi = (e) => {
2084
- if (!I.document) return;
2085
- let t = e["s-cr"] = I.document.createComment(n.isDebug ? `content-ref (host=${e.localName})` : "");
2086
- t["s-cn"] = !0, X(e, t, e.firstChild);
2087
- }, Ti = (e, t) => {
2088
- n.lazyLoad && Z(e, "disconnectedCallback", void 0, t || e);
2089
- }, Ei = async (e) => {
2090
- if ((L.$flags$ & E.isTmpDisconnected) === 0) {
2091
- let t = M(e);
2092
- n.hostListener && t?.$rmListeners$ && (t.$rmListeners$.map((e) => e()), t.$rmListeners$ = void 0), n.vdomSignals && t?.$signalCleanup$ && (t.$signalCleanup$(), t.$signalCleanup$ = void 0), n.asyncLoading && t && !(t.$flags$ & A.hasFiredConnected) && In(t), n.lazyLoad ? t?.$lazyInstance$ ? Ti(t.$lazyInstance$, e) : t?.$onReadyPromise$ && t.$onReadyPromise$.then(() => Ti(t.$lazyInstance$, e)) : Ti(e);
2093
- }
2094
- U.has(e) && U.delete(e), e.shadowRoot && U.has(e.shadowRoot) && U.delete(e.shadowRoot);
2095
- }, Di = (e, t, r) => {
2096
- if (n.lazyLoad) {
2097
- let i = M(e);
2098
- if (!i) return;
2099
- i.$flags$ = A.hasConnected, n.hostListener && i.$rmListeners$ && (i.$rmListeners$.map((e) => e()), i.$rmListeners$ = void 0), xi(e, i, t, r);
2100
- } else Oi(e, t, r);
2101
- }, Oi = async (e, t, n) => {
2102
- let r = e.constructor.__stencil_module__;
2103
- if (!r) console.warn(`[Stencil HMR] No __stencil_module__ on <${t.$tagName$}> constructor - was this built with devMode?`);
2104
- else try {
2105
- let e = await import(
2106
- /* @vite-ignore */
2107
- `${r}?s-hmr=${n}`
2108
- ), i = Object.values(e).find((e) => typeof e == "function" && e.is === t.$tagName$) ?? e.default;
2109
- i && ki(t, i);
2110
- } catch (e) {
2111
- console.error(`[Stencil HMR] Failed to reload <${t.$tagName$}>`, e);
2112
- }
2113
- }, ki = (e, t) => {
2114
- let r = customElements.get(e.$tagName$), i = !!(e.$flags$ & j.shadowDomEncapsulation);
2115
- if (r && r !== t) {
2116
- for (let e of Object.getOwnPropertyNames(t.prototype)) e !== "constructor" && Object.defineProperty(r.prototype, e, Object.getOwnPropertyDescriptor(t.prototype, e));
2117
- let n = Object.getOwnPropertyDescriptor(t, "style");
2118
- if (n) {
2119
- Object.defineProperty(r, "style", n);
2120
- let a = t.style;
2121
- a && It(zt(e), a, i);
2122
- }
2123
- }
2124
- document.querySelectorAll(e.$tagName$).forEach((t) => {
2125
- let r = M(t);
2126
- n.hostListener && r?.$rmListeners$ && (r.$rmListeners$.map((e) => e()), r.$rmListeners$ = void 0, Mi(t, r, e.$listeners$)), !i && r && Rt(r), qn(t);
2127
- });
2128
- }, Ai = (e, t) => {
2129
- let n = Ii(t[1]), r = ji(e, t);
2130
- customElements.get(n) || customElements.define(n, r);
2131
- }, ji = (e, t) => {
2132
- n.profile && performance.mark && performance.getEntriesByName("st:app:start", "mark").length === 0 && performance.mark("st:app:start");
2133
- let r = {
2134
- $flags$: t[0],
2135
- $tagName$: t[1]
2136
- };
2137
- try {
2138
- n.member && (r.$members$ = t[2]), n.hostListener && (r.$listeners$ = t[3]), n.propChangeCallback && (r.$watchers$ = pi(e.$watchers$), r.$deserializers$ = e.$deserializers$, r.$serializers$ = e.$serializers$), n.reflect && (r.$attrsToReflect$ = []), n.hotModuleReplacement && (e.prototype["s-hmr"] = function(e) {
2139
- Di(this, r, e);
2140
- }, e["s-hmr-apply"] = (e) => ki(r, e)), !(r.$flags$ & j.shadowDomEncapsulation) && (n.slotCloneNode || n.patchClone && r.$flags$ & j.patchClone) && ut(e.prototype), !(r.$flags$ & j.shadowDomEncapsulation) && r.$flags$ & j.hasSlot && (n.lightDomPatches || n.patchAll && r.$flags$ & j.patchAll ? lt(e.prototype) : ((n.slotChildNodes || n.patchChildren && r.$flags$ & j.patchChildren) && vt(e.prototype), (n.slotDomMutations || n.patchInsert && r.$flags$ & j.patchInsert) && (dt(e.prototype), mt(e.prototype), pt(e.prototype), ht(e.prototype), gt(e.prototype), ft(e.prototype)), n.slotTextContent && _t(e.prototype))), n.hydrateClientSide && n.shadowDom && Vt();
2141
- let i = e.prototype.connectedCallback, a = e.prototype.disconnectedCallback;
2142
- return Object.assign(e.prototype, {
2143
- __hasHostListenerAttached: !1,
2144
- __registerHost() {
2145
- Te(this, r);
2146
- },
2147
- componentOnReady() {
2148
- return M(this)?.$onReadyPromise$;
2149
- },
2150
- async connectedCallback() {
2151
- let e = !this.__hasHostListenerAttached, t;
2152
- if (e) {
2153
- if (t = M(this), !t) return;
2154
- Mi(this, t, r.$listeners$), this.__hasHostListenerAttached = !0;
2155
- }
2156
- Ci(this), n.asyncLoading && t && t.$ancestorComponent$ && (await Ln(t.$ancestorComponent$, Yt(this)), !this.isConnected) || (i && (L.$flags$ & E.isTmpDisconnected) === 0 && i.call(this), n.asyncLoading && t && In(t));
2157
- },
2158
- disconnectedCallback() {
2159
- Ei(this), a && (L.$flags$ & E.isTmpDisconnected) === 0 && a.call(this);
2160
- },
2161
- __attachShadow() {
2162
- let e = n.shadowModeClosed && !!(r.$flags$ & j.shadowModeClosed), t = this.shadowRoot;
2163
- if (n.shadowModeClosed && e && (t = this.__shadowRoot ?? null), !t) $e.call(this, r);
2164
- else if (n.isDev && n.shadowModeClosed && e && t.mode !== "closed") throw Error(`Unable to re-use existing shadow root for ${r.$tagName$}! Mode is set to ${t.mode} but expected closed.`);
2165
- }
2166
- }), Object.defineProperty(e, "is", {
2167
- value: r.$tagName$,
2168
- configurable: !0
2169
- }), bi(e, r, T.isElementConstructor | T.proxyState);
2170
- } catch (t) {
2171
- return N(t), e;
2172
- }
2173
- }, Mi = (e, t, r) => {
2174
- n.hostListener && r && I.document && r.map(([r, i, a]) => {
2175
- let o = n.hostListenerTarget ? Pi(I.document, e, r) : e, s = Ni(t, a), c = Fi(r);
2176
- L.ael(o, i, s, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => L.rel(o, i, s, c));
2177
- });
2178
- }, Ni = (e, t) => (r) => {
2179
- try {
2180
- n.lazyLoad ? e.$flags$ & A.isListenReady ? e.$lazyInstance$?.[t](r) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([t, r]) : e.$hostElement$[t](r);
2181
- } catch (t) {
2182
- N(t, e.$hostElement$);
2183
- }
2184
- }, Pi = (e, t, r) => n.hostListenerTargetDocument && r & k.TargetDocument ? e : n.hostListenerTargetWindow && r & k.TargetWindow ? I : n.hostListenerTargetBody && r & k.TargetBody ? e.body : t, Fi = (e) => Ie ? {
2185
- passive: (e & k.Passive) !== 0,
2186
- capture: (e & k.Capture) !== 0
2187
- } : (e & k.Capture) !== 0;
2188
- n.lazyLoad || globalThis.HTMLElement;
2189
- function Ii(e) {
2190
- return e;
2191
- }
2192
- export { Kt as n, Ai as r, Fe as t };