@pie-players/pie-section-player-tools-tts-settings 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +220 -0
- package/TtsSettingsPanel.svelte +1813 -0
- package/dist/TtsSettingsPanel.svelte.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/pie-section-player-tools-tts-settings.css +2 -0
- package/dist/section-player-tools-tts-settings.js +3802 -0
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/index.ts +10 -0
- package/package.json +67 -0
|
@@ -0,0 +1,3802 @@
|
|
|
1
|
+
if (typeof window < "u") {
|
|
2
|
+
var As, Ms;
|
|
3
|
+
((As = (Ms = window).__svelte ?? (Ms.__svelte = {})).v ?? (As.v = /* @__PURE__ */ new Set())).add("5");
|
|
4
|
+
}
|
|
5
|
+
var dr = {}, ce = Symbol(), Pf = Symbol("filename");
|
|
6
|
+
var to = "http://www.w3.org/2000/svg";
|
|
7
|
+
var An = Array.isArray, ro = Array.prototype.indexOf, vr = Array.prototype.includes, Mn = Array.from, gn = Object.keys, mn = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, no = Object.getOwnPropertyDescriptors, io = Object.prototype, so = Array.prototype, Zs = Object.getPrototypeOf, Ps = Object.isExtensible, ao = () => {
|
|
8
|
+
};
|
|
9
|
+
function lo(e) {
|
|
10
|
+
for (var t = 0; t < e.length; t++) e[t]();
|
|
11
|
+
}
|
|
12
|
+
function Qs() {
|
|
13
|
+
var e, t;
|
|
14
|
+
return {
|
|
15
|
+
promise: new Promise((r, n) => {
|
|
16
|
+
e = r, t = n;
|
|
17
|
+
}),
|
|
18
|
+
resolve: e,
|
|
19
|
+
reject: t
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function Ur(e) {
|
|
23
|
+
"@babel/helpers - typeof";
|
|
24
|
+
return Ur = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
25
|
+
return typeof t;
|
|
26
|
+
} : function(t) {
|
|
27
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
28
|
+
}, Ur(e);
|
|
29
|
+
}
|
|
30
|
+
function oo(e, t) {
|
|
31
|
+
if (Ur(e) != "object" || !e) return e;
|
|
32
|
+
var r = e[Symbol.toPrimitive];
|
|
33
|
+
if (r !== void 0) {
|
|
34
|
+
var n = r.call(e, t || "default");
|
|
35
|
+
if (Ur(n) != "object") return n;
|
|
36
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
37
|
+
}
|
|
38
|
+
return (t === "string" ? String : Number)(e);
|
|
39
|
+
}
|
|
40
|
+
function uo(e) {
|
|
41
|
+
var t = oo(e, "string");
|
|
42
|
+
return Ur(t) == "symbol" ? t : t + "";
|
|
43
|
+
}
|
|
44
|
+
function Q(e, t, r) {
|
|
45
|
+
return (t = uo(t)) in e ? Object.defineProperty(e, t, {
|
|
46
|
+
value: r,
|
|
47
|
+
enumerable: !0,
|
|
48
|
+
configurable: !0,
|
|
49
|
+
writable: !0
|
|
50
|
+
}) : e[t] = r, e;
|
|
51
|
+
}
|
|
52
|
+
var fo = 1 << 24, Re = 1024, Qe = 2048, Ht = 4096, Ri = 8192, co = 16384, Oi = 32768, Cs = 1 << 25, Pn = 65536, Cf = 1 << 17, Rf = 1 << 18, yr = 1 << 19, vo = 1 << 20, Wr = 1 << 25, Gr = 65536, Rs = 1 << 21, po = 1 << 22, yn = 1 << 23, qt = Symbol("$state"), ea = Symbol("legacy props"), ho = Symbol(""), _o = Symbol("proxy path"), ct = new class extends Error {
|
|
53
|
+
constructor(...t) {
|
|
54
|
+
super(...t), Q(this, "name", "StaleReactionError"), Q(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
55
|
+
}
|
|
56
|
+
}(), Cn = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
57
|
+
function Ni(e) {
|
|
58
|
+
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
59
|
+
}
|
|
60
|
+
function go() {
|
|
61
|
+
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
62
|
+
}
|
|
63
|
+
function mo(e, t, r) {
|
|
64
|
+
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
65
|
+
}
|
|
66
|
+
function yo(e) {
|
|
67
|
+
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
68
|
+
}
|
|
69
|
+
function bo() {
|
|
70
|
+
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
71
|
+
}
|
|
72
|
+
function wo(e) {
|
|
73
|
+
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
74
|
+
}
|
|
75
|
+
function ko() {
|
|
76
|
+
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
77
|
+
}
|
|
78
|
+
function $o() {
|
|
79
|
+
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
80
|
+
}
|
|
81
|
+
function So(e) {
|
|
82
|
+
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
83
|
+
}
|
|
84
|
+
function xo() {
|
|
85
|
+
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
86
|
+
}
|
|
87
|
+
function Eo() {
|
|
88
|
+
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
89
|
+
}
|
|
90
|
+
function To() {
|
|
91
|
+
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
92
|
+
}
|
|
93
|
+
function Ao() {
|
|
94
|
+
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
95
|
+
}
|
|
96
|
+
function Rn(e) {
|
|
97
|
+
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
98
|
+
}
|
|
99
|
+
function Mo() {
|
|
100
|
+
console.warn("https://svelte.dev/e/select_multiple_invalid_value");
|
|
101
|
+
}
|
|
102
|
+
function Po() {
|
|
103
|
+
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
104
|
+
}
|
|
105
|
+
var C = !1;
|
|
106
|
+
function Se(e) {
|
|
107
|
+
C = e;
|
|
108
|
+
}
|
|
109
|
+
var B;
|
|
110
|
+
function de(e) {
|
|
111
|
+
if (e === null)
|
|
112
|
+
throw Rn(), dr;
|
|
113
|
+
return B = e;
|
|
114
|
+
}
|
|
115
|
+
function pr() {
|
|
116
|
+
return de(/* @__PURE__ */ et(B));
|
|
117
|
+
}
|
|
118
|
+
function x(e) {
|
|
119
|
+
if (C) {
|
|
120
|
+
if (/* @__PURE__ */ et(B) !== null)
|
|
121
|
+
throw Rn(), dr;
|
|
122
|
+
B = e;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function ta(e = 1) {
|
|
126
|
+
if (C) {
|
|
127
|
+
for (var t = e, r = B; t--; ) r = /* @__PURE__ */ et(r);
|
|
128
|
+
B = r;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function bn(e = !0) {
|
|
132
|
+
for (var t = 0, r = B; ; ) {
|
|
133
|
+
if (r.nodeType === 8) {
|
|
134
|
+
var n = r.data;
|
|
135
|
+
if (n === "]") {
|
|
136
|
+
if (t === 0) return r;
|
|
137
|
+
t -= 1;
|
|
138
|
+
} else (n === "[" || n === "[!" || n[0] === "[" && !isNaN(Number(n.slice(1)))) && (t += 1);
|
|
139
|
+
}
|
|
140
|
+
var i = /* @__PURE__ */ et(r);
|
|
141
|
+
e && r.remove(), r = i;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function ra(e) {
|
|
145
|
+
if (!e || e.nodeType !== 8)
|
|
146
|
+
throw Rn(), dr;
|
|
147
|
+
return e.data;
|
|
148
|
+
}
|
|
149
|
+
function na(e) {
|
|
150
|
+
return e === this.v;
|
|
151
|
+
}
|
|
152
|
+
function Co(e, t) {
|
|
153
|
+
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
154
|
+
}
|
|
155
|
+
function ia(e) {
|
|
156
|
+
return !Co(e, this.v);
|
|
157
|
+
}
|
|
158
|
+
var qe = !1, Hr = !1;
|
|
159
|
+
function Os(e, t) {
|
|
160
|
+
return e.label = t, Ro(e.v, t), e;
|
|
161
|
+
}
|
|
162
|
+
function Ro(e, t) {
|
|
163
|
+
return e?.[_o]?.(t), e;
|
|
164
|
+
}
|
|
165
|
+
var X = null;
|
|
166
|
+
function hr(e) {
|
|
167
|
+
X = e;
|
|
168
|
+
}
|
|
169
|
+
function sa(e, t = !1, r) {
|
|
170
|
+
X = {
|
|
171
|
+
p: X,
|
|
172
|
+
i: !1,
|
|
173
|
+
c: null,
|
|
174
|
+
e: null,
|
|
175
|
+
s: e,
|
|
176
|
+
x: null,
|
|
177
|
+
r: j,
|
|
178
|
+
l: Hr && !t ? {
|
|
179
|
+
s: null,
|
|
180
|
+
u: null,
|
|
181
|
+
$: []
|
|
182
|
+
} : null
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function aa(e) {
|
|
186
|
+
var t = X, r = t.e;
|
|
187
|
+
if (r !== null) {
|
|
188
|
+
t.e = null;
|
|
189
|
+
for (var n of r) La(n);
|
|
190
|
+
}
|
|
191
|
+
return e !== void 0 && (t.x = e), t.i = !0, X = t.p, e ?? {};
|
|
192
|
+
}
|
|
193
|
+
function Yr() {
|
|
194
|
+
return !Hr || X !== null && X.l === null;
|
|
195
|
+
}
|
|
196
|
+
var Wt = [];
|
|
197
|
+
function la() {
|
|
198
|
+
var e = Wt;
|
|
199
|
+
Wt = [], lo(e);
|
|
200
|
+
}
|
|
201
|
+
function Xe(e) {
|
|
202
|
+
if (Wt.length === 0 && !Vr) {
|
|
203
|
+
var t = Wt;
|
|
204
|
+
queueMicrotask(() => {
|
|
205
|
+
t === Wt && la();
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
Wt.push(e);
|
|
209
|
+
}
|
|
210
|
+
function Oo() {
|
|
211
|
+
for (; Wt.length > 0; ) la();
|
|
212
|
+
}
|
|
213
|
+
function oa(e) {
|
|
214
|
+
var t = j;
|
|
215
|
+
if (t === null)
|
|
216
|
+
return F.f |= yn, e;
|
|
217
|
+
if (!(t.f & 32768) && !(t.f & 4))
|
|
218
|
+
throw e;
|
|
219
|
+
St(e, t);
|
|
220
|
+
}
|
|
221
|
+
function St(e, t) {
|
|
222
|
+
for (; t !== null; ) {
|
|
223
|
+
if (t.f & 128) {
|
|
224
|
+
if (!(t.f & 32768)) throw e;
|
|
225
|
+
try {
|
|
226
|
+
t.b.error(e);
|
|
227
|
+
return;
|
|
228
|
+
} catch (r) {
|
|
229
|
+
e = r;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
t = t.parent;
|
|
233
|
+
}
|
|
234
|
+
throw e;
|
|
235
|
+
}
|
|
236
|
+
var No = ~(Qe | Ht | Re);
|
|
237
|
+
function ie(e, t) {
|
|
238
|
+
e.f = e.f & No | t;
|
|
239
|
+
}
|
|
240
|
+
function Li(e) {
|
|
241
|
+
e.f & 512 || e.deps === null ? ie(e, Re) : ie(e, Ht);
|
|
242
|
+
}
|
|
243
|
+
function ua(e) {
|
|
244
|
+
if (e !== null)
|
|
245
|
+
for (const t of e)
|
|
246
|
+
!(t.f & 2) || !(t.f & 65536) || (t.f ^= Gr, ua(t.deps));
|
|
247
|
+
}
|
|
248
|
+
function fa(e, t, r) {
|
|
249
|
+
e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), ua(e.deps), ie(e, Re);
|
|
250
|
+
}
|
|
251
|
+
var Lo = !1, ln = !1;
|
|
252
|
+
function jo(e) {
|
|
253
|
+
var t = ln;
|
|
254
|
+
try {
|
|
255
|
+
return ln = !1, [e(), ln];
|
|
256
|
+
} finally {
|
|
257
|
+
ln = t;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
function ca(e, t) {
|
|
261
|
+
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
262
|
+
}
|
|
263
|
+
function ji(e, t) {
|
|
264
|
+
ca(e, t), t.add(e);
|
|
265
|
+
}
|
|
266
|
+
function I(e, t, r) {
|
|
267
|
+
ca(e, t), t.set(e, r);
|
|
268
|
+
}
|
|
269
|
+
function H(e, t, r) {
|
|
270
|
+
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
|
|
271
|
+
throw new TypeError("Private element is not present on this object");
|
|
272
|
+
}
|
|
273
|
+
function d(e, t) {
|
|
274
|
+
return e.get(H(e, t));
|
|
275
|
+
}
|
|
276
|
+
function O(e, t, r) {
|
|
277
|
+
return e.set(H(e, t), r), r;
|
|
278
|
+
}
|
|
279
|
+
var da, dt = /* @__PURE__ */ new Set(), V = null, wn = null, we = null, bi = null, Vr = !1, fi = !1, _r = null, kn = null, va = 0;
|
|
280
|
+
var Io = 1, $n = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Br = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), un = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakSet(), Yt = class pa {
|
|
281
|
+
constructor() {
|
|
282
|
+
ji(this, Ke), Q(this, "id", Io++), Q(this, "current", /* @__PURE__ */ new Map()), Q(this, "previous", /* @__PURE__ */ new Map()), I(this, $n, /* @__PURE__ */ new Set()), I(this, on, /* @__PURE__ */ new Set()), I(this, ar, 0), I(this, lr, 0), I(this, pn, null), I(this, Ie, []), I(this, Br, /* @__PURE__ */ new Set()), I(this, Ut, /* @__PURE__ */ new Set()), I(this, jt, /* @__PURE__ */ new Map()), Q(this, "is_fork", !1), I(this, un, !1);
|
|
283
|
+
}
|
|
284
|
+
skip_effect(t) {
|
|
285
|
+
d(jt, this).has(t) || d(jt, this).set(t, {
|
|
286
|
+
d: [],
|
|
287
|
+
m: []
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
unskip_effect(t) {
|
|
291
|
+
var r = d(jt, this).get(t);
|
|
292
|
+
if (r) {
|
|
293
|
+
d(jt, this).delete(t);
|
|
294
|
+
for (var n of r.d)
|
|
295
|
+
ie(n, Qe), this.schedule(n);
|
|
296
|
+
for (n of r.m)
|
|
297
|
+
ie(n, Ht), this.schedule(n);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
capture(t, r) {
|
|
301
|
+
r !== ce && !this.previous.has(t) && this.previous.set(t, r), t.f & 8388608 || (this.current.set(t, t.v), we?.set(t, t.v));
|
|
302
|
+
}
|
|
303
|
+
activate() {
|
|
304
|
+
V = this;
|
|
305
|
+
}
|
|
306
|
+
deactivate() {
|
|
307
|
+
V = null, we = null;
|
|
308
|
+
}
|
|
309
|
+
flush() {
|
|
310
|
+
var t = null;
|
|
311
|
+
try {
|
|
312
|
+
fi = !0, V = this, H(Ke, this, ha).call(this);
|
|
313
|
+
} finally {
|
|
314
|
+
va = 0, bi = null, _r = null, kn = null, fi = !1, V = null, we = null, Et.clear();
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
discard() {
|
|
318
|
+
for (const t of d(on, this)) t(this);
|
|
319
|
+
d(on, this).clear(), dt.delete(this);
|
|
320
|
+
}
|
|
321
|
+
increment(t) {
|
|
322
|
+
O(ar, this, d(ar, this) + 1), t && O(lr, this, d(lr, this) + 1);
|
|
323
|
+
}
|
|
324
|
+
decrement(t, r) {
|
|
325
|
+
O(ar, this, d(ar, this) - 1), t && O(lr, this, d(lr, this) - 1), !(d(un, this) || r) && (O(un, this, !0), Xe(() => {
|
|
326
|
+
O(un, this, !1), this.flush();
|
|
327
|
+
}));
|
|
328
|
+
}
|
|
329
|
+
transfer_effects(t, r) {
|
|
330
|
+
for (const n of t) d(Br, this).add(n);
|
|
331
|
+
for (const n of r) d(Ut, this).add(n);
|
|
332
|
+
t.clear(), r.clear();
|
|
333
|
+
}
|
|
334
|
+
oncommit(t) {
|
|
335
|
+
d($n, this).add(t);
|
|
336
|
+
}
|
|
337
|
+
ondiscard(t) {
|
|
338
|
+
d(on, this).add(t);
|
|
339
|
+
}
|
|
340
|
+
settled() {
|
|
341
|
+
return (d(pn, this) ?? O(pn, this, Qs())).promise;
|
|
342
|
+
}
|
|
343
|
+
static ensure() {
|
|
344
|
+
if (V === null) {
|
|
345
|
+
const t = V = new pa();
|
|
346
|
+
fi || (dt.add(V), Vr || Xe(() => {
|
|
347
|
+
V === t && t.flush();
|
|
348
|
+
}));
|
|
349
|
+
}
|
|
350
|
+
return V;
|
|
351
|
+
}
|
|
352
|
+
apply() {
|
|
353
|
+
if (!qe || !this.is_fork && dt.size === 1) {
|
|
354
|
+
we = null;
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
we = new Map(this.current);
|
|
358
|
+
for (const t of dt)
|
|
359
|
+
if (!(t === this || t.is_fork))
|
|
360
|
+
for (const [r, n] of t.previous) we.has(r) || we.set(r, n);
|
|
361
|
+
}
|
|
362
|
+
schedule(t) {
|
|
363
|
+
if (bi = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
|
|
364
|
+
t.b.defer_effect(t);
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
for (var r = t; r.parent !== null; ) {
|
|
368
|
+
r = r.parent;
|
|
369
|
+
var n = r.f;
|
|
370
|
+
if (_r !== null && r === j && (qe || (F === null || !(F.f & 2)) && !Lo))
|
|
371
|
+
return;
|
|
372
|
+
if (n & 96) {
|
|
373
|
+
if (!(n & 1024)) return;
|
|
374
|
+
r.f ^= Re;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
d(Ie, this).push(r);
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
da = Yt;
|
|
381
|
+
function Ns() {
|
|
382
|
+
return this.is_fork || d(lr, this) > 0;
|
|
383
|
+
}
|
|
384
|
+
function ha() {
|
|
385
|
+
if (va++ > 1e3 && (dt.delete(this), Vo()), !H(Ke, this, Ns).call(this)) {
|
|
386
|
+
for (const u of d(Br, this))
|
|
387
|
+
d(Ut, this).delete(u), ie(u, Qe), this.schedule(u);
|
|
388
|
+
for (const u of d(Ut, this))
|
|
389
|
+
ie(u, Ht), this.schedule(u);
|
|
390
|
+
}
|
|
391
|
+
const e = d(Ie, this);
|
|
392
|
+
O(Ie, this, []), this.apply();
|
|
393
|
+
var t = _r = [], r = [], n = kn = [];
|
|
394
|
+
for (const u of e) try {
|
|
395
|
+
H(Ke, this, _a).call(this, u, t, r);
|
|
396
|
+
} catch (o) {
|
|
397
|
+
throw ba(u), o;
|
|
398
|
+
}
|
|
399
|
+
if (V = null, n.length > 0) {
|
|
400
|
+
var i = da.ensure();
|
|
401
|
+
for (const u of n) i.schedule(u);
|
|
402
|
+
}
|
|
403
|
+
if (_r = null, kn = null, H(Ke, this, Ns).call(this)) {
|
|
404
|
+
H(Ke, this, Ls).call(this, r), H(Ke, this, Ls).call(this, t);
|
|
405
|
+
for (const [u, o] of d(jt, this)) ya(u, o);
|
|
406
|
+
} else {
|
|
407
|
+
d(ar, this) === 0 && dt.delete(this), d(Br, this).clear(), d(Ut, this).clear();
|
|
408
|
+
for (const u of d($n, this)) u(this);
|
|
409
|
+
d($n, this).clear(), wn = this, js(r), js(t), wn = null, d(pn, this)?.resolve();
|
|
410
|
+
}
|
|
411
|
+
var s = V;
|
|
412
|
+
if (d(Ie, this).length > 0) {
|
|
413
|
+
const u = s ?? (s = this);
|
|
414
|
+
d(Ie, u).push(...d(Ie, this).filter((o) => !d(Ie, u).includes(o)));
|
|
415
|
+
}
|
|
416
|
+
s !== null && (dt.add(s), H(Ke, s, ha).call(s)), dt.has(this) || H(Ke, this, Wo).call(this);
|
|
417
|
+
}
|
|
418
|
+
function _a(e, t, r) {
|
|
419
|
+
e.f ^= Re;
|
|
420
|
+
for (var n = e.first; n !== null; ) {
|
|
421
|
+
var i = n.f, s = (i & 96) !== 0;
|
|
422
|
+
if (!(s && i & 1024 || i & 8192 || d(jt, this).has(n)) && n.fn !== null) {
|
|
423
|
+
s ? n.f ^= Re : i & 4 ? t.push(n) : qe && i & 16777224 ? r.push(n) : Jr(n) && (i & 16 && d(Ut, this).add(n), mr(n));
|
|
424
|
+
var u = n.first;
|
|
425
|
+
if (u !== null) {
|
|
426
|
+
n = u;
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
for (; n !== null; ) {
|
|
431
|
+
var o = n.next;
|
|
432
|
+
if (o !== null) {
|
|
433
|
+
n = o;
|
|
434
|
+
break;
|
|
435
|
+
}
|
|
436
|
+
n = n.parent;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
function Ls(e) {
|
|
441
|
+
for (var t = 0; t < e.length; t += 1) fa(e[t], d(Br, this), d(Ut, this));
|
|
442
|
+
}
|
|
443
|
+
function Wo() {
|
|
444
|
+
for (const o of dt) {
|
|
445
|
+
var e = o.id < this.id, t = [];
|
|
446
|
+
for (const [c, g] of this.current) {
|
|
447
|
+
if (o.current.has(c)) if (e && g !== o.current.get(c)) o.current.set(c, g);
|
|
448
|
+
else continue;
|
|
449
|
+
t.push(c);
|
|
450
|
+
}
|
|
451
|
+
var r = [...o.current.keys()].filter((c) => !this.current.has(c));
|
|
452
|
+
if (r.length === 0)
|
|
453
|
+
e && o.discard();
|
|
454
|
+
else if (t.length > 0) {
|
|
455
|
+
o.activate();
|
|
456
|
+
var n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
|
|
457
|
+
for (var s of t) ga(s, r, n, i);
|
|
458
|
+
if (d(Ie, o).length > 0) {
|
|
459
|
+
o.apply();
|
|
460
|
+
for (var u of d(Ie, o)) H(Ke, o, _a).call(o, u, [], []);
|
|
461
|
+
O(Ie, o, []);
|
|
462
|
+
}
|
|
463
|
+
o.deactivate();
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
function It(e) {
|
|
468
|
+
var t = Vr;
|
|
469
|
+
Vr = !0;
|
|
470
|
+
try {
|
|
471
|
+
var r;
|
|
472
|
+
for (e && (V !== null && !V.is_fork && V.flush(), r = e()); ; ) {
|
|
473
|
+
if (Oo(), V === null) return r;
|
|
474
|
+
V.flush();
|
|
475
|
+
}
|
|
476
|
+
} finally {
|
|
477
|
+
Vr = t;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
function Vo() {
|
|
481
|
+
if (0) {
|
|
482
|
+
var e;
|
|
483
|
+
for (const r of V.current.keys()) for (const [n, i] of r.updated ?? [])
|
|
484
|
+
var t;
|
|
485
|
+
}
|
|
486
|
+
try {
|
|
487
|
+
ko();
|
|
488
|
+
} catch (r) {
|
|
489
|
+
St(r, bi);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
var Je = null;
|
|
493
|
+
function js(e) {
|
|
494
|
+
var t = e.length;
|
|
495
|
+
if (t !== 0) {
|
|
496
|
+
for (var r = 0; r < t; ) {
|
|
497
|
+
var n = e[r++];
|
|
498
|
+
if (!(n.f & 24576) && Jr(n) && (Je = /* @__PURE__ */ new Set(), mr(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Wa(n), Je?.size > 0)) {
|
|
499
|
+
Et.clear();
|
|
500
|
+
for (const i of Je) {
|
|
501
|
+
if (i.f & 24576) continue;
|
|
502
|
+
const s = [i];
|
|
503
|
+
let u = i.parent;
|
|
504
|
+
for (; u !== null; )
|
|
505
|
+
Je.has(u) && (Je.delete(u), s.push(u)), u = u.parent;
|
|
506
|
+
for (let o = s.length - 1; o >= 0; o--) {
|
|
507
|
+
const c = s[o];
|
|
508
|
+
c.f & 24576 || mr(c);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
Je.clear();
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
Je = null;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
function ga(e, t, r, n) {
|
|
518
|
+
if (!r.has(e) && (r.add(e), e.reactions !== null))
|
|
519
|
+
for (const i of e.reactions) {
|
|
520
|
+
const s = i.f;
|
|
521
|
+
s & 2 ? ga(i, t, r, n) : s & 4194320 && !(s & 2048) && ma(i, t, n) && (ie(i, Qe), Ii(i));
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
function ma(e, t, r) {
|
|
525
|
+
const n = r.get(e);
|
|
526
|
+
if (n !== void 0) return n;
|
|
527
|
+
if (e.deps !== null) for (const i of e.deps) {
|
|
528
|
+
if (vr.call(t, i)) return !0;
|
|
529
|
+
if (i.f & 2 && ma(i, t, r))
|
|
530
|
+
return r.set(i, !0), !0;
|
|
531
|
+
}
|
|
532
|
+
return r.set(e, !1), !1;
|
|
533
|
+
}
|
|
534
|
+
function Ii(e) {
|
|
535
|
+
V.schedule(e);
|
|
536
|
+
}
|
|
537
|
+
function ya(e, t) {
|
|
538
|
+
if (!(e.f & 32 && e.f & 1024)) {
|
|
539
|
+
e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), ie(e, Re);
|
|
540
|
+
for (var r = e.first; r !== null; )
|
|
541
|
+
ya(r, t), r = r.next;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function ba(e) {
|
|
545
|
+
ie(e, Re);
|
|
546
|
+
for (var t = e.first; t !== null; )
|
|
547
|
+
ba(t), t = t.next;
|
|
548
|
+
}
|
|
549
|
+
function Fo(e) {
|
|
550
|
+
let t = 0, r = Gt(0), n;
|
|
551
|
+
return () => {
|
|
552
|
+
Ui() && (a(r), In(() => (t === 0 && (n = Jt(() => e(() => Fr(r)))), t += 1, () => {
|
|
553
|
+
Xe(() => {
|
|
554
|
+
t -= 1, t === 0 && (n?.(), n = void 0, Fr(r));
|
|
555
|
+
});
|
|
556
|
+
})));
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
var qo = Pn | yr;
|
|
560
|
+
function Uo(e, t, r, n) {
|
|
561
|
+
new Bo(e, t, r, n);
|
|
562
|
+
}
|
|
563
|
+
var We = /* @__PURE__ */ new WeakMap(), ci = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), zr = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), Is = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakSet(), Bo = class {
|
|
564
|
+
constructor(e, t, r, n) {
|
|
565
|
+
ji(this, ye), Q(this, "parent", void 0), Q(this, "is_pending", !1), Q(this, "transform_error", void 0), I(this, We, void 0), I(this, ci, C ? B : null), I(this, $t, void 0), I(this, zr, void 0), I(this, Ae, void 0), I(this, xt, null), I(this, Ve, null), I(this, ut, null), I(this, Bt, null), I(this, or, 0), I(this, zt, 0), I(this, fn, !1), I(this, wi, /* @__PURE__ */ new Set()), I(this, ki, /* @__PURE__ */ new Set()), I(this, Nt, null), I(this, Is, Fo(() => (O(Nt, this, Gt(d(or, this))), () => {
|
|
566
|
+
O(Nt, this, null);
|
|
567
|
+
}))), O(We, this, e), O($t, this, t), O(zr, this, (i) => {
|
|
568
|
+
var s = j;
|
|
569
|
+
s.b = this, s.f |= 128, r(i);
|
|
570
|
+
}), this.parent = j.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), O(Ae, this, Wn(() => {
|
|
571
|
+
if (C) {
|
|
572
|
+
const i = d(ci, this);
|
|
573
|
+
pr();
|
|
574
|
+
const s = i.data === "[!";
|
|
575
|
+
if (i.data.startsWith("[?")) {
|
|
576
|
+
const u = JSON.parse(i.data.slice(2));
|
|
577
|
+
H(ye, this, Do).call(this, u);
|
|
578
|
+
} else s ? H(ye, this, Go).call(this) : H(ye, this, zo).call(this);
|
|
579
|
+
} else H(ye, this, Ws).call(this);
|
|
580
|
+
}, qo)), C && O(We, this, B);
|
|
581
|
+
}
|
|
582
|
+
defer_effect(e) {
|
|
583
|
+
fa(e, d(wi, this), d(ki, this));
|
|
584
|
+
}
|
|
585
|
+
is_rendered() {
|
|
586
|
+
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
587
|
+
}
|
|
588
|
+
has_pending_snippet() {
|
|
589
|
+
return !!d($t, this).pending;
|
|
590
|
+
}
|
|
591
|
+
update_pending_count(e, t) {
|
|
592
|
+
H(ye, this, wa).call(this, e, t), O(or, this, d(or, this) + e), !(!d(Nt, this) || d(fn, this)) && (O(fn, this, !0), Xe(() => {
|
|
593
|
+
O(fn, this, !1), d(Nt, this) && gr(d(Nt, this), d(or, this));
|
|
594
|
+
}));
|
|
595
|
+
}
|
|
596
|
+
get_effect_pending() {
|
|
597
|
+
return d(Is, this).call(this), a(d(Nt, this));
|
|
598
|
+
}
|
|
599
|
+
error(e) {
|
|
600
|
+
var t = d($t, this).onerror;
|
|
601
|
+
let r = d($t, this).failed;
|
|
602
|
+
if (!t && !r) throw e;
|
|
603
|
+
d(xt, this) && (ve(d(xt, this)), O(xt, this, null)), d(Ve, this) && (ve(d(Ve, this)), O(Ve, this, null)), d(ut, this) && (ve(d(ut, this)), O(ut, this, null)), C && (de(d(ci, this)), ta(), de(bn()));
|
|
604
|
+
var n = !1, i = !1;
|
|
605
|
+
const s = () => {
|
|
606
|
+
if (n) {
|
|
607
|
+
Po();
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
n = !0, i && Ao(), d(ut, this) !== null && Kt(d(ut, this), () => {
|
|
611
|
+
O(ut, this, null);
|
|
612
|
+
}), H(ye, this, $i).call(this, () => {
|
|
613
|
+
H(ye, this, Ws).call(this);
|
|
614
|
+
});
|
|
615
|
+
}, u = (o) => {
|
|
616
|
+
try {
|
|
617
|
+
i = !0, t?.(o, s), i = !1;
|
|
618
|
+
} catch (c) {
|
|
619
|
+
St(c, d(Ae, this) && d(Ae, this).parent);
|
|
620
|
+
}
|
|
621
|
+
r && O(ut, this, H(ye, this, $i).call(this, () => {
|
|
622
|
+
try {
|
|
623
|
+
return ke(() => {
|
|
624
|
+
var c = j;
|
|
625
|
+
c.b = this, c.f |= 128, r(d(We, this), () => o, () => s);
|
|
626
|
+
});
|
|
627
|
+
} catch (c) {
|
|
628
|
+
return St(c, d(Ae, this).parent), null;
|
|
629
|
+
}
|
|
630
|
+
}));
|
|
631
|
+
};
|
|
632
|
+
Xe(() => {
|
|
633
|
+
var o;
|
|
634
|
+
try {
|
|
635
|
+
o = this.transform_error(e);
|
|
636
|
+
} catch (c) {
|
|
637
|
+
St(c, d(Ae, this) && d(Ae, this).parent);
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
o !== null && typeof o == "object" && typeof o.then == "function" ? o.then(u, (c) => St(c, d(Ae, this) && d(Ae, this).parent)) : u(o);
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
function zo() {
|
|
645
|
+
try {
|
|
646
|
+
O(xt, this, ke(() => d(zr, this).call(this, d(We, this))));
|
|
647
|
+
} catch (e) {
|
|
648
|
+
this.error(e);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
function Do(e) {
|
|
652
|
+
const t = d($t, this).failed;
|
|
653
|
+
t && O(ut, this, ke(() => {
|
|
654
|
+
t(d(We, this), () => e, () => () => {
|
|
655
|
+
});
|
|
656
|
+
}));
|
|
657
|
+
}
|
|
658
|
+
function Go() {
|
|
659
|
+
const e = d($t, this).pending;
|
|
660
|
+
e && (this.is_pending = !0, O(Ve, this, ke(() => e(d(We, this)))), Xe(() => {
|
|
661
|
+
var t = O(Bt, this, document.createDocumentFragment()), r = ge();
|
|
662
|
+
t.append(r), O(xt, this, H(ye, this, $i).call(this, () => ke(() => d(zr, this).call(this, r)))), d(zt, this) === 0 && (d(We, this).before(t), O(Bt, this, null), Kt(d(Ve, this), () => {
|
|
663
|
+
O(Ve, this, null);
|
|
664
|
+
}), H(ye, this, Wi).call(this, V));
|
|
665
|
+
}));
|
|
666
|
+
}
|
|
667
|
+
function Ws() {
|
|
668
|
+
try {
|
|
669
|
+
if (this.is_pending = this.has_pending_snippet(), O(zt, this, 0), O(or, this, 0), O(xt, this, ke(() => {
|
|
670
|
+
d(zr, this).call(this, d(We, this));
|
|
671
|
+
})), d(zt, this) > 0) {
|
|
672
|
+
var e = O(Bt, this, document.createDocumentFragment());
|
|
673
|
+
Gi(d(xt, this), e);
|
|
674
|
+
const t = d($t, this).pending;
|
|
675
|
+
O(Ve, this, ke(() => t(d(We, this))));
|
|
676
|
+
} else H(ye, this, Wi).call(this, V);
|
|
677
|
+
} catch (t) {
|
|
678
|
+
this.error(t);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
function Wi(e) {
|
|
682
|
+
this.is_pending = !1, e.transfer_effects(d(wi, this), d(ki, this));
|
|
683
|
+
}
|
|
684
|
+
function $i(e) {
|
|
685
|
+
var t = j, r = F, n = X;
|
|
686
|
+
Ze(d(Ae, this)), Oe(d(Ae, this)), hr(d(Ae, this).ctx);
|
|
687
|
+
try {
|
|
688
|
+
return Yt.ensure(), e();
|
|
689
|
+
} catch (i) {
|
|
690
|
+
return oa(i), null;
|
|
691
|
+
} finally {
|
|
692
|
+
Ze(t), Oe(r), hr(n);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
function wa(e, t) {
|
|
696
|
+
if (!this.has_pending_snippet()) {
|
|
697
|
+
if (this.parent) {
|
|
698
|
+
var r;
|
|
699
|
+
H(ye, r = this.parent, wa).call(r, e, t);
|
|
700
|
+
}
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
O(zt, this, d(zt, this) + e), d(zt, this) === 0 && (H(ye, this, Wi).call(this, t), d(Ve, this) && Kt(d(Ve, this), () => {
|
|
704
|
+
O(Ve, this, null);
|
|
705
|
+
}), d(Bt, this) && (d(We, this).before(d(Bt, this)), O(Bt, this, null)));
|
|
706
|
+
}
|
|
707
|
+
function ka(e, t, r, n) {
|
|
708
|
+
const i = Yr() ? On : Vi;
|
|
709
|
+
var s = e.filter((p) => !p.settled);
|
|
710
|
+
if (r.length === 0 && s.length === 0) {
|
|
711
|
+
n(t.map(i));
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
var u = j, o = Ho(), c = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((p) => p.promise)) : null;
|
|
715
|
+
function g(p) {
|
|
716
|
+
o();
|
|
717
|
+
try {
|
|
718
|
+
n(p);
|
|
719
|
+
} catch (w) {
|
|
720
|
+
u.f & 16384 || St(w, u);
|
|
721
|
+
}
|
|
722
|
+
Sn();
|
|
723
|
+
}
|
|
724
|
+
if (r.length === 0) {
|
|
725
|
+
c.then(() => g(t.map(i)));
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
var h = $a();
|
|
729
|
+
function m() {
|
|
730
|
+
Promise.all(r.map((p) => /* @__PURE__ */ Yo(p))).then((p) => g([...t.map(i), ...p])).catch((p) => St(p, u)).finally(() => h());
|
|
731
|
+
}
|
|
732
|
+
c ? c.then(() => {
|
|
733
|
+
o(), m(), Sn();
|
|
734
|
+
}) : m();
|
|
735
|
+
}
|
|
736
|
+
function Ho() {
|
|
737
|
+
var e = j, t = F, r = X, n = V;
|
|
738
|
+
if (0) var i;
|
|
739
|
+
return function(u = !0) {
|
|
740
|
+
Ze(e), Oe(t), hr(r), u && !(e.f & 16384) && (n?.activate(), n?.apply());
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
function Sn(e = !0) {
|
|
744
|
+
Ze(null), Oe(null), hr(null), e && V?.deactivate();
|
|
745
|
+
}
|
|
746
|
+
function $a() {
|
|
747
|
+
var e = j.b, t = V, r = e.is_rendered();
|
|
748
|
+
return e.update_pending_count(1, t), t.increment(r), (n = !1) => {
|
|
749
|
+
e.update_pending_count(-1, t), t.decrement(r, n);
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
// @__NO_SIDE_EFFECTS__
|
|
753
|
+
function On(e) {
|
|
754
|
+
var t = 2 | Qe, r = F !== null && F.f & 2 ? F : null;
|
|
755
|
+
return j !== null && (j.f |= yr), {
|
|
756
|
+
ctx: X,
|
|
757
|
+
deps: null,
|
|
758
|
+
effects: null,
|
|
759
|
+
equals: na,
|
|
760
|
+
f: t,
|
|
761
|
+
fn: e,
|
|
762
|
+
reactions: null,
|
|
763
|
+
rv: 0,
|
|
764
|
+
v: ce,
|
|
765
|
+
wv: 0,
|
|
766
|
+
parent: r ?? j,
|
|
767
|
+
ac: null
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
// @__NO_SIDE_EFFECTS__
|
|
771
|
+
function Yo(e, t, r) {
|
|
772
|
+
let n = j;
|
|
773
|
+
n === null && go();
|
|
774
|
+
var i = void 0, s = Gt(ce), u = !F, o = /* @__PURE__ */ new Map();
|
|
775
|
+
return fu(() => {
|
|
776
|
+
var c = j, g = Qs();
|
|
777
|
+
i = g.promise;
|
|
778
|
+
try {
|
|
779
|
+
Promise.resolve(e()).then(g.resolve, g.reject).finally(Sn);
|
|
780
|
+
} catch (w) {
|
|
781
|
+
g.reject(w), Sn();
|
|
782
|
+
}
|
|
783
|
+
var h = V;
|
|
784
|
+
if (u) {
|
|
785
|
+
if (c.f & 32768) var m = $a();
|
|
786
|
+
if (n.b.is_rendered())
|
|
787
|
+
o.get(h)?.reject(ct), o.delete(h);
|
|
788
|
+
else {
|
|
789
|
+
for (const w of o.values()) w.reject(ct);
|
|
790
|
+
o.clear();
|
|
791
|
+
}
|
|
792
|
+
o.set(h, g);
|
|
793
|
+
}
|
|
794
|
+
const p = (w, k = void 0) => {
|
|
795
|
+
if (m && m(k === ct), !(k === ct || c.f & 16384)) {
|
|
796
|
+
if (h.activate(), k)
|
|
797
|
+
s.f |= yn, gr(s, k);
|
|
798
|
+
else {
|
|
799
|
+
s.f & 8388608 && (s.f ^= yn), gr(s, w);
|
|
800
|
+
for (const [T, b] of o) {
|
|
801
|
+
if (o.delete(T), T === h) break;
|
|
802
|
+
b.reject(ct);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
h.deactivate();
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
g.promise.then(p, (w) => p(null, w || "unknown"));
|
|
809
|
+
}), Bi(() => {
|
|
810
|
+
for (const c of o.values()) c.reject(ct);
|
|
811
|
+
}), new Promise((c) => {
|
|
812
|
+
function g(h) {
|
|
813
|
+
function m() {
|
|
814
|
+
h === i ? c(s) : g(i);
|
|
815
|
+
}
|
|
816
|
+
h.then(m, m);
|
|
817
|
+
}
|
|
818
|
+
g(i);
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
// @__NO_SIDE_EFFECTS__
|
|
822
|
+
function sr(e) {
|
|
823
|
+
const t = /* @__PURE__ */ On(e);
|
|
824
|
+
return qe || qa(t), t;
|
|
825
|
+
}
|
|
826
|
+
// @__NO_SIDE_EFFECTS__
|
|
827
|
+
function Vi(e) {
|
|
828
|
+
const t = /* @__PURE__ */ On(e);
|
|
829
|
+
return t.equals = ia, t;
|
|
830
|
+
}
|
|
831
|
+
function Ko(e) {
|
|
832
|
+
var t = e.effects;
|
|
833
|
+
if (t !== null) {
|
|
834
|
+
e.effects = null;
|
|
835
|
+
for (var r = 0; r < t.length; r += 1) ve(t[r]);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
function Jo(e) {
|
|
839
|
+
for (var t = e.parent; t !== null; ) {
|
|
840
|
+
if (!(t.f & 2)) return t.f & 16384 ? null : t;
|
|
841
|
+
t = t.parent;
|
|
842
|
+
}
|
|
843
|
+
return null;
|
|
844
|
+
}
|
|
845
|
+
function Fi(e) {
|
|
846
|
+
var t, r = j;
|
|
847
|
+
if (Ze(Jo(e)), 0)
|
|
848
|
+
try {
|
|
849
|
+
} finally {
|
|
850
|
+
}
|
|
851
|
+
else try {
|
|
852
|
+
e.f &= ~Gr, Ko(e), t = Da(e);
|
|
853
|
+
} finally {
|
|
854
|
+
Ze(r);
|
|
855
|
+
}
|
|
856
|
+
return t;
|
|
857
|
+
}
|
|
858
|
+
function Sa(e) {
|
|
859
|
+
var t = e.v, r = Fi(e);
|
|
860
|
+
if (!e.equals(r) && (e.wv = Ba(), (!V?.is_fork || e.deps === null) && (e.v = r, V?.capture(e, t), e.deps === null))) {
|
|
861
|
+
ie(e, Re);
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
864
|
+
Tt || (we !== null ? (Ui() || V?.is_fork) && we.set(e, r) : Li(e));
|
|
865
|
+
}
|
|
866
|
+
function Xo(e) {
|
|
867
|
+
if (e.effects !== null)
|
|
868
|
+
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(ct), t.teardown = ao, t.ac = null, Dr(t, 0), zi(t));
|
|
869
|
+
}
|
|
870
|
+
function xa(e) {
|
|
871
|
+
if (e.effects !== null)
|
|
872
|
+
for (const t of e.effects) t.teardown && mr(t);
|
|
873
|
+
}
|
|
874
|
+
var Si = /* @__PURE__ */ new Set(), Et = /* @__PURE__ */ new Map();
|
|
875
|
+
var Ea = !1;
|
|
876
|
+
function Gt(e, t) {
|
|
877
|
+
var r = {
|
|
878
|
+
f: 0,
|
|
879
|
+
v: e,
|
|
880
|
+
reactions: null,
|
|
881
|
+
equals: na,
|
|
882
|
+
rv: 0,
|
|
883
|
+
wv: 0
|
|
884
|
+
};
|
|
885
|
+
return r;
|
|
886
|
+
}
|
|
887
|
+
// @__NO_SIDE_EFFECTS__
|
|
888
|
+
function R(e, t) {
|
|
889
|
+
const r = Gt(e, t);
|
|
890
|
+
return qa(r), r;
|
|
891
|
+
}
|
|
892
|
+
// @__NO_SIDE_EFFECTS__
|
|
893
|
+
function Ta(e, t = !1, r = !0) {
|
|
894
|
+
const n = Gt(e);
|
|
895
|
+
if (t || (n.equals = ia), Hr && r && X !== null && X.l !== null) {
|
|
896
|
+
var i;
|
|
897
|
+
((i = X.l).s ?? (i.s = [])).push(n);
|
|
898
|
+
}
|
|
899
|
+
return n;
|
|
900
|
+
}
|
|
901
|
+
function _(e, t, r = !1) {
|
|
902
|
+
F !== null && (!Fe || F.f & 131072) && Yr() && F.f & 4325394 && (Ce === null || !vr.call(Ce, e)) && To();
|
|
903
|
+
let n = r ? Pe(t) : t;
|
|
904
|
+
return gr(e, n, kn);
|
|
905
|
+
}
|
|
906
|
+
function gr(e, t, r = null) {
|
|
907
|
+
if (!e.equals(t)) {
|
|
908
|
+
var n = e.v;
|
|
909
|
+
Tt ? Et.set(e, t) : Et.set(e, n), e.v = t;
|
|
910
|
+
var i = Yt.ensure();
|
|
911
|
+
if (i.capture(e, n), e.f & 2) {
|
|
912
|
+
const s = e;
|
|
913
|
+
e.f & 2048 && Fi(s), we === null && Li(s);
|
|
914
|
+
}
|
|
915
|
+
e.wv = Ba(), Aa(e, Qe, r), Yr() && j !== null && j.f & 1024 && !(j.f & 96) && (Me === null ? pu([e]) : Me.push(e)), !i.is_fork && Si.size > 0 && !Ea && Zo();
|
|
916
|
+
}
|
|
917
|
+
return t;
|
|
918
|
+
}
|
|
919
|
+
function Zo() {
|
|
920
|
+
Ea = !1;
|
|
921
|
+
for (const e of Si)
|
|
922
|
+
e.f & 1024 && ie(e, Ht), Jr(e) && mr(e);
|
|
923
|
+
Si.clear();
|
|
924
|
+
}
|
|
925
|
+
function Fr(e) {
|
|
926
|
+
_(e, e.v + 1);
|
|
927
|
+
}
|
|
928
|
+
function Aa(e, t, r) {
|
|
929
|
+
var n = e.reactions;
|
|
930
|
+
if (n !== null)
|
|
931
|
+
for (var i = Yr(), s = n.length, u = 0; u < s; u++) {
|
|
932
|
+
var o = n[u], c = o.f;
|
|
933
|
+
if (!(!i && o === j)) {
|
|
934
|
+
var g = (c & Qe) === 0;
|
|
935
|
+
if (g && ie(o, t), c & 2) {
|
|
936
|
+
var h = o;
|
|
937
|
+
we?.delete(h), c & 65536 || (c & 512 && (o.f |= Gr), Aa(h, Ht, r));
|
|
938
|
+
} else if (g) {
|
|
939
|
+
var m = o;
|
|
940
|
+
c & 16 && Je !== null && Je.add(m), r !== null ? r.push(m) : Ii(m);
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
var Qo = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
946
|
+
function Pe(e) {
|
|
947
|
+
if (typeof e != "object" || e === null || qt in e) return e;
|
|
948
|
+
const t = Zs(e);
|
|
949
|
+
if (t !== io && t !== so) return e;
|
|
950
|
+
var r = /* @__PURE__ */ new Map(), n = An(e), i = /* @__PURE__ */ R(0), s = null, u = Dt, o = (m) => {
|
|
951
|
+
if (Dt === u) return m();
|
|
952
|
+
var p = F, w = Dt;
|
|
953
|
+
Oe(null), Bs(u);
|
|
954
|
+
var k = m();
|
|
955
|
+
return Oe(p), Bs(w), k;
|
|
956
|
+
};
|
|
957
|
+
n && r.set("length", /* @__PURE__ */ R(e.length, s));
|
|
958
|
+
var c = "";
|
|
959
|
+
let g = !1;
|
|
960
|
+
function h(m) {
|
|
961
|
+
if (!g) {
|
|
962
|
+
g = !0, c = m, Os(i, `${c} version`);
|
|
963
|
+
for (const [p, w] of r) Os(w, eu(c, p));
|
|
964
|
+
g = !1;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
return new Proxy(e, {
|
|
968
|
+
defineProperty(m, p, w) {
|
|
969
|
+
(!("value" in w) || w.configurable === !1 || w.enumerable === !1 || w.writable === !1) && xo();
|
|
970
|
+
var k = r.get(p);
|
|
971
|
+
return k === void 0 ? o(() => {
|
|
972
|
+
var T = /* @__PURE__ */ R(w.value, s);
|
|
973
|
+
return r.set(p, T), T;
|
|
974
|
+
}) : _(k, w.value, !0), !0;
|
|
975
|
+
},
|
|
976
|
+
deleteProperty(m, p) {
|
|
977
|
+
var w = r.get(p);
|
|
978
|
+
if (w === void 0) {
|
|
979
|
+
if (p in m) {
|
|
980
|
+
const k = o(() => /* @__PURE__ */ R(ce, s));
|
|
981
|
+
r.set(p, k), Fr(i);
|
|
982
|
+
}
|
|
983
|
+
} else
|
|
984
|
+
_(w, ce), Fr(i);
|
|
985
|
+
return !0;
|
|
986
|
+
},
|
|
987
|
+
get(m, p, w) {
|
|
988
|
+
if (p === qt) return e;
|
|
989
|
+
var k = r.get(p), T = p in m;
|
|
990
|
+
if (k === void 0 && (!T || Ft(m, p)?.writable) && (k = o(() => {
|
|
991
|
+
var $ = /* @__PURE__ */ R(Pe(T ? m[p] : ce), s);
|
|
992
|
+
return $;
|
|
993
|
+
}), r.set(p, k)), k !== void 0) {
|
|
994
|
+
var b = a(k);
|
|
995
|
+
return b === ce ? void 0 : b;
|
|
996
|
+
}
|
|
997
|
+
return Reflect.get(m, p, w);
|
|
998
|
+
},
|
|
999
|
+
getOwnPropertyDescriptor(m, p) {
|
|
1000
|
+
var w = Reflect.getOwnPropertyDescriptor(m, p);
|
|
1001
|
+
if (w && "value" in w) {
|
|
1002
|
+
var k = r.get(p);
|
|
1003
|
+
k && (w.value = a(k));
|
|
1004
|
+
} else if (w === void 0) {
|
|
1005
|
+
var T = r.get(p), b = T?.v;
|
|
1006
|
+
if (T !== void 0 && b !== ce) return {
|
|
1007
|
+
enumerable: !0,
|
|
1008
|
+
configurable: !0,
|
|
1009
|
+
value: b,
|
|
1010
|
+
writable: !0
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
return w;
|
|
1014
|
+
},
|
|
1015
|
+
has(m, p) {
|
|
1016
|
+
if (p === qt) return !0;
|
|
1017
|
+
var w = r.get(p), k = w !== void 0 && w.v !== ce || Reflect.has(m, p);
|
|
1018
|
+
return (w !== void 0 || j !== null && (!k || Ft(m, p)?.writable)) && (w === void 0 && (w = o(() => {
|
|
1019
|
+
var T = /* @__PURE__ */ R(k ? Pe(m[p]) : ce, s);
|
|
1020
|
+
return T;
|
|
1021
|
+
}), r.set(p, w)), a(w) === ce) ? !1 : k;
|
|
1022
|
+
},
|
|
1023
|
+
set(m, p, w, k) {
|
|
1024
|
+
var T = r.get(p), b = p in m;
|
|
1025
|
+
if (n && p === "length") for (var $ = w; $ < T.v; $ += 1) {
|
|
1026
|
+
var P = r.get($ + "");
|
|
1027
|
+
P !== void 0 ? _(P, ce) : $ in m && (P = o(() => /* @__PURE__ */ R(ce, s)), r.set($ + "", P));
|
|
1028
|
+
}
|
|
1029
|
+
if (T === void 0)
|
|
1030
|
+
(!b || Ft(m, p)?.writable) && (T = o(() => /* @__PURE__ */ R(void 0, s)), _(T, Pe(w)), r.set(p, T));
|
|
1031
|
+
else {
|
|
1032
|
+
b = T.v !== ce;
|
|
1033
|
+
var N = o(() => Pe(w));
|
|
1034
|
+
_(T, N);
|
|
1035
|
+
}
|
|
1036
|
+
var M = Reflect.getOwnPropertyDescriptor(m, p);
|
|
1037
|
+
if (M?.set && M.set.call(k, w), !b) {
|
|
1038
|
+
if (n && typeof p == "string") {
|
|
1039
|
+
var L = r.get("length"), W = Number(p);
|
|
1040
|
+
Number.isInteger(W) && W >= L.v && _(L, W + 1);
|
|
1041
|
+
}
|
|
1042
|
+
Fr(i);
|
|
1043
|
+
}
|
|
1044
|
+
return !0;
|
|
1045
|
+
},
|
|
1046
|
+
ownKeys(m) {
|
|
1047
|
+
a(i);
|
|
1048
|
+
var p = Reflect.ownKeys(m).filter((T) => {
|
|
1049
|
+
var b = r.get(T);
|
|
1050
|
+
return b === void 0 || b.v !== ce;
|
|
1051
|
+
});
|
|
1052
|
+
for (var [w, k] of r) k.v !== ce && !(w in m) && p.push(w);
|
|
1053
|
+
return p;
|
|
1054
|
+
},
|
|
1055
|
+
setPrototypeOf() {
|
|
1056
|
+
Eo();
|
|
1057
|
+
}
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
function eu(e, t) {
|
|
1061
|
+
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Qo.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
1062
|
+
}
|
|
1063
|
+
function Vs(e) {
|
|
1064
|
+
try {
|
|
1065
|
+
if (e !== null && typeof e == "object" && qt in e) return e[qt];
|
|
1066
|
+
} catch {
|
|
1067
|
+
}
|
|
1068
|
+
return e;
|
|
1069
|
+
}
|
|
1070
|
+
function tu(e, t) {
|
|
1071
|
+
return Object.is(Vs(e), Vs(t));
|
|
1072
|
+
}
|
|
1073
|
+
var Fs, ru, Ma, Pa, Ca;
|
|
1074
|
+
function xi() {
|
|
1075
|
+
if (Fs === void 0) {
|
|
1076
|
+
Fs = window, ru = document, Ma = /Firefox/.test(navigator.userAgent);
|
|
1077
|
+
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
1078
|
+
Pa = Ft(t, "firstChild").get, Ca = Ft(t, "nextSibling").get, Ps(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Ps(r) && (r.__t = void 0);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
function ge(e = "") {
|
|
1082
|
+
return document.createTextNode(e);
|
|
1083
|
+
}
|
|
1084
|
+
// @__NO_SIDE_EFFECTS__
|
|
1085
|
+
function pt(e) {
|
|
1086
|
+
return Pa.call(e);
|
|
1087
|
+
}
|
|
1088
|
+
// @__NO_SIDE_EFFECTS__
|
|
1089
|
+
function et(e) {
|
|
1090
|
+
return Ca.call(e);
|
|
1091
|
+
}
|
|
1092
|
+
function E(e, t) {
|
|
1093
|
+
if (!C) return /* @__PURE__ */ pt(e);
|
|
1094
|
+
var r = /* @__PURE__ */ pt(B);
|
|
1095
|
+
if (r === null) r = B.appendChild(ge());
|
|
1096
|
+
else if (t && r.nodeType !== 3) {
|
|
1097
|
+
var n = ge();
|
|
1098
|
+
return r?.before(n), de(n), n;
|
|
1099
|
+
}
|
|
1100
|
+
return t && Ln(r), de(r), r;
|
|
1101
|
+
}
|
|
1102
|
+
function nu(e, t = !1) {
|
|
1103
|
+
if (!C) {
|
|
1104
|
+
var r = /* @__PURE__ */ pt(e);
|
|
1105
|
+
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ et(r) : r;
|
|
1106
|
+
}
|
|
1107
|
+
if (t) {
|
|
1108
|
+
if (B?.nodeType !== 3) {
|
|
1109
|
+
var n = ge();
|
|
1110
|
+
return B?.before(n), de(n), n;
|
|
1111
|
+
}
|
|
1112
|
+
Ln(B);
|
|
1113
|
+
}
|
|
1114
|
+
return B;
|
|
1115
|
+
}
|
|
1116
|
+
function S(e, t = 1, r = !1) {
|
|
1117
|
+
let n = C ? B : e;
|
|
1118
|
+
for (var i; t--; )
|
|
1119
|
+
i = n, n = /* @__PURE__ */ et(n);
|
|
1120
|
+
if (!C) return n;
|
|
1121
|
+
if (r) {
|
|
1122
|
+
if (n?.nodeType !== 3) {
|
|
1123
|
+
var s = ge();
|
|
1124
|
+
return n === null ? i?.after(s) : n.before(s), de(s), s;
|
|
1125
|
+
}
|
|
1126
|
+
Ln(n);
|
|
1127
|
+
}
|
|
1128
|
+
return de(n), n;
|
|
1129
|
+
}
|
|
1130
|
+
function qi(e) {
|
|
1131
|
+
e.textContent = "";
|
|
1132
|
+
}
|
|
1133
|
+
function Ra() {
|
|
1134
|
+
return !qe || Je !== null ? !1 : (j.f & Oi) !== 0;
|
|
1135
|
+
}
|
|
1136
|
+
function Nn(e, t, r) {
|
|
1137
|
+
let n = r ? { is: r } : void 0;
|
|
1138
|
+
return document.createElementNS(t ?? "http://www.w3.org/1999/xhtml", e, n);
|
|
1139
|
+
}
|
|
1140
|
+
function Ln(e) {
|
|
1141
|
+
if (e.nodeValue.length < 65536) return;
|
|
1142
|
+
let t = e.nextSibling;
|
|
1143
|
+
for (; t !== null && t.nodeType === 3; )
|
|
1144
|
+
t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
|
|
1145
|
+
}
|
|
1146
|
+
function iu(e, t) {
|
|
1147
|
+
if (t) {
|
|
1148
|
+
const r = document.body;
|
|
1149
|
+
e.autofocus = !0, Xe(() => {
|
|
1150
|
+
document.activeElement === r && e.focus();
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
function su(e) {
|
|
1155
|
+
C && /* @__PURE__ */ pt(e) !== null && qi(e);
|
|
1156
|
+
}
|
|
1157
|
+
var qs = !1;
|
|
1158
|
+
function Oa() {
|
|
1159
|
+
qs || (qs = !0, document.addEventListener("reset", (e) => {
|
|
1160
|
+
Promise.resolve().then(() => {
|
|
1161
|
+
if (!e.defaultPrevented) for (const t of e.target.elements) t.__on_r?.();
|
|
1162
|
+
});
|
|
1163
|
+
}, { capture: !0 }));
|
|
1164
|
+
}
|
|
1165
|
+
function jn(e) {
|
|
1166
|
+
var t = F, r = j;
|
|
1167
|
+
Oe(null), Ze(null);
|
|
1168
|
+
try {
|
|
1169
|
+
return e();
|
|
1170
|
+
} finally {
|
|
1171
|
+
Oe(t), Ze(r);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
function Na(e, t, r, n = r) {
|
|
1175
|
+
e.addEventListener(t, () => jn(r));
|
|
1176
|
+
const i = e.__on_r;
|
|
1177
|
+
i ? e.__on_r = () => {
|
|
1178
|
+
i(), n(!0);
|
|
1179
|
+
} : e.__on_r = () => n(!0), Oa();
|
|
1180
|
+
}
|
|
1181
|
+
function au(e) {
|
|
1182
|
+
j === null && (F === null && wo(e), bo()), Tt && yo(e);
|
|
1183
|
+
}
|
|
1184
|
+
function lu(e, t) {
|
|
1185
|
+
var r = t.last;
|
|
1186
|
+
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1187
|
+
}
|
|
1188
|
+
function Ue(e, t) {
|
|
1189
|
+
var r = j;
|
|
1190
|
+
r !== null && r.f & 8192 && (e |= Ri);
|
|
1191
|
+
var n = {
|
|
1192
|
+
ctx: X,
|
|
1193
|
+
deps: null,
|
|
1194
|
+
nodes: null,
|
|
1195
|
+
f: e | Qe | 512,
|
|
1196
|
+
first: null,
|
|
1197
|
+
fn: t,
|
|
1198
|
+
last: null,
|
|
1199
|
+
next: null,
|
|
1200
|
+
parent: r,
|
|
1201
|
+
b: r && r.b,
|
|
1202
|
+
prev: null,
|
|
1203
|
+
teardown: null,
|
|
1204
|
+
wv: 0,
|
|
1205
|
+
ac: null
|
|
1206
|
+
}, i = n;
|
|
1207
|
+
if (e & 4) _r !== null ? _r.push(n) : Yt.ensure().schedule(n);
|
|
1208
|
+
else if (t !== null) {
|
|
1209
|
+
try {
|
|
1210
|
+
mr(n);
|
|
1211
|
+
} catch (u) {
|
|
1212
|
+
throw ve(n), u;
|
|
1213
|
+
}
|
|
1214
|
+
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, e & 16 && e & 65536 && i !== null && (i.f |= Pn));
|
|
1215
|
+
}
|
|
1216
|
+
if (i !== null && (i.parent = r, r !== null && lu(i, r), F !== null && F.f & 2 && !(e & 64))) {
|
|
1217
|
+
var s = F;
|
|
1218
|
+
(s.effects ?? (s.effects = [])).push(i);
|
|
1219
|
+
}
|
|
1220
|
+
return n;
|
|
1221
|
+
}
|
|
1222
|
+
function Ui() {
|
|
1223
|
+
return F !== null && !Fe;
|
|
1224
|
+
}
|
|
1225
|
+
function Bi(e) {
|
|
1226
|
+
const t = Ue(8, null);
|
|
1227
|
+
return ie(t, Re), t.teardown = e, t;
|
|
1228
|
+
}
|
|
1229
|
+
function Ei(e) {
|
|
1230
|
+
au("$effect");
|
|
1231
|
+
var t = j.f;
|
|
1232
|
+
if (!F && t & 32 && !(t & 32768)) {
|
|
1233
|
+
var r = X;
|
|
1234
|
+
(r.e ?? (r.e = [])).push(e);
|
|
1235
|
+
} else return La(e);
|
|
1236
|
+
}
|
|
1237
|
+
function La(e) {
|
|
1238
|
+
return Ue(4 | vo, e);
|
|
1239
|
+
}
|
|
1240
|
+
function ou(e) {
|
|
1241
|
+
Yt.ensure();
|
|
1242
|
+
const t = Ue(64 | yr, e);
|
|
1243
|
+
return () => {
|
|
1244
|
+
ve(t);
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
function uu(e) {
|
|
1248
|
+
Yt.ensure();
|
|
1249
|
+
const t = Ue(64 | yr, e);
|
|
1250
|
+
return (r = {}) => new Promise((n) => {
|
|
1251
|
+
r.outro ? Kt(t, () => {
|
|
1252
|
+
ve(t), n(void 0);
|
|
1253
|
+
}) : (ve(t), n(void 0));
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
function Kr(e) {
|
|
1257
|
+
return Ue(4, e);
|
|
1258
|
+
}
|
|
1259
|
+
function fu(e) {
|
|
1260
|
+
return Ue(po | yr, e);
|
|
1261
|
+
}
|
|
1262
|
+
function In(e, t = 0) {
|
|
1263
|
+
return Ue(8 | t, e);
|
|
1264
|
+
}
|
|
1265
|
+
function he(e, t = [], r = [], n = []) {
|
|
1266
|
+
ka(n, t, r, (i) => {
|
|
1267
|
+
Ue(8, () => e(...i.map(a)));
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
function Wn(e, t = 0) {
|
|
1271
|
+
var r = Ue(16 | t, e);
|
|
1272
|
+
return r;
|
|
1273
|
+
}
|
|
1274
|
+
function ja(e, t = 0) {
|
|
1275
|
+
var r = Ue(fo | t, e);
|
|
1276
|
+
return r;
|
|
1277
|
+
}
|
|
1278
|
+
function ke(e) {
|
|
1279
|
+
return Ue(32 | yr, e);
|
|
1280
|
+
}
|
|
1281
|
+
function Ia(e) {
|
|
1282
|
+
var t = e.teardown;
|
|
1283
|
+
if (t !== null) {
|
|
1284
|
+
const r = Tt, n = F;
|
|
1285
|
+
Us(!0), Oe(null);
|
|
1286
|
+
try {
|
|
1287
|
+
t.call(null);
|
|
1288
|
+
} finally {
|
|
1289
|
+
Us(r), Oe(n);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
function zi(e, t = !1) {
|
|
1294
|
+
var r = e.first;
|
|
1295
|
+
for (e.first = e.last = null; r !== null; ) {
|
|
1296
|
+
const i = r.ac;
|
|
1297
|
+
i !== null && jn(() => {
|
|
1298
|
+
i.abort(ct);
|
|
1299
|
+
});
|
|
1300
|
+
var n = r.next;
|
|
1301
|
+
r.f & 64 ? r.parent = null : ve(r, t), r = n;
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
function cu(e) {
|
|
1305
|
+
for (var t = e.first; t !== null; ) {
|
|
1306
|
+
var r = t.next;
|
|
1307
|
+
t.f & 32 || ve(t), t = r;
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
function ve(e, t = !0) {
|
|
1311
|
+
var r = !1;
|
|
1312
|
+
(t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (du(e.nodes.start, e.nodes.end), r = !0), ie(e, Cs), zi(e, t && !r), Dr(e, 0);
|
|
1313
|
+
var n = e.nodes && e.nodes.t;
|
|
1314
|
+
if (n !== null) for (const s of n) s.stop();
|
|
1315
|
+
Ia(e), e.f ^= Cs, e.f |= co;
|
|
1316
|
+
var i = e.parent;
|
|
1317
|
+
i !== null && i.first !== null && Wa(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1318
|
+
}
|
|
1319
|
+
function du(e, t) {
|
|
1320
|
+
for (; e !== null; ) {
|
|
1321
|
+
var r = e === t ? null : /* @__PURE__ */ et(e);
|
|
1322
|
+
e.remove(), e = r;
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
function Wa(e) {
|
|
1326
|
+
var t = e.parent, r = e.prev, n = e.next;
|
|
1327
|
+
r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
|
|
1328
|
+
}
|
|
1329
|
+
function Kt(e, t, r = !0) {
|
|
1330
|
+
var n = [];
|
|
1331
|
+
Va(e, n, !0);
|
|
1332
|
+
var i = () => {
|
|
1333
|
+
r && ve(e), t && t();
|
|
1334
|
+
}, s = n.length;
|
|
1335
|
+
if (s > 0) {
|
|
1336
|
+
var u = () => --s || i();
|
|
1337
|
+
for (var o of n) o.out(u);
|
|
1338
|
+
} else i();
|
|
1339
|
+
}
|
|
1340
|
+
function Va(e, t, r) {
|
|
1341
|
+
if (!(e.f & 8192)) {
|
|
1342
|
+
e.f ^= Ri;
|
|
1343
|
+
var n = e.nodes && e.nodes.t;
|
|
1344
|
+
if (n !== null)
|
|
1345
|
+
for (const o of n) (o.is_global || r) && t.push(o);
|
|
1346
|
+
for (var i = e.first; i !== null; ) {
|
|
1347
|
+
var s = i.next, u = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
|
|
1348
|
+
Va(i, t, u ? r : !1), i = s;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
function Di(e) {
|
|
1353
|
+
Fa(e, !0);
|
|
1354
|
+
}
|
|
1355
|
+
function Fa(e, t) {
|
|
1356
|
+
if (e.f & 8192) {
|
|
1357
|
+
e.f ^= Ri, e.f & 1024 || (ie(e, Qe), Yt.ensure().schedule(e));
|
|
1358
|
+
for (var r = e.first; r !== null; ) {
|
|
1359
|
+
var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
|
|
1360
|
+
Fa(r, i ? t : !1), r = n;
|
|
1361
|
+
}
|
|
1362
|
+
var s = e.nodes && e.nodes.t;
|
|
1363
|
+
if (s !== null)
|
|
1364
|
+
for (const u of s) (u.is_global || t) && u.in();
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
function Gi(e, t) {
|
|
1368
|
+
if (e.nodes)
|
|
1369
|
+
for (var r = e.nodes.start, n = e.nodes.end; r !== null; ) {
|
|
1370
|
+
var i = r === n ? null : /* @__PURE__ */ et(r);
|
|
1371
|
+
t.append(r), r = i;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
var vu = null, hn = !1, Tt = !1;
|
|
1375
|
+
function Us(e) {
|
|
1376
|
+
Tt = e;
|
|
1377
|
+
}
|
|
1378
|
+
var F = null, Fe = !1;
|
|
1379
|
+
function Oe(e) {
|
|
1380
|
+
F = e;
|
|
1381
|
+
}
|
|
1382
|
+
var j = null;
|
|
1383
|
+
function Ze(e) {
|
|
1384
|
+
j = e;
|
|
1385
|
+
}
|
|
1386
|
+
var Ce = null;
|
|
1387
|
+
function qa(e) {
|
|
1388
|
+
F !== null && (!qe || F.f & 2) && (Ce === null ? Ce = [e] : Ce.push(e));
|
|
1389
|
+
}
|
|
1390
|
+
var be = null, $e = 0, Me = null;
|
|
1391
|
+
function pu(e) {
|
|
1392
|
+
Me = e;
|
|
1393
|
+
}
|
|
1394
|
+
var Ua = 1, Vt = 0, Dt = Vt;
|
|
1395
|
+
function Bs(e) {
|
|
1396
|
+
Dt = e;
|
|
1397
|
+
}
|
|
1398
|
+
function Ba() {
|
|
1399
|
+
return ++Ua;
|
|
1400
|
+
}
|
|
1401
|
+
function Jr(e) {
|
|
1402
|
+
var t = e.f;
|
|
1403
|
+
if (t & 2048) return !0;
|
|
1404
|
+
if (t & 2 && (e.f &= ~Gr), t & 4096) {
|
|
1405
|
+
for (var r = e.deps, n = r.length, i = 0; i < n; i++) {
|
|
1406
|
+
var s = r[i];
|
|
1407
|
+
if (Jr(s) && Sa(s), s.wv > e.wv) return !0;
|
|
1408
|
+
}
|
|
1409
|
+
t & 512 && we === null && ie(e, Re);
|
|
1410
|
+
}
|
|
1411
|
+
return !1;
|
|
1412
|
+
}
|
|
1413
|
+
function za(e, t, r = !0) {
|
|
1414
|
+
var n = e.reactions;
|
|
1415
|
+
if (n !== null && !(!qe && Ce !== null && vr.call(Ce, e)))
|
|
1416
|
+
for (var i = 0; i < n.length; i++) {
|
|
1417
|
+
var s = n[i];
|
|
1418
|
+
s.f & 2 ? za(s, t, !1) : t === s && (r ? ie(s, Qe) : s.f & 1024 && ie(s, Ht), Ii(s));
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
function Da(e) {
|
|
1422
|
+
var t = be, r = $e, n = Me, i = F, s = Ce, u = X, o = Fe, c = Dt, g = e.f;
|
|
1423
|
+
be = null, $e = 0, Me = null, F = g & 96 ? null : e, Ce = null, hr(e.ctx), Fe = !1, Dt = ++Vt, e.ac !== null && (jn(() => {
|
|
1424
|
+
e.ac.abort(ct);
|
|
1425
|
+
}), e.ac = null);
|
|
1426
|
+
try {
|
|
1427
|
+
e.f |= Rs;
|
|
1428
|
+
var h = e.fn, m = h();
|
|
1429
|
+
e.f |= Oi;
|
|
1430
|
+
var p = e.deps, w = V?.is_fork;
|
|
1431
|
+
if (be !== null) {
|
|
1432
|
+
var k;
|
|
1433
|
+
if (w || Dr(e, $e), p !== null && $e > 0)
|
|
1434
|
+
for (p.length = $e + be.length, k = 0; k < be.length; k++) p[$e + k] = be[k];
|
|
1435
|
+
else e.deps = p = be;
|
|
1436
|
+
if (Ui() && e.f & 512) for (k = $e; k < p.length; k++) {
|
|
1437
|
+
var T;
|
|
1438
|
+
((T = p[k]).reactions ?? (T.reactions = [])).push(e);
|
|
1439
|
+
}
|
|
1440
|
+
} else !w && p !== null && $e < p.length && (Dr(e, $e), p.length = $e);
|
|
1441
|
+
if (Yr() && Me !== null && !Fe && p !== null && !(e.f & 6146)) for (k = 0; k < Me.length; k++) za(Me[k], e);
|
|
1442
|
+
if (i !== null && i !== e) {
|
|
1443
|
+
if (Vt++, i.deps !== null) for (let b = 0; b < r; b += 1) i.deps[b].rv = Vt;
|
|
1444
|
+
if (t !== null) for (const b of t) b.rv = Vt;
|
|
1445
|
+
Me !== null && (n === null ? n = Me : n.push(...Me));
|
|
1446
|
+
}
|
|
1447
|
+
return e.f & 8388608 && (e.f ^= yn), m;
|
|
1448
|
+
} catch (b) {
|
|
1449
|
+
return oa(b);
|
|
1450
|
+
} finally {
|
|
1451
|
+
e.f ^= Rs, be = t, $e = r, Me = n, F = i, Ce = s, hr(u), Fe = o, Dt = c;
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
function hu(e, t) {
|
|
1455
|
+
let r = t.reactions;
|
|
1456
|
+
if (r !== null) {
|
|
1457
|
+
var n = ro.call(r, e);
|
|
1458
|
+
if (n !== -1) {
|
|
1459
|
+
var i = r.length - 1;
|
|
1460
|
+
i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
if (r === null && t.f & 2 && (be === null || !vr.call(be, t))) {
|
|
1464
|
+
var s = t;
|
|
1465
|
+
s.f & 512 && (s.f ^= 512, s.f &= ~Gr), Li(s), Xo(s), Dr(s, 0);
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
function Dr(e, t) {
|
|
1469
|
+
var r = e.deps;
|
|
1470
|
+
if (r !== null)
|
|
1471
|
+
for (var n = t; n < r.length; n++) hu(e, r[n]);
|
|
1472
|
+
}
|
|
1473
|
+
function mr(e) {
|
|
1474
|
+
var t = e.f;
|
|
1475
|
+
if (!(t & 16384)) {
|
|
1476
|
+
ie(e, Re);
|
|
1477
|
+
var r = j, n = hn;
|
|
1478
|
+
if (j = e, hn = !0, 0)
|
|
1479
|
+
var i, s;
|
|
1480
|
+
try {
|
|
1481
|
+
t & 16777232 ? cu(e) : zi(e), Ia(e);
|
|
1482
|
+
var u = Da(e);
|
|
1483
|
+
if (e.teardown = typeof u == "function" ? u : null, e.wv = Ua, 0)
|
|
1484
|
+
for (var o of e.deps) ;
|
|
1485
|
+
} finally {
|
|
1486
|
+
hn = n, j = r;
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
async function _u() {
|
|
1491
|
+
if (qe) return new Promise((e) => {
|
|
1492
|
+
requestAnimationFrame(() => e()), setTimeout(() => e());
|
|
1493
|
+
});
|
|
1494
|
+
await Promise.resolve(), It();
|
|
1495
|
+
}
|
|
1496
|
+
function a(e) {
|
|
1497
|
+
var t = (e.f & 2) !== 0;
|
|
1498
|
+
if (vu?.add(e), F !== null && !Fe && !(j !== null && j.f & 16384) && (Ce === null || !vr.call(Ce, e))) {
|
|
1499
|
+
var r = F.deps;
|
|
1500
|
+
if (F.f & 2097152)
|
|
1501
|
+
e.rv < Vt && (e.rv = Vt, be === null && r !== null && r[$e] === e ? $e++ : be === null ? be = [e] : be.push(e));
|
|
1502
|
+
else {
|
|
1503
|
+
var n;
|
|
1504
|
+
((n = F).deps ?? (n.deps = [])).push(e);
|
|
1505
|
+
var i = e.reactions;
|
|
1506
|
+
i === null ? e.reactions = [F] : vr.call(i, F) || i.push(F);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
if (0) {
|
|
1510
|
+
if (!Fe && reactivity_loss_tracker && !reactivity_loss_tracker.warned && !(reactivity_loss_tracker.effect.f & 2097152))
|
|
1511
|
+
var s;
|
|
1512
|
+
if (tracing_mode_flag && !Fe && tracing_expressions !== null && F !== null && tracing_expressions.reaction === F && !e.trace) {
|
|
1513
|
+
if (s)
|
|
1514
|
+
var u, o;
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
if (Tt && Et.has(e)) return Et.get(e);
|
|
1518
|
+
if (t) {
|
|
1519
|
+
var c = e;
|
|
1520
|
+
if (Tt) {
|
|
1521
|
+
var g = c.v;
|
|
1522
|
+
return (!(c.f & 1024) && c.reactions !== null || Ha(c)) && (g = Fi(c)), Et.set(c, g), g;
|
|
1523
|
+
}
|
|
1524
|
+
var h = (c.f & 512) === 0 && !Fe && F !== null && (hn || (F.f & 512) !== 0), m = (c.f & Oi) === 0;
|
|
1525
|
+
Jr(c) && (h && (c.f |= 512), Sa(c)), h && !m && (xa(c), Ga(c));
|
|
1526
|
+
}
|
|
1527
|
+
if (we?.has(e)) return we.get(e);
|
|
1528
|
+
if (e.f & 8388608) throw e.v;
|
|
1529
|
+
return e.v;
|
|
1530
|
+
}
|
|
1531
|
+
function Ga(e) {
|
|
1532
|
+
if (e.f |= 512, e.deps !== null)
|
|
1533
|
+
for (const t of e.deps)
|
|
1534
|
+
(t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (xa(t), Ga(t));
|
|
1535
|
+
}
|
|
1536
|
+
function Ha(e) {
|
|
1537
|
+
if (e.v === ce) return !0;
|
|
1538
|
+
if (e.deps === null) return !1;
|
|
1539
|
+
for (const t of e.deps)
|
|
1540
|
+
if (Et.has(t) || t.f & 2 && Ha(t)) return !0;
|
|
1541
|
+
return !1;
|
|
1542
|
+
}
|
|
1543
|
+
function Jt(e) {
|
|
1544
|
+
var t = Fe;
|
|
1545
|
+
try {
|
|
1546
|
+
return Fe = !0, e();
|
|
1547
|
+
} finally {
|
|
1548
|
+
Fe = t;
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
var cr = Symbol("events"), Ya = /* @__PURE__ */ new Set(), Ti = /* @__PURE__ */ new Set();
|
|
1552
|
+
function gu(e, t, r, n = {}) {
|
|
1553
|
+
function i(s) {
|
|
1554
|
+
if (n.capture || Ai.call(t, s), !s.cancelBubble) return jn(() => r?.call(this, s));
|
|
1555
|
+
}
|
|
1556
|
+
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Xe(() => {
|
|
1557
|
+
t.addEventListener(e, i, n);
|
|
1558
|
+
}) : t.addEventListener(e, i, n), i;
|
|
1559
|
+
}
|
|
1560
|
+
function _e(e, t, r) {
|
|
1561
|
+
(t[cr] ?? (t[cr] = {}))[e] = r;
|
|
1562
|
+
}
|
|
1563
|
+
function Ka(e) {
|
|
1564
|
+
for (var t = 0; t < e.length; t++) Ya.add(e[t]);
|
|
1565
|
+
for (var r of Ti) r(e);
|
|
1566
|
+
}
|
|
1567
|
+
var zs = null;
|
|
1568
|
+
function Ai(e) {
|
|
1569
|
+
var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], s = i[0] || e.target;
|
|
1570
|
+
zs = e;
|
|
1571
|
+
var u = 0, o = zs === e && e[cr];
|
|
1572
|
+
if (o) {
|
|
1573
|
+
var c = i.indexOf(o);
|
|
1574
|
+
if (c !== -1 && (t === document || t === window)) {
|
|
1575
|
+
e[cr] = t;
|
|
1576
|
+
return;
|
|
1577
|
+
}
|
|
1578
|
+
var g = i.indexOf(t);
|
|
1579
|
+
if (g === -1) return;
|
|
1580
|
+
c <= g && (u = c);
|
|
1581
|
+
}
|
|
1582
|
+
if (s = i[u] || e.target, s !== t) {
|
|
1583
|
+
mn(e, "currentTarget", {
|
|
1584
|
+
configurable: !0,
|
|
1585
|
+
get() {
|
|
1586
|
+
return s || r;
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
var h = F, m = j;
|
|
1590
|
+
Oe(null), Ze(null);
|
|
1591
|
+
try {
|
|
1592
|
+
for (var p, w = []; s !== null; ) {
|
|
1593
|
+
var k = s.assignedSlot || s.parentNode || s.host || null;
|
|
1594
|
+
try {
|
|
1595
|
+
var T = s[cr]?.[n];
|
|
1596
|
+
T != null && (!s.disabled || e.target === s) && T.call(s, e);
|
|
1597
|
+
} catch (b) {
|
|
1598
|
+
p ? w.push(b) : p = b;
|
|
1599
|
+
}
|
|
1600
|
+
if (e.cancelBubble || k === t || k === null) break;
|
|
1601
|
+
s = k;
|
|
1602
|
+
}
|
|
1603
|
+
if (p) {
|
|
1604
|
+
for (let b of w) queueMicrotask(() => {
|
|
1605
|
+
throw b;
|
|
1606
|
+
});
|
|
1607
|
+
throw p;
|
|
1608
|
+
}
|
|
1609
|
+
} finally {
|
|
1610
|
+
e[cr] = t, delete e.currentTarget, Oe(h), Ze(m);
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
var mu = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
|
|
1615
|
+
function yu(e) {
|
|
1616
|
+
return mu?.createHTML(e) ?? e;
|
|
1617
|
+
}
|
|
1618
|
+
function bu(e) {
|
|
1619
|
+
var t = Nn("template");
|
|
1620
|
+
return t.innerHTML = yu(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1621
|
+
}
|
|
1622
|
+
function vt(e, t) {
|
|
1623
|
+
var r = j;
|
|
1624
|
+
r.nodes === null && (r.nodes = {
|
|
1625
|
+
start: e,
|
|
1626
|
+
end: t,
|
|
1627
|
+
a: null,
|
|
1628
|
+
t: null
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
// @__NO_SIDE_EFFECTS__
|
|
1632
|
+
function ue(e, t) {
|
|
1633
|
+
var r = (t & 1) !== 0, n = (t & 2) !== 0, i, s = !e.startsWith("<!>");
|
|
1634
|
+
return () => {
|
|
1635
|
+
if (C)
|
|
1636
|
+
return vt(B, null), B;
|
|
1637
|
+
i === void 0 && (i = bu(s ? e : "<!>" + e), r || (i = /* @__PURE__ */ pt(i)));
|
|
1638
|
+
var u = n || Ma ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1639
|
+
if (r) {
|
|
1640
|
+
var o = /* @__PURE__ */ pt(u), c = u.lastChild;
|
|
1641
|
+
vt(o, c);
|
|
1642
|
+
} else vt(u, u);
|
|
1643
|
+
return u;
|
|
1644
|
+
};
|
|
1645
|
+
}
|
|
1646
|
+
function di(e = "") {
|
|
1647
|
+
if (!C) {
|
|
1648
|
+
var t = ge(e + "");
|
|
1649
|
+
return vt(t, t), t;
|
|
1650
|
+
}
|
|
1651
|
+
var r = B;
|
|
1652
|
+
return r.nodeType !== 3 ? (r.before(r = ge()), de(r)) : Ln(r), vt(r, r), r;
|
|
1653
|
+
}
|
|
1654
|
+
function wu() {
|
|
1655
|
+
if (C)
|
|
1656
|
+
return vt(B, null), B;
|
|
1657
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), r = ge();
|
|
1658
|
+
return e.append(t, r), vt(t, r), e;
|
|
1659
|
+
}
|
|
1660
|
+
function J(e, t) {
|
|
1661
|
+
if (C) {
|
|
1662
|
+
var r = j;
|
|
1663
|
+
(!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = B), pr();
|
|
1664
|
+
return;
|
|
1665
|
+
}
|
|
1666
|
+
e !== null && e.before(t);
|
|
1667
|
+
}
|
|
1668
|
+
function ku(e) {
|
|
1669
|
+
return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
|
|
1670
|
+
}
|
|
1671
|
+
var $u = [
|
|
1672
|
+
"beforeinput",
|
|
1673
|
+
"click",
|
|
1674
|
+
"change",
|
|
1675
|
+
"dblclick",
|
|
1676
|
+
"contextmenu",
|
|
1677
|
+
"focusin",
|
|
1678
|
+
"focusout",
|
|
1679
|
+
"input",
|
|
1680
|
+
"keydown",
|
|
1681
|
+
"keyup",
|
|
1682
|
+
"mousedown",
|
|
1683
|
+
"mousemove",
|
|
1684
|
+
"mouseout",
|
|
1685
|
+
"mouseover",
|
|
1686
|
+
"mouseup",
|
|
1687
|
+
"pointerdown",
|
|
1688
|
+
"pointermove",
|
|
1689
|
+
"pointerout",
|
|
1690
|
+
"pointerover",
|
|
1691
|
+
"pointerup",
|
|
1692
|
+
"touchend",
|
|
1693
|
+
"touchmove",
|
|
1694
|
+
"touchstart"
|
|
1695
|
+
];
|
|
1696
|
+
function Su(e) {
|
|
1697
|
+
return $u.includes(e);
|
|
1698
|
+
}
|
|
1699
|
+
var xu = [
|
|
1700
|
+
"allowfullscreen",
|
|
1701
|
+
"async",
|
|
1702
|
+
"autofocus",
|
|
1703
|
+
"autoplay",
|
|
1704
|
+
"checked",
|
|
1705
|
+
"controls",
|
|
1706
|
+
"default",
|
|
1707
|
+
"disabled",
|
|
1708
|
+
"formnovalidate",
|
|
1709
|
+
"indeterminate",
|
|
1710
|
+
"inert",
|
|
1711
|
+
"ismap",
|
|
1712
|
+
"loop",
|
|
1713
|
+
"multiple",
|
|
1714
|
+
"muted",
|
|
1715
|
+
"nomodule",
|
|
1716
|
+
"novalidate",
|
|
1717
|
+
"open",
|
|
1718
|
+
"playsinline",
|
|
1719
|
+
"readonly",
|
|
1720
|
+
"required",
|
|
1721
|
+
"reversed",
|
|
1722
|
+
"seamless",
|
|
1723
|
+
"selected",
|
|
1724
|
+
"webkitdirectory",
|
|
1725
|
+
"defer",
|
|
1726
|
+
"disablepictureinpicture",
|
|
1727
|
+
"disableremoteplayback"
|
|
1728
|
+
], Eu = {
|
|
1729
|
+
formnovalidate: "formNoValidate",
|
|
1730
|
+
ismap: "isMap",
|
|
1731
|
+
nomodule: "noModule",
|
|
1732
|
+
playsinline: "playsInline",
|
|
1733
|
+
readonly: "readOnly",
|
|
1734
|
+
defaultvalue: "defaultValue",
|
|
1735
|
+
defaultchecked: "defaultChecked",
|
|
1736
|
+
srcobject: "srcObject",
|
|
1737
|
+
novalidate: "noValidate",
|
|
1738
|
+
allowfullscreen: "allowFullscreen",
|
|
1739
|
+
disablepictureinpicture: "disablePictureInPicture",
|
|
1740
|
+
disableremoteplayback: "disableRemotePlayback"
|
|
1741
|
+
};
|
|
1742
|
+
function Tu(e) {
|
|
1743
|
+
return e = e.toLowerCase(), Eu[e] ?? e;
|
|
1744
|
+
}
|
|
1745
|
+
var Nf = [
|
|
1746
|
+
...xu,
|
|
1747
|
+
"formNoValidate",
|
|
1748
|
+
"isMap",
|
|
1749
|
+
"noModule",
|
|
1750
|
+
"playsInline",
|
|
1751
|
+
"readOnly",
|
|
1752
|
+
"value",
|
|
1753
|
+
"volume",
|
|
1754
|
+
"defaultValue",
|
|
1755
|
+
"defaultChecked",
|
|
1756
|
+
"srcObject",
|
|
1757
|
+
"noValidate",
|
|
1758
|
+
"allowFullscreen",
|
|
1759
|
+
"disablePictureInPicture",
|
|
1760
|
+
"disableRemotePlayback"
|
|
1761
|
+
], Au = ["touchstart", "touchmove"];
|
|
1762
|
+
function Mu(e) {
|
|
1763
|
+
return Au.includes(e);
|
|
1764
|
+
}
|
|
1765
|
+
var Pu = [
|
|
1766
|
+
"$state",
|
|
1767
|
+
"$state.raw",
|
|
1768
|
+
"$derived",
|
|
1769
|
+
"$derived.by"
|
|
1770
|
+
], Lf = [
|
|
1771
|
+
...Pu,
|
|
1772
|
+
"$state.eager",
|
|
1773
|
+
"$state.snapshot",
|
|
1774
|
+
"$props",
|
|
1775
|
+
"$props.id",
|
|
1776
|
+
"$bindable",
|
|
1777
|
+
"$effect",
|
|
1778
|
+
"$effect.pre",
|
|
1779
|
+
"$effect.tracking",
|
|
1780
|
+
"$effect.root",
|
|
1781
|
+
"$effect.pending",
|
|
1782
|
+
"$inspect",
|
|
1783
|
+
"$inspect().with",
|
|
1784
|
+
"$inspect.trace",
|
|
1785
|
+
"$host"
|
|
1786
|
+
], Cu = [
|
|
1787
|
+
"textarea",
|
|
1788
|
+
"script",
|
|
1789
|
+
"style",
|
|
1790
|
+
"title"
|
|
1791
|
+
];
|
|
1792
|
+
function Ru(e) {
|
|
1793
|
+
return Cu.includes(e);
|
|
1794
|
+
}
|
|
1795
|
+
var Mi = !0;
|
|
1796
|
+
function cn(e) {
|
|
1797
|
+
Mi = e;
|
|
1798
|
+
}
|
|
1799
|
+
function oe(e, t) {
|
|
1800
|
+
var r = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1801
|
+
r !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = r, e.nodeValue = `${r}`);
|
|
1802
|
+
}
|
|
1803
|
+
function Ja(e, t) {
|
|
1804
|
+
return Xa(e, t);
|
|
1805
|
+
}
|
|
1806
|
+
function Ou(e, t) {
|
|
1807
|
+
xi(), t.intro = t.intro ?? !1;
|
|
1808
|
+
const r = t.target, n = C, i = B;
|
|
1809
|
+
try {
|
|
1810
|
+
for (var s = /* @__PURE__ */ pt(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ et(s);
|
|
1811
|
+
if (!s) throw dr;
|
|
1812
|
+
Se(!0), de(s);
|
|
1813
|
+
const u = Xa(e, {
|
|
1814
|
+
...t,
|
|
1815
|
+
anchor: s
|
|
1816
|
+
});
|
|
1817
|
+
return Se(!1), u;
|
|
1818
|
+
} catch (u) {
|
|
1819
|
+
if (u instanceof Error && u.message.split(`
|
|
1820
|
+
`).some((o) => o.startsWith("https://svelte.dev/e/"))) throw u;
|
|
1821
|
+
return u !== dr && console.warn("Failed to hydrate: ", u), t.recover === !1 && $o(), xi(), qi(r), Se(!1), Ja(e, t);
|
|
1822
|
+
} finally {
|
|
1823
|
+
Se(n), de(i);
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
var dn = /* @__PURE__ */ new Map();
|
|
1827
|
+
function Xa(e, { target: t, anchor: r, props: n = {}, events: i, context: s, intro: u = !0, transformError: o }) {
|
|
1828
|
+
xi();
|
|
1829
|
+
var c = void 0, g = uu(() => {
|
|
1830
|
+
var h = r ?? t.appendChild(ge());
|
|
1831
|
+
Uo(h, { pending: () => {
|
|
1832
|
+
} }, (w) => {
|
|
1833
|
+
sa({});
|
|
1834
|
+
var k = X;
|
|
1835
|
+
if (s && (k.c = s), i && (n.$$events = i), C && vt(w, null), Mi = u, c = e(w, n) || {}, Mi = !0, C && (j.nodes.end = B, B === null || B.nodeType !== 8 || B.data !== "]"))
|
|
1836
|
+
throw Rn(), dr;
|
|
1837
|
+
aa();
|
|
1838
|
+
}, o);
|
|
1839
|
+
var m = /* @__PURE__ */ new Set(), p = (w) => {
|
|
1840
|
+
for (var k = 0; k < w.length; k++) {
|
|
1841
|
+
var T = w[k];
|
|
1842
|
+
if (!m.has(T)) {
|
|
1843
|
+
m.add(T);
|
|
1844
|
+
var b = Mu(T);
|
|
1845
|
+
for (const N of [t, document]) {
|
|
1846
|
+
var $ = dn.get(N);
|
|
1847
|
+
$ === void 0 && ($ = /* @__PURE__ */ new Map(), dn.set(N, $));
|
|
1848
|
+
var P = $.get(T);
|
|
1849
|
+
P === void 0 ? (N.addEventListener(T, Ai, { passive: b }), $.set(T, 1)) : $.set(T, P + 1);
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
};
|
|
1854
|
+
return p(Mn(Ya)), Ti.add(p), () => {
|
|
1855
|
+
for (var w of m) for (const b of [t, document]) {
|
|
1856
|
+
var k = dn.get(b), T = k.get(w);
|
|
1857
|
+
--T == 0 ? (b.removeEventListener(w, Ai), k.delete(w), k.size === 0 && dn.delete(b)) : k.set(w, T);
|
|
1858
|
+
}
|
|
1859
|
+
Ti.delete(p), h !== r && h.parentNode?.removeChild(h);
|
|
1860
|
+
};
|
|
1861
|
+
});
|
|
1862
|
+
return Pi.set(c, g), c;
|
|
1863
|
+
}
|
|
1864
|
+
var Pi = /* @__PURE__ */ new WeakMap();
|
|
1865
|
+
function Nu(e, t) {
|
|
1866
|
+
const r = Pi.get(e);
|
|
1867
|
+
return r ? (Pi.delete(e), r(t)) : Promise.resolve();
|
|
1868
|
+
}
|
|
1869
|
+
var lt = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakMap(), vi = /* @__PURE__ */ new WeakMap(), pi = /* @__PURE__ */ new WeakMap(), Ds = /* @__PURE__ */ new WeakMap(), Za = class {
|
|
1870
|
+
constructor(e, t = !0) {
|
|
1871
|
+
Q(this, "anchor", void 0), I(this, lt, /* @__PURE__ */ new Map()), I(this, wt, /* @__PURE__ */ new Map()), I(this, je, /* @__PURE__ */ new Map()), I(this, Pr, /* @__PURE__ */ new Set()), I(this, vi, !0), I(this, pi, (r) => {
|
|
1872
|
+
if (d(lt, this).has(r)) {
|
|
1873
|
+
var n = d(lt, this).get(r), i = d(wt, this).get(n);
|
|
1874
|
+
if (i)
|
|
1875
|
+
Di(i), d(Pr, this).delete(n);
|
|
1876
|
+
else {
|
|
1877
|
+
var s = d(je, this).get(n);
|
|
1878
|
+
s && (d(wt, this).set(n, s.effect), d(je, this).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), i = s.effect);
|
|
1879
|
+
}
|
|
1880
|
+
for (const [u, o] of d(lt, this)) {
|
|
1881
|
+
if (d(lt, this).delete(u), u === r) break;
|
|
1882
|
+
const c = d(je, this).get(o);
|
|
1883
|
+
c && (ve(c.effect), d(je, this).delete(o));
|
|
1884
|
+
}
|
|
1885
|
+
for (const [u, o] of d(wt, this)) {
|
|
1886
|
+
if (u === n || d(Pr, this).has(u)) continue;
|
|
1887
|
+
const c = () => {
|
|
1888
|
+
if (Array.from(d(lt, this).values()).includes(u)) {
|
|
1889
|
+
var g = document.createDocumentFragment();
|
|
1890
|
+
Gi(o, g), g.append(ge()), d(je, this).set(u, {
|
|
1891
|
+
effect: o,
|
|
1892
|
+
fragment: g
|
|
1893
|
+
});
|
|
1894
|
+
} else ve(o);
|
|
1895
|
+
d(Pr, this).delete(u), d(wt, this).delete(u);
|
|
1896
|
+
};
|
|
1897
|
+
d(vi, this) || !i ? (d(Pr, this).add(u), Kt(o, c, !1)) : c();
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
}), I(this, Ds, (r) => {
|
|
1901
|
+
d(lt, this).delete(r);
|
|
1902
|
+
const n = Array.from(d(lt, this).values());
|
|
1903
|
+
for (const [i, s] of d(je, this)) n.includes(i) || (ve(s.effect), d(je, this).delete(i));
|
|
1904
|
+
}), this.anchor = e, O(vi, this, t);
|
|
1905
|
+
}
|
|
1906
|
+
ensure(e, t) {
|
|
1907
|
+
var r = V, n = Ra();
|
|
1908
|
+
if (t && !d(wt, this).has(e) && !d(je, this).has(e)) if (n) {
|
|
1909
|
+
var i = document.createDocumentFragment(), s = ge();
|
|
1910
|
+
i.append(s), d(je, this).set(e, {
|
|
1911
|
+
effect: ke(() => t(s)),
|
|
1912
|
+
fragment: i
|
|
1913
|
+
});
|
|
1914
|
+
} else d(wt, this).set(e, ke(() => t(this.anchor)));
|
|
1915
|
+
if (d(lt, this).set(r, e), n) {
|
|
1916
|
+
for (const [u, o] of d(wt, this)) u === e ? r.unskip_effect(o) : r.skip_effect(o);
|
|
1917
|
+
for (const [u, o] of d(je, this)) u === e ? r.unskip_effect(o.effect) : r.skip_effect(o.effect);
|
|
1918
|
+
r.oncommit(d(pi, this)), r.ondiscard(d(Ds, this));
|
|
1919
|
+
} else
|
|
1920
|
+
C && (this.anchor = B), d(pi, this).call(this, r);
|
|
1921
|
+
}
|
|
1922
|
+
};
|
|
1923
|
+
function Qa(e) {
|
|
1924
|
+
X === null && Ni("onMount"), Hr && X.l !== null ? Wu(X).m.push(e) : Ei(() => {
|
|
1925
|
+
const t = Jt(e);
|
|
1926
|
+
if (typeof t == "function") return t;
|
|
1927
|
+
});
|
|
1928
|
+
}
|
|
1929
|
+
function Lu(e) {
|
|
1930
|
+
X === null && Ni("onDestroy"), Qa(() => () => Jt(e));
|
|
1931
|
+
}
|
|
1932
|
+
function ju(e, t, { bubbles: r = !1, cancelable: n = !1 } = {}) {
|
|
1933
|
+
return new CustomEvent(e, {
|
|
1934
|
+
detail: t,
|
|
1935
|
+
bubbles: r,
|
|
1936
|
+
cancelable: n
|
|
1937
|
+
});
|
|
1938
|
+
}
|
|
1939
|
+
function Iu() {
|
|
1940
|
+
const e = X;
|
|
1941
|
+
return e === null && Ni("createEventDispatcher"), (t, r, n) => {
|
|
1942
|
+
const i = e.s.$$events?.[t];
|
|
1943
|
+
if (i) {
|
|
1944
|
+
const s = An(i) ? i.slice() : [i], u = ju(t, r, n);
|
|
1945
|
+
for (const o of s) o.call(e.x, u);
|
|
1946
|
+
return !u.defaultPrevented;
|
|
1947
|
+
}
|
|
1948
|
+
return !0;
|
|
1949
|
+
};
|
|
1950
|
+
}
|
|
1951
|
+
function Wu(e) {
|
|
1952
|
+
var t = e.l;
|
|
1953
|
+
return t.u ?? (t.u = {
|
|
1954
|
+
a: [],
|
|
1955
|
+
b: [],
|
|
1956
|
+
m: []
|
|
1957
|
+
});
|
|
1958
|
+
}
|
|
1959
|
+
function Ge(e, t, r = !1) {
|
|
1960
|
+
var n;
|
|
1961
|
+
C && (n = B, pr());
|
|
1962
|
+
var i = new Za(e), s = r ? Pn : 0;
|
|
1963
|
+
function u(o, c) {
|
|
1964
|
+
if (C) {
|
|
1965
|
+
var g = ra(n);
|
|
1966
|
+
if (o !== parseInt(g.substring(1))) {
|
|
1967
|
+
var h = bn();
|
|
1968
|
+
de(h), i.anchor = h, Se(!1), i.ensure(o, c), Se(!0);
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
i.ensure(o, c);
|
|
1973
|
+
}
|
|
1974
|
+
Wn(() => {
|
|
1975
|
+
var o = !1;
|
|
1976
|
+
t((c, g = 0) => {
|
|
1977
|
+
o = !0, u(g, c);
|
|
1978
|
+
}), o || u(-1, null);
|
|
1979
|
+
}, s);
|
|
1980
|
+
}
|
|
1981
|
+
function Cr(e, t) {
|
|
1982
|
+
return t;
|
|
1983
|
+
}
|
|
1984
|
+
function Vu(e, t, r) {
|
|
1985
|
+
for (var n = [], i = t.length, s, u = t.length, o = 0; o < i; o++) {
|
|
1986
|
+
let m = t[o];
|
|
1987
|
+
Kt(m, () => {
|
|
1988
|
+
if (s) {
|
|
1989
|
+
if (s.pending.delete(m), s.done.add(m), s.pending.size === 0) {
|
|
1990
|
+
var p = e.outrogroups;
|
|
1991
|
+
Ci(e, Mn(s.done)), p.delete(s), p.size === 0 && (e.outrogroups = null);
|
|
1992
|
+
}
|
|
1993
|
+
} else u -= 1;
|
|
1994
|
+
}, !1);
|
|
1995
|
+
}
|
|
1996
|
+
if (u === 0) {
|
|
1997
|
+
var c = n.length === 0 && r !== null;
|
|
1998
|
+
if (c) {
|
|
1999
|
+
var g = r, h = g.parentNode;
|
|
2000
|
+
qi(h), h.append(g), e.items.clear();
|
|
2001
|
+
}
|
|
2002
|
+
Ci(e, t, !c);
|
|
2003
|
+
} else
|
|
2004
|
+
s = {
|
|
2005
|
+
pending: new Set(t),
|
|
2006
|
+
done: /* @__PURE__ */ new Set()
|
|
2007
|
+
}, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(s);
|
|
2008
|
+
}
|
|
2009
|
+
function Ci(e, t, r = !0) {
|
|
2010
|
+
var n;
|
|
2011
|
+
if (e.pending.size > 0) {
|
|
2012
|
+
n = /* @__PURE__ */ new Set();
|
|
2013
|
+
for (const u of e.pending.values()) for (const o of u) n.add(e.items.get(o).e);
|
|
2014
|
+
}
|
|
2015
|
+
for (var i = 0; i < t.length; i++) {
|
|
2016
|
+
var s = t[i];
|
|
2017
|
+
n?.has(s) ? (s.f |= Wr, Gi(s, document.createDocumentFragment())) : ve(t[i], r);
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
var vn;
|
|
2021
|
+
function Rr(e, t, r, n, i, s = null) {
|
|
2022
|
+
var u = e, o = /* @__PURE__ */ new Map();
|
|
2023
|
+
if (t & 4) {
|
|
2024
|
+
var c = e;
|
|
2025
|
+
u = C ? de(/* @__PURE__ */ pt(c)) : c.appendChild(ge());
|
|
2026
|
+
}
|
|
2027
|
+
C && pr();
|
|
2028
|
+
var g = null, h = /* @__PURE__ */ Vi(() => {
|
|
2029
|
+
var $ = r();
|
|
2030
|
+
return An($) ? $ : $ == null ? [] : Mn($);
|
|
2031
|
+
}), m, p = /* @__PURE__ */ new Map(), w = !0;
|
|
2032
|
+
function k($) {
|
|
2033
|
+
b.effect.f & 16384 || (b.pending.delete($), b.fallback = g, Fu(b, m, u, t, n), g !== null && (m.length === 0 ? g.f & 33554432 ? (g.f ^= Wr, Ir(g, null, u)) : Di(g) : Kt(g, () => {
|
|
2034
|
+
g = null;
|
|
2035
|
+
})));
|
|
2036
|
+
}
|
|
2037
|
+
function T($) {
|
|
2038
|
+
b.pending.delete($);
|
|
2039
|
+
}
|
|
2040
|
+
var b = {
|
|
2041
|
+
effect: Wn(() => {
|
|
2042
|
+
m = a(h);
|
|
2043
|
+
var $ = m.length;
|
|
2044
|
+
let P = !1;
|
|
2045
|
+
C && ra(u) === "[!" != ($ === 0) && (u = bn(), de(u), Se(!1), P = !0);
|
|
2046
|
+
for (var N = /* @__PURE__ */ new Set(), M = V, L = Ra(), W = 0; W < $; W += 1) {
|
|
2047
|
+
C && B.nodeType === 8 && B.data === "]" && (u = B, P = !0, Se(!1));
|
|
2048
|
+
var Y = m[W], q = n(Y, W);
|
|
2049
|
+
if (0)
|
|
2050
|
+
var me;
|
|
2051
|
+
var G = w ? null : o.get(q);
|
|
2052
|
+
G ? (G.v && gr(G.v, Y), G.i && gr(G.i, W), L && M.unskip_effect(G.e)) : (G = qu(o, w ? u : vn ?? (vn = ge()), Y, q, W, i, t, r), w || (G.e.f |= Wr), o.set(q, G)), N.add(q);
|
|
2053
|
+
}
|
|
2054
|
+
if ($ === 0 && s && !g && (w ? g = ke(() => s(u)) : (g = ke(() => s(vn ?? (vn = ge()))), g.f |= Wr)), $ > N.size && mo("", "", ""), C && $ > 0 && de(bn()), !w)
|
|
2055
|
+
if (p.set(M, N), L) {
|
|
2056
|
+
for (const [ht, tt] of o) N.has(ht) || M.skip_effect(tt.e);
|
|
2057
|
+
M.oncommit(k), M.ondiscard(T);
|
|
2058
|
+
} else k(M);
|
|
2059
|
+
P && Se(!0), a(h);
|
|
2060
|
+
}),
|
|
2061
|
+
flags: t,
|
|
2062
|
+
items: o,
|
|
2063
|
+
pending: p,
|
|
2064
|
+
outrogroups: null,
|
|
2065
|
+
fallback: g
|
|
2066
|
+
};
|
|
2067
|
+
w = !1, C && (u = B);
|
|
2068
|
+
}
|
|
2069
|
+
function Or(e) {
|
|
2070
|
+
for (; e !== null && !(e.f & 32); ) e = e.next;
|
|
2071
|
+
return e;
|
|
2072
|
+
}
|
|
2073
|
+
function Fu(e, t, r, n, i) {
|
|
2074
|
+
var s = (n & 8) !== 0, u = t.length, o = e.items, c = Or(e.effect.first), g, h = null, m, p = [], w = [], k, T, b, $;
|
|
2075
|
+
if (s) for ($ = 0; $ < u; $ += 1)
|
|
2076
|
+
k = t[$], T = i(k, $), b = o.get(T).e, b.f & 33554432 || (b.nodes?.a?.measure(), (m ?? (m = /* @__PURE__ */ new Set())).add(b));
|
|
2077
|
+
for ($ = 0; $ < u; $ += 1) {
|
|
2078
|
+
if (k = t[$], T = i(k, $), b = o.get(T).e, e.outrogroups !== null) for (const G of e.outrogroups)
|
|
2079
|
+
G.pending.delete(b), G.done.delete(b);
|
|
2080
|
+
if (b.f & 8192 && (Di(b), s && (b.nodes?.a?.unfix(), (m ?? (m = /* @__PURE__ */ new Set())).delete(b))), b.f & 33554432)
|
|
2081
|
+
if (b.f ^= Wr, b === c) Ir(b, null, r);
|
|
2082
|
+
else {
|
|
2083
|
+
var P = h ? h.next : c;
|
|
2084
|
+
b === e.effect.last && (e.effect.last = b.prev), b.prev && (b.prev.next = b.next), b.next && (b.next.prev = b.prev), kt(e, h, b), kt(e, b, P), Ir(b, P, r), h = b, p = [], w = [], c = Or(h.next);
|
|
2085
|
+
continue;
|
|
2086
|
+
}
|
|
2087
|
+
if (b !== c) {
|
|
2088
|
+
if (g !== void 0 && g.has(b)) {
|
|
2089
|
+
if (p.length < w.length) {
|
|
2090
|
+
var N = w[0], M;
|
|
2091
|
+
h = N.prev;
|
|
2092
|
+
var L = p[0], W = p[p.length - 1];
|
|
2093
|
+
for (M = 0; M < p.length; M += 1) Ir(p[M], N, r);
|
|
2094
|
+
for (M = 0; M < w.length; M += 1) g.delete(w[M]);
|
|
2095
|
+
kt(e, L.prev, W.next), kt(e, h, L), kt(e, W, N), c = N, h = W, $ -= 1, p = [], w = [];
|
|
2096
|
+
} else
|
|
2097
|
+
g.delete(b), Ir(b, c, r), kt(e, b.prev, b.next), kt(e, b, h === null ? e.effect.first : h.next), kt(e, h, b), h = b;
|
|
2098
|
+
continue;
|
|
2099
|
+
}
|
|
2100
|
+
for (p = [], w = []; c !== null && c !== b; )
|
|
2101
|
+
(g ?? (g = /* @__PURE__ */ new Set())).add(c), w.push(c), c = Or(c.next);
|
|
2102
|
+
if (c === null) continue;
|
|
2103
|
+
}
|
|
2104
|
+
b.f & 33554432 || p.push(b), h = b, c = Or(b.next);
|
|
2105
|
+
}
|
|
2106
|
+
if (e.outrogroups !== null) {
|
|
2107
|
+
for (const G of e.outrogroups) G.pending.size === 0 && (Ci(e, Mn(G.done)), e.outrogroups?.delete(G));
|
|
2108
|
+
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
2109
|
+
}
|
|
2110
|
+
if (c !== null || g !== void 0) {
|
|
2111
|
+
var Y = [];
|
|
2112
|
+
if (g !== void 0)
|
|
2113
|
+
for (b of g) b.f & 8192 || Y.push(b);
|
|
2114
|
+
for (; c !== null; )
|
|
2115
|
+
!(c.f & 8192) && c !== e.fallback && Y.push(c), c = Or(c.next);
|
|
2116
|
+
var q = Y.length;
|
|
2117
|
+
if (q > 0) {
|
|
2118
|
+
var me = n & 4 && u === 0 ? r : null;
|
|
2119
|
+
if (s) {
|
|
2120
|
+
for ($ = 0; $ < q; $ += 1) Y[$].nodes?.a?.measure();
|
|
2121
|
+
for ($ = 0; $ < q; $ += 1) Y[$].nodes?.a?.fix();
|
|
2122
|
+
}
|
|
2123
|
+
Vu(e, Y, me);
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
s && Xe(() => {
|
|
2127
|
+
if (m !== void 0)
|
|
2128
|
+
for (b of m) b.nodes?.a?.apply();
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
function qu(e, t, r, n, i, s, u, o) {
|
|
2132
|
+
var c = u & 1 ? u & 16 ? Gt(r) : /* @__PURE__ */ Ta(r, !1, !1) : null, g = u & 2 ? Gt(i) : null;
|
|
2133
|
+
return {
|
|
2134
|
+
v: c,
|
|
2135
|
+
i: g,
|
|
2136
|
+
e: ke(() => (s(t, c ?? r, g ?? i, o), () => {
|
|
2137
|
+
e.delete(n);
|
|
2138
|
+
}))
|
|
2139
|
+
};
|
|
2140
|
+
}
|
|
2141
|
+
function Ir(e, t, r) {
|
|
2142
|
+
if (e.nodes)
|
|
2143
|
+
for (var n = e.nodes.start, i = e.nodes.end, s = t && !(t.f & 33554432) ? t.nodes.start : r; n !== null; ) {
|
|
2144
|
+
var u = /* @__PURE__ */ et(n);
|
|
2145
|
+
if (s.before(n), n === i) return;
|
|
2146
|
+
n = u;
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
function kt(e, t, r) {
|
|
2150
|
+
t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
|
|
2151
|
+
}
|
|
2152
|
+
var Uu = null;
|
|
2153
|
+
function Gs(e) {
|
|
2154
|
+
Uu = e;
|
|
2155
|
+
}
|
|
2156
|
+
function Bu(e, t, r, n, i, s) {
|
|
2157
|
+
let u = C;
|
|
2158
|
+
C && pr();
|
|
2159
|
+
var o = !1, c = null;
|
|
2160
|
+
C && B.nodeType === 1 && (c = B, pr());
|
|
2161
|
+
var g = C ? B : e, h = j, m = new Za(g, !1);
|
|
2162
|
+
Wn(() => {
|
|
2163
|
+
const p = t() || null;
|
|
2164
|
+
var w = i ? i() : r || p === "svg" ? to : void 0;
|
|
2165
|
+
if (p === null) {
|
|
2166
|
+
m.ensure(null, null), cn(!0);
|
|
2167
|
+
return;
|
|
2168
|
+
}
|
|
2169
|
+
return m.ensure(p, (k) => {
|
|
2170
|
+
if (p) {
|
|
2171
|
+
if (c = C ? c : Nn(p, w), vt(c, c), n) {
|
|
2172
|
+
C && Ru(p) && c.append(document.createComment(""));
|
|
2173
|
+
var T = C ? /* @__PURE__ */ pt(c) : c.appendChild(ge());
|
|
2174
|
+
C && (T === null ? Se(!1) : de(T)), Gs(h), n(c, T), Gs(null);
|
|
2175
|
+
}
|
|
2176
|
+
j.nodes.end = c, k.before(c);
|
|
2177
|
+
}
|
|
2178
|
+
C && de(k);
|
|
2179
|
+
}), cn(!0), () => {
|
|
2180
|
+
p && cn(!1);
|
|
2181
|
+
};
|
|
2182
|
+
}, Pn), Bi(() => {
|
|
2183
|
+
cn(!0);
|
|
2184
|
+
}), u && (Se(!0), de(g));
|
|
2185
|
+
}
|
|
2186
|
+
function zu(e, t) {
|
|
2187
|
+
Kr(() => {
|
|
2188
|
+
var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
|
|
2189
|
+
if (!n.querySelector("#" + t.hash)) {
|
|
2190
|
+
const i = Nn("style");
|
|
2191
|
+
i.id = t.hash, i.textContent = t.code, n.appendChild(i);
|
|
2192
|
+
}
|
|
2193
|
+
});
|
|
2194
|
+
}
|
|
2195
|
+
function Du(e, t) {
|
|
2196
|
+
var r = void 0, n;
|
|
2197
|
+
ja(() => {
|
|
2198
|
+
r !== (r = t()) && (n && (ve(n), n = null), r && (n = ke(() => {
|
|
2199
|
+
Kr(() => r(e));
|
|
2200
|
+
})));
|
|
2201
|
+
});
|
|
2202
|
+
}
|
|
2203
|
+
function el(e) {
|
|
2204
|
+
var t, r, n = "";
|
|
2205
|
+
if (typeof e == "string" || typeof e == "number") n += e;
|
|
2206
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
2207
|
+
var i = e.length;
|
|
2208
|
+
for (t = 0; t < i; t++) e[t] && (r = el(e[t])) && (n && (n += " "), n += r);
|
|
2209
|
+
} else for (r in e) e[r] && (n && (n += " "), n += r);
|
|
2210
|
+
return n;
|
|
2211
|
+
}
|
|
2212
|
+
function Gu() {
|
|
2213
|
+
for (var e, t, r = 0, n = "", i = arguments.length; r < i; r++) (e = arguments[r]) && (t = el(e)) && (n && (n += " "), n += t);
|
|
2214
|
+
return n;
|
|
2215
|
+
}
|
|
2216
|
+
function tl(e) {
|
|
2217
|
+
return typeof e == "object" ? Gu(e) : e ?? "";
|
|
2218
|
+
}
|
|
2219
|
+
var Hs = [...`
|
|
2220
|
+
\r\f \v\uFEFF`];
|
|
2221
|
+
function Hu(e, t, r) {
|
|
2222
|
+
var n = e == null ? "" : "" + e;
|
|
2223
|
+
if (t && (n = n ? n + " " + t : t), r) {
|
|
2224
|
+
for (var i of Object.keys(r)) if (r[i]) n = n ? n + " " + i : i;
|
|
2225
|
+
else if (n.length)
|
|
2226
|
+
for (var s = i.length, u = 0; (u = n.indexOf(i, u)) >= 0; ) {
|
|
2227
|
+
var o = u + s;
|
|
2228
|
+
(u === 0 || Hs.includes(n[u - 1])) && (o === n.length || Hs.includes(n[o])) ? n = (u === 0 ? "" : n.substring(0, u)) + n.substring(o + 1) : u = o;
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
return n === "" ? null : n;
|
|
2232
|
+
}
|
|
2233
|
+
function Ys(e, t = !1) {
|
|
2234
|
+
var r = t ? " !important;" : ";", n = "";
|
|
2235
|
+
for (var i of Object.keys(e)) {
|
|
2236
|
+
var s = e[i];
|
|
2237
|
+
s != null && s !== "" && (n += " " + i + ": " + s + r);
|
|
2238
|
+
}
|
|
2239
|
+
return n;
|
|
2240
|
+
}
|
|
2241
|
+
function hi(e) {
|
|
2242
|
+
return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
|
|
2243
|
+
}
|
|
2244
|
+
function Yu(e, t) {
|
|
2245
|
+
if (t) {
|
|
2246
|
+
var r = "", n, i;
|
|
2247
|
+
if (Array.isArray(t) ? (n = t[0], i = t[1]) : n = t, e) {
|
|
2248
|
+
e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
|
|
2249
|
+
var s = !1, u = 0, o = !1, c = [];
|
|
2250
|
+
n && c.push(...Object.keys(n).map(hi)), i && c.push(...Object.keys(i).map(hi));
|
|
2251
|
+
var g = 0, h = -1;
|
|
2252
|
+
const T = e.length;
|
|
2253
|
+
for (var m = 0; m < T; m++) {
|
|
2254
|
+
var p = e[m];
|
|
2255
|
+
if (o ? p === "/" && e[m - 1] === "*" && (o = !1) : s ? s === p && (s = !1) : p === "/" && e[m + 1] === "*" ? o = !0 : p === '"' || p === "'" ? s = p : p === "(" ? u++ : p === ")" && u--, !o && s === !1 && u === 0) {
|
|
2256
|
+
if (p === ":" && h === -1) h = m;
|
|
2257
|
+
else if (p === ";" || m === T - 1) {
|
|
2258
|
+
if (h !== -1) {
|
|
2259
|
+
var w = hi(e.substring(g, h).trim());
|
|
2260
|
+
if (!c.includes(w)) {
|
|
2261
|
+
p !== ";" && m++;
|
|
2262
|
+
var k = e.substring(g, m).trim();
|
|
2263
|
+
r += " " + k + ";";
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
g = m + 1, h = -1;
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
return n && (r += Ys(n)), i && (r += Ys(i, !0)), r = r.trim(), r === "" ? null : r;
|
|
2272
|
+
}
|
|
2273
|
+
return e == null ? null : String(e);
|
|
2274
|
+
}
|
|
2275
|
+
function ur(e, t, r, n, i, s) {
|
|
2276
|
+
var u = e.__className;
|
|
2277
|
+
if (C || u !== r || u === void 0) {
|
|
2278
|
+
var o = Hu(r, n, s);
|
|
2279
|
+
(!C || o !== e.getAttribute("class")) && (o == null ? e.removeAttribute("class") : t ? e.className = o : e.setAttribute("class", o)), e.__className = r;
|
|
2280
|
+
} else if (s && i !== s) for (var c in s) {
|
|
2281
|
+
var g = !!s[c];
|
|
2282
|
+
(i == null || g !== !!i[c]) && e.classList.toggle(c, g);
|
|
2283
|
+
}
|
|
2284
|
+
return s;
|
|
2285
|
+
}
|
|
2286
|
+
function _i(e, t = {}, r, n) {
|
|
2287
|
+
for (var i in r) {
|
|
2288
|
+
var s = r[i];
|
|
2289
|
+
t[i] !== s && (r[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, s, n));
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
function rl(e, t, r, n) {
|
|
2293
|
+
var i = e.__style;
|
|
2294
|
+
if (C || i !== t) {
|
|
2295
|
+
var s = Yu(t, n);
|
|
2296
|
+
(!C || s !== e.getAttribute("style")) && (s == null ? e.removeAttribute("style") : e.style.cssText = s), e.__style = t;
|
|
2297
|
+
} else n && (Array.isArray(n) ? (_i(e, r?.[0], n[0]), _i(e, r?.[1], n[1], "important")) : _i(e, r, n));
|
|
2298
|
+
return n;
|
|
2299
|
+
}
|
|
2300
|
+
function xn(e, t, r = !1) {
|
|
2301
|
+
if (e.multiple) {
|
|
2302
|
+
if (t == null) return;
|
|
2303
|
+
if (!An(t)) return Mo();
|
|
2304
|
+
for (var n of e.options) n.selected = t.includes(qr(n));
|
|
2305
|
+
return;
|
|
2306
|
+
}
|
|
2307
|
+
for (n of e.options) if (tu(qr(n), t)) {
|
|
2308
|
+
n.selected = !0;
|
|
2309
|
+
return;
|
|
2310
|
+
}
|
|
2311
|
+
(!r || t !== void 0) && (e.selectedIndex = -1);
|
|
2312
|
+
}
|
|
2313
|
+
function nl(e) {
|
|
2314
|
+
var t = new MutationObserver(() => {
|
|
2315
|
+
xn(e, e.__value);
|
|
2316
|
+
});
|
|
2317
|
+
t.observe(e, {
|
|
2318
|
+
childList: !0,
|
|
2319
|
+
subtree: !0,
|
|
2320
|
+
attributes: !0,
|
|
2321
|
+
attributeFilter: ["value"]
|
|
2322
|
+
}), Bi(() => {
|
|
2323
|
+
t.disconnect();
|
|
2324
|
+
});
|
|
2325
|
+
}
|
|
2326
|
+
function He(e, t, r = t) {
|
|
2327
|
+
var n = /* @__PURE__ */ new WeakSet(), i = !0;
|
|
2328
|
+
Na(e, "change", (s) => {
|
|
2329
|
+
var u = s ? "[selected]" : ":checked", o;
|
|
2330
|
+
if (e.multiple) o = [].map.call(e.querySelectorAll(u), qr);
|
|
2331
|
+
else {
|
|
2332
|
+
var c = e.querySelector(u) ?? e.querySelector("option:not([disabled])");
|
|
2333
|
+
o = c && qr(c);
|
|
2334
|
+
}
|
|
2335
|
+
r(o), e.__value = o, V !== null && n.add(V);
|
|
2336
|
+
}), Kr(() => {
|
|
2337
|
+
var s = t();
|
|
2338
|
+
if (e === document.activeElement) {
|
|
2339
|
+
var u = qe ? wn : V;
|
|
2340
|
+
if (n.has(u)) return;
|
|
2341
|
+
}
|
|
2342
|
+
if (xn(e, s, i), i && s === void 0) {
|
|
2343
|
+
var o = e.querySelector(":checked");
|
|
2344
|
+
o !== null && (s = qr(o), r(s));
|
|
2345
|
+
}
|
|
2346
|
+
e.__value = s, i = !1;
|
|
2347
|
+
}), nl(e);
|
|
2348
|
+
}
|
|
2349
|
+
function qr(e) {
|
|
2350
|
+
return "__value" in e ? e.__value : e.value;
|
|
2351
|
+
}
|
|
2352
|
+
var Nr = Symbol("class"), Lr = Symbol("style"), il = Symbol("is custom element"), sl = Symbol("is html"), Ku = Cn ? "link" : "LINK", Ju = Cn ? "input" : "INPUT", Xu = Cn ? "option" : "OPTION", Zu = Cn ? "select" : "SELECT";
|
|
2353
|
+
function ft(e) {
|
|
2354
|
+
if (C) {
|
|
2355
|
+
var t = !1, r = () => {
|
|
2356
|
+
if (!t) {
|
|
2357
|
+
if (t = !0, e.hasAttribute("value")) {
|
|
2358
|
+
var n = e.value;
|
|
2359
|
+
En(e, "value", null), e.value = n;
|
|
2360
|
+
}
|
|
2361
|
+
if (e.hasAttribute("checked")) {
|
|
2362
|
+
var i = e.checked;
|
|
2363
|
+
En(e, "checked", null), e.checked = i;
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
};
|
|
2367
|
+
e.__on_r = r, Xe(r), Oa();
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
function Qu(e, t) {
|
|
2371
|
+
t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
|
|
2372
|
+
}
|
|
2373
|
+
function En(e, t, r, n) {
|
|
2374
|
+
var i = al(e);
|
|
2375
|
+
if (C && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Ku)) {
|
|
2376
|
+
n || void 0;
|
|
2377
|
+
return;
|
|
2378
|
+
}
|
|
2379
|
+
i[t] !== (i[t] = r) && (t === "loading" && (e[ho] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && ll(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
2380
|
+
}
|
|
2381
|
+
function ef(e, t, r, n, i = !1, s = !1) {
|
|
2382
|
+
if (C && i && e.nodeName === Ju) {
|
|
2383
|
+
var u = e;
|
|
2384
|
+
(u.type === "checkbox" ? "defaultChecked" : "defaultValue") in r || ft(u);
|
|
2385
|
+
}
|
|
2386
|
+
var o = al(e), c = o[il], g = !o[sl];
|
|
2387
|
+
let h = C && c;
|
|
2388
|
+
h && Se(!1);
|
|
2389
|
+
var m = t || {}, p = e.nodeName === Xu;
|
|
2390
|
+
for (var w in t) w in r || (r[w] = null);
|
|
2391
|
+
r.class ? r.class = tl(r.class) : (n || r[Nr]) && (r.class = null), r[Lr] && (r.style ?? (r.style = null));
|
|
2392
|
+
var k = ll(e);
|
|
2393
|
+
for (const M in r) {
|
|
2394
|
+
let L = r[M];
|
|
2395
|
+
if (p && M === "value" && L == null) {
|
|
2396
|
+
e.value = e.__value = "", m[M] = L;
|
|
2397
|
+
continue;
|
|
2398
|
+
}
|
|
2399
|
+
if (M === "class") {
|
|
2400
|
+
ur(e, e.namespaceURI === "http://www.w3.org/1999/xhtml", L, n, t?.[Nr], r[Nr]), m[M] = L, m[Nr] = r[Nr];
|
|
2401
|
+
continue;
|
|
2402
|
+
}
|
|
2403
|
+
if (M === "style") {
|
|
2404
|
+
rl(e, L, t?.[Lr], r[Lr]), m[M] = L, m[Lr] = r[Lr];
|
|
2405
|
+
continue;
|
|
2406
|
+
}
|
|
2407
|
+
var T = m[M];
|
|
2408
|
+
if (!(L === T && !(L === void 0 && e.hasAttribute(M)))) {
|
|
2409
|
+
m[M] = L;
|
|
2410
|
+
var b = M[0] + M[1];
|
|
2411
|
+
if (b !== "$$")
|
|
2412
|
+
if (b === "on") {
|
|
2413
|
+
const W = {}, Y = "$$" + M;
|
|
2414
|
+
let q = M.slice(2);
|
|
2415
|
+
var $ = Su(q);
|
|
2416
|
+
if (ku(q) && (q = q.slice(0, -7), W.capture = !0), !$ && T) {
|
|
2417
|
+
if (L != null) continue;
|
|
2418
|
+
e.removeEventListener(q, m[Y], W), m[Y] = null;
|
|
2419
|
+
}
|
|
2420
|
+
if ($)
|
|
2421
|
+
_e(q, e, L), Ka([q]);
|
|
2422
|
+
else if (L != null) {
|
|
2423
|
+
let me = function(G) {
|
|
2424
|
+
m[M].call(this, G);
|
|
2425
|
+
};
|
|
2426
|
+
m[Y] = gu(q, e, me, W);
|
|
2427
|
+
}
|
|
2428
|
+
} else if (M === "style") En(e, M, L);
|
|
2429
|
+
else if (M === "autofocus") iu(e, !!L);
|
|
2430
|
+
else if (!c && (M === "__value" || M === "value" && L != null)) e.value = e.__value = L;
|
|
2431
|
+
else if (M === "selected" && p) Qu(e, L);
|
|
2432
|
+
else {
|
|
2433
|
+
var P = M;
|
|
2434
|
+
g || (P = Tu(P));
|
|
2435
|
+
var N = P === "defaultValue" || P === "defaultChecked";
|
|
2436
|
+
if (L == null && !c && !N)
|
|
2437
|
+
if (o[M] = null, P === "value" || P === "checked") {
|
|
2438
|
+
let W = e;
|
|
2439
|
+
const Y = t === void 0;
|
|
2440
|
+
if (P === "value") {
|
|
2441
|
+
let q = W.defaultValue;
|
|
2442
|
+
W.removeAttribute(P), W.defaultValue = q, W.value = W.__value = Y ? q : null;
|
|
2443
|
+
} else {
|
|
2444
|
+
let q = W.defaultChecked;
|
|
2445
|
+
W.removeAttribute(P), W.defaultChecked = q, W.checked = Y ? q : !1;
|
|
2446
|
+
}
|
|
2447
|
+
} else e.removeAttribute(M);
|
|
2448
|
+
else N || k.includes(P) && (c || typeof L != "string") ? (e[P] = L, P in o && (o[P] = ce)) : typeof L != "function" && En(e, P, L, s);
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
return h && Se(!0), m;
|
|
2453
|
+
}
|
|
2454
|
+
function tf(e, t, r = [], n = [], i = [], s, u = !1, o = !1) {
|
|
2455
|
+
ka(i, r, n, (c) => {
|
|
2456
|
+
var g = void 0, h = {}, m = e.nodeName === Zu, p = !1;
|
|
2457
|
+
if (ja(() => {
|
|
2458
|
+
var k = t(...c.map(a)), T = ef(e, g, k, s, u, o);
|
|
2459
|
+
p && m && "value" in k && xn(e, k.value);
|
|
2460
|
+
for (let $ of Object.getOwnPropertySymbols(h)) k[$] || ve(h[$]);
|
|
2461
|
+
for (let $ of Object.getOwnPropertySymbols(k)) {
|
|
2462
|
+
var b = k[$];
|
|
2463
|
+
$.description === "@attach" && (!g || b !== g[$]) && (h[$] && ve(h[$]), h[$] = ke(() => Du(e, () => b))), T[$] = b;
|
|
2464
|
+
}
|
|
2465
|
+
g = T;
|
|
2466
|
+
}), m) {
|
|
2467
|
+
var w = e;
|
|
2468
|
+
Kr(() => {
|
|
2469
|
+
xn(w, g.value, !0), nl(w);
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
p = !0;
|
|
2473
|
+
});
|
|
2474
|
+
}
|
|
2475
|
+
function al(e) {
|
|
2476
|
+
return e.__attributes ?? (e.__attributes = {
|
|
2477
|
+
[il]: e.nodeName.includes("-"),
|
|
2478
|
+
[sl]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
|
|
2479
|
+
});
|
|
2480
|
+
}
|
|
2481
|
+
var Ks = /* @__PURE__ */ new Map();
|
|
2482
|
+
function ll(e) {
|
|
2483
|
+
var t = e.getAttribute("is") || e.nodeName, r = Ks.get(t);
|
|
2484
|
+
if (r) return r;
|
|
2485
|
+
Ks.set(t, r = []);
|
|
2486
|
+
for (var n, i = e, s = Element.prototype; s !== i; ) {
|
|
2487
|
+
n = no(i);
|
|
2488
|
+
for (var u in n) n[u].set && r.push(u);
|
|
2489
|
+
i = Zs(i);
|
|
2490
|
+
}
|
|
2491
|
+
return r;
|
|
2492
|
+
}
|
|
2493
|
+
function ot(e, t, r = t) {
|
|
2494
|
+
var n = /* @__PURE__ */ new WeakSet();
|
|
2495
|
+
Na(e, "input", async (i) => {
|
|
2496
|
+
var s = i ? e.defaultValue : e.value;
|
|
2497
|
+
if (s = gi(e) ? mi(s) : s, r(s), V !== null && n.add(V), await _u(), s !== (s = t())) {
|
|
2498
|
+
var u = e.selectionStart, o = e.selectionEnd, c = e.value.length;
|
|
2499
|
+
if (e.value = s ?? "", o !== null) {
|
|
2500
|
+
var g = e.value.length;
|
|
2501
|
+
u === o && o === c && g > c ? (e.selectionStart = g, e.selectionEnd = g) : (e.selectionStart = u, e.selectionEnd = Math.min(o, g));
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
}), (C && e.defaultValue !== e.value || Jt(t) == null && e.value) && (r(gi(e) ? mi(e.value) : e.value), V !== null && n.add(V)), In(() => {
|
|
2505
|
+
var i = t();
|
|
2506
|
+
if (e === document.activeElement) {
|
|
2507
|
+
var s = qe ? wn : V;
|
|
2508
|
+
if (n.has(s)) return;
|
|
2509
|
+
}
|
|
2510
|
+
gi(e) && i === mi(e.value) || e.type === "date" && !i && !e.value || i !== e.value && (e.value = i ?? "");
|
|
2511
|
+
});
|
|
2512
|
+
}
|
|
2513
|
+
function gi(e) {
|
|
2514
|
+
var t = e.type;
|
|
2515
|
+
return t === "number" || t === "range";
|
|
2516
|
+
}
|
|
2517
|
+
function mi(e) {
|
|
2518
|
+
return e === "" ? null : +e;
|
|
2519
|
+
}
|
|
2520
|
+
var ol, fr = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap(), Js = /* @__PURE__ */ new WeakSet(), ul = class {
|
|
2521
|
+
constructor(e) {
|
|
2522
|
+
ji(this, Js), I(this, fr, /* @__PURE__ */ new WeakMap()), I(this, Tn, void 0), I(this, yi, void 0), O(yi, this, e);
|
|
2523
|
+
}
|
|
2524
|
+
observe(e, t) {
|
|
2525
|
+
var r = d(fr, this).get(e) || /* @__PURE__ */ new Set();
|
|
2526
|
+
return r.add(t), d(fr, this).set(e, r), H(Js, this, rf).call(this).observe(e, d(yi, this)), () => {
|
|
2527
|
+
var n = d(fr, this).get(e);
|
|
2528
|
+
n.delete(t), n.size === 0 && (d(fr, this).delete(e), d(Tn, this).unobserve(e));
|
|
2529
|
+
};
|
|
2530
|
+
}
|
|
2531
|
+
};
|
|
2532
|
+
ol = ul;
|
|
2533
|
+
function rf() {
|
|
2534
|
+
return d(Tn, this) ?? O(Tn, this, new ResizeObserver((e) => {
|
|
2535
|
+
for (var t of e) {
|
|
2536
|
+
ol.entries.set(t.target, t);
|
|
2537
|
+
for (var r of d(fr, this).get(t.target) || []) r(t);
|
|
2538
|
+
}
|
|
2539
|
+
}));
|
|
2540
|
+
}
|
|
2541
|
+
Q(ul, "entries", /* @__PURE__ */ new WeakMap());
|
|
2542
|
+
function Xs(e, t) {
|
|
2543
|
+
return e === t || e?.[qt] === t;
|
|
2544
|
+
}
|
|
2545
|
+
function nf(e = {}, t, r, n) {
|
|
2546
|
+
var i = X.r, s = j;
|
|
2547
|
+
return Kr(() => {
|
|
2548
|
+
var u, o;
|
|
2549
|
+
return In(() => {
|
|
2550
|
+
u = o, o = n?.() || [], Jt(() => {
|
|
2551
|
+
e !== r(...o) && (t(e, ...o), u && Xs(r(...u), e) && t(null, ...u));
|
|
2552
|
+
});
|
|
2553
|
+
}), () => {
|
|
2554
|
+
let c = s;
|
|
2555
|
+
for (; c !== i && c.parent !== null && c.parent.f & 33554432; ) c = c.parent;
|
|
2556
|
+
const g = () => {
|
|
2557
|
+
o && Xs(r(...o), e) && t(null, ...o);
|
|
2558
|
+
}, h = c.teardown;
|
|
2559
|
+
c.teardown = () => {
|
|
2560
|
+
g(), h?.();
|
|
2561
|
+
};
|
|
2562
|
+
};
|
|
2563
|
+
}), e;
|
|
2564
|
+
}
|
|
2565
|
+
function jr(e, t, r, n) {
|
|
2566
|
+
var i = !Hr || (r & 2) !== 0, s = (r & 8) !== 0, u = (r & 16) !== 0, o = n, c = !0, g = () => (c && (c = !1, o = u ? Jt(n) : n), o);
|
|
2567
|
+
let h;
|
|
2568
|
+
if (s) {
|
|
2569
|
+
var m = qt in e || ea in e;
|
|
2570
|
+
h = Ft(e, t)?.set ?? (m && t in e ? (N) => e[t] = N : void 0);
|
|
2571
|
+
}
|
|
2572
|
+
var p, w = !1;
|
|
2573
|
+
s ? [p, w] = jo(() => e[t]) : p = e[t], p === void 0 && n !== void 0 && (p = g(), h && (i && So(t), h(p)));
|
|
2574
|
+
var k;
|
|
2575
|
+
if (i ? k = () => {
|
|
2576
|
+
var N = e[t];
|
|
2577
|
+
return N === void 0 ? g() : (c = !0, N);
|
|
2578
|
+
} : k = () => {
|
|
2579
|
+
var N = e[t];
|
|
2580
|
+
return N !== void 0 && (o = void 0), N === void 0 ? o : N;
|
|
2581
|
+
}, i && !(r & 4)) return k;
|
|
2582
|
+
if (h) {
|
|
2583
|
+
var T = e.$$legacy;
|
|
2584
|
+
return function(N, M) {
|
|
2585
|
+
return arguments.length > 0 ? ((!i || !M || T || w) && h(M ? k() : N), N) : k();
|
|
2586
|
+
};
|
|
2587
|
+
}
|
|
2588
|
+
var b = !1, $ = (r & 1 ? On : Vi)(() => (b = !1, k()));
|
|
2589
|
+
s && a($);
|
|
2590
|
+
var P = j;
|
|
2591
|
+
return function(N, M) {
|
|
2592
|
+
if (arguments.length > 0) {
|
|
2593
|
+
const L = M ? a($) : i && s ? Pe(N) : N;
|
|
2594
|
+
return _($, L), b = !0, o !== void 0 && (o = L), N;
|
|
2595
|
+
}
|
|
2596
|
+
return Tt && b || P.f & 16384 ? $.v : a($);
|
|
2597
|
+
};
|
|
2598
|
+
}
|
|
2599
|
+
function sf(e) {
|
|
2600
|
+
return new af(e);
|
|
2601
|
+
}
|
|
2602
|
+
var Lt = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), af = class {
|
|
2603
|
+
constructor(e) {
|
|
2604
|
+
I(this, Lt, void 0), I(this, Ye, void 0);
|
|
2605
|
+
var t = /* @__PURE__ */ new Map(), r = (i, s) => {
|
|
2606
|
+
var u = /* @__PURE__ */ Ta(s, !1, !1);
|
|
2607
|
+
return t.set(i, u), u;
|
|
2608
|
+
};
|
|
2609
|
+
const n = new Proxy({
|
|
2610
|
+
...e.props || {},
|
|
2611
|
+
$$events: {}
|
|
2612
|
+
}, {
|
|
2613
|
+
get(i, s) {
|
|
2614
|
+
return a(t.get(s) ?? r(s, Reflect.get(i, s)));
|
|
2615
|
+
},
|
|
2616
|
+
has(i, s) {
|
|
2617
|
+
return s === ea ? !0 : (a(t.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
|
|
2618
|
+
},
|
|
2619
|
+
set(i, s, u) {
|
|
2620
|
+
return _(t.get(s) ?? r(s, u), u), Reflect.set(i, s, u);
|
|
2621
|
+
}
|
|
2622
|
+
});
|
|
2623
|
+
O(Ye, this, (e.hydrate ? Ou : Ja)(e.component, {
|
|
2624
|
+
target: e.target,
|
|
2625
|
+
anchor: e.anchor,
|
|
2626
|
+
props: n,
|
|
2627
|
+
context: e.context,
|
|
2628
|
+
intro: e.intro ?? !1,
|
|
2629
|
+
recover: e.recover,
|
|
2630
|
+
transformError: e.transformError
|
|
2631
|
+
})), !qe && (!e?.props?.$$host || e.sync === !1) && It(), O(Lt, this, n.$$events);
|
|
2632
|
+
for (const i of Object.keys(d(Ye, this)))
|
|
2633
|
+
i === "$set" || i === "$destroy" || i === "$on" || mn(this, i, {
|
|
2634
|
+
get() {
|
|
2635
|
+
return d(Ye, this)[i];
|
|
2636
|
+
},
|
|
2637
|
+
set(s) {
|
|
2638
|
+
d(Ye, this)[i] = s;
|
|
2639
|
+
},
|
|
2640
|
+
enumerable: !0
|
|
2641
|
+
});
|
|
2642
|
+
d(Ye, this).$set = (i) => {
|
|
2643
|
+
Object.assign(n, i);
|
|
2644
|
+
}, d(Ye, this).$destroy = () => {
|
|
2645
|
+
Nu(d(Ye, this));
|
|
2646
|
+
};
|
|
2647
|
+
}
|
|
2648
|
+
$set(e) {
|
|
2649
|
+
d(Ye, this).$set(e);
|
|
2650
|
+
}
|
|
2651
|
+
$on(e, t) {
|
|
2652
|
+
d(Lt, this)[e] = d(Lt, this)[e] || [];
|
|
2653
|
+
const r = (...n) => t.call(this, ...n);
|
|
2654
|
+
return d(Lt, this)[e].push(r), () => {
|
|
2655
|
+
d(Lt, this)[e] = d(Lt, this)[e].filter((n) => n !== r);
|
|
2656
|
+
};
|
|
2657
|
+
}
|
|
2658
|
+
$destroy() {
|
|
2659
|
+
d(Ye, this).$destroy();
|
|
2660
|
+
}
|
|
2661
|
+
}, fl;
|
|
2662
|
+
typeof HTMLElement == "function" && (fl = class extends HTMLElement {
|
|
2663
|
+
constructor(e, t, r) {
|
|
2664
|
+
super(), Q(this, "$$ctor", void 0), Q(this, "$$s", void 0), Q(this, "$$c", void 0), Q(this, "$$cn", !1), Q(this, "$$d", {}), Q(this, "$$r", !1), Q(this, "$$p_d", {}), Q(this, "$$l", {}), Q(this, "$$l_u", /* @__PURE__ */ new Map()), Q(this, "$$me", void 0), Q(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
2665
|
+
}
|
|
2666
|
+
addEventListener(e, t, r) {
|
|
2667
|
+
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
|
|
2668
|
+
const n = this.$$c.$on(e, t);
|
|
2669
|
+
this.$$l_u.set(t, n);
|
|
2670
|
+
}
|
|
2671
|
+
super.addEventListener(e, t, r);
|
|
2672
|
+
}
|
|
2673
|
+
removeEventListener(e, t, r) {
|
|
2674
|
+
if (super.removeEventListener(e, t, r), this.$$c) {
|
|
2675
|
+
const n = this.$$l_u.get(t);
|
|
2676
|
+
n && (n(), this.$$l_u.delete(t));
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
async connectedCallback() {
|
|
2680
|
+
if (this.$$cn = !0, !this.$$c) {
|
|
2681
|
+
let e = function(n) {
|
|
2682
|
+
return (i) => {
|
|
2683
|
+
const s = Nn("slot");
|
|
2684
|
+
n !== "default" && (s.name = n), J(i, s);
|
|
2685
|
+
};
|
|
2686
|
+
};
|
|
2687
|
+
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
2688
|
+
const t = {}, r = lf(this);
|
|
2689
|
+
for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
|
|
2690
|
+
for (const n of this.attributes) {
|
|
2691
|
+
const i = this.$$g_p(n.name);
|
|
2692
|
+
i in this.$$d || (this.$$d[i] = _n(i, n.value, this.$$p_d, "toProp"));
|
|
2693
|
+
}
|
|
2694
|
+
for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
|
|
2695
|
+
this.$$c = sf({
|
|
2696
|
+
component: this.$$ctor,
|
|
2697
|
+
target: this.$$shadowRoot || this,
|
|
2698
|
+
props: {
|
|
2699
|
+
...this.$$d,
|
|
2700
|
+
$$slots: t,
|
|
2701
|
+
$$host: this
|
|
2702
|
+
}
|
|
2703
|
+
}), this.$$me = ou(() => {
|
|
2704
|
+
In(() => {
|
|
2705
|
+
this.$$r = !0;
|
|
2706
|
+
for (const n of gn(this.$$c)) {
|
|
2707
|
+
if (!this.$$p_d[n]?.reflect) continue;
|
|
2708
|
+
this.$$d[n] = this.$$c[n];
|
|
2709
|
+
const i = _n(n, this.$$d[n], this.$$p_d, "toAttribute");
|
|
2710
|
+
i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
|
|
2711
|
+
}
|
|
2712
|
+
this.$$r = !1;
|
|
2713
|
+
});
|
|
2714
|
+
});
|
|
2715
|
+
for (const n in this.$$l) for (const i of this.$$l[n]) {
|
|
2716
|
+
const s = this.$$c.$on(n, i);
|
|
2717
|
+
this.$$l_u.set(i, s);
|
|
2718
|
+
}
|
|
2719
|
+
this.$$l = {};
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
attributeChangedCallback(e, t, r) {
|
|
2723
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = _n(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2724
|
+
}
|
|
2725
|
+
disconnectedCallback() {
|
|
2726
|
+
this.$$cn = !1, Promise.resolve().then(() => {
|
|
2727
|
+
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
|
|
2728
|
+
});
|
|
2729
|
+
}
|
|
2730
|
+
$$g_p(e) {
|
|
2731
|
+
return gn(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
|
|
2732
|
+
}
|
|
2733
|
+
});
|
|
2734
|
+
function _n(e, t, r, n) {
|
|
2735
|
+
const i = r[e]?.type;
|
|
2736
|
+
if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e]) return t;
|
|
2737
|
+
if (n === "toAttribute") switch (i) {
|
|
2738
|
+
case "Object":
|
|
2739
|
+
case "Array":
|
|
2740
|
+
return t == null ? null : JSON.stringify(t);
|
|
2741
|
+
case "Boolean":
|
|
2742
|
+
return t ? "" : null;
|
|
2743
|
+
case "Number":
|
|
2744
|
+
return t ?? null;
|
|
2745
|
+
default:
|
|
2746
|
+
return t;
|
|
2747
|
+
}
|
|
2748
|
+
else switch (i) {
|
|
2749
|
+
case "Object":
|
|
2750
|
+
case "Array":
|
|
2751
|
+
return t && JSON.parse(t);
|
|
2752
|
+
case "Boolean":
|
|
2753
|
+
return t;
|
|
2754
|
+
case "Number":
|
|
2755
|
+
return t != null ? +t : t;
|
|
2756
|
+
default:
|
|
2757
|
+
return t;
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
function lf(e) {
|
|
2761
|
+
const t = {};
|
|
2762
|
+
return e.childNodes.forEach((r) => {
|
|
2763
|
+
t[r.slot || "default"] = !0;
|
|
2764
|
+
}), t;
|
|
2765
|
+
}
|
|
2766
|
+
function of(e, t, r, n, i, s) {
|
|
2767
|
+
let u = class extends fl {
|
|
2768
|
+
constructor() {
|
|
2769
|
+
super(e, r, i), this.$$p_d = t;
|
|
2770
|
+
}
|
|
2771
|
+
static get observedAttributes() {
|
|
2772
|
+
return gn(t).map((o) => (t[o].attribute || o).toLowerCase());
|
|
2773
|
+
}
|
|
2774
|
+
};
|
|
2775
|
+
return gn(t).forEach((o) => {
|
|
2776
|
+
mn(u.prototype, o, {
|
|
2777
|
+
get() {
|
|
2778
|
+
return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
|
|
2779
|
+
},
|
|
2780
|
+
set(c) {
|
|
2781
|
+
c = _n(o, c, t), this.$$d[o] = c;
|
|
2782
|
+
var g = this.$$c;
|
|
2783
|
+
g && (Ft(g, o)?.get ? g[o] = c : g.$set({ [o]: c }));
|
|
2784
|
+
}
|
|
2785
|
+
});
|
|
2786
|
+
}), n.forEach((o) => {
|
|
2787
|
+
mn(u.prototype, o, { get() {
|
|
2788
|
+
return this.$$c?.[o];
|
|
2789
|
+
} });
|
|
2790
|
+
}), s && (u = s(u)), e.element = u, u;
|
|
2791
|
+
}
|
|
2792
|
+
var uf = /* @__PURE__ */ ue("<button> </button>"), ff = /* @__PURE__ */ ue('<span class="loading loading-spinner loading-xs svelte-3sm1sy"></span> <span class="svelte-3sm1sy">Checking availability...</span>', 1), cf = /* @__PURE__ */ ue("<span> </span>"), df = /* @__PURE__ */ ue('<div class="alert alert-warning text-xs"><span> </span></div>'), vf = /* @__PURE__ */ ue("<option> </option>"), pf = /* @__PURE__ */ ue('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-browser-voice">Voice</label> <select id="tts-browser-voice" class="select select-sm select-bordered w-full"><option>Default browser voice</option><!></select></div> <div class="pie-tts-grid-2 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-browser-rate">Rate</label> <input id="tts-browser-rate" class="range range-primary pie-tts-range svelte-3sm1sy" type="range" min="0.25" max="4" step="0.05"/> <div class="pie-tts-range-value svelte-3sm1sy"> </div></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-browser-pitch">Pitch</label> <input id="tts-browser-pitch" class="range range-secondary pie-tts-range svelte-3sm1sy" type="range" min="0" max="2" step="0.05"/> <div class="pie-tts-range-value svelte-3sm1sy"> </div></div></div></fieldset>'), hf = /* @__PURE__ */ ue("<option> </option>"), _f = /* @__PURE__ */ ue('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-endpoint">API endpoint</label> <input id="tts-polly-endpoint" class="input input-sm input-bordered w-full" placeholder="/api/tts"/></div> <div class="pie-tts-grid-3 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-language">Language</label> <input id="tts-polly-language" class="input input-sm input-bordered w-full" placeholder="en-US"/></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-gender">Gender</label> <select id="tts-polly-gender" class="select select-sm select-bordered w-full"><option>Any</option><option>Male</option><option>Female</option><option>Neutral</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-engine">Engine</label> <select id="tts-polly-engine" class="select select-sm select-bordered w-full"><option>Neural</option><option>Standard</option></select></div></div> <div class="pie-tts-grid-voice-rate svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-voice">Voice</label> <select id="tts-polly-voice" class="select select-sm select-bordered w-full"><option>Provider default</option><!></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-rate">Rate</label> <input id="tts-polly-rate" class="range range-primary pie-tts-range svelte-3sm1sy" type="range" min="0.25" max="4" step="0.05"/> <div class="pie-tts-range-value svelte-3sm1sy"> </div></div></div> <div class="pie-tts-grid-3 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-format">Format</label> <select id="tts-polly-format" class="select select-sm select-bordered w-full"><option>MP3</option><option>OGG</option><option>PCM</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-sample-rate">Sample rate</label> <select id="tts-polly-sample-rate" class="select select-sm select-bordered w-full"><option>8000 Hz</option><option>16000 Hz</option><option>22050 Hz</option><option>24000 Hz</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-speech-marks">Speech marks</label> <select id="tts-polly-speech-marks" class="select select-sm select-bordered w-full"><option>Word</option><option>Word + sentence</option></select></div></div></fieldset>'), gf = /* @__PURE__ */ ue("<option> </option>"), mf = /* @__PURE__ */ ue('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-endpoint">API endpoint</label> <input id="tts-google-endpoint" class="input input-sm input-bordered w-full" placeholder="/api/tts"/></div> <div class="pie-tts-grid-3 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-language">Language</label> <input id="tts-google-language" class="input input-sm input-bordered w-full" placeholder="en-US"/></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-gender">Gender</label> <select id="tts-google-gender" class="select select-sm select-bordered w-full"><option>Any</option><option>Male</option><option>Female</option><option>Neutral</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-voice-type">Voice type</label> <select id="tts-google-voice-type" class="select select-sm select-bordered w-full"><option>WaveNet</option><option>Studio</option><option>Standard</option></select></div></div> <div class="pie-tts-grid-voice-rate svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-voice">Voice</label> <select id="tts-google-voice" class="select select-sm select-bordered w-full"><option>Provider default</option><!></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-rate">Rate</label> <input id="tts-google-rate" class="range range-primary pie-tts-range svelte-3sm1sy" type="range" min="0.25" max="4" step="0.05"/> <div class="pie-tts-range-value svelte-3sm1sy"> </div></div></div></fieldset>'), yf = /* @__PURE__ */ ue('<div class="text-xs opacity-75"> </div>'), bf = /* @__PURE__ */ ue('<div class="text-xs opacity-75">This provider uses adapter mode. Configure provider state from your host app via\n `customProviders`.</div>'), wf = /* @__PURE__ */ ue('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-custom-provider-header svelte-3sm1sy"><div class="text-sm font-semibold"> </div> <!></div> <!></fieldset>'), kf = /* @__PURE__ */ ue("<span> </span>"), $f = /* @__PURE__ */ ue('<div class="alert alert-success text-xs"><span> </span></div>'), Sf = /* @__PURE__ */ ue('<div class="alert alert-error text-xs"><span> </span></div>'), xf = /* @__PURE__ */ ue('<div class="alert alert-error text-xs"><span> </span></div>'), Ef = /* @__PURE__ */ ue('<div class="alert alert-info text-xs"><span> </span></div>'), Tf = /* @__PURE__ */ ue('<div class="pie-tts-dialog-backdrop svelte-3sm1sy"><div class="pie-tts-dialog svelte-3sm1sy"><div class="pie-tts-dialog-header svelte-3sm1sy"><h3 class="pie-tts-dialog-title svelte-3sm1sy">TTS settings</h3> <button class="btn btn-xs btn-ghost btn-circle" aria-label="Close TTS settings"><svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <div class="join pie-tts-tabs svelte-3sm1sy"></div> <div class="pie-tts-status svelte-3sm1sy"><!> <button class="btn btn-xs btn-outline">Recheck</button></div> <!> <!> <div class="pie-tts-fieldset pie-tts-preview-block fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-preview-header svelte-3sm1sy"><h4 class="pie-tts-preview-title svelte-3sm1sy">Preview</h4> <div class="join"><button type="button">Plain text</button> <button type="button">SSML</button></div></div> <label class="pie-tts-label svelte-3sm1sy" for="tts-preview-text">Sample text</label> <textarea id="tts-preview-text" class="textarea textarea-sm textarea-bordered w-full pie-tts-preview-input svelte-3sm1sy"></textarea> <div class="pie-tts-preview-row svelte-3sm1sy"><button type="button" class="btn btn-xs btn-outline">Reset sample</button> <span class="text-xs opacity-70"><!></span></div> <div class="pie-tts-preview-track svelte-3sm1sy" aria-live="polite"></div></div> <!> <!> <!> <!> <div class="pie-tts-actions svelte-3sm1sy"><button class="btn btn-sm btn-outline">Close</button> <button class="btn btn-sm btn-outline"> </button> <button class="btn btn-sm btn-primary"> </button></div></div></div>'), Af = {
|
|
2793
|
+
hash: "svelte-3sm1sy",
|
|
2794
|
+
code: `.pie-tts-dialog-backdrop.svelte-3sm1sy {position:fixed;inset:0;background:color-mix(in srgb, #000 30%, transparent);display:flex;align-items:center;justify-content:center;padding:1rem;}.pie-tts-dialog.svelte-3sm1sy {width:min(720px, calc(100vw - 2rem));max-height:calc(100vh - 2rem);overflow:auto;background:var(--color-base-100);border:1px solid var(--color-base-300);border-radius:0.75rem;box-shadow:0 24px 48px rgba(0, 0, 0, 0.22);padding:0.75rem;display:flex;flex-direction:column;gap:0.5rem;}.pie-tts-dialog-header.svelte-3sm1sy {display:flex;align-items:center;justify-content:space-between;}.pie-tts-dialog-title.svelte-3sm1sy {margin:0;font-size:0.95rem;font-weight:700;}.pie-tts-tabs.svelte-3sm1sy {width:100%;max-width:100%;flex-wrap:wrap;row-gap:0.25rem;}.pie-tts-status.svelte-3sm1sy {display:flex;align-items:flex-start;gap:0.5rem;justify-content:space-between;}.pie-tts-status.svelte-3sm1sy > span:where(.svelte-3sm1sy):not(.loading) {flex:1;min-width:0;font-size:0.75rem;line-height:1.35;}.pie-tts-ok.svelte-3sm1sy {color:var(--color-success);}.pie-tts-error.svelte-3sm1sy {color:var(--color-error);}.pie-tts-actions.svelte-3sm1sy {display:flex;justify-content:flex-end;gap:0.5rem;}.pie-tts-fieldset.svelte-3sm1sy {padding:0.5rem 0.65rem;display:flex;flex-direction:column;gap:0.45rem;}.pie-tts-field.svelte-3sm1sy {display:flex;flex-direction:column;gap:0.15rem;min-width:0;}.pie-tts-label.svelte-3sm1sy {display:block;font-size:0.7rem;font-weight:600;line-height:1.2;opacity:0.85;padding:0;}.pie-tts-grid-2.svelte-3sm1sy {display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:0.45rem 0.65rem;align-items:end;}.pie-tts-grid-3.svelte-3sm1sy {display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:0.45rem 0.65rem;align-items:end;}.pie-tts-grid-voice-rate.svelte-3sm1sy {display:grid;grid-template-columns:minmax(0, 1fr) minmax(9.5rem, 11rem);gap:0.45rem 0.65rem;align-items:end;}
|
|
2795
|
+
|
|
2796
|
+
@media (max-width: 32rem) {.pie-tts-grid-2.svelte-3sm1sy,
|
|
2797
|
+
.pie-tts-grid-3.svelte-3sm1sy,
|
|
2798
|
+
.pie-tts-grid-voice-rate.svelte-3sm1sy {grid-template-columns:1fr;}
|
|
2799
|
+
}.pie-tts-range.svelte-3sm1sy {--range-thumb-size: 0.85rem;height:1.35rem;min-height:1.35rem;}.pie-tts-range-value.svelte-3sm1sy {font-size:0.65rem;line-height:1.2;opacity:0.7;margin-top:-0.1rem;}.pie-tts-preview-block.svelte-3sm1sy {gap:0.35rem;}.pie-tts-custom-provider-header.svelte-3sm1sy {display:flex;flex-direction:column;gap:0.2rem;margin-bottom:0.25rem;}.pie-tts-custom-provider-element.svelte-3sm1sy {display:block;width:100%;}.pie-tts-preview-header.svelte-3sm1sy {display:flex;align-items:center;justify-content:space-between;gap:0.5rem;}.pie-tts-preview-title.svelte-3sm1sy {margin:0;font-size:0.85rem;font-weight:700;}.pie-tts-preview-input.svelte-3sm1sy {min-height:4.25rem;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
2800
|
+
"Courier New", monospace;}.pie-tts-preview-row.svelte-3sm1sy {display:flex;align-items:center;justify-content:space-between;gap:0.5rem;}.pie-tts-preview-track.svelte-3sm1sy {margin-top:0.15rem;border:1px dashed var(--color-base-300);border-radius:0.5rem;padding:0.4rem 0.5rem;min-height:2.6rem;white-space:pre-wrap;font-size:0.75rem;line-height:1.4;}.pie-tts-preview-active.svelte-3sm1sy {background:color-mix(in srgb, var(--color-warning) 40%, transparent);border-radius:0.15rem;}`
|
|
2801
|
+
};
|
|
2802
|
+
function Mf(e, t) {
|
|
2803
|
+
sa(t, !0), zu(e, Af);
|
|
2804
|
+
const r = Iu(), n = "/api/tts", i = "pie:section-player-tools:tts-settings";
|
|
2805
|
+
let s = jr(t, "toolkitCoordinator", 7, null), u = jr(t, "apiEndpoint", 7, "/api/tts"), o = jr(t, "storageKey", 7, i), c = jr(t, "adapters", 23, () => ({})), g = jr(t, "customProviders", 23, () => []), h = /* @__PURE__ */ R("browser"), m = /* @__PURE__ */ R(null), p = /* @__PURE__ */ R(null), w = /* @__PURE__ */ R(!1), k = /* @__PURE__ */ R(!1), T = /* @__PURE__ */ R(null), b = /* @__PURE__ */ R(null), $ = /* @__PURE__ */ R("plain"), P = /* @__PURE__ */ R(""), N = /* @__PURE__ */ R(null), M = /* @__PURE__ */ R(-1), L = /* @__PURE__ */ R(0), W = /* @__PURE__ */ R(Pe({})), Y = /* @__PURE__ */ R(Pe({})), q = /* @__PURE__ */ R(Pe({})), me = /* @__PURE__ */ R(""), G = /* @__PURE__ */ R(1), ht = /* @__PURE__ */ R(1), tt = /* @__PURE__ */ R(""), _t = /* @__PURE__ */ R("en-US"), br = /* @__PURE__ */ R(""), Be = /* @__PURE__ */ R("neural"), Xt = /* @__PURE__ */ R(24e3), Zt = /* @__PURE__ */ R("mp3"), wr = /* @__PURE__ */ R("word"), rt = /* @__PURE__ */ R(""), Qt = /* @__PURE__ */ R(1), At = /* @__PURE__ */ R(""), gt = /* @__PURE__ */ R("en-US"), Mt = /* @__PURE__ */ R(""), Pt = /* @__PURE__ */ R("wavenet"), nt = /* @__PURE__ */ R(""), er = /* @__PURE__ */ R(1), Ct = /* @__PURE__ */ R(Pe({
|
|
2806
|
+
checked: !1,
|
|
2807
|
+
loading: !1,
|
|
2808
|
+
available: !1,
|
|
2809
|
+
message: null,
|
|
2810
|
+
detail: null,
|
|
2811
|
+
voices: []
|
|
2812
|
+
})), mt = /* @__PURE__ */ R(Pe({
|
|
2813
|
+
checked: !1,
|
|
2814
|
+
loading: !1,
|
|
2815
|
+
available: !1,
|
|
2816
|
+
message: null,
|
|
2817
|
+
detail: null,
|
|
2818
|
+
voices: []
|
|
2819
|
+
})), it = /* @__PURE__ */ R(Pe({
|
|
2820
|
+
checked: !1,
|
|
2821
|
+
loading: !1,
|
|
2822
|
+
available: !1,
|
|
2823
|
+
message: null,
|
|
2824
|
+
detail: null,
|
|
2825
|
+
voices: []
|
|
2826
|
+
})), tr = null, xe = null, Xr = 0, Vn = /* @__PURE__ */ R(null);
|
|
2827
|
+
const Hi = {
|
|
2828
|
+
browser: "This is a browser voice sample. You should hear clear playback and see tracking updates.",
|
|
2829
|
+
polly: "This is an AWS Polly voice sample. You should hear this text and see tracking updates.",
|
|
2830
|
+
google: "This is a Google Cloud TTS voice sample. You should hear this text and see tracking updates."
|
|
2831
|
+
}, cl = {
|
|
2832
|
+
polly: '<speak>This is an AWS Polly SSML sample. <break time="300ms"/> The voice should honor this markup.</speak>',
|
|
2833
|
+
google: '<speak>This is a <prosody rate="95%">Google Cloud SSML sample</prosody>. <break time="250ms"/> The preview preserves authored SSML.</speak>'
|
|
2834
|
+
}, dl = [
|
|
2835
|
+
"browser",
|
|
2836
|
+
"polly",
|
|
2837
|
+
"google"
|
|
2838
|
+
], kr = /* @__PURE__ */ sr(() => {
|
|
2839
|
+
const l = new Set(dl), f = [], v = /* @__PURE__ */ new Set();
|
|
2840
|
+
for (const y of g() || []) {
|
|
2841
|
+
if (!y || typeof y != "object") continue;
|
|
2842
|
+
const A = String(y.id || "").trim();
|
|
2843
|
+
!A || l.has(A) || v.has(A) || (v.add(A), f.push(y));
|
|
2844
|
+
}
|
|
2845
|
+
return f;
|
|
2846
|
+
}), vl = /* @__PURE__ */ sr(() => [
|
|
2847
|
+
{
|
|
2848
|
+
id: "browser",
|
|
2849
|
+
label: "Browser"
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
id: "polly",
|
|
2853
|
+
label: "Polly"
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
id: "google",
|
|
2857
|
+
label: "Google"
|
|
2858
|
+
},
|
|
2859
|
+
...a(kr).map((l) => ({
|
|
2860
|
+
id: l.id,
|
|
2861
|
+
label: l.label
|
|
2862
|
+
}))
|
|
2863
|
+
]), Ee = /* @__PURE__ */ sr(() => a(kr).find((l) => l.id === a(h)) || null);
|
|
2864
|
+
function Fn() {
|
|
2865
|
+
r("close");
|
|
2866
|
+
}
|
|
2867
|
+
function qn(l) {
|
|
2868
|
+
return {
|
|
2869
|
+
id: l,
|
|
2870
|
+
toolkitCoordinator: s(),
|
|
2871
|
+
apiEndpoint: ze(),
|
|
2872
|
+
state: a(W)[l] || {}
|
|
2873
|
+
};
|
|
2874
|
+
}
|
|
2875
|
+
function st(l) {
|
|
2876
|
+
return l === "browser" || l === "polly" || l === "google";
|
|
2877
|
+
}
|
|
2878
|
+
function Yi(l) {
|
|
2879
|
+
const f = l?.available === !0;
|
|
2880
|
+
return {
|
|
2881
|
+
checked: !0,
|
|
2882
|
+
loading: !1,
|
|
2883
|
+
available: f,
|
|
2884
|
+
message: l?.message || (f ? "Provider available." : "Provider unavailable."),
|
|
2885
|
+
detail: l?.detail || null,
|
|
2886
|
+
voices: []
|
|
2887
|
+
};
|
|
2888
|
+
}
|
|
2889
|
+
function Un(l) {
|
|
2890
|
+
const f = a(kr).find((v) => v.id === l);
|
|
2891
|
+
if (!f) throw new Error(`Custom provider '${l}' is not registered.`);
|
|
2892
|
+
return f;
|
|
2893
|
+
}
|
|
2894
|
+
async function pl(l) {
|
|
2895
|
+
const f = Un(l), v = {
|
|
2896
|
+
checked: !0,
|
|
2897
|
+
loading: !0,
|
|
2898
|
+
available: !1,
|
|
2899
|
+
message: null,
|
|
2900
|
+
detail: null,
|
|
2901
|
+
voices: []
|
|
2902
|
+
};
|
|
2903
|
+
_(q, {
|
|
2904
|
+
...a(q),
|
|
2905
|
+
[f.id]: v
|
|
2906
|
+
}, !0);
|
|
2907
|
+
try {
|
|
2908
|
+
const y = await f.checkAvailability?.(qn(f.id));
|
|
2909
|
+
_(q, {
|
|
2910
|
+
...a(q),
|
|
2911
|
+
[f.id]: Yi(y || {
|
|
2912
|
+
available: !0,
|
|
2913
|
+
message: "Provider available."
|
|
2914
|
+
})
|
|
2915
|
+
}, !0);
|
|
2916
|
+
} catch (y) {
|
|
2917
|
+
_(q, {
|
|
2918
|
+
...a(q),
|
|
2919
|
+
[f.id]: {
|
|
2920
|
+
checked: !0,
|
|
2921
|
+
loading: !1,
|
|
2922
|
+
available: !1,
|
|
2923
|
+
message: "Provider availability check failed.",
|
|
2924
|
+
detail: y instanceof Error ? y.message : String(y),
|
|
2925
|
+
voices: []
|
|
2926
|
+
}
|
|
2927
|
+
}, !0);
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
function Ki(l, f) {
|
|
2931
|
+
const v = a(W)[l] || {};
|
|
2932
|
+
_(W, {
|
|
2933
|
+
...a(W),
|
|
2934
|
+
[l]: {
|
|
2935
|
+
...v,
|
|
2936
|
+
...f
|
|
2937
|
+
}
|
|
2938
|
+
}, !0);
|
|
2939
|
+
}
|
|
2940
|
+
function hl(l, f) {
|
|
2941
|
+
const v = f?.detail || {};
|
|
2942
|
+
!v.state || typeof v.state != "object" || Ki(l, v.state);
|
|
2943
|
+
}
|
|
2944
|
+
function _l(l, f) {
|
|
2945
|
+
const v = f?.detail || {};
|
|
2946
|
+
_(q, {
|
|
2947
|
+
...a(q),
|
|
2948
|
+
[l]: Yi(v)
|
|
2949
|
+
}, !0);
|
|
2950
|
+
}
|
|
2951
|
+
function gl(l) {
|
|
2952
|
+
return {
|
|
2953
|
+
toolkitCoordinator: s(),
|
|
2954
|
+
apiEndpoint: ze(),
|
|
2955
|
+
state: a(W)[l.id] || {},
|
|
2956
|
+
...l.componentProps || {}
|
|
2957
|
+
};
|
|
2958
|
+
}
|
|
2959
|
+
async function ml(l, f) {
|
|
2960
|
+
const v = f?.detail || {};
|
|
2961
|
+
!v || typeof v != "object" || !v.config || (_(Y, {
|
|
2962
|
+
...a(Y),
|
|
2963
|
+
[l]: v
|
|
2964
|
+
}, !0), await as());
|
|
2965
|
+
}
|
|
2966
|
+
async function yl(l) {
|
|
2967
|
+
a(h) !== l && ts(l), await ss();
|
|
2968
|
+
}
|
|
2969
|
+
function rr(l) {
|
|
2970
|
+
const f = Number(l);
|
|
2971
|
+
return Number.isFinite(f) ? Math.max(0.25, Math.min(4, f)) : 1;
|
|
2972
|
+
}
|
|
2973
|
+
function Bn(l) {
|
|
2974
|
+
const f = Number(l);
|
|
2975
|
+
return Number.isFinite(f) ? Math.max(0, Math.min(2, f)) : 1;
|
|
2976
|
+
}
|
|
2977
|
+
function Zr(l) {
|
|
2978
|
+
const f = [
|
|
2979
|
+
8e3,
|
|
2980
|
+
16e3,
|
|
2981
|
+
22050,
|
|
2982
|
+
24e3
|
|
2983
|
+
], v = Number(l);
|
|
2984
|
+
return Number.isFinite(v) && f.includes(v) ? v : 24e3;
|
|
2985
|
+
}
|
|
2986
|
+
function Ji() {
|
|
2987
|
+
return a(wr) === "word+sentence" ? ["word", "sentence"] : ["word"];
|
|
2988
|
+
}
|
|
2989
|
+
function Xi() {
|
|
2990
|
+
return String(o() || "").trim() || i;
|
|
2991
|
+
}
|
|
2992
|
+
function bl() {
|
|
2993
|
+
const l = s()?.getToolConfig?.("tts") || {}, f = wl(), v = f ? {
|
|
2994
|
+
...l,
|
|
2995
|
+
...f
|
|
2996
|
+
} : l, y = ze(), A = v?.backend;
|
|
2997
|
+
typeof A == "string" && A.trim().length > 0 && _(h, A, !0);
|
|
2998
|
+
const z = typeof v?.defaultVoice == "string" ? v.defaultVoice : "", ne = rr(Number(v?.rate ?? 1)), se = Bn(Number(v?.pitch ?? 1)), ee = typeof v?.apiEndpoint == "string" && v.apiEndpoint.trim().length > 0 ? v.apiEndpoint : y, pe = typeof v?.language == "string" && v.language.trim().length > 0 ? v.language : "en-US", D = v?.engine === "standard" ? "standard" : v?.engine === "neural" ? "neural" : v?.quality === "standard" ? "standard" : "neural", U = v?.providerOptions || {}, fe = Zr(Number(v?.sampleRate ?? U.sampleRate ?? 24e3)), K = v?.format === "ogg" || v?.format === "pcm" || v?.format === "mp3" ? v.format : U.format === "ogg" || U.format === "pcm" || U.format === "mp3" ? U.format : "mp3", te = (Array.isArray(U.speechMarkTypes) ? U.speechMarkTypes : []).includes("sentence") || v?.speechMarksMode === "word+sentence" ? "word+sentence" : "word";
|
|
2999
|
+
if (_(me, A === "browser" ? z : "", !0), _(G, ne, !0), _(ht, se, !0), _(tt, ee, !0), _(_t, pe, !0), _(Be, D, !0), _(Xt, fe, !0), _(Zt, K, !0), _(wr, te, !0), _(rt, A === "polly" ? z : "", !0), _(Qt, ne, !0), _(At, ee, !0), _(gt, pe, !0), _(Mt, typeof v?.googleGender == "string" ? v.googleGender : "", !0), _(Pt, v?.googleVoiceType === "standard" || v?.googleVoiceType === "studio" || v?.googleVoiceType === "wavenet" ? v.googleVoiceType : "wavenet", !0), _(nt, A === "google" ? z : "", !0), _(er, ne, !0), !st(a(h))) {
|
|
3000
|
+
const Z = U && typeof U == "object" ? U : {};
|
|
3001
|
+
Object.keys(Z).length > 0 && Ki(a(h), Z);
|
|
3002
|
+
}
|
|
3003
|
+
en();
|
|
3004
|
+
}
|
|
3005
|
+
function zn(l, f) {
|
|
3006
|
+
const v = Object.keys(l), y = Object.keys(f);
|
|
3007
|
+
if (v.length !== y.length) return !1;
|
|
3008
|
+
for (const A of v)
|
|
3009
|
+
if (!(A in f) || l[A] !== f[A]) return !1;
|
|
3010
|
+
return !0;
|
|
3011
|
+
}
|
|
3012
|
+
function Zi() {
|
|
3013
|
+
const l = {}, f = {};
|
|
3014
|
+
for (const y of a(kr))
|
|
3015
|
+
l[y.id] = a(W)[y.id] || y.initialState || {}, f[y.id] = a(q)[y.id] || {
|
|
3016
|
+
checked: !1,
|
|
3017
|
+
loading: !1,
|
|
3018
|
+
available: !1,
|
|
3019
|
+
message: null,
|
|
3020
|
+
detail: null,
|
|
3021
|
+
voices: []
|
|
3022
|
+
};
|
|
3023
|
+
const v = Object.fromEntries(Object.entries(a(Y)).filter(([y]) => !!l[y]));
|
|
3024
|
+
zn(a(W), l) || _(W, l, !0), zn(a(q), f) || _(q, f, !0), zn(a(Y), v) || _(Y, v, !0), !st(a(h)) && !l[a(h)] && _(h, "browser");
|
|
3025
|
+
}
|
|
3026
|
+
function wl() {
|
|
3027
|
+
if (typeof window > "u") return null;
|
|
3028
|
+
try {
|
|
3029
|
+
const l = window.localStorage.getItem(Xi());
|
|
3030
|
+
if (!l) return null;
|
|
3031
|
+
const f = JSON.parse(l);
|
|
3032
|
+
return !f || typeof f != "object" ? null : f;
|
|
3033
|
+
} catch {
|
|
3034
|
+
return null;
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
function Qr(l) {
|
|
3038
|
+
if (!(typeof window > "u"))
|
|
3039
|
+
try {
|
|
3040
|
+
window.localStorage.setItem(Xi(), JSON.stringify(l));
|
|
3041
|
+
} catch {
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
async function kl() {
|
|
3045
|
+
_(Ct, {
|
|
3046
|
+
...a(Ct),
|
|
3047
|
+
checked: !0,
|
|
3048
|
+
loading: !0,
|
|
3049
|
+
message: null,
|
|
3050
|
+
detail: null
|
|
3051
|
+
}, !0);
|
|
3052
|
+
try {
|
|
3053
|
+
if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("Web Speech API is not available in this browser.");
|
|
3054
|
+
const l = window.speechSynthesis;
|
|
3055
|
+
let f = l.getVoices();
|
|
3056
|
+
f.length || (await new Promise((y) => {
|
|
3057
|
+
let A = !1;
|
|
3058
|
+
const z = () => {
|
|
3059
|
+
A || (A = !0, y());
|
|
3060
|
+
}, ne = window.setTimeout(z, 1200);
|
|
3061
|
+
l.addEventListener("voiceschanged", () => {
|
|
3062
|
+
window.clearTimeout(ne), z();
|
|
3063
|
+
}, { once: !0 });
|
|
3064
|
+
}), f = l.getVoices());
|
|
3065
|
+
const v = f.map((y) => ({
|
|
3066
|
+
id: y.voiceURI || y.name,
|
|
3067
|
+
name: y.name,
|
|
3068
|
+
languageCode: y.lang
|
|
3069
|
+
}));
|
|
3070
|
+
a(me) && (v.some((y) => (y.name || "") === a(me)) || _(me, "")), _(Ct, {
|
|
3071
|
+
checked: !0,
|
|
3072
|
+
loading: !1,
|
|
3073
|
+
available: !0,
|
|
3074
|
+
message: f.length ? `Browser TTS available (${f.length} voices detected).` : "Browser TTS is available, but no voices were returned yet.",
|
|
3075
|
+
detail: null,
|
|
3076
|
+
voices: v
|
|
3077
|
+
}, !0);
|
|
3078
|
+
} catch (l) {
|
|
3079
|
+
_(Ct, {
|
|
3080
|
+
checked: !0,
|
|
3081
|
+
loading: !1,
|
|
3082
|
+
available: !1,
|
|
3083
|
+
message: "Browser TTS is not available.",
|
|
3084
|
+
detail: l instanceof Error ? l.message : String(l),
|
|
3085
|
+
voices: []
|
|
3086
|
+
}, !0);
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
async function Dn(l) {
|
|
3090
|
+
try {
|
|
3091
|
+
return await l.json();
|
|
3092
|
+
} catch {
|
|
3093
|
+
return {};
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
function $l() {
|
|
3097
|
+
const l = new URL(yt(a(tt), ze()), window.location.origin);
|
|
3098
|
+
l.pathname = `${l.pathname.replace(/\/+$/, "")}/polly/voices`;
|
|
3099
|
+
const f = l;
|
|
3100
|
+
return a(_t) && f.searchParams.set("language", a(_t)), a(br) && f.searchParams.set("gender", a(br)), a(Be) && f.searchParams.set("engine", a(Be)), f;
|
|
3101
|
+
}
|
|
3102
|
+
function Sl() {
|
|
3103
|
+
const l = new URL(yt(a(At), ze()), window.location.origin);
|
|
3104
|
+
l.pathname = `${l.pathname.replace(/\/+$/, "")}/google/voices`;
|
|
3105
|
+
const f = l;
|
|
3106
|
+
return a(gt) && f.searchParams.set("language", a(gt)), a(Mt) && f.searchParams.set("gender", a(Mt)), a(Pt) && f.searchParams.set("voiceType", a(Pt)), f;
|
|
3107
|
+
}
|
|
3108
|
+
async function Qi() {
|
|
3109
|
+
_(mt, {
|
|
3110
|
+
...a(mt),
|
|
3111
|
+
checked: !0,
|
|
3112
|
+
loading: !0,
|
|
3113
|
+
message: null,
|
|
3114
|
+
detail: null
|
|
3115
|
+
}, !0);
|
|
3116
|
+
try {
|
|
3117
|
+
const l = $l(), f = await c().fetchPollyVoices?.({
|
|
3118
|
+
endpoint: yt(a(tt), ze()),
|
|
3119
|
+
language: a(_t),
|
|
3120
|
+
gender: a(br),
|
|
3121
|
+
engine: a(Be),
|
|
3122
|
+
url: l
|
|
3123
|
+
}), v = Array.isArray(f) ? f : await (async () => {
|
|
3124
|
+
const y = await fetch(l.toString()), A = await Dn(y);
|
|
3125
|
+
if (!y.ok) throw new Error(`HTTP ${y.status}: ${A?.error || A?.message || "Unknown error"}`);
|
|
3126
|
+
return Array.isArray(A?.voices) ? A.voices : [];
|
|
3127
|
+
})();
|
|
3128
|
+
a(rt) && (v.some((y) => (y.id || y.name || "") === a(rt)) || _(rt, "")), _(mt, {
|
|
3129
|
+
checked: !0,
|
|
3130
|
+
loading: !1,
|
|
3131
|
+
available: !0,
|
|
3132
|
+
message: `AWS Polly available (${v.length} matching voices, ${a(Be)} engine).`,
|
|
3133
|
+
detail: null,
|
|
3134
|
+
voices: v
|
|
3135
|
+
}, !0);
|
|
3136
|
+
} catch (l) {
|
|
3137
|
+
_(mt, {
|
|
3138
|
+
checked: !0,
|
|
3139
|
+
loading: !1,
|
|
3140
|
+
available: !1,
|
|
3141
|
+
message: "AWS Polly is not available from the configured API.",
|
|
3142
|
+
detail: l instanceof Error ? l.message : String(l),
|
|
3143
|
+
voices: []
|
|
3144
|
+
}, !0);
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
async function es() {
|
|
3148
|
+
_(it, {
|
|
3149
|
+
...a(it),
|
|
3150
|
+
checked: !0,
|
|
3151
|
+
loading: !0,
|
|
3152
|
+
message: null,
|
|
3153
|
+
detail: null
|
|
3154
|
+
}, !0);
|
|
3155
|
+
try {
|
|
3156
|
+
const l = Sl(), f = await c().fetchGoogleVoices?.({
|
|
3157
|
+
endpoint: yt(a(At), ze()),
|
|
3158
|
+
language: a(gt),
|
|
3159
|
+
gender: a(Mt),
|
|
3160
|
+
voiceType: a(Pt),
|
|
3161
|
+
url: l
|
|
3162
|
+
}), v = Array.isArray(f) ? f : await (async () => {
|
|
3163
|
+
const y = await fetch(l.toString()), A = await Dn(y);
|
|
3164
|
+
if (!y.ok) throw new Error(`HTTP ${y.status}: ${A?.error || A?.message || "Unknown error"}`);
|
|
3165
|
+
return Array.isArray(A?.voices) ? A.voices : [];
|
|
3166
|
+
})();
|
|
3167
|
+
a(nt) && (v.some((y) => (y.id || y.name || "") === a(nt)) || _(nt, "")), _(it, {
|
|
3168
|
+
checked: !0,
|
|
3169
|
+
loading: !1,
|
|
3170
|
+
available: !0,
|
|
3171
|
+
message: `Google Cloud TTS available (${v.length} matching voices).`,
|
|
3172
|
+
detail: null,
|
|
3173
|
+
voices: v
|
|
3174
|
+
}, !0);
|
|
3175
|
+
} catch (l) {
|
|
3176
|
+
_(it, {
|
|
3177
|
+
checked: !0,
|
|
3178
|
+
loading: !1,
|
|
3179
|
+
available: !1,
|
|
3180
|
+
message: "Google Cloud TTS is not available from the configured API.",
|
|
3181
|
+
detail: l instanceof Error ? l.message : String(l),
|
|
3182
|
+
voices: []
|
|
3183
|
+
}, !0);
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
async function Gn() {
|
|
3187
|
+
if (a(h) === "browser") {
|
|
3188
|
+
await kl();
|
|
3189
|
+
return;
|
|
3190
|
+
}
|
|
3191
|
+
if (a(h) === "polly") {
|
|
3192
|
+
await Qi();
|
|
3193
|
+
return;
|
|
3194
|
+
}
|
|
3195
|
+
if (a(h) === "google") {
|
|
3196
|
+
await es();
|
|
3197
|
+
return;
|
|
3198
|
+
}
|
|
3199
|
+
await pl(a(h));
|
|
3200
|
+
}
|
|
3201
|
+
function Hn() {
|
|
3202
|
+
a(h) === "polly" && Qi();
|
|
3203
|
+
}
|
|
3204
|
+
function Yn() {
|
|
3205
|
+
a(h) === "google" && es();
|
|
3206
|
+
}
|
|
3207
|
+
function ts(l) {
|
|
3208
|
+
a(h) !== l && (Sr(), _(h, l, !0), st(l) && en(), Gn());
|
|
3209
|
+
}
|
|
3210
|
+
function Ne() {
|
|
3211
|
+
return a(h) === "browser" ? a(Ct) : a(h) === "polly" ? a(mt) : a(h) === "google" ? a(it) : a(q)[a(h)] || {
|
|
3212
|
+
checked: !1,
|
|
3213
|
+
loading: !1,
|
|
3214
|
+
available: !1,
|
|
3215
|
+
message: "Provider availability has not been checked yet.",
|
|
3216
|
+
detail: null,
|
|
3217
|
+
voices: []
|
|
3218
|
+
};
|
|
3219
|
+
}
|
|
3220
|
+
function xl() {
|
|
3221
|
+
return st(a(h)) ? !0 : a(Ee) ? typeof a(Ee).preview == "function" : !1;
|
|
3222
|
+
}
|
|
3223
|
+
function $r(l) {
|
|
3224
|
+
if (l === "browser") return a(me) || void 0;
|
|
3225
|
+
if (l === "polly")
|
|
3226
|
+
return a(rt) && a(mt).voices.some((v) => (v.id || v.name || "") === a(rt)) ? a(rt) : void 0;
|
|
3227
|
+
if (a(nt) && a(it).voices.some((v) => (v.id || v.name || "") === a(nt)))
|
|
3228
|
+
return a(nt);
|
|
3229
|
+
const f = a(it).voices[0];
|
|
3230
|
+
return f && (f.id || f.name) || void 0;
|
|
3231
|
+
}
|
|
3232
|
+
function yt(l, f = n) {
|
|
3233
|
+
const v = l.trim();
|
|
3234
|
+
return v ? v.replace(/\/synthesize\/?$/i, "") : f;
|
|
3235
|
+
}
|
|
3236
|
+
function ze() {
|
|
3237
|
+
return yt(u() || n);
|
|
3238
|
+
}
|
|
3239
|
+
function rs(l) {
|
|
3240
|
+
return l === "browser" ? "This is a browser voice sample." : l === "polly" ? "This is an AWS Polly voice sample." : "This is a Google Cloud TTS voice sample.";
|
|
3241
|
+
}
|
|
3242
|
+
function El() {
|
|
3243
|
+
xe !== null && typeof window < "u" && window.clearInterval(xe), xe = null, _(M, -1), _(L, 0);
|
|
3244
|
+
}
|
|
3245
|
+
function Tl(l) {
|
|
3246
|
+
const f = [], v = /\S+/g;
|
|
3247
|
+
let y;
|
|
3248
|
+
for (; (y = v.exec(l)) !== null; ) f.push({
|
|
3249
|
+
start: y.index,
|
|
3250
|
+
end: y.index + y[0].length
|
|
3251
|
+
});
|
|
3252
|
+
return f;
|
|
3253
|
+
}
|
|
3254
|
+
function Al(l) {
|
|
3255
|
+
const f = typeof l == "string" ? l : "";
|
|
3256
|
+
if (!f.length) return [{
|
|
3257
|
+
text: "",
|
|
3258
|
+
active: !1
|
|
3259
|
+
}];
|
|
3260
|
+
if (a(M) < 0 || a(L) <= 0) return [{
|
|
3261
|
+
text: f,
|
|
3262
|
+
active: !1
|
|
3263
|
+
}];
|
|
3264
|
+
const v = Math.max(0, Math.min(a(M), f.length)), y = Math.max(v, Math.min(v + a(L), f.length));
|
|
3265
|
+
return [
|
|
3266
|
+
{
|
|
3267
|
+
text: f.slice(0, v),
|
|
3268
|
+
active: !1
|
|
3269
|
+
},
|
|
3270
|
+
{
|
|
3271
|
+
text: f.slice(v, y),
|
|
3272
|
+
active: !0
|
|
3273
|
+
},
|
|
3274
|
+
{
|
|
3275
|
+
text: f.slice(y),
|
|
3276
|
+
active: !1
|
|
3277
|
+
}
|
|
3278
|
+
].filter((A) => A.text.length > 0);
|
|
3279
|
+
}
|
|
3280
|
+
function en() {
|
|
3281
|
+
if (!st(a(h))) {
|
|
3282
|
+
a($) === "ssml" ? _(P, "") : a(P).trim() || _(P, "This is a custom TTS provider voice sample.");
|
|
3283
|
+
return;
|
|
3284
|
+
}
|
|
3285
|
+
if (a($) === "ssml") {
|
|
3286
|
+
if (a(h) === "browser") {
|
|
3287
|
+
_(P, Hi.browser, !0);
|
|
3288
|
+
return;
|
|
3289
|
+
}
|
|
3290
|
+
_(P, cl[a(h)], !0);
|
|
3291
|
+
return;
|
|
3292
|
+
}
|
|
3293
|
+
_(P, Hi[a(h)], !0);
|
|
3294
|
+
}
|
|
3295
|
+
function ns(l) {
|
|
3296
|
+
a($) !== l && (Sr(), _($, l, !0), _(T, null), _(N, null), en());
|
|
3297
|
+
}
|
|
3298
|
+
function Ml(l, f) {
|
|
3299
|
+
xe !== null && window.clearInterval(xe);
|
|
3300
|
+
let v = -1;
|
|
3301
|
+
xe = window.setInterval(() => {
|
|
3302
|
+
const y = l.currentTime * 1e3;
|
|
3303
|
+
for (let A = f.length - 1; A >= 0; A -= 1) {
|
|
3304
|
+
const z = f[A];
|
|
3305
|
+
if (y >= z.time) {
|
|
3306
|
+
A !== v && (v = A, _(M, z.start, !0), _(L, Math.max(1, z.end - z.start), !0));
|
|
3307
|
+
return;
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3310
|
+
}, 40);
|
|
3311
|
+
}
|
|
3312
|
+
function Sr() {
|
|
3313
|
+
El(), _(T, null), _(N, null), typeof window < "u" && "speechSynthesis" in window && window.speechSynthesis.cancel(), tr && (tr.pause(), tr.src = "", tr = null), _(k, !1), _(b, null);
|
|
3314
|
+
}
|
|
3315
|
+
async function is(l) {
|
|
3316
|
+
const f = yt(a(l === "polly" ? tt : At), ze()), v = !(l === "google" && a($) === "ssml"), y = {
|
|
3317
|
+
text: a(P).trim() || rs(l),
|
|
3318
|
+
provider: l,
|
|
3319
|
+
rate: rr(a(l === "polly" ? Qt : er)),
|
|
3320
|
+
language: l === "polly" ? a(_t) || void 0 : a(gt) || void 0,
|
|
3321
|
+
voice: $r(l === "polly" ? "polly" : "google"),
|
|
3322
|
+
includeSpeechMarks: v
|
|
3323
|
+
};
|
|
3324
|
+
l === "polly" && (y.engine = a(Be), y.sampleRate = Zr(a(Xt)), y.format = a(Zt), y.speechMarkTypes = Ji());
|
|
3325
|
+
const A = c().synthesizeProbe ? await c().synthesizeProbe({
|
|
3326
|
+
endpoint: f,
|
|
3327
|
+
provider: l,
|
|
3328
|
+
body: y
|
|
3329
|
+
}) : await (async () => {
|
|
3330
|
+
const K = await fetch(`${f}/synthesize`, {
|
|
3331
|
+
method: "POST",
|
|
3332
|
+
headers: { "Content-Type": "application/json" },
|
|
3333
|
+
body: JSON.stringify(y)
|
|
3334
|
+
}), te = await Dn(K);
|
|
3335
|
+
if (!K.ok) throw new Error(te?.message || te?.error || `Preview request failed (${K.status})`);
|
|
3336
|
+
return te;
|
|
3337
|
+
})(), z = A?.audio, ne = A?.contentType || "audio/mpeg";
|
|
3338
|
+
if (!z || typeof z != "string") throw new Error("Preview response did not include audio content.");
|
|
3339
|
+
const se = atob(z), ee = new Array(se.length);
|
|
3340
|
+
for (let K = 0; K < se.length; K += 1) ee[K] = se.charCodeAt(K);
|
|
3341
|
+
const pe = new Blob([new Uint8Array(ee)], { type: ne }), D = URL.createObjectURL(pe), U = new Audio(D);
|
|
3342
|
+
tr = U;
|
|
3343
|
+
const fe = Array.isArray(A?.speechMarks) ? A.speechMarks : [];
|
|
3344
|
+
v && fe.length > 0 && Ml(U, fe), await new Promise((K, te) => {
|
|
3345
|
+
U.onended = () => {
|
|
3346
|
+
xe !== null && (window.clearInterval(xe), xe = null), URL.revokeObjectURL(D), K();
|
|
3347
|
+
}, U.onerror = () => {
|
|
3348
|
+
xe !== null && (window.clearInterval(xe), xe = null), URL.revokeObjectURL(D), te(/* @__PURE__ */ new Error("Failed to play preview audio."));
|
|
3349
|
+
}, U.play().catch(te);
|
|
3350
|
+
}), tr = null;
|
|
3351
|
+
}
|
|
3352
|
+
async function Pl() {
|
|
3353
|
+
if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("Browser speech synthesis is unavailable.");
|
|
3354
|
+
if (a($) === "ssml") throw new Error("SSML preview is not supported in the Browser backend.");
|
|
3355
|
+
const l = window.speechSynthesis, f = new SpeechSynthesisUtterance(a(P).trim() || rs("browser"));
|
|
3356
|
+
if (f.rate = rr(a(G)), f.pitch = Bn(a(ht)), a(me)) {
|
|
3357
|
+
const v = l.getVoices().find((y) => y.name === a(me));
|
|
3358
|
+
v && (f.voice = v);
|
|
3359
|
+
}
|
|
3360
|
+
f.onboundary = (v) => {
|
|
3361
|
+
if (v.name !== "word") return;
|
|
3362
|
+
const y = Number(v.charIndex || 0), A = Tl(a(P)).find((z) => y >= z.start && y < z.end);
|
|
3363
|
+
A && (_(M, A.start, !0), _(L, Math.max(1, A.end - A.start), !0));
|
|
3364
|
+
}, await new Promise((v, y) => {
|
|
3365
|
+
f.onend = () => v(), f.onerror = () => y(/* @__PURE__ */ new Error("Failed to play browser voice preview.")), l.speak(f);
|
|
3366
|
+
});
|
|
3367
|
+
}
|
|
3368
|
+
async function ss() {
|
|
3369
|
+
if (_(T, null), _(N, null), !Ne().available) {
|
|
3370
|
+
_(T, "Cannot preview while this TTS service is unavailable.");
|
|
3371
|
+
return;
|
|
3372
|
+
}
|
|
3373
|
+
if (a(k) && a(b) === a(h)) {
|
|
3374
|
+
Xr += 1, Sr();
|
|
3375
|
+
return;
|
|
3376
|
+
}
|
|
3377
|
+
if (!(typeof a(P) == "string" ? a(P) : "").trim() && st(a(h))) {
|
|
3378
|
+
_(T, "Enter preview text before starting playback.");
|
|
3379
|
+
return;
|
|
3380
|
+
}
|
|
3381
|
+
if (a(h) === "browser" && a($) === "ssml") {
|
|
3382
|
+
_(T, "SSML preview is not supported in the Browser backend.");
|
|
3383
|
+
return;
|
|
3384
|
+
}
|
|
3385
|
+
Sr();
|
|
3386
|
+
const l = ++Xr;
|
|
3387
|
+
_(k, !0), _(b, a(h), !0);
|
|
3388
|
+
try {
|
|
3389
|
+
if (st(a(h)))
|
|
3390
|
+
a(h) === "browser" ? await Pl() : a(h) === "polly" ? (a($) === "ssml" && _(N, "Some Polly neural voices reject certain SSML tags (for example emphasis). Use basic SSML tags if preview fails."), await is("polly")) : (a($) === "ssml" && _(N, "Google SSML preview preserves authored SSML, so word tracking is disabled."), await is("google"));
|
|
3391
|
+
else {
|
|
3392
|
+
const f = Un(a(h)), v = await f.preview?.(qn(f.id));
|
|
3393
|
+
_(N, v?.note || "Custom provider preview completed.", !0);
|
|
3394
|
+
}
|
|
3395
|
+
} catch (f) {
|
|
3396
|
+
l === Xr && _(T, f instanceof Error ? f.message : String(f), !0);
|
|
3397
|
+
} finally {
|
|
3398
|
+
l === Xr && (_(k, !1), _(b, null));
|
|
3399
|
+
}
|
|
3400
|
+
}
|
|
3401
|
+
async function as() {
|
|
3402
|
+
if (_(m, null), _(p, null), !Ne().available) {
|
|
3403
|
+
_(p, "Cannot apply settings while this TTS service is unavailable.");
|
|
3404
|
+
return;
|
|
3405
|
+
}
|
|
3406
|
+
if (!s()?.updateToolConfig) {
|
|
3407
|
+
_(p, "Toolkit coordinator is not available for TTS updates.");
|
|
3408
|
+
return;
|
|
3409
|
+
}
|
|
3410
|
+
_(w, !0);
|
|
3411
|
+
try {
|
|
3412
|
+
if (st(a(h)))
|
|
3413
|
+
if (a(h) === "browser") {
|
|
3414
|
+
const l = {
|
|
3415
|
+
backend: "browser",
|
|
3416
|
+
defaultVoice: $r("browser"),
|
|
3417
|
+
rate: rr(a(G)),
|
|
3418
|
+
pitch: Bn(a(ht)),
|
|
3419
|
+
transportMode: "pie"
|
|
3420
|
+
};
|
|
3421
|
+
s().updateToolConfig("tts", {
|
|
3422
|
+
enabled: !0,
|
|
3423
|
+
...l
|
|
3424
|
+
}), Qr(l);
|
|
3425
|
+
} else if (a(h) === "polly") {
|
|
3426
|
+
const l = {
|
|
3427
|
+
backend: "polly",
|
|
3428
|
+
apiEndpoint: yt(a(tt), ze()),
|
|
3429
|
+
transportMode: "pie",
|
|
3430
|
+
endpointMode: "synthesizePath",
|
|
3431
|
+
endpointValidationMode: "voices",
|
|
3432
|
+
defaultVoice: $r("polly"),
|
|
3433
|
+
rate: rr(a(Qt)),
|
|
3434
|
+
language: a(_t) || void 0,
|
|
3435
|
+
engine: a(Be),
|
|
3436
|
+
sampleRate: Zr(a(Xt)),
|
|
3437
|
+
format: a(Zt),
|
|
3438
|
+
speechMarksMode: a(wr),
|
|
3439
|
+
providerOptions: {
|
|
3440
|
+
engine: a(Be),
|
|
3441
|
+
sampleRate: Zr(a(Xt)),
|
|
3442
|
+
format: a(Zt),
|
|
3443
|
+
speechMarkTypes: Ji()
|
|
3444
|
+
}
|
|
3445
|
+
};
|
|
3446
|
+
s().updateToolConfig("tts", {
|
|
3447
|
+
enabled: !0,
|
|
3448
|
+
...l
|
|
3449
|
+
}), Qr(l);
|
|
3450
|
+
} else {
|
|
3451
|
+
const l = {
|
|
3452
|
+
backend: "google",
|
|
3453
|
+
apiEndpoint: yt(a(At), ze()),
|
|
3454
|
+
transportMode: "pie",
|
|
3455
|
+
endpointMode: "synthesizePath",
|
|
3456
|
+
endpointValidationMode: "voices",
|
|
3457
|
+
defaultVoice: $r("google"),
|
|
3458
|
+
rate: rr(a(er)),
|
|
3459
|
+
language: a(gt) || void 0,
|
|
3460
|
+
googleVoiceType: a(Pt),
|
|
3461
|
+
googleGender: a(Mt)
|
|
3462
|
+
};
|
|
3463
|
+
s().updateToolConfig("tts", {
|
|
3464
|
+
enabled: !0,
|
|
3465
|
+
...l
|
|
3466
|
+
}), Qr(l);
|
|
3467
|
+
}
|
|
3468
|
+
else {
|
|
3469
|
+
const l = Un(a(h));
|
|
3470
|
+
let f;
|
|
3471
|
+
if (l.buildApplyConfig && (f = await l.buildApplyConfig(qn(l.id))), f?.config || (f = a(Y)[l.id]), !f?.config) throw new Error(`Custom provider '${l.id}' did not return apply config.`);
|
|
3472
|
+
s().updateToolConfig("tts", {
|
|
3473
|
+
enabled: !0,
|
|
3474
|
+
...f.config
|
|
3475
|
+
}), Qr({
|
|
3476
|
+
backend: l.id,
|
|
3477
|
+
...f.config || {}
|
|
3478
|
+
}), _(m, f.message || `Applied ${l.label} TTS settings.`, !0);
|
|
3479
|
+
}
|
|
3480
|
+
await s()?.ensureTTSReady?.(s()?.getToolConfig?.("tts")), st(a(h)) && _(m, `Applied ${a(h)} TTS settings.`), Fn();
|
|
3481
|
+
} catch (l) {
|
|
3482
|
+
_(p, l instanceof Error ? l.message : String(l), !0);
|
|
3483
|
+
} finally {
|
|
3484
|
+
_(w, !1);
|
|
3485
|
+
}
|
|
3486
|
+
}
|
|
3487
|
+
Qa(() => {
|
|
3488
|
+
bl(), Zi(), Gn();
|
|
3489
|
+
}), Ei(() => {
|
|
3490
|
+
a(kr), Jt(() => {
|
|
3491
|
+
Zi();
|
|
3492
|
+
});
|
|
3493
|
+
}), Ei(() => {
|
|
3494
|
+
a(Ee);
|
|
3495
|
+
const l = a(Ee), f = a(Vn);
|
|
3496
|
+
if (!l || l.mode !== "component" || !f) return;
|
|
3497
|
+
const v = (z) => _l(l.id, z), y = (z) => void ml(l.id, z), A = () => void yl(l.id);
|
|
3498
|
+
return f.addEventListener("availability", v), f.addEventListener("apply-request", y), f.addEventListener("preview-request", A), () => {
|
|
3499
|
+
f.removeEventListener("availability", v), f.removeEventListener("apply-request", y), f.removeEventListener("preview-request", A);
|
|
3500
|
+
};
|
|
3501
|
+
}), Lu(() => {
|
|
3502
|
+
Sr();
|
|
3503
|
+
});
|
|
3504
|
+
var Cl = {
|
|
3505
|
+
get toolkitCoordinator() {
|
|
3506
|
+
return s();
|
|
3507
|
+
},
|
|
3508
|
+
set toolkitCoordinator(l = null) {
|
|
3509
|
+
s(l), It();
|
|
3510
|
+
},
|
|
3511
|
+
get apiEndpoint() {
|
|
3512
|
+
return u();
|
|
3513
|
+
},
|
|
3514
|
+
set apiEndpoint(l = "/api/tts") {
|
|
3515
|
+
u(l), It();
|
|
3516
|
+
},
|
|
3517
|
+
get storageKey() {
|
|
3518
|
+
return o();
|
|
3519
|
+
},
|
|
3520
|
+
set storageKey(l = i) {
|
|
3521
|
+
o(l), It();
|
|
3522
|
+
},
|
|
3523
|
+
get adapters() {
|
|
3524
|
+
return c();
|
|
3525
|
+
},
|
|
3526
|
+
set adapters(l = {}) {
|
|
3527
|
+
c(l), It();
|
|
3528
|
+
},
|
|
3529
|
+
get customProviders() {
|
|
3530
|
+
return g();
|
|
3531
|
+
},
|
|
3532
|
+
set customProviders(l = []) {
|
|
3533
|
+
g(l), It();
|
|
3534
|
+
}
|
|
3535
|
+
}, tn = Tf();
|
|
3536
|
+
rl(tn, "z-index: 200000;");
|
|
3537
|
+
var ls = E(tn), Kn = E(ls), Rl = S(E(Kn), 2);
|
|
3538
|
+
x(Kn);
|
|
3539
|
+
var Jn = S(Kn, 2);
|
|
3540
|
+
Rr(Jn, 21, () => a(vl), Cr, (l, f) => {
|
|
3541
|
+
var v = uf();
|
|
3542
|
+
let y;
|
|
3543
|
+
var A = E(v, !0);
|
|
3544
|
+
x(v), he(() => {
|
|
3545
|
+
y = ur(v, 1, "btn btn-sm join-item", null, y, { "btn-active": a(h) === a(f).id }), oe(A, a(f).label);
|
|
3546
|
+
}), _e("click", v, () => ts(a(f).id)), J(l, v);
|
|
3547
|
+
}), x(Jn);
|
|
3548
|
+
var Xn = S(Jn, 2), os = E(Xn), Ol = (l) => {
|
|
3549
|
+
var f = ff();
|
|
3550
|
+
ta(2), J(l, f);
|
|
3551
|
+
}, Nl = /* @__PURE__ */ sr(() => Ne().loading), Ll = (l) => {
|
|
3552
|
+
var f = cf(), v = E(f, !0);
|
|
3553
|
+
x(f), he((y, A) => {
|
|
3554
|
+
ur(f, 1, y, "svelte-3sm1sy"), oe(v, A);
|
|
3555
|
+
}, [() => tl(Ne().available ? "pie-tts-ok" : "pie-tts-error"), () => Ne().message]), J(l, f);
|
|
3556
|
+
}, jl = /* @__PURE__ */ sr(() => Ne().checked);
|
|
3557
|
+
Ge(os, (l) => {
|
|
3558
|
+
a(Nl) ? l(Ol) : a(jl) && l(Ll, 1);
|
|
3559
|
+
});
|
|
3560
|
+
var Il = S(os, 2);
|
|
3561
|
+
x(Xn);
|
|
3562
|
+
var us = S(Xn, 2), Wl = (l) => {
|
|
3563
|
+
var f = df(), v = E(f), y = E(v, !0);
|
|
3564
|
+
x(v), x(f), he((A) => oe(y, A), [() => Ne().detail]), J(l, f);
|
|
3565
|
+
}, Vl = /* @__PURE__ */ sr(() => Ne().detail);
|
|
3566
|
+
Ge(us, (l) => {
|
|
3567
|
+
a(Vl) && l(Wl);
|
|
3568
|
+
});
|
|
3569
|
+
var fs = S(us, 2), Fl = (l) => {
|
|
3570
|
+
var f = pf(), v = E(f), y = S(E(v), 2), A = E(y);
|
|
3571
|
+
A.value = A.__value = "";
|
|
3572
|
+
var z = S(A);
|
|
3573
|
+
Rr(z, 17, () => a(Ct).voices, Cr, (Z, ae) => {
|
|
3574
|
+
var Te = vf(), bt = E(Te);
|
|
3575
|
+
x(Te);
|
|
3576
|
+
var De = {};
|
|
3577
|
+
he(() => {
|
|
3578
|
+
oe(bt, `${a(ae).name ?? ""} (${(a(ae).languageCode || "n/a") ?? ""})`), De !== (De = a(ae).name || "") && (Te.value = (Te.__value = a(ae).name || "") ?? "");
|
|
3579
|
+
}), J(Z, Te);
|
|
3580
|
+
}), x(y), x(v);
|
|
3581
|
+
var ne = S(v, 2), se = E(ne), ee = S(E(se), 2);
|
|
3582
|
+
ft(ee);
|
|
3583
|
+
var pe = S(ee, 2), D = E(pe);
|
|
3584
|
+
x(pe), x(se);
|
|
3585
|
+
var U = S(se, 2), fe = S(E(U), 2);
|
|
3586
|
+
ft(fe);
|
|
3587
|
+
var K = S(fe, 2), te = E(K, !0);
|
|
3588
|
+
x(K), x(U), x(ne), x(f), he((Z, ae) => {
|
|
3589
|
+
f.disabled = !a(Ct).available, oe(D, `${Z ?? ""}x`), oe(te, ae);
|
|
3590
|
+
}, [() => Number(a(G)).toFixed(2), () => Number(a(ht)).toFixed(2)]), He(y, () => a(me), (Z) => _(me, Z)), ot(ee, () => a(G), (Z) => _(G, Z)), ot(fe, () => a(ht), (Z) => _(ht, Z)), J(l, f);
|
|
3591
|
+
}, ql = (l) => {
|
|
3592
|
+
var f = _f(), v = E(f), y = S(E(v), 2);
|
|
3593
|
+
ft(y), x(v);
|
|
3594
|
+
var A = S(v, 2), z = E(A), ne = S(E(z), 2);
|
|
3595
|
+
ft(ne), x(z);
|
|
3596
|
+
var se = S(z, 2), ee = S(E(se), 2), pe = E(ee);
|
|
3597
|
+
pe.value = pe.__value = "";
|
|
3598
|
+
var D = S(pe);
|
|
3599
|
+
D.value = D.__value = "male";
|
|
3600
|
+
var U = S(D);
|
|
3601
|
+
U.value = U.__value = "female";
|
|
3602
|
+
var fe = S(U);
|
|
3603
|
+
fe.value = fe.__value = "neutral", x(ee), x(se);
|
|
3604
|
+
var K = S(se, 2), te = S(E(K), 2), Z = E(te);
|
|
3605
|
+
Z.value = Z.__value = "neural";
|
|
3606
|
+
var ae = S(Z);
|
|
3607
|
+
ae.value = ae.__value = "standard", x(te), x(K), x(A);
|
|
3608
|
+
var Te = S(A, 2), bt = E(Te), De = S(E(bt), 2), Rt = E(De);
|
|
3609
|
+
Rt.value = Rt.__value = "";
|
|
3610
|
+
var Er = S(Rt);
|
|
3611
|
+
Rr(Er, 17, () => a(mt).voices, Cr, (re, Ot) => {
|
|
3612
|
+
var Mr = hf(), eo = E(Mr);
|
|
3613
|
+
x(Mr);
|
|
3614
|
+
var Ts = {};
|
|
3615
|
+
he(() => {
|
|
3616
|
+
oe(eo, `${(a(Ot).name || a(Ot).id) ?? ""} (${(a(Ot).languageCode || "n/a") ?? ""})`), Ts !== (Ts = a(Ot).id || a(Ot).name || "") && (Mr.value = (Mr.__value = a(Ot).id || a(Ot).name || "") ?? "");
|
|
3617
|
+
}), J(re, Mr);
|
|
3618
|
+
}), x(De), x(bt);
|
|
3619
|
+
var nn = S(bt, 2), nr = S(E(nn), 2);
|
|
3620
|
+
ft(nr);
|
|
3621
|
+
var ir = S(nr, 2), sn = E(ir);
|
|
3622
|
+
x(ir), x(nn), x(Te);
|
|
3623
|
+
var an = S(Te, 2), le = E(an), Le = S(E(le), 2), at = E(Le);
|
|
3624
|
+
at.value = at.__value = "mp3";
|
|
3625
|
+
var Tr = S(at);
|
|
3626
|
+
Tr.value = Tr.__value = "ogg";
|
|
3627
|
+
var Ar = S(Tr);
|
|
3628
|
+
Ar.value = Ar.__value = "pcm", x(Le), x(le);
|
|
3629
|
+
var ni = S(le, 2), ii = S(E(ni), 2), si = E(ii);
|
|
3630
|
+
si.value = si.__value = 8e3;
|
|
3631
|
+
var ai = S(si);
|
|
3632
|
+
ai.value = ai.__value = 16e3;
|
|
3633
|
+
var li = S(ai);
|
|
3634
|
+
li.value = li.__value = 22050;
|
|
3635
|
+
var Ss = S(li);
|
|
3636
|
+
Ss.value = Ss.__value = 24e3, x(ii), x(ni);
|
|
3637
|
+
var xs = S(ni, 2), oi = S(E(xs), 2), ui = E(oi);
|
|
3638
|
+
ui.value = ui.__value = "word";
|
|
3639
|
+
var Es = S(ui);
|
|
3640
|
+
Es.value = Es.__value = "word+sentence", x(oi), x(xs), x(an), x(f), he((re) => {
|
|
3641
|
+
f.disabled = !a(mt).available, oe(sn, `${re ?? ""}x`);
|
|
3642
|
+
}, [() => Number(a(Qt)).toFixed(2)]), ot(y, () => a(tt), (re) => _(tt, re)), _e("change", ne, Hn), ot(ne, () => a(_t), (re) => _(_t, re)), _e("change", ee, Hn), He(ee, () => a(br), (re) => _(br, re)), _e("change", te, Hn), He(te, () => a(Be), (re) => _(Be, re)), He(De, () => a(rt), (re) => _(rt, re)), ot(nr, () => a(Qt), (re) => _(Qt, re)), He(Le, () => a(Zt), (re) => _(Zt, re)), He(ii, () => a(Xt), (re) => _(Xt, re)), He(oi, () => a(wr), (re) => _(wr, re)), J(l, f);
|
|
3643
|
+
}, Ul = (l) => {
|
|
3644
|
+
var f = mf(), v = E(f), y = S(E(v), 2);
|
|
3645
|
+
ft(y), x(v);
|
|
3646
|
+
var A = S(v, 2), z = E(A), ne = S(E(z), 2);
|
|
3647
|
+
ft(ne), x(z);
|
|
3648
|
+
var se = S(z, 2), ee = S(E(se), 2), pe = E(ee);
|
|
3649
|
+
pe.value = pe.__value = "";
|
|
3650
|
+
var D = S(pe);
|
|
3651
|
+
D.value = D.__value = "male";
|
|
3652
|
+
var U = S(D);
|
|
3653
|
+
U.value = U.__value = "female";
|
|
3654
|
+
var fe = S(U);
|
|
3655
|
+
fe.value = fe.__value = "neutral", x(ee), x(se);
|
|
3656
|
+
var K = S(se, 2), te = S(E(K), 2), Z = E(te);
|
|
3657
|
+
Z.value = Z.__value = "wavenet";
|
|
3658
|
+
var ae = S(Z);
|
|
3659
|
+
ae.value = ae.__value = "studio";
|
|
3660
|
+
var Te = S(ae);
|
|
3661
|
+
Te.value = Te.__value = "standard", x(te), x(K), x(A);
|
|
3662
|
+
var bt = S(A, 2), De = E(bt), Rt = S(E(De), 2), Er = E(Rt);
|
|
3663
|
+
Er.value = Er.__value = "";
|
|
3664
|
+
var nn = S(Er);
|
|
3665
|
+
Rr(nn, 17, () => a(it).voices, Cr, (le, Le) => {
|
|
3666
|
+
var at = gf(), Tr = E(at);
|
|
3667
|
+
x(at);
|
|
3668
|
+
var Ar = {};
|
|
3669
|
+
he(() => {
|
|
3670
|
+
oe(Tr, `${(a(Le).name || a(Le).id) ?? ""} (${(a(Le).languageCode || "n/a") ?? ""})`), Ar !== (Ar = a(Le).id || a(Le).name || "") && (at.value = (at.__value = a(Le).id || a(Le).name || "") ?? "");
|
|
3671
|
+
}), J(le, at);
|
|
3672
|
+
}), x(Rt), x(De);
|
|
3673
|
+
var nr = S(De, 2), ir = S(E(nr), 2);
|
|
3674
|
+
ft(ir);
|
|
3675
|
+
var sn = S(ir, 2), an = E(sn);
|
|
3676
|
+
x(sn), x(nr), x(bt), x(f), he((le) => {
|
|
3677
|
+
f.disabled = !a(it).available, oe(an, `${le ?? ""}x`);
|
|
3678
|
+
}, [() => Number(a(er)).toFixed(2)]), ot(y, () => a(At), (le) => _(At, le)), _e("change", ne, Yn), ot(ne, () => a(gt), (le) => _(gt, le)), _e("change", ee, Yn), He(ee, () => a(Mt), (le) => _(Mt, le)), _e("change", te, Yn), He(te, () => a(Pt), (le) => _(Pt, le)), He(Rt, () => a(nt), (le) => _(nt, le)), ot(ir, () => a(er), (le) => _(er, le)), J(l, f);
|
|
3679
|
+
}, Bl = (l) => {
|
|
3680
|
+
var f = wf(), v = E(f), y = E(v), A = E(y, !0);
|
|
3681
|
+
x(y);
|
|
3682
|
+
var z = S(y, 2), ne = (D) => {
|
|
3683
|
+
var U = yf(), fe = E(U, !0);
|
|
3684
|
+
x(U), he(() => oe(fe, a(Ee).description)), J(D, U);
|
|
3685
|
+
};
|
|
3686
|
+
Ge(z, (D) => {
|
|
3687
|
+
a(Ee).description && D(ne);
|
|
3688
|
+
}), x(v);
|
|
3689
|
+
var se = S(v, 2), ee = (D) => {
|
|
3690
|
+
var U = wu(), fe = nu(U);
|
|
3691
|
+
Bu(fe, () => a(Ee).tagName, !1, (K, te) => {
|
|
3692
|
+
nf(K, (ae) => _(Vn, ae, !0), () => a(Vn));
|
|
3693
|
+
var Z = (ae) => hl(a(Ee).id, ae);
|
|
3694
|
+
tf(K, (ae) => ({
|
|
3695
|
+
class: "pie-tts-custom-provider-element",
|
|
3696
|
+
...ae,
|
|
3697
|
+
onchange: Z
|
|
3698
|
+
}), [() => gl(a(Ee))], void 0, void 0, "svelte-3sm1sy");
|
|
3699
|
+
}), J(D, U);
|
|
3700
|
+
}, pe = (D) => {
|
|
3701
|
+
var U = bf();
|
|
3702
|
+
J(D, U);
|
|
3703
|
+
};
|
|
3704
|
+
Ge(se, (D) => {
|
|
3705
|
+
a(Ee).mode === "component" ? D(ee) : D(pe, -1);
|
|
3706
|
+
}), x(f), he((D) => {
|
|
3707
|
+
f.disabled = D, oe(A, a(Ee).label);
|
|
3708
|
+
}, [() => !Ne().available]), J(l, f);
|
|
3709
|
+
};
|
|
3710
|
+
Ge(fs, (l) => {
|
|
3711
|
+
a(h) === "browser" ? l(Fl) : a(h) === "polly" ? l(ql, 1) : a(h) === "google" ? l(Ul, 2) : a(Ee) && l(Bl, 3);
|
|
3712
|
+
});
|
|
3713
|
+
var Zn = S(fs, 2), Qn = E(Zn), cs = S(E(Qn), 2), ei = E(cs);
|
|
3714
|
+
let ds;
|
|
3715
|
+
var vs = S(ei, 2);
|
|
3716
|
+
let ps;
|
|
3717
|
+
x(cs), x(Qn);
|
|
3718
|
+
var ti = S(Qn, 4);
|
|
3719
|
+
su(ti);
|
|
3720
|
+
var ri = S(ti, 2), hs = E(ri), _s = S(hs, 2), zl = E(_s), Dl = (l) => {
|
|
3721
|
+
var f = di("SSML is unsupported in Browser preview.");
|
|
3722
|
+
J(l, f);
|
|
3723
|
+
}, Gl = (l) => {
|
|
3724
|
+
var f = di("SSML preserved. Tracking disabled.");
|
|
3725
|
+
J(l, f);
|
|
3726
|
+
}, Hl = (l) => {
|
|
3727
|
+
var f = di("Tracking enabled while preview plays.");
|
|
3728
|
+
J(l, f);
|
|
3729
|
+
};
|
|
3730
|
+
Ge(zl, (l) => {
|
|
3731
|
+
a(h) === "browser" && a($) === "ssml" ? l(Dl) : a(h) === "google" && a($) === "ssml" ? l(Gl, 1) : l(Hl, -1);
|
|
3732
|
+
}), x(_s), x(ri);
|
|
3733
|
+
var gs = S(ri, 2);
|
|
3734
|
+
Rr(gs, 21, () => Al(a(P)), Cr, (l, f) => {
|
|
3735
|
+
var v = kf();
|
|
3736
|
+
let y;
|
|
3737
|
+
var A = E(v, !0);
|
|
3738
|
+
x(v), he(() => {
|
|
3739
|
+
y = ur(v, 1, "svelte-3sm1sy", null, y, { "pie-tts-preview-active": a(f).active }), oe(A, a(f).text);
|
|
3740
|
+
}), J(l, v);
|
|
3741
|
+
}), x(gs), x(Zn);
|
|
3742
|
+
var ms = S(Zn, 2), Yl = (l) => {
|
|
3743
|
+
var f = $f(), v = E(f), y = E(v, !0);
|
|
3744
|
+
x(v), x(f), he(() => oe(y, a(m))), J(l, f);
|
|
3745
|
+
};
|
|
3746
|
+
Ge(ms, (l) => {
|
|
3747
|
+
a(m) && l(Yl);
|
|
3748
|
+
});
|
|
3749
|
+
var ys = S(ms, 2), Kl = (l) => {
|
|
3750
|
+
var f = Sf(), v = E(f), y = E(v, !0);
|
|
3751
|
+
x(v), x(f), he(() => oe(y, a(p))), J(l, f);
|
|
3752
|
+
};
|
|
3753
|
+
Ge(ys, (l) => {
|
|
3754
|
+
a(p) && l(Kl);
|
|
3755
|
+
});
|
|
3756
|
+
var bs = S(ys, 2), Jl = (l) => {
|
|
3757
|
+
var f = xf(), v = E(f), y = E(v, !0);
|
|
3758
|
+
x(v), x(f), he(() => oe(y, a(T))), J(l, f);
|
|
3759
|
+
};
|
|
3760
|
+
Ge(bs, (l) => {
|
|
3761
|
+
a(T) && l(Jl);
|
|
3762
|
+
});
|
|
3763
|
+
var ws = S(bs, 2), Xl = (l) => {
|
|
3764
|
+
var f = Ef(), v = E(f), y = E(v, !0);
|
|
3765
|
+
x(v), x(f), he(() => oe(y, a(N))), J(l, f);
|
|
3766
|
+
};
|
|
3767
|
+
Ge(ws, (l) => {
|
|
3768
|
+
a(N) && l(Xl);
|
|
3769
|
+
});
|
|
3770
|
+
var ks = S(ws, 2), $s = E(ks), xr = S($s, 2), Zl = E(xr, !0);
|
|
3771
|
+
x(xr);
|
|
3772
|
+
var rn = S(xr, 2), Ql = E(rn, !0);
|
|
3773
|
+
return x(rn), x(ks), x(ls), x(tn), he((l, f) => {
|
|
3774
|
+
ds = ur(ei, 1, "btn btn-xs join-item", null, ds, { "btn-active": a($) === "plain" }), ps = ur(vs, 1, "btn btn-xs join-item", null, ps, { "btn-active": a($) === "ssml" }), xr.disabled = l, oe(Zl, a(k) && a(b) === a(h) ? "Stop preview" : "Preview voice"), rn.disabled = f, oe(Ql, a(w) ? "Applying..." : "Apply");
|
|
3775
|
+
}, [() => !Ne().available || a(w) || !xl(), () => a(w) || !Ne().available]), _e("click", Rl, Fn), _e("click", Il, () => void Gn()), _e("click", ei, () => ns("plain")), _e("click", vs, () => ns("ssml")), ot(ti, () => a(P), (l) => _(P, l)), _e("click", hs, en), _e("click", $s, Fn), _e("click", xr, () => void ss()), _e("click", rn, () => void as()), J(e, tn), aa(Cl);
|
|
3776
|
+
}
|
|
3777
|
+
Ka(["click", "change"]);
|
|
3778
|
+
customElements.define("pie-section-player-tools-tts-settings", of(Mf, {
|
|
3779
|
+
toolkitCoordinator: {
|
|
3780
|
+
attribute: "toolkit-coordinator",
|
|
3781
|
+
type: "Object"
|
|
3782
|
+
},
|
|
3783
|
+
apiEndpoint: {
|
|
3784
|
+
attribute: "api-endpoint",
|
|
3785
|
+
type: "String"
|
|
3786
|
+
},
|
|
3787
|
+
storageKey: {
|
|
3788
|
+
attribute: "storage-key",
|
|
3789
|
+
type: "String"
|
|
3790
|
+
},
|
|
3791
|
+
adapters: {
|
|
3792
|
+
attribute: "adapters",
|
|
3793
|
+
type: "Object"
|
|
3794
|
+
},
|
|
3795
|
+
customProviders: {
|
|
3796
|
+
attribute: "custom-providers",
|
|
3797
|
+
type: "Object"
|
|
3798
|
+
}
|
|
3799
|
+
}, [], []));
|
|
3800
|
+
export {
|
|
3801
|
+
Mf as default
|
|
3802
|
+
};
|