@inpageedit/core 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +55 -55
  3. package/dist/ActionButton-BgbTKTg7.js +24 -0
  4. package/dist/ActionButton-BgbTKTg7.js.map +1 -0
  5. package/dist/InPageEdit.d.ts +8 -7
  6. package/dist/InputBox-FIzJ-rPN.js.map +1 -1
  7. package/dist/Preferences-Bg3J5Ur9.js.map +1 -1
  8. package/dist/{RadioBox-BZFhTEo5.js → RadioBox-CaA8VgLu.js} +16 -16
  9. package/dist/RadioBox-CaA8VgLu.js.map +1 -0
  10. package/dist/components/TwinSwapInput/index.d.ts +1 -0
  11. package/dist/components/index.js +21 -22
  12. package/dist/components/index.js.map +1 -1
  13. package/dist/{index-BPsDFq9U.js → index-Bh70Udzi.js} +14 -13
  14. package/dist/index-Bh70Udzi.js.map +1 -0
  15. package/dist/index-Bo1hNwWJ.js +96 -0
  16. package/dist/index-Bo1hNwWJ.js.map +1 -0
  17. package/dist/{index-Ch5DJDZZ.js → index-BxR7MsNM.js} +105 -102
  18. package/dist/index-BxR7MsNM.js.map +1 -0
  19. package/dist/{index-BsYzf3Yw.js → index-CUXLgVhg.js} +11 -11
  20. package/dist/index-CUXLgVhg.js.map +1 -0
  21. package/dist/index-CvhkVj_L.js.map +1 -1
  22. package/dist/{index-BByzm2Fz.js → index-D3yG7jFv.js} +119 -111
  23. package/dist/{index-BByzm2Fz.js.map → index-D3yG7jFv.js.map} +1 -1
  24. package/dist/{index-D-zQLFuZ.js → index-K73DMVec.js} +13 -20
  25. package/dist/index-K73DMVec.js.map +1 -0
  26. package/dist/index-jKU6cYcH.js +165 -0
  27. package/dist/index-jKU6cYcH.js.map +1 -0
  28. package/dist/{index-X1X416tZ.js → index-mMAGhnbR.js} +40 -24
  29. package/dist/index-mMAGhnbR.js.map +1 -0
  30. package/dist/index-z5MR2HJ2.js +4820 -0
  31. package/dist/index-z5MR2HJ2.js.map +1 -0
  32. package/dist/index.js +3008 -2546
  33. package/dist/index.js.map +1 -1
  34. package/dist/plugins/BasePlugin.d.ts +1 -1
  35. package/dist/plugins/_debug/index.d.ts +1 -1
  36. package/dist/plugins/quick-diff/PluginQuickDiffCore.d.ts +2 -1
  37. package/dist/plugins/quick-edit/index.d.ts +2 -1
  38. package/dist/plugins/quick-move/index.d.ts +1 -1
  39. package/dist/plugins/quick-preview/index.d.ts +4 -3
  40. package/dist/plugins/quick-redirect/index.d.ts +1 -1
  41. package/dist/plugins/toolbox/index.d.ts +2 -2
  42. package/dist/services/ModalService/IPEModal.d.ts +235 -0
  43. package/dist/services/ModalService/index.d.ts +35 -0
  44. package/dist/sleep-DpyIipK-.js.map +1 -1
  45. package/dist/style.css +1 -1
  46. package/dist/utils/interpolate.d.ts +20 -0
  47. package/dist/utils/interpolate.spec.d.ts +1 -0
  48. package/lib/index.umd.js +53 -26
  49. package/lib/index.umd.js.map +1 -1
  50. package/lib/style.css +1 -1
  51. package/package.json +8 -9
  52. package/dist/ActionButton-ByMKIthQ.js +0 -24
  53. package/dist/ActionButton-ByMKIthQ.js.map +0 -1
  54. package/dist/RadioBox-BZFhTEo5.js.map +0 -1
  55. package/dist/index-BPsDFq9U.js.map +0 -1
  56. package/dist/index-BTngTj1f.js +0 -4682
  57. package/dist/index-BTngTj1f.js.map +0 -1
  58. package/dist/index-BsYzf3Yw.js.map +0 -1
  59. package/dist/index-Ch5DJDZZ.js.map +0 -1
  60. package/dist/index-Cq9xxVsu.js +0 -149
  61. package/dist/index-Cq9xxVsu.js.map +0 -1
  62. package/dist/index-D-zQLFuZ.js.map +0 -1
  63. package/dist/index-HyxA2rYz.js +0 -87
  64. package/dist/index-HyxA2rYz.js.map +0 -1
  65. package/dist/index-X1X416tZ.js.map +0 -1
  66. package/dist/services/SsiModalService.d.ts +0 -36
  67. package/dist/utils/Logger.d.ts +0 -106
@@ -0,0 +1,4820 @@
1
+ import { j as rt, P as Ni, F as Ri } from "./index-CvhkVj_L.js";
2
+ import { BasePlugin as Di, Inject as Li } from "./index.js";
3
+ /**
4
+ * @vue/shared v3.5.21
5
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
6
+ * @license MIT
7
+ **/
8
+ // @__NO_SIDE_EFFECTS__
9
+ function Zs(e) {
10
+ const t = /* @__PURE__ */ Object.create(null);
11
+ for (const s of e.split(",")) t[s] = 1;
12
+ return (s) => s in t;
13
+ }
14
+ const j = {}, ct = [], $e = () => {
15
+ }, sr = () => !1, fs = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
16
+ (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Xs = (e) => e.startsWith("onUpdate:"), ee = Object.assign, Qs = (e, t) => {
17
+ const s = e.indexOf(t);
18
+ s > -1 && e.splice(s, 1);
19
+ }, ji = Object.prototype.hasOwnProperty, B = (e, t) => ji.call(e, t), M = Array.isArray, at = (e) => hs(e) === "[object Map]", nr = (e) => hs(e) === "[object Set]", F = (e) => typeof e == "function", Z = (e) => typeof e == "string", We = (e) => typeof e == "symbol", J = (e) => e !== null && typeof e == "object", rr = (e) => (J(e) || F(e)) && F(e.then) && F(e.catch), ir = Object.prototype.toString, hs = (e) => ir.call(e), Hi = (e) => hs(e).slice(8, -1), or = (e) => hs(e) === "[object Object]", en = (e) => Z(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Tt = /* @__PURE__ */ Zs(
20
+ // the leading comma is intentional so empty string "" is also included
21
+ ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
22
+ ), ds = (e) => {
23
+ const t = /* @__PURE__ */ Object.create(null);
24
+ return (s) => t[s] || (t[s] = e(s));
25
+ }, Ui = /-\w/g, De = ds(
26
+ (e) => e.replace(Ui, (t) => t.slice(1).toUpperCase())
27
+ ), Vi = /\B([A-Z])/g, qe = ds(
28
+ (e) => e.replace(Vi, "-$1").toLowerCase()
29
+ ), lr = ds((e) => e.charAt(0).toUpperCase() + e.slice(1)), $s = ds(
30
+ (e) => e ? `on${lr(e)}` : ""
31
+ ), ae = (e, t) => !Object.is(e, t), As = (e, ...t) => {
32
+ for (let s = 0; s < e.length; s++)
33
+ e[s](...t);
34
+ }, cr = (e, t, s, n = !1) => {
35
+ Object.defineProperty(e, t, {
36
+ configurable: !0,
37
+ enumerable: !1,
38
+ writable: n,
39
+ value: s
40
+ });
41
+ }, Bi = (e) => {
42
+ const t = parseFloat(e);
43
+ return isNaN(t) ? e : t;
44
+ };
45
+ let Tn;
46
+ const ps = () => Tn || (Tn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
47
+ function tn(e) {
48
+ if (M(e)) {
49
+ const t = {};
50
+ for (let s = 0; s < e.length; s++) {
51
+ const n = e[s], r = Z(n) ? qi(n) : tn(n);
52
+ if (r)
53
+ for (const i in r)
54
+ t[i] = r[i];
55
+ }
56
+ return t;
57
+ } else if (Z(e) || J(e))
58
+ return e;
59
+ }
60
+ const ki = /;(?![^(]*\))/g, Ki = /:([^]+)/, Wi = /\/\*[^]*?\*\//g;
61
+ function qi(e) {
62
+ const t = {};
63
+ return e.replace(Wi, "").split(ki).forEach((s) => {
64
+ if (s) {
65
+ const n = s.split(Ki);
66
+ n.length > 1 && (t[n[0].trim()] = n[1].trim());
67
+ }
68
+ }), t;
69
+ }
70
+ function ms(e) {
71
+ let t = "";
72
+ if (Z(e))
73
+ t = e;
74
+ else if (M(e))
75
+ for (let s = 0; s < e.length; s++) {
76
+ const n = ms(e[s]);
77
+ n && (t += n + " ");
78
+ }
79
+ else if (J(e))
80
+ for (const s in e)
81
+ e[s] && (t += s + " ");
82
+ return t.trim();
83
+ }
84
+ const zi = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", Ji = /* @__PURE__ */ Zs(zi);
85
+ function ar(e) {
86
+ return !!e || e === "";
87
+ }
88
+ const ur = (e) => !!(e && e.__v_isRef === !0), Zt = (e) => Z(e) ? e : e == null ? "" : M(e) || J(e) && (e.toString === ir || !F(e.toString)) ? ur(e) ? Zt(e.value) : JSON.stringify(e, fr, 2) : String(e), fr = (e, t) => ur(t) ? fr(e, t.value) : at(t) ? {
89
+ [`Map(${t.size})`]: [...t.entries()].reduce(
90
+ (s, [n, r], i) => (s[Is(n, i) + " =>"] = r, s),
91
+ {}
92
+ )
93
+ } : nr(t) ? {
94
+ [`Set(${t.size})`]: [...t.values()].map((s) => Is(s))
95
+ } : We(t) ? Is(t) : J(t) && !M(t) && !or(t) ? String(t) : t, Is = (e, t = "") => {
96
+ var s;
97
+ return (
98
+ // Symbol.description in es2019+ so we need to cast here to pass
99
+ // the lib: es2016 check
100
+ We(e) ? `Symbol(${(s = e.description) != null ? s : t})` : e
101
+ );
102
+ };
103
+ /**
104
+ * @vue/reactivity v3.5.21
105
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
106
+ * @license MIT
107
+ **/
108
+ let ce;
109
+ class Gi {
110
+ constructor(t = !1) {
111
+ this.detached = t, this._active = !0, this._on = 0, this.effects = [], this.cleanups = [], this._isPaused = !1, this.parent = ce, !t && ce && (this.index = (ce.scopes || (ce.scopes = [])).push(
112
+ this
113
+ ) - 1);
114
+ }
115
+ get active() {
116
+ return this._active;
117
+ }
118
+ pause() {
119
+ if (this._active) {
120
+ this._isPaused = !0;
121
+ let t, s;
122
+ if (this.scopes)
123
+ for (t = 0, s = this.scopes.length; t < s; t++)
124
+ this.scopes[t].pause();
125
+ for (t = 0, s = this.effects.length; t < s; t++)
126
+ this.effects[t].pause();
127
+ }
128
+ }
129
+ /**
130
+ * Resumes the effect scope, including all child scopes and effects.
131
+ */
132
+ resume() {
133
+ if (this._active && this._isPaused) {
134
+ this._isPaused = !1;
135
+ let t, s;
136
+ if (this.scopes)
137
+ for (t = 0, s = this.scopes.length; t < s; t++)
138
+ this.scopes[t].resume();
139
+ for (t = 0, s = this.effects.length; t < s; t++)
140
+ this.effects[t].resume();
141
+ }
142
+ }
143
+ run(t) {
144
+ if (this._active) {
145
+ const s = ce;
146
+ try {
147
+ return ce = this, t();
148
+ } finally {
149
+ ce = s;
150
+ }
151
+ }
152
+ }
153
+ /**
154
+ * This should only be called on non-detached scopes
155
+ * @internal
156
+ */
157
+ on() {
158
+ ++this._on === 1 && (this.prevScope = ce, ce = this);
159
+ }
160
+ /**
161
+ * This should only be called on non-detached scopes
162
+ * @internal
163
+ */
164
+ off() {
165
+ this._on > 0 && --this._on === 0 && (ce = this.prevScope, this.prevScope = void 0);
166
+ }
167
+ stop(t) {
168
+ if (this._active) {
169
+ this._active = !1;
170
+ let s, n;
171
+ for (s = 0, n = this.effects.length; s < n; s++)
172
+ this.effects[s].stop();
173
+ for (this.effects.length = 0, s = 0, n = this.cleanups.length; s < n; s++)
174
+ this.cleanups[s]();
175
+ if (this.cleanups.length = 0, this.scopes) {
176
+ for (s = 0, n = this.scopes.length; s < n; s++)
177
+ this.scopes[s].stop(!0);
178
+ this.scopes.length = 0;
179
+ }
180
+ if (!this.detached && this.parent && !t) {
181
+ const r = this.parent.scopes.pop();
182
+ r && r !== this && (this.parent.scopes[this.index] = r, r.index = this.index);
183
+ }
184
+ this.parent = void 0;
185
+ }
186
+ }
187
+ }
188
+ function Yi() {
189
+ return ce;
190
+ }
191
+ let q;
192
+ const Os = /* @__PURE__ */ new WeakSet();
193
+ class hr {
194
+ constructor(t) {
195
+ this.fn = t, this.deps = void 0, this.depsTail = void 0, this.flags = 5, this.next = void 0, this.cleanup = void 0, this.scheduler = void 0, ce && ce.active && ce.effects.push(this);
196
+ }
197
+ pause() {
198
+ this.flags |= 64;
199
+ }
200
+ resume() {
201
+ this.flags & 64 && (this.flags &= -65, Os.has(this) && (Os.delete(this), this.trigger()));
202
+ }
203
+ /**
204
+ * @internal
205
+ */
206
+ notify() {
207
+ this.flags & 2 && !(this.flags & 32) || this.flags & 8 || pr(this);
208
+ }
209
+ run() {
210
+ if (!(this.flags & 1))
211
+ return this.fn();
212
+ this.flags |= 2, $n(this), mr(this);
213
+ const t = q, s = _e;
214
+ q = this, _e = !0;
215
+ try {
216
+ return this.fn();
217
+ } finally {
218
+ gr(this), q = t, _e = s, this.flags &= -3;
219
+ }
220
+ }
221
+ stop() {
222
+ if (this.flags & 1) {
223
+ for (let t = this.deps; t; t = t.nextDep)
224
+ rn(t);
225
+ this.deps = this.depsTail = void 0, $n(this), this.onStop && this.onStop(), this.flags &= -2;
226
+ }
227
+ }
228
+ trigger() {
229
+ this.flags & 64 ? Os.add(this) : this.scheduler ? this.scheduler() : this.runIfDirty();
230
+ }
231
+ /**
232
+ * @internal
233
+ */
234
+ runIfDirty() {
235
+ js(this) && this.run();
236
+ }
237
+ get dirty() {
238
+ return js(this);
239
+ }
240
+ }
241
+ let dr = 0, $t, At;
242
+ function pr(e, t = !1) {
243
+ if (e.flags |= 8, t) {
244
+ e.next = At, At = e;
245
+ return;
246
+ }
247
+ e.next = $t, $t = e;
248
+ }
249
+ function sn() {
250
+ dr++;
251
+ }
252
+ function nn() {
253
+ if (--dr > 0)
254
+ return;
255
+ if (At) {
256
+ let t = At;
257
+ for (At = void 0; t; ) {
258
+ const s = t.next;
259
+ t.next = void 0, t.flags &= -9, t = s;
260
+ }
261
+ }
262
+ let e;
263
+ for (; $t; ) {
264
+ let t = $t;
265
+ for ($t = void 0; t; ) {
266
+ const s = t.next;
267
+ if (t.next = void 0, t.flags &= -9, t.flags & 1)
268
+ try {
269
+ t.trigger();
270
+ } catch (n) {
271
+ e || (e = n);
272
+ }
273
+ t = s;
274
+ }
275
+ }
276
+ if (e) throw e;
277
+ }
278
+ function mr(e) {
279
+ for (let t = e.deps; t; t = t.nextDep)
280
+ t.version = -1, t.prevActiveLink = t.dep.activeLink, t.dep.activeLink = t;
281
+ }
282
+ function gr(e) {
283
+ let t, s = e.depsTail, n = s;
284
+ for (; n; ) {
285
+ const r = n.prevDep;
286
+ n.version === -1 ? (n === s && (s = r), rn(n), Zi(n)) : t = n, n.dep.activeLink = n.prevActiveLink, n.prevActiveLink = void 0, n = r;
287
+ }
288
+ e.deps = t, e.depsTail = s;
289
+ }
290
+ function js(e) {
291
+ for (let t = e.deps; t; t = t.nextDep)
292
+ if (t.dep.version !== t.version || t.dep.computed && (_r(t.dep.computed) || t.dep.version !== t.version))
293
+ return !0;
294
+ return !!e._dirty;
295
+ }
296
+ function _r(e) {
297
+ if (e.flags & 4 && !(e.flags & 16) || (e.flags &= -17, e.globalVersion === Rt) || (e.globalVersion = Rt, !e.isSSR && e.flags & 128 && (!e.deps && !e._dirty || !js(e))))
298
+ return;
299
+ e.flags |= 2;
300
+ const t = e.dep, s = q, n = _e;
301
+ q = e, _e = !0;
302
+ try {
303
+ mr(e);
304
+ const r = e.fn(e._value);
305
+ (t.version === 0 || ae(r, e._value)) && (e.flags |= 128, e._value = r, t.version++);
306
+ } catch (r) {
307
+ throw t.version++, r;
308
+ } finally {
309
+ q = s, _e = n, gr(e), e.flags &= -3;
310
+ }
311
+ }
312
+ function rn(e, t = !1) {
313
+ const { dep: s, prevSub: n, nextSub: r } = e;
314
+ if (n && (n.nextSub = r, e.prevSub = void 0), r && (r.prevSub = n, e.nextSub = void 0), s.subs === e && (s.subs = n, !n && s.computed)) {
315
+ s.computed.flags &= -5;
316
+ for (let i = s.computed.deps; i; i = i.nextDep)
317
+ rn(i, !0);
318
+ }
319
+ !t && !--s.sc && s.map && s.map.delete(s.key);
320
+ }
321
+ function Zi(e) {
322
+ const { prevDep: t, nextDep: s } = e;
323
+ t && (t.nextDep = s, e.prevDep = void 0), s && (s.prevDep = t, e.nextDep = void 0);
324
+ }
325
+ let _e = !0;
326
+ const vr = [];
327
+ function Le() {
328
+ vr.push(_e), _e = !1;
329
+ }
330
+ function je() {
331
+ const e = vr.pop();
332
+ _e = e === void 0 ? !0 : e;
333
+ }
334
+ function $n(e) {
335
+ const { cleanup: t } = e;
336
+ if (e.cleanup = void 0, t) {
337
+ const s = q;
338
+ q = void 0;
339
+ try {
340
+ t();
341
+ } finally {
342
+ q = s;
343
+ }
344
+ }
345
+ }
346
+ let Rt = 0;
347
+ class Xi {
348
+ constructor(t, s) {
349
+ this.sub = t, this.dep = s, this.version = s.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
350
+ }
351
+ }
352
+ class gs {
353
+ // TODO isolatedDeclarations "__v_skip"
354
+ constructor(t) {
355
+ this.computed = t, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, this.__v_skip = !0;
356
+ }
357
+ track(t) {
358
+ if (!q || !_e || q === this.computed)
359
+ return;
360
+ let s = this.activeLink;
361
+ if (s === void 0 || s.sub !== q)
362
+ s = this.activeLink = new Xi(q, this), q.deps ? (s.prevDep = q.depsTail, q.depsTail.nextDep = s, q.depsTail = s) : q.deps = q.depsTail = s, br(s);
363
+ else if (s.version === -1 && (s.version = this.version, s.nextDep)) {
364
+ const n = s.nextDep;
365
+ n.prevDep = s.prevDep, s.prevDep && (s.prevDep.nextDep = n), s.prevDep = q.depsTail, s.nextDep = void 0, q.depsTail.nextDep = s, q.depsTail = s, q.deps === s && (q.deps = n);
366
+ }
367
+ return s;
368
+ }
369
+ trigger(t) {
370
+ this.version++, Rt++, this.notify(t);
371
+ }
372
+ notify(t) {
373
+ sn();
374
+ try {
375
+ for (let s = this.subs; s; s = s.prevSub)
376
+ s.sub.notify() && s.sub.dep.notify();
377
+ } finally {
378
+ nn();
379
+ }
380
+ }
381
+ }
382
+ function br(e) {
383
+ if (e.dep.sc++, e.sub.flags & 4) {
384
+ const t = e.dep.computed;
385
+ if (t && !e.dep.subs) {
386
+ t.flags |= 20;
387
+ for (let n = t.deps; n; n = n.nextDep)
388
+ br(n);
389
+ }
390
+ const s = e.dep.subs;
391
+ s !== e && (e.prevSub = s, s && (s.nextSub = e)), e.dep.subs = e;
392
+ }
393
+ }
394
+ const Hs = /* @__PURE__ */ new WeakMap(), et = Symbol(
395
+ ""
396
+ ), Us = Symbol(
397
+ ""
398
+ ), Dt = Symbol(
399
+ ""
400
+ );
401
+ function te(e, t, s) {
402
+ if (_e && q) {
403
+ let n = Hs.get(e);
404
+ n || Hs.set(e, n = /* @__PURE__ */ new Map());
405
+ let r = n.get(s);
406
+ r || (n.set(s, r = new gs()), r.map = n, r.key = s), r.track();
407
+ }
408
+ }
409
+ function Ne(e, t, s, n, r, i) {
410
+ const o = Hs.get(e);
411
+ if (!o) {
412
+ Rt++;
413
+ return;
414
+ }
415
+ const l = (c) => {
416
+ c && c.trigger();
417
+ };
418
+ if (sn(), t === "clear")
419
+ o.forEach(l);
420
+ else {
421
+ const c = M(e), h = c && en(s);
422
+ if (c && s === "length") {
423
+ const u = Number(n);
424
+ o.forEach((d, m) => {
425
+ (m === "length" || m === Dt || !We(m) && m >= u) && l(d);
426
+ });
427
+ } else
428
+ switch ((s !== void 0 || o.has(void 0)) && l(o.get(s)), h && l(o.get(Dt)), t) {
429
+ case "add":
430
+ c ? h && l(o.get("length")) : (l(o.get(et)), at(e) && l(o.get(Us)));
431
+ break;
432
+ case "delete":
433
+ c || (l(o.get(et)), at(e) && l(o.get(Us)));
434
+ break;
435
+ case "set":
436
+ at(e) && l(o.get(et));
437
+ break;
438
+ }
439
+ }
440
+ nn();
441
+ }
442
+ function it(e) {
443
+ const t = H(e);
444
+ return t === e ? t : (te(t, "iterate", Dt), pe(e) ? t : t.map(X));
445
+ }
446
+ function _s(e) {
447
+ return te(e = H(e), "iterate", Dt), e;
448
+ }
449
+ const Qi = {
450
+ __proto__: null,
451
+ [Symbol.iterator]() {
452
+ return Ps(this, Symbol.iterator, X);
453
+ },
454
+ concat(...e) {
455
+ return it(this).concat(
456
+ ...e.map((t) => M(t) ? it(t) : t)
457
+ );
458
+ },
459
+ entries() {
460
+ return Ps(this, "entries", (e) => (e[1] = X(e[1]), e));
461
+ },
462
+ every(e, t) {
463
+ return Pe(this, "every", e, t, void 0, arguments);
464
+ },
465
+ filter(e, t) {
466
+ return Pe(this, "filter", e, t, (s) => s.map(X), arguments);
467
+ },
468
+ find(e, t) {
469
+ return Pe(this, "find", e, t, X, arguments);
470
+ },
471
+ findIndex(e, t) {
472
+ return Pe(this, "findIndex", e, t, void 0, arguments);
473
+ },
474
+ findLast(e, t) {
475
+ return Pe(this, "findLast", e, t, X, arguments);
476
+ },
477
+ findLastIndex(e, t) {
478
+ return Pe(this, "findLastIndex", e, t, void 0, arguments);
479
+ },
480
+ // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
481
+ forEach(e, t) {
482
+ return Pe(this, "forEach", e, t, void 0, arguments);
483
+ },
484
+ includes(...e) {
485
+ return Ms(this, "includes", e);
486
+ },
487
+ indexOf(...e) {
488
+ return Ms(this, "indexOf", e);
489
+ },
490
+ join(e) {
491
+ return it(this).join(e);
492
+ },
493
+ // keys() iterator only reads `length`, no optimization required
494
+ lastIndexOf(...e) {
495
+ return Ms(this, "lastIndexOf", e);
496
+ },
497
+ map(e, t) {
498
+ return Pe(this, "map", e, t, void 0, arguments);
499
+ },
500
+ pop() {
501
+ return yt(this, "pop");
502
+ },
503
+ push(...e) {
504
+ return yt(this, "push", e);
505
+ },
506
+ reduce(e, ...t) {
507
+ return An(this, "reduce", e, t);
508
+ },
509
+ reduceRight(e, ...t) {
510
+ return An(this, "reduceRight", e, t);
511
+ },
512
+ shift() {
513
+ return yt(this, "shift");
514
+ },
515
+ // slice could use ARRAY_ITERATE but also seems to beg for range tracking
516
+ some(e, t) {
517
+ return Pe(this, "some", e, t, void 0, arguments);
518
+ },
519
+ splice(...e) {
520
+ return yt(this, "splice", e);
521
+ },
522
+ toReversed() {
523
+ return it(this).toReversed();
524
+ },
525
+ toSorted(e) {
526
+ return it(this).toSorted(e);
527
+ },
528
+ toSpliced(...e) {
529
+ return it(this).toSpliced(...e);
530
+ },
531
+ unshift(...e) {
532
+ return yt(this, "unshift", e);
533
+ },
534
+ values() {
535
+ return Ps(this, "values", X);
536
+ }
537
+ };
538
+ function Ps(e, t, s) {
539
+ const n = _s(e), r = n[t]();
540
+ return n !== e && !pe(e) && (r._next = r.next, r.next = () => {
541
+ const i = r._next();
542
+ return i.value && (i.value = s(i.value)), i;
543
+ }), r;
544
+ }
545
+ const eo = Array.prototype;
546
+ function Pe(e, t, s, n, r, i) {
547
+ const o = _s(e), l = o !== e && !pe(e), c = o[t];
548
+ if (c !== eo[t]) {
549
+ const d = c.apply(e, i);
550
+ return l ? X(d) : d;
551
+ }
552
+ let h = s;
553
+ o !== e && (l ? h = function(d, m) {
554
+ return s.call(this, X(d), m, e);
555
+ } : s.length > 2 && (h = function(d, m) {
556
+ return s.call(this, d, m, e);
557
+ }));
558
+ const u = c.call(o, h, n);
559
+ return l && r ? r(u) : u;
560
+ }
561
+ function An(e, t, s, n) {
562
+ const r = _s(e);
563
+ let i = s;
564
+ return r !== e && (pe(e) ? s.length > 3 && (i = function(o, l, c) {
565
+ return s.call(this, o, l, c, e);
566
+ }) : i = function(o, l, c) {
567
+ return s.call(this, o, X(l), c, e);
568
+ }), r[t](i, ...n);
569
+ }
570
+ function Ms(e, t, s) {
571
+ const n = H(e);
572
+ te(n, "iterate", Dt);
573
+ const r = n[t](...s);
574
+ return (r === -1 || r === !1) && an(s[0]) ? (s[0] = H(s[0]), n[t](...s)) : r;
575
+ }
576
+ function yt(e, t, s = []) {
577
+ Le(), sn();
578
+ const n = H(e)[t].apply(e, s);
579
+ return nn(), je(), n;
580
+ }
581
+ const to = /* @__PURE__ */ Zs("__proto__,__v_isRef,__isVue"), yr = new Set(
582
+ /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(We)
583
+ );
584
+ function so(e) {
585
+ We(e) || (e = String(e));
586
+ const t = H(this);
587
+ return te(t, "has", e), t.hasOwnProperty(e);
588
+ }
589
+ class xr {
590
+ constructor(t = !1, s = !1) {
591
+ this._isReadonly = t, this._isShallow = s;
592
+ }
593
+ get(t, s, n) {
594
+ if (s === "__v_skip") return t.__v_skip;
595
+ const r = this._isReadonly, i = this._isShallow;
596
+ if (s === "__v_isReactive")
597
+ return !r;
598
+ if (s === "__v_isReadonly")
599
+ return r;
600
+ if (s === "__v_isShallow")
601
+ return i;
602
+ if (s === "__v_raw")
603
+ return n === (r ? i ? ho : Er : i ? wr : Sr).get(t) || // receiver is not the reactive proxy, but has the same prototype
604
+ // this means the receiver is a user proxy of the reactive proxy
605
+ Object.getPrototypeOf(t) === Object.getPrototypeOf(n) ? t : void 0;
606
+ const o = M(t);
607
+ if (!r) {
608
+ let c;
609
+ if (o && (c = Qi[s]))
610
+ return c;
611
+ if (s === "hasOwnProperty")
612
+ return so;
613
+ }
614
+ const l = Reflect.get(
615
+ t,
616
+ s,
617
+ // if this is a proxy wrapping a ref, return methods using the raw ref
618
+ // as receiver so that we don't have to call `toRaw` on the ref in all
619
+ // its class methods
620
+ Q(t) ? t : n
621
+ );
622
+ return (We(s) ? yr.has(s) : to(s)) || (r || te(t, "get", s), i) ? l : Q(l) ? o && en(s) ? l : l.value : J(l) ? r ? Tr(l) : ln(l) : l;
623
+ }
624
+ }
625
+ class Cr extends xr {
626
+ constructor(t = !1) {
627
+ super(!1, t);
628
+ }
629
+ set(t, s, n, r) {
630
+ let i = t[s];
631
+ if (!this._isShallow) {
632
+ const c = ke(i);
633
+ if (!pe(n) && !ke(n) && (i = H(i), n = H(n)), !M(t) && Q(i) && !Q(n))
634
+ return c || (i.value = n), !0;
635
+ }
636
+ const o = M(t) && en(s) ? Number(s) < t.length : B(t, s), l = Reflect.set(
637
+ t,
638
+ s,
639
+ n,
640
+ Q(t) ? t : r
641
+ );
642
+ return t === H(r) && (o ? ae(n, i) && Ne(t, "set", s, n) : Ne(t, "add", s, n)), l;
643
+ }
644
+ deleteProperty(t, s) {
645
+ const n = B(t, s);
646
+ t[s];
647
+ const r = Reflect.deleteProperty(t, s);
648
+ return r && n && Ne(t, "delete", s, void 0), r;
649
+ }
650
+ has(t, s) {
651
+ const n = Reflect.has(t, s);
652
+ return (!We(s) || !yr.has(s)) && te(t, "has", s), n;
653
+ }
654
+ ownKeys(t) {
655
+ return te(
656
+ t,
657
+ "iterate",
658
+ M(t) ? "length" : et
659
+ ), Reflect.ownKeys(t);
660
+ }
661
+ }
662
+ class no extends xr {
663
+ constructor(t = !1) {
664
+ super(!0, t);
665
+ }
666
+ set(t, s) {
667
+ return !0;
668
+ }
669
+ deleteProperty(t, s) {
670
+ return !0;
671
+ }
672
+ }
673
+ const ro = /* @__PURE__ */ new Cr(), io = /* @__PURE__ */ new no(), oo = /* @__PURE__ */ new Cr(!0);
674
+ const Vs = (e) => e, qt = (e) => Reflect.getPrototypeOf(e);
675
+ function lo(e, t, s) {
676
+ return function(...n) {
677
+ const r = this.__v_raw, i = H(r), o = at(i), l = e === "entries" || e === Symbol.iterator && o, c = e === "keys" && o, h = r[e](...n), u = s ? Vs : t ? ts : X;
678
+ return !t && te(
679
+ i,
680
+ "iterate",
681
+ c ? Us : et
682
+ ), {
683
+ // iterator protocol
684
+ next() {
685
+ const { value: d, done: m } = h.next();
686
+ return m ? { value: d, done: m } : {
687
+ value: l ? [u(d[0]), u(d[1])] : u(d),
688
+ done: m
689
+ };
690
+ },
691
+ // iterable protocol
692
+ [Symbol.iterator]() {
693
+ return this;
694
+ }
695
+ };
696
+ };
697
+ }
698
+ function zt(e) {
699
+ return function(...t) {
700
+ return e === "delete" ? !1 : e === "clear" ? void 0 : this;
701
+ };
702
+ }
703
+ function co(e, t) {
704
+ const s = {
705
+ get(r) {
706
+ const i = this.__v_raw, o = H(i), l = H(r);
707
+ e || (ae(r, l) && te(o, "get", r), te(o, "get", l));
708
+ const { has: c } = qt(o), h = t ? Vs : e ? ts : X;
709
+ if (c.call(o, r))
710
+ return h(i.get(r));
711
+ if (c.call(o, l))
712
+ return h(i.get(l));
713
+ i !== o && i.get(r);
714
+ },
715
+ get size() {
716
+ const r = this.__v_raw;
717
+ return !e && te(H(r), "iterate", et), r.size;
718
+ },
719
+ has(r) {
720
+ const i = this.__v_raw, o = H(i), l = H(r);
721
+ return e || (ae(r, l) && te(o, "has", r), te(o, "has", l)), r === l ? i.has(r) : i.has(r) || i.has(l);
722
+ },
723
+ forEach(r, i) {
724
+ const o = this, l = o.__v_raw, c = H(l), h = t ? Vs : e ? ts : X;
725
+ return !e && te(c, "iterate", et), l.forEach((u, d) => r.call(i, h(u), h(d), o));
726
+ }
727
+ };
728
+ return ee(
729
+ s,
730
+ e ? {
731
+ add: zt("add"),
732
+ set: zt("set"),
733
+ delete: zt("delete"),
734
+ clear: zt("clear")
735
+ } : {
736
+ add(r) {
737
+ !t && !pe(r) && !ke(r) && (r = H(r));
738
+ const i = H(this);
739
+ return qt(i).has.call(i, r) || (i.add(r), Ne(i, "add", r, r)), this;
740
+ },
741
+ set(r, i) {
742
+ !t && !pe(i) && !ke(i) && (i = H(i));
743
+ const o = H(this), { has: l, get: c } = qt(o);
744
+ let h = l.call(o, r);
745
+ h || (r = H(r), h = l.call(o, r));
746
+ const u = c.call(o, r);
747
+ return o.set(r, i), h ? ae(i, u) && Ne(o, "set", r, i) : Ne(o, "add", r, i), this;
748
+ },
749
+ delete(r) {
750
+ const i = H(this), { has: o, get: l } = qt(i);
751
+ let c = o.call(i, r);
752
+ c || (r = H(r), c = o.call(i, r)), l && l.call(i, r);
753
+ const h = i.delete(r);
754
+ return c && Ne(i, "delete", r, void 0), h;
755
+ },
756
+ clear() {
757
+ const r = H(this), i = r.size !== 0, o = r.clear();
758
+ return i && Ne(
759
+ r,
760
+ "clear",
761
+ void 0,
762
+ void 0
763
+ ), o;
764
+ }
765
+ }
766
+ ), [
767
+ "keys",
768
+ "values",
769
+ "entries",
770
+ Symbol.iterator
771
+ ].forEach((r) => {
772
+ s[r] = lo(r, e, t);
773
+ }), s;
774
+ }
775
+ function on(e, t) {
776
+ const s = co(e, t);
777
+ return (n, r, i) => r === "__v_isReactive" ? !e : r === "__v_isReadonly" ? e : r === "__v_raw" ? n : Reflect.get(
778
+ B(s, r) && r in n ? s : n,
779
+ r,
780
+ i
781
+ );
782
+ }
783
+ const ao = {
784
+ get: /* @__PURE__ */ on(!1, !1)
785
+ }, uo = {
786
+ get: /* @__PURE__ */ on(!1, !0)
787
+ }, fo = {
788
+ get: /* @__PURE__ */ on(!0, !1)
789
+ };
790
+ const Sr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), ho = /* @__PURE__ */ new WeakMap();
791
+ function po(e) {
792
+ switch (e) {
793
+ case "Object":
794
+ case "Array":
795
+ return 1;
796
+ case "Map":
797
+ case "Set":
798
+ case "WeakMap":
799
+ case "WeakSet":
800
+ return 2;
801
+ default:
802
+ return 0;
803
+ }
804
+ }
805
+ function mo(e) {
806
+ return e.__v_skip || !Object.isExtensible(e) ? 0 : po(Hi(e));
807
+ }
808
+ function ln(e) {
809
+ return ke(e) ? e : cn(
810
+ e,
811
+ !1,
812
+ ro,
813
+ ao,
814
+ Sr
815
+ );
816
+ }
817
+ function go(e) {
818
+ return cn(
819
+ e,
820
+ !1,
821
+ oo,
822
+ uo,
823
+ wr
824
+ );
825
+ }
826
+ function Tr(e) {
827
+ return cn(
828
+ e,
829
+ !0,
830
+ io,
831
+ fo,
832
+ Er
833
+ );
834
+ }
835
+ function cn(e, t, s, n, r) {
836
+ if (!J(e) || e.__v_raw && !(t && e.__v_isReactive))
837
+ return e;
838
+ const i = mo(e);
839
+ if (i === 0)
840
+ return e;
841
+ const o = r.get(e);
842
+ if (o)
843
+ return o;
844
+ const l = new Proxy(
845
+ e,
846
+ i === 2 ? n : s
847
+ );
848
+ return r.set(e, l), l;
849
+ }
850
+ function ut(e) {
851
+ return ke(e) ? ut(e.__v_raw) : !!(e && e.__v_isReactive);
852
+ }
853
+ function ke(e) {
854
+ return !!(e && e.__v_isReadonly);
855
+ }
856
+ function pe(e) {
857
+ return !!(e && e.__v_isShallow);
858
+ }
859
+ function an(e) {
860
+ return e ? !!e.__v_raw : !1;
861
+ }
862
+ function H(e) {
863
+ const t = e && e.__v_raw;
864
+ return t ? H(t) : e;
865
+ }
866
+ function _o(e) {
867
+ return !B(e, "__v_skip") && Object.isExtensible(e) && cr(e, "__v_skip", !0), e;
868
+ }
869
+ const X = (e) => J(e) ? ln(e) : e, ts = (e) => J(e) ? Tr(e) : e;
870
+ function Q(e) {
871
+ return e ? e.__v_isRef === !0 : !1;
872
+ }
873
+ function Jt(e) {
874
+ return $r(e, !1);
875
+ }
876
+ function vo(e) {
877
+ return $r(e, !0);
878
+ }
879
+ function $r(e, t) {
880
+ return Q(e) ? e : new bo(e, t);
881
+ }
882
+ class bo {
883
+ constructor(t, s) {
884
+ this.dep = new gs(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = s ? t : H(t), this._value = s ? t : X(t), this.__v_isShallow = s;
885
+ }
886
+ get value() {
887
+ return this.dep.track(), this._value;
888
+ }
889
+ set value(t) {
890
+ const s = this._rawValue, n = this.__v_isShallow || pe(t) || ke(t);
891
+ t = n ? t : H(t), ae(t, s) && (this._rawValue = t, this._value = n ? t : X(t), this.dep.trigger());
892
+ }
893
+ }
894
+ function Ar(e) {
895
+ return Q(e) ? e.value : e;
896
+ }
897
+ const yo = {
898
+ get: (e, t, s) => t === "__v_raw" ? e : Ar(Reflect.get(e, t, s)),
899
+ set: (e, t, s, n) => {
900
+ const r = e[t];
901
+ return Q(r) && !Q(s) ? (r.value = s, !0) : Reflect.set(e, t, s, n);
902
+ }
903
+ };
904
+ function Ir(e) {
905
+ return ut(e) ? e : new Proxy(e, yo);
906
+ }
907
+ class xo {
908
+ constructor(t) {
909
+ this.__v_isRef = !0, this._value = void 0;
910
+ const s = this.dep = new gs(), { get: n, set: r } = t(s.track.bind(s), s.trigger.bind(s));
911
+ this._get = n, this._set = r;
912
+ }
913
+ get value() {
914
+ return this._value = this._get();
915
+ }
916
+ set value(t) {
917
+ this._set(t);
918
+ }
919
+ }
920
+ function Co(e) {
921
+ return new xo(e);
922
+ }
923
+ class So {
924
+ constructor(t, s, n) {
925
+ this.fn = t, this.setter = s, this._value = void 0, this.dep = new gs(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = Rt - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !s, this.isSSR = n;
926
+ }
927
+ /**
928
+ * @internal
929
+ */
930
+ notify() {
931
+ if (this.flags |= 16, !(this.flags & 8) && // avoid infinite self recursion
932
+ q !== this)
933
+ return pr(this, !0), !0;
934
+ }
935
+ get value() {
936
+ const t = this.dep.track();
937
+ return _r(this), t && (t.version = this.dep.version), this._value;
938
+ }
939
+ set value(t) {
940
+ this.setter && this.setter(t);
941
+ }
942
+ }
943
+ function wo(e, t, s = !1) {
944
+ let n, r;
945
+ return F(e) ? n = e : (n = e.get, r = e.set), new So(n, r, s);
946
+ }
947
+ const Gt = {}, ss = /* @__PURE__ */ new WeakMap();
948
+ let Xe;
949
+ function Eo(e, t = !1, s = Xe) {
950
+ if (s) {
951
+ let n = ss.get(s);
952
+ n || ss.set(s, n = []), n.push(e);
953
+ }
954
+ }
955
+ function To(e, t, s = j) {
956
+ const { immediate: n, deep: r, once: i, scheduler: o, augmentJob: l, call: c } = s, h = (T) => r ? T : pe(T) || r === !1 || r === 0 ? Re(T, 1) : Re(T);
957
+ let u, d, m, v, C = !1, $ = !1;
958
+ if (Q(e) ? (d = () => e.value, C = pe(e)) : ut(e) ? (d = () => h(e), C = !0) : M(e) ? ($ = !0, C = e.some((T) => ut(T) || pe(T)), d = () => e.map((T) => {
959
+ if (Q(T))
960
+ return T.value;
961
+ if (ut(T))
962
+ return h(T);
963
+ if (F(T))
964
+ return c ? c(T, 2) : T();
965
+ })) : F(e) ? t ? d = c ? () => c(e, 2) : e : d = () => {
966
+ if (m) {
967
+ Le();
968
+ try {
969
+ m();
970
+ } finally {
971
+ je();
972
+ }
973
+ }
974
+ const T = Xe;
975
+ Xe = u;
976
+ try {
977
+ return c ? c(e, 3, [v]) : e(v);
978
+ } finally {
979
+ Xe = T;
980
+ }
981
+ } : d = $e, t && r) {
982
+ const T = d, N = r === !0 ? 1 / 0 : r;
983
+ d = () => Re(T(), N);
984
+ }
985
+ const U = Yi(), O = () => {
986
+ u.stop(), U && U.active && Qs(U.effects, u);
987
+ };
988
+ if (i && t) {
989
+ const T = t;
990
+ t = (...N) => {
991
+ T(...N), O();
992
+ };
993
+ }
994
+ let R = $ ? new Array(e.length).fill(Gt) : Gt;
995
+ const D = (T) => {
996
+ if (!(!(u.flags & 1) || !u.dirty && !T))
997
+ if (t) {
998
+ const N = u.run();
999
+ if (r || C || ($ ? N.some((V, Y) => ae(V, R[Y])) : ae(N, R))) {
1000
+ m && m();
1001
+ const V = Xe;
1002
+ Xe = u;
1003
+ try {
1004
+ const Y = [
1005
+ N,
1006
+ // pass undefined as the old value when it's changed for the first time
1007
+ R === Gt ? void 0 : $ && R[0] === Gt ? [] : R,
1008
+ v
1009
+ ];
1010
+ R = N, c ? c(t, 3, Y) : (
1011
+ // @ts-expect-error
1012
+ t(...Y)
1013
+ );
1014
+ } finally {
1015
+ Xe = V;
1016
+ }
1017
+ }
1018
+ } else
1019
+ u.run();
1020
+ };
1021
+ return l && l(D), u = new hr(d), u.scheduler = o ? () => o(D, !1) : D, v = (T) => Eo(T, !1, u), m = u.onStop = () => {
1022
+ const T = ss.get(u);
1023
+ if (T) {
1024
+ if (c)
1025
+ c(T, 4);
1026
+ else
1027
+ for (const N of T) N();
1028
+ ss.delete(u);
1029
+ }
1030
+ }, t ? n ? D(!0) : R = u.run() : o ? o(D.bind(null, !0), !0) : u.run(), O.pause = u.pause.bind(u), O.resume = u.resume.bind(u), O.stop = O, O;
1031
+ }
1032
+ function Re(e, t = 1 / 0, s) {
1033
+ if (t <= 0 || !J(e) || e.__v_skip || (s = s || /* @__PURE__ */ new Map(), (s.get(e) || 0) >= t))
1034
+ return e;
1035
+ if (s.set(e, t), t--, Q(e))
1036
+ Re(e.value, t, s);
1037
+ else if (M(e))
1038
+ for (let n = 0; n < e.length; n++)
1039
+ Re(e[n], t, s);
1040
+ else if (nr(e) || at(e))
1041
+ e.forEach((n) => {
1042
+ Re(n, t, s);
1043
+ });
1044
+ else if (or(e)) {
1045
+ for (const n in e)
1046
+ Re(e[n], t, s);
1047
+ for (const n of Object.getOwnPropertySymbols(e))
1048
+ Object.prototype.propertyIsEnumerable.call(e, n) && Re(e[n], t, s);
1049
+ }
1050
+ return e;
1051
+ }
1052
+ /**
1053
+ * @vue/runtime-core v3.5.21
1054
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
1055
+ * @license MIT
1056
+ **/
1057
+ function Ut(e, t, s, n) {
1058
+ try {
1059
+ return n ? e(...n) : e();
1060
+ } catch (r) {
1061
+ vs(r, t, s);
1062
+ }
1063
+ }
1064
+ function Ae(e, t, s, n) {
1065
+ if (F(e)) {
1066
+ const r = Ut(e, t, s, n);
1067
+ return r && rr(r) && r.catch((i) => {
1068
+ vs(i, t, s);
1069
+ }), r;
1070
+ }
1071
+ if (M(e)) {
1072
+ const r = [];
1073
+ for (let i = 0; i < e.length; i++)
1074
+ r.push(Ae(e[i], t, s, n));
1075
+ return r;
1076
+ }
1077
+ }
1078
+ function vs(e, t, s, n = !0) {
1079
+ const r = t ? t.vnode : null, { errorHandler: i, throwUnhandledErrorInProduction: o } = t && t.appContext.config || j;
1080
+ if (t) {
1081
+ let l = t.parent;
1082
+ const c = t.proxy, h = `https://vuejs.org/error-reference/#runtime-${s}`;
1083
+ for (; l; ) {
1084
+ const u = l.ec;
1085
+ if (u) {
1086
+ for (let d = 0; d < u.length; d++)
1087
+ if (u[d](e, c, h) === !1)
1088
+ return;
1089
+ }
1090
+ l = l.parent;
1091
+ }
1092
+ if (i) {
1093
+ Le(), Ut(i, null, 10, [
1094
+ e,
1095
+ c,
1096
+ h
1097
+ ]), je();
1098
+ return;
1099
+ }
1100
+ }
1101
+ $o(e, s, r, n, o);
1102
+ }
1103
+ function $o(e, t, s, n = !0, r = !1) {
1104
+ if (r)
1105
+ throw e;
1106
+ }
1107
+ const re = [];
1108
+ let Ee = -1;
1109
+ const ft = [];
1110
+ let Ue = null, ot = 0;
1111
+ const Or = /* @__PURE__ */ Promise.resolve();
1112
+ let ns = null;
1113
+ function Xt(e) {
1114
+ const t = ns || Or;
1115
+ return e ? t.then(this ? e.bind(this) : e) : t;
1116
+ }
1117
+ function Ao(e) {
1118
+ let t = Ee + 1, s = re.length;
1119
+ for (; t < s; ) {
1120
+ const n = t + s >>> 1, r = re[n], i = Lt(r);
1121
+ i < e || i === e && r.flags & 2 ? t = n + 1 : s = n;
1122
+ }
1123
+ return t;
1124
+ }
1125
+ function un(e) {
1126
+ if (!(e.flags & 1)) {
1127
+ const t = Lt(e), s = re[re.length - 1];
1128
+ !s || // fast path when the job id is larger than the tail
1129
+ !(e.flags & 2) && t >= Lt(s) ? re.push(e) : re.splice(Ao(t), 0, e), e.flags |= 1, Pr();
1130
+ }
1131
+ }
1132
+ function Pr() {
1133
+ ns || (ns = Or.then(Fr));
1134
+ }
1135
+ function Io(e) {
1136
+ M(e) ? ft.push(...e) : Ue && e.id === -1 ? Ue.splice(ot + 1, 0, e) : e.flags & 1 || (ft.push(e), e.flags |= 1), Pr();
1137
+ }
1138
+ function In(e, t, s = Ee + 1) {
1139
+ for (; s < re.length; s++) {
1140
+ const n = re[s];
1141
+ if (n && n.flags & 2) {
1142
+ if (e && n.id !== e.uid)
1143
+ continue;
1144
+ re.splice(s, 1), s--, n.flags & 4 && (n.flags &= -2), n(), n.flags & 4 || (n.flags &= -2);
1145
+ }
1146
+ }
1147
+ }
1148
+ function Mr(e) {
1149
+ if (ft.length) {
1150
+ const t = [...new Set(ft)].sort(
1151
+ (s, n) => Lt(s) - Lt(n)
1152
+ );
1153
+ if (ft.length = 0, Ue) {
1154
+ Ue.push(...t);
1155
+ return;
1156
+ }
1157
+ for (Ue = t, ot = 0; ot < Ue.length; ot++) {
1158
+ const s = Ue[ot];
1159
+ s.flags & 4 && (s.flags &= -2), s.flags & 8 || s(), s.flags &= -2;
1160
+ }
1161
+ Ue = null, ot = 0;
1162
+ }
1163
+ }
1164
+ const Lt = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
1165
+ function Fr(e) {
1166
+ try {
1167
+ for (Ee = 0; Ee < re.length; Ee++) {
1168
+ const t = re[Ee];
1169
+ t && !(t.flags & 8) && (t.flags & 4 && (t.flags &= -2), Ut(
1170
+ t,
1171
+ t.i,
1172
+ t.i ? 15 : 14
1173
+ ), t.flags & 4 || (t.flags &= -2));
1174
+ }
1175
+ } finally {
1176
+ for (; Ee < re.length; Ee++) {
1177
+ const t = re[Ee];
1178
+ t && (t.flags &= -2);
1179
+ }
1180
+ Ee = -1, re.length = 0, Mr(), ns = null, (re.length || ft.length) && Fr();
1181
+ }
1182
+ }
1183
+ let de = null, Nr = null;
1184
+ function rs(e) {
1185
+ const t = de;
1186
+ return de = e, Nr = e && e.type.__scopeId || null, t;
1187
+ }
1188
+ function Oo(e, t = de, s) {
1189
+ if (!t || e._n)
1190
+ return e;
1191
+ const n = (...r) => {
1192
+ n._d && Vn(-1);
1193
+ const i = rs(t);
1194
+ let o;
1195
+ try {
1196
+ o = e(...r);
1197
+ } finally {
1198
+ rs(i), n._d && Vn(1);
1199
+ }
1200
+ return o;
1201
+ };
1202
+ return n._n = !0, n._c = !0, n._d = !0, n;
1203
+ }
1204
+ function Po(e, t) {
1205
+ if (de === null)
1206
+ return e;
1207
+ const s = Ss(de), n = e.dirs || (e.dirs = []);
1208
+ for (let r = 0; r < t.length; r++) {
1209
+ let [i, o, l, c = j] = t[r];
1210
+ i && (F(i) && (i = {
1211
+ mounted: i,
1212
+ updated: i
1213
+ }), i.deep && Re(o), n.push({
1214
+ dir: i,
1215
+ instance: s,
1216
+ value: o,
1217
+ oldValue: void 0,
1218
+ arg: l,
1219
+ modifiers: c
1220
+ }));
1221
+ }
1222
+ return e;
1223
+ }
1224
+ function Ye(e, t, s, n) {
1225
+ const r = e.dirs, i = t && t.dirs;
1226
+ for (let o = 0; o < r.length; o++) {
1227
+ const l = r[o];
1228
+ i && (l.oldValue = i[o].value);
1229
+ let c = l.dir[n];
1230
+ c && (Le(), Ae(c, s, 8, [
1231
+ e.el,
1232
+ l,
1233
+ e,
1234
+ t
1235
+ ]), je());
1236
+ }
1237
+ }
1238
+ const Mo = Symbol("_vte"), Fo = (e) => e.__isTeleport, No = Symbol("_leaveCb");
1239
+ function fn(e, t) {
1240
+ e.shapeFlag & 6 && e.component ? (e.transition = t, fn(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
1241
+ }
1242
+ // @__NO_SIDE_EFFECTS__
1243
+ function Rr(e, t) {
1244
+ return F(e) ? (
1245
+ // #8236: extend call and options.name access are considered side-effects
1246
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
1247
+ ee({ name: e.name }, t, { setup: e })
1248
+ ) : e;
1249
+ }
1250
+ function Dr(e) {
1251
+ e.ids = [e.ids[0] + e.ids[2]++ + "-", 0, 0];
1252
+ }
1253
+ function Ro(e) {
1254
+ const t = gn(), s = vo(null);
1255
+ if (t) {
1256
+ const r = t.refs === j ? t.refs = {} : t.refs;
1257
+ Object.defineProperty(r, e, {
1258
+ enumerable: !0,
1259
+ get: () => s.value,
1260
+ set: (i) => s.value = i
1261
+ });
1262
+ }
1263
+ return s;
1264
+ }
1265
+ const is = /* @__PURE__ */ new WeakMap();
1266
+ function It(e, t, s, n, r = !1) {
1267
+ if (M(e)) {
1268
+ e.forEach(
1269
+ (C, $) => It(
1270
+ C,
1271
+ t && (M(t) ? t[$] : t),
1272
+ s,
1273
+ n,
1274
+ r
1275
+ )
1276
+ );
1277
+ return;
1278
+ }
1279
+ if (Ot(n) && !r) {
1280
+ n.shapeFlag & 512 && n.type.__asyncResolved && n.component.subTree.component && It(e, t, s, n.component.subTree);
1281
+ return;
1282
+ }
1283
+ const i = n.shapeFlag & 4 ? Ss(n.component) : n.el, o = r ? null : i, { i: l, r: c } = e, h = t && t.r, u = l.refs === j ? l.refs = {} : l.refs, d = l.setupState, m = H(d), v = d === j ? sr : (C) => B(m, C);
1284
+ if (h != null && h !== c) {
1285
+ if (On(t), Z(h))
1286
+ u[h] = null, v(h) && (d[h] = null);
1287
+ else if (Q(h)) {
1288
+ h.value = null;
1289
+ const C = t;
1290
+ C.k && (u[C.k] = null);
1291
+ }
1292
+ }
1293
+ if (F(c))
1294
+ Ut(c, l, 12, [o, u]);
1295
+ else {
1296
+ const C = Z(c), $ = Q(c);
1297
+ if (C || $) {
1298
+ const U = () => {
1299
+ if (e.f) {
1300
+ const O = C ? v(c) ? d[c] : u[c] : c.value;
1301
+ if (r)
1302
+ M(O) && Qs(O, i);
1303
+ else if (M(O))
1304
+ O.includes(i) || O.push(i);
1305
+ else if (C)
1306
+ u[c] = [i], v(c) && (d[c] = u[c]);
1307
+ else {
1308
+ const R = [i];
1309
+ c.value = R, e.k && (u[e.k] = R);
1310
+ }
1311
+ } else C ? (u[c] = o, v(c) && (d[c] = o)) : $ && (c.value = o, e.k && (u[e.k] = o));
1312
+ };
1313
+ if (o) {
1314
+ const O = () => {
1315
+ U(), is.delete(e);
1316
+ };
1317
+ O.id = -1, is.set(e, O), fe(O, s);
1318
+ } else
1319
+ On(e), U();
1320
+ }
1321
+ }
1322
+ }
1323
+ function On(e) {
1324
+ const t = is.get(e);
1325
+ t && (t.flags |= 8, is.delete(e));
1326
+ }
1327
+ ps().requestIdleCallback;
1328
+ ps().cancelIdleCallback;
1329
+ const Ot = (e) => !!e.type.__asyncLoader, Lr = (e) => e.type.__isKeepAlive;
1330
+ function Do(e, t) {
1331
+ jr(e, "a", t);
1332
+ }
1333
+ function Lo(e, t) {
1334
+ jr(e, "da", t);
1335
+ }
1336
+ function jr(e, t, s = ie) {
1337
+ const n = e.__wdc || (e.__wdc = () => {
1338
+ let r = s;
1339
+ for (; r; ) {
1340
+ if (r.isDeactivated)
1341
+ return;
1342
+ r = r.parent;
1343
+ }
1344
+ return e();
1345
+ });
1346
+ if (bs(t, n, s), s) {
1347
+ let r = s.parent;
1348
+ for (; r && r.parent; )
1349
+ Lr(r.parent.vnode) && jo(n, t, s, r), r = r.parent;
1350
+ }
1351
+ }
1352
+ function jo(e, t, s, n) {
1353
+ const r = bs(
1354
+ t,
1355
+ e,
1356
+ n,
1357
+ !0
1358
+ /* prepend */
1359
+ );
1360
+ Vr(() => {
1361
+ Qs(n[t], r);
1362
+ }, s);
1363
+ }
1364
+ function bs(e, t, s = ie, n = !1) {
1365
+ if (s) {
1366
+ const r = s[e] || (s[e] = []), i = t.__weh || (t.__weh = (...o) => {
1367
+ Le();
1368
+ const l = Vt(s), c = Ae(t, s, e, o);
1369
+ return l(), je(), c;
1370
+ });
1371
+ return n ? r.unshift(i) : r.push(i), i;
1372
+ }
1373
+ }
1374
+ const He = (e) => (t, s = ie) => {
1375
+ (!Ht || e === "sp") && bs(e, (...n) => t(...n), s);
1376
+ }, Hr = He("bm"), hn = He("m"), Ho = He(
1377
+ "bu"
1378
+ ), Uo = He("u"), Ur = He(
1379
+ "bum"
1380
+ ), Vr = He("um"), Vo = He(
1381
+ "sp"
1382
+ ), Bo = He("rtg"), ko = He("rtc");
1383
+ function Ko(e, t = ie) {
1384
+ bs("ec", e, t);
1385
+ }
1386
+ const Wo = Symbol.for("v-ndc");
1387
+ function Pn(e, t, s, n) {
1388
+ let r;
1389
+ const i = s, o = M(e);
1390
+ if (o || Z(e)) {
1391
+ const l = o && ut(e);
1392
+ let c = !1, h = !1;
1393
+ l && (c = !pe(e), h = ke(e), e = _s(e)), r = new Array(e.length);
1394
+ for (let u = 0, d = e.length; u < d; u++)
1395
+ r[u] = t(
1396
+ c ? h ? ts(X(e[u])) : X(e[u]) : e[u],
1397
+ u,
1398
+ void 0,
1399
+ i
1400
+ );
1401
+ } else if (typeof e == "number") {
1402
+ r = new Array(e);
1403
+ for (let l = 0; l < e; l++)
1404
+ r[l] = t(l + 1, l, void 0, i);
1405
+ } else if (J(e))
1406
+ if (e[Symbol.iterator])
1407
+ r = Array.from(
1408
+ e,
1409
+ (l, c) => t(l, c, void 0, i)
1410
+ );
1411
+ else {
1412
+ const l = Object.keys(e);
1413
+ r = new Array(l.length);
1414
+ for (let c = 0, h = l.length; c < h; c++) {
1415
+ const u = l[c];
1416
+ r[c] = t(e[u], u, c, i);
1417
+ }
1418
+ }
1419
+ else
1420
+ r = [];
1421
+ return r;
1422
+ }
1423
+ const Bs = (e) => e ? ui(e) ? Ss(e) : Bs(e.parent) : null, Pt = (
1424
+ // Move PURE marker to new line to workaround compiler discarding it
1425
+ // due to type annotation
1426
+ /* @__PURE__ */ ee(/* @__PURE__ */ Object.create(null), {
1427
+ $: (e) => e,
1428
+ $el: (e) => e.vnode.el,
1429
+ $data: (e) => e.data,
1430
+ $props: (e) => e.props,
1431
+ $attrs: (e) => e.attrs,
1432
+ $slots: (e) => e.slots,
1433
+ $refs: (e) => e.refs,
1434
+ $parent: (e) => Bs(e.parent),
1435
+ $root: (e) => Bs(e.root),
1436
+ $host: (e) => e.ce,
1437
+ $emit: (e) => e.emit,
1438
+ $options: (e) => kr(e),
1439
+ $forceUpdate: (e) => e.f || (e.f = () => {
1440
+ un(e.update);
1441
+ }),
1442
+ $nextTick: (e) => e.n || (e.n = Xt.bind(e.proxy)),
1443
+ $watch: (e) => pl.bind(e)
1444
+ })
1445
+ ), Fs = (e, t) => e !== j && !e.__isScriptSetup && B(e, t), qo = {
1446
+ get({ _: e }, t) {
1447
+ if (t === "__v_skip")
1448
+ return !0;
1449
+ const { ctx: s, setupState: n, data: r, props: i, accessCache: o, type: l, appContext: c } = e;
1450
+ let h;
1451
+ if (t[0] !== "$") {
1452
+ const v = o[t];
1453
+ if (v !== void 0)
1454
+ switch (v) {
1455
+ case 1:
1456
+ return n[t];
1457
+ case 2:
1458
+ return r[t];
1459
+ case 4:
1460
+ return s[t];
1461
+ case 3:
1462
+ return i[t];
1463
+ }
1464
+ else {
1465
+ if (Fs(n, t))
1466
+ return o[t] = 1, n[t];
1467
+ if (r !== j && B(r, t))
1468
+ return o[t] = 2, r[t];
1469
+ if (
1470
+ // only cache other properties when instance has declared (thus stable)
1471
+ // props
1472
+ (h = e.propsOptions[0]) && B(h, t)
1473
+ )
1474
+ return o[t] = 3, i[t];
1475
+ if (s !== j && B(s, t))
1476
+ return o[t] = 4, s[t];
1477
+ ks && (o[t] = 0);
1478
+ }
1479
+ }
1480
+ const u = Pt[t];
1481
+ let d, m;
1482
+ if (u)
1483
+ return t === "$attrs" && te(e.attrs, "get", ""), u(e);
1484
+ if (
1485
+ // css module (injected by vue-loader)
1486
+ (d = l.__cssModules) && (d = d[t])
1487
+ )
1488
+ return d;
1489
+ if (s !== j && B(s, t))
1490
+ return o[t] = 4, s[t];
1491
+ if (
1492
+ // global properties
1493
+ m = c.config.globalProperties, B(m, t)
1494
+ )
1495
+ return m[t];
1496
+ },
1497
+ set({ _: e }, t, s) {
1498
+ const { data: n, setupState: r, ctx: i } = e;
1499
+ return Fs(r, t) ? (r[t] = s, !0) : n !== j && B(n, t) ? (n[t] = s, !0) : B(e.props, t) || t[0] === "$" && t.slice(1) in e ? !1 : (i[t] = s, !0);
1500
+ },
1501
+ has({
1502
+ _: { data: e, setupState: t, accessCache: s, ctx: n, appContext: r, propsOptions: i, type: o }
1503
+ }, l) {
1504
+ let c, h;
1505
+ return !!(s[l] || e !== j && l[0] !== "$" && B(e, l) || Fs(t, l) || (c = i[0]) && B(c, l) || B(n, l) || B(Pt, l) || B(r.config.globalProperties, l) || (h = o.__cssModules) && h[l]);
1506
+ },
1507
+ defineProperty(e, t, s) {
1508
+ return s.get != null ? e._.accessCache[t] = 0 : B(s, "value") && this.set(e, t, s.value, null), Reflect.defineProperty(e, t, s);
1509
+ }
1510
+ };
1511
+ function os(e) {
1512
+ return M(e) ? e.reduce(
1513
+ (t, s) => (t[s] = null, t),
1514
+ {}
1515
+ ) : e;
1516
+ }
1517
+ function Mn(e, t) {
1518
+ return !e || !t ? e || t : M(e) && M(t) ? e.concat(t) : ee({}, os(e), os(t));
1519
+ }
1520
+ let ks = !0;
1521
+ function zo(e) {
1522
+ const t = kr(e), s = e.proxy, n = e.ctx;
1523
+ ks = !1, t.beforeCreate && Fn(t.beforeCreate, e, "bc");
1524
+ const {
1525
+ // state
1526
+ data: r,
1527
+ computed: i,
1528
+ methods: o,
1529
+ watch: l,
1530
+ provide: c,
1531
+ inject: h,
1532
+ // lifecycle
1533
+ created: u,
1534
+ beforeMount: d,
1535
+ mounted: m,
1536
+ beforeUpdate: v,
1537
+ updated: C,
1538
+ activated: $,
1539
+ deactivated: U,
1540
+ beforeDestroy: O,
1541
+ beforeUnmount: R,
1542
+ destroyed: D,
1543
+ unmounted: T,
1544
+ render: N,
1545
+ renderTracked: V,
1546
+ renderTriggered: Y,
1547
+ errorCaptured: be,
1548
+ serverPrefetch: ze,
1549
+ // public API
1550
+ expose: Oe,
1551
+ inheritAttrs: st,
1552
+ // assets
1553
+ components: nt,
1554
+ directives: kt,
1555
+ filters: Es
1556
+ } = t;
1557
+ if (h && Jo(h, n, null), o)
1558
+ for (const z in o) {
1559
+ const K = o[z];
1560
+ F(K) && (n[z] = K.bind(s));
1561
+ }
1562
+ if (r) {
1563
+ const z = r.call(s, s);
1564
+ J(z) && (e.data = ln(z));
1565
+ }
1566
+ if (ks = !0, i)
1567
+ for (const z in i) {
1568
+ const K = i[z], Je = F(K) ? K.bind(s, s) : F(K.get) ? K.get.bind(s, s) : $e, Kt = !F(K) && F(K.set) ? K.set.bind(s) : $e, Ge = hi({
1569
+ get: Je,
1570
+ set: Kt
1571
+ });
1572
+ Object.defineProperty(n, z, {
1573
+ enumerable: !0,
1574
+ configurable: !0,
1575
+ get: () => Ge.value,
1576
+ set: (ye) => Ge.value = ye
1577
+ });
1578
+ }
1579
+ if (l)
1580
+ for (const z in l)
1581
+ Br(l[z], n, s, z);
1582
+ if (c) {
1583
+ const z = F(c) ? c.call(s) : c;
1584
+ Reflect.ownKeys(z).forEach((K) => {
1585
+ Wr(K, z[K]);
1586
+ });
1587
+ }
1588
+ u && Fn(u, e, "c");
1589
+ function se(z, K) {
1590
+ M(K) ? K.forEach((Je) => z(Je.bind(s))) : K && z(K.bind(s));
1591
+ }
1592
+ if (se(Hr, d), se(hn, m), se(Ho, v), se(Uo, C), se(Do, $), se(Lo, U), se(Ko, be), se(ko, V), se(Bo, Y), se(Ur, R), se(Vr, T), se(Vo, ze), M(Oe))
1593
+ if (Oe.length) {
1594
+ const z = e.exposed || (e.exposed = {});
1595
+ Oe.forEach((K) => {
1596
+ Object.defineProperty(z, K, {
1597
+ get: () => s[K],
1598
+ set: (Je) => s[K] = Je,
1599
+ enumerable: !0
1600
+ });
1601
+ });
1602
+ } else e.exposed || (e.exposed = {});
1603
+ N && e.render === $e && (e.render = N), st != null && (e.inheritAttrs = st), nt && (e.components = nt), kt && (e.directives = kt), ze && Dr(e);
1604
+ }
1605
+ function Jo(e, t, s = $e) {
1606
+ M(e) && (e = Ks(e));
1607
+ for (const n in e) {
1608
+ const r = e[n];
1609
+ let i;
1610
+ J(r) ? "default" in r ? i = Mt(
1611
+ r.from || n,
1612
+ r.default,
1613
+ !0
1614
+ ) : i = Mt(r.from || n) : i = Mt(r), Q(i) ? Object.defineProperty(t, n, {
1615
+ enumerable: !0,
1616
+ configurable: !0,
1617
+ get: () => i.value,
1618
+ set: (o) => i.value = o
1619
+ }) : t[n] = i;
1620
+ }
1621
+ }
1622
+ function Fn(e, t, s) {
1623
+ Ae(
1624
+ M(e) ? e.map((n) => n.bind(t.proxy)) : e.bind(t.proxy),
1625
+ t,
1626
+ s
1627
+ );
1628
+ }
1629
+ function Br(e, t, s, n) {
1630
+ let r = n.includes(".") ? si(s, n) : () => s[n];
1631
+ if (Z(e)) {
1632
+ const i = t[e];
1633
+ F(i) && Ft(r, i);
1634
+ } else if (F(e))
1635
+ Ft(r, e.bind(s));
1636
+ else if (J(e))
1637
+ if (M(e))
1638
+ e.forEach((i) => Br(i, t, s, n));
1639
+ else {
1640
+ const i = F(e.handler) ? e.handler.bind(s) : t[e.handler];
1641
+ F(i) && Ft(r, i, e);
1642
+ }
1643
+ }
1644
+ function kr(e) {
1645
+ const t = e.type, { mixins: s, extends: n } = t, {
1646
+ mixins: r,
1647
+ optionsCache: i,
1648
+ config: { optionMergeStrategies: o }
1649
+ } = e.appContext, l = i.get(t);
1650
+ let c;
1651
+ return l ? c = l : !r.length && !s && !n ? c = t : (c = {}, r.length && r.forEach(
1652
+ (h) => ls(c, h, o, !0)
1653
+ ), ls(c, t, o)), J(t) && i.set(t, c), c;
1654
+ }
1655
+ function ls(e, t, s, n = !1) {
1656
+ const { mixins: r, extends: i } = t;
1657
+ i && ls(e, i, s, !0), r && r.forEach(
1658
+ (o) => ls(e, o, s, !0)
1659
+ );
1660
+ for (const o in t)
1661
+ if (!(n && o === "expose")) {
1662
+ const l = Go[o] || s && s[o];
1663
+ e[o] = l ? l(e[o], t[o]) : t[o];
1664
+ }
1665
+ return e;
1666
+ }
1667
+ const Go = {
1668
+ data: Nn,
1669
+ props: Rn,
1670
+ emits: Rn,
1671
+ // objects
1672
+ methods: St,
1673
+ computed: St,
1674
+ // lifecycle
1675
+ beforeCreate: ne,
1676
+ created: ne,
1677
+ beforeMount: ne,
1678
+ mounted: ne,
1679
+ beforeUpdate: ne,
1680
+ updated: ne,
1681
+ beforeDestroy: ne,
1682
+ beforeUnmount: ne,
1683
+ destroyed: ne,
1684
+ unmounted: ne,
1685
+ activated: ne,
1686
+ deactivated: ne,
1687
+ errorCaptured: ne,
1688
+ serverPrefetch: ne,
1689
+ // assets
1690
+ components: St,
1691
+ directives: St,
1692
+ // watch
1693
+ watch: Zo,
1694
+ // provide / inject
1695
+ provide: Nn,
1696
+ inject: Yo
1697
+ };
1698
+ function Nn(e, t) {
1699
+ return t ? e ? function() {
1700
+ return ee(
1701
+ F(e) ? e.call(this, this) : e,
1702
+ F(t) ? t.call(this, this) : t
1703
+ );
1704
+ } : t : e;
1705
+ }
1706
+ function Yo(e, t) {
1707
+ return St(Ks(e), Ks(t));
1708
+ }
1709
+ function Ks(e) {
1710
+ if (M(e)) {
1711
+ const t = {};
1712
+ for (let s = 0; s < e.length; s++)
1713
+ t[e[s]] = e[s];
1714
+ return t;
1715
+ }
1716
+ return e;
1717
+ }
1718
+ function ne(e, t) {
1719
+ return e ? [...new Set([].concat(e, t))] : t;
1720
+ }
1721
+ function St(e, t) {
1722
+ return e ? ee(/* @__PURE__ */ Object.create(null), e, t) : t;
1723
+ }
1724
+ function Rn(e, t) {
1725
+ return e ? M(e) && M(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : ee(
1726
+ /* @__PURE__ */ Object.create(null),
1727
+ os(e),
1728
+ os(t ?? {})
1729
+ ) : t;
1730
+ }
1731
+ function Zo(e, t) {
1732
+ if (!e) return t;
1733
+ if (!t) return e;
1734
+ const s = ee(/* @__PURE__ */ Object.create(null), e);
1735
+ for (const n in t)
1736
+ s[n] = ne(e[n], t[n]);
1737
+ return s;
1738
+ }
1739
+ function Kr() {
1740
+ return {
1741
+ app: null,
1742
+ config: {
1743
+ isNativeTag: sr,
1744
+ performance: !1,
1745
+ globalProperties: {},
1746
+ optionMergeStrategies: {},
1747
+ errorHandler: void 0,
1748
+ warnHandler: void 0,
1749
+ compilerOptions: {}
1750
+ },
1751
+ mixins: [],
1752
+ components: {},
1753
+ directives: {},
1754
+ provides: /* @__PURE__ */ Object.create(null),
1755
+ optionsCache: /* @__PURE__ */ new WeakMap(),
1756
+ propsCache: /* @__PURE__ */ new WeakMap(),
1757
+ emitsCache: /* @__PURE__ */ new WeakMap()
1758
+ };
1759
+ }
1760
+ let Xo = 0;
1761
+ function Qo(e, t) {
1762
+ return function(n, r = null) {
1763
+ F(n) || (n = ee({}, n)), r != null && !J(r) && (r = null);
1764
+ const i = Kr(), o = /* @__PURE__ */ new WeakSet(), l = [];
1765
+ let c = !1;
1766
+ const h = i.app = {
1767
+ _uid: Xo++,
1768
+ _component: n,
1769
+ _props: r,
1770
+ _container: null,
1771
+ _context: i,
1772
+ _instance: null,
1773
+ version: Rl,
1774
+ get config() {
1775
+ return i.config;
1776
+ },
1777
+ set config(u) {
1778
+ },
1779
+ use(u, ...d) {
1780
+ return o.has(u) || (u && F(u.install) ? (o.add(u), u.install(h, ...d)) : F(u) && (o.add(u), u(h, ...d))), h;
1781
+ },
1782
+ mixin(u) {
1783
+ return i.mixins.includes(u) || i.mixins.push(u), h;
1784
+ },
1785
+ component(u, d) {
1786
+ return d ? (i.components[u] = d, h) : i.components[u];
1787
+ },
1788
+ directive(u, d) {
1789
+ return d ? (i.directives[u] = d, h) : i.directives[u];
1790
+ },
1791
+ mount(u, d, m) {
1792
+ if (!c) {
1793
+ const v = h._ceVNode || Be(n, r);
1794
+ return v.appContext = i, m === !0 ? m = "svg" : m === !1 && (m = void 0), e(v, u, m), c = !0, h._container = u, u.__vue_app__ = h, Ss(v.component);
1795
+ }
1796
+ },
1797
+ onUnmount(u) {
1798
+ l.push(u);
1799
+ },
1800
+ unmount() {
1801
+ c && (Ae(
1802
+ l,
1803
+ h._instance,
1804
+ 16
1805
+ ), e(null, h._container), delete h._container.__vue_app__);
1806
+ },
1807
+ provide(u, d) {
1808
+ return i.provides[u] = d, h;
1809
+ },
1810
+ runWithContext(u) {
1811
+ const d = ht;
1812
+ ht = h;
1813
+ try {
1814
+ return u();
1815
+ } finally {
1816
+ ht = d;
1817
+ }
1818
+ }
1819
+ };
1820
+ return h;
1821
+ };
1822
+ }
1823
+ let ht = null;
1824
+ function Wr(e, t) {
1825
+ if (ie) {
1826
+ let s = ie.provides;
1827
+ const n = ie.parent && ie.parent.provides;
1828
+ n === s && (s = ie.provides = Object.create(n)), s[e] = t;
1829
+ }
1830
+ }
1831
+ function Mt(e, t, s = !1) {
1832
+ const n = gn();
1833
+ if (n || ht) {
1834
+ let r = ht ? ht._context.provides : n ? n.parent == null || n.ce ? n.vnode.appContext && n.vnode.appContext.provides : n.parent.provides : void 0;
1835
+ if (r && e in r)
1836
+ return r[e];
1837
+ if (arguments.length > 1)
1838
+ return s && F(t) ? t.call(n && n.proxy) : t;
1839
+ }
1840
+ }
1841
+ const qr = {}, zr = () => Object.create(qr), Jr = (e) => Object.getPrototypeOf(e) === qr;
1842
+ function el(e, t, s, n = !1) {
1843
+ const r = {}, i = zr();
1844
+ e.propsDefaults = /* @__PURE__ */ Object.create(null), Gr(e, t, r, i);
1845
+ for (const o in e.propsOptions[0])
1846
+ o in r || (r[o] = void 0);
1847
+ s ? e.props = n ? r : go(r) : e.type.props ? e.props = r : e.props = i, e.attrs = i;
1848
+ }
1849
+ function tl(e, t, s, n) {
1850
+ const {
1851
+ props: r,
1852
+ attrs: i,
1853
+ vnode: { patchFlag: o }
1854
+ } = e, l = H(r), [c] = e.propsOptions;
1855
+ let h = !1;
1856
+ if (
1857
+ // always force full diff in dev
1858
+ // - #1942 if hmr is enabled with sfc component
1859
+ // - vite#872 non-sfc component used by sfc component
1860
+ (n || o > 0) && !(o & 16)
1861
+ ) {
1862
+ if (o & 8) {
1863
+ const u = e.vnode.dynamicProps;
1864
+ for (let d = 0; d < u.length; d++) {
1865
+ let m = u[d];
1866
+ if (xs(e.emitsOptions, m))
1867
+ continue;
1868
+ const v = t[m];
1869
+ if (c)
1870
+ if (B(i, m))
1871
+ v !== i[m] && (i[m] = v, h = !0);
1872
+ else {
1873
+ const C = De(m);
1874
+ r[C] = Ws(
1875
+ c,
1876
+ l,
1877
+ C,
1878
+ v,
1879
+ e,
1880
+ !1
1881
+ );
1882
+ }
1883
+ else
1884
+ v !== i[m] && (i[m] = v, h = !0);
1885
+ }
1886
+ }
1887
+ } else {
1888
+ Gr(e, t, r, i) && (h = !0);
1889
+ let u;
1890
+ for (const d in l)
1891
+ (!t || // for camelCase
1892
+ !B(t, d) && // it's possible the original props was passed in as kebab-case
1893
+ // and converted to camelCase (#955)
1894
+ ((u = qe(d)) === d || !B(t, u))) && (c ? s && // for camelCase
1895
+ (s[d] !== void 0 || // for kebab-case
1896
+ s[u] !== void 0) && (r[d] = Ws(
1897
+ c,
1898
+ l,
1899
+ d,
1900
+ void 0,
1901
+ e,
1902
+ !0
1903
+ )) : delete r[d]);
1904
+ if (i !== l)
1905
+ for (const d in i)
1906
+ (!t || !B(t, d)) && (delete i[d], h = !0);
1907
+ }
1908
+ h && Ne(e.attrs, "set", "");
1909
+ }
1910
+ function Gr(e, t, s, n) {
1911
+ const [r, i] = e.propsOptions;
1912
+ let o = !1, l;
1913
+ if (t)
1914
+ for (let c in t) {
1915
+ if (Tt(c))
1916
+ continue;
1917
+ const h = t[c];
1918
+ let u;
1919
+ r && B(r, u = De(c)) ? !i || !i.includes(u) ? s[u] = h : (l || (l = {}))[u] = h : xs(e.emitsOptions, c) || (!(c in n) || h !== n[c]) && (n[c] = h, o = !0);
1920
+ }
1921
+ if (i) {
1922
+ const c = H(s), h = l || j;
1923
+ for (let u = 0; u < i.length; u++) {
1924
+ const d = i[u];
1925
+ s[d] = Ws(
1926
+ r,
1927
+ c,
1928
+ d,
1929
+ h[d],
1930
+ e,
1931
+ !B(h, d)
1932
+ );
1933
+ }
1934
+ }
1935
+ return o;
1936
+ }
1937
+ function Ws(e, t, s, n, r, i) {
1938
+ const o = e[s];
1939
+ if (o != null) {
1940
+ const l = B(o, "default");
1941
+ if (l && n === void 0) {
1942
+ const c = o.default;
1943
+ if (o.type !== Function && !o.skipFactory && F(c)) {
1944
+ const { propsDefaults: h } = r;
1945
+ if (s in h)
1946
+ n = h[s];
1947
+ else {
1948
+ const u = Vt(r);
1949
+ n = h[s] = c.call(
1950
+ null,
1951
+ t
1952
+ ), u();
1953
+ }
1954
+ } else
1955
+ n = c;
1956
+ r.ce && r.ce._setProp(s, n);
1957
+ }
1958
+ o[
1959
+ 0
1960
+ /* shouldCast */
1961
+ ] && (i && !l ? n = !1 : o[
1962
+ 1
1963
+ /* shouldCastTrue */
1964
+ ] && (n === "" || n === qe(s)) && (n = !0));
1965
+ }
1966
+ return n;
1967
+ }
1968
+ const sl = /* @__PURE__ */ new WeakMap();
1969
+ function Yr(e, t, s = !1) {
1970
+ const n = s ? sl : t.propsCache, r = n.get(e);
1971
+ if (r)
1972
+ return r;
1973
+ const i = e.props, o = {}, l = [];
1974
+ let c = !1;
1975
+ if (!F(e)) {
1976
+ const u = (d) => {
1977
+ c = !0;
1978
+ const [m, v] = Yr(d, t, !0);
1979
+ ee(o, m), v && l.push(...v);
1980
+ };
1981
+ !s && t.mixins.length && t.mixins.forEach(u), e.extends && u(e.extends), e.mixins && e.mixins.forEach(u);
1982
+ }
1983
+ if (!i && !c)
1984
+ return J(e) && n.set(e, ct), ct;
1985
+ if (M(i))
1986
+ for (let u = 0; u < i.length; u++) {
1987
+ const d = De(i[u]);
1988
+ Dn(d) && (o[d] = j);
1989
+ }
1990
+ else if (i)
1991
+ for (const u in i) {
1992
+ const d = De(u);
1993
+ if (Dn(d)) {
1994
+ const m = i[u], v = o[d] = M(m) || F(m) ? { type: m } : ee({}, m), C = v.type;
1995
+ let $ = !1, U = !0;
1996
+ if (M(C))
1997
+ for (let O = 0; O < C.length; ++O) {
1998
+ const R = C[O], D = F(R) && R.name;
1999
+ if (D === "Boolean") {
2000
+ $ = !0;
2001
+ break;
2002
+ } else D === "String" && (U = !1);
2003
+ }
2004
+ else
2005
+ $ = F(C) && C.name === "Boolean";
2006
+ v[
2007
+ 0
2008
+ /* shouldCast */
2009
+ ] = $, v[
2010
+ 1
2011
+ /* shouldCastTrue */
2012
+ ] = U, ($ || B(v, "default")) && l.push(d);
2013
+ }
2014
+ }
2015
+ const h = [o, l];
2016
+ return J(e) && n.set(e, h), h;
2017
+ }
2018
+ function Dn(e) {
2019
+ return e[0] !== "$" && !Tt(e);
2020
+ }
2021
+ const dn = (e) => e === "_" || e === "_ctx" || e === "$stable", pn = (e) => M(e) ? e.map(Te) : [Te(e)], nl = (e, t, s) => {
2022
+ if (t._n)
2023
+ return t;
2024
+ const n = Oo((...r) => pn(t(...r)), s);
2025
+ return n._c = !1, n;
2026
+ }, Zr = (e, t, s) => {
2027
+ const n = e._ctx;
2028
+ for (const r in e) {
2029
+ if (dn(r)) continue;
2030
+ const i = e[r];
2031
+ if (F(i))
2032
+ t[r] = nl(r, i, n);
2033
+ else if (i != null) {
2034
+ const o = pn(i);
2035
+ t[r] = () => o;
2036
+ }
2037
+ }
2038
+ }, Xr = (e, t) => {
2039
+ const s = pn(t);
2040
+ e.slots.default = () => s;
2041
+ }, Qr = (e, t, s) => {
2042
+ for (const n in t)
2043
+ (s || !dn(n)) && (e[n] = t[n]);
2044
+ }, rl = (e, t, s) => {
2045
+ const n = e.slots = zr();
2046
+ if (e.vnode.shapeFlag & 32) {
2047
+ const r = t._;
2048
+ r ? (Qr(n, t, s), s && cr(n, "_", r, !0)) : Zr(t, n);
2049
+ } else t && Xr(e, t);
2050
+ }, il = (e, t, s) => {
2051
+ const { vnode: n, slots: r } = e;
2052
+ let i = !0, o = j;
2053
+ if (n.shapeFlag & 32) {
2054
+ const l = t._;
2055
+ l ? s && l === 1 ? i = !1 : Qr(r, t, s) : (i = !t.$stable, Zr(t, r)), o = t;
2056
+ } else t && (Xr(e, t), o = { default: 1 });
2057
+ if (i)
2058
+ for (const l in r)
2059
+ !dn(l) && o[l] == null && delete r[l];
2060
+ }, fe = xl;
2061
+ function ol(e) {
2062
+ return ll(e);
2063
+ }
2064
+ function ll(e, t) {
2065
+ const s = ps();
2066
+ s.__VUE__ = !0;
2067
+ const {
2068
+ insert: n,
2069
+ remove: r,
2070
+ patchProp: i,
2071
+ createElement: o,
2072
+ createText: l,
2073
+ createComment: c,
2074
+ setText: h,
2075
+ setElementText: u,
2076
+ parentNode: d,
2077
+ nextSibling: m,
2078
+ setScopeId: v = $e,
2079
+ insertStaticContent: C
2080
+ } = e, $ = (a, f, p, b = null, g = null, _ = null, w = void 0, S = null, x = !!f.dynamicChildren) => {
2081
+ if (a === f)
2082
+ return;
2083
+ a && !xt(a, f) && (b = Wt(a), ye(a, g, _, !0), a = null), f.patchFlag === -2 && (x = !1, f.dynamicChildren = null);
2084
+ const { type: y, ref: I, shapeFlag: E } = f;
2085
+ switch (y) {
2086
+ case Cs:
2087
+ U(a, f, p, b);
2088
+ break;
2089
+ case dt:
2090
+ O(a, f, p, b);
2091
+ break;
2092
+ case Rs:
2093
+ a == null && R(f, p, b, w);
2094
+ break;
2095
+ case ge:
2096
+ nt(
2097
+ a,
2098
+ f,
2099
+ p,
2100
+ b,
2101
+ g,
2102
+ _,
2103
+ w,
2104
+ S,
2105
+ x
2106
+ );
2107
+ break;
2108
+ default:
2109
+ E & 1 ? N(
2110
+ a,
2111
+ f,
2112
+ p,
2113
+ b,
2114
+ g,
2115
+ _,
2116
+ w,
2117
+ S,
2118
+ x
2119
+ ) : E & 6 ? kt(
2120
+ a,
2121
+ f,
2122
+ p,
2123
+ b,
2124
+ g,
2125
+ _,
2126
+ w,
2127
+ S,
2128
+ x
2129
+ ) : (E & 64 || E & 128) && y.process(
2130
+ a,
2131
+ f,
2132
+ p,
2133
+ b,
2134
+ g,
2135
+ _,
2136
+ w,
2137
+ S,
2138
+ x,
2139
+ vt
2140
+ );
2141
+ }
2142
+ I != null && g ? It(I, a && a.ref, _, f || a, !f) : I == null && a && a.ref != null && It(a.ref, null, _, a, !0);
2143
+ }, U = (a, f, p, b) => {
2144
+ if (a == null)
2145
+ n(
2146
+ f.el = l(f.children),
2147
+ p,
2148
+ b
2149
+ );
2150
+ else {
2151
+ const g = f.el = a.el;
2152
+ f.children !== a.children && h(g, f.children);
2153
+ }
2154
+ }, O = (a, f, p, b) => {
2155
+ a == null ? n(
2156
+ f.el = c(f.children || ""),
2157
+ p,
2158
+ b
2159
+ ) : f.el = a.el;
2160
+ }, R = (a, f, p, b) => {
2161
+ [a.el, a.anchor] = C(
2162
+ a.children,
2163
+ f,
2164
+ p,
2165
+ b,
2166
+ a.el,
2167
+ a.anchor
2168
+ );
2169
+ }, D = ({ el: a, anchor: f }, p, b) => {
2170
+ let g;
2171
+ for (; a && a !== f; )
2172
+ g = m(a), n(a, p, b), a = g;
2173
+ n(f, p, b);
2174
+ }, T = ({ el: a, anchor: f }) => {
2175
+ let p;
2176
+ for (; a && a !== f; )
2177
+ p = m(a), r(a), a = p;
2178
+ r(f);
2179
+ }, N = (a, f, p, b, g, _, w, S, x) => {
2180
+ f.type === "svg" ? w = "svg" : f.type === "math" && (w = "mathml"), a == null ? V(
2181
+ f,
2182
+ p,
2183
+ b,
2184
+ g,
2185
+ _,
2186
+ w,
2187
+ S,
2188
+ x
2189
+ ) : ze(
2190
+ a,
2191
+ f,
2192
+ g,
2193
+ _,
2194
+ w,
2195
+ S,
2196
+ x
2197
+ );
2198
+ }, V = (a, f, p, b, g, _, w, S) => {
2199
+ let x, y;
2200
+ const { props: I, shapeFlag: E, transition: A, dirs: P } = a;
2201
+ if (x = a.el = o(
2202
+ a.type,
2203
+ _,
2204
+ I && I.is,
2205
+ I
2206
+ ), E & 8 ? u(x, a.children) : E & 16 && be(
2207
+ a.children,
2208
+ x,
2209
+ null,
2210
+ b,
2211
+ g,
2212
+ Ns(a, _),
2213
+ w,
2214
+ S
2215
+ ), P && Ye(a, null, b, "created"), Y(x, a, a.scopeId, w, b), I) {
2216
+ for (const W in I)
2217
+ W !== "value" && !Tt(W) && i(x, W, null, I[W], _, b);
2218
+ "value" in I && i(x, "value", null, I.value, _), (y = I.onVnodeBeforeMount) && we(y, b, a);
2219
+ }
2220
+ P && Ye(a, null, b, "beforeMount");
2221
+ const L = cl(g, A);
2222
+ L && A.beforeEnter(x), n(x, f, p), ((y = I && I.onVnodeMounted) || L || P) && fe(() => {
2223
+ y && we(y, b, a), L && A.enter(x), P && Ye(a, null, b, "mounted");
2224
+ }, g);
2225
+ }, Y = (a, f, p, b, g) => {
2226
+ if (p && v(a, p), b)
2227
+ for (let _ = 0; _ < b.length; _++)
2228
+ v(a, b[_]);
2229
+ if (g) {
2230
+ let _ = g.subTree;
2231
+ if (f === _ || ii(_.type) && (_.ssContent === f || _.ssFallback === f)) {
2232
+ const w = g.vnode;
2233
+ Y(
2234
+ a,
2235
+ w,
2236
+ w.scopeId,
2237
+ w.slotScopeIds,
2238
+ g.parent
2239
+ );
2240
+ }
2241
+ }
2242
+ }, be = (a, f, p, b, g, _, w, S, x = 0) => {
2243
+ for (let y = x; y < a.length; y++) {
2244
+ const I = a[y] = S ? Ve(a[y]) : Te(a[y]);
2245
+ $(
2246
+ null,
2247
+ I,
2248
+ f,
2249
+ p,
2250
+ b,
2251
+ g,
2252
+ _,
2253
+ w,
2254
+ S
2255
+ );
2256
+ }
2257
+ }, ze = (a, f, p, b, g, _, w) => {
2258
+ const S = f.el = a.el;
2259
+ let { patchFlag: x, dynamicChildren: y, dirs: I } = f;
2260
+ x |= a.patchFlag & 16;
2261
+ const E = a.props || j, A = f.props || j;
2262
+ let P;
2263
+ if (p && Ze(p, !1), (P = A.onVnodeBeforeUpdate) && we(P, p, f, a), I && Ye(f, a, p, "beforeUpdate"), p && Ze(p, !0), (E.innerHTML && A.innerHTML == null || E.textContent && A.textContent == null) && u(S, ""), y ? Oe(
2264
+ a.dynamicChildren,
2265
+ y,
2266
+ S,
2267
+ p,
2268
+ b,
2269
+ Ns(f, g),
2270
+ _
2271
+ ) : w || K(
2272
+ a,
2273
+ f,
2274
+ S,
2275
+ null,
2276
+ p,
2277
+ b,
2278
+ Ns(f, g),
2279
+ _,
2280
+ !1
2281
+ ), x > 0) {
2282
+ if (x & 16)
2283
+ st(S, E, A, p, g);
2284
+ else if (x & 2 && E.class !== A.class && i(S, "class", null, A.class, g), x & 4 && i(S, "style", E.style, A.style, g), x & 8) {
2285
+ const L = f.dynamicProps;
2286
+ for (let W = 0; W < L.length; W++) {
2287
+ const k = L[W], oe = E[k], le = A[k];
2288
+ (le !== oe || k === "value") && i(S, k, oe, le, g, p);
2289
+ }
2290
+ }
2291
+ x & 1 && a.children !== f.children && u(S, f.children);
2292
+ } else !w && y == null && st(S, E, A, p, g);
2293
+ ((P = A.onVnodeUpdated) || I) && fe(() => {
2294
+ P && we(P, p, f, a), I && Ye(f, a, p, "updated");
2295
+ }, b);
2296
+ }, Oe = (a, f, p, b, g, _, w) => {
2297
+ for (let S = 0; S < f.length; S++) {
2298
+ const x = a[S], y = f[S], I = (
2299
+ // oldVNode may be an errored async setup() component inside Suspense
2300
+ // which will not have a mounted element
2301
+ x.el && // - In the case of a Fragment, we need to provide the actual parent
2302
+ // of the Fragment itself so it can move its children.
2303
+ (x.type === ge || // - In the case of different nodes, there is going to be a replacement
2304
+ // which also requires the correct parent container
2305
+ !xt(x, y) || // - In the case of a component, it could contain anything.
2306
+ x.shapeFlag & 198) ? d(x.el) : (
2307
+ // In other cases, the parent container is not actually used so we
2308
+ // just pass the block element here to avoid a DOM parentNode call.
2309
+ p
2310
+ )
2311
+ );
2312
+ $(
2313
+ x,
2314
+ y,
2315
+ I,
2316
+ null,
2317
+ b,
2318
+ g,
2319
+ _,
2320
+ w,
2321
+ !0
2322
+ );
2323
+ }
2324
+ }, st = (a, f, p, b, g) => {
2325
+ if (f !== p) {
2326
+ if (f !== j)
2327
+ for (const _ in f)
2328
+ !Tt(_) && !(_ in p) && i(
2329
+ a,
2330
+ _,
2331
+ f[_],
2332
+ null,
2333
+ g,
2334
+ b
2335
+ );
2336
+ for (const _ in p) {
2337
+ if (Tt(_)) continue;
2338
+ const w = p[_], S = f[_];
2339
+ w !== S && _ !== "value" && i(a, _, S, w, g, b);
2340
+ }
2341
+ "value" in p && i(a, "value", f.value, p.value, g);
2342
+ }
2343
+ }, nt = (a, f, p, b, g, _, w, S, x) => {
2344
+ const y = f.el = a ? a.el : l(""), I = f.anchor = a ? a.anchor : l("");
2345
+ let { patchFlag: E, dynamicChildren: A, slotScopeIds: P } = f;
2346
+ P && (S = S ? S.concat(P) : P), a == null ? (n(y, p, b), n(I, p, b), be(
2347
+ // #10007
2348
+ // such fragment like `<></>` will be compiled into
2349
+ // a fragment which doesn't have a children.
2350
+ // In this case fallback to an empty array
2351
+ f.children || [],
2352
+ p,
2353
+ I,
2354
+ g,
2355
+ _,
2356
+ w,
2357
+ S,
2358
+ x
2359
+ )) : E > 0 && E & 64 && A && // #2715 the previous fragment could've been a BAILed one as a result
2360
+ // of renderSlot() with no valid children
2361
+ a.dynamicChildren ? (Oe(
2362
+ a.dynamicChildren,
2363
+ A,
2364
+ p,
2365
+ g,
2366
+ _,
2367
+ w,
2368
+ S
2369
+ ), // #2080 if the stable fragment has a key, it's a <template v-for> that may
2370
+ // get moved around. Make sure all root level vnodes inherit el.
2371
+ // #2134 or if it's a component root, it may also get moved around
2372
+ // as the component is being moved.
2373
+ (f.key != null || g && f === g.subTree) && ei(
2374
+ a,
2375
+ f,
2376
+ !0
2377
+ /* shallow */
2378
+ )) : K(
2379
+ a,
2380
+ f,
2381
+ p,
2382
+ I,
2383
+ g,
2384
+ _,
2385
+ w,
2386
+ S,
2387
+ x
2388
+ );
2389
+ }, kt = (a, f, p, b, g, _, w, S, x) => {
2390
+ f.slotScopeIds = S, a == null ? f.shapeFlag & 512 ? g.ctx.activate(
2391
+ f,
2392
+ p,
2393
+ b,
2394
+ w,
2395
+ x
2396
+ ) : Es(
2397
+ f,
2398
+ p,
2399
+ b,
2400
+ g,
2401
+ _,
2402
+ w,
2403
+ x
2404
+ ) : yn(a, f, x);
2405
+ }, Es = (a, f, p, b, g, _, w) => {
2406
+ const S = a.component = Il(
2407
+ a,
2408
+ b,
2409
+ g
2410
+ );
2411
+ if (Lr(a) && (S.ctx.renderer = vt), Ol(S, !1, w), S.asyncDep) {
2412
+ if (g && g.registerDep(S, se, w), !a.el) {
2413
+ const x = S.subTree = Be(dt);
2414
+ O(null, x, f, p), a.placeholder = x.el;
2415
+ }
2416
+ } else
2417
+ se(
2418
+ S,
2419
+ a,
2420
+ f,
2421
+ p,
2422
+ g,
2423
+ _,
2424
+ w
2425
+ );
2426
+ }, yn = (a, f, p) => {
2427
+ const b = f.component = a.component;
2428
+ if (bl(a, f, p))
2429
+ if (b.asyncDep && !b.asyncResolved) {
2430
+ z(b, f, p);
2431
+ return;
2432
+ } else
2433
+ b.next = f, b.update();
2434
+ else
2435
+ f.el = a.el, b.vnode = f;
2436
+ }, se = (a, f, p, b, g, _, w) => {
2437
+ const S = () => {
2438
+ if (a.isMounted) {
2439
+ let { next: E, bu: A, u: P, parent: L, vnode: W } = a;
2440
+ {
2441
+ const Ce = ti(a);
2442
+ if (Ce) {
2443
+ E && (E.el = W.el, z(a, E, w)), Ce.asyncDep.then(() => {
2444
+ a.isUnmounted || S();
2445
+ });
2446
+ return;
2447
+ }
2448
+ }
2449
+ let k = E, oe;
2450
+ Ze(a, !1), E ? (E.el = W.el, z(a, E, w)) : E = W, A && As(A), (oe = E.props && E.props.onVnodeBeforeUpdate) && we(oe, L, E, W), Ze(a, !0);
2451
+ const le = Hn(a), xe = a.subTree;
2452
+ a.subTree = le, $(
2453
+ xe,
2454
+ le,
2455
+ // parent may have changed if it's in a teleport
2456
+ d(xe.el),
2457
+ // anchor may have changed if it's in a fragment
2458
+ Wt(xe),
2459
+ a,
2460
+ g,
2461
+ _
2462
+ ), E.el = le.el, k === null && yl(a, le.el), P && fe(P, g), (oe = E.props && E.props.onVnodeUpdated) && fe(
2463
+ () => we(oe, L, E, W),
2464
+ g
2465
+ );
2466
+ } else {
2467
+ let E;
2468
+ const { el: A, props: P } = f, { bm: L, m: W, parent: k, root: oe, type: le } = a, xe = Ot(f);
2469
+ Ze(a, !1), L && As(L), !xe && (E = P && P.onVnodeBeforeMount) && we(E, k, f), Ze(a, !0);
2470
+ {
2471
+ oe.ce && // @ts-expect-error _def is private
2472
+ oe.ce._def.shadowRoot !== !1 && oe.ce._injectChildStyle(le);
2473
+ const Ce = a.subTree = Hn(a);
2474
+ $(
2475
+ null,
2476
+ Ce,
2477
+ p,
2478
+ b,
2479
+ a,
2480
+ g,
2481
+ _
2482
+ ), f.el = Ce.el;
2483
+ }
2484
+ if (W && fe(W, g), !xe && (E = P && P.onVnodeMounted)) {
2485
+ const Ce = f;
2486
+ fe(
2487
+ () => we(E, k, Ce),
2488
+ g
2489
+ );
2490
+ }
2491
+ (f.shapeFlag & 256 || k && Ot(k.vnode) && k.vnode.shapeFlag & 256) && a.a && fe(a.a, g), a.isMounted = !0, f = p = b = null;
2492
+ }
2493
+ };
2494
+ a.scope.on();
2495
+ const x = a.effect = new hr(S);
2496
+ a.scope.off();
2497
+ const y = a.update = x.run.bind(x), I = a.job = x.runIfDirty.bind(x);
2498
+ I.i = a, I.id = a.uid, x.scheduler = () => un(I), Ze(a, !0), y();
2499
+ }, z = (a, f, p) => {
2500
+ f.component = a;
2501
+ const b = a.vnode.props;
2502
+ a.vnode = f, a.next = null, tl(a, f.props, b, p), il(a, f.children, p), Le(), In(a), je();
2503
+ }, K = (a, f, p, b, g, _, w, S, x = !1) => {
2504
+ const y = a && a.children, I = a ? a.shapeFlag : 0, E = f.children, { patchFlag: A, shapeFlag: P } = f;
2505
+ if (A > 0) {
2506
+ if (A & 128) {
2507
+ Kt(
2508
+ y,
2509
+ E,
2510
+ p,
2511
+ b,
2512
+ g,
2513
+ _,
2514
+ w,
2515
+ S,
2516
+ x
2517
+ );
2518
+ return;
2519
+ } else if (A & 256) {
2520
+ Je(
2521
+ y,
2522
+ E,
2523
+ p,
2524
+ b,
2525
+ g,
2526
+ _,
2527
+ w,
2528
+ S,
2529
+ x
2530
+ );
2531
+ return;
2532
+ }
2533
+ }
2534
+ P & 8 ? (I & 16 && _t(y, g, _), E !== y && u(p, E)) : I & 16 ? P & 16 ? Kt(
2535
+ y,
2536
+ E,
2537
+ p,
2538
+ b,
2539
+ g,
2540
+ _,
2541
+ w,
2542
+ S,
2543
+ x
2544
+ ) : _t(y, g, _, !0) : (I & 8 && u(p, ""), P & 16 && be(
2545
+ E,
2546
+ p,
2547
+ b,
2548
+ g,
2549
+ _,
2550
+ w,
2551
+ S,
2552
+ x
2553
+ ));
2554
+ }, Je = (a, f, p, b, g, _, w, S, x) => {
2555
+ a = a || ct, f = f || ct;
2556
+ const y = a.length, I = f.length, E = Math.min(y, I);
2557
+ let A;
2558
+ for (A = 0; A < E; A++) {
2559
+ const P = f[A] = x ? Ve(f[A]) : Te(f[A]);
2560
+ $(
2561
+ a[A],
2562
+ P,
2563
+ p,
2564
+ null,
2565
+ g,
2566
+ _,
2567
+ w,
2568
+ S,
2569
+ x
2570
+ );
2571
+ }
2572
+ y > I ? _t(
2573
+ a,
2574
+ g,
2575
+ _,
2576
+ !0,
2577
+ !1,
2578
+ E
2579
+ ) : be(
2580
+ f,
2581
+ p,
2582
+ b,
2583
+ g,
2584
+ _,
2585
+ w,
2586
+ S,
2587
+ x,
2588
+ E
2589
+ );
2590
+ }, Kt = (a, f, p, b, g, _, w, S, x) => {
2591
+ let y = 0;
2592
+ const I = f.length;
2593
+ let E = a.length - 1, A = I - 1;
2594
+ for (; y <= E && y <= A; ) {
2595
+ const P = a[y], L = f[y] = x ? Ve(f[y]) : Te(f[y]);
2596
+ if (xt(P, L))
2597
+ $(
2598
+ P,
2599
+ L,
2600
+ p,
2601
+ null,
2602
+ g,
2603
+ _,
2604
+ w,
2605
+ S,
2606
+ x
2607
+ );
2608
+ else
2609
+ break;
2610
+ y++;
2611
+ }
2612
+ for (; y <= E && y <= A; ) {
2613
+ const P = a[E], L = f[A] = x ? Ve(f[A]) : Te(f[A]);
2614
+ if (xt(P, L))
2615
+ $(
2616
+ P,
2617
+ L,
2618
+ p,
2619
+ null,
2620
+ g,
2621
+ _,
2622
+ w,
2623
+ S,
2624
+ x
2625
+ );
2626
+ else
2627
+ break;
2628
+ E--, A--;
2629
+ }
2630
+ if (y > E) {
2631
+ if (y <= A) {
2632
+ const P = A + 1, L = P < I ? f[P].el : b;
2633
+ for (; y <= A; )
2634
+ $(
2635
+ null,
2636
+ f[y] = x ? Ve(f[y]) : Te(f[y]),
2637
+ p,
2638
+ L,
2639
+ g,
2640
+ _,
2641
+ w,
2642
+ S,
2643
+ x
2644
+ ), y++;
2645
+ }
2646
+ } else if (y > A)
2647
+ for (; y <= E; )
2648
+ ye(a[y], g, _, !0), y++;
2649
+ else {
2650
+ const P = y, L = y, W = /* @__PURE__ */ new Map();
2651
+ for (y = L; y <= A; y++) {
2652
+ const ue = f[y] = x ? Ve(f[y]) : Te(f[y]);
2653
+ ue.key != null && W.set(ue.key, y);
2654
+ }
2655
+ let k, oe = 0;
2656
+ const le = A - L + 1;
2657
+ let xe = !1, Ce = 0;
2658
+ const bt = new Array(le);
2659
+ for (y = 0; y < le; y++) bt[y] = 0;
2660
+ for (y = P; y <= E; y++) {
2661
+ const ue = a[y];
2662
+ if (oe >= le) {
2663
+ ye(ue, g, _, !0);
2664
+ continue;
2665
+ }
2666
+ let Se;
2667
+ if (ue.key != null)
2668
+ Se = W.get(ue.key);
2669
+ else
2670
+ for (k = L; k <= A; k++)
2671
+ if (bt[k - L] === 0 && xt(ue, f[k])) {
2672
+ Se = k;
2673
+ break;
2674
+ }
2675
+ Se === void 0 ? ye(ue, g, _, !0) : (bt[Se - L] = y + 1, Se >= Ce ? Ce = Se : xe = !0, $(
2676
+ ue,
2677
+ f[Se],
2678
+ p,
2679
+ null,
2680
+ g,
2681
+ _,
2682
+ w,
2683
+ S,
2684
+ x
2685
+ ), oe++);
2686
+ }
2687
+ const Sn = xe ? al(bt) : ct;
2688
+ for (k = Sn.length - 1, y = le - 1; y >= 0; y--) {
2689
+ const ue = L + y, Se = f[ue], wn = f[ue + 1], En = ue + 1 < I ? (
2690
+ // #13559, fallback to el placeholder for unresolved async component
2691
+ wn.el || wn.placeholder
2692
+ ) : b;
2693
+ bt[y] === 0 ? $(
2694
+ null,
2695
+ Se,
2696
+ p,
2697
+ En,
2698
+ g,
2699
+ _,
2700
+ w,
2701
+ S,
2702
+ x
2703
+ ) : xe && (k < 0 || y !== Sn[k] ? Ge(Se, p, En, 2) : k--);
2704
+ }
2705
+ }
2706
+ }, Ge = (a, f, p, b, g = null) => {
2707
+ const { el: _, type: w, transition: S, children: x, shapeFlag: y } = a;
2708
+ if (y & 6) {
2709
+ Ge(a.component.subTree, f, p, b);
2710
+ return;
2711
+ }
2712
+ if (y & 128) {
2713
+ a.suspense.move(f, p, b);
2714
+ return;
2715
+ }
2716
+ if (y & 64) {
2717
+ w.move(a, f, p, vt);
2718
+ return;
2719
+ }
2720
+ if (w === ge) {
2721
+ n(_, f, p);
2722
+ for (let E = 0; E < x.length; E++)
2723
+ Ge(x[E], f, p, b);
2724
+ n(a.anchor, f, p);
2725
+ return;
2726
+ }
2727
+ if (w === Rs) {
2728
+ D(a, f, p);
2729
+ return;
2730
+ }
2731
+ if (b !== 2 && y & 1 && S)
2732
+ if (b === 0)
2733
+ S.beforeEnter(_), n(_, f, p), fe(() => S.enter(_), g);
2734
+ else {
2735
+ const { leave: E, delayLeave: A, afterLeave: P } = S, L = () => {
2736
+ a.ctx.isUnmounted ? r(_) : n(_, f, p);
2737
+ }, W = () => {
2738
+ _._isLeaving && _[No](
2739
+ !0
2740
+ /* cancelled */
2741
+ ), E(_, () => {
2742
+ L(), P && P();
2743
+ });
2744
+ };
2745
+ A ? A(_, L, W) : W();
2746
+ }
2747
+ else
2748
+ n(_, f, p);
2749
+ }, ye = (a, f, p, b = !1, g = !1) => {
2750
+ const {
2751
+ type: _,
2752
+ props: w,
2753
+ ref: S,
2754
+ children: x,
2755
+ dynamicChildren: y,
2756
+ shapeFlag: I,
2757
+ patchFlag: E,
2758
+ dirs: A,
2759
+ cacheIndex: P
2760
+ } = a;
2761
+ if (E === -2 && (g = !1), S != null && (Le(), It(S, null, p, a, !0), je()), P != null && (f.renderCache[P] = void 0), I & 256) {
2762
+ f.ctx.deactivate(a);
2763
+ return;
2764
+ }
2765
+ const L = I & 1 && A, W = !Ot(a);
2766
+ let k;
2767
+ if (W && (k = w && w.onVnodeBeforeUnmount) && we(k, f, a), I & 6)
2768
+ Fi(a.component, p, b);
2769
+ else {
2770
+ if (I & 128) {
2771
+ a.suspense.unmount(p, b);
2772
+ return;
2773
+ }
2774
+ L && Ye(a, null, f, "beforeUnmount"), I & 64 ? a.type.remove(
2775
+ a,
2776
+ f,
2777
+ p,
2778
+ vt,
2779
+ b
2780
+ ) : y && // #5154
2781
+ // when v-once is used inside a block, setBlockTracking(-1) marks the
2782
+ // parent block with hasOnce: true
2783
+ // so that it doesn't take the fast path during unmount - otherwise
2784
+ // components nested in v-once are never unmounted.
2785
+ !y.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
2786
+ (_ !== ge || E > 0 && E & 64) ? _t(
2787
+ y,
2788
+ f,
2789
+ p,
2790
+ !1,
2791
+ !0
2792
+ ) : (_ === ge && E & 384 || !g && I & 16) && _t(x, f, p), b && xn(a);
2793
+ }
2794
+ (W && (k = w && w.onVnodeUnmounted) || L) && fe(() => {
2795
+ k && we(k, f, a), L && Ye(a, null, f, "unmounted");
2796
+ }, p);
2797
+ }, xn = (a) => {
2798
+ const { type: f, el: p, anchor: b, transition: g } = a;
2799
+ if (f === ge) {
2800
+ Mi(p, b);
2801
+ return;
2802
+ }
2803
+ if (f === Rs) {
2804
+ T(a);
2805
+ return;
2806
+ }
2807
+ const _ = () => {
2808
+ r(p), g && !g.persisted && g.afterLeave && g.afterLeave();
2809
+ };
2810
+ if (a.shapeFlag & 1 && g && !g.persisted) {
2811
+ const { leave: w, delayLeave: S } = g, x = () => w(p, _);
2812
+ S ? S(a.el, _, x) : x();
2813
+ } else
2814
+ _();
2815
+ }, Mi = (a, f) => {
2816
+ let p;
2817
+ for (; a !== f; )
2818
+ p = m(a), r(a), a = p;
2819
+ r(f);
2820
+ }, Fi = (a, f, p) => {
2821
+ const { bum: b, scope: g, job: _, subTree: w, um: S, m: x, a: y } = a;
2822
+ Ln(x), Ln(y), b && As(b), g.stop(), _ && (_.flags |= 8, ye(w, a, f, p)), S && fe(S, f), fe(() => {
2823
+ a.isUnmounted = !0;
2824
+ }, f);
2825
+ }, _t = (a, f, p, b = !1, g = !1, _ = 0) => {
2826
+ for (let w = _; w < a.length; w++)
2827
+ ye(a[w], f, p, b, g);
2828
+ }, Wt = (a) => {
2829
+ if (a.shapeFlag & 6)
2830
+ return Wt(a.component.subTree);
2831
+ if (a.shapeFlag & 128)
2832
+ return a.suspense.next();
2833
+ const f = m(a.anchor || a.el), p = f && f[Mo];
2834
+ return p ? m(p) : f;
2835
+ };
2836
+ let Ts = !1;
2837
+ const Cn = (a, f, p) => {
2838
+ a == null ? f._vnode && ye(f._vnode, null, null, !0) : $(
2839
+ f._vnode || null,
2840
+ a,
2841
+ f,
2842
+ null,
2843
+ null,
2844
+ null,
2845
+ p
2846
+ ), f._vnode = a, Ts || (Ts = !0, In(), Mr(), Ts = !1);
2847
+ }, vt = {
2848
+ p: $,
2849
+ um: ye,
2850
+ m: Ge,
2851
+ r: xn,
2852
+ mt: Es,
2853
+ mc: be,
2854
+ pc: K,
2855
+ pbc: Oe,
2856
+ n: Wt,
2857
+ o: e
2858
+ };
2859
+ return {
2860
+ render: Cn,
2861
+ hydrate: void 0,
2862
+ createApp: Qo(Cn)
2863
+ };
2864
+ }
2865
+ function Ns({ type: e, props: t }, s) {
2866
+ return s === "svg" && e === "foreignObject" || s === "mathml" && e === "annotation-xml" && t && t.encoding && t.encoding.includes("html") ? void 0 : s;
2867
+ }
2868
+ function Ze({ effect: e, job: t }, s) {
2869
+ s ? (e.flags |= 32, t.flags |= 4) : (e.flags &= -33, t.flags &= -5);
2870
+ }
2871
+ function cl(e, t) {
2872
+ return (!e || e && !e.pendingBranch) && t && !t.persisted;
2873
+ }
2874
+ function ei(e, t, s = !1) {
2875
+ const n = e.children, r = t.children;
2876
+ if (M(n) && M(r))
2877
+ for (let i = 0; i < n.length; i++) {
2878
+ const o = n[i];
2879
+ let l = r[i];
2880
+ l.shapeFlag & 1 && !l.dynamicChildren && ((l.patchFlag <= 0 || l.patchFlag === 32) && (l = r[i] = Ve(r[i]), l.el = o.el), !s && l.patchFlag !== -2 && ei(o, l)), l.type === Cs && // avoid cached text nodes retaining detached dom nodes
2881
+ l.patchFlag !== -1 && (l.el = o.el), l.type === dt && !l.el && (l.el = o.el);
2882
+ }
2883
+ }
2884
+ function al(e) {
2885
+ const t = e.slice(), s = [0];
2886
+ let n, r, i, o, l;
2887
+ const c = e.length;
2888
+ for (n = 0; n < c; n++) {
2889
+ const h = e[n];
2890
+ if (h !== 0) {
2891
+ if (r = s[s.length - 1], e[r] < h) {
2892
+ t[n] = r, s.push(n);
2893
+ continue;
2894
+ }
2895
+ for (i = 0, o = s.length - 1; i < o; )
2896
+ l = i + o >> 1, e[s[l]] < h ? i = l + 1 : o = l;
2897
+ h < e[s[i]] && (i > 0 && (t[n] = s[i - 1]), s[i] = n);
2898
+ }
2899
+ }
2900
+ for (i = s.length, o = s[i - 1]; i-- > 0; )
2901
+ s[i] = o, o = t[o];
2902
+ return s;
2903
+ }
2904
+ function ti(e) {
2905
+ const t = e.subTree.component;
2906
+ if (t)
2907
+ return t.asyncDep && !t.asyncResolved ? t : ti(t);
2908
+ }
2909
+ function Ln(e) {
2910
+ if (e)
2911
+ for (let t = 0; t < e.length; t++)
2912
+ e[t].flags |= 8;
2913
+ }
2914
+ const ul = Symbol.for("v-scx"), fl = () => Mt(ul);
2915
+ function hl(e, t) {
2916
+ return ys(e, null, t);
2917
+ }
2918
+ function dl(e, t) {
2919
+ return ys(
2920
+ e,
2921
+ null,
2922
+ { flush: "sync" }
2923
+ );
2924
+ }
2925
+ function Ft(e, t, s) {
2926
+ return ys(e, t, s);
2927
+ }
2928
+ function ys(e, t, s = j) {
2929
+ const { immediate: n, deep: r, flush: i, once: o } = s, l = ee({}, s), c = t && n || !t && i !== "post";
2930
+ let h;
2931
+ if (Ht) {
2932
+ if (i === "sync") {
2933
+ const v = fl();
2934
+ h = v.__watcherHandles || (v.__watcherHandles = []);
2935
+ } else if (!c) {
2936
+ const v = () => {
2937
+ };
2938
+ return v.stop = $e, v.resume = $e, v.pause = $e, v;
2939
+ }
2940
+ }
2941
+ const u = ie;
2942
+ l.call = (v, C, $) => Ae(v, u, C, $);
2943
+ let d = !1;
2944
+ i === "post" ? l.scheduler = (v) => {
2945
+ fe(v, u && u.suspense);
2946
+ } : i !== "sync" && (d = !0, l.scheduler = (v, C) => {
2947
+ C ? v() : un(v);
2948
+ }), l.augmentJob = (v) => {
2949
+ t && (v.flags |= 4), d && (v.flags |= 2, u && (v.id = u.uid, v.i = u));
2950
+ };
2951
+ const m = To(e, t, l);
2952
+ return Ht && (h ? h.push(m) : c && m()), m;
2953
+ }
2954
+ function pl(e, t, s) {
2955
+ const n = this.proxy, r = Z(e) ? e.includes(".") ? si(n, e) : () => n[e] : e.bind(n, n);
2956
+ let i;
2957
+ F(t) ? i = t : (i = t.handler, s = t);
2958
+ const o = Vt(this), l = ys(r, i.bind(n), s);
2959
+ return o(), l;
2960
+ }
2961
+ function si(e, t) {
2962
+ const s = t.split(".");
2963
+ return () => {
2964
+ let n = e;
2965
+ for (let r = 0; r < s.length && n; r++)
2966
+ n = n[s[r]];
2967
+ return n;
2968
+ };
2969
+ }
2970
+ function jn(e, t, s = j) {
2971
+ const n = gn(), r = De(t), i = qe(t), o = ni(e, r), l = Co((c, h) => {
2972
+ let u, d = j, m;
2973
+ return dl(() => {
2974
+ const v = e[r];
2975
+ ae(u, v) && (u = v, h());
2976
+ }), {
2977
+ get() {
2978
+ return c(), s.get ? s.get(u) : u;
2979
+ },
2980
+ set(v) {
2981
+ const C = s.set ? s.set(v) : v;
2982
+ if (!ae(C, u) && !(d !== j && ae(v, d)))
2983
+ return;
2984
+ const $ = n.vnode.props;
2985
+ $ && // check if parent has passed v-model
2986
+ (t in $ || r in $ || i in $) && (`onUpdate:${t}` in $ || `onUpdate:${r}` in $ || `onUpdate:${i}` in $) || (u = v, h()), n.emit(`update:${t}`, C), ae(v, C) && ae(v, d) && !ae(C, m) && h(), d = v, m = C;
2987
+ }
2988
+ };
2989
+ });
2990
+ return l[Symbol.iterator] = () => {
2991
+ let c = 0;
2992
+ return {
2993
+ next() {
2994
+ return c < 2 ? { value: c++ ? o || j : l, done: !1 } : { done: !0 };
2995
+ }
2996
+ };
2997
+ }, l;
2998
+ }
2999
+ const ni = (e, t) => t === "modelValue" || t === "model-value" ? e.modelModifiers : e[`${t}Modifiers`] || e[`${De(t)}Modifiers`] || e[`${qe(t)}Modifiers`];
3000
+ function ml(e, t, ...s) {
3001
+ if (e.isUnmounted) return;
3002
+ const n = e.vnode.props || j;
3003
+ let r = s;
3004
+ const i = t.startsWith("update:"), o = i && ni(n, t.slice(7));
3005
+ o && (o.trim && (r = s.map((u) => Z(u) ? u.trim() : u)), o.number && (r = s.map(Bi)));
3006
+ let l, c = n[l = $s(t)] || // also try camelCase event handler (#2249)
3007
+ n[l = $s(De(t))];
3008
+ !c && i && (c = n[l = $s(qe(t))]), c && Ae(
3009
+ c,
3010
+ e,
3011
+ 6,
3012
+ r
3013
+ );
3014
+ const h = n[l + "Once"];
3015
+ if (h) {
3016
+ if (!e.emitted)
3017
+ e.emitted = {};
3018
+ else if (e.emitted[l])
3019
+ return;
3020
+ e.emitted[l] = !0, Ae(
3021
+ h,
3022
+ e,
3023
+ 6,
3024
+ r
3025
+ );
3026
+ }
3027
+ }
3028
+ const gl = /* @__PURE__ */ new WeakMap();
3029
+ function ri(e, t, s = !1) {
3030
+ const n = s ? gl : t.emitsCache, r = n.get(e);
3031
+ if (r !== void 0)
3032
+ return r;
3033
+ const i = e.emits;
3034
+ let o = {}, l = !1;
3035
+ if (!F(e)) {
3036
+ const c = (h) => {
3037
+ const u = ri(h, t, !0);
3038
+ u && (l = !0, ee(o, u));
3039
+ };
3040
+ !s && t.mixins.length && t.mixins.forEach(c), e.extends && c(e.extends), e.mixins && e.mixins.forEach(c);
3041
+ }
3042
+ return !i && !l ? (J(e) && n.set(e, null), null) : (M(i) ? i.forEach((c) => o[c] = null) : ee(o, i), J(e) && n.set(e, o), o);
3043
+ }
3044
+ function xs(e, t) {
3045
+ return !e || !fs(t) ? !1 : (t = t.slice(2).replace(/Once$/, ""), B(e, t[0].toLowerCase() + t.slice(1)) || B(e, qe(t)) || B(e, t));
3046
+ }
3047
+ function Hn(e) {
3048
+ const {
3049
+ type: t,
3050
+ vnode: s,
3051
+ proxy: n,
3052
+ withProxy: r,
3053
+ propsOptions: [i],
3054
+ slots: o,
3055
+ attrs: l,
3056
+ emit: c,
3057
+ render: h,
3058
+ renderCache: u,
3059
+ props: d,
3060
+ data: m,
3061
+ setupState: v,
3062
+ ctx: C,
3063
+ inheritAttrs: $
3064
+ } = e, U = rs(e);
3065
+ let O, R;
3066
+ try {
3067
+ if (s.shapeFlag & 4) {
3068
+ const T = r || n, N = T;
3069
+ O = Te(
3070
+ h.call(
3071
+ N,
3072
+ T,
3073
+ u,
3074
+ d,
3075
+ v,
3076
+ m,
3077
+ C
3078
+ )
3079
+ ), R = l;
3080
+ } else {
3081
+ const T = t;
3082
+ O = Te(
3083
+ T.length > 1 ? T(
3084
+ d,
3085
+ { attrs: l, slots: o, emit: c }
3086
+ ) : T(
3087
+ d,
3088
+ null
3089
+ )
3090
+ ), R = t.props ? l : _l(l);
3091
+ }
3092
+ } catch (T) {
3093
+ Nt.length = 0, vs(T, e, 1), O = Be(dt);
3094
+ }
3095
+ let D = O;
3096
+ if (R && $ !== !1) {
3097
+ const T = Object.keys(R), { shapeFlag: N } = D;
3098
+ T.length && N & 7 && (i && T.some(Xs) && (R = vl(
3099
+ R,
3100
+ i
3101
+ )), D = pt(D, R, !1, !0));
3102
+ }
3103
+ return s.dirs && (D = pt(D, null, !1, !0), D.dirs = D.dirs ? D.dirs.concat(s.dirs) : s.dirs), s.transition && fn(D, s.transition), O = D, rs(U), O;
3104
+ }
3105
+ const _l = (e) => {
3106
+ let t;
3107
+ for (const s in e)
3108
+ (s === "class" || s === "style" || fs(s)) && ((t || (t = {}))[s] = e[s]);
3109
+ return t;
3110
+ }, vl = (e, t) => {
3111
+ const s = {};
3112
+ for (const n in e)
3113
+ (!Xs(n) || !(n.slice(9) in t)) && (s[n] = e[n]);
3114
+ return s;
3115
+ };
3116
+ function bl(e, t, s) {
3117
+ const { props: n, children: r, component: i } = e, { props: o, children: l, patchFlag: c } = t, h = i.emitsOptions;
3118
+ if (t.dirs || t.transition)
3119
+ return !0;
3120
+ if (s && c >= 0) {
3121
+ if (c & 1024)
3122
+ return !0;
3123
+ if (c & 16)
3124
+ return n ? Un(n, o, h) : !!o;
3125
+ if (c & 8) {
3126
+ const u = t.dynamicProps;
3127
+ for (let d = 0; d < u.length; d++) {
3128
+ const m = u[d];
3129
+ if (o[m] !== n[m] && !xs(h, m))
3130
+ return !0;
3131
+ }
3132
+ }
3133
+ } else
3134
+ return (r || l) && (!l || !l.$stable) ? !0 : n === o ? !1 : n ? o ? Un(n, o, h) : !0 : !!o;
3135
+ return !1;
3136
+ }
3137
+ function Un(e, t, s) {
3138
+ const n = Object.keys(t);
3139
+ if (n.length !== Object.keys(e).length)
3140
+ return !0;
3141
+ for (let r = 0; r < n.length; r++) {
3142
+ const i = n[r];
3143
+ if (t[i] !== e[i] && !xs(s, i))
3144
+ return !0;
3145
+ }
3146
+ return !1;
3147
+ }
3148
+ function yl({ vnode: e, parent: t }, s) {
3149
+ for (; t; ) {
3150
+ const n = t.subTree;
3151
+ if (n.suspense && n.suspense.activeBranch === e && (n.el = e.el), n === e)
3152
+ (e = t.vnode).el = s, t = t.parent;
3153
+ else
3154
+ break;
3155
+ }
3156
+ }
3157
+ const ii = (e) => e.__isSuspense;
3158
+ function xl(e, t) {
3159
+ t && t.pendingBranch ? M(e) ? t.effects.push(...e) : t.effects.push(e) : Io(e);
3160
+ }
3161
+ const ge = Symbol.for("v-fgt"), Cs = Symbol.for("v-txt"), dt = Symbol.for("v-cmt"), Rs = Symbol.for("v-stc"), Nt = [];
3162
+ let he = null;
3163
+ function lt(e = !1) {
3164
+ Nt.push(he = e ? null : []);
3165
+ }
3166
+ function Cl() {
3167
+ Nt.pop(), he = Nt[Nt.length - 1] || null;
3168
+ }
3169
+ let jt = 1;
3170
+ function Vn(e, t = !1) {
3171
+ jt += e, e < 0 && he && t && (he.hasOnce = !0);
3172
+ }
3173
+ function oi(e) {
3174
+ return e.dynamicChildren = jt > 0 ? he || ct : null, Cl(), jt > 0 && he && he.push(e), e;
3175
+ }
3176
+ function wt(e, t, s, n, r, i) {
3177
+ return oi(
3178
+ Me(
3179
+ e,
3180
+ t,
3181
+ s,
3182
+ n,
3183
+ r,
3184
+ i,
3185
+ !0
3186
+ )
3187
+ );
3188
+ }
3189
+ function Sl(e, t, s, n, r) {
3190
+ return oi(
3191
+ Be(
3192
+ e,
3193
+ t,
3194
+ s,
3195
+ n,
3196
+ r,
3197
+ !0
3198
+ )
3199
+ );
3200
+ }
3201
+ function li(e) {
3202
+ return e ? e.__v_isVNode === !0 : !1;
3203
+ }
3204
+ function xt(e, t) {
3205
+ return e.type === t.type && e.key === t.key;
3206
+ }
3207
+ const ci = ({ key: e }) => e ?? null, Qt = ({
3208
+ ref: e,
3209
+ ref_key: t,
3210
+ ref_for: s
3211
+ }) => (typeof e == "number" && (e = "" + e), e != null ? Z(e) || Q(e) || F(e) ? { i: de, r: e, k: t, f: !!s } : e : null);
3212
+ function Me(e, t = null, s = null, n = 0, r = null, i = e === ge ? 0 : 1, o = !1, l = !1) {
3213
+ const c = {
3214
+ __v_isVNode: !0,
3215
+ __v_skip: !0,
3216
+ type: e,
3217
+ props: t,
3218
+ key: t && ci(t),
3219
+ ref: t && Qt(t),
3220
+ scopeId: Nr,
3221
+ slotScopeIds: null,
3222
+ children: s,
3223
+ component: null,
3224
+ suspense: null,
3225
+ ssContent: null,
3226
+ ssFallback: null,
3227
+ dirs: null,
3228
+ transition: null,
3229
+ el: null,
3230
+ anchor: null,
3231
+ target: null,
3232
+ targetStart: null,
3233
+ targetAnchor: null,
3234
+ staticCount: 0,
3235
+ shapeFlag: i,
3236
+ patchFlag: n,
3237
+ dynamicProps: r,
3238
+ dynamicChildren: null,
3239
+ appContext: null,
3240
+ ctx: de
3241
+ };
3242
+ return l ? (mn(c, s), i & 128 && e.normalize(c)) : s && (c.shapeFlag |= Z(s) ? 8 : 16), jt > 0 && // avoid a block node from tracking itself
3243
+ !o && // has current parent block
3244
+ he && // presence of a patch flag indicates this node needs patching on updates.
3245
+ // component nodes also should always be patched, because even if the
3246
+ // component doesn't need to update, it needs to persist the instance on to
3247
+ // the next vnode so that it can be properly unmounted later.
3248
+ (c.patchFlag > 0 || i & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
3249
+ // vnode should not be considered dynamic due to handler caching.
3250
+ c.patchFlag !== 32 && he.push(c), c;
3251
+ }
3252
+ const Be = wl;
3253
+ function wl(e, t = null, s = null, n = 0, r = null, i = !1) {
3254
+ if ((!e || e === Wo) && (e = dt), li(e)) {
3255
+ const l = pt(
3256
+ e,
3257
+ t,
3258
+ !0
3259
+ /* mergeRef: true */
3260
+ );
3261
+ return s && mn(l, s), jt > 0 && !i && he && (l.shapeFlag & 6 ? he[he.indexOf(e)] = l : he.push(l)), l.patchFlag = -2, l;
3262
+ }
3263
+ if (Nl(e) && (e = e.__vccOpts), t) {
3264
+ t = El(t);
3265
+ let { class: l, style: c } = t;
3266
+ l && !Z(l) && (t.class = ms(l)), J(c) && (an(c) && !M(c) && (c = ee({}, c)), t.style = tn(c));
3267
+ }
3268
+ const o = Z(e) ? 1 : ii(e) ? 128 : Fo(e) ? 64 : J(e) ? 4 : F(e) ? 2 : 0;
3269
+ return Me(
3270
+ e,
3271
+ t,
3272
+ s,
3273
+ n,
3274
+ r,
3275
+ o,
3276
+ i,
3277
+ !0
3278
+ );
3279
+ }
3280
+ function El(e) {
3281
+ return e ? an(e) || Jr(e) ? ee({}, e) : e : null;
3282
+ }
3283
+ function pt(e, t, s = !1, n = !1) {
3284
+ const { props: r, ref: i, patchFlag: o, children: l, transition: c } = e, h = t ? ai(r || {}, t) : r, u = {
3285
+ __v_isVNode: !0,
3286
+ __v_skip: !0,
3287
+ type: e.type,
3288
+ props: h,
3289
+ key: h && ci(h),
3290
+ ref: t && t.ref ? (
3291
+ // #2078 in the case of <component :is="vnode" ref="extra"/>
3292
+ // if the vnode itself already has a ref, cloneVNode will need to merge
3293
+ // the refs so the single vnode can be set on multiple refs
3294
+ s && i ? M(i) ? i.concat(Qt(t)) : [i, Qt(t)] : Qt(t)
3295
+ ) : i,
3296
+ scopeId: e.scopeId,
3297
+ slotScopeIds: e.slotScopeIds,
3298
+ children: l,
3299
+ target: e.target,
3300
+ targetStart: e.targetStart,
3301
+ targetAnchor: e.targetAnchor,
3302
+ staticCount: e.staticCount,
3303
+ shapeFlag: e.shapeFlag,
3304
+ // if the vnode is cloned with extra props, we can no longer assume its
3305
+ // existing patch flag to be reliable and need to add the FULL_PROPS flag.
3306
+ // note: preserve flag for fragments since they use the flag for children
3307
+ // fast paths only.
3308
+ patchFlag: t && e.type !== ge ? o === -1 ? 16 : o | 16 : o,
3309
+ dynamicProps: e.dynamicProps,
3310
+ dynamicChildren: e.dynamicChildren,
3311
+ appContext: e.appContext,
3312
+ dirs: e.dirs,
3313
+ transition: c,
3314
+ // These should technically only be non-null on mounted VNodes. However,
3315
+ // they *should* be copied for kept-alive vnodes. So we just always copy
3316
+ // them since them being non-null during a mount doesn't affect the logic as
3317
+ // they will simply be overwritten.
3318
+ component: e.component,
3319
+ suspense: e.suspense,
3320
+ ssContent: e.ssContent && pt(e.ssContent),
3321
+ ssFallback: e.ssFallback && pt(e.ssFallback),
3322
+ placeholder: e.placeholder,
3323
+ el: e.el,
3324
+ anchor: e.anchor,
3325
+ ctx: e.ctx,
3326
+ ce: e.ce
3327
+ };
3328
+ return c && n && fn(
3329
+ u,
3330
+ c.clone(u)
3331
+ ), u;
3332
+ }
3333
+ function Tl(e = " ", t = 0) {
3334
+ return Be(Cs, null, e, t);
3335
+ }
3336
+ function Te(e) {
3337
+ return e == null || typeof e == "boolean" ? Be(dt) : M(e) ? Be(
3338
+ ge,
3339
+ null,
3340
+ // #3666, avoid reference pollution when reusing vnode
3341
+ e.slice()
3342
+ ) : li(e) ? Ve(e) : Be(Cs, null, String(e));
3343
+ }
3344
+ function Ve(e) {
3345
+ return e.el === null && e.patchFlag !== -1 || e.memo ? e : pt(e);
3346
+ }
3347
+ function mn(e, t) {
3348
+ let s = 0;
3349
+ const { shapeFlag: n } = e;
3350
+ if (t == null)
3351
+ t = null;
3352
+ else if (M(t))
3353
+ s = 16;
3354
+ else if (typeof t == "object")
3355
+ if (n & 65) {
3356
+ const r = t.default;
3357
+ r && (r._c && (r._d = !1), mn(e, r()), r._c && (r._d = !0));
3358
+ return;
3359
+ } else {
3360
+ s = 32;
3361
+ const r = t._;
3362
+ !r && !Jr(t) ? t._ctx = de : r === 3 && de && (de.slots._ === 1 ? t._ = 1 : (t._ = 2, e.patchFlag |= 1024));
3363
+ }
3364
+ else F(t) ? (t = { default: t, _ctx: de }, s = 32) : (t = String(t), n & 64 ? (s = 16, t = [Tl(t)]) : s = 8);
3365
+ e.children = t, e.shapeFlag |= s;
3366
+ }
3367
+ function ai(...e) {
3368
+ const t = {};
3369
+ for (let s = 0; s < e.length; s++) {
3370
+ const n = e[s];
3371
+ for (const r in n)
3372
+ if (r === "class")
3373
+ t.class !== n.class && (t.class = ms([t.class, n.class]));
3374
+ else if (r === "style")
3375
+ t.style = tn([t.style, n.style]);
3376
+ else if (fs(r)) {
3377
+ const i = t[r], o = n[r];
3378
+ o && i !== o && !(M(i) && i.includes(o)) && (t[r] = i ? [].concat(i, o) : o);
3379
+ } else r !== "" && (t[r] = n[r]);
3380
+ }
3381
+ return t;
3382
+ }
3383
+ function we(e, t, s, n = null) {
3384
+ Ae(e, t, 7, [
3385
+ s,
3386
+ n
3387
+ ]);
3388
+ }
3389
+ const $l = Kr();
3390
+ let Al = 0;
3391
+ function Il(e, t, s) {
3392
+ const n = e.type, r = (t ? t.appContext : e.appContext) || $l, i = {
3393
+ uid: Al++,
3394
+ vnode: e,
3395
+ type: n,
3396
+ parent: t,
3397
+ appContext: r,
3398
+ root: null,
3399
+ // to be immediately set
3400
+ next: null,
3401
+ subTree: null,
3402
+ // will be set synchronously right after creation
3403
+ effect: null,
3404
+ update: null,
3405
+ // will be set synchronously right after creation
3406
+ job: null,
3407
+ scope: new Gi(
3408
+ !0
3409
+ /* detached */
3410
+ ),
3411
+ render: null,
3412
+ proxy: null,
3413
+ exposed: null,
3414
+ exposeProxy: null,
3415
+ withProxy: null,
3416
+ provides: t ? t.provides : Object.create(r.provides),
3417
+ ids: t ? t.ids : ["", 0, 0],
3418
+ accessCache: null,
3419
+ renderCache: [],
3420
+ // local resolved assets
3421
+ components: null,
3422
+ directives: null,
3423
+ // resolved props and emits options
3424
+ propsOptions: Yr(n, r),
3425
+ emitsOptions: ri(n, r),
3426
+ // emit
3427
+ emit: null,
3428
+ // to be set immediately
3429
+ emitted: null,
3430
+ // props default value
3431
+ propsDefaults: j,
3432
+ // inheritAttrs
3433
+ inheritAttrs: n.inheritAttrs,
3434
+ // state
3435
+ ctx: j,
3436
+ data: j,
3437
+ props: j,
3438
+ attrs: j,
3439
+ slots: j,
3440
+ refs: j,
3441
+ setupState: j,
3442
+ setupContext: null,
3443
+ // suspense related
3444
+ suspense: s,
3445
+ suspenseId: s ? s.pendingId : 0,
3446
+ asyncDep: null,
3447
+ asyncResolved: !1,
3448
+ // lifecycle hooks
3449
+ // not using enums here because it results in computed properties
3450
+ isMounted: !1,
3451
+ isUnmounted: !1,
3452
+ isDeactivated: !1,
3453
+ bc: null,
3454
+ c: null,
3455
+ bm: null,
3456
+ m: null,
3457
+ bu: null,
3458
+ u: null,
3459
+ um: null,
3460
+ bum: null,
3461
+ da: null,
3462
+ a: null,
3463
+ rtg: null,
3464
+ rtc: null,
3465
+ ec: null,
3466
+ sp: null
3467
+ };
3468
+ return i.ctx = { _: i }, i.root = t ? t.root : i, i.emit = ml.bind(null, i), e.ce && e.ce(i), i;
3469
+ }
3470
+ let ie = null;
3471
+ const gn = () => ie || de;
3472
+ let cs, qs;
3473
+ {
3474
+ const e = ps(), t = (s, n) => {
3475
+ let r;
3476
+ return (r = e[s]) || (r = e[s] = []), r.push(n), (i) => {
3477
+ r.length > 1 ? r.forEach((o) => o(i)) : r[0](i);
3478
+ };
3479
+ };
3480
+ cs = t(
3481
+ "__VUE_INSTANCE_SETTERS__",
3482
+ (s) => ie = s
3483
+ ), qs = t(
3484
+ "__VUE_SSR_SETTERS__",
3485
+ (s) => Ht = s
3486
+ );
3487
+ }
3488
+ const Vt = (e) => {
3489
+ const t = ie;
3490
+ return cs(e), e.scope.on(), () => {
3491
+ e.scope.off(), cs(t);
3492
+ };
3493
+ }, Bn = () => {
3494
+ ie && ie.scope.off(), cs(null);
3495
+ };
3496
+ function ui(e) {
3497
+ return e.vnode.shapeFlag & 4;
3498
+ }
3499
+ let Ht = !1;
3500
+ function Ol(e, t = !1, s = !1) {
3501
+ t && qs(t);
3502
+ const { props: n, children: r } = e.vnode, i = ui(e);
3503
+ el(e, n, i, t), rl(e, r, s || t);
3504
+ const o = i ? Pl(e, t) : void 0;
3505
+ return t && qs(!1), o;
3506
+ }
3507
+ function Pl(e, t) {
3508
+ const s = e.type;
3509
+ e.accessCache = /* @__PURE__ */ Object.create(null), e.proxy = new Proxy(e.ctx, qo);
3510
+ const { setup: n } = s;
3511
+ if (n) {
3512
+ Le();
3513
+ const r = e.setupContext = n.length > 1 ? Fl(e) : null, i = Vt(e), o = Ut(
3514
+ n,
3515
+ e,
3516
+ 0,
3517
+ [
3518
+ e.props,
3519
+ r
3520
+ ]
3521
+ ), l = rr(o);
3522
+ if (je(), i(), (l || e.sp) && !Ot(e) && Dr(e), l) {
3523
+ if (o.then(Bn, Bn), t)
3524
+ return o.then((c) => {
3525
+ kn(e, c);
3526
+ }).catch((c) => {
3527
+ vs(c, e, 0);
3528
+ });
3529
+ e.asyncDep = o;
3530
+ } else
3531
+ kn(e, o);
3532
+ } else
3533
+ fi(e);
3534
+ }
3535
+ function kn(e, t, s) {
3536
+ F(t) ? e.type.__ssrInlineRender ? e.ssrRender = t : e.render = t : J(t) && (e.setupState = Ir(t)), fi(e);
3537
+ }
3538
+ function fi(e, t, s) {
3539
+ const n = e.type;
3540
+ e.render || (e.render = n.render || $e);
3541
+ {
3542
+ const r = Vt(e);
3543
+ Le();
3544
+ try {
3545
+ zo(e);
3546
+ } finally {
3547
+ je(), r();
3548
+ }
3549
+ }
3550
+ }
3551
+ const Ml = {
3552
+ get(e, t) {
3553
+ return te(e, "get", ""), e[t];
3554
+ }
3555
+ };
3556
+ function Fl(e) {
3557
+ const t = (s) => {
3558
+ e.exposed = s || {};
3559
+ };
3560
+ return {
3561
+ attrs: new Proxy(e.attrs, Ml),
3562
+ slots: e.slots,
3563
+ emit: e.emit,
3564
+ expose: t
3565
+ };
3566
+ }
3567
+ function Ss(e) {
3568
+ return e.exposed ? e.exposeProxy || (e.exposeProxy = new Proxy(Ir(_o(e.exposed)), {
3569
+ get(t, s) {
3570
+ if (s in t)
3571
+ return t[s];
3572
+ if (s in Pt)
3573
+ return Pt[s](e);
3574
+ },
3575
+ has(t, s) {
3576
+ return s in t || s in Pt;
3577
+ }
3578
+ })) : e.proxy;
3579
+ }
3580
+ function Nl(e) {
3581
+ return F(e) && "__vccOpts" in e;
3582
+ }
3583
+ const hi = (e, t) => wo(e, t, Ht), Rl = "3.5.21";
3584
+ /**
3585
+ * @vue/runtime-dom v3.5.21
3586
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
3587
+ * @license MIT
3588
+ **/
3589
+ let zs;
3590
+ const Kn = typeof window < "u" && window.trustedTypes;
3591
+ if (Kn)
3592
+ try {
3593
+ zs = /* @__PURE__ */ Kn.createPolicy("vue", {
3594
+ createHTML: (e) => e
3595
+ });
3596
+ } catch {
3597
+ }
3598
+ const di = zs ? (e) => zs.createHTML(e) : (e) => e, Dl = "http://www.w3.org/2000/svg", Ll = "http://www.w3.org/1998/Math/MathML", Fe = typeof document < "u" ? document : null, Wn = Fe && /* @__PURE__ */ Fe.createElement("template"), jl = {
3599
+ insert: (e, t, s) => {
3600
+ t.insertBefore(e, s || null);
3601
+ },
3602
+ remove: (e) => {
3603
+ const t = e.parentNode;
3604
+ t && t.removeChild(e);
3605
+ },
3606
+ createElement: (e, t, s, n) => {
3607
+ const r = t === "svg" ? Fe.createElementNS(Dl, e) : t === "mathml" ? Fe.createElementNS(Ll, e) : s ? Fe.createElement(e, { is: s }) : Fe.createElement(e);
3608
+ return e === "select" && n && n.multiple != null && r.setAttribute("multiple", n.multiple), r;
3609
+ },
3610
+ createText: (e) => Fe.createTextNode(e),
3611
+ createComment: (e) => Fe.createComment(e),
3612
+ setText: (e, t) => {
3613
+ e.nodeValue = t;
3614
+ },
3615
+ setElementText: (e, t) => {
3616
+ e.textContent = t;
3617
+ },
3618
+ parentNode: (e) => e.parentNode,
3619
+ nextSibling: (e) => e.nextSibling,
3620
+ querySelector: (e) => Fe.querySelector(e),
3621
+ setScopeId(e, t) {
3622
+ e.setAttribute(t, "");
3623
+ },
3624
+ // __UNSAFE__
3625
+ // Reason: innerHTML.
3626
+ // Static content here can only come from compiled templates.
3627
+ // As long as the user only uses trusted templates, this is safe.
3628
+ insertStaticContent(e, t, s, n, r, i) {
3629
+ const o = s ? s.previousSibling : t.lastChild;
3630
+ if (r && (r === i || r.nextSibling))
3631
+ for (; t.insertBefore(r.cloneNode(!0), s), !(r === i || !(r = r.nextSibling)); )
3632
+ ;
3633
+ else {
3634
+ Wn.innerHTML = di(
3635
+ n === "svg" ? `<svg>${e}</svg>` : n === "mathml" ? `<math>${e}</math>` : e
3636
+ );
3637
+ const l = Wn.content;
3638
+ if (n === "svg" || n === "mathml") {
3639
+ const c = l.firstChild;
3640
+ for (; c.firstChild; )
3641
+ l.appendChild(c.firstChild);
3642
+ l.removeChild(c);
3643
+ }
3644
+ t.insertBefore(l, s);
3645
+ }
3646
+ return [
3647
+ // first
3648
+ o ? o.nextSibling : t.firstChild,
3649
+ // last
3650
+ s ? s.previousSibling : t.lastChild
3651
+ ];
3652
+ }
3653
+ }, Hl = Symbol("_vtc");
3654
+ function Ul(e, t, s) {
3655
+ const n = e[Hl];
3656
+ n && (t = (t ? [t, ...n] : [...n]).join(" ")), t == null ? e.removeAttribute("class") : s ? e.setAttribute("class", t) : e.className = t;
3657
+ }
3658
+ const as = Symbol("_vod"), pi = Symbol("_vsh"), Vl = {
3659
+ // used for prop mismatch check during hydration
3660
+ name: "show",
3661
+ beforeMount(e, { value: t }, { transition: s }) {
3662
+ e[as] = e.style.display === "none" ? "" : e.style.display, s && t ? s.beforeEnter(e) : Ct(e, t);
3663
+ },
3664
+ mounted(e, { value: t }, { transition: s }) {
3665
+ s && t && s.enter(e);
3666
+ },
3667
+ updated(e, { value: t, oldValue: s }, { transition: n }) {
3668
+ !t != !s && (n ? t ? (n.beforeEnter(e), Ct(e, !0), n.enter(e)) : n.leave(e, () => {
3669
+ Ct(e, !1);
3670
+ }) : Ct(e, t));
3671
+ },
3672
+ beforeUnmount(e, { value: t }) {
3673
+ Ct(e, t);
3674
+ }
3675
+ };
3676
+ function Ct(e, t) {
3677
+ e.style.display = t ? e[as] : "none", e[pi] = !t;
3678
+ }
3679
+ const Bl = Symbol(""), kl = /(?:^|;)\s*display\s*:/;
3680
+ function Kl(e, t, s) {
3681
+ const n = e.style, r = Z(s);
3682
+ let i = !1;
3683
+ if (s && !r) {
3684
+ if (t)
3685
+ if (Z(t))
3686
+ for (const o of t.split(";")) {
3687
+ const l = o.slice(0, o.indexOf(":")).trim();
3688
+ s[l] == null && es(n, l, "");
3689
+ }
3690
+ else
3691
+ for (const o in t)
3692
+ s[o] == null && es(n, o, "");
3693
+ for (const o in s)
3694
+ o === "display" && (i = !0), es(n, o, s[o]);
3695
+ } else if (r) {
3696
+ if (t !== s) {
3697
+ const o = n[Bl];
3698
+ o && (s += ";" + o), n.cssText = s, i = kl.test(s);
3699
+ }
3700
+ } else t && e.removeAttribute("style");
3701
+ as in e && (e[as] = i ? n.display : "", e[pi] && (n.display = "none"));
3702
+ }
3703
+ const qn = /\s*!important$/;
3704
+ function es(e, t, s) {
3705
+ if (M(s))
3706
+ s.forEach((n) => es(e, t, n));
3707
+ else if (s == null && (s = ""), t.startsWith("--"))
3708
+ e.setProperty(t, s);
3709
+ else {
3710
+ const n = Wl(e, t);
3711
+ qn.test(s) ? e.setProperty(
3712
+ qe(n),
3713
+ s.replace(qn, ""),
3714
+ "important"
3715
+ ) : e[n] = s;
3716
+ }
3717
+ }
3718
+ const zn = ["Webkit", "Moz", "ms"], Ds = {};
3719
+ function Wl(e, t) {
3720
+ const s = Ds[t];
3721
+ if (s)
3722
+ return s;
3723
+ let n = De(t);
3724
+ if (n !== "filter" && n in e)
3725
+ return Ds[t] = n;
3726
+ n = lr(n);
3727
+ for (let r = 0; r < zn.length; r++) {
3728
+ const i = zn[r] + n;
3729
+ if (i in e)
3730
+ return Ds[t] = i;
3731
+ }
3732
+ return t;
3733
+ }
3734
+ const Jn = "http://www.w3.org/1999/xlink";
3735
+ function Gn(e, t, s, n, r, i = Ji(t)) {
3736
+ n && t.startsWith("xlink:") ? s == null ? e.removeAttributeNS(Jn, t.slice(6, t.length)) : e.setAttributeNS(Jn, t, s) : s == null || i && !ar(s) ? e.removeAttribute(t) : e.setAttribute(
3737
+ t,
3738
+ i ? "" : We(s) ? String(s) : s
3739
+ );
3740
+ }
3741
+ function Yn(e, t, s, n, r) {
3742
+ if (t === "innerHTML" || t === "textContent") {
3743
+ s != null && (e[t] = t === "innerHTML" ? di(s) : s);
3744
+ return;
3745
+ }
3746
+ const i = e.tagName;
3747
+ if (t === "value" && i !== "PROGRESS" && // custom elements may use _value internally
3748
+ !i.includes("-")) {
3749
+ const l = i === "OPTION" ? e.getAttribute("value") || "" : e.value, c = s == null ? (
3750
+ // #11647: value should be set as empty string for null and undefined,
3751
+ // but <input type="checkbox"> should be set as 'on'.
3752
+ e.type === "checkbox" ? "on" : ""
3753
+ ) : String(s);
3754
+ (l !== c || !("_value" in e)) && (e.value = c), s == null && e.removeAttribute(t), e._value = s;
3755
+ return;
3756
+ }
3757
+ let o = !1;
3758
+ if (s === "" || s == null) {
3759
+ const l = typeof e[t];
3760
+ l === "boolean" ? s = ar(s) : s == null && l === "string" ? (s = "", o = !0) : l === "number" && (s = 0, o = !0);
3761
+ }
3762
+ try {
3763
+ e[t] = s;
3764
+ } catch {
3765
+ }
3766
+ o && e.removeAttribute(r || t);
3767
+ }
3768
+ function ql(e, t, s, n) {
3769
+ e.addEventListener(t, s, n);
3770
+ }
3771
+ function zl(e, t, s, n) {
3772
+ e.removeEventListener(t, s, n);
3773
+ }
3774
+ const Zn = Symbol("_vei");
3775
+ function Jl(e, t, s, n, r = null) {
3776
+ const i = e[Zn] || (e[Zn] = {}), o = i[t];
3777
+ if (n && o)
3778
+ o.value = n;
3779
+ else {
3780
+ const [l, c] = Gl(t);
3781
+ if (n) {
3782
+ const h = i[t] = Xl(
3783
+ n,
3784
+ r
3785
+ );
3786
+ ql(e, l, h, c);
3787
+ } else o && (zl(e, l, o, c), i[t] = void 0);
3788
+ }
3789
+ }
3790
+ const Xn = /(?:Once|Passive|Capture)$/;
3791
+ function Gl(e) {
3792
+ let t;
3793
+ if (Xn.test(e)) {
3794
+ t = {};
3795
+ let n;
3796
+ for (; n = e.match(Xn); )
3797
+ e = e.slice(0, e.length - n[0].length), t[n[0].toLowerCase()] = !0;
3798
+ }
3799
+ return [e[2] === ":" ? e.slice(3) : qe(e.slice(2)), t];
3800
+ }
3801
+ let Ls = 0;
3802
+ const Yl = /* @__PURE__ */ Promise.resolve(), Zl = () => Ls || (Yl.then(() => Ls = 0), Ls = Date.now());
3803
+ function Xl(e, t) {
3804
+ const s = (n) => {
3805
+ if (!n._vts)
3806
+ n._vts = Date.now();
3807
+ else if (n._vts <= s.attached)
3808
+ return;
3809
+ Ae(
3810
+ Ql(n, s.value),
3811
+ t,
3812
+ 5,
3813
+ [n]
3814
+ );
3815
+ };
3816
+ return s.value = e, s.attached = Zl(), s;
3817
+ }
3818
+ function Ql(e, t) {
3819
+ if (M(t)) {
3820
+ const s = e.stopImmediatePropagation;
3821
+ return e.stopImmediatePropagation = () => {
3822
+ s.call(e), e._stopped = !0;
3823
+ }, t.map(
3824
+ (n) => (r) => !r._stopped && n && n(r)
3825
+ );
3826
+ } else
3827
+ return t;
3828
+ }
3829
+ const Qn = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // lowercase letter
3830
+ e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, ec = (e, t, s, n, r, i) => {
3831
+ const o = r === "svg";
3832
+ t === "class" ? Ul(e, n, o) : t === "style" ? Kl(e, s, n) : fs(t) ? Xs(t) || Jl(e, t, s, n, i) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : tc(e, t, n, o)) ? (Yn(e, t, n), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && Gn(e, t, n, o, i, t !== "value")) : /* #11081 force set props for possible async custom element */ e._isVueCE && (/[A-Z]/.test(t) || !Z(n)) ? Yn(e, De(t), n, i, t) : (t === "true-value" ? e._trueValue = n : t === "false-value" && (e._falseValue = n), Gn(e, t, n, o));
3833
+ };
3834
+ function tc(e, t, s, n) {
3835
+ if (n)
3836
+ return !!(t === "innerHTML" || t === "textContent" || t in e && Qn(t) && F(s));
3837
+ if (t === "spellcheck" || t === "draggable" || t === "translate" || t === "autocorrect" || t === "form" || t === "list" && e.tagName === "INPUT" || t === "type" && e.tagName === "TEXTAREA")
3838
+ return !1;
3839
+ if (t === "width" || t === "height") {
3840
+ const r = e.tagName;
3841
+ if (r === "IMG" || r === "VIDEO" || r === "CANVAS" || r === "SOURCE")
3842
+ return !1;
3843
+ }
3844
+ return Qn(t) && Z(s) ? !1 : t in e;
3845
+ }
3846
+ const sc = /* @__PURE__ */ ee({ patchProp: ec }, jl);
3847
+ let er;
3848
+ function nc() {
3849
+ return er || (er = ol(sc));
3850
+ }
3851
+ const rc = (...e) => {
3852
+ const t = nc().createApp(...e), { mount: s } = t;
3853
+ return t.mount = (n) => {
3854
+ const r = oc(n);
3855
+ if (!r) return;
3856
+ const i = t._component;
3857
+ !F(i) && !i.render && !i.template && (i.template = r.innerHTML), r.nodeType === 1 && (r.textContent = "");
3858
+ const o = s(r, !1, ic(r));
3859
+ return r instanceof Element && (r.removeAttribute("v-cloak"), r.setAttribute("data-v-app", "")), o;
3860
+ }, t;
3861
+ };
3862
+ function ic(e) {
3863
+ if (e instanceof SVGElement)
3864
+ return "svg";
3865
+ if (typeof MathMLElement == "function" && e instanceof MathMLElement)
3866
+ return "mathml";
3867
+ }
3868
+ function oc(e) {
3869
+ return Z(e) ? document.querySelector(e) : e;
3870
+ }
3871
+ const Js = Symbol("IPEInjectKey"), lc = (e, t) => (t ? t.provide(Js, e) : Wr(Js, e), e), cc = () => {
3872
+ const e = Mt(Js);
3873
+ if (!e)
3874
+ throw new Error("InPageEdit instance is not provided");
3875
+ return e;
3876
+ }, me = '@charset "UTF-8";:host{all:initial;font-family:var(--schema-font-family, ui-sans-serif, system-ui, -apple-system)}*,*:before,*:after{box-sizing:border-box}:host{color:var(--schema-color-fg, #111827)}:host{--schema-radius: var(--schema-radius, 10px)}.wrapper{display:block;background:var(--schema-color-bg, #ffffff)}.form{display:grid;gap:12px}.field{display:grid;gap:6px;padding:8px 10px;border:1px solid var(--schema-color-muted, #e5e7eb);border-radius:var(--schema-radius);background:var(--schema-surface, #fff)}.label{font-size:12px;color:var(--schema-color-muted-text, #6b7280)}.input,select,textarea{width:100%;padding:8px 10px;border-radius:8px;border:1px solid var(--schema-color-muted, #e5e7eb);background:var(--schema-input-bg, #fff);color:inherit}.checkbox{display:inline-flex;align-items:center;gap:8px}.helper{font-size:12px;color:var(--schema-color-muted-text, #6b7280)}.row{display:grid;gap:8px}.actions{display:flex;gap:8px}.btn{padding:6px 10px;border:1px solid var(--schema-color-muted, #e5e7eb);background:var(--schema-btn-bg, #f8fafc);border-radius:8px;cursor:pointer}.btn.primary{background:var(--schema-color-primary, #2563eb);color:#fff;border-color:transparent}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.danger{background:var(--schema-color-danger, #dc2626);color:#fff;border-color:transparent}.group{display:grid;gap:10px;border-left:3px solid var(--schema-color-muted, #e5e7eb);padding-left:10px}.kv{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:center}.badge{display:inline-flex;padding:2px 6px;border-radius:999px;font-size:11px;background:var(--schema-badge-bg, #eef2ff);color:var(--schema-badge-fg, #4f46e5)}.hidden{display:none!important}.toolbar{display:flex;gap:6px}.schema-collection-row{position:relative;transition:transform var(--schema-collection-transition-duration, .25s) var(--schema-collection-transition-ease, ease),opacity var(--schema-collection-transition-duration, .25s) var(--schema-collection-transition-ease, ease)}.schema-collection-row.enter{opacity:0}.schema-collection-row.enter.enter-active{opacity:1}.schema-collection-row.leaving{opacity:0}.field.schema-type-array .group,.field.schema-type-array .group .row{position:relative}';
3877
+ /**
3878
+ * SchemaForm
3879
+ * 一个基于 Schemastery 的 Web Components 表单生成器
3880
+ *
3881
+ * ✅ 使用 TypeScript,组件前缀统一为 <schema-*>
3882
+ * ✅ 简单样式 + 通过 CSS 变量 --schema-* 配置主题
3883
+ * ✅ 暴露 API:设置/获取表单数据、设置 Schema、校验
3884
+ * ✅ 支持的类型:string / number / boolean / date / const / object / array / tuple / dict / union
3885
+ * ✅ 支持按类型拆分的独立 Field 组件:<schema-form-string> 等,可单独使用
3886
+ * ✅ 字段容器带类名:schema-form-item schema-type-xxx,并带 data-path="a.b.0.c"
3887
+ * ✅ schema-form-array 支持条目上下移动
3888
+ * ✅ 主类为泛型:SchemaForm<T>
3889
+ * ✅ 提供 createSchemasteryForm<T>() 工厂,返回带强类型的 FormInstance<T>
3890
+ *
3891
+ * @license MIT
3892
+ * @author dragon-fish
3893
+ * @author @openai/gpt-5
3894
+ */
3895
+ const mi = {
3896
+ arrayAdd: "+",
3897
+ arrayMoveUp: "↑",
3898
+ arrayMoveDown: "↓",
3899
+ arrayRemove: "×",
3900
+ dictAdd: "+",
3901
+ dictRemove: "×",
3902
+ rootLabel: "root"
3903
+ }, G = (e, t) => {
3904
+ customElements.get(e) || customElements.define(e, t);
3905
+ }, ac = (e, t, s) => {
3906
+ if (!t.length) return;
3907
+ let n = e, r = null, i = null;
3908
+ for (let l = 0; l < t.length - 1; l++) {
3909
+ const c = t[l];
3910
+ let h = n?.[c];
3911
+ h == null ? (h = typeof t[l + 1] == "number" ? [] : {}, n[c] = h) : typeof h != "object" && (h = typeof t[l + 1] == "number" ? [] : {}, n[c] = h), r = n, i = c, n = h;
3912
+ }
3913
+ const o = t[t.length - 1];
3914
+ if (n == null || typeof n != "object") {
3915
+ const l = typeof o == "number" ? [] : {};
3916
+ if (r)
3917
+ r[i] = l, n = l;
3918
+ else
3919
+ return;
3920
+ }
3921
+ try {
3922
+ n[o] = s;
3923
+ } catch {
3924
+ try {
3925
+ const l = Array.isArray(n) ? n.slice() : { ...n };
3926
+ l[o] = s, r && (r[i] = l);
3927
+ } catch {
3928
+ }
3929
+ }
3930
+ }, Bt = (e) => e.map(String).join("."), uc = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), Ke = (e) => `schema_${uc(Bt(e) || "root")}`, tt = (e) => Bt(e);
3931
+ function _n(e, t) {
3932
+ if (t == null) return t;
3933
+ switch (e) {
3934
+ case "number":
3935
+ case "natural":
3936
+ case "percent": {
3937
+ if (t === "") return;
3938
+ const s = Number(t);
3939
+ return Number.isNaN(s) ? void 0 : s;
3940
+ }
3941
+ case "boolean":
3942
+ return !!t;
3943
+ case "date": {
3944
+ if (!t) return;
3945
+ const s = new Date(t);
3946
+ return Number.isNaN(+s) ? void 0 : s;
3947
+ }
3948
+ case "const":
3949
+ case "string":
3950
+ default:
3951
+ return t;
3952
+ }
3953
+ }
3954
+ function tr(e) {
3955
+ return typeof e == "function" && !!e?.type;
3956
+ }
3957
+ function gi(e) {
3958
+ if (!e) throw new Error("schema is required");
3959
+ if (tr(e)) return e;
3960
+ try {
3961
+ const t = Schema.from(e);
3962
+ if (tr(t)) return t;
3963
+ } catch {
3964
+ }
3965
+ if (e?.type) {
3966
+ const t = e.type;
3967
+ if (Schema[t]) return Schema[t](e.inner ?? e.list ?? e.dict);
3968
+ }
3969
+ throw new Error("无法从传入对象生成 Schemastery 实例,请传入 schema 或 schema.toJSON() 的结果。");
3970
+ }
3971
+ function ve(e) {
3972
+ return e?.meta ?? {};
3973
+ }
3974
+ function fc(e) {
3975
+ return e.length > 0 && e.every((t) => t?.type === "const");
3976
+ }
3977
+ function mt(e) {
3978
+ if (!e) return;
3979
+ const t = e, s = t.meta || {};
3980
+ if (Object.prototype.hasOwnProperty.call(s, "default")) return s.default;
3981
+ const n = t.type;
3982
+ try {
3983
+ const r = e();
3984
+ if (r !== void 0) return r;
3985
+ } catch {
3986
+ }
3987
+ switch (n) {
3988
+ case "string":
3989
+ return "";
3990
+ case "number":
3991
+ case "natural":
3992
+ case "percent":
3993
+ return 0;
3994
+ case "boolean":
3995
+ return !1;
3996
+ case "array":
3997
+ return [];
3998
+ case "tuple":
3999
+ return [];
4000
+ case "object":
4001
+ return {};
4002
+ case "dict":
4003
+ return {};
4004
+ case "union": {
4005
+ const r = t.list || [];
4006
+ return r.length ? mt(r[0]) : void 0;
4007
+ }
4008
+ case "const":
4009
+ return t.value;
4010
+ case "date":
4011
+ return;
4012
+ default:
4013
+ return;
4014
+ }
4015
+ }
4016
+ class Ie extends HTMLElement {
4017
+ constructor() {
4018
+ super(), this._path = [], this._i18n = mi, this.$root = this.attachShadow({ mode: "open" });
4019
+ const t = document.createElement("style");
4020
+ t.textContent = me, this.$root.appendChild(t);
4021
+ }
4022
+ /** 初始化公共容器(带类名与 data-path) */
4023
+ makeFieldContainer(t, s) {
4024
+ const n = document.createElement("div");
4025
+ if (n.className = `field schema-form-item schema-type-${t}`, n.setAttribute("data-path", Bt(this._path)), this._label) {
4026
+ const r = document.createElement("label");
4027
+ r.className = "label", r.textContent = this._label, n.appendChild(r);
4028
+ }
4029
+ if (s) {
4030
+ const r = document.createElement("div");
4031
+ r.className = "helper", r.textContent = s, n.appendChild(r);
4032
+ }
4033
+ return n;
4034
+ }
4035
+ /** 外部设置 schema/path/label/value */
4036
+ set schema(t) {
4037
+ this._schema = gi(t), this.render();
4038
+ }
4039
+ get schema() {
4040
+ return this._schema;
4041
+ }
4042
+ set path(t) {
4043
+ this._path = t ?? [], this.render();
4044
+ }
4045
+ get path() {
4046
+ return this._path;
4047
+ }
4048
+ set label(t) {
4049
+ this._label = t, this.render();
4050
+ }
4051
+ get label() {
4052
+ return this._label;
4053
+ }
4054
+ set i18n(t) {
4055
+ t && (this._i18n = { ...this._i18n, ...t }), this.render();
4056
+ }
4057
+ get i18n() {
4058
+ return this._i18n;
4059
+ }
4060
+ setValue(t) {
4061
+ this._value = t, this.render();
4062
+ }
4063
+ getValue() {
4064
+ return this._value;
4065
+ }
4066
+ /** 触发变更事件(冒泡) */
4067
+ emitChange(t) {
4068
+ this._value = t, this.dispatchEvent(
4069
+ new CustomEvent("change", {
4070
+ bubbles: !0,
4071
+ composed: !0,
4072
+ detail: { path: this._path, value: t }
4073
+ })
4074
+ );
4075
+ }
4076
+ }
4077
+ class _i extends Ie {
4078
+ render() {
4079
+ if (this.$input && this.$root.contains(this.$input)) {
4080
+ const i = this._value ?? "";
4081
+ this.$input.value !== i && document.activeElement !== this.$input && (this.$input.value = i);
4082
+ return;
4083
+ }
4084
+ this.$root.innerHTML = `<style>${me}</style>`;
4085
+ const t = ve(this._schema), s = this.makeFieldContainer("string", t.description), n = document.createElement("input");
4086
+ this.$input = n, n.className = "input", n.type = "text", n.name = tt(this._path), n.id = Ke(this._path), t?.pattern?.source && (n.pattern = t.pattern.source), t?.max != null && (n.maxLength = t.max), n.value = this._value ?? "", n.oninput = () => this.emitChange(_n("string", n.value));
4087
+ const r = s.querySelector("label.label");
4088
+ r && (r.htmlFor = n.id), s.appendChild(n), this.$root.appendChild(s);
4089
+ }
4090
+ }
4091
+ G("schema-form-string", _i);
4092
+ class vi extends Ie {
4093
+ render() {
4094
+ if (this.$input && this.$root.contains(this.$input)) {
4095
+ const o = this._value ?? "";
4096
+ this.$input.value !== String(o) && document.activeElement !== this.$input && (this.$input.value = o);
4097
+ return;
4098
+ }
4099
+ this.$root.innerHTML = `<style>${me}</style>`;
4100
+ const t = this._schema?.type ?? "number", s = ve(this._schema), n = this.makeFieldContainer("number", s.description), r = document.createElement("input");
4101
+ this.$input = r, r.className = "input", r.name = tt(this._path), r.id = Ke(this._path), s?.min != null && (r.min = String(s.min)), s?.max != null && (r.max = String(s.max)), s?.step != null && (r.step = String(s.step)), t === "percent" && !r.step && (r.step = "0.01"), r.value = this._value ?? "", r.oninput = () => this.emitChange(_n(t, r.value));
4102
+ const i = n.querySelector("label.label");
4103
+ i && (i.htmlFor = r.id), s.role === "slider" ? r.type = "range" : r.type = "number", n.appendChild(r), this.$root.appendChild(n);
4104
+ }
4105
+ }
4106
+ G("schema-form-number", vi);
4107
+ class bi extends Ie {
4108
+ render() {
4109
+ this.$root.innerHTML = `<style>${me}</style>`;
4110
+ const t = ve(this._schema), s = this.makeFieldContainer("boolean", t.description), n = document.createElement("label");
4111
+ n.className = "checkbox";
4112
+ const r = document.createElement("input");
4113
+ r.type = "checkbox", r.checked = !!this._value, r.name = tt(this._path), r.id = Ke(this._path);
4114
+ const i = document.createElement("span");
4115
+ i.textContent = this._label ?? "", r.onchange = () => this.emitChange(r.checked);
4116
+ const o = s.querySelector("label.label");
4117
+ o && (o.htmlFor = r.id), n.append(r, i), s.appendChild(n), this.$root.appendChild(s);
4118
+ }
4119
+ }
4120
+ G("schema-form-boolean", bi);
4121
+ function us(e) {
4122
+ return String(e).padStart(2, "0");
4123
+ }
4124
+ function Et(e) {
4125
+ return `${e.getFullYear()}-${us(e.getMonth() + 1)}-${us(e.getDate())}`;
4126
+ }
4127
+ function Gs(e) {
4128
+ return `${us(e.getHours())}:${us(e.getMinutes())}`;
4129
+ }
4130
+ function Yt(e) {
4131
+ return `${Et(e)}T${Gs(e)}`;
4132
+ }
4133
+ class yi extends Ie {
4134
+ render() {
4135
+ if (this.$input && this.$root.contains(this.$input)) {
4136
+ const o = ve(this._schema).role || "date";
4137
+ if (document.activeElement !== this.$input)
4138
+ if (this._value instanceof Date)
4139
+ o === "date" ? this.$input.value = Et(this._value) : o === "time" ? this.$input.value = Gs(this._value) : o === "datetime" && (this.$input.value = Yt(this._value));
4140
+ else if (typeof this._value == "string" && o !== "time") {
4141
+ const l = new Date(this._value);
4142
+ isNaN(+l) || (o === "date" ? this.$input.value = Et(l) : o === "datetime" && (this.$input.value = Yt(l)));
4143
+ } else this._value || (this.$input.value = "");
4144
+ return;
4145
+ }
4146
+ this.$root.innerHTML = `<style>${me}</style>`;
4147
+ const t = ve(this._schema), s = this.makeFieldContainer("date", t.description), n = document.createElement("input");
4148
+ this.$input = n, n.className = "input";
4149
+ const r = t.role || "date";
4150
+ if (r === "datetime" ? n.type = "datetime-local" : r === "time" ? n.type = "time" : n.type = "date", n.name = tt(this._path), n.id = Ke(this._path), this._value instanceof Date)
4151
+ r === "date" ? n.value = Et(this._value) : r === "time" ? n.value = Gs(this._value) : r === "datetime" && (n.value = Yt(this._value));
4152
+ else if (typeof this._value == "string" && r !== "time") {
4153
+ const o = new Date(this._value);
4154
+ isNaN(+o) || (r === "date" ? n.value = Et(o) : r === "datetime" && (n.value = Yt(o)));
4155
+ }
4156
+ n.oninput = () => {
4157
+ t.role;
4158
+ let o;
4159
+ if (!n.value)
4160
+ o = void 0;
4161
+ else {
4162
+ const l = new Date(n.value);
4163
+ o = Number.isNaN(+l) ? void 0 : l;
4164
+ }
4165
+ this.emitChange(o);
4166
+ };
4167
+ const i = s.querySelector("label.label");
4168
+ i && (i.htmlFor = n.id), s.appendChild(n), this.$root.appendChild(s);
4169
+ }
4170
+ }
4171
+ G("schema-form-date", yi);
4172
+ class xi extends Ie {
4173
+ render() {
4174
+ this.$root.innerHTML = `<style>${me}</style>`;
4175
+ const t = ve(this._schema), s = this._schema.value;
4176
+ if (t.role === "raw-html") {
4177
+ if (s instanceof Node) {
4178
+ this.$root.appendChild(s);
4179
+ return;
4180
+ }
4181
+ const o = document.createElement("div");
4182
+ o.innerHTML = String(s), this.$root.appendChild(o);
4183
+ return;
4184
+ }
4185
+ const n = this.makeFieldContainer("const", t.description), r = document.createElement("section");
4186
+ r.className = "const content", r.textContent = String(s), r.id = Ke(this._path);
4187
+ const i = n.querySelector("label.label");
4188
+ i && (i.htmlFor = r.id), n.appendChild(r), this.$root.appendChild(n);
4189
+ }
4190
+ }
4191
+ G("schema-form-const", xi);
4192
+ function hc(e) {
4193
+ switch (e.type) {
4194
+ case "string":
4195
+ return "schema-form-string";
4196
+ case "number":
4197
+ case "natural":
4198
+ case "percent":
4199
+ return "schema-form-number";
4200
+ case "boolean":
4201
+ return "schema-form-boolean";
4202
+ case "date":
4203
+ return "schema-form-date";
4204
+ case "const":
4205
+ return "schema-form-const";
4206
+ case "array":
4207
+ return "schema-form-array";
4208
+ case "object":
4209
+ return "schema-form-object";
4210
+ case "tuple":
4211
+ return "schema-form-tuple";
4212
+ case "dict":
4213
+ return "schema-form-dict";
4214
+ case "union": {
4215
+ const t = e.list || [];
4216
+ return t.length === 2 && t[0]?.type === "is" && t[0]?.constructor === Date && t[1]?.type === "transform" && (t[1]?.inner?.meta?.role === "datetime" || t[1]?.inner?.meta?.role === "date" || t[1]?.inner?.meta?.role === "time") ? "schema-form-date" : "schema-form-union";
4217
+ }
4218
+ default:
4219
+ return "schema-form-string";
4220
+ }
4221
+ }
4222
+ function gt(e, t, s, n, r) {
4223
+ const i = hc(e), o = document.createElement(i);
4224
+ return o.schema = e, o.path = t, o.label = n, r && (o.i18n = r), o.setValue?.(s), o;
4225
+ }
4226
+ class Ci extends Ie {
4227
+ render() {
4228
+ this.$root.innerHTML = `<style>${me}</style>`;
4229
+ const t = ve(this._schema), s = this.makeFieldContainer("union", t.description), n = this._schema.list || [];
4230
+ if (fc(n)) {
4231
+ const r = document.createElement("select");
4232
+ r.className = "input", r.name = tt(this._path), r.id = Ke(this._path), n.forEach((o) => {
4233
+ const l = document.createElement("option");
4234
+ l.value = String(o.value), l.textContent = String(o.value), this._value === o.value && (l.selected = !0), r.appendChild(l);
4235
+ }), r.onchange = () => this.emitChange(_n("string", r.value));
4236
+ const i = s.querySelector("label.label");
4237
+ i && (i.htmlFor = r.id), s.appendChild(r);
4238
+ } else {
4239
+ const r = document.createElement("div");
4240
+ r.className = "toolbar";
4241
+ const i = document.createElement("select");
4242
+ i.className = "input", i.name = tt(this._path) + ".__type", i.id = Ke(this._path) + "__type";
4243
+ let o = 0;
4244
+ n.forEach((u, d) => {
4245
+ const m = document.createElement("option");
4246
+ m.value = String(d), m.textContent = u.type, i.appendChild(m);
4247
+ }), i.onchange = () => {
4248
+ o = Number(i.value);
4249
+ const u = n[o], d = mt(u);
4250
+ this.emitChange(d), h();
4251
+ };
4252
+ const l = s.querySelector("label.label");
4253
+ l && (l.htmlFor = i.id), r.appendChild(i), s.appendChild(r);
4254
+ const c = document.createElement("div");
4255
+ c.className = "group";
4256
+ const h = () => {
4257
+ c.innerHTML = "";
4258
+ const u = n[o], d = gt(u, this._path, this._value, this._label);
4259
+ d.addEventListener("change", (m) => {
4260
+ m.stopPropagation(), this.emitChange(m.detail.value);
4261
+ }), c.appendChild(d);
4262
+ };
4263
+ h(), s.appendChild(c);
4264
+ }
4265
+ this.$root.appendChild(s);
4266
+ }
4267
+ }
4268
+ G("schema-form-union", Ci);
4269
+ class Si extends Ie {
4270
+ render() {
4271
+ this.$root.innerHTML = `<style>${me}</style>`;
4272
+ const t = ve(this._schema), s = this.makeFieldContainer("tuple", t.description), n = document.createElement("div");
4273
+ n.className = "group";
4274
+ const r = Array.isArray(this._value) ? this._value : [];
4275
+ (this._schema.list || []).forEach((i, o) => {
4276
+ const l = gt(
4277
+ i,
4278
+ [...this._path, o],
4279
+ r[o],
4280
+ `${this._label ?? ""}[${o}]`
4281
+ );
4282
+ l.addEventListener("change", (c) => {
4283
+ c.stopPropagation();
4284
+ const h = Array.isArray(this._value) ? this._value.slice() : [];
4285
+ h[o] = c.detail.value, this.emitChange(h);
4286
+ }), n.appendChild(l);
4287
+ }), s.appendChild(n), this.$root.appendChild(s);
4288
+ }
4289
+ }
4290
+ G("schema-form-tuple", Si);
4291
+ class wi extends Ie {
4292
+ render() {
4293
+ this.$root.innerHTML = `<style>${me}</style>`;
4294
+ const t = ve(this._schema), s = this.makeFieldContainer("object", t.description), n = document.createElement("div");
4295
+ n.className = "group";
4296
+ const r = this._schema.dict || {};
4297
+ Object.keys(r).forEach((i) => {
4298
+ if (r[i]?.meta?.hidden) return;
4299
+ const o = (this._value ?? {})[i], l = gt(r[i], [...this._path, i], o, i);
4300
+ l.addEventListener("change", (c) => {
4301
+ c.stopPropagation();
4302
+ const h = { ...this._value ?? {} };
4303
+ h[i] = c.detail.value, this.emitChange(h);
4304
+ }), n.appendChild(l);
4305
+ }), s.appendChild(n), this.$root.appendChild(s);
4306
+ }
4307
+ }
4308
+ G("schema-form-object", wi);
4309
+ class ws extends Ie {
4310
+ constructor() {
4311
+ super(...arguments), this._itemIds = [];
4312
+ }
4313
+ static {
4314
+ this._idCounter = 0;
4315
+ }
4316
+ generateItemId() {
4317
+ try {
4318
+ if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
4319
+ return crypto.randomUUID();
4320
+ } catch {
4321
+ }
4322
+ return "i" + ws._idCounter++;
4323
+ }
4324
+ ensureItemIds(t) {
4325
+ for (; this._itemIds.length < t; ) this._itemIds.push(this.generateItemId());
4326
+ this._itemIds.length > t && (this._itemIds.length = t);
4327
+ }
4328
+ // 采集当前行位置信息(用于 FLIP)
4329
+ capturePositions(t) {
4330
+ const s = {};
4331
+ return t.querySelectorAll(".row").forEach((n) => {
4332
+ const r = n.dataset.uid;
4333
+ r && (s[r] = n.getBoundingClientRect());
4334
+ }), s;
4335
+ }
4336
+ playFLIP(t, s) {
4337
+ Array.from(t.querySelectorAll(".row")).forEach((n) => {
4338
+ const r = n.dataset.uid;
4339
+ if (!r) return;
4340
+ const i = s[r];
4341
+ if (!i) return;
4342
+ const o = n.getBoundingClientRect(), l = i.left - o.left, c = i.top - o.top;
4343
+ (l || c) && (n.style.transition = "none", n.style.transform = `translate(${l}px, ${c}px)`, requestAnimationFrame(() => {
4344
+ n.style.transition = "transform .25s ease", n.style.transform = "";
4345
+ }));
4346
+ });
4347
+ }
4348
+ render() {
4349
+ this.$root.innerHTML = `<style>${me}</style>`;
4350
+ const t = ve(this._schema), s = this.makeFieldContainer("array", t.description), n = document.createElement("div");
4351
+ n.className = "group";
4352
+ const r = this._schema.inner, i = () => Array.isArray(this._value) ? this._value : [];
4353
+ this.ensureItemIds(i().length);
4354
+ const o = (h, u) => {
4355
+ n.innerHTML = "", i().forEach((d, m) => {
4356
+ const v = [...this._path, m], C = document.createElement("div");
4357
+ C.className = "row schema-collection-row";
4358
+ const $ = this._itemIds[m];
4359
+ C.dataset.uid = $, C.setAttribute("data-path", Bt(v));
4360
+ const U = gt(
4361
+ r,
4362
+ v,
4363
+ d,
4364
+ `${this._label ?? ""}[${m}]`
4365
+ );
4366
+ U.addEventListener("change", (N) => {
4367
+ N.stopPropagation();
4368
+ const V = i().slice();
4369
+ V[m] = N.detail.value, this._value = V, this.emitChange(V);
4370
+ });
4371
+ const O = document.createElement("div");
4372
+ O.className = "actions";
4373
+ const R = document.createElement("button");
4374
+ R.type = "button", R.className = "btn", R.textContent = this._i18n.arrayMoveUp ?? "↑", R.onclick = () => {
4375
+ if (m <= 0) return;
4376
+ const N = this.capturePositions(n), V = i().slice();
4377
+ [V[m - 1], V[m]] = [V[m], V[m - 1]], [this._itemIds[m - 1], this._itemIds[m]] = [
4378
+ this._itemIds[m],
4379
+ this._itemIds[m - 1]
4380
+ ], this._value = V, o(N), this.emitChange(V);
4381
+ };
4382
+ const D = document.createElement("button");
4383
+ D.type = "button", D.className = "btn", D.textContent = this._i18n.arrayMoveDown ?? "↓", D.onclick = () => {
4384
+ const N = i();
4385
+ if (m >= N.length - 1) return;
4386
+ const V = this.capturePositions(n), Y = N.slice();
4387
+ [Y[m + 1], Y[m]] = [Y[m], Y[m + 1]], [this._itemIds[m + 1], this._itemIds[m]] = [
4388
+ this._itemIds[m],
4389
+ this._itemIds[m + 1]
4390
+ ], this._value = Y, o(V), this.emitChange(Y);
4391
+ };
4392
+ const T = document.createElement("button");
4393
+ T.type = "button", T.className = "btn danger", T.textContent = this._i18n.arrayRemove ?? "×", T.onclick = () => {
4394
+ C.classList.add("leaving");
4395
+ const N = 250;
4396
+ let V = !1;
4397
+ const Y = () => {
4398
+ if (V) return;
4399
+ V = !0, clearTimeout(be);
4400
+ const ze = i().filter((st, nt) => nt !== m);
4401
+ this._itemIds.splice(m, 1);
4402
+ const Oe = this.capturePositions(n);
4403
+ this._value = ze, o(Oe), this.emitChange(ze);
4404
+ };
4405
+ C.addEventListener("transitionend", Y, { once: !0 });
4406
+ const be = setTimeout(Y, N + 80);
4407
+ }, O.append(R, D, T), C.appendChild(U), C.appendChild(O), n.appendChild(C), u && u === $ && (C.classList.add("enter"), requestAnimationFrame(() => {
4408
+ C.classList.add("enter-active");
4409
+ }), requestAnimationFrame(() => {
4410
+ C.classList.remove("enter");
4411
+ }));
4412
+ }), h && this.playFLIP(n, h);
4413
+ };
4414
+ o();
4415
+ const l = document.createElement("button");
4416
+ l.type = "button", l.className = "btn primary", l.textContent = this._i18n.arrayAdd ?? "+", l.onclick = () => {
4417
+ const h = this.capturePositions(n), u = i().slice(), d = mt(r);
4418
+ u.push(d);
4419
+ const m = this.generateItemId();
4420
+ this._itemIds.push(m), this._value = u, o(h, m), this.emitChange(u);
4421
+ };
4422
+ const c = document.createElement("div");
4423
+ c.className = "actions", c.appendChild(l), s.appendChild(n), s.appendChild(c), this.$root.appendChild(s);
4424
+ }
4425
+ }
4426
+ G("schema-form-array", ws);
4427
+ class Ei extends Ie {
4428
+ render() {
4429
+ this.$root.innerHTML = `<style>${me}</style>`;
4430
+ const t = ve(this._schema), s = this.makeFieldContainer("dict", t.description), n = document.createElement("div");
4431
+ n.className = "group";
4432
+ const r = this._schema.inner, i = this._value ?? {}, o = (m) => `d_${m}`, l = () => {
4433
+ const m = {};
4434
+ return n.querySelectorAll(".kv").forEach((v) => {
4435
+ const C = v.dataset.uid;
4436
+ C && (m[C] = v.getBoundingClientRect());
4437
+ }), m;
4438
+ }, c = (m) => {
4439
+ n.querySelectorAll(".kv").forEach((v) => {
4440
+ const C = v.dataset.uid;
4441
+ if (!C) return;
4442
+ const $ = m[C];
4443
+ if (!$) return;
4444
+ const U = v.getBoundingClientRect(), O = $.left - U.left, R = $.top - U.top;
4445
+ (O || R) && (v.style.transition = "none", v.style.transform = `translate(${O}px, ${R}px)`, requestAnimationFrame(() => {
4446
+ v.style.transition = "transform .25s ease", v.style.transform = "";
4447
+ }));
4448
+ });
4449
+ }, h = (m, v) => {
4450
+ n.innerHTML = "", Object.keys(i).forEach((C) => {
4451
+ const $ = [...this._path, C], U = document.createElement("div");
4452
+ U.className = "kv schema-collection-row", U.dataset.uid = o(C), U.setAttribute("data-path", Bt($));
4453
+ const O = document.createElement("input");
4454
+ O.className = "input", O.value = C, O.name = tt($) + ".__key", O.id = Ke($) + "__key";
4455
+ const R = gt(r, $, i[C], `${this._label ?? ""}[${C}]`), D = document.createElement("button");
4456
+ D.type = "button", D.className = "btn danger", D.textContent = this._i18n.dictRemove ?? "×", D.onclick = () => {
4457
+ const T = l();
4458
+ delete i[C];
4459
+ const N = { ...this._value ?? {} };
4460
+ delete N[C], this._value = N, h(T), this.emitChange(N);
4461
+ }, O.onchange = () => {
4462
+ const T = O.value.trim();
4463
+ if (!T || T === C || i[T] !== void 0) return;
4464
+ const N = l();
4465
+ i[T] = i[C], delete i[C];
4466
+ const V = { ...this._value ?? {} };
4467
+ V[T] = V[C], delete V[C], this._value = V, h(N), this.emitChange(V);
4468
+ }, R.addEventListener("change", (T) => {
4469
+ T.stopPropagation();
4470
+ const N = { ...this._value ?? {} };
4471
+ N[C] = T.detail.value, this._value = N, this.emitChange(N);
4472
+ }), U.append(O, R, D), n.appendChild(U), v === C && (U.classList.add("enter"), requestAnimationFrame(() => U.classList.add("enter-active")), requestAnimationFrame(() => U.classList.remove("enter")));
4473
+ }), m && c(m);
4474
+ };
4475
+ h();
4476
+ const u = document.createElement("button");
4477
+ u.type = "button", u.className = "btn primary", u.textContent = this._i18n.dictAdd ?? "+", u.onclick = () => {
4478
+ let m = Object.keys(i).length + 1, v = `k${m}`;
4479
+ for (; i[v] !== void 0; ) v = `k${++m}`;
4480
+ const C = l();
4481
+ i[v] = mt(r);
4482
+ const $ = { ...this._value ?? {}, [v]: i[v] };
4483
+ this._value = $, h(C, v), this.emitChange($);
4484
+ };
4485
+ const d = document.createElement("div");
4486
+ d.className = "actions", d.appendChild(u), s.appendChild(n), s.appendChild(d), this.$root.appendChild(s);
4487
+ }
4488
+ }
4489
+ G("schema-form-dict", Ei);
4490
+ class Ti extends HTMLElement {
4491
+ constructor() {
4492
+ super(), this._i18n = { ...mi }, this.$root = this.attachShadow({ mode: "open" });
4493
+ const t = document.createElement("style");
4494
+ t.textContent = me, this.$root.appendChild(t);
4495
+ const s = document.createElement("div");
4496
+ s.className = "wrapper", s.innerHTML = '<form class="form" part="form"></form>', this.$root.appendChild(s), this.addEventListener("change", (n) => {
4497
+ if (!n?.detail) return;
4498
+ const { path: r, value: i } = n.detail;
4499
+ Array.isArray(r) && r.length === 0 ? this._state = i : ac(this._state ?? (this._state = {}), r, i), this.dispatchEvent(
4500
+ new CustomEvent("form-change", { detail: { path: r, value: i, state: this._state } })
4501
+ );
4502
+ });
4503
+ }
4504
+ // --- 对外 API ---
4505
+ set schema(t) {
4506
+ this._schema = gi(t);
4507
+ try {
4508
+ this._state = this._schema(null, { autofix: !0 });
4509
+ } catch {
4510
+ this._state = mt(this._schema);
4511
+ }
4512
+ this.render();
4513
+ }
4514
+ get schema() {
4515
+ return this._schema;
4516
+ }
4517
+ set schemaJSON(t) {
4518
+ this.schema = t;
4519
+ }
4520
+ get schemaJSON() {
4521
+ return this._schema?.toJSON?.();
4522
+ }
4523
+ setData(t, s = { validate: !0, autofix: !0 }) {
4524
+ if (!this._schema) throw new Error("请先设置 schema");
4525
+ const n = s.validate ? this._schema(t ?? null, { autofix: s.autofix }) : t;
4526
+ this._state = n, this.render();
4527
+ }
4528
+ getData(t = { validate: !0, autofix: !0 }) {
4529
+ if (!this._schema) throw new Error("请先设置 schema");
4530
+ const s = this._state;
4531
+ return t.validate ? this._schema(s ?? null, { autofix: t.autofix }) : s;
4532
+ }
4533
+ reset() {
4534
+ try {
4535
+ this._state = this._schema(null, { autofix: !0 });
4536
+ } catch {
4537
+ this._state = mt(this._schema);
4538
+ }
4539
+ this.render();
4540
+ }
4541
+ refresh() {
4542
+ this.render();
4543
+ }
4544
+ // i18n 相关
4545
+ set i18n(t) {
4546
+ this._i18n = { ...this._i18n, ...t }, this.render();
4547
+ }
4548
+ get i18n() {
4549
+ return this._i18n;
4550
+ }
4551
+ render() {
4552
+ if (!this._schema) return;
4553
+ const t = this.$root.querySelector("form");
4554
+ t.innerHTML = "";
4555
+ const s = gt(
4556
+ this._schema,
4557
+ [],
4558
+ this._state,
4559
+ this._i18n.rootLabel,
4560
+ this._i18n
4561
+ );
4562
+ t.appendChild(s);
4563
+ }
4564
+ }
4565
+ G("schema-form", Ti);
4566
+ function dc() {
4567
+ G("schema-form", Ti), G("schema-form-string", _i), G("schema-form-number", vi), G("schema-form-boolean", bi), G("schema-form-date", yi), G("schema-form-const", xi), G("schema-form-union", Ci), G("schema-form-tuple", Si), G("schema-form-object", wi), G("schema-form-array", ws), G("schema-form-dict", Ei);
4568
+ }
4569
+ const pc = /* @__PURE__ */ Rr({
4570
+ __name: "SchemasteryFormVue",
4571
+ props: /* @__PURE__ */ Mn({
4572
+ schema: {},
4573
+ value: {},
4574
+ validateOnChange: { type: Boolean, default: !1 }
4575
+ }, {
4576
+ schema: { required: !0 },
4577
+ schemaModifiers: {},
4578
+ value: { required: !1, default: {} },
4579
+ valueModifiers: {}
4580
+ }),
4581
+ emits: /* @__PURE__ */ Mn(["change"], ["update:schema", "update:value"]),
4582
+ setup(e, { expose: t, emit: s }) {
4583
+ const n = jn(e, "schema"), r = jn(e, "value"), i = s, o = Ro("elRef");
4584
+ let l = !1, c = !1;
4585
+ const h = (u) => {
4586
+ if (c)
4587
+ return;
4588
+ const d = o.value, m = e.validateOnChange ? d.getData({ validate: !0 }) : u.detail.state;
4589
+ l = !0, r.value = m, Xt(() => {
4590
+ l = !1;
4591
+ }), i("change", u.detail);
4592
+ };
4593
+ return Hr(() => {
4594
+ dc();
4595
+ }), hn(() => {
4596
+ const u = o.value;
4597
+ n.value && (u.schema = n.value), r.value !== void 0 && u.setData(r.value, { validate: !1, autofix: !0 }), u.addEventListener("form-change", h);
4598
+ }), Ur(() => {
4599
+ o.value?.removeEventListener("form-change", h);
4600
+ }), Ft(
4601
+ () => n,
4602
+ (u) => {
4603
+ l || o.value && u && o.value.schema !== u.value && (c = !0, o.value.schema = u.value, Xt(() => {
4604
+ c = !1;
4605
+ }));
4606
+ },
4607
+ { deep: !0, immediate: !0 }
4608
+ ), Ft(
4609
+ () => r,
4610
+ (u) => {
4611
+ if (l || !o.value || u.value === void 0) return;
4612
+ const d = o.value.getData({ validate: !1 });
4613
+ JSON.stringify(d) !== JSON.stringify(u.value) && (c = !0, o.value.setData(u.value, { validate: !1 }), Xt(() => {
4614
+ c = !1;
4615
+ }));
4616
+ },
4617
+ { deep: !0, immediate: !0 }
4618
+ ), t({
4619
+ /** 手动设置数据并可选择是否触发 v-model:data */
4620
+ setData(u, d) {
4621
+ const m = o.value;
4622
+ m.setData(u, { validate: !!d?.validate }), d?.emit && (r.value = m.getData({ validate: !!d?.validate }));
4623
+ },
4624
+ /** 获取数据 */
4625
+ getData(u) {
4626
+ return o.value.getData(u);
4627
+ },
4628
+ /** 设置 schema,并同步到 v-model:schema */
4629
+ setSchema(u, d = !0) {
4630
+ o.value.schema = u, d && (n.value = u);
4631
+ },
4632
+ refresh() {
4633
+ o.value.refresh();
4634
+ },
4635
+ reset() {
4636
+ o.value.reset();
4637
+ },
4638
+ /** 原生元素 */
4639
+ el: o
4640
+ }), (u, d) => (lt(), wt("schema-form", ai({
4641
+ ref_key: "elRef",
4642
+ ref: o
4643
+ }, u.$attrs), null, 16));
4644
+ }
4645
+ });
4646
+ function Qe(e, t = /* @__PURE__ */ new WeakMap()) {
4647
+ if (Q(e))
4648
+ return Qe(e.value, t);
4649
+ if (e === null || typeof e != "object")
4650
+ return e;
4651
+ if (t.has(e))
4652
+ return t.get(e);
4653
+ if (e instanceof Date)
4654
+ return new Date(e);
4655
+ if (e instanceof RegExp)
4656
+ return new RegExp(e);
4657
+ if (e instanceof Map) {
4658
+ const r = /* @__PURE__ */ new Map();
4659
+ return t.set(e, r), Array.from(e.entries()).forEach(([i, o]) => {
4660
+ r.set(i, Qe(o, t));
4661
+ }), r;
4662
+ }
4663
+ if (e instanceof Set) {
4664
+ const r = /* @__PURE__ */ new Set();
4665
+ return t.set(e, r), Array.from(e).forEach((i) => {
4666
+ r.add(Qe(i, t));
4667
+ }), r;
4668
+ }
4669
+ if (Array.isArray(e)) {
4670
+ const r = [];
4671
+ t.set(e, r);
4672
+ for (const i of e)
4673
+ r.push(Qe(i, t));
4674
+ return r;
4675
+ }
4676
+ const s = H(e), n = {};
4677
+ t.set(e, n);
4678
+ for (const r of Object.keys(s))
4679
+ n[r] = Qe(s[r], t);
4680
+ for (const r of Object.getOwnPropertySymbols(s))
4681
+ n[r] = Qe(s[r], t);
4682
+ return n;
4683
+ }
4684
+ const mc = { class: "preferences-ui-app" }, gc = { class: "tabs" }, _c = ["onClick", "data-value"], vc = { style: { "max-height": "20em", overflow: "auto" } }, bc = { style: { "max-height": "20em", overflow: "auto" } }, yc = /* @__PURE__ */ Rr({
4685
+ __name: "PreferencesForm",
4686
+ setup(e, { expose: t }) {
4687
+ const s = cc(), n = Jt([]), r = Jt(""), i = hi(() => l.value.find((c) => c.category === r.value)?.schema), o = Jt({}), l = Jt([]);
4688
+ return t({
4689
+ getValue() {
4690
+ return Qe(o);
4691
+ }
4692
+ }), hl(() => {
4693
+ r.value && (l.value = s.preferences.getConfigRegistries(r.value));
4694
+ }), hn(async () => {
4695
+ s.inject(["preferences"], async (c) => {
4696
+ o.value = await c.preferences.getAll(), n.value = c.preferences.getConfigCategories(), r.value = n.value[0].name;
4697
+ });
4698
+ }), (c, h) => (lt(), wt("div", mc, [
4699
+ Me("div", gc, [
4700
+ (lt(!0), wt(ge, null, Pn(n.value, (u) => (lt(), wt("a", {
4701
+ class: ms(["tab", { active: r.value === u.name }]),
4702
+ key: u.name,
4703
+ onClick: (d) => r.value = u.name,
4704
+ "data-value": u.name
4705
+ }, Zt(u.label), 11, _c))), 128))
4706
+ ]),
4707
+ (lt(!0), wt(ge, null, Pn(l.value, (u) => Po((lt(), Sl(Ar(pc), {
4708
+ key: u.name,
4709
+ schema: u.schema,
4710
+ value: o.value,
4711
+ "onUpdate:value": h[0] || (h[0] = (d) => o.value = d),
4712
+ "validate-on-change": !1,
4713
+ i18n: { rootLabel: "" }
4714
+ }, null, 8, ["schema", "value"])), [
4715
+ [Vl, r.value === u.category]
4716
+ ])), 128)),
4717
+ Me("details", null, [
4718
+ h[1] || (h[1] = Me("summary", null, "Debug Info", -1)),
4719
+ h[2] || (h[2] = Me("h3", null, "Active Schema", -1)),
4720
+ Me("pre", vc, Zt(i.value?.toJSON()), 1),
4721
+ h[3] || (h[3] = Me("h3", null, "Value", -1)),
4722
+ Me("pre", bc, Zt(o.value), 1)
4723
+ ])
4724
+ ]));
4725
+ }
4726
+ }), xc = (e, t) => {
4727
+ const s = e.__vccOpts || e;
4728
+ for (const [n, r] of t)
4729
+ s[n] = r;
4730
+ return s;
4731
+ }, Cc = /* @__PURE__ */ xc(yc, [["__scopeId", "data-v-1f988771"]]);
4732
+ var Sc = Object.create, vn = Object.defineProperty, wc = Object.getOwnPropertyDescriptor, $i = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), Ai = (e) => {
4733
+ throw TypeError(e);
4734
+ }, Ec = (e, t, s) => t in e ? vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, Tc = (e, t) => vn(e, "name", { value: t, configurable: !0 }), $c = (e) => [, , , Sc(e?.[$i("metadata")] ?? null)], Ac = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Ii = (e) => e !== void 0 && typeof e != "function" ? Ai("Function expected") : e, Ic = (e, t, s, n, r) => ({ kind: Ac[e], name: t, metadata: n, addInitializer: (i) => s._ ? Ai("Already initialized") : r.push(Ii(i || null)) }), Oc = (e, t) => Ec(t, $i("metadata"), e[3]), Pc = (e, t, s, n) => {
4735
+ for (var r = 0, i = e[t >> 1], o = i && i.length; r < o; r++) i[r].call(s);
4736
+ return n;
4737
+ }, Mc = (e, t, s, n, r, i) => {
4738
+ var o, l, c, h = t & 7, u = !1, d = 0, m = e[d] || (e[d] = []), v = h && (r = r.prototype, h < 5 && (h > 3 || !u) && wc(r, s));
4739
+ Tc(r, s);
4740
+ for (var C = n.length - 1; C >= 0; C--)
4741
+ c = Ic(h, s, l = {}, e[3], m), o = (0, n[C])(r, c), l._ = 1, Ii(o) && (r = o);
4742
+ return Oc(e, r), v && vn(r, s, v), u ? h ^ 4 ? i : v : r;
4743
+ }, Oi, bn, Pi;
4744
+ Oi = [Li(["preferences", "modal"])];
4745
+ class Ys extends (Pi = Di) {
4746
+ constructor(t) {
4747
+ super(t, {}, "preferences-ui"), this.ctx = t, t.set("preferencesUI", this), t.inject(["toolbox"], (s) => {
4748
+ s.toolbox.addButton({
4749
+ id: "preferences",
4750
+ icon: /* @__PURE__ */ rt(
4751
+ "svg",
4752
+ {
4753
+ xmlns: "http://www.w3.org/2000/svg",
4754
+ width: "24",
4755
+ height: "24",
4756
+ viewBox: "0 0 24 24",
4757
+ fill: "currentColor",
4758
+ class: "icon icon-tabler icons-tabler-filled icon-tabler-settings",
4759
+ children: [
4760
+ /* @__PURE__ */ rt("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
4761
+ /* @__PURE__ */ rt("path", { d: "M14.647 4.081a.724 .724 0 0 0 1.08 .448c2.439 -1.485 5.23 1.305 3.745 3.744a.724 .724 0 0 0 .447 1.08c2.775 .673 2.775 4.62 0 5.294a.724 .724 0 0 0 -.448 1.08c1.485 2.439 -1.305 5.23 -3.744 3.745a.724 .724 0 0 0 -1.08 .447c-.673 2.775 -4.62 2.775 -5.294 0a.724 .724 0 0 0 -1.08 -.448c-2.439 1.485 -5.23 -1.305 -3.745 -3.744a.724 .724 0 0 0 -.447 -1.08c-2.775 -.673 -2.775 -4.62 0 -5.294a.724 .724 0 0 0 .448 -1.08c-1.485 -2.439 1.305 -5.23 3.744 -3.745a.722 .722 0 0 0 1.08 -.447c.673 -2.775 4.62 -2.775 5.294 0zm-2.647 4.919a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z" })
4762
+ ]
4763
+ }
4764
+ ),
4765
+ tooltip: "Open preferences",
4766
+ group: "group2",
4767
+ index: 1 / 0,
4768
+ onClick: () => this.showModal()
4769
+ }), this.addDisposeHandler(() => {
4770
+ s.toolbox.removeButton("preferences");
4771
+ });
4772
+ });
4773
+ }
4774
+ showModal() {
4775
+ const t = this.ctx.modal.show({
4776
+ className: "ipe-preference compact-buttons",
4777
+ sizeClass: "small",
4778
+ outSideClose: !1,
4779
+ center: !0,
4780
+ title: "InPageEdit Prefrences",
4781
+ content: /* @__PURE__ */ rt(Ri, { children: /* @__PURE__ */ rt(Ni, {}) })
4782
+ });
4783
+ t.get$window().classList.add("dialog");
4784
+ const s = /* @__PURE__ */ rt("div", { id: "ipe-preferences-app", style: { minHeight: "65vh" } });
4785
+ t.setContent(s);
4786
+ const n = this.createFormApp(), r = n.mount(s);
4787
+ t.setButtons([
4788
+ {
4789
+ label: "Save",
4790
+ className: "is-primary is-ghost",
4791
+ method: () => {
4792
+ const i = r.getValue();
4793
+ Object.entries(i).forEach(([o, l]) => {
4794
+ this.ctx.preferences.set(o, l).catch(console.error);
4795
+ }), t.close();
4796
+ }
4797
+ },
4798
+ {
4799
+ label: "Cancel",
4800
+ className: "is-danger is-ghost",
4801
+ method: () => {
4802
+ t.close();
4803
+ }
4804
+ }
4805
+ ]), t.on(t.Event.Close, () => {
4806
+ this.logger.log("preferences modal closed, vue app unmounting"), n.unmount();
4807
+ });
4808
+ }
4809
+ createFormApp() {
4810
+ const t = rc(Cc);
4811
+ return lc(this.ctx, t), t;
4812
+ }
4813
+ }
4814
+ bn = $c(Pi);
4815
+ Ys = Mc(bn, 0, "PluginPreferencesUI", Oi, Ys);
4816
+ Pc(bn, 1, Ys);
4817
+ export {
4818
+ Ys as PluginPreferencesUI
4819
+ };
4820
+ //# sourceMappingURL=index-z5MR2HJ2.js.map