@deot/docs-client 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/chunks/browser-Cmwcvs-d.js +505 -0
- package/dist/chunks/cdn-DEvdGJu2-bmlgKy4E.js +38 -0
- package/dist/chunks/chunk-rhk8Qtmk-CUgXtmq_.js +14 -0
- package/dist/chunks/compile-Bw7v7QE--Dd1-R95H.js +79920 -0
- package/dist/chunks/compiler-sfc.esm-browser-B4_kBkG5.js +24975 -0
- package/dist/chunks/dayjs.min-B3g34Qcz.js +300 -0
- package/dist/chunks/dist-0ySyXNpo.js +415 -0
- package/dist/chunks/dist-BUw25nXJ.js +65 -0
- package/dist/chunks/dist-BeOE8qTX.js +345 -0
- package/dist/chunks/dist-Bm7SK-km.js +24517 -0
- package/dist/chunks/dist-C3V7reR4.js +197 -0
- package/dist/chunks/dist-C8z9l0mA.js +58 -0
- package/dist/chunks/dist-CI9Lp9Cj.js +247 -0
- package/dist/chunks/dist-COjpr4FU.js +426 -0
- package/dist/chunks/dist-CQir6D4y.js +244 -0
- package/dist/chunks/dist-CuJyl-ef.js +17 -0
- package/dist/chunks/dist-Cxf7_ocf.js +44 -0
- package/dist/chunks/dist-DF4kisl2.js +43 -0
- package/dist/chunks/dist-DLj8yJdm.js +38 -0
- package/dist/chunks/dist-DN0sqx7H.js +39 -0
- package/dist/chunks/dist-DWqBe2Ah.js +132 -0
- package/dist/chunks/dist-D_Uqh6m9.js +80 -0
- package/dist/chunks/dist-DcIU51zW.js +166 -0
- package/dist/chunks/dist-DlmO7OlF.js +22 -0
- package/dist/chunks/dist-kiZUqqzR.js +27 -0
- package/dist/chunks/dist-oZ12SGqg.js +6 -0
- package/dist/chunks/dist-uXnwGrO3.js +76 -0
- package/dist/chunks/dist-va7FmnW4.js +156 -0
- package/dist/chunks/{echarts-I1Rk_oCV.js → echarts-Dk-pu7GM.js} +450 -398
- package/dist/chunks/files-C5UMzYxA-q9oJ4PrI.js +110 -0
- package/dist/chunks/html2canvas-Deo0mM5K.js +4022 -0
- package/dist/chunks/index.es-UlJ0gfdF.js +5757 -0
- package/dist/chunks/jspdf.es.min-CJc40v7q.js +17873 -0
- package/dist/chunks/jsx-CwMPlI4_-CAiik-V7.js +128454 -0
- package/dist/chunks/jszip.min-BbVwZKYP.js +3044 -0
- package/dist/chunks/linker-JHdz37DK-CWgUtxZ5.js +118 -0
- package/dist/chunks/local-sandbox-B8IJ5jWb-BgfU3iQ4.js +300 -0
- package/dist/chunks/lodash-Cxf6dD_I.js +5161 -0
- package/dist/chunks/modules-DlLJF_vd-DcNdL6sc.js +153 -0
- package/dist/chunks/{photoswipe.esm-CT37djgx.js → photoswipe.esm-B0V-xGTB.js} +36 -31
- package/dist/chunks/pinia-pDJilYOg.js +326 -0
- package/dist/chunks/purify.es-BiqY1C6m.js +867 -0
- package/dist/chunks/remote-DfXAsO9n-C_MtPVYr.js +75 -0
- package/dist/chunks/script-xKUjE8pf-oF69rg-w.js +14941 -0
- package/dist/chunks/store-D8vwi-HV-RFStijWr.js +16936 -0
- package/dist/chunks/vue-router-C0mj8Ot5.js +1196 -0
- package/dist/chunks/vue.runtime.esm-bundler-XxHGOLq2.js +4879 -0
- package/dist/index.cjs +17 -17
- package/dist/index.d.ts +1 -1
- package/dist/index.js +41713 -103389
- package/dist/index.style.css +3 -4
- package/package.json +9 -9
- package/dist/chunks/_commonjsHelpers-BFTU3MAI-D_7z5o6A.js +0 -8
- package/dist/chunks/jsx-H2PmTOgp-C0GVSSMR.js +0 -128281
|
@@ -0,0 +1,1196 @@
|
|
|
1
|
+
globalThis.process;
|
|
2
|
+
import { n as e } from "./rolldown-runtime-Ce3zPWPd.js";
|
|
3
|
+
import { A as t, E as n, I as r, N as i, S as a, at as o, dt as s, f as c, k as l, ot as u, q as d, rt as f, st as p, w as m, z as h } from "./vue.runtime.esm-bundler-XxHGOLq2.js";
|
|
4
|
+
//#region node_modules/.pnpm/vue-router@5.3.1_@vue+compiler-sfc@3.5.43_esbuild@0.28.2_pinia@4.0.3_@vue+devtools-api@_0c5b3df5cc7eaf2e5ada59ec9bc736bd/node_modules/vue-router/dist/useApi-BPuI6ZR9.js
|
|
5
|
+
var g = (e) => e.startsWith("/");
|
|
6
|
+
function _(e) {
|
|
7
|
+
return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
|
|
8
|
+
}
|
|
9
|
+
function ee(e) {
|
|
10
|
+
return e.__esModule || e[Symbol.toStringTag] === "Module" || e.default && _(e.default);
|
|
11
|
+
}
|
|
12
|
+
var v = Object.assign;
|
|
13
|
+
function y(e, t) {
|
|
14
|
+
let n = {};
|
|
15
|
+
for (let r in t) {
|
|
16
|
+
let i = t[r];
|
|
17
|
+
n[r] = x(i) ? i.map(e) : e(i);
|
|
18
|
+
}
|
|
19
|
+
return n;
|
|
20
|
+
}
|
|
21
|
+
var b = () => {}, x = Array.isArray;
|
|
22
|
+
function te(e, t) {
|
|
23
|
+
let n = {};
|
|
24
|
+
for (let r in e) n[r] = r in t ? t[r] : e[r];
|
|
25
|
+
return n;
|
|
26
|
+
}
|
|
27
|
+
var ne = Symbol(""), re = /* @__PURE__ */ function(e) {
|
|
28
|
+
return e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated", e;
|
|
29
|
+
}({});
|
|
30
|
+
function S(e, t) {
|
|
31
|
+
return v(/* @__PURE__ */ Error(), {
|
|
32
|
+
type: e,
|
|
33
|
+
[ne]: !0
|
|
34
|
+
}, t);
|
|
35
|
+
}
|
|
36
|
+
function C(e, t) {
|
|
37
|
+
return e instanceof Error && ne in e && (t == null || !!(e.type & t));
|
|
38
|
+
}
|
|
39
|
+
var w = Symbol(""), T = Symbol(""), E = Symbol(""), D = Symbol(""), O = Symbol("");
|
|
40
|
+
function k() {
|
|
41
|
+
return n(E);
|
|
42
|
+
}
|
|
43
|
+
function A(e) {
|
|
44
|
+
return n(D);
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region node_modules/.pnpm/vue-router@5.3.1_@vue+compiler-sfc@3.5.43_esbuild@0.28.2_pinia@4.0.3_@vue+devtools-api@_0c5b3df5cc7eaf2e5ada59ec9bc736bd/node_modules/vue-router/dist/devtools-CN5uWJaH.js
|
|
48
|
+
var j = typeof document < "u", M = /#/g, ie = /&/g, ae = /\//g, N = /=/g, oe = /\?/g, P = /\+/g, se = /%5B/g, ce = /%5D/g, F = /%5E/g, I = /%60/g, le = /%7B/g, L = /%7C/g, R = /%7D/g, z = /%20/g;
|
|
49
|
+
function B(e) {
|
|
50
|
+
return e == null ? "" : encodeURI("" + e).replace(L, "|").replace(se, "[").replace(ce, "]");
|
|
51
|
+
}
|
|
52
|
+
function ue(e) {
|
|
53
|
+
return B(e).replace(le, "{").replace(R, "}").replace(F, "^");
|
|
54
|
+
}
|
|
55
|
+
function V(e) {
|
|
56
|
+
return B(e).replace(P, "%2B").replace(z, "+").replace(M, "%23").replace(ie, "%26").replace(I, "`").replace(le, "{").replace(R, "}").replace(F, "^");
|
|
57
|
+
}
|
|
58
|
+
function H(e) {
|
|
59
|
+
return V(e).replace(N, "%3D");
|
|
60
|
+
}
|
|
61
|
+
function de(e) {
|
|
62
|
+
return B(e).replace(M, "%23").replace(oe, "%3F");
|
|
63
|
+
}
|
|
64
|
+
function fe(e) {
|
|
65
|
+
return de(e).replace(ae, "%2F");
|
|
66
|
+
}
|
|
67
|
+
function U(e) {
|
|
68
|
+
if (e == null) return null;
|
|
69
|
+
try {
|
|
70
|
+
return decodeURIComponent("" + e);
|
|
71
|
+
} catch {}
|
|
72
|
+
return "" + e;
|
|
73
|
+
}
|
|
74
|
+
var W = /\/$/, G = (e) => e.replace(W, "");
|
|
75
|
+
function K(e, t, n = "/") {
|
|
76
|
+
let r, i = {}, a = "", o = "", s = t.indexOf("#"), c = t.indexOf("?");
|
|
77
|
+
return c = s >= 0 && c > s ? -1 : c, c >= 0 && (r = t.slice(0, c), a = t.slice(c, s > 0 ? s : t.length), i = e(a.slice(1))), s >= 0 && (r ||= t.slice(0, s), o = t.slice(s, t.length)), r = _e(r ?? t, n), {
|
|
78
|
+
fullPath: r + a + o,
|
|
79
|
+
path: r,
|
|
80
|
+
query: i,
|
|
81
|
+
hash: U(o)
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function pe(e, t) {
|
|
85
|
+
let n = t.query ? e(t.query) : "";
|
|
86
|
+
return t.path + (n && "?") + n + (t.hash || "");
|
|
87
|
+
}
|
|
88
|
+
function q(e, t) {
|
|
89
|
+
return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
|
|
90
|
+
}
|
|
91
|
+
function me(e, t, n) {
|
|
92
|
+
let r = t.matched.length - 1, i = n.matched.length - 1;
|
|
93
|
+
return r > -1 && r === i && J(t.matched[r], n.matched[i]) && Y(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
|
|
94
|
+
}
|
|
95
|
+
function J(e, t) {
|
|
96
|
+
return (e.aliasOf || e) === (t.aliasOf || t);
|
|
97
|
+
}
|
|
98
|
+
function Y(e, t) {
|
|
99
|
+
if (Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
100
|
+
for (var n in e) if (!he(e[n], t[n])) return !1;
|
|
101
|
+
return !0;
|
|
102
|
+
}
|
|
103
|
+
function he(e, t) {
|
|
104
|
+
return x(e) ? ge(e, t) : x(t) ? ge(t, e) : (e && e.valueOf()) === (t && t.valueOf());
|
|
105
|
+
}
|
|
106
|
+
function ge(e, t) {
|
|
107
|
+
return x(t) ? e.length === t.length && e.every((e, n) => e === t[n]) : e.length === 1 && e[0] === t;
|
|
108
|
+
}
|
|
109
|
+
function _e(e, t) {
|
|
110
|
+
if (g(e)) return e;
|
|
111
|
+
if (!e) return t;
|
|
112
|
+
let n = t.split("/"), r = e.split("/"), i = r[r.length - 1];
|
|
113
|
+
(i === ".." || i === ".") && r.push("");
|
|
114
|
+
let a = n.length - 1, o, s;
|
|
115
|
+
for (o = 0; o < r.length; o++) if (s = r[o], s !== ".") {
|
|
116
|
+
if (s === "..") a > 1 && a--;
|
|
117
|
+
else break;
|
|
118
|
+
}
|
|
119
|
+
return n.slice(0, a).join("/") + "/" + r.slice(o).join("/");
|
|
120
|
+
}
|
|
121
|
+
var X = {
|
|
122
|
+
path: "/",
|
|
123
|
+
name: void 0,
|
|
124
|
+
params: {},
|
|
125
|
+
query: {},
|
|
126
|
+
hash: "",
|
|
127
|
+
fullPath: "/",
|
|
128
|
+
matched: [],
|
|
129
|
+
meta: {},
|
|
130
|
+
redirectedFrom: void 0
|
|
131
|
+
};
|
|
132
|
+
function ve(e) {
|
|
133
|
+
if (!e) {
|
|
134
|
+
if (j) {
|
|
135
|
+
let t = document.querySelector("base");
|
|
136
|
+
e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^/]+/, "");
|
|
137
|
+
} else e = "/";
|
|
138
|
+
}
|
|
139
|
+
return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), G(e);
|
|
140
|
+
}
|
|
141
|
+
var ye = /^[^#]+#/;
|
|
142
|
+
function be(e, t) {
|
|
143
|
+
return e.replace(ye, "#") + t;
|
|
144
|
+
}
|
|
145
|
+
function xe(e, t) {
|
|
146
|
+
let n = document.documentElement.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
147
|
+
return {
|
|
148
|
+
behavior: t.behavior,
|
|
149
|
+
left: r.left - n.left - (t.left || 0),
|
|
150
|
+
top: r.top - n.top - (t.top || 0)
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
var Se = () => history.scrollRestoration === "manual" ? {
|
|
154
|
+
left: window.scrollX,
|
|
155
|
+
top: window.scrollY
|
|
156
|
+
} : null;
|
|
157
|
+
function Ce(e) {
|
|
158
|
+
let t;
|
|
159
|
+
if ("el" in e) {
|
|
160
|
+
let n = e.el, r = typeof n == "string" && n.startsWith("#"), i = typeof n == "string" ? r ? document.getElementById(n.slice(1)) : document.querySelector(n) : n;
|
|
161
|
+
if (!i) return;
|
|
162
|
+
t = xe(i, e);
|
|
163
|
+
} else t = e;
|
|
164
|
+
"scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left == null ? window.scrollX : t.left, t.top == null ? window.scrollY : t.top);
|
|
165
|
+
}
|
|
166
|
+
function we(e, t) {
|
|
167
|
+
return (history.state ? history.state.position - t : -1) + e;
|
|
168
|
+
}
|
|
169
|
+
var Te = /* @__PURE__ */ new Map();
|
|
170
|
+
function Ee(e) {
|
|
171
|
+
Te.set(e, Se());
|
|
172
|
+
}
|
|
173
|
+
function De(e) {
|
|
174
|
+
let t = Te.get(e);
|
|
175
|
+
return Te.delete(e), t;
|
|
176
|
+
}
|
|
177
|
+
function Oe(e) {
|
|
178
|
+
return typeof e == "string" || e && typeof e == "object";
|
|
179
|
+
}
|
|
180
|
+
function ke(e) {
|
|
181
|
+
return typeof e == "string" || typeof e == "symbol";
|
|
182
|
+
}
|
|
183
|
+
function Ae(e) {
|
|
184
|
+
let t = {};
|
|
185
|
+
if (e === "" || e === "?") return t;
|
|
186
|
+
let n = (e[0] === "?" ? e.slice(1) : e).split("&");
|
|
187
|
+
for (let e = 0; e < n.length; ++e) {
|
|
188
|
+
let r = n[e].replace(P, " "), i = r.indexOf("="), a = U(i < 0 ? r : r.slice(0, i)), o = i < 0 ? null : U(r.slice(i + 1));
|
|
189
|
+
if (a in t) {
|
|
190
|
+
let e = t[a];
|
|
191
|
+
x(e) || (e = t[a] = [e]), e.push(o);
|
|
192
|
+
} else t[a] = o;
|
|
193
|
+
}
|
|
194
|
+
return t;
|
|
195
|
+
}
|
|
196
|
+
function je(e) {
|
|
197
|
+
let t = "";
|
|
198
|
+
for (let n in e) {
|
|
199
|
+
let r = e[n];
|
|
200
|
+
if (n = H(n), r == null) {
|
|
201
|
+
r !== void 0 && (t += (t.length ? "&" : "") + n);
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
(x(r) ? r.map((e) => e && V(e)) : [r && V(r)]).forEach((e) => {
|
|
205
|
+
e !== void 0 && (t += (t.length ? "&" : "") + n, e != null && (t += "=" + e));
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
return t;
|
|
209
|
+
}
|
|
210
|
+
function Me(e) {
|
|
211
|
+
let t = {};
|
|
212
|
+
for (let n in e) {
|
|
213
|
+
let r = e[n];
|
|
214
|
+
r !== void 0 && (t[n] = x(r) ? r.map((e) => e == null ? null : "" + e) : r == null ? r : "" + r);
|
|
215
|
+
}
|
|
216
|
+
return t;
|
|
217
|
+
}
|
|
218
|
+
function Z() {
|
|
219
|
+
let e = [];
|
|
220
|
+
function t(t) {
|
|
221
|
+
return e.push(t), () => {
|
|
222
|
+
let n = e.indexOf(t);
|
|
223
|
+
n > -1 && e.splice(n, 1);
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function n() {
|
|
227
|
+
e = [];
|
|
228
|
+
}
|
|
229
|
+
return {
|
|
230
|
+
add: t,
|
|
231
|
+
list: () => e.slice(),
|
|
232
|
+
reset: n
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function Ne(e, n, a) {
|
|
236
|
+
let o = e.value;
|
|
237
|
+
if (!o) return;
|
|
238
|
+
let s = o, c = () => {
|
|
239
|
+
s[n].delete(a);
|
|
240
|
+
};
|
|
241
|
+
r(c), i(c), t(() => {
|
|
242
|
+
let t = e.value;
|
|
243
|
+
t && (s = t), s[n].add(a);
|
|
244
|
+
}), s[n].add(a);
|
|
245
|
+
}
|
|
246
|
+
function Pe(e) {
|
|
247
|
+
Ne(n(w, {}), "leaveGuards", e);
|
|
248
|
+
}
|
|
249
|
+
function Fe(e) {
|
|
250
|
+
Ne(n(w, {}), "updateGuards", e);
|
|
251
|
+
}
|
|
252
|
+
function Q(e, t, n, r, i, a = (e) => e()) {
|
|
253
|
+
let o = r && (r.enterCallbacks[i] = r.enterCallbacks[i] || []);
|
|
254
|
+
return () => new Promise((s, c) => {
|
|
255
|
+
let l = (e) => {
|
|
256
|
+
e === !1 ? c(S(4, {
|
|
257
|
+
from: n,
|
|
258
|
+
to: t
|
|
259
|
+
})) : e instanceof Error ? c(e) : Oe(e) ? c(S(2, {
|
|
260
|
+
from: t,
|
|
261
|
+
to: e
|
|
262
|
+
})) : (o && r.enterCallbacks[i] === o && typeof e == "function" && o.push(e), s());
|
|
263
|
+
}, u = a(() => e.call(r && r.instances[i], t, n, l)), d = Promise.resolve(u);
|
|
264
|
+
e.length < 3 && (d = d.then(l)), d.catch((e) => c(e));
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
function Ie(e, t, n, r, i = (e) => e()) {
|
|
268
|
+
let a = [];
|
|
269
|
+
for (let o of e) for (let e in o.components) {
|
|
270
|
+
let s = o.components[e];
|
|
271
|
+
if (t === "beforeRouteEnter" || o.instances[e]) {
|
|
272
|
+
if (_(s)) {
|
|
273
|
+
let c = (s.__vccOpts || s)[t];
|
|
274
|
+
c && a.push(Q(c, n, r, o, e, i));
|
|
275
|
+
} else {
|
|
276
|
+
let c = s();
|
|
277
|
+
a.push(() => c.then((a) => {
|
|
278
|
+
if (!a) throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);
|
|
279
|
+
let s = ee(a) ? a.default : a;
|
|
280
|
+
o.mods[e] = a, o.components[e] = s;
|
|
281
|
+
let c = (s.__vccOpts || s)[t];
|
|
282
|
+
return c && Q(c, n, r, o, e, i)();
|
|
283
|
+
}));
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return a;
|
|
288
|
+
}
|
|
289
|
+
function Le(e) {
|
|
290
|
+
return e.matched.every((e) => e.redirect) ? Promise.reject(/* @__PURE__ */ Error("Cannot load a route that redirects.")) : Promise.all(e.matched.map((e) => e.components && Promise.all(Object.keys(e.components).reduce((t, n) => {
|
|
291
|
+
let r = e.components[n];
|
|
292
|
+
return typeof r == "function" && !("displayName" in r) && t.push(r().then((t) => {
|
|
293
|
+
if (!t) return Promise.reject(/* @__PURE__ */ Error(`Couldn't resolve component "${n}" at "${e.path}". Ensure you passed a function that returns a promise.`));
|
|
294
|
+
let r = ee(t) ? t.default : t;
|
|
295
|
+
e.mods[n] = t, e.components[n] = r;
|
|
296
|
+
})), t;
|
|
297
|
+
}, [])))).then(() => e);
|
|
298
|
+
}
|
|
299
|
+
function Re(e, t) {
|
|
300
|
+
let n = [], r = [], i = [], a = Math.max(t.matched.length, e.matched.length);
|
|
301
|
+
for (let o = 0; o < a; o++) {
|
|
302
|
+
let a = t.matched[o];
|
|
303
|
+
a && (e.matched.find((e) => J(e, a)) ? r.push(a) : n.push(a));
|
|
304
|
+
let s = e.matched[o];
|
|
305
|
+
s && (t.matched.find((e) => J(e, s)) || i.push(s));
|
|
306
|
+
}
|
|
307
|
+
return [
|
|
308
|
+
n,
|
|
309
|
+
r,
|
|
310
|
+
i
|
|
311
|
+
];
|
|
312
|
+
}
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region node_modules/.pnpm/vue-router@5.3.1_@vue+compiler-sfc@3.5.43_esbuild@0.28.2_pinia@4.0.3_@vue+devtools-api@_0c5b3df5cc7eaf2e5ada59ec9bc736bd/node_modules/vue-router/dist/vue-router.js
|
|
315
|
+
var ze = /* @__PURE__ */ e({
|
|
316
|
+
NavigationFailureType: () => re,
|
|
317
|
+
RouterLink: () => gt,
|
|
318
|
+
RouterView: () => Ct,
|
|
319
|
+
START_LOCATION: () => X,
|
|
320
|
+
createMemoryHistory: () => qe,
|
|
321
|
+
createRouter: () => wt,
|
|
322
|
+
createRouterMatcher: () => $,
|
|
323
|
+
createWebHashHistory: () => Ke,
|
|
324
|
+
createWebHistory: () => Ge,
|
|
325
|
+
isNavigationFailure: () => C,
|
|
326
|
+
loadRouteLocation: () => Le,
|
|
327
|
+
matchedRouteKey: () => w,
|
|
328
|
+
onBeforeRouteLeave: () => Pe,
|
|
329
|
+
onBeforeRouteUpdate: () => Fe,
|
|
330
|
+
parseQuery: () => Ae,
|
|
331
|
+
routeLocationKey: () => D,
|
|
332
|
+
routerKey: () => E,
|
|
333
|
+
routerViewLocationKey: () => O,
|
|
334
|
+
stringifyQuery: () => je,
|
|
335
|
+
useLink: () => mt,
|
|
336
|
+
useRoute: () => A,
|
|
337
|
+
useRouter: () => k,
|
|
338
|
+
viewDepthKey: () => T
|
|
339
|
+
}), Be = () => location.protocol + "//" + location.host;
|
|
340
|
+
function Ve(e, t) {
|
|
341
|
+
let { pathname: n, search: r, hash: i } = t, a = e.indexOf("#");
|
|
342
|
+
if (a > -1) {
|
|
343
|
+
let t = i.includes(e.slice(a)) ? e.slice(a).length : 1, n = i.slice(t);
|
|
344
|
+
return n[0] !== "/" && (n = "/" + n), q(n, "");
|
|
345
|
+
}
|
|
346
|
+
return q(n, e) + r + i;
|
|
347
|
+
}
|
|
348
|
+
function He(e, t, n, r) {
|
|
349
|
+
let i = [], a = [], o = null, s = ({ state: a }) => {
|
|
350
|
+
let s = Ve(e, location), c = n.value, l = t.value, u = 0;
|
|
351
|
+
if (a) {
|
|
352
|
+
if (n.value = s, t.value = a, o && o === c) {
|
|
353
|
+
o = null;
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
u = l ? a.position - l.position : 0;
|
|
357
|
+
} else r(s);
|
|
358
|
+
i.forEach((e) => {
|
|
359
|
+
e(n.value, c, {
|
|
360
|
+
delta: u,
|
|
361
|
+
type: "pop",
|
|
362
|
+
direction: u ? u > 0 ? "forward" : "back" : ""
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
function c() {
|
|
367
|
+
o = n.value;
|
|
368
|
+
}
|
|
369
|
+
function l(e) {
|
|
370
|
+
i.push(e);
|
|
371
|
+
let t = () => {
|
|
372
|
+
let t = i.indexOf(e);
|
|
373
|
+
t > -1 && i.splice(t, 1);
|
|
374
|
+
};
|
|
375
|
+
return a.push(t), t;
|
|
376
|
+
}
|
|
377
|
+
function u() {
|
|
378
|
+
let { history: e } = window;
|
|
379
|
+
e.state && e.replaceState(v({}, e.state, { scroll: Se() }), "");
|
|
380
|
+
}
|
|
381
|
+
function d() {
|
|
382
|
+
for (let e of a) e();
|
|
383
|
+
a = [], window.removeEventListener("popstate", s), window.removeEventListener("pagehide", u);
|
|
384
|
+
}
|
|
385
|
+
return window.addEventListener("popstate", s), window.addEventListener("pagehide", u), {
|
|
386
|
+
pauseListeners: c,
|
|
387
|
+
listen: l,
|
|
388
|
+
destroy: d
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function Ue(e, t, n, r = !1) {
|
|
392
|
+
return {
|
|
393
|
+
back: e,
|
|
394
|
+
current: t,
|
|
395
|
+
forward: n,
|
|
396
|
+
replaced: r,
|
|
397
|
+
position: window.history.length,
|
|
398
|
+
scroll: null
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
function We(e) {
|
|
402
|
+
let { history: t, location: n } = window, r = { value: Ve(e, n) }, i = { value: t.state };
|
|
403
|
+
i.value || a(r.value, {
|
|
404
|
+
back: null,
|
|
405
|
+
current: r.value,
|
|
406
|
+
forward: null,
|
|
407
|
+
position: t.length - 1,
|
|
408
|
+
replaced: !0,
|
|
409
|
+
scroll: null
|
|
410
|
+
}, !0);
|
|
411
|
+
function a(r, a, o) {
|
|
412
|
+
let s = e.indexOf("#"), c = s > -1 ? (n.host && document.querySelector("base") ? e : e.slice(s)) + r : Be() + e + r;
|
|
413
|
+
try {
|
|
414
|
+
t[o ? "replaceState" : "pushState"](a, "", c), i.value = a;
|
|
415
|
+
} catch (e) {
|
|
416
|
+
console.error(e), n[o ? "replace" : "assign"](c);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
function o(e, n) {
|
|
420
|
+
a(e, v({}, t.state, Ue(i.value.back, e, i.value.forward, !0), n, { position: i.value.position }), !0), r.value = e;
|
|
421
|
+
}
|
|
422
|
+
function s(e, n) {
|
|
423
|
+
let o = v({}, i.value, t.state, {
|
|
424
|
+
forward: e,
|
|
425
|
+
scroll: Se()
|
|
426
|
+
});
|
|
427
|
+
a(o.current, o, !0), a(e, v({}, Ue(r.value, e, null), { position: o.position + 1 }, n), !1), r.value = e;
|
|
428
|
+
}
|
|
429
|
+
return {
|
|
430
|
+
location: r,
|
|
431
|
+
state: i,
|
|
432
|
+
push: s,
|
|
433
|
+
replace: o
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
function Ge(e) {
|
|
437
|
+
e = ve(e);
|
|
438
|
+
let t = We(e), n = He(e, t.state, t.location, t.replace);
|
|
439
|
+
function r(e, t = !0) {
|
|
440
|
+
t || n.pauseListeners(), history.go(e);
|
|
441
|
+
}
|
|
442
|
+
let i = v({
|
|
443
|
+
location: "",
|
|
444
|
+
base: e,
|
|
445
|
+
go: r,
|
|
446
|
+
createHref: be.bind(null, e)
|
|
447
|
+
}, t, n);
|
|
448
|
+
return Object.defineProperty(i, "location", {
|
|
449
|
+
enumerable: !0,
|
|
450
|
+
get: () => t.location.value
|
|
451
|
+
}), Object.defineProperty(i, "state", {
|
|
452
|
+
enumerable: !0,
|
|
453
|
+
get: () => t.state.value
|
|
454
|
+
}), i;
|
|
455
|
+
}
|
|
456
|
+
function Ke(e) {
|
|
457
|
+
return e = location.host ? e || location.pathname + location.search : "", e.includes("#") || (e += "#"), Ge(e);
|
|
458
|
+
}
|
|
459
|
+
function qe(e = "") {
|
|
460
|
+
let t = [], n = [["", {}]], r = 0;
|
|
461
|
+
e = ve(e);
|
|
462
|
+
function i(e, t = {}) {
|
|
463
|
+
r++, r !== n.length && n.splice(r), n.push([e, t]);
|
|
464
|
+
}
|
|
465
|
+
function a(e, n, { direction: r, delta: i }) {
|
|
466
|
+
let a = {
|
|
467
|
+
direction: r,
|
|
468
|
+
delta: i,
|
|
469
|
+
type: "pop"
|
|
470
|
+
};
|
|
471
|
+
for (let r of t) r(e, n, a);
|
|
472
|
+
}
|
|
473
|
+
let o = {
|
|
474
|
+
location: "",
|
|
475
|
+
state: {},
|
|
476
|
+
base: e,
|
|
477
|
+
createHref: be.bind(null, e),
|
|
478
|
+
replace(e, t) {
|
|
479
|
+
n.splice(r--, 1), i(e, t);
|
|
480
|
+
},
|
|
481
|
+
push(e, t) {
|
|
482
|
+
i(e, t);
|
|
483
|
+
},
|
|
484
|
+
listen(e) {
|
|
485
|
+
return t.push(e), () => {
|
|
486
|
+
let n = t.indexOf(e);
|
|
487
|
+
n > -1 && t.splice(n, 1);
|
|
488
|
+
};
|
|
489
|
+
},
|
|
490
|
+
destroy() {
|
|
491
|
+
t = [], n = [["", {}]], r = 0;
|
|
492
|
+
},
|
|
493
|
+
go(e, t = !0) {
|
|
494
|
+
let i = this.location, o = e < 0 ? "back" : "forward";
|
|
495
|
+
r = Math.max(0, Math.min(r + e, n.length - 1)), t && a(this.location, i, {
|
|
496
|
+
direction: o,
|
|
497
|
+
delta: e
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
return Object.defineProperty(o, "location", {
|
|
502
|
+
enumerable: !0,
|
|
503
|
+
get: () => n[r][0]
|
|
504
|
+
}), Object.defineProperty(o, "state", {
|
|
505
|
+
enumerable: !0,
|
|
506
|
+
get: () => n[r][1]
|
|
507
|
+
}), o;
|
|
508
|
+
}
|
|
509
|
+
var Je = {
|
|
510
|
+
type: 0,
|
|
511
|
+
value: ""
|
|
512
|
+
}, Ye = /[a-zA-Z0-9_]/;
|
|
513
|
+
function Xe(e) {
|
|
514
|
+
if (!e) return [[]];
|
|
515
|
+
if (e === "/") return [[Je]];
|
|
516
|
+
if (!g(e)) throw Error(`Invalid path "${e}"`);
|
|
517
|
+
function t(e) {
|
|
518
|
+
throw Error(`ERR (${n})/"${l}": ${e}`);
|
|
519
|
+
}
|
|
520
|
+
let n = 0, r = n, i = [], a;
|
|
521
|
+
function o() {
|
|
522
|
+
a && i.push(a), a = [];
|
|
523
|
+
}
|
|
524
|
+
let s = 0, c, l = "", u = "";
|
|
525
|
+
function d() {
|
|
526
|
+
l &&= (n === 0 ? a.push({
|
|
527
|
+
type: 0,
|
|
528
|
+
value: l
|
|
529
|
+
}) : n === 1 || n === 2 || n === 3 ? (a.length > 1 && (c === "*" || c === "+") && t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`), a.push({
|
|
530
|
+
type: 1,
|
|
531
|
+
value: l,
|
|
532
|
+
regexp: u,
|
|
533
|
+
repeatable: c === "*" || c === "+",
|
|
534
|
+
optional: c === "*" || c === "?"
|
|
535
|
+
})) : t("Invalid state to consume buffer"), "");
|
|
536
|
+
}
|
|
537
|
+
function f() {
|
|
538
|
+
l += c;
|
|
539
|
+
}
|
|
540
|
+
for (; s < e.length;) switch (c = e[s++], n) {
|
|
541
|
+
case 0:
|
|
542
|
+
c === "\\" ? (r = n, n = 4) : c === "/" ? (l && d(), o()) : c === ":" ? (d(), n = 1) : f();
|
|
543
|
+
break;
|
|
544
|
+
case 4:
|
|
545
|
+
f(), n = r;
|
|
546
|
+
break;
|
|
547
|
+
case 1:
|
|
548
|
+
c === "(" ? n = 2 : Ye.test(c) ? f() : (d(), n = 0, c !== "*" && c !== "?" && c !== "+" && s--);
|
|
549
|
+
break;
|
|
550
|
+
case 2:
|
|
551
|
+
c === ")" ? u[u.length - 1] == "\\" ? u = u.slice(0, -1) + c : n = 3 : u += c;
|
|
552
|
+
break;
|
|
553
|
+
case 3:
|
|
554
|
+
d(), n = 0, c !== "*" && c !== "?" && c !== "+" && s--, u = "";
|
|
555
|
+
break;
|
|
556
|
+
default: t("Unknown state");
|
|
557
|
+
}
|
|
558
|
+
return n === 2 && t(`Unfinished custom RegExp for param "${l}"`), d(), o(), i;
|
|
559
|
+
}
|
|
560
|
+
var Ze = "[^/]+?", Qe = {
|
|
561
|
+
sensitive: !1,
|
|
562
|
+
strict: !1,
|
|
563
|
+
start: !0,
|
|
564
|
+
end: !0
|
|
565
|
+
}, $e = /[.+*?^${}()[\]/\\]/g;
|
|
566
|
+
function et(e, t) {
|
|
567
|
+
let n = v({}, Qe, t), r = [], i = n.start ? "^" : "", a = [];
|
|
568
|
+
for (let t of e) {
|
|
569
|
+
let e = t.length ? [] : [90];
|
|
570
|
+
n.strict && !t.length && (i += "/");
|
|
571
|
+
for (let r = 0; r < t.length; r++) {
|
|
572
|
+
let o = t[r], s = 40 + (n.sensitive ? .25 : 0);
|
|
573
|
+
if (o.type === 0) r || (i += "/"), i += o.value.replace($e, "\\$&"), s += 40;
|
|
574
|
+
else if (o.type === 1) {
|
|
575
|
+
let { value: e, repeatable: n, optional: c, regexp: l } = o;
|
|
576
|
+
a.push({
|
|
577
|
+
name: e,
|
|
578
|
+
repeatable: n,
|
|
579
|
+
optional: c
|
|
580
|
+
});
|
|
581
|
+
let u = l || Ze;
|
|
582
|
+
if (u !== Ze) {
|
|
583
|
+
s += 10;
|
|
584
|
+
try {
|
|
585
|
+
RegExp(`(${u})`);
|
|
586
|
+
} catch (t) {
|
|
587
|
+
throw Error(`Invalid custom RegExp for param "${e}" (${u}): ` + t.message);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
let d = n ? `((?:${u})(?:/(?:${u}))*)` : `(${u})`;
|
|
591
|
+
r || (d = c && t.length < 2 ? `(?:/${d})` : "/" + d), c && (d += "?"), i += d, s += 20, c && (s += -8), n && (s += -20), u === ".*" && (s += -50);
|
|
592
|
+
}
|
|
593
|
+
e.push(s);
|
|
594
|
+
}
|
|
595
|
+
r.push(e);
|
|
596
|
+
}
|
|
597
|
+
if (n.strict && n.end) {
|
|
598
|
+
let e = r.length - 1;
|
|
599
|
+
r[e][r[e].length - 1] += .7000000000000001;
|
|
600
|
+
}
|
|
601
|
+
n.strict || (i += "/?"), n.end ? i += "$" : n.strict && !i.endsWith("/") && (i += "(?:/|$)");
|
|
602
|
+
let o = new RegExp(i, n.sensitive ? "" : "i");
|
|
603
|
+
function s(e) {
|
|
604
|
+
let t = e.match(o), n = {};
|
|
605
|
+
if (!t) return null;
|
|
606
|
+
for (let e = 1; e < t.length; e++) {
|
|
607
|
+
let r = t[e] || "", i = a[e - 1];
|
|
608
|
+
n[i.name] = r && i.repeatable ? r.split("/") : r;
|
|
609
|
+
}
|
|
610
|
+
return n;
|
|
611
|
+
}
|
|
612
|
+
function c(t) {
|
|
613
|
+
let n = "", r = !1;
|
|
614
|
+
for (let i of e) {
|
|
615
|
+
(!r || !n.endsWith("/")) && (n += "/"), r = !1;
|
|
616
|
+
for (let e of i) if (e.type === 0) n += e.value;
|
|
617
|
+
else if (e.type === 1) {
|
|
618
|
+
let { value: a, repeatable: o, optional: s } = e, c = a in t ? t[a] : "";
|
|
619
|
+
if (x(c) && !o) throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);
|
|
620
|
+
let l = x(c) ? c.join("/") : c;
|
|
621
|
+
if (!l) {
|
|
622
|
+
if (s) i.length < 2 && (n.endsWith("/") ? n = n.slice(0, -1) : r = !0);
|
|
623
|
+
else throw Error(`Missing required param "${a}"`);
|
|
624
|
+
}
|
|
625
|
+
n += l;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
return n || "/";
|
|
629
|
+
}
|
|
630
|
+
return {
|
|
631
|
+
re: o,
|
|
632
|
+
score: r,
|
|
633
|
+
keys: a,
|
|
634
|
+
parse: s,
|
|
635
|
+
stringify: c
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
function tt(e, t) {
|
|
639
|
+
let n = 0;
|
|
640
|
+
for (; n < e.length && n < t.length;) {
|
|
641
|
+
let r = t[n] - e[n];
|
|
642
|
+
if (r) return r;
|
|
643
|
+
n++;
|
|
644
|
+
}
|
|
645
|
+
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;
|
|
646
|
+
}
|
|
647
|
+
function nt(e, t) {
|
|
648
|
+
let n = 0, r = e.score, i = t.score;
|
|
649
|
+
for (; n < r.length && n < i.length;) {
|
|
650
|
+
let e = tt(r[n], i[n]);
|
|
651
|
+
if (e) return e;
|
|
652
|
+
n++;
|
|
653
|
+
}
|
|
654
|
+
if (Math.abs(i.length - r.length) === 1) {
|
|
655
|
+
if (rt(r)) return 1;
|
|
656
|
+
if (rt(i)) return -1;
|
|
657
|
+
}
|
|
658
|
+
return i.length - r.length;
|
|
659
|
+
}
|
|
660
|
+
function rt(e) {
|
|
661
|
+
let t = e[e.length - 1];
|
|
662
|
+
return e.length > 0 && t[t.length - 1] < 0;
|
|
663
|
+
}
|
|
664
|
+
var it = {
|
|
665
|
+
strict: !1,
|
|
666
|
+
end: !0,
|
|
667
|
+
sensitive: !1
|
|
668
|
+
};
|
|
669
|
+
function at(e, t, n) {
|
|
670
|
+
let r = v(et(Xe(e.path), n), {
|
|
671
|
+
record: e,
|
|
672
|
+
parent: t,
|
|
673
|
+
children: [],
|
|
674
|
+
alias: []
|
|
675
|
+
});
|
|
676
|
+
return t && !r.record.aliasOf == !t.record.aliasOf && t.children.push(r), r;
|
|
677
|
+
}
|
|
678
|
+
function $(e, t) {
|
|
679
|
+
let n = [], r = /* @__PURE__ */ new Map();
|
|
680
|
+
t = te(it, t);
|
|
681
|
+
function i(e) {
|
|
682
|
+
return r.get(e);
|
|
683
|
+
}
|
|
684
|
+
function a(e, n, r) {
|
|
685
|
+
let i = !r, s = st(e);
|
|
686
|
+
s.aliasOf = r && r.record;
|
|
687
|
+
let l = te(t, e), u = [s];
|
|
688
|
+
if ("alias" in e) {
|
|
689
|
+
let t = typeof e.alias == "string" ? [e.alias] : e.alias;
|
|
690
|
+
for (let e of t) u.push(st(v({}, s, {
|
|
691
|
+
components: r ? r.record.components : s.components,
|
|
692
|
+
path: e,
|
|
693
|
+
aliasOf: r ? r.record : s
|
|
694
|
+
})));
|
|
695
|
+
}
|
|
696
|
+
let d, f;
|
|
697
|
+
for (let t of u) {
|
|
698
|
+
let { path: u } = t;
|
|
699
|
+
if (n && !g(u)) {
|
|
700
|
+
let e = n.record.path, r = e[e.length - 1] === "/" ? "" : "/";
|
|
701
|
+
t.path = n.record.path + (u && r + u);
|
|
702
|
+
}
|
|
703
|
+
if (d = at(t, n, l), r ? r.alias.push(d) : (f ||= d, f !== d && f.alias.push(d), i && e.name && !lt(d) && o(e.name)), pt(d) && c(d), s.children) {
|
|
704
|
+
let e = s.children;
|
|
705
|
+
for (let t = 0; t < e.length; t++) a(e[t], d, r && r.children[t]);
|
|
706
|
+
}
|
|
707
|
+
r ||= d;
|
|
708
|
+
}
|
|
709
|
+
return f ? () => {
|
|
710
|
+
o(f);
|
|
711
|
+
} : b;
|
|
712
|
+
}
|
|
713
|
+
function o(e) {
|
|
714
|
+
if (ke(e)) {
|
|
715
|
+
let t = r.get(e);
|
|
716
|
+
t && (r.delete(e), n.splice(n.indexOf(t), 1), t.children.forEach(o), t.alias.forEach(o));
|
|
717
|
+
} else {
|
|
718
|
+
let t = n.indexOf(e);
|
|
719
|
+
t > -1 && (n.splice(t, 1), e.record.name && r.delete(e.record.name), e.children.forEach(o), e.alias.forEach(o));
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
function s() {
|
|
723
|
+
return n;
|
|
724
|
+
}
|
|
725
|
+
function c(e) {
|
|
726
|
+
let t = dt(e, n);
|
|
727
|
+
n.splice(t, 0, e), e.record.name && !lt(e) && r.set(e.record.name, e);
|
|
728
|
+
}
|
|
729
|
+
function l(e, t) {
|
|
730
|
+
let i, a = {}, o, s;
|
|
731
|
+
if ("name" in e && e.name) {
|
|
732
|
+
if (i = r.get(e.name), !i) throw S(1, { location: e });
|
|
733
|
+
s = i.record.name, a = v(ot(t.params, i.keys.filter((e) => !e.optional).concat(i.parent ? i.parent.keys.filter((e) => e.optional) : []).map((e) => e.name)), e.params && ot(e.params, i.keys.map((e) => e.name))), o = i.stringify(a);
|
|
734
|
+
} else if (e.path != null) o = e.path, i = n.find((e) => e.re.test(o)), i && (a = i.parse(o), s = i.record.name, i.keys.forEach((e) => {
|
|
735
|
+
e.optional && !a[e.name] && delete a[e.name];
|
|
736
|
+
}));
|
|
737
|
+
else {
|
|
738
|
+
if (i = t.name ? r.get(t.name) : n.find((e) => e.re.test(t.path)), !i) throw S(1, {
|
|
739
|
+
location: e,
|
|
740
|
+
currentLocation: t
|
|
741
|
+
});
|
|
742
|
+
s = i.record.name, a = v({}, t.params, e.params), o = i.stringify(a);
|
|
743
|
+
}
|
|
744
|
+
let c = [], l = i;
|
|
745
|
+
for (; l;) c.unshift(l.record), l = l.parent;
|
|
746
|
+
return {
|
|
747
|
+
name: s,
|
|
748
|
+
path: o,
|
|
749
|
+
params: a,
|
|
750
|
+
matched: c,
|
|
751
|
+
meta: ut(c)
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
e.forEach((e) => a(e));
|
|
755
|
+
function u() {
|
|
756
|
+
n.length = 0, r.clear();
|
|
757
|
+
}
|
|
758
|
+
return {
|
|
759
|
+
addRoute: a,
|
|
760
|
+
resolve: l,
|
|
761
|
+
removeRoute: o,
|
|
762
|
+
clearRoutes: u,
|
|
763
|
+
getRoutes: s,
|
|
764
|
+
getRecordMatcher: i
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
function ot(e, t) {
|
|
768
|
+
let n = {};
|
|
769
|
+
for (let r of t) r in e && (n[r] = e[r]);
|
|
770
|
+
return n;
|
|
771
|
+
}
|
|
772
|
+
function st(e) {
|
|
773
|
+
let t = {
|
|
774
|
+
path: e.path,
|
|
775
|
+
redirect: e.redirect,
|
|
776
|
+
name: e.name,
|
|
777
|
+
meta: e.meta || {},
|
|
778
|
+
aliasOf: e.aliasOf,
|
|
779
|
+
beforeEnter: e.beforeEnter,
|
|
780
|
+
props: ct(e),
|
|
781
|
+
children: e.children || [],
|
|
782
|
+
instances: {},
|
|
783
|
+
leaveGuards: /* @__PURE__ */ new Set(),
|
|
784
|
+
updateGuards: /* @__PURE__ */ new Set(),
|
|
785
|
+
enterCallbacks: {},
|
|
786
|
+
components: "components" in e ? e.components || null : e.component && { default: e.component }
|
|
787
|
+
};
|
|
788
|
+
return Object.defineProperty(t, "mods", { value: {} }), t;
|
|
789
|
+
}
|
|
790
|
+
function ct(e) {
|
|
791
|
+
let t = {}, n = e.props || !1;
|
|
792
|
+
if ("component" in e) t.default = n;
|
|
793
|
+
else for (let r in e.components) t[r] = typeof n == "object" ? n[r] : n;
|
|
794
|
+
return t;
|
|
795
|
+
}
|
|
796
|
+
function lt(e) {
|
|
797
|
+
for (; e;) {
|
|
798
|
+
if (e.record.aliasOf) return !0;
|
|
799
|
+
e = e.parent;
|
|
800
|
+
}
|
|
801
|
+
return !1;
|
|
802
|
+
}
|
|
803
|
+
function ut(e) {
|
|
804
|
+
return e.reduce((e, t) => v(e, t.meta), {});
|
|
805
|
+
}
|
|
806
|
+
function dt(e, t) {
|
|
807
|
+
let n = 0, r = t.length;
|
|
808
|
+
for (; n !== r;) {
|
|
809
|
+
let i = n + r >> 1;
|
|
810
|
+
nt(e, t[i]) < 0 ? r = i : n = i + 1;
|
|
811
|
+
}
|
|
812
|
+
let i = ft(e);
|
|
813
|
+
return i && (r = t.lastIndexOf(i, r - 1)), r;
|
|
814
|
+
}
|
|
815
|
+
function ft(e) {
|
|
816
|
+
let t = e;
|
|
817
|
+
for (; t = t.parent;) if (pt(t) && nt(e, t) === 0) return t;
|
|
818
|
+
}
|
|
819
|
+
function pt({ record: e }) {
|
|
820
|
+
return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
|
|
821
|
+
}
|
|
822
|
+
function mt(e) {
|
|
823
|
+
let t = n(E), r = n(D), i = c(() => {
|
|
824
|
+
let n = s(e.to);
|
|
825
|
+
return t.resolve(n);
|
|
826
|
+
}), a = c(() => {
|
|
827
|
+
let { matched: e } = i.value, { length: t } = e, n = e[t - 1], a = r.matched;
|
|
828
|
+
if (!n || !a.length) return -1;
|
|
829
|
+
let o = a.findIndex(J.bind(null, n));
|
|
830
|
+
if (o > -1) return o;
|
|
831
|
+
let s = yt(e[t - 2]);
|
|
832
|
+
return t > 1 && yt(n) === s && a[a.length - 1].path !== s ? a.findIndex(J.bind(null, e[t - 2])) : o;
|
|
833
|
+
}), o = c(() => a.value > -1 && vt(r.params, i.value.params)), l = c(() => a.value > -1 && a.value === r.matched.length - 1 && Y(r.params, i.value.params));
|
|
834
|
+
function u(n = {}) {
|
|
835
|
+
if (_t(n)) {
|
|
836
|
+
let n = t[s(e.replace) ? "replace" : "push"](s(e.to)).catch(b);
|
|
837
|
+
return e.viewTransition && typeof document < "u" && "startViewTransition" in document && document.startViewTransition(() => n), n;
|
|
838
|
+
}
|
|
839
|
+
return Promise.resolve();
|
|
840
|
+
}
|
|
841
|
+
return {
|
|
842
|
+
route: i,
|
|
843
|
+
href: c(() => i.value.href),
|
|
844
|
+
isActive: o,
|
|
845
|
+
isExactActive: l,
|
|
846
|
+
navigate: u
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
function ht(e) {
|
|
850
|
+
return e.length === 1 ? e[0] : e;
|
|
851
|
+
}
|
|
852
|
+
var gt = /* @__PURE__ */ a({
|
|
853
|
+
name: "RouterLink",
|
|
854
|
+
compatConfig: { MODE: 3 },
|
|
855
|
+
props: {
|
|
856
|
+
to: {
|
|
857
|
+
type: [String, Object],
|
|
858
|
+
required: !0
|
|
859
|
+
},
|
|
860
|
+
replace: Boolean,
|
|
861
|
+
activeClass: String,
|
|
862
|
+
exactActiveClass: String,
|
|
863
|
+
custom: Boolean,
|
|
864
|
+
ariaCurrentValue: {
|
|
865
|
+
type: String,
|
|
866
|
+
default: "page"
|
|
867
|
+
},
|
|
868
|
+
viewTransition: Boolean
|
|
869
|
+
},
|
|
870
|
+
useLink: mt,
|
|
871
|
+
setup(e, { slots: t }) {
|
|
872
|
+
let r = f(mt(e)), { options: i } = n(E), a = c(() => ({
|
|
873
|
+
[bt(e.activeClass, i.linkActiveClass, "router-link-active")]: r.isActive,
|
|
874
|
+
[bt(e.exactActiveClass, i.linkExactActiveClass, "router-link-exact-active")]: r.isExactActive
|
|
875
|
+
}));
|
|
876
|
+
return () => {
|
|
877
|
+
let n = t.default && ht(t.default(r));
|
|
878
|
+
return e.custom ? n : m("a", {
|
|
879
|
+
"aria-current": r.isExactActive ? e.ariaCurrentValue : null,
|
|
880
|
+
href: r.href,
|
|
881
|
+
onClick: r.navigate,
|
|
882
|
+
class: a.value
|
|
883
|
+
}, n);
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
function _t(e) {
|
|
888
|
+
if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && (e.button === void 0 || e.button === 0)) {
|
|
889
|
+
if (e.currentTarget && e.currentTarget.getAttribute) {
|
|
890
|
+
let t = e.currentTarget.getAttribute("target");
|
|
891
|
+
if (/\b_blank\b/i.test(t)) return;
|
|
892
|
+
}
|
|
893
|
+
return e.preventDefault && e.preventDefault(), !0;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
function vt(e, t) {
|
|
897
|
+
for (let n in t) {
|
|
898
|
+
let r = t[n], i = e[n];
|
|
899
|
+
if (x(r)) {
|
|
900
|
+
if (!x(i) || i.length !== r.length || r.some((e, t) => e.valueOf() !== i[t].valueOf())) return !1;
|
|
901
|
+
} else if (r !== i) return !1;
|
|
902
|
+
}
|
|
903
|
+
return !0;
|
|
904
|
+
}
|
|
905
|
+
function yt(e) {
|
|
906
|
+
return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
|
|
907
|
+
}
|
|
908
|
+
var bt = (e, t, n) => e ?? t ?? n, xt = /*#__PURE__*/ a({
|
|
909
|
+
name: "RouterView",
|
|
910
|
+
inheritAttrs: !1,
|
|
911
|
+
props: {
|
|
912
|
+
name: {
|
|
913
|
+
type: String,
|
|
914
|
+
default: "default"
|
|
915
|
+
},
|
|
916
|
+
route: Object
|
|
917
|
+
},
|
|
918
|
+
compatConfig: { MODE: 3 },
|
|
919
|
+
setup(e, { attrs: t, slots: r }) {
|
|
920
|
+
let i = n(O), a = c(() => e.route || i.value), l = n(T, 0), u = c(() => {
|
|
921
|
+
let e = s(l), { matched: t } = a.value, n;
|
|
922
|
+
for (; (n = t[e]) && !n.components;) e++;
|
|
923
|
+
return e;
|
|
924
|
+
}), f = c(() => a.value.matched[u.value]);
|
|
925
|
+
h(T, c(() => u.value + 1)), h(w, f), h(O, a);
|
|
926
|
+
let p = o();
|
|
927
|
+
return d(() => [
|
|
928
|
+
p.value,
|
|
929
|
+
f.value,
|
|
930
|
+
e.name
|
|
931
|
+
], ([e, t, n], [r, i, a]) => {
|
|
932
|
+
t && (t.instances[n] = e, i && i !== t && e && e === r && (t.leaveGuards.size || (t.leaveGuards = i.leaveGuards), t.updateGuards.size || (t.updateGuards = i.updateGuards))), e && t && (!i || !J(t, i) || !r) && (t.enterCallbacks[n] || []).forEach((t) => t(e));
|
|
933
|
+
}, { flush: "post" }), () => {
|
|
934
|
+
let n = a.value, i = e.name, o = f.value, s = o && o.components[i];
|
|
935
|
+
if (!s) return St(r.default, {
|
|
936
|
+
Component: s,
|
|
937
|
+
route: n
|
|
938
|
+
});
|
|
939
|
+
let c = o.props[i], l = c ? c === !0 ? n.params : typeof c == "function" ? c(n) : c : null, u = m(s, v({}, l, t, {
|
|
940
|
+
onVnodeUnmounted: (e) => {
|
|
941
|
+
e.component.isUnmounted && (o.instances[i] = null);
|
|
942
|
+
},
|
|
943
|
+
ref: p
|
|
944
|
+
}));
|
|
945
|
+
return St(r.default, {
|
|
946
|
+
Component: u,
|
|
947
|
+
route: n
|
|
948
|
+
}) || u;
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
function St(e, t) {
|
|
953
|
+
if (!e) return null;
|
|
954
|
+
let n = e(t);
|
|
955
|
+
return n.length === 1 ? n[0] : n;
|
|
956
|
+
}
|
|
957
|
+
var Ct = xt;
|
|
958
|
+
function wt(e) {
|
|
959
|
+
let t = $(e.routes, e), n = e.parseQuery || Ae, r = e.stringifyQuery || je, i = e.history, a = Z(), o = Z(), c = Z(), d = p(X), f = p(0), m = X;
|
|
960
|
+
j && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
|
|
961
|
+
let h = y.bind(null, (e) => "" + e), g = y.bind(null, fe), _ = y.bind(null, U);
|
|
962
|
+
function ee(e, n) {
|
|
963
|
+
let r, i;
|
|
964
|
+
ke(e) ? (r = t.getRecordMatcher(e), i = n) : i = e;
|
|
965
|
+
let a = t.addRoute(i, r);
|
|
966
|
+
return f.value++, () => {
|
|
967
|
+
a(), f.value++;
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
function te(e) {
|
|
971
|
+
let n = t.getRecordMatcher(e);
|
|
972
|
+
n && (t.removeRoute(n), f.value++);
|
|
973
|
+
}
|
|
974
|
+
function ne() {
|
|
975
|
+
t.clearRoutes(), f.value++;
|
|
976
|
+
}
|
|
977
|
+
function re() {
|
|
978
|
+
return t.getRoutes().map((e) => e.record);
|
|
979
|
+
}
|
|
980
|
+
function w(e) {
|
|
981
|
+
return !!t.getRecordMatcher(e);
|
|
982
|
+
}
|
|
983
|
+
function T(e, a) {
|
|
984
|
+
if (f.value, typeof e == "string") {
|
|
985
|
+
a ||= e.startsWith("/") ? X : d.value;
|
|
986
|
+
let r = K(n, e, a.path), o = t.resolve({ path: r.path }, a), s = i.createHref(r.fullPath);
|
|
987
|
+
return v(r, o, {
|
|
988
|
+
params: _(o.params),
|
|
989
|
+
redirectedFrom: void 0,
|
|
990
|
+
href: s
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
a = v({}, a || (e.path != null && e.path.startsWith("/") && !("name" in e && e.name) ? X : d.value));
|
|
994
|
+
let o;
|
|
995
|
+
if (e.path != null) o = v({}, e, { path: K(n, e.path, a.path).path });
|
|
996
|
+
else {
|
|
997
|
+
let t = v({}, e.params);
|
|
998
|
+
for (let e in t) t[e] ?? delete t[e];
|
|
999
|
+
o = v({}, e, { params: g(t) }), a.params = g(a.params);
|
|
1000
|
+
}
|
|
1001
|
+
let s = t.resolve(o, a), c = e.hash || "";
|
|
1002
|
+
s.params = h(_(s.params));
|
|
1003
|
+
let l = pe(r, v({}, e, {
|
|
1004
|
+
hash: ue(c),
|
|
1005
|
+
path: s.path
|
|
1006
|
+
})), u = i.createHref(l);
|
|
1007
|
+
return v({
|
|
1008
|
+
fullPath: l,
|
|
1009
|
+
hash: c,
|
|
1010
|
+
query: r === je ? Me(e.query) : e.query || {}
|
|
1011
|
+
}, s, {
|
|
1012
|
+
redirectedFrom: void 0,
|
|
1013
|
+
href: u
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
function k(e) {
|
|
1017
|
+
return typeof e == "string" ? K(n, e, d.value.path) : v({}, e);
|
|
1018
|
+
}
|
|
1019
|
+
function A(e, t) {
|
|
1020
|
+
if (m !== e) return S(8, {
|
|
1021
|
+
from: t,
|
|
1022
|
+
to: e
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
function M(e) {
|
|
1026
|
+
return N(e);
|
|
1027
|
+
}
|
|
1028
|
+
function ie(e) {
|
|
1029
|
+
return M(v(k(e), { replace: !0 }));
|
|
1030
|
+
}
|
|
1031
|
+
function ae(e, t) {
|
|
1032
|
+
let n = e.matched[e.matched.length - 1];
|
|
1033
|
+
if (n && n.redirect) {
|
|
1034
|
+
let { redirect: r } = n, i = typeof r == "function" ? r(e, t) : r;
|
|
1035
|
+
return typeof i == "string" && (i = i.includes("?") || i.includes("#") ? i = k(i) : { path: i }, i.params = {}), v({
|
|
1036
|
+
query: e.query,
|
|
1037
|
+
hash: e.hash,
|
|
1038
|
+
params: i.path == null ? e.params : {}
|
|
1039
|
+
}, i);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
function N(e, t) {
|
|
1043
|
+
let n = m = T(e), i = d.value, a = e.state, o = e.force, s = e.replace === !0, c = ae(n, i);
|
|
1044
|
+
if (c) return N(v(k(c), {
|
|
1045
|
+
state: typeof c == "object" ? v({}, a, c.state) : a,
|
|
1046
|
+
force: o,
|
|
1047
|
+
replace: s
|
|
1048
|
+
}), t || n);
|
|
1049
|
+
let l = n;
|
|
1050
|
+
l.redirectedFrom = t;
|
|
1051
|
+
let u;
|
|
1052
|
+
return !o && me(r, i, n) && (u = S(16, {
|
|
1053
|
+
to: l,
|
|
1054
|
+
from: i
|
|
1055
|
+
}), de(i, i, !0, !1)), (u ? Promise.resolve(u) : se(l, i)).catch((e) => C(e) ? C(e, 2) ? e : H(e) : B(e, l, i)).then((e) => {
|
|
1056
|
+
if (e) {
|
|
1057
|
+
if (C(e, 2)) return N(v({ replace: s }, k(e.to), {
|
|
1058
|
+
state: typeof e.to == "object" ? v({}, a, e.to.state) : a,
|
|
1059
|
+
force: o
|
|
1060
|
+
}), t || l);
|
|
1061
|
+
} else e = F(l, i, !0, s, a);
|
|
1062
|
+
return ce(l, i, e), e;
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
function oe(e, t) {
|
|
1066
|
+
let n = A(e, t);
|
|
1067
|
+
return n ? Promise.reject(n) : Promise.resolve();
|
|
1068
|
+
}
|
|
1069
|
+
function P(e) {
|
|
1070
|
+
let t = q.values().next().value;
|
|
1071
|
+
return t && typeof t.runWithContext == "function" ? t.runWithContext(e) : e();
|
|
1072
|
+
}
|
|
1073
|
+
function se(e, t) {
|
|
1074
|
+
let n, [r, i, s] = Re(e, t);
|
|
1075
|
+
n = Ie(r.reverse(), "beforeRouteLeave", e, t);
|
|
1076
|
+
for (let i of r) i.leaveGuards.forEach((r) => {
|
|
1077
|
+
n.push(Q(r, e, t));
|
|
1078
|
+
});
|
|
1079
|
+
let c = oe.bind(null, e, t);
|
|
1080
|
+
return n.push(c), Y(n).then(() => {
|
|
1081
|
+
n = [];
|
|
1082
|
+
for (let r of a.list()) n.push(Q(r, e, t));
|
|
1083
|
+
return n.push(c), Y(n);
|
|
1084
|
+
}).then(() => {
|
|
1085
|
+
n = Ie(i, "beforeRouteUpdate", e, t);
|
|
1086
|
+
for (let r of i) r.updateGuards.forEach((r) => {
|
|
1087
|
+
n.push(Q(r, e, t));
|
|
1088
|
+
});
|
|
1089
|
+
return n.push(c), Y(n);
|
|
1090
|
+
}).then(() => {
|
|
1091
|
+
n = [];
|
|
1092
|
+
for (let r of s) if (r.beforeEnter) {
|
|
1093
|
+
if (x(r.beforeEnter)) for (let i of r.beforeEnter) n.push(Q(i, e, t));
|
|
1094
|
+
else n.push(Q(r.beforeEnter, e, t));
|
|
1095
|
+
}
|
|
1096
|
+
return n.push(c), Y(n);
|
|
1097
|
+
}).then(() => (e.matched.forEach((e) => e.enterCallbacks = {}), n = Ie(s, "beforeRouteEnter", e, t, P), n.push(c), Y(n))).then(() => {
|
|
1098
|
+
n = [];
|
|
1099
|
+
for (let r of o.list()) n.push(Q(r, e, t));
|
|
1100
|
+
return n.push(c), Y(n);
|
|
1101
|
+
}).catch((e) => C(e, 8) ? e : Promise.reject(e));
|
|
1102
|
+
}
|
|
1103
|
+
function ce(e, t, n) {
|
|
1104
|
+
c.list().forEach((r) => P(() => r(e, t, n)));
|
|
1105
|
+
}
|
|
1106
|
+
function F(e, t, n, r, a) {
|
|
1107
|
+
let o = A(e, t);
|
|
1108
|
+
if (o) return o;
|
|
1109
|
+
let s = t === X, c = j ? history.state : {};
|
|
1110
|
+
n && (r || s ? i.replace(e.fullPath, v({ scroll: s && c && c.scroll }, a)) : i.push(e.fullPath, a)), d.value = e, de(e, t, n, s), H();
|
|
1111
|
+
}
|
|
1112
|
+
let I;
|
|
1113
|
+
function le() {
|
|
1114
|
+
I ||= i.listen((e, t, n) => {
|
|
1115
|
+
if (!J.listening) return;
|
|
1116
|
+
let r = T(e), a = ae(r, J.currentRoute.value);
|
|
1117
|
+
if (a) {
|
|
1118
|
+
N(v(a, {
|
|
1119
|
+
replace: !0,
|
|
1120
|
+
force: !0
|
|
1121
|
+
}), r).catch(b);
|
|
1122
|
+
return;
|
|
1123
|
+
}
|
|
1124
|
+
m = r;
|
|
1125
|
+
let o = d.value;
|
|
1126
|
+
j && n.delta && Ee(we(o.fullPath, n.delta)), se(r, o).catch((e) => C(e, 12) ? e : C(e, 2) ? (N(v(k(e.to), { force: !0 }), r).then((e) => {
|
|
1127
|
+
C(e, 20) && !n.delta && n.type === "pop" && i.go(-1, !1);
|
|
1128
|
+
}).catch(b), Promise.reject()) : (n.delta && i.go(-n.delta, !1), B(e, r, o))).then((e) => {
|
|
1129
|
+
e ||= F(r, o, !1), e && (n.delta && !C(e, 8) ? i.go(-n.delta, !1) : n.type === "pop" && C(e, 20) && i.go(-1, !1)), ce(r, o, e);
|
|
1130
|
+
}).catch(b);
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
let L = Z(), R = Z(), z;
|
|
1134
|
+
function B(e, t, n) {
|
|
1135
|
+
H(e);
|
|
1136
|
+
let r = R.list();
|
|
1137
|
+
return r.length ? r.forEach((r) => r(e, t, n)) : console.error(e), Promise.reject(e);
|
|
1138
|
+
}
|
|
1139
|
+
function V() {
|
|
1140
|
+
return z && d.value !== X ? Promise.resolve() : new Promise((e, t) => {
|
|
1141
|
+
L.add([e, t]);
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
function H(e) {
|
|
1145
|
+
return z || (z = !e, le(), L.list().forEach(([t, n]) => e ? n(e) : t()), L.reset()), e;
|
|
1146
|
+
}
|
|
1147
|
+
function de(t, n, r, i) {
|
|
1148
|
+
let { scrollBehavior: a } = e;
|
|
1149
|
+
if (!j || !a) return Promise.resolve();
|
|
1150
|
+
let o = !r && De(we(t.fullPath, 0)) || (i || !r) && history.state && history.state.scroll || null;
|
|
1151
|
+
return l().then(() => a(t, n, o)).then((e) => t === d.value && e && Ce(e)).catch((e) => t === d.value && B(e, t, n));
|
|
1152
|
+
}
|
|
1153
|
+
let W = (e) => i.go(e), G, q = /* @__PURE__ */ new Set(), J = {
|
|
1154
|
+
currentRoute: d,
|
|
1155
|
+
listening: !0,
|
|
1156
|
+
addRoute: ee,
|
|
1157
|
+
removeRoute: te,
|
|
1158
|
+
clearRoutes: ne,
|
|
1159
|
+
hasRoute: w,
|
|
1160
|
+
getRoutes: re,
|
|
1161
|
+
resolve: T,
|
|
1162
|
+
options: e,
|
|
1163
|
+
push: M,
|
|
1164
|
+
replace: ie,
|
|
1165
|
+
go: W,
|
|
1166
|
+
back: () => W(-1),
|
|
1167
|
+
forward: () => W(1),
|
|
1168
|
+
beforeEach: a.add,
|
|
1169
|
+
beforeResolve: o.add,
|
|
1170
|
+
afterEach: c.add,
|
|
1171
|
+
onError: R.add,
|
|
1172
|
+
isReady: V,
|
|
1173
|
+
install(e) {
|
|
1174
|
+
e.component("RouterLink", gt), e.component("RouterView", Ct), e.config.globalProperties.$router = J, Object.defineProperty(e.config.globalProperties, "$route", {
|
|
1175
|
+
enumerable: !0,
|
|
1176
|
+
get: () => s(d)
|
|
1177
|
+
}), j && !G && d.value === X && (G = !0, M(i.location).catch((e) => {}));
|
|
1178
|
+
let t = {};
|
|
1179
|
+
for (let e in X) Object.defineProperty(t, e, {
|
|
1180
|
+
get: () => d.value[e],
|
|
1181
|
+
enumerable: !0
|
|
1182
|
+
});
|
|
1183
|
+
e.provide(E, J), e.provide(D, u(t)), e.provide(O, d);
|
|
1184
|
+
let n = e.unmount;
|
|
1185
|
+
q.add(e), e.unmount = function() {
|
|
1186
|
+
q.delete(e), q.size < 1 && (m = X, I && I(), I = null, d.value = X, G = !1, z = !1), n();
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
};
|
|
1190
|
+
function Y(e) {
|
|
1191
|
+
return e.reduce((e, t) => e.then(() => P(t)), Promise.resolve());
|
|
1192
|
+
}
|
|
1193
|
+
return J;
|
|
1194
|
+
}
|
|
1195
|
+
//#endregion
|
|
1196
|
+
export { Ge as a, k as c, $ as i, Ct as n, ze as o, wt as r, A as s, gt as t };
|