instaui 0.1.0__py3-none-any.whl

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 (152) hide show
  1. instaui/__init__.py +9 -0
  2. instaui/_helper/observable_helper.py +35 -0
  3. instaui/boot_info.py +43 -0
  4. instaui/common/jsonable.py +37 -0
  5. instaui/components/__init__.py +0 -0
  6. instaui/components/column.py +18 -0
  7. instaui/components/component.py +47 -0
  8. instaui/components/content.py +34 -0
  9. instaui/components/directive.py +55 -0
  10. instaui/components/element.py +462 -0
  11. instaui/components/grid.py +80 -0
  12. instaui/components/html/__init__.py +36 -0
  13. instaui/components/html/_mixins.py +34 -0
  14. instaui/components/html/button.py +38 -0
  15. instaui/components/html/checkbox.py +42 -0
  16. instaui/components/html/date.py +28 -0
  17. instaui/components/html/div.py +7 -0
  18. instaui/components/html/form.py +7 -0
  19. instaui/components/html/input.py +28 -0
  20. instaui/components/html/label.py +21 -0
  21. instaui/components/html/li.py +17 -0
  22. instaui/components/html/link.py +31 -0
  23. instaui/components/html/number.py +34 -0
  24. instaui/components/html/paragraph.py +19 -0
  25. instaui/components/html/range.py +45 -0
  26. instaui/components/html/select.py +93 -0
  27. instaui/components/html/span.py +19 -0
  28. instaui/components/html/ul.py +20 -0
  29. instaui/components/match.py +106 -0
  30. instaui/components/row.py +19 -0
  31. instaui/components/slot.py +82 -0
  32. instaui/components/transition_group.py +9 -0
  33. instaui/components/value_element.py +48 -0
  34. instaui/components/vfor.py +140 -0
  35. instaui/components/vif.py +38 -0
  36. instaui/consts.py +18 -0
  37. instaui/dependencies/__init__.py +15 -0
  38. instaui/dependencies/component_registrar.py +82 -0
  39. instaui/dependencies/installer.py +5 -0
  40. instaui/event/event_mixin.py +12 -0
  41. instaui/event/js_event.py +57 -0
  42. instaui/event/web_event.py +108 -0
  43. instaui/experimental/__init__.py +4 -0
  44. instaui/experimental/debug.py +48 -0
  45. instaui/fastapi_server/_utils.py +42 -0
  46. instaui/fastapi_server/_uvicorn.py +37 -0
  47. instaui/fastapi_server/config_router.py +60 -0
  48. instaui/fastapi_server/debug_mode_router.py +61 -0
  49. instaui/fastapi_server/event_router.py +58 -0
  50. instaui/fastapi_server/middlewares.py +19 -0
  51. instaui/fastapi_server/request_context.py +19 -0
  52. instaui/fastapi_server/server.py +246 -0
  53. instaui/fastapi_server/watch_router.py +53 -0
  54. instaui/handlers/_utils.py +66 -0
  55. instaui/handlers/computed_handler.py +42 -0
  56. instaui/handlers/config_handler.py +13 -0
  57. instaui/handlers/event_handler.py +58 -0
  58. instaui/handlers/watch_handler.py +57 -0
  59. instaui/html_tools.py +139 -0
  60. instaui/inject.py +33 -0
  61. instaui/js/__init__.py +4 -0
  62. instaui/js/js_output.py +15 -0
  63. instaui/js/lambda_func.py +35 -0
  64. instaui/launch_collector.py +52 -0
  65. instaui/page_info.py +23 -0
  66. instaui/runtime/__init__.py +29 -0
  67. instaui/runtime/_app.py +206 -0
  68. instaui/runtime/_inner_helper.py +9 -0
  69. instaui/runtime/context.py +47 -0
  70. instaui/runtime/dataclass.py +30 -0
  71. instaui/runtime/resource.py +87 -0
  72. instaui/runtime/scope.py +107 -0
  73. instaui/runtime/ui_state_scope.py +15 -0
  74. instaui/settings/__init__.py +4 -0
  75. instaui/settings/__settings.py +13 -0
  76. instaui/skip.py +12 -0
  77. instaui/spa_router/__init__.py +26 -0
  78. instaui/spa_router/_components.py +35 -0
  79. instaui/spa_router/_file_base_utils.py +264 -0
  80. instaui/spa_router/_functions.py +122 -0
  81. instaui/spa_router/_install.py +11 -0
  82. instaui/spa_router/_route_model.py +139 -0
  83. instaui/spa_router/_router_box.py +40 -0
  84. instaui/spa_router/_router_output.py +22 -0
  85. instaui/spa_router/_router_param_var.py +51 -0
  86. instaui/spa_router/_types.py +4 -0
  87. instaui/spa_router/templates/page_routes +59 -0
  88. instaui/static/insta-ui.css +1 -0
  89. instaui/static/insta-ui.esm-browser.prod.js +3663 -0
  90. instaui/static/insta-ui.iife.js +29 -0
  91. instaui/static/insta-ui.iife.js.map +1 -0
  92. instaui/static/insta-ui.js.map +1 -0
  93. instaui/static/tailwindcss.min.js +62 -0
  94. instaui/static/templates/debug/sse.html +117 -0
  95. instaui/static/templates/web.html +118 -0
  96. instaui/static/templates/zero.html +55 -0
  97. instaui/static/vue.esm-browser.prod.js +9 -0
  98. instaui/static/vue.global.prod.js +9 -0
  99. instaui/static/vue.runtime.esm-browser.prod.js +5 -0
  100. instaui/systems/file_system.py +17 -0
  101. instaui/systems/func_system.py +104 -0
  102. instaui/systems/js_system.py +22 -0
  103. instaui/systems/pydantic_system.py +27 -0
  104. instaui/systems/string_system.py +10 -0
  105. instaui/template/__init__.py +4 -0
  106. instaui/template/env.py +7 -0
  107. instaui/template/web_template.py +55 -0
  108. instaui/template/zero_template.py +24 -0
  109. instaui/ui/__init__.py +121 -0
  110. instaui/ui/events.py +25 -0
  111. instaui/ui_functions/input_slient_data.py +16 -0
  112. instaui/ui_functions/server.py +13 -0
  113. instaui/ui_functions/str_format.py +36 -0
  114. instaui/ui_functions/ui_page.py +31 -0
  115. instaui/ui_functions/ui_types.py +13 -0
  116. instaui/ui_functions/url_location.py +33 -0
  117. instaui/vars/__init__.py +13 -0
  118. instaui/vars/_types.py +8 -0
  119. instaui/vars/_utils.py +12 -0
  120. instaui/vars/data.py +68 -0
  121. instaui/vars/element_ref.py +42 -0
  122. instaui/vars/event_context.py +45 -0
  123. instaui/vars/event_extend.py +0 -0
  124. instaui/vars/js_computed.py +95 -0
  125. instaui/vars/mixin_types/common_type.py +5 -0
  126. instaui/vars/mixin_types/element_binding.py +10 -0
  127. instaui/vars/mixin_types/observable.py +7 -0
  128. instaui/vars/mixin_types/pathable.py +14 -0
  129. instaui/vars/mixin_types/py_binding.py +13 -0
  130. instaui/vars/mixin_types/str_format_binding.py +8 -0
  131. instaui/vars/mixin_types/var_type.py +5 -0
  132. instaui/vars/path_var.py +89 -0
  133. instaui/vars/ref.py +103 -0
  134. instaui/vars/slot_prop.py +46 -0
  135. instaui/vars/state.py +82 -0
  136. instaui/vars/types.py +24 -0
  137. instaui/vars/vfor_item.py +204 -0
  138. instaui/vars/vue_computed.py +82 -0
  139. instaui/vars/web_computed.py +157 -0
  140. instaui/vars/web_view_computed.py +1 -0
  141. instaui/version.py +3 -0
  142. instaui/watch/_types.py +4 -0
  143. instaui/watch/_utils.py +3 -0
  144. instaui/watch/js_watch.py +74 -0
  145. instaui/watch/vue_watch.py +61 -0
  146. instaui/watch/web_watch.py +123 -0
  147. instaui/zero/__init__.py +3 -0
  148. instaui/zero/scope.py +9 -0
  149. instaui-0.1.0.dist-info/LICENSE +21 -0
  150. instaui-0.1.0.dist-info/METADATA +154 -0
  151. instaui-0.1.0.dist-info/RECORD +152 -0
  152. instaui-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,3663 @@
1
+ var Mn = Object.defineProperty;
2
+ var Fn = (e, t, n) => t in e ? Mn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var M = (e, t, n) => Fn(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import * as Bn from "vue";
5
+ import { unref as B, watch as K, nextTick as Ve, isRef as Ut, shallowRef as Q, ref as J, watchEffect as Gt, computed as W, readonly as Wn, provide as Pe, inject as te, customRef as ct, toValue as H, shallowReactive as Ln, defineComponent as F, reactive as Un, h as A, getCurrentInstance as Kt, toRaw as Gn, normalizeStyle as Kn, normalizeClass as qe, toDisplayString as Ht, onUnmounted as Ce, Fragment as Ae, vModelDynamic as Hn, vShow as qn, resolveDynamicComponent as ut, normalizeProps as zn, withDirectives as Jn, onErrorCaptured as Qn, openBlock as he, createElementBlock as be, createElementVNode as Yn, createVNode as Xn, withCtx as Zn, renderList as er, createBlock as tr, TransitionGroup as qt, KeepAlive as nr } from "vue";
6
+ let zt, ze, Je;
7
+ function rr(e) {
8
+ zt = e.queryPath, ze = e.pathParams, Je = e.queryParams;
9
+ }
10
+ function lt() {
11
+ return {
12
+ path: zt,
13
+ ...ze === void 0 ? {} : { params: ze },
14
+ ...Je === void 0 ? {} : { queryParams: Je }
15
+ };
16
+ }
17
+ var oe;
18
+ ((e) => {
19
+ function t(i) {
20
+ return i.type === "ref";
21
+ }
22
+ e.isRef = t;
23
+ function n(i) {
24
+ return i.type === "vComputed";
25
+ }
26
+ e.isVueComputed = n;
27
+ function r(i) {
28
+ return i.type === "jsComputed";
29
+ }
30
+ e.isJsComputed = r;
31
+ function o(i) {
32
+ return i.type === "webComputed";
33
+ }
34
+ e.isWebComputed = o;
35
+ function s(i) {
36
+ return i.type === "data";
37
+ }
38
+ e.isConstData = s;
39
+ })(oe || (oe = {}));
40
+ var N;
41
+ ((e) => {
42
+ function t(g) {
43
+ return g.type === "ref" || g.type === "computed" || g.type === "webComputed" || g.type === "data";
44
+ }
45
+ e.isVar = t;
46
+ function n(g) {
47
+ return g.type === "ref";
48
+ }
49
+ e.isRef = n;
50
+ function r(g) {
51
+ return g.type === "routePar";
52
+ }
53
+ e.isRouterParams = r;
54
+ function o(g) {
55
+ return g.type === "routeAct";
56
+ }
57
+ e.isRouterAction = o;
58
+ function s(g) {
59
+ return g.type === "data";
60
+ }
61
+ e.isConstData = s;
62
+ function i(g) {
63
+ return g.type === "computed";
64
+ }
65
+ e.isComputed = i;
66
+ function c(g) {
67
+ return g.type === "webComputed";
68
+ }
69
+ e.isWebComputed = c;
70
+ function l(g) {
71
+ return g.type === "js";
72
+ }
73
+ e.isJs = l;
74
+ function h(g) {
75
+ return g.type === "jsOutput";
76
+ }
77
+ e.isJsOutput = h;
78
+ function u(g) {
79
+ return g.type === "vf";
80
+ }
81
+ e.isVForItem = u;
82
+ function a(g) {
83
+ return g.type === "vf-i";
84
+ }
85
+ e.isVForIndex = a;
86
+ function f(g) {
87
+ return g.type === "sp";
88
+ }
89
+ e.isSlotProp = f;
90
+ function d(g) {
91
+ return g.type === "event";
92
+ }
93
+ e.isEventContext = d;
94
+ function p(g) {
95
+ return g.type === "ele_ref";
96
+ }
97
+ e.isElementRef = p;
98
+ function v(g) {
99
+ return g.type !== void 0;
100
+ }
101
+ e.IsBinding = v;
102
+ })(N || (N = {}));
103
+ var Qe;
104
+ ((e) => {
105
+ function t(n) {
106
+ return n.url !== void 0;
107
+ }
108
+ e.isWebEventHandler = t;
109
+ })(Qe || (Qe = {}));
110
+ class or extends Map {
111
+ constructor(t) {
112
+ super(), this.factory = t;
113
+ }
114
+ getOrDefault(t) {
115
+ if (!this.has(t)) {
116
+ const n = this.factory();
117
+ return this.set(t, n), n;
118
+ }
119
+ return super.get(t);
120
+ }
121
+ }
122
+ function ye(e) {
123
+ return new or(e);
124
+ }
125
+ function de(e) {
126
+ return typeof e == "function" ? e() : B(e);
127
+ }
128
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
129
+ const Ye = () => {
130
+ };
131
+ function Xe(e, t = !1, n = "Timeout") {
132
+ return new Promise((r, o) => {
133
+ setTimeout(t ? () => o(n) : r, e);
134
+ });
135
+ }
136
+ function Ze(e, t = !1) {
137
+ function n(a, { flush: f = "sync", deep: d = !1, timeout: p, throwOnTimeout: v } = {}) {
138
+ let g = null;
139
+ const _ = [new Promise((O) => {
140
+ g = K(
141
+ e,
142
+ (V) => {
143
+ a(V) !== t && (g ? g() : Ve(() => g == null ? void 0 : g()), O(V));
144
+ },
145
+ {
146
+ flush: f,
147
+ deep: d,
148
+ immediate: !0
149
+ }
150
+ );
151
+ })];
152
+ return p != null && _.push(
153
+ Xe(p, v).then(() => de(e)).finally(() => g == null ? void 0 : g())
154
+ ), Promise.race(_);
155
+ }
156
+ function r(a, f) {
157
+ if (!Ut(a))
158
+ return n((V) => V === a, f);
159
+ const { flush: d = "sync", deep: p = !1, timeout: v, throwOnTimeout: g } = f ?? {};
160
+ let y = null;
161
+ const O = [new Promise((V) => {
162
+ y = K(
163
+ [e, a],
164
+ ([$, x]) => {
165
+ t !== ($ === x) && (y ? y() : Ve(() => y == null ? void 0 : y()), V($));
166
+ },
167
+ {
168
+ flush: d,
169
+ deep: p,
170
+ immediate: !0
171
+ }
172
+ );
173
+ })];
174
+ return v != null && O.push(
175
+ Xe(v, g).then(() => de(e)).finally(() => (y == null || y(), de(e)))
176
+ ), Promise.race(O);
177
+ }
178
+ function o(a) {
179
+ return n((f) => !!f, a);
180
+ }
181
+ function s(a) {
182
+ return r(null, a);
183
+ }
184
+ function i(a) {
185
+ return r(void 0, a);
186
+ }
187
+ function c(a) {
188
+ return n(Number.isNaN, a);
189
+ }
190
+ function l(a, f) {
191
+ return n((d) => {
192
+ const p = Array.from(d);
193
+ return p.includes(a) || p.includes(de(a));
194
+ }, f);
195
+ }
196
+ function h(a) {
197
+ return u(1, a);
198
+ }
199
+ function u(a = 1, f) {
200
+ let d = -1;
201
+ return n(() => (d += 1, d >= a), f);
202
+ }
203
+ return Array.isArray(de(e)) ? {
204
+ toMatch: n,
205
+ toContains: l,
206
+ changed: h,
207
+ changedTimes: u,
208
+ get not() {
209
+ return Ze(e, !t);
210
+ }
211
+ } : {
212
+ toMatch: n,
213
+ toBe: r,
214
+ toBeTruthy: o,
215
+ toBeNull: s,
216
+ toBeNaN: c,
217
+ toBeUndefined: i,
218
+ changed: h,
219
+ changedTimes: u,
220
+ get not() {
221
+ return Ze(e, !t);
222
+ }
223
+ };
224
+ }
225
+ function sr(e) {
226
+ return Ze(e);
227
+ }
228
+ function ir(e, t, n) {
229
+ let r;
230
+ Ut(n) ? r = {
231
+ evaluating: n
232
+ } : r = n || {};
233
+ const {
234
+ lazy: o = !1,
235
+ evaluating: s = void 0,
236
+ shallow: i = !0,
237
+ onError: c = Ye
238
+ } = r, l = J(!o), h = i ? Q(t) : J(t);
239
+ let u = 0;
240
+ return Gt(async (a) => {
241
+ if (!l.value)
242
+ return;
243
+ u++;
244
+ const f = u;
245
+ let d = !1;
246
+ s && Promise.resolve().then(() => {
247
+ s.value = !0;
248
+ });
249
+ try {
250
+ const p = await e((v) => {
251
+ a(() => {
252
+ s && (s.value = !1), d || v();
253
+ });
254
+ });
255
+ f === u && (h.value = p);
256
+ } catch (p) {
257
+ c(p);
258
+ } finally {
259
+ s && f === u && (s.value = !1), d = !0;
260
+ }
261
+ }), o ? W(() => (l.value = !0, h.value)) : h;
262
+ }
263
+ function ar(e, t, n) {
264
+ const {
265
+ immediate: r = !0,
266
+ delay: o = 0,
267
+ onError: s = Ye,
268
+ onSuccess: i = Ye,
269
+ resetOnExecute: c = !0,
270
+ shallow: l = !0,
271
+ throwError: h
272
+ } = {}, u = l ? Q(t) : J(t), a = J(!1), f = J(!1), d = Q(void 0);
273
+ async function p(y = 0, ..._) {
274
+ c && (u.value = t), d.value = void 0, a.value = !1, f.value = !0, y > 0 && await Xe(y);
275
+ const O = typeof e == "function" ? e(..._) : e;
276
+ try {
277
+ const V = await O;
278
+ u.value = V, a.value = !0, i(V);
279
+ } catch (V) {
280
+ if (d.value = V, s(V), h)
281
+ throw V;
282
+ } finally {
283
+ f.value = !1;
284
+ }
285
+ return u.value;
286
+ }
287
+ r && p(o);
288
+ const v = {
289
+ state: u,
290
+ isReady: a,
291
+ isLoading: f,
292
+ error: d,
293
+ execute: p
294
+ };
295
+ function g() {
296
+ return new Promise((y, _) => {
297
+ sr(f).toBe(!1).then(() => y(v)).catch(_);
298
+ });
299
+ }
300
+ return {
301
+ ...v,
302
+ then(y, _) {
303
+ return g().then(y, _);
304
+ }
305
+ };
306
+ }
307
+ function G(e, t) {
308
+ t = t || {};
309
+ const n = [...Object.keys(t), "__Vue"], r = [...Object.values(t), Bn];
310
+ try {
311
+ return new Function(...n, `return (${e})`)(...r);
312
+ } catch (o) {
313
+ throw new Error(o + " in function code: " + e);
314
+ }
315
+ }
316
+ function cr(e) {
317
+ if (e.startsWith(":")) {
318
+ e = e.slice(1);
319
+ try {
320
+ return G(e);
321
+ } catch (t) {
322
+ throw new Error(t + " in function code: " + e);
323
+ }
324
+ }
325
+ }
326
+ function Jt(e) {
327
+ return e.constructor.name === "AsyncFunction";
328
+ }
329
+ function ur(e, t) {
330
+ return J(e.value);
331
+ }
332
+ function lr(e, t, n) {
333
+ const { bind: r = {}, code: o, const: s = [] } = e, i = Object.values(r).map((u, a) => s[a] === 1 ? u : t.getVueRefObjectOrValue(u));
334
+ if (Jt(new Function(o)))
335
+ return ir(
336
+ async () => {
337
+ const u = Object.fromEntries(
338
+ Object.keys(r).map((a, f) => [a, i[f]])
339
+ );
340
+ return await G(o, u)();
341
+ },
342
+ null,
343
+ { lazy: !0 }
344
+ );
345
+ const c = Object.fromEntries(
346
+ Object.keys(r).map((u, a) => [u, i[a]])
347
+ ), l = G(o, c);
348
+ return W(l);
349
+ }
350
+ function fr(e, t, n) {
351
+ const {
352
+ inputs: r = [],
353
+ code: o,
354
+ slient: s,
355
+ data: i,
356
+ asyncInit: c = null
357
+ } = e, l = s || Array(r.length).fill(0), h = i || Array(r.length).fill(0), u = r.filter((v, g) => l[g] === 0 && h[g] === 0).map((v) => t.getVueRefObject(v));
358
+ function a() {
359
+ return r.map(
360
+ (v, g) => h[g] === 1 ? v : t.getObjectToValue(v)
361
+ );
362
+ }
363
+ const f = G(o), d = Q(null), p = { immediate: !0, deep: !0 };
364
+ return Jt(f) ? (d.value = c, K(
365
+ u,
366
+ async () => {
367
+ d.value = await f(...a());
368
+ },
369
+ p
370
+ )) : K(
371
+ u,
372
+ () => {
373
+ d.value = f(...a());
374
+ },
375
+ p
376
+ ), Wn(d);
377
+ }
378
+ function hr(e, t) {
379
+ const { init: n } = e;
380
+ return Q(n ?? null);
381
+ }
382
+ function dr() {
383
+ return [];
384
+ }
385
+ const Ee = ye(dr);
386
+ function Qt(e, t) {
387
+ const n = Ee.getOrDefault(e.id), r = /* @__PURE__ */ new Map();
388
+ return n.push(r), t.replaceSnapshot({
389
+ scopeSnapshot: Yt()
390
+ }), (e.vars || []).forEach((o) => {
391
+ r.set(o.id, gr(o, t));
392
+ }), (e.web_computed || []).forEach((o) => {
393
+ const { init: s } = o;
394
+ r.set(o.id, J(s));
395
+ }), n.length - 1;
396
+ }
397
+ function Yt() {
398
+ const e = /* @__PURE__ */ new Map();
399
+ for (const [n, r] of Ee) {
400
+ const o = r[r.length - 1];
401
+ e.set(n, [o]);
402
+ }
403
+ function t(n) {
404
+ return Xt(n, e);
405
+ }
406
+ return {
407
+ getVueRef: t
408
+ };
409
+ }
410
+ function pr(e) {
411
+ return Xt(e, Ee);
412
+ }
413
+ function Xt(e, t) {
414
+ const n = t.get(e.sid);
415
+ if (!n)
416
+ throw new Error(`Scope ${e.sid} not found`);
417
+ const o = n[n.length - 1].get(e.id);
418
+ if (!o)
419
+ throw new Error(`Var ${e.id} not found in scope ${e.sid}`);
420
+ return o;
421
+ }
422
+ function mr(e) {
423
+ Ee.delete(e);
424
+ }
425
+ function Zt(e, t) {
426
+ const n = Ee.get(e);
427
+ n && n.splice(t, 1);
428
+ }
429
+ function gr(e, t, n) {
430
+ if (oe.isRef(e))
431
+ return ur(e);
432
+ if (oe.isVueComputed(e))
433
+ return lr(
434
+ e,
435
+ t
436
+ );
437
+ if (oe.isJsComputed(e))
438
+ return fr(
439
+ e,
440
+ t
441
+ );
442
+ if (oe.isWebComputed(e))
443
+ return hr(e);
444
+ if (oe.isConstData(e))
445
+ return e.value;
446
+ throw new Error(`Invalid var config: ${e}`);
447
+ }
448
+ const ke = ye(() => []);
449
+ function vr(e) {
450
+ const t = Q();
451
+ ke.getOrDefault(e.sid).push(t);
452
+ }
453
+ function yr(e) {
454
+ ke.has(e) && ke.delete(e);
455
+ }
456
+ function en() {
457
+ const e = new Map(
458
+ Array.from(ke.entries()).map(([n, r]) => [
459
+ n,
460
+ r[r.length - 1]
461
+ ])
462
+ );
463
+ function t(n) {
464
+ return e.get(n.sid);
465
+ }
466
+ return {
467
+ getRef: t
468
+ };
469
+ }
470
+ const $e = ye(() => []);
471
+ function Er(e) {
472
+ const t = $e.getOrDefault(e);
473
+ return t.push(Q({})), t.length - 1;
474
+ }
475
+ function wr(e, t, n) {
476
+ $e.get(e)[t].value = n;
477
+ }
478
+ function _r(e) {
479
+ $e.delete(e);
480
+ }
481
+ function Rr() {
482
+ const e = /* @__PURE__ */ new Map();
483
+ for (const [n, r] of $e) {
484
+ const o = r[r.length - 1];
485
+ e.set(n, o);
486
+ }
487
+ function t(n) {
488
+ return e.get(n.id).value[n.name];
489
+ }
490
+ return {
491
+ getPropsValue: t
492
+ };
493
+ }
494
+ function wt(e, t) {
495
+ Object.entries(e).forEach(([n, r]) => t(r, n));
496
+ }
497
+ function Te(e, t) {
498
+ return tn(e, {
499
+ valueFn: t
500
+ });
501
+ }
502
+ function tn(e, t) {
503
+ const { valueFn: n, keyFn: r } = t;
504
+ return Object.fromEntries(
505
+ Object.entries(e).map(([o, s]) => [
506
+ r ? r(o, s) : o,
507
+ n(s, o)
508
+ ])
509
+ );
510
+ }
511
+ function nn(e, t, n) {
512
+ if (Array.isArray(t)) {
513
+ const [o, ...s] = t;
514
+ switch (o) {
515
+ case "!":
516
+ return !e;
517
+ case "+":
518
+ return e + s[0];
519
+ case "~+":
520
+ return s[0] + e;
521
+ }
522
+ }
523
+ const r = rn(t, n);
524
+ return e[r];
525
+ }
526
+ function rn(e, t) {
527
+ if (typeof e == "string" || typeof e == "number")
528
+ return e;
529
+ if (!Array.isArray(e))
530
+ throw new Error(`Invalid path ${e}`);
531
+ const [n, ...r] = e;
532
+ switch (n) {
533
+ case "bind":
534
+ if (!t)
535
+ throw new Error("No bindable function provided");
536
+ return t(r[0]);
537
+ default:
538
+ throw new Error(`Invalid flag ${n} in array at ${e}`);
539
+ }
540
+ }
541
+ function we(e, t, n) {
542
+ return t.reduce(
543
+ (r, o) => nn(r, o, n),
544
+ e
545
+ );
546
+ }
547
+ function et(e, t, n, r) {
548
+ t.reduce((o, s, i) => {
549
+ if (i === t.length - 1)
550
+ o[rn(s, r)] = n;
551
+ else
552
+ return nn(o, s, r);
553
+ }, e);
554
+ }
555
+ const on = /* @__PURE__ */ new Map(), ft = ye(() => /* @__PURE__ */ new Map()), sn = /* @__PURE__ */ new Set(), an = Symbol("vfor");
556
+ function Or(e) {
557
+ const t = cn() ?? {};
558
+ Pe(an, { ...t, [e.fid]: e.key });
559
+ }
560
+ function cn() {
561
+ return te(an, void 0);
562
+ }
563
+ function br() {
564
+ const e = cn(), t = /* @__PURE__ */ new Map();
565
+ return e === void 0 || Object.keys(e).forEach((n) => {
566
+ t.set(n, e[n]);
567
+ }), t;
568
+ }
569
+ function Sr(e, t, n, r) {
570
+ const o = Y();
571
+ if (r) {
572
+ sn.add(e);
573
+ return;
574
+ }
575
+ let s;
576
+ if (n)
577
+ s = new Ar(
578
+ o,
579
+ t
580
+ );
581
+ else {
582
+ const i = Array.isArray(t) ? t : Object.entries(t).map(([c, l], h) => [l, c, h]);
583
+ s = new Cr(i, o);
584
+ }
585
+ on.set(e, s);
586
+ }
587
+ function Pr(e, t, n) {
588
+ const r = ft.getOrDefault(e);
589
+ r.has(t) || r.set(t, J(n)), r.get(t).value = n;
590
+ }
591
+ function Vr(e) {
592
+ const t = /* @__PURE__ */ new Set();
593
+ function n(o) {
594
+ t.add(o);
595
+ }
596
+ function r() {
597
+ const o = ft.get(e);
598
+ o !== void 0 && o.forEach((s, i) => {
599
+ t.has(i) || o.delete(i);
600
+ });
601
+ }
602
+ return {
603
+ add: n,
604
+ removeUnusedKeys: r
605
+ };
606
+ }
607
+ function kr(e) {
608
+ const t = e, n = br();
609
+ function r(o) {
610
+ const s = n.get(o) ?? t;
611
+ return ft.get(o).get(s).value;
612
+ }
613
+ return {
614
+ getVForIndex: r
615
+ };
616
+ }
617
+ function Nr(e) {
618
+ return on.get(e.binding.fid).createRefObjectWithPaths(e);
619
+ }
620
+ function Ir(e) {
621
+ return sn.has(e);
622
+ }
623
+ class Cr {
624
+ constructor(t, n) {
625
+ this.array = t, this.snapshot = n;
626
+ }
627
+ createRefObjectWithPaths(t) {
628
+ const { binding: n } = t, { vforSnapshot: r } = t, { path: o = [] } = n, s = [...o], i = r.getVForIndex(n.fid);
629
+ return s.unshift(i), ct(() => ({
630
+ get: () => we(
631
+ this.array,
632
+ s,
633
+ this.snapshot.getObjectToValue
634
+ ),
635
+ set: () => {
636
+ throw new Error("Cannot set value to a constant array");
637
+ }
638
+ }));
639
+ }
640
+ }
641
+ class Ar {
642
+ constructor(t, n) {
643
+ M(this, "_isDictSource");
644
+ this.snapshot = t, this.binding = n;
645
+ }
646
+ isDictSource(t) {
647
+ if (this._isDictSource === void 0) {
648
+ const n = H(t);
649
+ this._isDictSource = n !== null && !Array.isArray(n);
650
+ }
651
+ return this._isDictSource;
652
+ }
653
+ createRefObjectWithPaths(t) {
654
+ const { binding: n } = t, { path: r = [] } = n, o = [...r], { vforSnapshot: s } = t, i = this.snapshot.getVueRefObject(this.binding), c = this.isDictSource(i), l = s.getVForIndex(n.fid), h = c && o.length === 0 ? [0] : [];
655
+ return o.unshift(l, ...h), ct(() => ({
656
+ get: () => {
657
+ const u = H(i), a = c ? Object.entries(u).map(([f, d], p) => [
658
+ d,
659
+ f,
660
+ p
661
+ ]) : u;
662
+ try {
663
+ return we(
664
+ H(a),
665
+ o,
666
+ this.snapshot.getObjectToValue
667
+ );
668
+ } catch {
669
+ return;
670
+ }
671
+ },
672
+ set: (u) => {
673
+ const a = H(i);
674
+ if (c) {
675
+ const f = Object.keys(a);
676
+ if (l >= f.length)
677
+ throw new Error("Cannot set value to a non-existent key");
678
+ const d = f[l];
679
+ et(
680
+ a,
681
+ [d],
682
+ u,
683
+ this.snapshot.getObjectToValue
684
+ );
685
+ return;
686
+ }
687
+ et(
688
+ a,
689
+ o,
690
+ u,
691
+ this.snapshot.getObjectToValue
692
+ );
693
+ }
694
+ }));
695
+ }
696
+ }
697
+ function $r(e, t, n = !1) {
698
+ return n && (e = `$computed(${e})`, t = { ...t, $computed: W }), G(e, t);
699
+ }
700
+ function _t(e, t, n) {
701
+ const { paths: r, getBindableValueFn: o } = t, { paths: s, getBindableValueFn: i } = t;
702
+ return r === void 0 || r.length === 0 ? e : ct(() => ({
703
+ get() {
704
+ try {
705
+ return we(
706
+ H(e),
707
+ r,
708
+ o
709
+ );
710
+ } catch {
711
+ return;
712
+ }
713
+ },
714
+ set(c) {
715
+ et(
716
+ H(e),
717
+ s || r,
718
+ c,
719
+ i
720
+ );
721
+ }
722
+ }));
723
+ }
724
+ function Rt(e) {
725
+ return e == null;
726
+ }
727
+ function Tr() {
728
+ return un().__VUE_DEVTOOLS_GLOBAL_HOOK__;
729
+ }
730
+ function un() {
731
+ return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
732
+ }
733
+ const jr = typeof Proxy == "function", xr = "devtools-plugin:setup", Dr = "plugin:settings:set";
734
+ let ae, tt;
735
+ function Mr() {
736
+ var e;
737
+ return ae !== void 0 || (typeof window < "u" && window.performance ? (ae = !0, tt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ae = !0, tt = globalThis.perf_hooks.performance) : ae = !1), ae;
738
+ }
739
+ function Fr() {
740
+ return Mr() ? tt.now() : Date.now();
741
+ }
742
+ class Br {
743
+ constructor(t, n) {
744
+ this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
745
+ const r = {};
746
+ if (t.settings)
747
+ for (const i in t.settings) {
748
+ const c = t.settings[i];
749
+ r[i] = c.defaultValue;
750
+ }
751
+ const o = `__vue-devtools-plugin-settings__${t.id}`;
752
+ let s = Object.assign({}, r);
753
+ try {
754
+ const i = localStorage.getItem(o), c = JSON.parse(i);
755
+ Object.assign(s, c);
756
+ } catch {
757
+ }
758
+ this.fallbacks = {
759
+ getSettings() {
760
+ return s;
761
+ },
762
+ setSettings(i) {
763
+ try {
764
+ localStorage.setItem(o, JSON.stringify(i));
765
+ } catch {
766
+ }
767
+ s = i;
768
+ },
769
+ now() {
770
+ return Fr();
771
+ }
772
+ }, n && n.on(Dr, (i, c) => {
773
+ i === this.plugin.id && this.fallbacks.setSettings(c);
774
+ }), this.proxiedOn = new Proxy({}, {
775
+ get: (i, c) => this.target ? this.target.on[c] : (...l) => {
776
+ this.onQueue.push({
777
+ method: c,
778
+ args: l
779
+ });
780
+ }
781
+ }), this.proxiedTarget = new Proxy({}, {
782
+ get: (i, c) => this.target ? this.target[c] : c === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(c) ? (...l) => (this.targetQueue.push({
783
+ method: c,
784
+ args: l,
785
+ resolve: () => {
786
+ }
787
+ }), this.fallbacks[c](...l)) : (...l) => new Promise((h) => {
788
+ this.targetQueue.push({
789
+ method: c,
790
+ args: l,
791
+ resolve: h
792
+ });
793
+ })
794
+ });
795
+ }
796
+ async setRealTarget(t) {
797
+ this.target = t;
798
+ for (const n of this.onQueue)
799
+ this.target.on[n.method](...n.args);
800
+ for (const n of this.targetQueue)
801
+ n.resolve(await this.target[n.method](...n.args));
802
+ }
803
+ }
804
+ function Wr(e, t) {
805
+ const n = e, r = un(), o = Tr(), s = jr && n.enableEarlyProxy;
806
+ if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
807
+ o.emit(xr, e, t);
808
+ else {
809
+ const i = s ? new Br(n, o) : null;
810
+ (r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
811
+ pluginDescriptor: n,
812
+ setupFn: t,
813
+ proxy: i
814
+ }), i && t(i.proxiedTarget);
815
+ }
816
+ }
817
+ var b = {};
818
+ const z = typeof document < "u";
819
+ function ln(e) {
820
+ return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
821
+ }
822
+ function Lr(e) {
823
+ return e.__esModule || e[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
824
+ // add the Module string tag
825
+ e.default && ln(e.default);
826
+ }
827
+ const I = Object.assign;
828
+ function Ue(e, t) {
829
+ const n = {};
830
+ for (const r in t) {
831
+ const o = t[r];
832
+ n[r] = L(o) ? o.map(e) : e(o);
833
+ }
834
+ return n;
835
+ }
836
+ const ve = () => {
837
+ }, L = Array.isArray;
838
+ function S(e) {
839
+ const t = Array.from(arguments).slice(1);
840
+ console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
841
+ }
842
+ const fn = /#/g, Ur = /&/g, Gr = /\//g, Kr = /=/g, Hr = /\?/g, hn = /\+/g, qr = /%5B/g, zr = /%5D/g, dn = /%5E/g, Jr = /%60/g, pn = /%7B/g, Qr = /%7C/g, mn = /%7D/g, Yr = /%20/g;
843
+ function ht(e) {
844
+ return encodeURI("" + e).replace(Qr, "|").replace(qr, "[").replace(zr, "]");
845
+ }
846
+ function Xr(e) {
847
+ return ht(e).replace(pn, "{").replace(mn, "}").replace(dn, "^");
848
+ }
849
+ function nt(e) {
850
+ return ht(e).replace(hn, "%2B").replace(Yr, "+").replace(fn, "%23").replace(Ur, "%26").replace(Jr, "`").replace(pn, "{").replace(mn, "}").replace(dn, "^");
851
+ }
852
+ function Zr(e) {
853
+ return nt(e).replace(Kr, "%3D");
854
+ }
855
+ function eo(e) {
856
+ return ht(e).replace(fn, "%23").replace(Hr, "%3F");
857
+ }
858
+ function to(e) {
859
+ return e == null ? "" : eo(e).replace(Gr, "%2F");
860
+ }
861
+ function ce(e) {
862
+ try {
863
+ return decodeURIComponent("" + e);
864
+ } catch {
865
+ b.NODE_ENV !== "production" && S(`Error decoding "${e}". Using original value`);
866
+ }
867
+ return "" + e;
868
+ }
869
+ const no = /\/$/, ro = (e) => e.replace(no, "");
870
+ function Ge(e, t, n = "/") {
871
+ let r, o = {}, s = "", i = "";
872
+ const c = t.indexOf("#");
873
+ let l = t.indexOf("?");
874
+ return c < l && c >= 0 && (l = -1), l > -1 && (r = t.slice(0, l), s = t.slice(l + 1, c > -1 ? c : t.length), o = e(s)), c > -1 && (r = r || t.slice(0, c), i = t.slice(c, t.length)), r = io(r ?? t, n), {
875
+ fullPath: r + (s && "?") + s + i,
876
+ path: r,
877
+ query: o,
878
+ hash: ce(i)
879
+ };
880
+ }
881
+ function oo(e, t) {
882
+ const n = t.query ? e(t.query) : "";
883
+ return t.path + (n && "?") + n + (t.hash || "");
884
+ }
885
+ function Ot(e, t) {
886
+ return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
887
+ }
888
+ function bt(e, t, n) {
889
+ const r = t.matched.length - 1, o = n.matched.length - 1;
890
+ return r > -1 && r === o && ne(t.matched[r], n.matched[o]) && gn(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
891
+ }
892
+ function ne(e, t) {
893
+ return (e.aliasOf || e) === (t.aliasOf || t);
894
+ }
895
+ function gn(e, t) {
896
+ if (Object.keys(e).length !== Object.keys(t).length)
897
+ return !1;
898
+ for (const n in e)
899
+ if (!so(e[n], t[n]))
900
+ return !1;
901
+ return !0;
902
+ }
903
+ function so(e, t) {
904
+ return L(e) ? St(e, t) : L(t) ? St(t, e) : e === t;
905
+ }
906
+ function St(e, t) {
907
+ return L(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
908
+ }
909
+ function io(e, t) {
910
+ if (e.startsWith("/"))
911
+ return e;
912
+ if (b.NODE_ENV !== "production" && !t.startsWith("/"))
913
+ return S(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`), e;
914
+ if (!e)
915
+ return t;
916
+ const n = t.split("/"), r = e.split("/"), o = r[r.length - 1];
917
+ (o === ".." || o === ".") && r.push("");
918
+ let s = n.length - 1, i, c;
919
+ for (i = 0; i < r.length; i++)
920
+ if (c = r[i], c !== ".")
921
+ if (c === "..")
922
+ s > 1 && s--;
923
+ else
924
+ break;
925
+ return n.slice(0, s).join("/") + "/" + r.slice(i).join("/");
926
+ }
927
+ const Z = {
928
+ path: "/",
929
+ // TODO: could we use a symbol in the future?
930
+ name: void 0,
931
+ params: {},
932
+ query: {},
933
+ hash: "",
934
+ fullPath: "/",
935
+ matched: [],
936
+ meta: {},
937
+ redirectedFrom: void 0
938
+ };
939
+ var ue;
940
+ (function(e) {
941
+ e.pop = "pop", e.push = "push";
942
+ })(ue || (ue = {}));
943
+ var se;
944
+ (function(e) {
945
+ e.back = "back", e.forward = "forward", e.unknown = "";
946
+ })(se || (se = {}));
947
+ const Ke = "";
948
+ function vn(e) {
949
+ if (!e)
950
+ if (z) {
951
+ const t = document.querySelector("base");
952
+ e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
953
+ } else
954
+ e = "/";
955
+ return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), ro(e);
956
+ }
957
+ const ao = /^[^#]+#/;
958
+ function yn(e, t) {
959
+ return e.replace(ao, "#") + t;
960
+ }
961
+ function co(e, t) {
962
+ const n = document.documentElement.getBoundingClientRect(), r = e.getBoundingClientRect();
963
+ return {
964
+ behavior: t.behavior,
965
+ left: r.left - n.left - (t.left || 0),
966
+ top: r.top - n.top - (t.top || 0)
967
+ };
968
+ }
969
+ const je = () => ({
970
+ left: window.scrollX,
971
+ top: window.scrollY
972
+ });
973
+ function uo(e) {
974
+ let t;
975
+ if ("el" in e) {
976
+ const n = e.el, r = typeof n == "string" && n.startsWith("#");
977
+ if (b.NODE_ENV !== "production" && typeof e.el == "string" && (!r || !document.getElementById(e.el.slice(1))))
978
+ try {
979
+ const s = document.querySelector(e.el);
980
+ if (r && s) {
981
+ S(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);
982
+ return;
983
+ }
984
+ } catch {
985
+ S(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);
986
+ return;
987
+ }
988
+ const o = typeof n == "string" ? r ? document.getElementById(n.slice(1)) : document.querySelector(n) : n;
989
+ if (!o) {
990
+ b.NODE_ENV !== "production" && S(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);
991
+ return;
992
+ }
993
+ t = co(o, e);
994
+ } else
995
+ t = e;
996
+ "scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.scrollX, t.top != null ? t.top : window.scrollY);
997
+ }
998
+ function Pt(e, t) {
999
+ return (history.state ? history.state.position - t : -1) + e;
1000
+ }
1001
+ const rt = /* @__PURE__ */ new Map();
1002
+ function lo(e, t) {
1003
+ rt.set(e, t);
1004
+ }
1005
+ function fo(e) {
1006
+ const t = rt.get(e);
1007
+ return rt.delete(e), t;
1008
+ }
1009
+ let ho = () => location.protocol + "//" + location.host;
1010
+ function En(e, t) {
1011
+ const { pathname: n, search: r, hash: o } = t, s = e.indexOf("#");
1012
+ if (s > -1) {
1013
+ let c = o.includes(e.slice(s)) ? e.slice(s).length : 1, l = o.slice(c);
1014
+ return l[0] !== "/" && (l = "/" + l), Ot(l, "");
1015
+ }
1016
+ return Ot(n, e) + r + o;
1017
+ }
1018
+ function po(e, t, n, r) {
1019
+ let o = [], s = [], i = null;
1020
+ const c = ({ state: f }) => {
1021
+ const d = En(e, location), p = n.value, v = t.value;
1022
+ let g = 0;
1023
+ if (f) {
1024
+ if (n.value = d, t.value = f, i && i === p) {
1025
+ i = null;
1026
+ return;
1027
+ }
1028
+ g = v ? f.position - v.position : 0;
1029
+ } else
1030
+ r(d);
1031
+ o.forEach((y) => {
1032
+ y(n.value, p, {
1033
+ delta: g,
1034
+ type: ue.pop,
1035
+ direction: g ? g > 0 ? se.forward : se.back : se.unknown
1036
+ });
1037
+ });
1038
+ };
1039
+ function l() {
1040
+ i = n.value;
1041
+ }
1042
+ function h(f) {
1043
+ o.push(f);
1044
+ const d = () => {
1045
+ const p = o.indexOf(f);
1046
+ p > -1 && o.splice(p, 1);
1047
+ };
1048
+ return s.push(d), d;
1049
+ }
1050
+ function u() {
1051
+ const { history: f } = window;
1052
+ f.state && f.replaceState(I({}, f.state, { scroll: je() }), "");
1053
+ }
1054
+ function a() {
1055
+ for (const f of s)
1056
+ f();
1057
+ s = [], window.removeEventListener("popstate", c), window.removeEventListener("beforeunload", u);
1058
+ }
1059
+ return window.addEventListener("popstate", c), window.addEventListener("beforeunload", u, {
1060
+ passive: !0
1061
+ }), {
1062
+ pauseListeners: l,
1063
+ listen: h,
1064
+ destroy: a
1065
+ };
1066
+ }
1067
+ function Vt(e, t, n, r = !1, o = !1) {
1068
+ return {
1069
+ back: e,
1070
+ current: t,
1071
+ forward: n,
1072
+ replaced: r,
1073
+ position: window.history.length,
1074
+ scroll: o ? je() : null
1075
+ };
1076
+ }
1077
+ function mo(e) {
1078
+ const { history: t, location: n } = window, r = {
1079
+ value: En(e, n)
1080
+ }, o = { value: t.state };
1081
+ o.value || s(r.value, {
1082
+ back: null,
1083
+ current: r.value,
1084
+ forward: null,
1085
+ // the length is off by one, we need to decrease it
1086
+ position: t.length - 1,
1087
+ replaced: !0,
1088
+ // don't add a scroll as the user may have an anchor, and we want
1089
+ // scrollBehavior to be triggered without a saved position
1090
+ scroll: null
1091
+ }, !0);
1092
+ function s(l, h, u) {
1093
+ const a = e.indexOf("#"), f = a > -1 ? (n.host && document.querySelector("base") ? e : e.slice(a)) + l : ho() + e + l;
1094
+ try {
1095
+ t[u ? "replaceState" : "pushState"](h, "", f), o.value = h;
1096
+ } catch (d) {
1097
+ b.NODE_ENV !== "production" ? S("Error with push/replace State", d) : console.error(d), n[u ? "replace" : "assign"](f);
1098
+ }
1099
+ }
1100
+ function i(l, h) {
1101
+ const u = I({}, t.state, Vt(
1102
+ o.value.back,
1103
+ // keep back and forward entries but override current position
1104
+ l,
1105
+ o.value.forward,
1106
+ !0
1107
+ ), h, { position: o.value.position });
1108
+ s(l, u, !0), r.value = l;
1109
+ }
1110
+ function c(l, h) {
1111
+ const u = I(
1112
+ {},
1113
+ // use current history state to gracefully handle a wrong call to
1114
+ // history.replaceState
1115
+ // https://github.com/vuejs/router/issues/366
1116
+ o.value,
1117
+ t.state,
1118
+ {
1119
+ forward: l,
1120
+ scroll: je()
1121
+ }
1122
+ );
1123
+ b.NODE_ENV !== "production" && !t.state && S(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
1124
+
1125
+ history.replaceState(history.state, '', url)
1126
+
1127
+ You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`), s(u.current, u, !0);
1128
+ const a = I({}, Vt(r.value, l, null), { position: u.position + 1 }, h);
1129
+ s(l, a, !1), r.value = l;
1130
+ }
1131
+ return {
1132
+ location: r,
1133
+ state: o,
1134
+ push: c,
1135
+ replace: i
1136
+ };
1137
+ }
1138
+ function wn(e) {
1139
+ e = vn(e);
1140
+ const t = mo(e), n = po(e, t.state, t.location, t.replace);
1141
+ function r(s, i = !0) {
1142
+ i || n.pauseListeners(), history.go(s);
1143
+ }
1144
+ const o = I({
1145
+ // it's overridden right after
1146
+ location: "",
1147
+ base: e,
1148
+ go: r,
1149
+ createHref: yn.bind(null, e)
1150
+ }, t, n);
1151
+ return Object.defineProperty(o, "location", {
1152
+ enumerable: !0,
1153
+ get: () => t.location.value
1154
+ }), Object.defineProperty(o, "state", {
1155
+ enumerable: !0,
1156
+ get: () => t.state.value
1157
+ }), o;
1158
+ }
1159
+ function go(e = "") {
1160
+ let t = [], n = [Ke], r = 0;
1161
+ e = vn(e);
1162
+ function o(c) {
1163
+ r++, r !== n.length && n.splice(r), n.push(c);
1164
+ }
1165
+ function s(c, l, { direction: h, delta: u }) {
1166
+ const a = {
1167
+ direction: h,
1168
+ delta: u,
1169
+ type: ue.pop
1170
+ };
1171
+ for (const f of t)
1172
+ f(c, l, a);
1173
+ }
1174
+ const i = {
1175
+ // rewritten by Object.defineProperty
1176
+ location: Ke,
1177
+ // TODO: should be kept in queue
1178
+ state: {},
1179
+ base: e,
1180
+ createHref: yn.bind(null, e),
1181
+ replace(c) {
1182
+ n.splice(r--, 1), o(c);
1183
+ },
1184
+ push(c, l) {
1185
+ o(c);
1186
+ },
1187
+ listen(c) {
1188
+ return t.push(c), () => {
1189
+ const l = t.indexOf(c);
1190
+ l > -1 && t.splice(l, 1);
1191
+ };
1192
+ },
1193
+ destroy() {
1194
+ t = [], n = [Ke], r = 0;
1195
+ },
1196
+ go(c, l = !0) {
1197
+ const h = this.location, u = (
1198
+ // we are considering delta === 0 going forward, but in abstract mode
1199
+ // using 0 for the delta doesn't make sense like it does in html5 where
1200
+ // it reloads the page
1201
+ c < 0 ? se.back : se.forward
1202
+ );
1203
+ r = Math.max(0, Math.min(r + c, n.length - 1)), l && s(this.location, h, {
1204
+ direction: u,
1205
+ delta: c
1206
+ });
1207
+ }
1208
+ };
1209
+ return Object.defineProperty(i, "location", {
1210
+ enumerable: !0,
1211
+ get: () => n[r]
1212
+ }), i;
1213
+ }
1214
+ function vo(e) {
1215
+ return e = location.host ? e || location.pathname + location.search : "", e.includes("#") || (e += "#"), b.NODE_ENV !== "production" && !e.endsWith("#/") && !e.endsWith("#") && S(`A hash base must end with a "#":
1216
+ "${e}" should be "${e.replace(/#.*$/, "#")}".`), wn(e);
1217
+ }
1218
+ function Ne(e) {
1219
+ return typeof e == "string" || e && typeof e == "object";
1220
+ }
1221
+ function _n(e) {
1222
+ return typeof e == "string" || typeof e == "symbol";
1223
+ }
1224
+ const ot = Symbol(b.NODE_ENV !== "production" ? "navigation failure" : "");
1225
+ var kt;
1226
+ (function(e) {
1227
+ e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
1228
+ })(kt || (kt = {}));
1229
+ const yo = {
1230
+ 1({ location: e, currentLocation: t }) {
1231
+ return `No match for
1232
+ ${JSON.stringify(e)}${t ? `
1233
+ while being at
1234
+ ` + JSON.stringify(t) : ""}`;
1235
+ },
1236
+ 2({ from: e, to: t }) {
1237
+ return `Redirected from "${e.fullPath}" to "${wo(t)}" via a navigation guard.`;
1238
+ },
1239
+ 4({ from: e, to: t }) {
1240
+ return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`;
1241
+ },
1242
+ 8({ from: e, to: t }) {
1243
+ return `Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`;
1244
+ },
1245
+ 16({ from: e, to: t }) {
1246
+ return `Avoided redundant navigation to current location: "${e.fullPath}".`;
1247
+ }
1248
+ };
1249
+ function le(e, t) {
1250
+ return b.NODE_ENV !== "production" ? I(new Error(yo[e](t)), {
1251
+ type: e,
1252
+ [ot]: !0
1253
+ }, t) : I(new Error(), {
1254
+ type: e,
1255
+ [ot]: !0
1256
+ }, t);
1257
+ }
1258
+ function q(e, t) {
1259
+ return e instanceof Error && ot in e && (t == null || !!(e.type & t));
1260
+ }
1261
+ const Eo = ["params", "query", "hash"];
1262
+ function wo(e) {
1263
+ if (typeof e == "string")
1264
+ return e;
1265
+ if (e.path != null)
1266
+ return e.path;
1267
+ const t = {};
1268
+ for (const n of Eo)
1269
+ n in e && (t[n] = e[n]);
1270
+ return JSON.stringify(t, null, 2);
1271
+ }
1272
+ const Nt = "[^/]+?", _o = {
1273
+ sensitive: !1,
1274
+ strict: !1,
1275
+ start: !0,
1276
+ end: !0
1277
+ }, Ro = /[.+*?^${}()[\]/\\]/g;
1278
+ function Oo(e, t) {
1279
+ const n = I({}, _o, t), r = [];
1280
+ let o = n.start ? "^" : "";
1281
+ const s = [];
1282
+ for (const h of e) {
1283
+ const u = h.length ? [] : [
1284
+ 90
1285
+ /* PathScore.Root */
1286
+ ];
1287
+ n.strict && !h.length && (o += "/");
1288
+ for (let a = 0; a < h.length; a++) {
1289
+ const f = h[a];
1290
+ let d = 40 + (n.sensitive ? 0.25 : 0);
1291
+ if (f.type === 0)
1292
+ a || (o += "/"), o += f.value.replace(Ro, "\\$&"), d += 40;
1293
+ else if (f.type === 1) {
1294
+ const { value: p, repeatable: v, optional: g, regexp: y } = f;
1295
+ s.push({
1296
+ name: p,
1297
+ repeatable: v,
1298
+ optional: g
1299
+ });
1300
+ const _ = y || Nt;
1301
+ if (_ !== Nt) {
1302
+ d += 10;
1303
+ try {
1304
+ new RegExp(`(${_})`);
1305
+ } catch (V) {
1306
+ throw new Error(`Invalid custom RegExp for param "${p}" (${_}): ` + V.message);
1307
+ }
1308
+ }
1309
+ let O = v ? `((?:${_})(?:/(?:${_}))*)` : `(${_})`;
1310
+ a || (O = // avoid an optional / if there are more segments e.g. /:p?-static
1311
+ // or /:p?-:p2
1312
+ g && h.length < 2 ? `(?:/${O})` : "/" + O), g && (O += "?"), o += O, d += 20, g && (d += -8), v && (d += -20), _ === ".*" && (d += -50);
1313
+ }
1314
+ u.push(d);
1315
+ }
1316
+ r.push(u);
1317
+ }
1318
+ if (n.strict && n.end) {
1319
+ const h = r.length - 1;
1320
+ r[h][r[h].length - 1] += 0.7000000000000001;
1321
+ }
1322
+ n.strict || (o += "/?"), n.end ? o += "$" : n.strict && !o.endsWith("/") && (o += "(?:/|$)");
1323
+ const i = new RegExp(o, n.sensitive ? "" : "i");
1324
+ function c(h) {
1325
+ const u = h.match(i), a = {};
1326
+ if (!u)
1327
+ return null;
1328
+ for (let f = 1; f < u.length; f++) {
1329
+ const d = u[f] || "", p = s[f - 1];
1330
+ a[p.name] = d && p.repeatable ? d.split("/") : d;
1331
+ }
1332
+ return a;
1333
+ }
1334
+ function l(h) {
1335
+ let u = "", a = !1;
1336
+ for (const f of e) {
1337
+ (!a || !u.endsWith("/")) && (u += "/"), a = !1;
1338
+ for (const d of f)
1339
+ if (d.type === 0)
1340
+ u += d.value;
1341
+ else if (d.type === 1) {
1342
+ const { value: p, repeatable: v, optional: g } = d, y = p in h ? h[p] : "";
1343
+ if (L(y) && !v)
1344
+ throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);
1345
+ const _ = L(y) ? y.join("/") : y;
1346
+ if (!_)
1347
+ if (g)
1348
+ f.length < 2 && (u.endsWith("/") ? u = u.slice(0, -1) : a = !0);
1349
+ else
1350
+ throw new Error(`Missing required param "${p}"`);
1351
+ u += _;
1352
+ }
1353
+ }
1354
+ return u || "/";
1355
+ }
1356
+ return {
1357
+ re: i,
1358
+ score: r,
1359
+ keys: s,
1360
+ parse: c,
1361
+ stringify: l
1362
+ };
1363
+ }
1364
+ function bo(e, t) {
1365
+ let n = 0;
1366
+ for (; n < e.length && n < t.length; ) {
1367
+ const r = t[n] - e[n];
1368
+ if (r)
1369
+ return r;
1370
+ n++;
1371
+ }
1372
+ return e.length < t.length ? e.length === 1 && e[0] === 80 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 80 ? 1 : -1 : 0;
1373
+ }
1374
+ function Rn(e, t) {
1375
+ let n = 0;
1376
+ const r = e.score, o = t.score;
1377
+ for (; n < r.length && n < o.length; ) {
1378
+ const s = bo(r[n], o[n]);
1379
+ if (s)
1380
+ return s;
1381
+ n++;
1382
+ }
1383
+ if (Math.abs(o.length - r.length) === 1) {
1384
+ if (It(r))
1385
+ return 1;
1386
+ if (It(o))
1387
+ return -1;
1388
+ }
1389
+ return o.length - r.length;
1390
+ }
1391
+ function It(e) {
1392
+ const t = e[e.length - 1];
1393
+ return e.length > 0 && t[t.length - 1] < 0;
1394
+ }
1395
+ const So = {
1396
+ type: 0,
1397
+ value: ""
1398
+ }, Po = /[a-zA-Z0-9_]/;
1399
+ function Vo(e) {
1400
+ if (!e)
1401
+ return [[]];
1402
+ if (e === "/")
1403
+ return [[So]];
1404
+ if (!e.startsWith("/"))
1405
+ throw new Error(b.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
1406
+ function t(d) {
1407
+ throw new Error(`ERR (${n})/"${h}": ${d}`);
1408
+ }
1409
+ let n = 0, r = n;
1410
+ const o = [];
1411
+ let s;
1412
+ function i() {
1413
+ s && o.push(s), s = [];
1414
+ }
1415
+ let c = 0, l, h = "", u = "";
1416
+ function a() {
1417
+ h && (n === 0 ? s.push({
1418
+ type: 0,
1419
+ value: h
1420
+ }) : n === 1 || n === 2 || n === 3 ? (s.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`), s.push({
1421
+ type: 1,
1422
+ value: h,
1423
+ regexp: u,
1424
+ repeatable: l === "*" || l === "+",
1425
+ optional: l === "*" || l === "?"
1426
+ })) : t("Invalid state to consume buffer"), h = "");
1427
+ }
1428
+ function f() {
1429
+ h += l;
1430
+ }
1431
+ for (; c < e.length; ) {
1432
+ if (l = e[c++], l === "\\" && n !== 2) {
1433
+ r = n, n = 4;
1434
+ continue;
1435
+ }
1436
+ switch (n) {
1437
+ case 0:
1438
+ l === "/" ? (h && a(), i()) : l === ":" ? (a(), n = 1) : f();
1439
+ break;
1440
+ case 4:
1441
+ f(), n = r;
1442
+ break;
1443
+ case 1:
1444
+ l === "(" ? n = 2 : Po.test(l) ? f() : (a(), n = 0, l !== "*" && l !== "?" && l !== "+" && c--);
1445
+ break;
1446
+ case 2:
1447
+ l === ")" ? u[u.length - 1] == "\\" ? u = u.slice(0, -1) + l : n = 3 : u += l;
1448
+ break;
1449
+ case 3:
1450
+ a(), n = 0, l !== "*" && l !== "?" && l !== "+" && c--, u = "";
1451
+ break;
1452
+ default:
1453
+ t("Unknown state");
1454
+ break;
1455
+ }
1456
+ }
1457
+ return n === 2 && t(`Unfinished custom RegExp for param "${h}"`), a(), i(), o;
1458
+ }
1459
+ function ko(e, t, n) {
1460
+ const r = Oo(Vo(e.path), n);
1461
+ if (b.NODE_ENV !== "production") {
1462
+ const s = /* @__PURE__ */ new Set();
1463
+ for (const i of r.keys)
1464
+ s.has(i.name) && S(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`), s.add(i.name);
1465
+ }
1466
+ const o = I(r, {
1467
+ record: e,
1468
+ parent: t,
1469
+ // these needs to be populated by the parent
1470
+ children: [],
1471
+ alias: []
1472
+ });
1473
+ return t && !o.record.aliasOf == !t.record.aliasOf && t.children.push(o), o;
1474
+ }
1475
+ function No(e, t) {
1476
+ const n = [], r = /* @__PURE__ */ new Map();
1477
+ t = Tt({ strict: !1, end: !0, sensitive: !1 }, t);
1478
+ function o(a) {
1479
+ return r.get(a);
1480
+ }
1481
+ function s(a, f, d) {
1482
+ const p = !d, v = At(a);
1483
+ b.NODE_ENV !== "production" && $o(v, f), v.aliasOf = d && d.record;
1484
+ const g = Tt(t, a), y = [v];
1485
+ if ("alias" in a) {
1486
+ const V = typeof a.alias == "string" ? [a.alias] : a.alias;
1487
+ for (const $ of V)
1488
+ y.push(
1489
+ // we need to normalize again to ensure the `mods` property
1490
+ // being non enumerable
1491
+ At(I({}, v, {
1492
+ // this allows us to hold a copy of the `components` option
1493
+ // so that async components cache is hold on the original record
1494
+ components: d ? d.record.components : v.components,
1495
+ path: $,
1496
+ // we might be the child of an alias
1497
+ aliasOf: d ? d.record : v
1498
+ // the aliases are always of the same kind as the original since they
1499
+ // are defined on the same record
1500
+ }))
1501
+ );
1502
+ }
1503
+ let _, O;
1504
+ for (const V of y) {
1505
+ const { path: $ } = V;
1506
+ if (f && $[0] !== "/") {
1507
+ const x = f.record.path, U = x[x.length - 1] === "/" ? "" : "/";
1508
+ V.path = f.record.path + ($ && U + $);
1509
+ }
1510
+ if (b.NODE_ENV !== "production" && V.path === "*")
1511
+ throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
1512
+ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
1513
+ if (_ = ko(V, f, g), b.NODE_ENV !== "production" && f && $[0] === "/" && jo(_, f), d ? (d.alias.push(_), b.NODE_ENV !== "production" && Ao(d, _)) : (O = O || _, O !== _ && O.alias.push(_), p && a.name && !$t(_) && (b.NODE_ENV !== "production" && To(a, f), i(a.name))), On(_) && l(_), v.children) {
1514
+ const x = v.children;
1515
+ for (let U = 0; U < x.length; U++)
1516
+ s(x[U], _, d && d.children[U]);
1517
+ }
1518
+ d = d || _;
1519
+ }
1520
+ return O ? () => {
1521
+ i(O);
1522
+ } : ve;
1523
+ }
1524
+ function i(a) {
1525
+ if (_n(a)) {
1526
+ const f = r.get(a);
1527
+ f && (r.delete(a), n.splice(n.indexOf(f), 1), f.children.forEach(i), f.alias.forEach(i));
1528
+ } else {
1529
+ const f = n.indexOf(a);
1530
+ f > -1 && (n.splice(f, 1), a.record.name && r.delete(a.record.name), a.children.forEach(i), a.alias.forEach(i));
1531
+ }
1532
+ }
1533
+ function c() {
1534
+ return n;
1535
+ }
1536
+ function l(a) {
1537
+ const f = xo(a, n);
1538
+ n.splice(f, 0, a), a.record.name && !$t(a) && r.set(a.record.name, a);
1539
+ }
1540
+ function h(a, f) {
1541
+ let d, p = {}, v, g;
1542
+ if ("name" in a && a.name) {
1543
+ if (d = r.get(a.name), !d)
1544
+ throw le(1, {
1545
+ location: a
1546
+ });
1547
+ if (b.NODE_ENV !== "production") {
1548
+ const O = Object.keys(a.params || {}).filter((V) => !d.keys.find(($) => $.name === V));
1549
+ O.length && S(`Discarded invalid param(s) "${O.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
1550
+ }
1551
+ g = d.record.name, p = I(
1552
+ // paramsFromLocation is a new object
1553
+ Ct(
1554
+ f.params,
1555
+ // only keep params that exist in the resolved location
1556
+ // only keep optional params coming from a parent record
1557
+ d.keys.filter((O) => !O.optional).concat(d.parent ? d.parent.keys.filter((O) => O.optional) : []).map((O) => O.name)
1558
+ ),
1559
+ // discard any existing params in the current location that do not exist here
1560
+ // #1497 this ensures better active/exact matching
1561
+ a.params && Ct(a.params, d.keys.map((O) => O.name))
1562
+ ), v = d.stringify(p);
1563
+ } else if (a.path != null)
1564
+ v = a.path, b.NODE_ENV !== "production" && !v.startsWith("/") && S(`The Matcher cannot resolve relative paths but received "${v}". Unless you directly called \`matcher.resolve("${v}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), d = n.find((O) => O.re.test(v)), d && (p = d.parse(v), g = d.record.name);
1565
+ else {
1566
+ if (d = f.name ? r.get(f.name) : n.find((O) => O.re.test(f.path)), !d)
1567
+ throw le(1, {
1568
+ location: a,
1569
+ currentLocation: f
1570
+ });
1571
+ g = d.record.name, p = I({}, f.params, a.params), v = d.stringify(p);
1572
+ }
1573
+ const y = [];
1574
+ let _ = d;
1575
+ for (; _; )
1576
+ y.unshift(_.record), _ = _.parent;
1577
+ return {
1578
+ name: g,
1579
+ path: v,
1580
+ params: p,
1581
+ matched: y,
1582
+ meta: Co(y)
1583
+ };
1584
+ }
1585
+ e.forEach((a) => s(a));
1586
+ function u() {
1587
+ n.length = 0, r.clear();
1588
+ }
1589
+ return {
1590
+ addRoute: s,
1591
+ resolve: h,
1592
+ removeRoute: i,
1593
+ clearRoutes: u,
1594
+ getRoutes: c,
1595
+ getRecordMatcher: o
1596
+ };
1597
+ }
1598
+ function Ct(e, t) {
1599
+ const n = {};
1600
+ for (const r of t)
1601
+ r in e && (n[r] = e[r]);
1602
+ return n;
1603
+ }
1604
+ function At(e) {
1605
+ const t = {
1606
+ path: e.path,
1607
+ redirect: e.redirect,
1608
+ name: e.name,
1609
+ meta: e.meta || {},
1610
+ aliasOf: e.aliasOf,
1611
+ beforeEnter: e.beforeEnter,
1612
+ props: Io(e),
1613
+ children: e.children || [],
1614
+ instances: {},
1615
+ leaveGuards: /* @__PURE__ */ new Set(),
1616
+ updateGuards: /* @__PURE__ */ new Set(),
1617
+ enterCallbacks: {},
1618
+ // must be declared afterwards
1619
+ // mods: {},
1620
+ components: "components" in e ? e.components || null : e.component && { default: e.component }
1621
+ };
1622
+ return Object.defineProperty(t, "mods", {
1623
+ value: {}
1624
+ }), t;
1625
+ }
1626
+ function Io(e) {
1627
+ const t = {}, n = e.props || !1;
1628
+ if ("component" in e)
1629
+ t.default = n;
1630
+ else
1631
+ for (const r in e.components)
1632
+ t[r] = typeof n == "object" ? n[r] : n;
1633
+ return t;
1634
+ }
1635
+ function $t(e) {
1636
+ for (; e; ) {
1637
+ if (e.record.aliasOf)
1638
+ return !0;
1639
+ e = e.parent;
1640
+ }
1641
+ return !1;
1642
+ }
1643
+ function Co(e) {
1644
+ return e.reduce((t, n) => I(t, n.meta), {});
1645
+ }
1646
+ function Tt(e, t) {
1647
+ const n = {};
1648
+ for (const r in e)
1649
+ n[r] = r in t ? t[r] : e[r];
1650
+ return n;
1651
+ }
1652
+ function st(e, t) {
1653
+ return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
1654
+ }
1655
+ function Ao(e, t) {
1656
+ for (const n of e.keys)
1657
+ if (!n.optional && !t.keys.find(st.bind(null, n)))
1658
+ return S(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
1659
+ for (const n of t.keys)
1660
+ if (!n.optional && !e.keys.find(st.bind(null, n)))
1661
+ return S(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
1662
+ }
1663
+ function $o(e, t) {
1664
+ t && t.record.name && !e.name && !e.path && S(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);
1665
+ }
1666
+ function To(e, t) {
1667
+ for (let n = t; n; n = n.parent)
1668
+ if (n.record.name === e.name)
1669
+ throw new Error(`A route named "${String(e.name)}" has been added as a ${t === n ? "child" : "descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);
1670
+ }
1671
+ function jo(e, t) {
1672
+ for (const n of t.keys)
1673
+ if (!e.keys.find(st.bind(null, n)))
1674
+ return S(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`);
1675
+ }
1676
+ function xo(e, t) {
1677
+ let n = 0, r = t.length;
1678
+ for (; n !== r; ) {
1679
+ const s = n + r >> 1;
1680
+ Rn(e, t[s]) < 0 ? r = s : n = s + 1;
1681
+ }
1682
+ const o = Do(e);
1683
+ return o && (r = t.lastIndexOf(o, r - 1), b.NODE_ENV !== "production" && r < 0 && S(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)), r;
1684
+ }
1685
+ function Do(e) {
1686
+ let t = e;
1687
+ for (; t = t.parent; )
1688
+ if (On(t) && Rn(e, t) === 0)
1689
+ return t;
1690
+ }
1691
+ function On({ record: e }) {
1692
+ return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
1693
+ }
1694
+ function Mo(e) {
1695
+ const t = {};
1696
+ if (e === "" || e === "?")
1697
+ return t;
1698
+ const r = (e[0] === "?" ? e.slice(1) : e).split("&");
1699
+ for (let o = 0; o < r.length; ++o) {
1700
+ const s = r[o].replace(hn, " "), i = s.indexOf("="), c = ce(i < 0 ? s : s.slice(0, i)), l = i < 0 ? null : ce(s.slice(i + 1));
1701
+ if (c in t) {
1702
+ let h = t[c];
1703
+ L(h) || (h = t[c] = [h]), h.push(l);
1704
+ } else
1705
+ t[c] = l;
1706
+ }
1707
+ return t;
1708
+ }
1709
+ function jt(e) {
1710
+ let t = "";
1711
+ for (let n in e) {
1712
+ const r = e[n];
1713
+ if (n = Zr(n), r == null) {
1714
+ r !== void 0 && (t += (t.length ? "&" : "") + n);
1715
+ continue;
1716
+ }
1717
+ (L(r) ? r.map((s) => s && nt(s)) : [r && nt(r)]).forEach((s) => {
1718
+ s !== void 0 && (t += (t.length ? "&" : "") + n, s != null && (t += "=" + s));
1719
+ });
1720
+ }
1721
+ return t;
1722
+ }
1723
+ function Fo(e) {
1724
+ const t = {};
1725
+ for (const n in e) {
1726
+ const r = e[n];
1727
+ r !== void 0 && (t[n] = L(r) ? r.map((o) => o == null ? null : "" + o) : r == null ? r : "" + r);
1728
+ }
1729
+ return t;
1730
+ }
1731
+ const Bo = Symbol(b.NODE_ENV !== "production" ? "router view location matched" : ""), xt = Symbol(b.NODE_ENV !== "production" ? "router view depth" : ""), xe = Symbol(b.NODE_ENV !== "production" ? "router" : ""), dt = Symbol(b.NODE_ENV !== "production" ? "route location" : ""), it = Symbol(b.NODE_ENV !== "production" ? "router view location" : "");
1732
+ function pe() {
1733
+ let e = [];
1734
+ function t(r) {
1735
+ return e.push(r), () => {
1736
+ const o = e.indexOf(r);
1737
+ o > -1 && e.splice(o, 1);
1738
+ };
1739
+ }
1740
+ function n() {
1741
+ e = [];
1742
+ }
1743
+ return {
1744
+ add: t,
1745
+ list: () => e.slice(),
1746
+ reset: n
1747
+ };
1748
+ }
1749
+ function ee(e, t, n, r, o, s = (i) => i()) {
1750
+ const i = r && // name is defined if record is because of the function overload
1751
+ (r.enterCallbacks[o] = r.enterCallbacks[o] || []);
1752
+ return () => new Promise((c, l) => {
1753
+ const h = (f) => {
1754
+ f === !1 ? l(le(4, {
1755
+ from: n,
1756
+ to: t
1757
+ })) : f instanceof Error ? l(f) : Ne(f) ? l(le(2, {
1758
+ from: t,
1759
+ to: f
1760
+ })) : (i && // since enterCallbackArray is truthy, both record and name also are
1761
+ r.enterCallbacks[o] === i && typeof f == "function" && i.push(f), c());
1762
+ }, u = s(() => e.call(r && r.instances[o], t, n, b.NODE_ENV !== "production" ? Wo(h, t, n) : h));
1763
+ let a = Promise.resolve(u);
1764
+ if (e.length < 3 && (a = a.then(h)), b.NODE_ENV !== "production" && e.length > 2) {
1765
+ const f = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
1766
+ ${e.toString()}
1767
+ . If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
1768
+ if (typeof u == "object" && "then" in u)
1769
+ a = a.then((d) => h._called ? d : (S(f), Promise.reject(new Error("Invalid navigation guard"))));
1770
+ else if (u !== void 0 && !h._called) {
1771
+ S(f), l(new Error("Invalid navigation guard"));
1772
+ return;
1773
+ }
1774
+ }
1775
+ a.catch((f) => l(f));
1776
+ });
1777
+ }
1778
+ function Wo(e, t, n) {
1779
+ let r = 0;
1780
+ return function() {
1781
+ r++ === 1 && S(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`), e._called = !0, r === 1 && e.apply(null, arguments);
1782
+ };
1783
+ }
1784
+ function He(e, t, n, r, o = (s) => s()) {
1785
+ const s = [];
1786
+ for (const i of e) {
1787
+ b.NODE_ENV !== "production" && !i.components && !i.children.length && S(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);
1788
+ for (const c in i.components) {
1789
+ let l = i.components[c];
1790
+ if (b.NODE_ENV !== "production") {
1791
+ if (!l || typeof l != "object" && typeof l != "function")
1792
+ throw S(`Component "${c}" in record with path "${i.path}" is not a valid component. Received "${String(l)}".`), new Error("Invalid route component");
1793
+ if ("then" in l) {
1794
+ S(`Component "${c}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);
1795
+ const h = l;
1796
+ l = () => h;
1797
+ } else l.__asyncLoader && // warn only once per component
1798
+ !l.__warnedDefineAsync && (l.__warnedDefineAsync = !0, S(`Component "${c}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
1799
+ }
1800
+ if (!(t !== "beforeRouteEnter" && !i.instances[c]))
1801
+ if (ln(l)) {
1802
+ const u = (l.__vccOpts || l)[t];
1803
+ u && s.push(ee(u, n, r, i, c, o));
1804
+ } else {
1805
+ let h = l();
1806
+ b.NODE_ENV !== "production" && !("catch" in h) && (S(`Component "${c}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`), h = Promise.resolve(h)), s.push(() => h.then((u) => {
1807
+ if (!u)
1808
+ throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);
1809
+ const a = Lr(u) ? u.default : u;
1810
+ i.mods[c] = u, i.components[c] = a;
1811
+ const d = (a.__vccOpts || a)[t];
1812
+ return d && ee(d, n, r, i, c, o)();
1813
+ }));
1814
+ }
1815
+ }
1816
+ }
1817
+ return s;
1818
+ }
1819
+ function Dt(e) {
1820
+ const t = te(xe), n = te(dt);
1821
+ let r = !1, o = null;
1822
+ const s = W(() => {
1823
+ const u = B(e.to);
1824
+ return b.NODE_ENV !== "production" && (!r || u !== o) && (Ne(u) || (r ? S(`Invalid value for prop "to" in useLink()
1825
+ - to:`, u, `
1826
+ - previous to:`, o, `
1827
+ - props:`, e) : S(`Invalid value for prop "to" in useLink()
1828
+ - to:`, u, `
1829
+ - props:`, e)), o = u, r = !0), t.resolve(u);
1830
+ }), i = W(() => {
1831
+ const { matched: u } = s.value, { length: a } = u, f = u[a - 1], d = n.matched;
1832
+ if (!f || !d.length)
1833
+ return -1;
1834
+ const p = d.findIndex(ne.bind(null, f));
1835
+ if (p > -1)
1836
+ return p;
1837
+ const v = Mt(u[a - 2]);
1838
+ return (
1839
+ // we are dealing with nested routes
1840
+ a > 1 && // if the parent and matched route have the same path, this link is
1841
+ // referring to the empty child. Or we currently are on a different
1842
+ // child of the same parent
1843
+ Mt(f) === v && // avoid comparing the child with its parent
1844
+ d[d.length - 1].path !== v ? d.findIndex(ne.bind(null, u[a - 2])) : p
1845
+ );
1846
+ }), c = W(() => i.value > -1 && Ho(n.params, s.value.params)), l = W(() => i.value > -1 && i.value === n.matched.length - 1 && gn(n.params, s.value.params));
1847
+ function h(u = {}) {
1848
+ if (Ko(u)) {
1849
+ const a = t[B(e.replace) ? "replace" : "push"](
1850
+ B(e.to)
1851
+ // avoid uncaught errors are they are logged anyway
1852
+ ).catch(ve);
1853
+ return e.viewTransition && typeof document < "u" && "startViewTransition" in document && document.startViewTransition(() => a), a;
1854
+ }
1855
+ return Promise.resolve();
1856
+ }
1857
+ if (b.NODE_ENV !== "production" && z) {
1858
+ const u = Kt();
1859
+ if (u) {
1860
+ const a = {
1861
+ route: s.value,
1862
+ isActive: c.value,
1863
+ isExactActive: l.value,
1864
+ error: null
1865
+ };
1866
+ u.__vrl_devtools = u.__vrl_devtools || [], u.__vrl_devtools.push(a), Gt(() => {
1867
+ a.route = s.value, a.isActive = c.value, a.isExactActive = l.value, a.error = Ne(B(e.to)) ? null : 'Invalid "to" value';
1868
+ }, { flush: "post" });
1869
+ }
1870
+ }
1871
+ return {
1872
+ route: s,
1873
+ href: W(() => s.value.href),
1874
+ isActive: c,
1875
+ isExactActive: l,
1876
+ navigate: h
1877
+ };
1878
+ }
1879
+ function Lo(e) {
1880
+ return e.length === 1 ? e[0] : e;
1881
+ }
1882
+ const Uo = /* @__PURE__ */ F({
1883
+ name: "RouterLink",
1884
+ compatConfig: { MODE: 3 },
1885
+ props: {
1886
+ to: {
1887
+ type: [String, Object],
1888
+ required: !0
1889
+ },
1890
+ replace: Boolean,
1891
+ activeClass: String,
1892
+ // inactiveClass: String,
1893
+ exactActiveClass: String,
1894
+ custom: Boolean,
1895
+ ariaCurrentValue: {
1896
+ type: String,
1897
+ default: "page"
1898
+ }
1899
+ },
1900
+ useLink: Dt,
1901
+ setup(e, { slots: t }) {
1902
+ const n = Un(Dt(e)), { options: r } = te(xe), o = W(() => ({
1903
+ [Ft(e.activeClass, r.linkActiveClass, "router-link-active")]: n.isActive,
1904
+ // [getLinkClass(
1905
+ // props.inactiveClass,
1906
+ // options.linkInactiveClass,
1907
+ // 'router-link-inactive'
1908
+ // )]: !link.isExactActive,
1909
+ [Ft(e.exactActiveClass, r.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
1910
+ }));
1911
+ return () => {
1912
+ const s = t.default && Lo(t.default(n));
1913
+ return e.custom ? s : A("a", {
1914
+ "aria-current": n.isExactActive ? e.ariaCurrentValue : null,
1915
+ href: n.href,
1916
+ // this would override user added attrs but Vue will still add
1917
+ // the listener, so we end up triggering both
1918
+ onClick: n.navigate,
1919
+ class: o.value
1920
+ }, s);
1921
+ };
1922
+ }
1923
+ }), Go = Uo;
1924
+ function Ko(e) {
1925
+ if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
1926
+ if (e.currentTarget && e.currentTarget.getAttribute) {
1927
+ const t = e.currentTarget.getAttribute("target");
1928
+ if (/\b_blank\b/i.test(t))
1929
+ return;
1930
+ }
1931
+ return e.preventDefault && e.preventDefault(), !0;
1932
+ }
1933
+ }
1934
+ function Ho(e, t) {
1935
+ for (const n in t) {
1936
+ const r = t[n], o = e[n];
1937
+ if (typeof r == "string") {
1938
+ if (r !== o)
1939
+ return !1;
1940
+ } else if (!L(o) || o.length !== r.length || r.some((s, i) => s !== o[i]))
1941
+ return !1;
1942
+ }
1943
+ return !0;
1944
+ }
1945
+ function Mt(e) {
1946
+ return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
1947
+ }
1948
+ const Ft = (e, t, n) => e ?? t ?? n, qo = /* @__PURE__ */ F({
1949
+ name: "RouterView",
1950
+ // #674 we manually inherit them
1951
+ inheritAttrs: !1,
1952
+ props: {
1953
+ name: {
1954
+ type: String,
1955
+ default: "default"
1956
+ },
1957
+ route: Object
1958
+ },
1959
+ // Better compat for @vue/compat users
1960
+ // https://github.com/vuejs/router/issues/1315
1961
+ compatConfig: { MODE: 3 },
1962
+ setup(e, { attrs: t, slots: n }) {
1963
+ b.NODE_ENV !== "production" && Jo();
1964
+ const r = te(it), o = W(() => e.route || r.value), s = te(xt, 0), i = W(() => {
1965
+ let h = B(s);
1966
+ const { matched: u } = o.value;
1967
+ let a;
1968
+ for (; (a = u[h]) && !a.components; )
1969
+ h++;
1970
+ return h;
1971
+ }), c = W(() => o.value.matched[i.value]);
1972
+ Pe(xt, W(() => i.value + 1)), Pe(Bo, c), Pe(it, o);
1973
+ const l = J();
1974
+ return K(() => [l.value, c.value, e.name], ([h, u, a], [f, d, p]) => {
1975
+ u && (u.instances[a] = h, d && d !== u && h && h === f && (u.leaveGuards.size || (u.leaveGuards = d.leaveGuards), u.updateGuards.size || (u.updateGuards = d.updateGuards))), h && u && // if there is no instance but to and from are the same this might be
1976
+ // the first visit
1977
+ (!d || !ne(u, d) || !f) && (u.enterCallbacks[a] || []).forEach((v) => v(h));
1978
+ }, { flush: "post" }), () => {
1979
+ const h = o.value, u = e.name, a = c.value, f = a && a.components[u];
1980
+ if (!f)
1981
+ return Bt(n.default, { Component: f, route: h });
1982
+ const d = a.props[u], p = d ? d === !0 ? h.params : typeof d == "function" ? d(h) : d : null, g = A(f, I({}, p, t, {
1983
+ onVnodeUnmounted: (y) => {
1984
+ y.component.isUnmounted && (a.instances[u] = null);
1985
+ },
1986
+ ref: l
1987
+ }));
1988
+ if (b.NODE_ENV !== "production" && z && g.ref) {
1989
+ const y = {
1990
+ depth: i.value,
1991
+ name: a.name,
1992
+ path: a.path,
1993
+ meta: a.meta
1994
+ };
1995
+ (L(g.ref) ? g.ref.map((O) => O.i) : [g.ref.i]).forEach((O) => {
1996
+ O.__vrv_devtools = y;
1997
+ });
1998
+ }
1999
+ return (
2000
+ // pass the vnode to the slot as a prop.
2001
+ // h and <component :is="..."> both accept vnodes
2002
+ Bt(n.default, { Component: g, route: h }) || g
2003
+ );
2004
+ };
2005
+ }
2006
+ });
2007
+ function Bt(e, t) {
2008
+ if (!e)
2009
+ return null;
2010
+ const n = e(t);
2011
+ return n.length === 1 ? n[0] : n;
2012
+ }
2013
+ const zo = qo;
2014
+ function Jo() {
2015
+ const e = Kt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
2016
+ if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
2017
+ const r = t === "KeepAlive" ? "keep-alive" : "transition";
2018
+ S(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
2019
+ Use slot props instead:
2020
+
2021
+ <router-view v-slot="{ Component }">
2022
+ <${r}>
2023
+ <component :is="Component" />
2024
+ </${r}>
2025
+ </router-view>`);
2026
+ }
2027
+ }
2028
+ function me(e, t) {
2029
+ const n = I({}, e, {
2030
+ // remove variables that can contain vue instances
2031
+ matched: e.matched.map((r) => is(r, ["instances", "children", "aliasOf"]))
2032
+ });
2033
+ return {
2034
+ _custom: {
2035
+ type: null,
2036
+ readOnly: !0,
2037
+ display: e.fullPath,
2038
+ tooltip: t,
2039
+ value: n
2040
+ }
2041
+ };
2042
+ }
2043
+ function Se(e) {
2044
+ return {
2045
+ _custom: {
2046
+ display: e
2047
+ }
2048
+ };
2049
+ }
2050
+ let Qo = 0;
2051
+ function Yo(e, t, n) {
2052
+ if (t.__hasDevtools)
2053
+ return;
2054
+ t.__hasDevtools = !0;
2055
+ const r = Qo++;
2056
+ Wr({
2057
+ id: "org.vuejs.router" + (r ? "." + r : ""),
2058
+ label: "Vue Router",
2059
+ packageName: "vue-router",
2060
+ homepage: "https://router.vuejs.org",
2061
+ logo: "https://router.vuejs.org/logo.png",
2062
+ componentStateTypes: ["Routing"],
2063
+ app: e
2064
+ }, (o) => {
2065
+ typeof o.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.on.inspectComponent((u, a) => {
2066
+ u.instanceData && u.instanceData.state.push({
2067
+ type: "Routing",
2068
+ key: "$route",
2069
+ editable: !1,
2070
+ value: me(t.currentRoute.value, "Current Route")
2071
+ });
2072
+ }), o.on.visitComponentTree(({ treeNode: u, componentInstance: a }) => {
2073
+ if (a.__vrv_devtools) {
2074
+ const f = a.__vrv_devtools;
2075
+ u.tags.push({
2076
+ label: (f.name ? `${f.name.toString()}: ` : "") + f.path,
2077
+ textColor: 0,
2078
+ tooltip: "This component is rendered by &lt;router-view&gt;",
2079
+ backgroundColor: bn
2080
+ });
2081
+ }
2082
+ L(a.__vrl_devtools) && (a.__devtoolsApi = o, a.__vrl_devtools.forEach((f) => {
2083
+ let d = f.route.path, p = Vn, v = "", g = 0;
2084
+ f.error ? (d = f.error, p = ns, g = rs) : f.isExactActive ? (p = Pn, v = "This is exactly active") : f.isActive && (p = Sn, v = "This link is active"), u.tags.push({
2085
+ label: d,
2086
+ textColor: g,
2087
+ tooltip: v,
2088
+ backgroundColor: p
2089
+ });
2090
+ }));
2091
+ }), K(t.currentRoute, () => {
2092
+ l(), o.notifyComponentUpdate(), o.sendInspectorTree(c), o.sendInspectorState(c);
2093
+ });
2094
+ const s = "router:navigations:" + r;
2095
+ o.addTimelineLayer({
2096
+ id: s,
2097
+ label: `Router${r ? " " + r : ""} Navigations`,
2098
+ color: 4237508
2099
+ }), t.onError((u, a) => {
2100
+ o.addTimelineEvent({
2101
+ layerId: s,
2102
+ event: {
2103
+ title: "Error during Navigation",
2104
+ subtitle: a.fullPath,
2105
+ logType: "error",
2106
+ time: o.now(),
2107
+ data: { error: u },
2108
+ groupId: a.meta.__navigationId
2109
+ }
2110
+ });
2111
+ });
2112
+ let i = 0;
2113
+ t.beforeEach((u, a) => {
2114
+ const f = {
2115
+ guard: Se("beforeEach"),
2116
+ from: me(a, "Current Location during this navigation"),
2117
+ to: me(u, "Target location")
2118
+ };
2119
+ Object.defineProperty(u.meta, "__navigationId", {
2120
+ value: i++
2121
+ }), o.addTimelineEvent({
2122
+ layerId: s,
2123
+ event: {
2124
+ time: o.now(),
2125
+ title: "Start of navigation",
2126
+ subtitle: u.fullPath,
2127
+ data: f,
2128
+ groupId: u.meta.__navigationId
2129
+ }
2130
+ });
2131
+ }), t.afterEach((u, a, f) => {
2132
+ const d = {
2133
+ guard: Se("afterEach")
2134
+ };
2135
+ f ? (d.failure = {
2136
+ _custom: {
2137
+ type: Error,
2138
+ readOnly: !0,
2139
+ display: f ? f.message : "",
2140
+ tooltip: "Navigation Failure",
2141
+ value: f
2142
+ }
2143
+ }, d.status = Se("❌")) : d.status = Se("✅"), d.from = me(a, "Current Location during this navigation"), d.to = me(u, "Target location"), o.addTimelineEvent({
2144
+ layerId: s,
2145
+ event: {
2146
+ title: "End of navigation",
2147
+ subtitle: u.fullPath,
2148
+ time: o.now(),
2149
+ data: d,
2150
+ logType: f ? "warning" : "default",
2151
+ groupId: u.meta.__navigationId
2152
+ }
2153
+ });
2154
+ });
2155
+ const c = "router-inspector:" + r;
2156
+ o.addInspector({
2157
+ id: c,
2158
+ label: "Routes" + (r ? " " + r : ""),
2159
+ icon: "book",
2160
+ treeFilterPlaceholder: "Search routes"
2161
+ });
2162
+ function l() {
2163
+ if (!h)
2164
+ return;
2165
+ const u = h;
2166
+ let a = n.getRoutes().filter((f) => !f.parent || // these routes have a parent with no component which will not appear in the view
2167
+ // therefore we still need to include them
2168
+ !f.parent.record.components);
2169
+ a.forEach(In), u.filter && (a = a.filter((f) => (
2170
+ // save matches state based on the payload
2171
+ at(f, u.filter.toLowerCase())
2172
+ ))), a.forEach((f) => Nn(f, t.currentRoute.value)), u.rootNodes = a.map(kn);
2173
+ }
2174
+ let h;
2175
+ o.on.getInspectorTree((u) => {
2176
+ h = u, u.app === e && u.inspectorId === c && l();
2177
+ }), o.on.getInspectorState((u) => {
2178
+ if (u.app === e && u.inspectorId === c) {
2179
+ const f = n.getRoutes().find((d) => d.record.__vd_id === u.nodeId);
2180
+ f && (u.state = {
2181
+ options: Zo(f)
2182
+ });
2183
+ }
2184
+ }), o.sendInspectorTree(c), o.sendInspectorState(c);
2185
+ });
2186
+ }
2187
+ function Xo(e) {
2188
+ return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : "";
2189
+ }
2190
+ function Zo(e) {
2191
+ const { record: t } = e, n = [
2192
+ { editable: !1, key: "path", value: t.path }
2193
+ ];
2194
+ return t.name != null && n.push({
2195
+ editable: !1,
2196
+ key: "name",
2197
+ value: t.name
2198
+ }), n.push({ editable: !1, key: "regexp", value: e.re }), e.keys.length && n.push({
2199
+ editable: !1,
2200
+ key: "keys",
2201
+ value: {
2202
+ _custom: {
2203
+ type: null,
2204
+ readOnly: !0,
2205
+ display: e.keys.map((r) => `${r.name}${Xo(r)}`).join(" "),
2206
+ tooltip: "Param keys",
2207
+ value: e.keys
2208
+ }
2209
+ }
2210
+ }), t.redirect != null && n.push({
2211
+ editable: !1,
2212
+ key: "redirect",
2213
+ value: t.redirect
2214
+ }), e.alias.length && n.push({
2215
+ editable: !1,
2216
+ key: "aliases",
2217
+ value: e.alias.map((r) => r.record.path)
2218
+ }), Object.keys(e.record.meta).length && n.push({
2219
+ editable: !1,
2220
+ key: "meta",
2221
+ value: e.record.meta
2222
+ }), n.push({
2223
+ key: "score",
2224
+ editable: !1,
2225
+ value: {
2226
+ _custom: {
2227
+ type: null,
2228
+ readOnly: !0,
2229
+ display: e.score.map((r) => r.join(", ")).join(" | "),
2230
+ tooltip: "Score used to sort routes",
2231
+ value: e.score
2232
+ }
2233
+ }
2234
+ }), n;
2235
+ }
2236
+ const bn = 15485081, Sn = 2450411, Pn = 8702998, es = 2282478, Vn = 16486972, ts = 6710886, ns = 16704226, rs = 12131356;
2237
+ function kn(e) {
2238
+ const t = [], { record: n } = e;
2239
+ n.name != null && t.push({
2240
+ label: String(n.name),
2241
+ textColor: 0,
2242
+ backgroundColor: es
2243
+ }), n.aliasOf && t.push({
2244
+ label: "alias",
2245
+ textColor: 0,
2246
+ backgroundColor: Vn
2247
+ }), e.__vd_match && t.push({
2248
+ label: "matches",
2249
+ textColor: 0,
2250
+ backgroundColor: bn
2251
+ }), e.__vd_exactActive && t.push({
2252
+ label: "exact",
2253
+ textColor: 0,
2254
+ backgroundColor: Pn
2255
+ }), e.__vd_active && t.push({
2256
+ label: "active",
2257
+ textColor: 0,
2258
+ backgroundColor: Sn
2259
+ }), n.redirect && t.push({
2260
+ label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects",
2261
+ textColor: 16777215,
2262
+ backgroundColor: ts
2263
+ });
2264
+ let r = n.__vd_id;
2265
+ return r == null && (r = String(os++), n.__vd_id = r), {
2266
+ id: r,
2267
+ label: n.path,
2268
+ tags: t,
2269
+ children: e.children.map(kn)
2270
+ };
2271
+ }
2272
+ let os = 0;
2273
+ const ss = /^\/(.*)\/([a-z]*)$/;
2274
+ function Nn(e, t) {
2275
+ const n = t.matched.length && ne(t.matched[t.matched.length - 1], e.record);
2276
+ e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => ne(r, e.record))), e.children.forEach((r) => Nn(r, t));
2277
+ }
2278
+ function In(e) {
2279
+ e.__vd_match = !1, e.children.forEach(In);
2280
+ }
2281
+ function at(e, t) {
2282
+ const n = String(e.re).match(ss);
2283
+ if (e.__vd_match = !1, !n || n.length < 3)
2284
+ return !1;
2285
+ if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t))
2286
+ return e.children.forEach((i) => at(i, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
2287
+ const o = e.record.path.toLowerCase(), s = ce(o);
2288
+ return !t.startsWith("/") && (s.includes(t) || o.includes(t)) || s.startsWith(t) || o.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((i) => at(i, t));
2289
+ }
2290
+ function is(e, t) {
2291
+ const n = {};
2292
+ for (const r in e)
2293
+ t.includes(r) || (n[r] = e[r]);
2294
+ return n;
2295
+ }
2296
+ function as(e) {
2297
+ const t = No(e.routes, e), n = e.parseQuery || Mo, r = e.stringifyQuery || jt, o = e.history;
2298
+ if (b.NODE_ENV !== "production" && !o)
2299
+ throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
2300
+ const s = pe(), i = pe(), c = pe(), l = Q(Z);
2301
+ let h = Z;
2302
+ z && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
2303
+ const u = Ue.bind(null, (m) => "" + m), a = Ue.bind(null, to), f = (
2304
+ // @ts-expect-error: intentionally avoid the type check
2305
+ Ue.bind(null, ce)
2306
+ );
2307
+ function d(m, w) {
2308
+ let E, R;
2309
+ return _n(m) ? (E = t.getRecordMatcher(m), b.NODE_ENV !== "production" && !E && S(`Parent route "${String(m)}" not found when adding child route`, w), R = w) : R = m, t.addRoute(R, E);
2310
+ }
2311
+ function p(m) {
2312
+ const w = t.getRecordMatcher(m);
2313
+ w ? t.removeRoute(w) : b.NODE_ENV !== "production" && S(`Cannot remove non-existent route "${String(m)}"`);
2314
+ }
2315
+ function v() {
2316
+ return t.getRoutes().map((m) => m.record);
2317
+ }
2318
+ function g(m) {
2319
+ return !!t.getRecordMatcher(m);
2320
+ }
2321
+ function y(m, w) {
2322
+ if (w = I({}, w || l.value), typeof m == "string") {
2323
+ const P = Ge(n, m, w.path), T = t.resolve({ path: P.path }, w), re = o.createHref(P.fullPath);
2324
+ return b.NODE_ENV !== "production" && (re.startsWith("//") ? S(`Location "${m}" resolved to "${re}". A resolved location cannot start with multiple slashes.`) : T.matched.length || S(`No match found for location with path "${m}"`)), I(P, T, {
2325
+ params: f(T.params),
2326
+ hash: ce(P.hash),
2327
+ redirectedFrom: void 0,
2328
+ href: re
2329
+ });
2330
+ }
2331
+ if (b.NODE_ENV !== "production" && !Ne(m))
2332
+ return S(`router.resolve() was passed an invalid location. This will fail in production.
2333
+ - Location:`, m), y({});
2334
+ let E;
2335
+ if (m.path != null)
2336
+ b.NODE_ENV !== "production" && "params" in m && !("name" in m) && // @ts-expect-error: the type is never
2337
+ Object.keys(m.params).length && S(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), E = I({}, m, {
2338
+ path: Ge(n, m.path, w.path).path
2339
+ });
2340
+ else {
2341
+ const P = I({}, m.params);
2342
+ for (const T in P)
2343
+ P[T] == null && delete P[T];
2344
+ E = I({}, m, {
2345
+ params: a(P)
2346
+ }), w.params = a(w.params);
2347
+ }
2348
+ const R = t.resolve(E, w), C = m.hash || "";
2349
+ b.NODE_ENV !== "production" && C && !C.startsWith("#") && S(`A \`hash\` should always start with the character "#". Replace "${C}" with "#${C}".`), R.params = u(f(R.params));
2350
+ const j = oo(r, I({}, m, {
2351
+ hash: Xr(C),
2352
+ path: R.path
2353
+ })), k = o.createHref(j);
2354
+ return b.NODE_ENV !== "production" && (k.startsWith("//") ? S(`Location "${m}" resolved to "${k}". A resolved location cannot start with multiple slashes.`) : R.matched.length || S(`No match found for location with path "${m.path != null ? m.path : m}"`)), I({
2355
+ fullPath: j,
2356
+ // keep the hash encoded so fullPath is effectively path + encodedQuery +
2357
+ // hash
2358
+ hash: C,
2359
+ query: (
2360
+ // if the user is using a custom query lib like qs, we might have
2361
+ // nested objects, so we keep the query as is, meaning it can contain
2362
+ // numbers at `$route.query`, but at the point, the user will have to
2363
+ // use their own type anyway.
2364
+ // https://github.com/vuejs/router/issues/328#issuecomment-649481567
2365
+ r === jt ? Fo(m.query) : m.query || {}
2366
+ )
2367
+ }, R, {
2368
+ redirectedFrom: void 0,
2369
+ href: k
2370
+ });
2371
+ }
2372
+ function _(m) {
2373
+ return typeof m == "string" ? Ge(n, m, l.value.path) : I({}, m);
2374
+ }
2375
+ function O(m, w) {
2376
+ if (h !== m)
2377
+ return le(8, {
2378
+ from: w,
2379
+ to: m
2380
+ });
2381
+ }
2382
+ function V(m) {
2383
+ return U(m);
2384
+ }
2385
+ function $(m) {
2386
+ return V(I(_(m), { replace: !0 }));
2387
+ }
2388
+ function x(m) {
2389
+ const w = m.matched[m.matched.length - 1];
2390
+ if (w && w.redirect) {
2391
+ const { redirect: E } = w;
2392
+ let R = typeof E == "function" ? E(m) : E;
2393
+ if (typeof R == "string" && (R = R.includes("?") || R.includes("#") ? R = _(R) : (
2394
+ // force empty params
2395
+ { path: R }
2396
+ ), R.params = {}), b.NODE_ENV !== "production" && R.path == null && !("name" in R))
2397
+ throw S(`Invalid redirect found:
2398
+ ${JSON.stringify(R, null, 2)}
2399
+ when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
2400
+ return I({
2401
+ query: m.query,
2402
+ hash: m.hash,
2403
+ // avoid transferring params if the redirect has a path
2404
+ params: R.path != null ? {} : m.params
2405
+ }, R);
2406
+ }
2407
+ }
2408
+ function U(m, w) {
2409
+ const E = h = y(m), R = l.value, C = m.state, j = m.force, k = m.replace === !0, P = x(E);
2410
+ if (P)
2411
+ return U(
2412
+ I(_(P), {
2413
+ state: typeof P == "object" ? I({}, C, P.state) : C,
2414
+ force: j,
2415
+ replace: k
2416
+ }),
2417
+ // keep original redirectedFrom if it exists
2418
+ w || E
2419
+ );
2420
+ const T = E;
2421
+ T.redirectedFrom = w;
2422
+ let re;
2423
+ return !j && bt(r, R, E) && (re = le(16, { to: T, from: R }), yt(
2424
+ R,
2425
+ R,
2426
+ // this is a push, the only way for it to be triggered from a
2427
+ // history.listen is with a redirect, which makes it become a push
2428
+ !0,
2429
+ // This cannot be the first navigation because the initial location
2430
+ // cannot be manually navigated to
2431
+ !1
2432
+ )), (re ? Promise.resolve(re) : pt(T, R)).catch((D) => q(D) ? (
2433
+ // navigation redirects still mark the router as ready
2434
+ q(
2435
+ D,
2436
+ 2
2437
+ /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
2438
+ ) ? D : Be(D)
2439
+ ) : (
2440
+ // reject any unknown error
2441
+ Fe(D, T, R)
2442
+ )).then((D) => {
2443
+ if (D) {
2444
+ if (q(
2445
+ D,
2446
+ 2
2447
+ /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
2448
+ ))
2449
+ return b.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
2450
+ bt(r, y(D.to), T) && // and we have done it a couple of times
2451
+ w && // @ts-expect-error: added only in dev
2452
+ (w._count = w._count ? (
2453
+ // @ts-expect-error
2454
+ w._count + 1
2455
+ ) : 1) > 30 ? (S(`Detected a possibly infinite redirection in a navigation guard when going from "${R.fullPath}" to "${T.fullPath}". Aborting to avoid a Stack Overflow.
2456
+ Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) : U(
2457
+ // keep options
2458
+ I({
2459
+ // preserve an existing replacement but allow the redirect to override it
2460
+ replace: k
2461
+ }, _(D.to), {
2462
+ state: typeof D.to == "object" ? I({}, C, D.to.state) : C,
2463
+ force: j
2464
+ }),
2465
+ // preserve the original redirectedFrom if any
2466
+ w || T
2467
+ );
2468
+ } else
2469
+ D = gt(T, R, !0, k, C);
2470
+ return mt(T, R, D), D;
2471
+ });
2472
+ }
2473
+ function jn(m, w) {
2474
+ const E = O(m, w);
2475
+ return E ? Promise.reject(E) : Promise.resolve();
2476
+ }
2477
+ function De(m) {
2478
+ const w = Oe.values().next().value;
2479
+ return w && typeof w.runWithContext == "function" ? w.runWithContext(m) : m();
2480
+ }
2481
+ function pt(m, w) {
2482
+ let E;
2483
+ const [R, C, j] = cs(m, w);
2484
+ E = He(R.reverse(), "beforeRouteLeave", m, w);
2485
+ for (const P of R)
2486
+ P.leaveGuards.forEach((T) => {
2487
+ E.push(ee(T, m, w));
2488
+ });
2489
+ const k = jn.bind(null, m, w);
2490
+ return E.push(k), ie(E).then(() => {
2491
+ E = [];
2492
+ for (const P of s.list())
2493
+ E.push(ee(P, m, w));
2494
+ return E.push(k), ie(E);
2495
+ }).then(() => {
2496
+ E = He(C, "beforeRouteUpdate", m, w);
2497
+ for (const P of C)
2498
+ P.updateGuards.forEach((T) => {
2499
+ E.push(ee(T, m, w));
2500
+ });
2501
+ return E.push(k), ie(E);
2502
+ }).then(() => {
2503
+ E = [];
2504
+ for (const P of j)
2505
+ if (P.beforeEnter)
2506
+ if (L(P.beforeEnter))
2507
+ for (const T of P.beforeEnter)
2508
+ E.push(ee(T, m, w));
2509
+ else
2510
+ E.push(ee(P.beforeEnter, m, w));
2511
+ return E.push(k), ie(E);
2512
+ }).then(() => (m.matched.forEach((P) => P.enterCallbacks = {}), E = He(j, "beforeRouteEnter", m, w, De), E.push(k), ie(E))).then(() => {
2513
+ E = [];
2514
+ for (const P of i.list())
2515
+ E.push(ee(P, m, w));
2516
+ return E.push(k), ie(E);
2517
+ }).catch((P) => q(
2518
+ P,
2519
+ 8
2520
+ /* ErrorTypes.NAVIGATION_CANCELLED */
2521
+ ) ? P : Promise.reject(P));
2522
+ }
2523
+ function mt(m, w, E) {
2524
+ c.list().forEach((R) => De(() => R(m, w, E)));
2525
+ }
2526
+ function gt(m, w, E, R, C) {
2527
+ const j = O(m, w);
2528
+ if (j)
2529
+ return j;
2530
+ const k = w === Z, P = z ? history.state : {};
2531
+ E && (R || k ? o.replace(m.fullPath, I({
2532
+ scroll: k && P && P.scroll
2533
+ }, C)) : o.push(m.fullPath, C)), l.value = m, yt(m, w, E, k), Be();
2534
+ }
2535
+ let fe;
2536
+ function xn() {
2537
+ fe || (fe = o.listen((m, w, E) => {
2538
+ if (!Et.listening)
2539
+ return;
2540
+ const R = y(m), C = x(R);
2541
+ if (C) {
2542
+ U(I(C, { replace: !0, force: !0 }), R).catch(ve);
2543
+ return;
2544
+ }
2545
+ h = R;
2546
+ const j = l.value;
2547
+ z && lo(Pt(j.fullPath, E.delta), je()), pt(R, j).catch((k) => q(
2548
+ k,
2549
+ 12
2550
+ /* ErrorTypes.NAVIGATION_CANCELLED */
2551
+ ) ? k : q(
2552
+ k,
2553
+ 2
2554
+ /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
2555
+ ) ? (U(
2556
+ I(_(k.to), {
2557
+ force: !0
2558
+ }),
2559
+ R
2560
+ // avoid an uncaught rejection, let push call triggerError
2561
+ ).then((P) => {
2562
+ q(
2563
+ P,
2564
+ 20
2565
+ /* ErrorTypes.NAVIGATION_DUPLICATED */
2566
+ ) && !E.delta && E.type === ue.pop && o.go(-1, !1);
2567
+ }).catch(ve), Promise.reject()) : (E.delta && o.go(-E.delta, !1), Fe(k, R, j))).then((k) => {
2568
+ k = k || gt(
2569
+ // after navigation, all matched components are resolved
2570
+ R,
2571
+ j,
2572
+ !1
2573
+ ), k && (E.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
2574
+ // entry while a different route is displayed
2575
+ !q(
2576
+ k,
2577
+ 8
2578
+ /* ErrorTypes.NAVIGATION_CANCELLED */
2579
+ ) ? o.go(-E.delta, !1) : E.type === ue.pop && q(
2580
+ k,
2581
+ 20
2582
+ /* ErrorTypes.NAVIGATION_DUPLICATED */
2583
+ ) && o.go(-1, !1)), mt(R, j, k);
2584
+ }).catch(ve);
2585
+ }));
2586
+ }
2587
+ let Me = pe(), vt = pe(), Re;
2588
+ function Fe(m, w, E) {
2589
+ Be(m);
2590
+ const R = vt.list();
2591
+ return R.length ? R.forEach((C) => C(m, w, E)) : (b.NODE_ENV !== "production" && S("uncaught error during route navigation:"), console.error(m)), Promise.reject(m);
2592
+ }
2593
+ function Dn() {
2594
+ return Re && l.value !== Z ? Promise.resolve() : new Promise((m, w) => {
2595
+ Me.add([m, w]);
2596
+ });
2597
+ }
2598
+ function Be(m) {
2599
+ return Re || (Re = !m, xn(), Me.list().forEach(([w, E]) => m ? E(m) : w()), Me.reset()), m;
2600
+ }
2601
+ function yt(m, w, E, R) {
2602
+ const { scrollBehavior: C } = e;
2603
+ if (!z || !C)
2604
+ return Promise.resolve();
2605
+ const j = !E && fo(Pt(m.fullPath, 0)) || (R || !E) && history.state && history.state.scroll || null;
2606
+ return Ve().then(() => C(m, w, j)).then((k) => k && uo(k)).catch((k) => Fe(k, m, w));
2607
+ }
2608
+ const We = (m) => o.go(m);
2609
+ let Le;
2610
+ const Oe = /* @__PURE__ */ new Set(), Et = {
2611
+ currentRoute: l,
2612
+ listening: !0,
2613
+ addRoute: d,
2614
+ removeRoute: p,
2615
+ clearRoutes: t.clearRoutes,
2616
+ hasRoute: g,
2617
+ getRoutes: v,
2618
+ resolve: y,
2619
+ options: e,
2620
+ push: V,
2621
+ replace: $,
2622
+ go: We,
2623
+ back: () => We(-1),
2624
+ forward: () => We(1),
2625
+ beforeEach: s.add,
2626
+ beforeResolve: i.add,
2627
+ afterEach: c.add,
2628
+ onError: vt.add,
2629
+ isReady: Dn,
2630
+ install(m) {
2631
+ const w = this;
2632
+ m.component("RouterLink", Go), m.component("RouterView", zo), m.config.globalProperties.$router = w, Object.defineProperty(m.config.globalProperties, "$route", {
2633
+ enumerable: !0,
2634
+ get: () => B(l)
2635
+ }), z && // used for the initial navigation client side to avoid pushing
2636
+ // multiple times when the router is used in multiple apps
2637
+ !Le && l.value === Z && (Le = !0, V(o.location).catch((C) => {
2638
+ b.NODE_ENV !== "production" && S("Unexpected error when starting the router:", C);
2639
+ }));
2640
+ const E = {};
2641
+ for (const C in Z)
2642
+ Object.defineProperty(E, C, {
2643
+ get: () => l.value[C],
2644
+ enumerable: !0
2645
+ });
2646
+ m.provide(xe, w), m.provide(dt, Ln(E)), m.provide(it, l);
2647
+ const R = m.unmount;
2648
+ Oe.add(m), m.unmount = function() {
2649
+ Oe.delete(m), Oe.size < 1 && (h = Z, fe && fe(), fe = null, l.value = Z, Le = !1, Re = !1), R();
2650
+ }, b.NODE_ENV !== "production" && z && Yo(m, w, t);
2651
+ }
2652
+ };
2653
+ function ie(m) {
2654
+ return m.reduce((w, E) => w.then(() => De(E)), Promise.resolve());
2655
+ }
2656
+ return Et;
2657
+ }
2658
+ function cs(e, t) {
2659
+ const n = [], r = [], o = [], s = Math.max(t.matched.length, e.matched.length);
2660
+ for (let i = 0; i < s; i++) {
2661
+ const c = t.matched[i];
2662
+ c && (e.matched.find((h) => ne(h, c)) ? r.push(c) : n.push(c));
2663
+ const l = e.matched[i];
2664
+ l && (t.matched.find((h) => ne(h, l)) || o.push(l));
2665
+ }
2666
+ return [n, r, o];
2667
+ }
2668
+ function us() {
2669
+ return te(xe);
2670
+ }
2671
+ function ls(e) {
2672
+ return te(dt);
2673
+ }
2674
+ function Y(e) {
2675
+ let t = Yt(), n = Rr(), r = kr(e), o = en(), s = us(), i = ls();
2676
+ function c(p) {
2677
+ p.scopeSnapshot && (t = p.scopeSnapshot), p.slotSnapshot && (n = p.slotSnapshot), p.vforSnapshot && (r = p.vforSnapshot), p.elementRefSnapshot && (o = p.elementRefSnapshot), p.routerSnapshot && (s = p.routerSnapshot);
2678
+ }
2679
+ function l(p) {
2680
+ if (N.isVar(p))
2681
+ return H(h(p));
2682
+ if (N.isVForItem(p))
2683
+ return Ir(p.fid) ? r.getVForIndex(p.fid) : H(h(p));
2684
+ if (N.isVForIndex(p))
2685
+ return r.getVForIndex(p.fid);
2686
+ if (N.isJs(p)) {
2687
+ const { code: v, bind: g } = p, y = Te(g, (_) => u(_));
2688
+ return $r(v, y)();
2689
+ }
2690
+ if (N.isSlotProp(p))
2691
+ return n.getPropsValue(p);
2692
+ if (N.isRouterParams(p))
2693
+ return H(h(p));
2694
+ throw new Error(`Invalid binding: ${p}`);
2695
+ }
2696
+ function h(p) {
2697
+ if (N.isVar(p)) {
2698
+ const v = t.getVueRef(p) || pr(p);
2699
+ return _t(v, {
2700
+ paths: p.path,
2701
+ getBindableValueFn: l
2702
+ });
2703
+ }
2704
+ if (N.isVForItem(p))
2705
+ return Nr({
2706
+ binding: p,
2707
+ vforSnapshot: r
2708
+ });
2709
+ if (N.isVForIndex(p))
2710
+ return () => l(p);
2711
+ if (N.isRouterParams(p)) {
2712
+ const { prop: v = "params" } = p;
2713
+ return _t(() => i[v], {
2714
+ paths: p.path,
2715
+ getBindableValueFn: l
2716
+ });
2717
+ }
2718
+ throw new Error(`Invalid binding: ${p}`);
2719
+ }
2720
+ function u(p) {
2721
+ if (N.isVar(p) || N.isVForItem(p))
2722
+ return h(p);
2723
+ if (N.isVForIndex(p))
2724
+ return l(p);
2725
+ if (N.isJs(p))
2726
+ return null;
2727
+ if (N.isRouterParams(p))
2728
+ return h(p);
2729
+ throw new Error(`Invalid binding: ${p}`);
2730
+ }
2731
+ function a(p) {
2732
+ if (N.isVar(p))
2733
+ return {
2734
+ sid: p.sid,
2735
+ id: p.id
2736
+ };
2737
+ if (N.isVForItem(p))
2738
+ return {
2739
+ type: "vf",
2740
+ fid: p.fid
2741
+ };
2742
+ if (N.isVForIndex(p))
2743
+ return {
2744
+ type: "vf-i",
2745
+ fid: p.fid,
2746
+ value: null
2747
+ };
2748
+ if (N.isJs(p))
2749
+ return null;
2750
+ }
2751
+ function f(p) {
2752
+ var v, g;
2753
+ (v = p.vars) == null || v.forEach((y) => {
2754
+ h({ type: "ref", ...y }).value = y.val;
2755
+ }), (g = p.ele_refs) == null || g.forEach((y) => {
2756
+ o.getRef({
2757
+ sid: y.sid,
2758
+ id: y.id
2759
+ }).value[y.method](...y.args);
2760
+ });
2761
+ }
2762
+ function d(p, v) {
2763
+ if (Rt(v) || Rt(p.values))
2764
+ return;
2765
+ v = v;
2766
+ const g = p.values, y = p.skips || new Array(v.length).fill(0);
2767
+ v.forEach((_, O) => {
2768
+ if (y[O] === 1)
2769
+ return;
2770
+ if (N.isVar(_)) {
2771
+ const $ = h(_);
2772
+ $.value = g[O];
2773
+ return;
2774
+ }
2775
+ if (N.isRouterAction(_)) {
2776
+ const $ = g[O], x = s[$.fn];
2777
+ x(...$.args);
2778
+ return;
2779
+ }
2780
+ if (N.isElementRef(_)) {
2781
+ const $ = o.getRef(_).value, x = g[O];
2782
+ $[x.method](...x.args);
2783
+ return;
2784
+ }
2785
+ if (N.isJsOutput(_)) {
2786
+ const $ = g[O], x = G($);
2787
+ typeof x == "function" && x();
2788
+ return;
2789
+ }
2790
+ const V = h(_);
2791
+ V.value = g[O];
2792
+ });
2793
+ }
2794
+ return {
2795
+ getObjectToValue: l,
2796
+ getVueRefObject: h,
2797
+ getVueRefObjectOrValue: u,
2798
+ getBindingServerInfo: a,
2799
+ updateRefFromServer: f,
2800
+ updateEventRefFromServer: d,
2801
+ replaceSnapshot: c
2802
+ };
2803
+ }
2804
+ function fs(e, t, n) {
2805
+ return new hs(e, t, n);
2806
+ }
2807
+ class hs {
2808
+ constructor(t, n, r) {
2809
+ M(this, "taskQueue", []);
2810
+ M(this, "id2TaskMap", /* @__PURE__ */ new Map());
2811
+ M(this, "input2TaskIdMap", ye(() => []));
2812
+ this.snapshots = r;
2813
+ const o = [], s = (i) => {
2814
+ var l;
2815
+ const c = new ds(i, r);
2816
+ return this.id2TaskMap.set(c.id, c), (l = i.inputs) == null || l.forEach((h) => {
2817
+ const u = `${h.sid}-${h.id}`;
2818
+ this.input2TaskIdMap.getOrDefault(u).push(c.id);
2819
+ }), c;
2820
+ };
2821
+ t == null || t.forEach((i) => {
2822
+ const c = s(i);
2823
+ o.push(c);
2824
+ }), n == null || n.forEach((i) => {
2825
+ const c = {
2826
+ type: "ref",
2827
+ sid: i.sid,
2828
+ id: i.id
2829
+ }, l = {
2830
+ ...i,
2831
+ immediate: !0,
2832
+ outputs: [c, ...i.outputs || []]
2833
+ }, h = s(l);
2834
+ o.push(h);
2835
+ }), o.forEach((i) => {
2836
+ const {
2837
+ deep: c = !0,
2838
+ once: l,
2839
+ flush: h,
2840
+ immediate: u = !0
2841
+ } = i.watchConfig, a = {
2842
+ immediate: u,
2843
+ deep: c,
2844
+ once: l,
2845
+ flush: h
2846
+ }, f = this._getWatchTargets(i);
2847
+ K(
2848
+ f,
2849
+ ([d]) => {
2850
+ i.modify = !0, this.taskQueue.push(new ps(i)), this._scheduleNextTick();
2851
+ },
2852
+ a
2853
+ );
2854
+ });
2855
+ }
2856
+ _getWatchTargets(t) {
2857
+ if (!t.watchConfig.inputs)
2858
+ return [];
2859
+ const n = t.slientInputs;
2860
+ return t.watchConfig.inputs.filter(
2861
+ (o, s) => (N.isVar(o) || N.isVForItem(o) || N.isRouterParams(o)) && !n[s]
2862
+ ).map((o) => this.snapshots.getVueRefObjectOrValue(o));
2863
+ }
2864
+ _scheduleNextTick() {
2865
+ Ve(() => this._runAllTasks());
2866
+ }
2867
+ _runAllTasks() {
2868
+ const t = this.taskQueue.slice();
2869
+ this.taskQueue.length = 0, this._setTaskNodeRelations(t), t.forEach((n) => {
2870
+ n.run();
2871
+ });
2872
+ }
2873
+ _setTaskNodeRelations(t) {
2874
+ t.forEach((n) => {
2875
+ const r = this._findNextNodes(n, t);
2876
+ n.appendNextNodes(...r), r.forEach((o) => {
2877
+ o.appendPrevNodes(n);
2878
+ });
2879
+ });
2880
+ }
2881
+ _findNextNodes(t, n) {
2882
+ const r = t.watchTask.watchConfig.outputs;
2883
+ if (r && r.length <= 0)
2884
+ return [];
2885
+ const o = this._getCalculatorTasksByOutput(
2886
+ t.watchTask.watchConfig.outputs
2887
+ );
2888
+ return n.filter(
2889
+ (s) => o.has(s.watchTask.id) && s.watchTask.id !== t.watchTask.id
2890
+ );
2891
+ }
2892
+ _getCalculatorTasksByOutput(t) {
2893
+ const n = /* @__PURE__ */ new Set();
2894
+ return t == null || t.forEach((r) => {
2895
+ const o = `${r.sid}-${r.id}`;
2896
+ (this.input2TaskIdMap.get(o) || []).forEach((i) => n.add(i));
2897
+ }), n;
2898
+ }
2899
+ }
2900
+ class ds {
2901
+ constructor(t, n) {
2902
+ M(this, "modify", !0);
2903
+ M(this, "_running", !1);
2904
+ M(this, "id");
2905
+ M(this, "_runningPromise", null);
2906
+ M(this, "_runningPromiseResolve", null);
2907
+ M(this, "_inputInfos");
2908
+ this.watchConfig = t, this.snapshot = n, this.id = Symbol(t.debug), this._inputInfos = this.createInputInfos();
2909
+ }
2910
+ createInputInfos() {
2911
+ const { inputs: t = [] } = this.watchConfig, n = this.watchConfig.data || new Array(t.length).fill(0), r = this.watchConfig.slient || new Array(t.length).fill(0);
2912
+ return {
2913
+ const_data: n,
2914
+ slients: r
2915
+ };
2916
+ }
2917
+ get slientInputs() {
2918
+ return this._inputInfos.slients;
2919
+ }
2920
+ getServerInputs() {
2921
+ const { const_data: t } = this._inputInfos;
2922
+ return this.watchConfig.inputs ? this.watchConfig.inputs.map((n, r) => t[r] === 0 ? this.snapshot.getObjectToValue(n) : n) : [];
2923
+ }
2924
+ get running() {
2925
+ return this._running;
2926
+ }
2927
+ get runningPromise() {
2928
+ return this._runningPromise;
2929
+ }
2930
+ /**
2931
+ * setRunning
2932
+ */
2933
+ setRunning() {
2934
+ this._running = !0, this._runningPromise = new Promise((t) => {
2935
+ this._runningPromiseResolve = t;
2936
+ }), this._trySetRunningRef(!0);
2937
+ }
2938
+ /**
2939
+ * taskDone
2940
+ */
2941
+ taskDone() {
2942
+ this._running = !1, this._runningPromiseResolve && (this._runningPromiseResolve(), this._runningPromiseResolve = null), this._trySetRunningRef(!1);
2943
+ }
2944
+ _trySetRunningRef(t) {
2945
+ if (this.watchConfig.running) {
2946
+ const n = this.snapshot.getVueRefObject(
2947
+ this.watchConfig.running
2948
+ );
2949
+ n.value = t;
2950
+ }
2951
+ }
2952
+ }
2953
+ class ps {
2954
+ /**
2955
+ *
2956
+ */
2957
+ constructor(t) {
2958
+ M(this, "prevNodes", []);
2959
+ M(this, "nextNodes", []);
2960
+ M(this, "_runningPrev", !1);
2961
+ this.watchTask = t;
2962
+ }
2963
+ /**
2964
+ * appendPrevNodes
2965
+ */
2966
+ appendPrevNodes(...t) {
2967
+ this.prevNodes.push(...t);
2968
+ }
2969
+ /**
2970
+ *
2971
+ */
2972
+ appendNextNodes(...t) {
2973
+ this.nextNodes.push(...t);
2974
+ }
2975
+ /**
2976
+ * hasNextNodes
2977
+ */
2978
+ hasNextNodes() {
2979
+ return this.nextNodes.length > 0;
2980
+ }
2981
+ /**
2982
+ * run
2983
+ */
2984
+ async run() {
2985
+ if (this.prevNodes.length > 0 && !this._runningPrev)
2986
+ try {
2987
+ this._runningPrev = !0, await Promise.all(this.prevNodes.map((t) => t.run()));
2988
+ } finally {
2989
+ this._runningPrev = !1;
2990
+ }
2991
+ if (this.watchTask.running) {
2992
+ await this.watchTask.runningPromise;
2993
+ return;
2994
+ }
2995
+ if (this.watchTask.modify) {
2996
+ this.watchTask.modify = !1, this.watchTask.setRunning();
2997
+ try {
2998
+ await ms(this.watchTask);
2999
+ } finally {
3000
+ this.watchTask.taskDone();
3001
+ }
3002
+ }
3003
+ }
3004
+ }
3005
+ async function ms(e) {
3006
+ const { outputs: t, url: n, key: r } = e.watchConfig, o = e.snapshot, s = e.getServerInputs(), i = {
3007
+ key: r,
3008
+ input: s,
3009
+ page: lt()
3010
+ }, c = await fetch(n, {
3011
+ method: "POST",
3012
+ headers: {
3013
+ "Content-Type": "application/json"
3014
+ },
3015
+ body: JSON.stringify(i)
3016
+ });
3017
+ if (!t)
3018
+ return;
3019
+ const l = await c.json();
3020
+ o.updateEventRefFromServer(l, t);
3021
+ }
3022
+ class gs {
3023
+ constructor(t) {
3024
+ M(this, "varMap", /* @__PURE__ */ new Map());
3025
+ }
3026
+ /**
3027
+ * collectVar
3028
+ */
3029
+ collectVar(t) {
3030
+ this.varMap.set(`${t.sid}-${t.id}`, t);
3031
+ }
3032
+ /**
3033
+ * get
3034
+ */
3035
+ getRef(t) {
3036
+ return this.varMap.get(`${t.sid}-${t.id}`);
3037
+ }
3038
+ /**
3039
+ * get
3040
+ */
3041
+ getWebComputed(t) {
3042
+ return this.varMap.get(`${t.sid}-${t.id}`);
3043
+ }
3044
+ getJsComputed(t) {
3045
+ return this.varMap.get(`${t.sid}-${t.id}`);
3046
+ }
3047
+ }
3048
+ let Cn;
3049
+ function vs(e) {
3050
+ Cn = new gs(e);
3051
+ }
3052
+ function ys() {
3053
+ return Cn;
3054
+ }
3055
+ function Es(e, t) {
3056
+ const { on: n, code: r, immediate: o, deep: s, once: i, flush: c, bind: l = {} } = e, h = Te(
3057
+ l,
3058
+ (f) => t.getVueRefObject(f)
3059
+ ), u = G(r, h), a = Array.isArray(n) ? n.map((f) => t.getVueRefObject(f)) : t.getVueRefObject(n);
3060
+ return K(a, u, { immediate: o, deep: s, once: i, flush: c });
3061
+ }
3062
+ function ws(e, t) {
3063
+ const {
3064
+ inputs: n = [],
3065
+ outputs: r = [],
3066
+ slient: o,
3067
+ data: s,
3068
+ code: i,
3069
+ immediate: c = !0,
3070
+ deep: l,
3071
+ once: h,
3072
+ flush: u
3073
+ } = e, a = o || new Array(n.length).fill(0), f = s || new Array(n.length).fill(0), d = G(i), p = n.filter((y, _) => a[_] === 0 && f[_] === 0).map((y) => t.getVueRefObject(y)), v = r.length > 1;
3074
+ function g() {
3075
+ return n.map((y, _) => f[_] === 0 ? Gn(H(t.getVueRefObject(y))) : y);
3076
+ }
3077
+ K(
3078
+ p,
3079
+ () => {
3080
+ let y = d(...g());
3081
+ r.length !== 0 && (v || (y = [y]), r.forEach((_, O) => {
3082
+ const V = y[O];
3083
+ t.getVueRefObject(_).value = V;
3084
+ }));
3085
+ },
3086
+ { immediate: c, deep: l, once: h, flush: u }
3087
+ );
3088
+ }
3089
+ function _s(e, t) {
3090
+ return Object.assign(
3091
+ {},
3092
+ ...Object.entries(e ?? {}).map(([n, r]) => {
3093
+ const o = r.map((c) => {
3094
+ if (Qe.isWebEventHandler(c)) {
3095
+ const l = Rs(c.bind, t);
3096
+ return Os(c, l, t);
3097
+ } else
3098
+ return bs(c, t);
3099
+ }), i = G(
3100
+ " (...args)=> Promise.all(promises(...args))",
3101
+ {
3102
+ promises: (...c) => o.map(async (l) => {
3103
+ await l(...c);
3104
+ })
3105
+ }
3106
+ );
3107
+ return { [n]: i };
3108
+ })
3109
+ );
3110
+ }
3111
+ function Rs(e, t) {
3112
+ return (...n) => (e ?? []).map((r) => {
3113
+ if (N.isEventContext(r)) {
3114
+ if (r.path.startsWith(":")) {
3115
+ const o = r.path.slice(1);
3116
+ return G(o)(...n);
3117
+ }
3118
+ return we(n[0], r.path.split("."));
3119
+ }
3120
+ return N.IsBinding(r) ? t.getObjectToValue(r) : r;
3121
+ });
3122
+ }
3123
+ function Os(e, t, n) {
3124
+ const { url: r, hKey: o, key: s } = e, i = s !== void 0 ? { key: s } : {};
3125
+ async function c(...l) {
3126
+ let h = {};
3127
+ const u = t(...l), a = await fetch(r, {
3128
+ method: "POST",
3129
+ headers: {
3130
+ "Content-Type": "application/json"
3131
+ },
3132
+ body: JSON.stringify({
3133
+ bind: u,
3134
+ hKey: o,
3135
+ ...i,
3136
+ page: lt(),
3137
+ ...h
3138
+ })
3139
+ });
3140
+ if (!a.ok)
3141
+ throw new Error(`HTTP error! status: ${a.status}`);
3142
+ const f = await a.json();
3143
+ n.updateEventRefFromServer(f, e.set);
3144
+ }
3145
+ return c;
3146
+ }
3147
+ function bs(e, t) {
3148
+ const { code: n, inputs: r = [], set: o } = e, s = G(n);
3149
+ function i(...c) {
3150
+ const l = (r ?? []).map((u) => {
3151
+ if (N.isEventContext(u)) {
3152
+ if (u.path.startsWith(":")) {
3153
+ const a = u.path.slice(1);
3154
+ return G(a)(...c);
3155
+ }
3156
+ return we(c[0], u.path.split("."));
3157
+ }
3158
+ return N.IsBinding(u) ? t.getObjectToValue(u) : u;
3159
+ }), h = s(...l);
3160
+ if (o !== void 0) {
3161
+ const a = o.length === 1 ? [h] : h, f = a.map((d) => d === void 0 ? 1 : 0);
3162
+ t.updateEventRefFromServer({ values: a, skips: f }, o);
3163
+ }
3164
+ }
3165
+ return i;
3166
+ }
3167
+ function Ss(e, t) {
3168
+ const n = [];
3169
+ (e.bStyle || []).forEach((s) => {
3170
+ Array.isArray(s) ? n.push(
3171
+ ...s.map((i) => t.getObjectToValue(i))
3172
+ ) : n.push(
3173
+ Te(
3174
+ s,
3175
+ (i) => t.getObjectToValue(i)
3176
+ )
3177
+ );
3178
+ });
3179
+ const r = Kn([e.style || {}, n]);
3180
+ return {
3181
+ hasStyle: r && Object.keys(r).length > 0,
3182
+ styles: r
3183
+ };
3184
+ }
3185
+ function Ps(e, t) {
3186
+ const n = e.classes;
3187
+ if (!n)
3188
+ return null;
3189
+ if (typeof n == "string")
3190
+ return qe(n);
3191
+ const { str: r, map: o, bind: s } = n, i = [];
3192
+ return r && i.push(r), o && i.push(
3193
+ Te(
3194
+ o,
3195
+ (c) => t.getObjectToValue(c)
3196
+ )
3197
+ ), s && i.push(...s.map((c) => t.getObjectToValue(c))), qe(i);
3198
+ }
3199
+ function Vs(e, t) {
3200
+ var r;
3201
+ const n = {};
3202
+ return wt(e.bProps || {}, (o, s) => {
3203
+ n[s] = ks(t.getObjectToValue(o), s);
3204
+ }), (r = e.proxyProps) == null || r.forEach((o) => {
3205
+ const s = t.getObjectToValue(o);
3206
+ typeof s == "object" && wt(s, (i, c) => {
3207
+ n[c] = i;
3208
+ });
3209
+ }), { ...e.props || {}, ...n };
3210
+ }
3211
+ function ks(e, t) {
3212
+ return t === "innerText" ? Ht(e) : e;
3213
+ }
3214
+ function Ns(e, { slots: t }) {
3215
+ const { id: n, use: r } = e.propsInfo, o = Er(n);
3216
+ return Ce(() => {
3217
+ _r(n);
3218
+ }), () => {
3219
+ const s = e.propsValue;
3220
+ return wr(
3221
+ n,
3222
+ o,
3223
+ Object.fromEntries(
3224
+ r.map((i) => [i, s[i]])
3225
+ )
3226
+ ), A(Ae, null, t.default());
3227
+ };
3228
+ }
3229
+ const Is = F(Ns, {
3230
+ props: ["propsInfo", "propsValue"]
3231
+ });
3232
+ function Cs(e, t) {
3233
+ if (!e.slots)
3234
+ return null;
3235
+ const n = e.slots ?? {};
3236
+ return Array.isArray(n) ? t ? ge(n) : () => ge(n) : tn(n, { keyFn: (i) => i === ":" ? "default" : i, valueFn: (i) => {
3237
+ const { items: c } = i;
3238
+ return (l) => {
3239
+ if (i.scope) {
3240
+ const h = () => i.props ? Wt(i.props, l, c) : ge(c);
3241
+ return A(_e, { scope: i.scope }, h);
3242
+ }
3243
+ return i.props ? Wt(i.props, l, c) : ge(c);
3244
+ };
3245
+ } });
3246
+ }
3247
+ function Wt(e, t, n) {
3248
+ return A(
3249
+ Is,
3250
+ { propsInfo: e, propsValue: t },
3251
+ () => ge(n)
3252
+ );
3253
+ }
3254
+ function ge(e) {
3255
+ const t = (e ?? []).map((n) => A(X, {
3256
+ component: n
3257
+ }));
3258
+ return t.length <= 0 ? null : t;
3259
+ }
3260
+ function As(e, t) {
3261
+ const n = {}, r = [];
3262
+ return (e || []).forEach((o) => {
3263
+ const { sys: s, name: i, arg: c, value: l, mf: h } = o;
3264
+ if (i === "vmodel") {
3265
+ const u = t.getVueRefObject(l);
3266
+ if (n[`onUpdate:${c}`] = (a) => {
3267
+ u.value = a;
3268
+ }, s === 1) {
3269
+ const a = h ? Object.fromEntries(h.map((f) => [f, !0])) : {};
3270
+ r.push([Hn, u.value, void 0, a]);
3271
+ } else
3272
+ n[c] = u.value;
3273
+ } else if (i === "vshow") {
3274
+ const u = t.getVueRefObject(l);
3275
+ r.push([qn, u.value]);
3276
+ } else
3277
+ console.warn(`Directive ${i} is not supported yet`);
3278
+ }), {
3279
+ newProps: n,
3280
+ directiveArray: r
3281
+ };
3282
+ }
3283
+ function $s(e, t) {
3284
+ const { eRef: n } = e;
3285
+ return n === void 0 ? {} : { ref: t.getRef(n) };
3286
+ }
3287
+ function Ts(e) {
3288
+ const t = Y(), n = en();
3289
+ return () => {
3290
+ const { tag: r } = e.component, o = N.IsBinding(r) ? t.getObjectToValue(r) : r, s = ut(o), i = typeof s == "string", c = Ps(e.component, t), { styles: l, hasStyle: h } = Ss(e.component, t), u = _s(e.component.events ?? {}, t), a = Cs(e.component, i), f = Vs(e.component, t), { newProps: d, directiveArray: p } = As(
3291
+ e.component.dir,
3292
+ t
3293
+ ), v = $s(
3294
+ e.component,
3295
+ n
3296
+ ), g = zn({
3297
+ ...f,
3298
+ ...u,
3299
+ ...d,
3300
+ ...v
3301
+ }) || {};
3302
+ h && (g.style = l), c && (g.class = c);
3303
+ const y = A(s, { ...g }, a);
3304
+ return p.length > 0 ? Jn(
3305
+ // @ts-ignore
3306
+ y,
3307
+ p
3308
+ ) : y;
3309
+ };
3310
+ }
3311
+ const X = F(Ts, {
3312
+ props: ["component"]
3313
+ });
3314
+ function An(e, t) {
3315
+ var n, r;
3316
+ if (e) {
3317
+ e.vars && e.vars.forEach((i) => {
3318
+ ys().collectVar(i);
3319
+ });
3320
+ const o = Qt(e, Y(t)), s = Y(t);
3321
+ fs(e.py_watch, e.web_computed, s), (n = e.vue_watch) == null || n.forEach((i) => Es(i, s)), (r = e.js_watch) == null || r.forEach((i) => ws(i, s)), e.eRefs && e.eRefs.forEach((i) => {
3322
+ vr(i);
3323
+ }), Ce(() => {
3324
+ Zt(e.id, o), yr(e.id);
3325
+ });
3326
+ }
3327
+ }
3328
+ function js(e, { slots: t }) {
3329
+ const { scope: n } = e;
3330
+ return An(n), () => A(Ae, null, t.default());
3331
+ }
3332
+ const _e = F(js, {
3333
+ props: ["scope"]
3334
+ }), xs = F(
3335
+ (e) => {
3336
+ const { scope: t, items: n, vforInfo: r } = e;
3337
+ return Or(r), An(t, r.key), n.length === 1 ? () => A(X, {
3338
+ component: n[0]
3339
+ }) : () => n.map(
3340
+ (s) => A(X, {
3341
+ component: s
3342
+ })
3343
+ );
3344
+ },
3345
+ {
3346
+ props: ["scope", "items", "vforInfo"]
3347
+ }
3348
+ );
3349
+ function Ds(e, t) {
3350
+ const { state: n, isReady: r, isLoading: o } = ar(async () => {
3351
+ let s = e;
3352
+ const i = t;
3353
+ if (!s && !i)
3354
+ throw new Error("Either config or configUrl must be provided");
3355
+ if (!s && i && (s = await (await fetch(i)).json()), !s)
3356
+ throw new Error("Failed to load config");
3357
+ return s;
3358
+ }, {});
3359
+ return { config: n, isReady: r, isLoading: o };
3360
+ }
3361
+ function Ms(e, t) {
3362
+ let n;
3363
+ return t.component ? n = `Error captured from component:tag: ${t.component.tag} ; id: ${t.component.id} ` : n = "Error captured from app init", console.group(n), console.error("Component:", t.component), console.error("Error:", e), console.groupEnd(), !1;
3364
+ }
3365
+ const Fs = { class: "app-box" }, Bs = {
3366
+ key: 0,
3367
+ style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)" }
3368
+ }, Ws = /* @__PURE__ */ F({
3369
+ __name: "App",
3370
+ props: {
3371
+ config: {},
3372
+ configUrl: {}
3373
+ },
3374
+ setup(e) {
3375
+ const t = e, { config: n, isLoading: r } = Ds(
3376
+ t.config,
3377
+ t.configUrl
3378
+ );
3379
+ let o = null;
3380
+ return K(n, (s) => {
3381
+ o = s, s.url && rr({
3382
+ version: s.version,
3383
+ queryPath: s.url.path,
3384
+ pathParams: s.url.params
3385
+ }), vs(s);
3386
+ }), Qn(Ms), (s, i) => (he(), be("div", Fs, [
3387
+ B(r) ? (he(), be("div", Bs, i[0] || (i[0] = [
3388
+ Yn("p", { style: { margin: "auto" } }, "Loading ...", -1)
3389
+ ]))) : (he(), be("div", {
3390
+ key: 1,
3391
+ class: qe(["insta-main", B(n).class])
3392
+ }, [
3393
+ Xn(B(_e), {
3394
+ scope: B(o).scope
3395
+ }, {
3396
+ default: Zn(() => [
3397
+ (he(!0), be(Ae, null, er(B(o).items, (c) => (he(), tr(B(X), { component: c }, null, 8, ["component"]))), 256))
3398
+ ]),
3399
+ _: 1
3400
+ }, 8, ["scope"])
3401
+ ], 2))
3402
+ ]));
3403
+ }
3404
+ }), Ls = (e, t) => {
3405
+ const n = e.__vccOpts || e;
3406
+ for (const [r, o] of t)
3407
+ n[r] = o;
3408
+ return n;
3409
+ }, Us = /* @__PURE__ */ Ls(Ws, [["__scopeId", "data-v-687dcc1a"]]);
3410
+ function Gs(e) {
3411
+ const { on: t, scope: n, items: r } = e, o = Y();
3412
+ return () => {
3413
+ const s = o.getObjectToValue(t);
3414
+ return A(_e, { scope: n }, () => s ? r.map(
3415
+ (c) => A(X, { component: c })
3416
+ ) : void 0);
3417
+ };
3418
+ }
3419
+ const Ks = F(Gs, {
3420
+ props: ["on", "scope", "items"]
3421
+ });
3422
+ function Hs(e) {
3423
+ const { start: t = 0, end: n, step: r = 1 } = e;
3424
+ let o = [];
3425
+ if (r > 0)
3426
+ for (let s = t; s < n; s += r)
3427
+ o.push(s);
3428
+ else
3429
+ for (let s = t; s > n; s += r)
3430
+ o.push(s);
3431
+ return o;
3432
+ }
3433
+ function qs(e) {
3434
+ const { array: t, bArray: n, items: r, fkey: o, fid: s, scope: i, num: c, tsGroup: l = {} } = e, h = t === void 0, u = c !== void 0, a = h ? n : t, f = Y();
3435
+ Sr(s, a, h, u);
3436
+ const p = Xs(o ?? "index");
3437
+ return Ce(() => {
3438
+ mr(i.id);
3439
+ }), () => {
3440
+ const v = Js(
3441
+ u,
3442
+ h,
3443
+ a,
3444
+ f,
3445
+ c
3446
+ ), g = Vr(s), y = v.map((_, O) => {
3447
+ const V = p(_, O);
3448
+ return g.add(V), Pr(s, V, O), A(xs, {
3449
+ scope: e.scope,
3450
+ items: r,
3451
+ vforInfo: {
3452
+ fid: s,
3453
+ key: V
3454
+ },
3455
+ key: V
3456
+ });
3457
+ });
3458
+ return g.removeUnusedKeys(), l && Object.keys(l).length > 0 ? A(qt, l, {
3459
+ default: () => y
3460
+ }) : y;
3461
+ };
3462
+ }
3463
+ const zs = F(qs, {
3464
+ props: ["array", "items", "fid", "bArray", "scope", "num", "fkey", "tsGroup"]
3465
+ });
3466
+ function Js(e, t, n, r, o) {
3467
+ if (e) {
3468
+ let i = 0;
3469
+ return typeof o == "number" ? i = o : i = r.getObjectToValue(o) ?? 0, Hs({
3470
+ end: Math.max(0, i)
3471
+ });
3472
+ }
3473
+ const s = t ? r.getObjectToValue(n) || [] : n;
3474
+ return typeof s == "object" ? Object.values(s) : s;
3475
+ }
3476
+ const Qs = (e) => e, Ys = (e, t) => t;
3477
+ function Xs(e) {
3478
+ const t = cr(e);
3479
+ return typeof t == "function" ? t : e === "item" ? Qs : Ys;
3480
+ }
3481
+ function Zs(e) {
3482
+ return e.map((n) => {
3483
+ if (n.tag)
3484
+ return A(X, { component: n });
3485
+ const r = ut($n);
3486
+ return A(r, {
3487
+ scope: n
3488
+ });
3489
+ });
3490
+ }
3491
+ const $n = F(
3492
+ (e) => {
3493
+ const t = e.scope;
3494
+ return () => Zs(t.items ?? []);
3495
+ },
3496
+ {
3497
+ props: ["scope"]
3498
+ }
3499
+ );
3500
+ function ei(e) {
3501
+ return e.map((t) => {
3502
+ if (t.tag)
3503
+ return A(X, { component: t });
3504
+ const n = ut($n);
3505
+ return A(n, {
3506
+ scope: t
3507
+ });
3508
+ });
3509
+ }
3510
+ const ti = F(
3511
+ (e) => {
3512
+ const { scope: t, on: n, items: r } = e, o = Q(r), s = Qt(t), i = Y();
3513
+ return Ie.createDynamicWatchRefresh(n, i, async () => {
3514
+ const { items: c, on: l } = await Ie.fetchRemote(e, i);
3515
+ return o.value = c, l;
3516
+ }), Ce(() => {
3517
+ Zt(t.id, s);
3518
+ }), () => ei(o.value);
3519
+ },
3520
+ {
3521
+ props: ["sid", "url", "hKey", "on", "bind", "items", "scope"]
3522
+ }
3523
+ );
3524
+ var Ie;
3525
+ ((e) => {
3526
+ function t(r, o, s) {
3527
+ let i = null, c = r, l = c.map((u) => o.getVueRefObject(u));
3528
+ function h() {
3529
+ i && i(), i = K(
3530
+ l,
3531
+ async () => {
3532
+ c = await s(), l = c.map((u) => o.getVueRefObject(u)), h();
3533
+ },
3534
+ { deep: !0 }
3535
+ );
3536
+ }
3537
+ return h(), () => {
3538
+ i && i();
3539
+ };
3540
+ }
3541
+ e.createDynamicWatchRefresh = t;
3542
+ async function n(r, o) {
3543
+ const s = Object.values(r.bind).map((u) => ({
3544
+ sid: u.sid,
3545
+ id: u.id,
3546
+ value: o.getObjectToValue(u)
3547
+ })), i = {
3548
+ sid: r.sid,
3549
+ bind: s,
3550
+ hKey: r.hKey,
3551
+ page: lt()
3552
+ }, c = {
3553
+ method: "POST",
3554
+ headers: {
3555
+ "Content-Type": "application/json"
3556
+ },
3557
+ body: JSON.stringify(i)
3558
+ }, l = await fetch(r.url, c);
3559
+ if (!l.ok)
3560
+ throw new Error("Failed to fetch data");
3561
+ return await l.json();
3562
+ }
3563
+ e.fetchRemote = n;
3564
+ })(Ie || (Ie = {}));
3565
+ function ni(e) {
3566
+ const { scope: t, items: n } = e;
3567
+ return () => {
3568
+ const r = n.map((o) => A(X, { component: o }));
3569
+ return A(_e, { scope: t }, () => r);
3570
+ };
3571
+ }
3572
+ const Lt = F(ni, {
3573
+ props: ["scope", "items"]
3574
+ });
3575
+ function ri(e) {
3576
+ const { on: t, case: n, default: r } = e, o = Y();
3577
+ return () => {
3578
+ const s = o.getObjectToValue(t), i = n.map((c) => {
3579
+ const { value: l, items: h, scope: u } = c.props;
3580
+ if (s === l)
3581
+ return A(Lt, {
3582
+ scope: u,
3583
+ items: h,
3584
+ key: ["case", l].join("-")
3585
+ });
3586
+ }).filter((c) => c);
3587
+ if (r && !i.length) {
3588
+ const { items: c, scope: l } = r.props;
3589
+ i.push(A(Lt, { scope: l, items: c, key: "default" }));
3590
+ }
3591
+ return A(Ae, i);
3592
+ };
3593
+ }
3594
+ const oi = F(ri, {
3595
+ props: ["case", "on", "default"]
3596
+ });
3597
+ function si(e, { slots: t }) {
3598
+ const { name: n = "fade", tag: r } = e;
3599
+ return () => A(
3600
+ qt,
3601
+ { name: n, tag: r },
3602
+ {
3603
+ default: t.default
3604
+ }
3605
+ );
3606
+ }
3607
+ const ii = F(si, {
3608
+ props: ["name", "tag"]
3609
+ });
3610
+ function ai(e) {
3611
+ const { content: t, r: n = 0 } = e, r = Y(), o = n === 1 ? () => r.getObjectToValue(t) : () => t;
3612
+ return () => Ht(o());
3613
+ }
3614
+ const ci = F(ai, {
3615
+ props: ["content", "r"]
3616
+ });
3617
+ function ui(e) {
3618
+ if (!e.router)
3619
+ throw new Error("Router config is not provided.");
3620
+ const { routes: t, kAlive: n = !1 } = e.router;
3621
+ return t.map(
3622
+ (o) => Tn(o, n)
3623
+ );
3624
+ }
3625
+ function Tn(e, t) {
3626
+ var l;
3627
+ const { server: n = !1, vueItem: r, scope: o } = e, s = () => {
3628
+ if (n)
3629
+ throw new Error("Server-side rendering is not supported yet.");
3630
+ return Promise.resolve(li(r, o, t));
3631
+ }, i = (l = r.children) == null ? void 0 : l.map(
3632
+ (h) => Tn(h, t)
3633
+ ), c = {
3634
+ ...r,
3635
+ children: i,
3636
+ component: s
3637
+ };
3638
+ return r.component.length === 0 && delete c.component, i === void 0 && delete c.children, c;
3639
+ }
3640
+ function li(e, t, n) {
3641
+ const { path: r, component: o } = e, s = A(
3642
+ _e,
3643
+ { scope: t, key: r },
3644
+ () => o.map((c) => A(X, { component: c }))
3645
+ );
3646
+ return n ? A(nr, null, () => s) : s;
3647
+ }
3648
+ function fi(e, t) {
3649
+ const { mode: n = "hash" } = t.router, r = n === "hash" ? vo() : n === "memory" ? go() : wn();
3650
+ e.use(
3651
+ as({
3652
+ history: r,
3653
+ routes: ui(t)
3654
+ })
3655
+ );
3656
+ }
3657
+ function pi(e, t) {
3658
+ e.component("insta-ui", Us), e.component("vif", Ks), e.component("vfor", zs), e.component("match", oi), e.component("refresh", ti), e.component("ts-group", ii), e.component("content", ci), t.router && fi(e, t);
3659
+ }
3660
+ export {
3661
+ pi as default
3662
+ };
3663
+ //# sourceMappingURL=insta-ui.js.map