@stonecrop/stonecrop 0.3.11 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composable.js +1 -1
- package/dist/plugins/index.js +6 -3
- package/dist/registry.js +7 -7
- package/dist/src/plugins/index.d.ts.map +1 -1
- package/dist/src/registry.d.ts +6 -6
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/stonecrop.d.ts +6 -6
- package/dist/stonecrop.js +1023 -2822
- package/dist/stonecrop.js.map +1 -1
- package/dist/stonecrop.tsbuildinfo +1 -1
- package/dist/stonecrop.umd.cjs +7 -37
- package/dist/stonecrop.umd.cjs.map +1 -1
- package/package.json +4 -4
- package/src/composable.ts +1 -1
- package/src/plugins/index.ts +7 -3
- package/src/registry.ts +10 -9
- package/dist/router.js +0 -6
- package/dist/src/router.d.ts +0 -3
- package/dist/src/router.d.ts.map +0 -1
- package/src/router.ts +0 -8
package/dist/stonecrop.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { effectScope as
|
|
5
|
-
function
|
|
1
|
+
var Ct = Object.defineProperty;
|
|
2
|
+
var Lt = (e, t, r) => t in e ? Ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var y = (e, t, r) => Lt(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { effectScope as qe, ref as R, markRaw as A, toRaw as Y, watch as we, unref as At, hasInjectionContext as jt, inject as Xe, getCurrentInstance as Rt, reactive as Vt, isRef as q, isReactive as Ee, toRef as ue, nextTick as Ce, computed as Ke, getCurrentScope as Bt, onScopeDispose as xt, toRefs as Le, onBeforeMount as Ut } from "vue";
|
|
5
|
+
function ge(e) {
|
|
6
6
|
this.message = e || "";
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
constructor: { value:
|
|
8
|
+
ge.prototype = Object.create(Error.prototype, {
|
|
9
|
+
constructor: { value: ge },
|
|
10
10
|
name: { value: "NotImplemented" },
|
|
11
11
|
stack: {
|
|
12
12
|
get: function() {
|
|
@@ -14,7 +14,7 @@ ut.prototype = Object.create(Error.prototype, {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const J = class J {
|
|
18
18
|
/**
|
|
19
19
|
* @param registry - The immutable registry
|
|
20
20
|
* @param store - The mutable Pinia store
|
|
@@ -29,14 +29,14 @@ const be = class be {
|
|
|
29
29
|
* const stonecrop = new Stonecrop(registry, store)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
constructor(t,
|
|
32
|
+
constructor(t, r, n, o, s) {
|
|
33
33
|
/**
|
|
34
34
|
* The name of the Stonecrop instance
|
|
35
35
|
* @readonly
|
|
36
36
|
*
|
|
37
37
|
* @defaultValue 'Stonecrop'
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
y(this, "name", "Stonecrop");
|
|
40
40
|
/**
|
|
41
41
|
* The registry is an immutable collection of doctypes
|
|
42
42
|
* @example
|
|
@@ -56,11 +56,11 @@ const be = class be {
|
|
|
56
56
|
* @see {@link Registry}
|
|
57
57
|
* @see {@link DoctypeMeta}
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
y(this, "registry");
|
|
60
60
|
/**
|
|
61
61
|
* The Pinia store that manages the mutable records
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
y(this, "store");
|
|
64
64
|
/**
|
|
65
65
|
* schema - The Stonecrop schema; the schema is a subset of the registry
|
|
66
66
|
* @example
|
|
@@ -78,18 +78,18 @@ const be = class be {
|
|
|
78
78
|
* @see {@link DoctypeMeta}
|
|
79
79
|
* @see {@link DoctypeMeta.schema}
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
y(this, "schema");
|
|
82
82
|
/**
|
|
83
83
|
* The workflow is a subset of the registry
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
y(this, "workflow");
|
|
86
86
|
/**
|
|
87
87
|
* The actions are a subset of the registry
|
|
88
88
|
*/
|
|
89
|
-
|
|
90
|
-
if (
|
|
91
|
-
return
|
|
92
|
-
|
|
89
|
+
y(this, "actions");
|
|
90
|
+
if (J._root)
|
|
91
|
+
return J._root;
|
|
92
|
+
J._root = this, this.registry = t, this.store = r, this.schema = n, this.workflow = o, this.actions = s;
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* Sets up the Stonecrop instance with the given doctype
|
|
@@ -116,7 +116,7 @@ const be = class be {
|
|
|
116
116
|
* @see {@link DoctypeMeta}
|
|
117
117
|
*/
|
|
118
118
|
getMeta(t) {
|
|
119
|
-
return this.registry.getMeta ? this.registry.getMeta(t.doctype) : new
|
|
119
|
+
return this.registry.getMeta ? this.registry.getMeta(t.doctype) : new ge(t.doctype);
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* Gets the workflow for the given doctype
|
|
@@ -128,8 +128,8 @@ const be = class be {
|
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
130
|
getWorkflow(t) {
|
|
131
|
-
const
|
|
132
|
-
this.workflow =
|
|
131
|
+
const r = this.registry.registry[t.slug];
|
|
132
|
+
this.workflow = r.workflow;
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
* Gets the actions for the given doctype
|
|
@@ -141,8 +141,8 @@ const be = class be {
|
|
|
141
141
|
* ```
|
|
142
142
|
*/
|
|
143
143
|
getActions(t) {
|
|
144
|
-
const
|
|
145
|
-
this.actions =
|
|
144
|
+
const r = this.registry.registry[t.slug];
|
|
145
|
+
this.actions = r.actions;
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
148
|
* Gets the records for the given doctype
|
|
@@ -160,9 +160,9 @@ const be = class be {
|
|
|
160
160
|
* await stonecrop.getRecords(doctype, { body: filters })
|
|
161
161
|
* ```
|
|
162
162
|
*/
|
|
163
|
-
async getRecords(t,
|
|
163
|
+
async getRecords(t, r) {
|
|
164
164
|
this.store.$patch({ records: [] });
|
|
165
|
-
const o = await (await fetch(`/${t.slug}`,
|
|
165
|
+
const o = await (await fetch(`/${t.slug}`, r)).json();
|
|
166
166
|
this.store.$patch({ records: o });
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
@@ -175,9 +175,9 @@ const be = class be {
|
|
|
175
175
|
* await stonecrop.getRecord(doctype, 'TASK-00001')
|
|
176
176
|
* ```
|
|
177
177
|
*/
|
|
178
|
-
async getRecord(t,
|
|
178
|
+
async getRecord(t, r) {
|
|
179
179
|
this.store.$patch({ record: {} });
|
|
180
|
-
const o = await (await fetch(`/${t.slug}/${
|
|
180
|
+
const o = await (await fetch(`/${t.slug}/${r}`)).json();
|
|
181
181
|
this.store.$patch({ record: o });
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
@@ -206,13 +206,13 @@ const be = class be {
|
|
|
206
206
|
* stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])
|
|
207
207
|
* ```
|
|
208
208
|
*/
|
|
209
|
-
runAction(t,
|
|
210
|
-
var
|
|
211
|
-
const s = (
|
|
209
|
+
runAction(t, r, n) {
|
|
210
|
+
var a;
|
|
211
|
+
const s = (a = this.registry.registry[t.slug].actions) == null ? void 0 : a.get(r);
|
|
212
212
|
if (this.workflow) {
|
|
213
|
-
const { initialState:
|
|
214
|
-
this.workflow.transition(
|
|
215
|
-
new Function(
|
|
213
|
+
const { initialState: i } = this.workflow;
|
|
214
|
+
this.workflow.transition(i, { type: r }), s && s.length > 0 && s.forEach((u) => {
|
|
215
|
+
new Function(u)(n);
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
}
|
|
@@ -220,107 +220,107 @@ const be = class be {
|
|
|
220
220
|
/**
|
|
221
221
|
* The root Stonecrop instance
|
|
222
222
|
*/
|
|
223
|
-
|
|
224
|
-
let
|
|
225
|
-
var
|
|
226
|
-
function
|
|
227
|
-
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1,
|
|
223
|
+
y(J, "_root");
|
|
224
|
+
let me = J;
|
|
225
|
+
var Ze = !1;
|
|
226
|
+
function Z(e, t, r) {
|
|
227
|
+
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, r), r) : (e[t] = r, r);
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function le(e, t) {
|
|
230
230
|
if (Array.isArray(e)) {
|
|
231
231
|
e.splice(t, 1);
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
234
|
delete e[t];
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
return
|
|
236
|
+
function Ft() {
|
|
237
|
+
return et().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function et() {
|
|
240
240
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
241
241
|
}
|
|
242
|
-
const
|
|
243
|
-
let
|
|
244
|
-
function
|
|
242
|
+
const Ht = typeof Proxy == "function", Jt = "devtools-plugin:setup", Gt = "plugin:settings:set";
|
|
243
|
+
let x, ve;
|
|
244
|
+
function Wt() {
|
|
245
245
|
var e;
|
|
246
|
-
return
|
|
246
|
+
return x !== void 0 || (typeof window < "u" && window.performance ? (x = !0, ve = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (x = !0, ve = globalThis.perf_hooks.performance) : x = !1), x;
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
return
|
|
248
|
+
function zt() {
|
|
249
|
+
return Wt() ? ve.now() : Date.now();
|
|
250
250
|
}
|
|
251
|
-
class
|
|
252
|
-
constructor(t,
|
|
253
|
-
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook =
|
|
254
|
-
const
|
|
251
|
+
class Qt {
|
|
252
|
+
constructor(t, r) {
|
|
253
|
+
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = r;
|
|
254
|
+
const n = {};
|
|
255
255
|
if (t.settings)
|
|
256
|
-
for (const
|
|
257
|
-
const
|
|
258
|
-
|
|
256
|
+
for (const a in t.settings) {
|
|
257
|
+
const i = t.settings[a];
|
|
258
|
+
n[a] = i.defaultValue;
|
|
259
259
|
}
|
|
260
260
|
const o = `__vue-devtools-plugin-settings__${t.id}`;
|
|
261
|
-
let s = Object.assign({},
|
|
261
|
+
let s = Object.assign({}, n);
|
|
262
262
|
try {
|
|
263
|
-
const
|
|
264
|
-
Object.assign(s,
|
|
263
|
+
const a = localStorage.getItem(o), i = JSON.parse(a);
|
|
264
|
+
Object.assign(s, i);
|
|
265
265
|
} catch {
|
|
266
266
|
}
|
|
267
267
|
this.fallbacks = {
|
|
268
268
|
getSettings() {
|
|
269
269
|
return s;
|
|
270
270
|
},
|
|
271
|
-
setSettings(
|
|
271
|
+
setSettings(a) {
|
|
272
272
|
try {
|
|
273
|
-
localStorage.setItem(o, JSON.stringify(
|
|
273
|
+
localStorage.setItem(o, JSON.stringify(a));
|
|
274
274
|
} catch {
|
|
275
275
|
}
|
|
276
|
-
s =
|
|
276
|
+
s = a;
|
|
277
277
|
},
|
|
278
278
|
now() {
|
|
279
|
-
return
|
|
279
|
+
return zt();
|
|
280
280
|
}
|
|
281
|
-
},
|
|
282
|
-
|
|
281
|
+
}, r && r.on(Gt, (a, i) => {
|
|
282
|
+
a === this.plugin.id && this.fallbacks.setSettings(i);
|
|
283
283
|
}), this.proxiedOn = new Proxy({}, {
|
|
284
|
-
get: (
|
|
284
|
+
get: (a, i) => this.target ? this.target.on[i] : (...u) => {
|
|
285
285
|
this.onQueue.push({
|
|
286
|
-
method:
|
|
287
|
-
args:
|
|
286
|
+
method: i,
|
|
287
|
+
args: u
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
290
|
}), this.proxiedTarget = new Proxy({}, {
|
|
291
|
-
get: (
|
|
292
|
-
method:
|
|
293
|
-
args:
|
|
291
|
+
get: (a, i) => this.target ? this.target[i] : i === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(i) ? (...u) => (this.targetQueue.push({
|
|
292
|
+
method: i,
|
|
293
|
+
args: u,
|
|
294
294
|
resolve: () => {
|
|
295
295
|
}
|
|
296
|
-
}), this.fallbacks[
|
|
296
|
+
}), this.fallbacks[i](...u)) : (...u) => new Promise((c) => {
|
|
297
297
|
this.targetQueue.push({
|
|
298
|
-
method:
|
|
299
|
-
args:
|
|
300
|
-
resolve:
|
|
298
|
+
method: i,
|
|
299
|
+
args: u,
|
|
300
|
+
resolve: c
|
|
301
301
|
});
|
|
302
302
|
})
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
305
|
async setRealTarget(t) {
|
|
306
306
|
this.target = t;
|
|
307
|
-
for (const
|
|
308
|
-
this.target.on[
|
|
309
|
-
for (const
|
|
310
|
-
|
|
307
|
+
for (const r of this.onQueue)
|
|
308
|
+
this.target.on[r.method](...r.args);
|
|
309
|
+
for (const r of this.targetQueue)
|
|
310
|
+
r.resolve(await this.target[r.method](...r.args));
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
const
|
|
315
|
-
if (o && (
|
|
316
|
-
o.emit(
|
|
313
|
+
function tt(e, t) {
|
|
314
|
+
const r = e, n = et(), o = Ft(), s = Ht && r.enableEarlyProxy;
|
|
315
|
+
if (o && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
|
|
316
|
+
o.emit(Jt, e, t);
|
|
317
317
|
else {
|
|
318
|
-
const
|
|
319
|
-
(
|
|
320
|
-
pluginDescriptor:
|
|
318
|
+
const a = s ? new Qt(r, o) : null;
|
|
319
|
+
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
320
|
+
pluginDescriptor: r,
|
|
321
321
|
setupFn: t,
|
|
322
|
-
proxy:
|
|
323
|
-
}),
|
|
322
|
+
proxy: a
|
|
323
|
+
}), a && t(a.proxiedTarget);
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
/*!
|
|
@@ -328,31 +328,31 @@ function St(e, t) {
|
|
|
328
328
|
* (c) 2024 Eduardo San Martin Morote
|
|
329
329
|
* @license MIT
|
|
330
330
|
*/
|
|
331
|
-
let
|
|
332
|
-
const
|
|
331
|
+
let Q;
|
|
332
|
+
const X = (e) => Q = e, nt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
333
333
|
/* istanbul ignore next */
|
|
334
334
|
Symbol()
|
|
335
335
|
);
|
|
336
|
-
function
|
|
336
|
+
function V(e) {
|
|
337
337
|
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
338
338
|
}
|
|
339
|
-
var
|
|
339
|
+
var P;
|
|
340
340
|
(function(e) {
|
|
341
341
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
342
|
-
})(
|
|
343
|
-
const
|
|
344
|
-
function
|
|
342
|
+
})(P || (P = {}));
|
|
343
|
+
const M = typeof window < "u", Ae = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
344
|
+
function Yt(e, { autoBom: t = !1 } = {}) {
|
|
345
345
|
return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
},
|
|
347
|
+
function Se(e, t, r) {
|
|
348
|
+
const n = new XMLHttpRequest();
|
|
349
|
+
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
350
|
+
st(n.response, t, r);
|
|
351
|
+
}, n.onerror = function() {
|
|
352
352
|
console.error("could not download file");
|
|
353
|
-
},
|
|
353
|
+
}, n.send();
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function rt(e) {
|
|
356
356
|
const t = new XMLHttpRequest();
|
|
357
357
|
t.open("HEAD", e, !1);
|
|
358
358
|
try {
|
|
@@ -361,237 +361,237 @@ function kn(e) {
|
|
|
361
361
|
}
|
|
362
362
|
return t.status >= 200 && t.status <= 299;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function ee(e) {
|
|
365
365
|
try {
|
|
366
366
|
e.dispatchEvent(new MouseEvent("click"));
|
|
367
367
|
} catch {
|
|
368
|
-
const
|
|
369
|
-
|
|
368
|
+
const r = document.createEvent("MouseEvents");
|
|
369
|
+
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(r);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
const
|
|
372
|
+
const te = typeof navigator == "object" ? navigator : { userAgent: "" }, ot = /Macintosh/.test(te.userAgent) && /AppleWebKit/.test(te.userAgent) && !/Safari/.test(te.userAgent), st = M ? (
|
|
373
373
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
374
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !
|
|
374
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !ot ? qt : (
|
|
375
375
|
// Use msSaveOrOpenBlob as a second approach
|
|
376
|
-
"msSaveOrOpenBlob" in
|
|
376
|
+
"msSaveOrOpenBlob" in te ? Xt : (
|
|
377
377
|
// Fallback to using FileReader and a popup
|
|
378
|
-
|
|
378
|
+
Kt
|
|
379
379
|
)
|
|
380
380
|
)
|
|
381
381
|
) : () => {
|
|
382
382
|
};
|
|
383
|
-
function
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
URL.revokeObjectURL(
|
|
383
|
+
function qt(e, t = "download", r) {
|
|
384
|
+
const n = document.createElement("a");
|
|
385
|
+
n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? rt(n.href) ? Se(e, t, r) : (n.target = "_blank", ee(n)) : ee(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
386
|
+
URL.revokeObjectURL(n.href);
|
|
387
387
|
}, 4e4), setTimeout(function() {
|
|
388
|
-
|
|
388
|
+
ee(n);
|
|
389
389
|
}, 0));
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Xt(e, t = "download", r) {
|
|
392
392
|
if (typeof e == "string")
|
|
393
|
-
if (
|
|
394
|
-
|
|
393
|
+
if (rt(e))
|
|
394
|
+
Se(e, t, r);
|
|
395
395
|
else {
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
396
|
+
const n = document.createElement("a");
|
|
397
|
+
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
398
|
+
ee(n);
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
else
|
|
402
|
-
navigator.msSaveOrOpenBlob(
|
|
403
|
-
}
|
|
404
|
-
function
|
|
405
|
-
if (
|
|
406
|
-
return
|
|
407
|
-
const o = e.type === "application/octet-stream", s = /constructor/i.test(String(
|
|
408
|
-
if ((
|
|
409
|
-
const
|
|
410
|
-
|
|
411
|
-
let
|
|
412
|
-
if (typeof
|
|
413
|
-
throw
|
|
414
|
-
|
|
415
|
-
},
|
|
402
|
+
navigator.msSaveOrOpenBlob(Yt(e, r), t);
|
|
403
|
+
}
|
|
404
|
+
function Kt(e, t, r, n) {
|
|
405
|
+
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
406
|
+
return Se(e, t, r);
|
|
407
|
+
const o = e.type === "application/octet-stream", s = /constructor/i.test(String(Ae.HTMLElement)) || "safari" in Ae, a = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
408
|
+
if ((a || o && s || ot) && typeof FileReader < "u") {
|
|
409
|
+
const i = new FileReader();
|
|
410
|
+
i.onloadend = function() {
|
|
411
|
+
let u = i.result;
|
|
412
|
+
if (typeof u != "string")
|
|
413
|
+
throw n = null, new Error("Wrong reader.result type");
|
|
414
|
+
u = a ? u : u.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = u : location.assign(u), n = null;
|
|
415
|
+
}, i.readAsDataURL(e);
|
|
416
416
|
} else {
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
URL.revokeObjectURL(
|
|
417
|
+
const i = URL.createObjectURL(e);
|
|
418
|
+
n ? n.location.assign(i) : location.href = i, n = null, setTimeout(function() {
|
|
419
|
+
URL.revokeObjectURL(i);
|
|
420
420
|
}, 4e4);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
const
|
|
425
|
-
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(
|
|
423
|
+
function _(e, t) {
|
|
424
|
+
const r = "🍍 " + e;
|
|
425
|
+
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(r, t) : t === "error" ? console.error(r) : t === "warn" ? console.warn(r) : console.log(r);
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function Oe(e) {
|
|
428
428
|
return "_a" in e && "install" in e;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function it() {
|
|
431
431
|
if (!("clipboard" in navigator))
|
|
432
|
-
return
|
|
432
|
+
return _("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (
|
|
434
|
+
function at(e) {
|
|
435
|
+
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (_('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
436
436
|
}
|
|
437
|
-
async function
|
|
438
|
-
if (!
|
|
437
|
+
async function Zt(e) {
|
|
438
|
+
if (!it())
|
|
439
439
|
try {
|
|
440
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)),
|
|
440
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), _("Global state copied to clipboard.");
|
|
441
441
|
} catch (t) {
|
|
442
|
-
if (
|
|
442
|
+
if (at(t))
|
|
443
443
|
return;
|
|
444
|
-
|
|
444
|
+
_("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
async function
|
|
448
|
-
if (!
|
|
447
|
+
async function en(e) {
|
|
448
|
+
if (!it())
|
|
449
449
|
try {
|
|
450
|
-
|
|
450
|
+
ct(e, JSON.parse(await navigator.clipboard.readText())), _("Global state pasted from clipboard.");
|
|
451
451
|
} catch (t) {
|
|
452
|
-
if (
|
|
452
|
+
if (at(t))
|
|
453
453
|
return;
|
|
454
|
-
|
|
454
|
+
_("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
async function
|
|
457
|
+
async function tn(e) {
|
|
458
458
|
try {
|
|
459
|
-
|
|
459
|
+
st(new Blob([JSON.stringify(e.state.value)], {
|
|
460
460
|
type: "text/plain;charset=utf-8"
|
|
461
461
|
}), "pinia-state.json");
|
|
462
462
|
} catch (t) {
|
|
463
|
-
|
|
463
|
+
_("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
let
|
|
467
|
-
function
|
|
468
|
-
|
|
466
|
+
let k;
|
|
467
|
+
function nn() {
|
|
468
|
+
k || (k = document.createElement("input"), k.type = "file", k.accept = ".json");
|
|
469
469
|
function e() {
|
|
470
|
-
return new Promise((t,
|
|
471
|
-
|
|
472
|
-
const
|
|
473
|
-
if (!
|
|
470
|
+
return new Promise((t, r) => {
|
|
471
|
+
k.onchange = async () => {
|
|
472
|
+
const n = k.files;
|
|
473
|
+
if (!n)
|
|
474
474
|
return t(null);
|
|
475
|
-
const o =
|
|
475
|
+
const o = n.item(0);
|
|
476
476
|
return t(o ? { text: await o.text(), file: o } : null);
|
|
477
|
-
},
|
|
477
|
+
}, k.oncancel = () => t(null), k.onerror = r, k.click();
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
return e;
|
|
481
481
|
}
|
|
482
|
-
async function
|
|
482
|
+
async function rn(e) {
|
|
483
483
|
try {
|
|
484
|
-
const
|
|
485
|
-
if (!
|
|
484
|
+
const r = await nn()();
|
|
485
|
+
if (!r)
|
|
486
486
|
return;
|
|
487
|
-
const { text:
|
|
488
|
-
|
|
487
|
+
const { text: n, file: o } = r;
|
|
488
|
+
ct(e, JSON.parse(n)), _(`Global state imported from "${o.name}".`);
|
|
489
489
|
} catch (t) {
|
|
490
|
-
|
|
490
|
+
_("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
function
|
|
494
|
-
for (const
|
|
495
|
-
const
|
|
496
|
-
|
|
493
|
+
function ct(e, t) {
|
|
494
|
+
for (const r in t) {
|
|
495
|
+
const n = e.state.value[r];
|
|
496
|
+
n ? Object.assign(n, t[r]) : e.state.value[r] = t[r];
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function N(e) {
|
|
500
500
|
return {
|
|
501
501
|
_custom: {
|
|
502
502
|
display: e
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
const
|
|
507
|
-
function
|
|
508
|
-
return
|
|
509
|
-
id:
|
|
510
|
-
label:
|
|
506
|
+
const ut = "🍍 Pinia (root)", ne = "_root";
|
|
507
|
+
function on(e) {
|
|
508
|
+
return Oe(e) ? {
|
|
509
|
+
id: ne,
|
|
510
|
+
label: ut
|
|
511
511
|
} : {
|
|
512
512
|
id: e.$id,
|
|
513
513
|
label: e.$id
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
|
-
function
|
|
517
|
-
if (
|
|
518
|
-
const
|
|
516
|
+
function sn(e) {
|
|
517
|
+
if (Oe(e)) {
|
|
518
|
+
const r = Array.from(e._s.keys()), n = e._s;
|
|
519
519
|
return {
|
|
520
|
-
state:
|
|
520
|
+
state: r.map((s) => ({
|
|
521
521
|
editable: !0,
|
|
522
522
|
key: s,
|
|
523
523
|
value: e.state.value[s]
|
|
524
524
|
})),
|
|
525
|
-
getters:
|
|
526
|
-
const
|
|
525
|
+
getters: r.filter((s) => n.get(s)._getters).map((s) => {
|
|
526
|
+
const a = n.get(s);
|
|
527
527
|
return {
|
|
528
528
|
editable: !1,
|
|
529
529
|
key: s,
|
|
530
|
-
value:
|
|
530
|
+
value: a._getters.reduce((i, u) => (i[u] = a[u], i), {})
|
|
531
531
|
};
|
|
532
532
|
})
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
535
|
const t = {
|
|
536
|
-
state: Object.keys(e.$state).map((
|
|
536
|
+
state: Object.keys(e.$state).map((r) => ({
|
|
537
537
|
editable: !0,
|
|
538
|
-
key:
|
|
539
|
-
value: e.$state[
|
|
538
|
+
key: r,
|
|
539
|
+
value: e.$state[r]
|
|
540
540
|
}))
|
|
541
541
|
};
|
|
542
|
-
return e._getters && e._getters.length && (t.getters = e._getters.map((
|
|
542
|
+
return e._getters && e._getters.length && (t.getters = e._getters.map((r) => ({
|
|
543
543
|
editable: !1,
|
|
544
|
-
key:
|
|
545
|
-
value: e[
|
|
546
|
-
}))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((
|
|
544
|
+
key: r,
|
|
545
|
+
value: e[r]
|
|
546
|
+
}))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((r) => ({
|
|
547
547
|
editable: !0,
|
|
548
|
-
key:
|
|
549
|
-
value: e[
|
|
548
|
+
key: r,
|
|
549
|
+
value: e[r]
|
|
550
550
|
}))), t;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
return e ? Array.isArray(e) ? e.reduce((t,
|
|
552
|
+
function an(e) {
|
|
553
|
+
return e ? Array.isArray(e) ? e.reduce((t, r) => (t.keys.push(r.key), t.operations.push(r.type), t.oldValue[r.key] = r.oldValue, t.newValue[r.key] = r.newValue, t), {
|
|
554
554
|
oldValue: {},
|
|
555
555
|
keys: [],
|
|
556
556
|
operations: [],
|
|
557
557
|
newValue: {}
|
|
558
558
|
}) : {
|
|
559
|
-
operation:
|
|
560
|
-
key:
|
|
559
|
+
operation: N(e.type),
|
|
560
|
+
key: N(e.key),
|
|
561
561
|
oldValue: e.oldValue,
|
|
562
562
|
newValue: e.newValue
|
|
563
563
|
} : {};
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function cn(e) {
|
|
566
566
|
switch (e) {
|
|
567
|
-
case
|
|
567
|
+
case P.direct:
|
|
568
568
|
return "mutation";
|
|
569
|
-
case
|
|
569
|
+
case P.patchFunction:
|
|
570
570
|
return "$patch";
|
|
571
|
-
case
|
|
571
|
+
case P.patchObject:
|
|
572
572
|
return "$patch";
|
|
573
573
|
default:
|
|
574
574
|
return "unknown";
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
let
|
|
578
|
-
const
|
|
579
|
-
function
|
|
580
|
-
|
|
577
|
+
let F = !0;
|
|
578
|
+
const re = [], L = "pinia:mutations", b = "pinia", { assign: un } = Object, oe = (e) => "🍍 " + e;
|
|
579
|
+
function ln(e, t) {
|
|
580
|
+
tt({
|
|
581
581
|
id: "dev.esm.pinia",
|
|
582
582
|
label: "Pinia 🍍",
|
|
583
583
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
584
584
|
packageName: "pinia",
|
|
585
585
|
homepage: "https://pinia.vuejs.org",
|
|
586
|
-
componentStateTypes:
|
|
586
|
+
componentStateTypes: re,
|
|
587
587
|
app: e
|
|
588
|
-
}, (
|
|
589
|
-
typeof
|
|
590
|
-
id:
|
|
588
|
+
}, (r) => {
|
|
589
|
+
typeof r.now != "function" && _("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."), r.addTimelineLayer({
|
|
590
|
+
id: L,
|
|
591
591
|
label: "Pinia 🍍",
|
|
592
592
|
color: 15064968
|
|
593
|
-
}),
|
|
594
|
-
id:
|
|
593
|
+
}), r.addInspector({
|
|
594
|
+
id: b,
|
|
595
595
|
label: "Pinia 🍍",
|
|
596
596
|
icon: "storage",
|
|
597
597
|
treeFilterPlaceholder: "Search stores",
|
|
@@ -599,28 +599,28 @@ function qr(e, t) {
|
|
|
599
599
|
{
|
|
600
600
|
icon: "content_copy",
|
|
601
601
|
action: () => {
|
|
602
|
-
|
|
602
|
+
Zt(t);
|
|
603
603
|
},
|
|
604
604
|
tooltip: "Serialize and copy the state"
|
|
605
605
|
},
|
|
606
606
|
{
|
|
607
607
|
icon: "content_paste",
|
|
608
608
|
action: async () => {
|
|
609
|
-
await
|
|
609
|
+
await en(t), r.sendInspectorTree(b), r.sendInspectorState(b);
|
|
610
610
|
},
|
|
611
611
|
tooltip: "Replace the state with the content of your clipboard"
|
|
612
612
|
},
|
|
613
613
|
{
|
|
614
614
|
icon: "save",
|
|
615
615
|
action: () => {
|
|
616
|
-
|
|
616
|
+
tn(t);
|
|
617
617
|
},
|
|
618
618
|
tooltip: "Save the state as a JSON file"
|
|
619
619
|
},
|
|
620
620
|
{
|
|
621
621
|
icon: "folder_open",
|
|
622
622
|
action: async () => {
|
|
623
|
-
await
|
|
623
|
+
await rn(t), r.sendInspectorTree(b), r.sendInspectorState(b);
|
|
624
624
|
},
|
|
625
625
|
tooltip: "Import the state from a JSON file"
|
|
626
626
|
}
|
|
@@ -629,94 +629,94 @@ function qr(e, t) {
|
|
|
629
629
|
{
|
|
630
630
|
icon: "restore",
|
|
631
631
|
tooltip: 'Reset the state (with "$reset")',
|
|
632
|
-
action: (
|
|
633
|
-
const o = t._s.get(
|
|
634
|
-
o ? typeof o.$reset != "function" ?
|
|
632
|
+
action: (n) => {
|
|
633
|
+
const o = t._s.get(n);
|
|
634
|
+
o ? typeof o.$reset != "function" ? _(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (o.$reset(), _(`Store "${n}" reset.`)) : _(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
]
|
|
638
|
-
}),
|
|
639
|
-
const s =
|
|
638
|
+
}), r.on.inspectComponent((n, o) => {
|
|
639
|
+
const s = n.componentInstance && n.componentInstance.proxy;
|
|
640
640
|
if (s && s._pStores) {
|
|
641
|
-
const
|
|
642
|
-
Object.values(
|
|
643
|
-
|
|
644
|
-
type:
|
|
641
|
+
const a = n.componentInstance.proxy._pStores;
|
|
642
|
+
Object.values(a).forEach((i) => {
|
|
643
|
+
n.instanceData.state.push({
|
|
644
|
+
type: oe(i.$id),
|
|
645
645
|
key: "state",
|
|
646
646
|
editable: !0,
|
|
647
|
-
value:
|
|
647
|
+
value: i._isOptionsAPI ? {
|
|
648
648
|
_custom: {
|
|
649
|
-
value:
|
|
649
|
+
value: Y(i.$state),
|
|
650
650
|
actions: [
|
|
651
651
|
{
|
|
652
652
|
icon: "restore",
|
|
653
653
|
tooltip: "Reset the state of this store",
|
|
654
|
-
action: () =>
|
|
654
|
+
action: () => i.$reset()
|
|
655
655
|
}
|
|
656
656
|
]
|
|
657
657
|
}
|
|
658
658
|
} : (
|
|
659
659
|
// NOTE: workaround to unwrap transferred refs
|
|
660
|
-
Object.keys(
|
|
660
|
+
Object.keys(i.$state).reduce((u, c) => (u[c] = i.$state[c], u), {})
|
|
661
661
|
)
|
|
662
|
-
}),
|
|
663
|
-
type:
|
|
662
|
+
}), i._getters && i._getters.length && n.instanceData.state.push({
|
|
663
|
+
type: oe(i.$id),
|
|
664
664
|
key: "getters",
|
|
665
665
|
editable: !1,
|
|
666
|
-
value:
|
|
666
|
+
value: i._getters.reduce((u, c) => {
|
|
667
667
|
try {
|
|
668
|
-
c
|
|
669
|
-
} catch (
|
|
670
|
-
c
|
|
668
|
+
u[c] = i[c];
|
|
669
|
+
} catch (d) {
|
|
670
|
+
u[c] = d;
|
|
671
671
|
}
|
|
672
|
-
return
|
|
672
|
+
return u;
|
|
673
673
|
}, {})
|
|
674
674
|
});
|
|
675
675
|
});
|
|
676
676
|
}
|
|
677
|
-
}),
|
|
678
|
-
if (
|
|
677
|
+
}), r.on.getInspectorTree((n) => {
|
|
678
|
+
if (n.app === e && n.inspectorId === b) {
|
|
679
679
|
let o = [t];
|
|
680
|
-
o = o.concat(Array.from(t._s.values())),
|
|
680
|
+
o = o.concat(Array.from(t._s.values())), n.rootNodes = (n.filter ? o.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(n.filter.toLowerCase()) : ut.toLowerCase().includes(n.filter.toLowerCase())) : o).map(on);
|
|
681
681
|
}
|
|
682
|
-
}), globalThis.$pinia = t,
|
|
683
|
-
if (
|
|
684
|
-
const o =
|
|
682
|
+
}), globalThis.$pinia = t, r.on.getInspectorState((n) => {
|
|
683
|
+
if (n.app === e && n.inspectorId === b) {
|
|
684
|
+
const o = n.nodeId === ne ? t : t._s.get(n.nodeId);
|
|
685
685
|
if (!o)
|
|
686
686
|
return;
|
|
687
|
-
o && (
|
|
687
|
+
o && (n.nodeId !== ne && (globalThis.$store = Y(o)), n.state = sn(o));
|
|
688
688
|
}
|
|
689
|
-
}),
|
|
690
|
-
if (
|
|
691
|
-
const s =
|
|
689
|
+
}), r.on.editInspectorState((n, o) => {
|
|
690
|
+
if (n.app === e && n.inspectorId === b) {
|
|
691
|
+
const s = n.nodeId === ne ? t : t._s.get(n.nodeId);
|
|
692
692
|
if (!s)
|
|
693
|
-
return
|
|
694
|
-
const { path:
|
|
695
|
-
|
|
693
|
+
return _(`store "${n.nodeId}" not found`, "error");
|
|
694
|
+
const { path: a } = n;
|
|
695
|
+
Oe(s) ? a.unshift("state") : (a.length !== 1 || !s._customProperties.has(a[0]) || a[0] in s.$state) && a.unshift("$state"), F = !1, n.set(s, a, n.state.value), F = !0;
|
|
696
696
|
}
|
|
697
|
-
}),
|
|
698
|
-
if (
|
|
699
|
-
const o =
|
|
697
|
+
}), r.on.editComponentState((n) => {
|
|
698
|
+
if (n.type.startsWith("🍍")) {
|
|
699
|
+
const o = n.type.replace(/^🍍\s*/, ""), s = t._s.get(o);
|
|
700
700
|
if (!s)
|
|
701
|
-
return
|
|
702
|
-
const { path:
|
|
703
|
-
if (
|
|
704
|
-
return
|
|
705
|
-
${
|
|
701
|
+
return _(`store "${o}" not found`, "error");
|
|
702
|
+
const { path: a } = n;
|
|
703
|
+
if (a[0] !== "state")
|
|
704
|
+
return _(`Invalid path for store "${o}":
|
|
705
|
+
${a}
|
|
706
706
|
Only state can be modified.`);
|
|
707
|
-
|
|
707
|
+
a[0] = "$state", F = !1, n.set(s, a, n.state.value), F = !0;
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
|
|
712
|
+
function fn(e, t) {
|
|
713
|
+
re.includes(oe(t.$id)) || re.push(oe(t.$id)), tt({
|
|
714
714
|
id: "dev.esm.pinia",
|
|
715
715
|
label: "Pinia 🍍",
|
|
716
716
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
717
717
|
packageName: "pinia",
|
|
718
718
|
homepage: "https://pinia.vuejs.org",
|
|
719
|
-
componentStateTypes:
|
|
719
|
+
componentStateTypes: re,
|
|
720
720
|
app: e,
|
|
721
721
|
settings: {
|
|
722
722
|
logStoreChanges: {
|
|
@@ -730,160 +730,160 @@ function Jr(e, t) {
|
|
|
730
730
|
// defaultValue: true,
|
|
731
731
|
// },
|
|
732
732
|
}
|
|
733
|
-
}, (
|
|
734
|
-
const
|
|
735
|
-
t.$onAction(({ after:
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
layerId:
|
|
733
|
+
}, (r) => {
|
|
734
|
+
const n = typeof r.now == "function" ? r.now.bind(r) : Date.now;
|
|
735
|
+
t.$onAction(({ after: a, onError: i, name: u, args: c }) => {
|
|
736
|
+
const d = lt++;
|
|
737
|
+
r.addTimelineEvent({
|
|
738
|
+
layerId: L,
|
|
739
739
|
event: {
|
|
740
|
-
time:
|
|
741
|
-
title: "🛫 " +
|
|
740
|
+
time: n(),
|
|
741
|
+
title: "🛫 " + u,
|
|
742
742
|
subtitle: "start",
|
|
743
743
|
data: {
|
|
744
|
-
store:
|
|
745
|
-
action:
|
|
746
|
-
args:
|
|
744
|
+
store: N(t.$id),
|
|
745
|
+
action: N(u),
|
|
746
|
+
args: c
|
|
747
747
|
},
|
|
748
|
-
groupId:
|
|
748
|
+
groupId: d
|
|
749
749
|
}
|
|
750
|
-
}),
|
|
751
|
-
|
|
752
|
-
layerId:
|
|
750
|
+
}), a((p) => {
|
|
751
|
+
C = void 0, r.addTimelineEvent({
|
|
752
|
+
layerId: L,
|
|
753
753
|
event: {
|
|
754
|
-
time:
|
|
755
|
-
title: "🛬 " +
|
|
754
|
+
time: n(),
|
|
755
|
+
title: "🛬 " + u,
|
|
756
756
|
subtitle: "end",
|
|
757
757
|
data: {
|
|
758
|
-
store:
|
|
759
|
-
action:
|
|
760
|
-
args:
|
|
761
|
-
result:
|
|
758
|
+
store: N(t.$id),
|
|
759
|
+
action: N(u),
|
|
760
|
+
args: c,
|
|
761
|
+
result: p
|
|
762
762
|
},
|
|
763
|
-
groupId:
|
|
763
|
+
groupId: d
|
|
764
764
|
}
|
|
765
765
|
});
|
|
766
|
-
}),
|
|
767
|
-
|
|
768
|
-
layerId:
|
|
766
|
+
}), i((p) => {
|
|
767
|
+
C = void 0, r.addTimelineEvent({
|
|
768
|
+
layerId: L,
|
|
769
769
|
event: {
|
|
770
|
-
time:
|
|
770
|
+
time: n(),
|
|
771
771
|
logType: "error",
|
|
772
|
-
title: "💥 " +
|
|
772
|
+
title: "💥 " + u,
|
|
773
773
|
subtitle: "end",
|
|
774
774
|
data: {
|
|
775
|
-
store:
|
|
776
|
-
action:
|
|
777
|
-
args:
|
|
778
|
-
error:
|
|
775
|
+
store: N(t.$id),
|
|
776
|
+
action: N(u),
|
|
777
|
+
args: c,
|
|
778
|
+
error: p
|
|
779
779
|
},
|
|
780
|
-
groupId:
|
|
780
|
+
groupId: d
|
|
781
781
|
}
|
|
782
782
|
});
|
|
783
783
|
});
|
|
784
|
-
}, !0), t._customProperties.forEach((
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
layerId:
|
|
784
|
+
}, !0), t._customProperties.forEach((a) => {
|
|
785
|
+
we(() => At(t[a]), (i, u) => {
|
|
786
|
+
r.notifyComponentUpdate(), r.sendInspectorState(b), F && r.addTimelineEvent({
|
|
787
|
+
layerId: L,
|
|
788
788
|
event: {
|
|
789
|
-
time:
|
|
789
|
+
time: n(),
|
|
790
790
|
title: "Change",
|
|
791
|
-
subtitle:
|
|
791
|
+
subtitle: a,
|
|
792
792
|
data: {
|
|
793
|
-
newValue:
|
|
794
|
-
oldValue:
|
|
793
|
+
newValue: i,
|
|
794
|
+
oldValue: u
|
|
795
795
|
},
|
|
796
|
-
groupId:
|
|
796
|
+
groupId: C
|
|
797
797
|
}
|
|
798
798
|
});
|
|
799
799
|
}, { deep: !0 });
|
|
800
|
-
}), t.$subscribe(({ events:
|
|
801
|
-
if (
|
|
800
|
+
}), t.$subscribe(({ events: a, type: i }, u) => {
|
|
801
|
+
if (r.notifyComponentUpdate(), r.sendInspectorState(b), !F)
|
|
802
802
|
return;
|
|
803
|
-
const
|
|
804
|
-
time:
|
|
805
|
-
title:
|
|
806
|
-
data:
|
|
807
|
-
groupId:
|
|
803
|
+
const c = {
|
|
804
|
+
time: n(),
|
|
805
|
+
title: cn(i),
|
|
806
|
+
data: un({ store: N(t.$id) }, an(a)),
|
|
807
|
+
groupId: C
|
|
808
808
|
};
|
|
809
|
-
|
|
809
|
+
i === P.patchFunction ? c.subtitle = "⤵️" : i === P.patchObject ? c.subtitle = "🧩" : a && !Array.isArray(a) && (c.subtitle = a.type), a && (c.data["rawEvent(s)"] = {
|
|
810
810
|
_custom: {
|
|
811
811
|
display: "DebuggerEvent",
|
|
812
812
|
type: "object",
|
|
813
813
|
tooltip: "raw DebuggerEvent[]",
|
|
814
|
-
value:
|
|
814
|
+
value: a
|
|
815
815
|
}
|
|
816
|
-
}),
|
|
817
|
-
layerId:
|
|
818
|
-
event:
|
|
816
|
+
}), r.addTimelineEvent({
|
|
817
|
+
layerId: L,
|
|
818
|
+
event: c
|
|
819
819
|
});
|
|
820
820
|
}, { detached: !0, flush: "sync" });
|
|
821
821
|
const o = t._hotUpdate;
|
|
822
|
-
t._hotUpdate =
|
|
823
|
-
o(
|
|
824
|
-
layerId:
|
|
822
|
+
t._hotUpdate = A((a) => {
|
|
823
|
+
o(a), r.addTimelineEvent({
|
|
824
|
+
layerId: L,
|
|
825
825
|
event: {
|
|
826
|
-
time:
|
|
826
|
+
time: n(),
|
|
827
827
|
title: "🔥 " + t.$id,
|
|
828
828
|
subtitle: "HMR update",
|
|
829
829
|
data: {
|
|
830
|
-
store:
|
|
831
|
-
info:
|
|
830
|
+
store: N(t.$id),
|
|
831
|
+
info: N("HMR update")
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
|
-
}),
|
|
834
|
+
}), r.notifyComponentUpdate(), r.sendInspectorTree(b), r.sendInspectorState(b);
|
|
835
835
|
});
|
|
836
836
|
const { $dispose: s } = t;
|
|
837
837
|
t.$dispose = () => {
|
|
838
|
-
s(),
|
|
839
|
-
},
|
|
838
|
+
s(), r.notifyComponentUpdate(), r.sendInspectorTree(b), r.sendInspectorState(b), r.getSettings().logStoreChanges && _(`Disposed "${t.$id}" store 🗑`);
|
|
839
|
+
}, r.notifyComponentUpdate(), r.sendInspectorTree(b), r.sendInspectorState(b), r.getSettings().logStoreChanges && _(`"${t.$id}" store installed 🆕`);
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
|
-
let
|
|
843
|
-
function
|
|
844
|
-
const
|
|
845
|
-
for (const o in
|
|
842
|
+
let lt = 0, C;
|
|
843
|
+
function je(e, t, r) {
|
|
844
|
+
const n = t.reduce((o, s) => (o[s] = Y(e)[s], o), {});
|
|
845
|
+
for (const o in n)
|
|
846
846
|
e[o] = function() {
|
|
847
|
-
const s =
|
|
848
|
-
get(...
|
|
849
|
-
return
|
|
847
|
+
const s = lt, a = r ? new Proxy(e, {
|
|
848
|
+
get(...u) {
|
|
849
|
+
return C = s, Reflect.get(...u);
|
|
850
850
|
},
|
|
851
|
-
set(...
|
|
852
|
-
return
|
|
851
|
+
set(...u) {
|
|
852
|
+
return C = s, Reflect.set(...u);
|
|
853
853
|
}
|
|
854
854
|
}) : e;
|
|
855
|
-
|
|
856
|
-
const
|
|
857
|
-
return
|
|
855
|
+
C = s;
|
|
856
|
+
const i = n[o].apply(a, arguments);
|
|
857
|
+
return C = void 0, i;
|
|
858
858
|
};
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function dn({ app: e, store: t, options: r }) {
|
|
861
861
|
if (!t.$id.startsWith("__hot:")) {
|
|
862
|
-
if (t._isOptionsAPI = !!
|
|
863
|
-
|
|
864
|
-
const
|
|
865
|
-
|
|
866
|
-
|
|
862
|
+
if (t._isOptionsAPI = !!r.state, !t._p._testing) {
|
|
863
|
+
je(t, Object.keys(r.actions), t._isOptionsAPI);
|
|
864
|
+
const n = t._hotUpdate;
|
|
865
|
+
Y(t)._hotUpdate = function(o) {
|
|
866
|
+
n.apply(this, arguments), je(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
|
|
867
867
|
};
|
|
868
868
|
}
|
|
869
|
-
|
|
869
|
+
fn(
|
|
870
870
|
e,
|
|
871
871
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
872
872
|
t
|
|
873
873
|
);
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
function
|
|
877
|
-
const e =
|
|
878
|
-
let
|
|
879
|
-
const o =
|
|
876
|
+
function pn() {
|
|
877
|
+
const e = qe(!0), t = e.run(() => R({}));
|
|
878
|
+
let r = [], n = [];
|
|
879
|
+
const o = A({
|
|
880
880
|
install(s) {
|
|
881
|
-
|
|
881
|
+
X(o), o._a = s, s.provide(nt, o), s.config.globalProperties.$pinia = o, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && M && ln(s, o), n.forEach((a) => r.push(a)), n = [];
|
|
882
882
|
},
|
|
883
883
|
use(s) {
|
|
884
|
-
return !this._a && !
|
|
884
|
+
return !this._a && !Ze ? n.push(s) : r.push(s), this;
|
|
885
885
|
},
|
|
886
|
-
_p:
|
|
886
|
+
_p: r,
|
|
887
887
|
// it's actually undefined here
|
|
888
888
|
// @ts-expect-error
|
|
889
889
|
_a: null,
|
|
@@ -891,351 +891,351 @@ function Qr() {
|
|
|
891
891
|
_s: /* @__PURE__ */ new Map(),
|
|
892
892
|
state: t
|
|
893
893
|
});
|
|
894
|
-
return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
894
|
+
return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && M && typeof Proxy < "u" && o.use(dn), o;
|
|
895
895
|
}
|
|
896
|
-
function
|
|
897
|
-
for (const
|
|
898
|
-
const
|
|
899
|
-
if (!(
|
|
896
|
+
function ft(e, t) {
|
|
897
|
+
for (const r in t) {
|
|
898
|
+
const n = t[r];
|
|
899
|
+
if (!(r in e))
|
|
900
900
|
continue;
|
|
901
|
-
const o = e[
|
|
902
|
-
|
|
901
|
+
const o = e[r];
|
|
902
|
+
V(o) && V(n) && !q(n) && !Ee(n) ? e[r] = ft(o, n) : e[r] = n;
|
|
903
903
|
}
|
|
904
904
|
return e;
|
|
905
905
|
}
|
|
906
|
-
const
|
|
906
|
+
const dt = () => {
|
|
907
907
|
};
|
|
908
|
-
function
|
|
908
|
+
function Re(e, t, r, n = dt) {
|
|
909
909
|
e.push(t);
|
|
910
910
|
const o = () => {
|
|
911
911
|
const s = e.indexOf(t);
|
|
912
|
-
s > -1 && (e.splice(s, 1),
|
|
912
|
+
s > -1 && (e.splice(s, 1), n());
|
|
913
913
|
};
|
|
914
|
-
return !
|
|
914
|
+
return !r && Bt() && xt(o), o;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
e.slice().forEach((
|
|
918
|
-
|
|
916
|
+
function U(e, ...t) {
|
|
917
|
+
e.slice().forEach((r) => {
|
|
918
|
+
r(...t);
|
|
919
919
|
});
|
|
920
920
|
}
|
|
921
|
-
const
|
|
922
|
-
function
|
|
923
|
-
e instanceof Map && t instanceof Map ? t.forEach((
|
|
924
|
-
for (const
|
|
925
|
-
if (!t.hasOwnProperty(
|
|
921
|
+
const hn = (e) => e(), Ve = Symbol(), fe = Symbol();
|
|
922
|
+
function ye(e, t) {
|
|
923
|
+
e instanceof Map && t instanceof Map ? t.forEach((r, n) => e.set(n, r)) : e instanceof Set && t instanceof Set && t.forEach(e.add, e);
|
|
924
|
+
for (const r in t) {
|
|
925
|
+
if (!t.hasOwnProperty(r))
|
|
926
926
|
continue;
|
|
927
|
-
const
|
|
928
|
-
|
|
927
|
+
const n = t[r], o = e[r];
|
|
928
|
+
V(o) && V(n) && e.hasOwnProperty(r) && !q(n) && !Ee(n) ? e[r] = ye(o, n) : e[r] = n;
|
|
929
929
|
}
|
|
930
930
|
return e;
|
|
931
931
|
}
|
|
932
|
-
const
|
|
932
|
+
const gn = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
933
933
|
/* istanbul ignore next */
|
|
934
934
|
Symbol()
|
|
935
935
|
);
|
|
936
|
-
function
|
|
937
|
-
return !
|
|
938
|
-
}
|
|
939
|
-
const { assign:
|
|
940
|
-
function
|
|
941
|
-
return !!(
|
|
942
|
-
}
|
|
943
|
-
function Wt(e, t, n, r) {
|
|
944
|
-
const { state: o, actions: s, getters: i } = t, a = n.state.value[e];
|
|
945
|
-
let c;
|
|
946
|
-
function l() {
|
|
947
|
-
!a && (process.env.NODE_ENV === "production" || !r) && (n.state.value[e] = o ? o() : {});
|
|
948
|
-
const f = process.env.NODE_ENV !== "production" && r ? (
|
|
949
|
-
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
950
|
-
jt(se(o ? o() : {}).value)
|
|
951
|
-
) : jt(n.state.value[e]);
|
|
952
|
-
return G(f, s, Object.keys(i || {}).reduce((u, d) => (process.env.NODE_ENV !== "production" && d in f && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${e}".`), u[d] = fe(z(() => {
|
|
953
|
-
Te(n);
|
|
954
|
-
const p = n._s.get(e);
|
|
955
|
-
return i[d].call(p, p);
|
|
956
|
-
})), u), {}));
|
|
957
|
-
}
|
|
958
|
-
return c = ht(e, l, t, n, r, !0), c;
|
|
936
|
+
function mn(e) {
|
|
937
|
+
return !V(e) || !e.hasOwnProperty(gn);
|
|
938
|
+
}
|
|
939
|
+
const { assign: I } = Object;
|
|
940
|
+
function Be(e) {
|
|
941
|
+
return !!(q(e) && e.effect);
|
|
959
942
|
}
|
|
960
|
-
function
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
943
|
+
function xe(e, t, r, n) {
|
|
944
|
+
const { state: o, actions: s, getters: a } = t, i = r.state.value[e];
|
|
945
|
+
let u;
|
|
946
|
+
function c() {
|
|
947
|
+
!i && (process.env.NODE_ENV === "production" || !n) && (r.state.value[e] = o ? o() : {});
|
|
948
|
+
const d = process.env.NODE_ENV !== "production" && n ? (
|
|
949
|
+
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
950
|
+
Le(R(o ? o() : {}).value)
|
|
951
|
+
) : Le(r.state.value[e]);
|
|
952
|
+
return I(d, s, Object.keys(a || {}).reduce((p, g) => (process.env.NODE_ENV !== "production" && g in d && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = A(Ke(() => {
|
|
953
|
+
X(r);
|
|
954
|
+
const w = r._s.get(e);
|
|
955
|
+
return a[g].call(w, w);
|
|
956
|
+
})), p), {}));
|
|
957
|
+
}
|
|
958
|
+
return u = _e(e, c, t, r, n, !0), u;
|
|
959
|
+
}
|
|
960
|
+
function _e(e, t, r = {}, n, o, s) {
|
|
961
|
+
let a;
|
|
962
|
+
const i = I({ actions: {} }, r);
|
|
963
|
+
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
964
964
|
throw new Error("Pinia destroyed");
|
|
965
|
-
const
|
|
966
|
-
process.env.NODE_ENV !== "production" && !
|
|
967
|
-
|
|
965
|
+
const u = { deep: !0 };
|
|
966
|
+
process.env.NODE_ENV !== "production" && !Ze && (u.onTrigger = (f) => {
|
|
967
|
+
c ? w = f : c == !1 && !h._hotUpdating && (Array.isArray(w) ? w.push(f) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
968
968
|
});
|
|
969
|
-
let
|
|
970
|
-
const
|
|
971
|
-
!s && !
|
|
972
|
-
const
|
|
973
|
-
let
|
|
974
|
-
function
|
|
975
|
-
let
|
|
976
|
-
|
|
977
|
-
type:
|
|
969
|
+
let c, d, p = [], g = [], w;
|
|
970
|
+
const E = n.state.value[e];
|
|
971
|
+
!s && !E && (process.env.NODE_ENV === "production" || !o) && (n.state.value[e] = {});
|
|
972
|
+
const B = R({});
|
|
973
|
+
let v;
|
|
974
|
+
function T(f) {
|
|
975
|
+
let l;
|
|
976
|
+
c = d = !1, process.env.NODE_ENV !== "production" && (w = []), typeof f == "function" ? (f(n.state.value[e]), l = {
|
|
977
|
+
type: P.patchFunction,
|
|
978
978
|
storeId: e,
|
|
979
|
-
events:
|
|
980
|
-
}) : (
|
|
981
|
-
type:
|
|
982
|
-
payload:
|
|
979
|
+
events: w
|
|
980
|
+
}) : (ye(n.state.value[e], f), l = {
|
|
981
|
+
type: P.patchObject,
|
|
982
|
+
payload: f,
|
|
983
983
|
storeId: e,
|
|
984
|
-
events:
|
|
984
|
+
events: w
|
|
985
985
|
});
|
|
986
|
-
const
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
}),
|
|
990
|
-
}
|
|
991
|
-
const
|
|
992
|
-
const { state:
|
|
993
|
-
this.$patch((
|
|
994
|
-
|
|
986
|
+
const m = v = Symbol();
|
|
987
|
+
Ce().then(() => {
|
|
988
|
+
v === m && (c = !0);
|
|
989
|
+
}), d = !0, U(p, l, n.state.value[e]);
|
|
990
|
+
}
|
|
991
|
+
const $t = s ? function() {
|
|
992
|
+
const { state: l } = r, m = l ? l() : {};
|
|
993
|
+
this.$patch((S) => {
|
|
994
|
+
I(S, m);
|
|
995
995
|
});
|
|
996
996
|
} : (
|
|
997
997
|
/* istanbul ignore next */
|
|
998
998
|
process.env.NODE_ENV !== "production" ? () => {
|
|
999
999
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
1000
|
-
} :
|
|
1000
|
+
} : dt
|
|
1001
1001
|
);
|
|
1002
|
-
function
|
|
1003
|
-
|
|
1004
|
-
}
|
|
1005
|
-
const
|
|
1006
|
-
if (
|
|
1007
|
-
return
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
const
|
|
1011
|
-
function
|
|
1012
|
-
|
|
1002
|
+
function Tt() {
|
|
1003
|
+
a.stop(), p = [], g = [], n._s.delete(e);
|
|
1004
|
+
}
|
|
1005
|
+
const ae = (f, l = "") => {
|
|
1006
|
+
if (Ve in f)
|
|
1007
|
+
return f[fe] = l, f;
|
|
1008
|
+
const m = function() {
|
|
1009
|
+
X(n);
|
|
1010
|
+
const S = Array.from(arguments), W = [], ce = [];
|
|
1011
|
+
function Dt(O) {
|
|
1012
|
+
W.push(O);
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1015
|
-
ce.push(
|
|
1014
|
+
function Mt(O) {
|
|
1015
|
+
ce.push(O);
|
|
1016
1016
|
}
|
|
1017
|
-
|
|
1018
|
-
args:
|
|
1019
|
-
name:
|
|
1020
|
-
store:
|
|
1021
|
-
after:
|
|
1022
|
-
onError:
|
|
1017
|
+
U(g, {
|
|
1018
|
+
args: S,
|
|
1019
|
+
name: m[fe],
|
|
1020
|
+
store: h,
|
|
1021
|
+
after: Dt,
|
|
1022
|
+
onError: Mt
|
|
1023
1023
|
});
|
|
1024
|
-
let
|
|
1024
|
+
let z;
|
|
1025
1025
|
try {
|
|
1026
|
-
|
|
1027
|
-
} catch (
|
|
1028
|
-
throw
|
|
1026
|
+
z = f.apply(this && this.$id === e ? this : h, S);
|
|
1027
|
+
} catch (O) {
|
|
1028
|
+
throw U(ce, O), O;
|
|
1029
1029
|
}
|
|
1030
|
-
return
|
|
1030
|
+
return z instanceof Promise ? z.then((O) => (U(W, O), O)).catch((O) => (U(ce, O), Promise.reject(O))) : (U(W, z), z);
|
|
1031
1031
|
};
|
|
1032
|
-
return
|
|
1033
|
-
},
|
|
1032
|
+
return m[Ve] = !0, m[fe] = l, m;
|
|
1033
|
+
}, K = /* @__PURE__ */ A({
|
|
1034
1034
|
actions: {},
|
|
1035
1035
|
getters: {},
|
|
1036
1036
|
state: [],
|
|
1037
|
-
hotState:
|
|
1038
|
-
}),
|
|
1039
|
-
_p:
|
|
1037
|
+
hotState: B
|
|
1038
|
+
}), Me = {
|
|
1039
|
+
_p: n,
|
|
1040
1040
|
// _s: scope,
|
|
1041
1041
|
$id: e,
|
|
1042
|
-
$onAction:
|
|
1043
|
-
$patch:
|
|
1044
|
-
$reset:
|
|
1045
|
-
$subscribe(
|
|
1046
|
-
const
|
|
1047
|
-
(
|
|
1042
|
+
$onAction: Re.bind(null, g),
|
|
1043
|
+
$patch: T,
|
|
1044
|
+
$reset: $t,
|
|
1045
|
+
$subscribe(f, l = {}) {
|
|
1046
|
+
const m = Re(p, f, l.detached, () => S()), S = a.run(() => we(() => n.state.value[e], (W) => {
|
|
1047
|
+
(l.flush === "sync" ? d : c) && f({
|
|
1048
1048
|
storeId: e,
|
|
1049
|
-
type:
|
|
1050
|
-
events:
|
|
1051
|
-
},
|
|
1052
|
-
},
|
|
1053
|
-
return
|
|
1049
|
+
type: P.direct,
|
|
1050
|
+
events: w
|
|
1051
|
+
}, W);
|
|
1052
|
+
}, I({}, u, l)));
|
|
1053
|
+
return m;
|
|
1054
1054
|
},
|
|
1055
|
-
$dispose:
|
|
1056
|
-
},
|
|
1055
|
+
$dispose: Tt
|
|
1056
|
+
}, h = Vt(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && M ? I(
|
|
1057
1057
|
{
|
|
1058
|
-
_hmrPayload:
|
|
1059
|
-
_customProperties:
|
|
1058
|
+
_hmrPayload: K,
|
|
1059
|
+
_customProperties: A(/* @__PURE__ */ new Set())
|
|
1060
1060
|
// devtools custom properties
|
|
1061
1061
|
},
|
|
1062
|
-
|
|
1062
|
+
Me
|
|
1063
1063
|
// must be added later
|
|
1064
1064
|
// setupStore
|
|
1065
|
-
) :
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1068
|
-
for (const
|
|
1069
|
-
const
|
|
1070
|
-
if (
|
|
1071
|
-
process.env.NODE_ENV !== "production" && o ?
|
|
1072
|
-
else if (typeof
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
1065
|
+
) : Me);
|
|
1066
|
+
n._s.set(e, h);
|
|
1067
|
+
const D = (n._a && n._a.runWithContext || hn)(() => n._e.run(() => (a = qe()).run(() => t({ action: ae }))));
|
|
1068
|
+
for (const f in D) {
|
|
1069
|
+
const l = D[f];
|
|
1070
|
+
if (q(l) && !Be(l) || Ee(l))
|
|
1071
|
+
process.env.NODE_ENV !== "production" && o ? Z(B.value, f, ue(D, f)) : s || (E && mn(l) && (q(l) ? l.value = E[f] : ye(l, E[f])), n.state.value[e][f] = l), process.env.NODE_ENV !== "production" && K.state.push(f);
|
|
1072
|
+
else if (typeof l == "function") {
|
|
1073
|
+
const m = process.env.NODE_ENV !== "production" && o ? l : ae(l, f);
|
|
1074
|
+
D[f] = m, process.env.NODE_ENV !== "production" && (K.actions[f] = l), i.actions[f] = l;
|
|
1075
|
+
} else process.env.NODE_ENV !== "production" && Be(l) && (K.getters[f] = s ? (
|
|
1076
1076
|
// @ts-expect-error
|
|
1077
|
-
|
|
1078
|
-
) :
|
|
1079
|
-
(
|
|
1077
|
+
r.getters[f]
|
|
1078
|
+
) : l, M && (D._getters || // @ts-expect-error: same
|
|
1079
|
+
(D._getters = A([]))).push(f));
|
|
1080
1080
|
}
|
|
1081
|
-
if (
|
|
1082
|
-
get: () => process.env.NODE_ENV !== "production" && o ?
|
|
1083
|
-
set: (
|
|
1081
|
+
if (I(h, D), I(Y(h), D), Object.defineProperty(h, "$state", {
|
|
1082
|
+
get: () => process.env.NODE_ENV !== "production" && o ? B.value : n.state.value[e],
|
|
1083
|
+
set: (f) => {
|
|
1084
1084
|
if (process.env.NODE_ENV !== "production" && o)
|
|
1085
1085
|
throw new Error("cannot set hotState");
|
|
1086
|
-
|
|
1087
|
-
|
|
1086
|
+
T((l) => {
|
|
1087
|
+
I(l, f);
|
|
1088
1088
|
});
|
|
1089
1089
|
}
|
|
1090
|
-
}), process.env.NODE_ENV !== "production" && (
|
|
1091
|
-
|
|
1092
|
-
if (
|
|
1093
|
-
const
|
|
1094
|
-
typeof
|
|
1090
|
+
}), process.env.NODE_ENV !== "production" && (h._hotUpdate = A((f) => {
|
|
1091
|
+
h._hotUpdating = !0, f._hmrPayload.state.forEach((l) => {
|
|
1092
|
+
if (l in h.$state) {
|
|
1093
|
+
const m = f.$state[l], S = h.$state[l];
|
|
1094
|
+
typeof m == "object" && V(m) && V(S) ? ft(m, S) : f.$state[l] = S;
|
|
1095
1095
|
}
|
|
1096
|
-
|
|
1097
|
-
}), Object.keys(
|
|
1098
|
-
|
|
1099
|
-
}),
|
|
1100
|
-
|
|
1096
|
+
Z(h, l, ue(f.$state, l));
|
|
1097
|
+
}), Object.keys(h.$state).forEach((l) => {
|
|
1098
|
+
l in f.$state || le(h, l);
|
|
1099
|
+
}), c = !1, d = !1, n.state.value[e] = ue(f._hmrPayload, "hotState"), d = !0, Ce().then(() => {
|
|
1100
|
+
c = !0;
|
|
1101
1101
|
});
|
|
1102
|
-
for (const
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1102
|
+
for (const l in f._hmrPayload.actions) {
|
|
1103
|
+
const m = f[l];
|
|
1104
|
+
Z(h, l, ae(m, l));
|
|
1105
1105
|
}
|
|
1106
|
-
for (const
|
|
1107
|
-
const
|
|
1106
|
+
for (const l in f._hmrPayload.getters) {
|
|
1107
|
+
const m = f._hmrPayload.getters[l], S = s ? (
|
|
1108
1108
|
// special handling of options api
|
|
1109
|
-
|
|
1110
|
-
) :
|
|
1111
|
-
|
|
1109
|
+
Ke(() => (X(n), m.call(h, h)))
|
|
1110
|
+
) : m;
|
|
1111
|
+
Z(h, l, S);
|
|
1112
1112
|
}
|
|
1113
|
-
Object.keys(
|
|
1114
|
-
|
|
1115
|
-
}), Object.keys(
|
|
1116
|
-
|
|
1117
|
-
}),
|
|
1118
|
-
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
1119
|
-
const
|
|
1113
|
+
Object.keys(h._hmrPayload.getters).forEach((l) => {
|
|
1114
|
+
l in f._hmrPayload.getters || le(h, l);
|
|
1115
|
+
}), Object.keys(h._hmrPayload.actions).forEach((l) => {
|
|
1116
|
+
l in f._hmrPayload.actions || le(h, l);
|
|
1117
|
+
}), h._hmrPayload = f._hmrPayload, h._getters = f._getters, h._hotUpdating = !1;
|
|
1118
|
+
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && M) {
|
|
1119
|
+
const f = {
|
|
1120
1120
|
writable: !0,
|
|
1121
1121
|
configurable: !0,
|
|
1122
1122
|
// avoid warning on devtools trying to display this property
|
|
1123
1123
|
enumerable: !1
|
|
1124
1124
|
};
|
|
1125
|
-
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((
|
|
1126
|
-
Object.defineProperty(
|
|
1125
|
+
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((l) => {
|
|
1126
|
+
Object.defineProperty(h, l, I({ value: h[l] }, f));
|
|
1127
1127
|
});
|
|
1128
1128
|
}
|
|
1129
|
-
return
|
|
1130
|
-
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
1131
|
-
const
|
|
1132
|
-
store:
|
|
1133
|
-
app:
|
|
1134
|
-
pinia:
|
|
1135
|
-
options:
|
|
1129
|
+
return n._p.forEach((f) => {
|
|
1130
|
+
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && M) {
|
|
1131
|
+
const l = a.run(() => f({
|
|
1132
|
+
store: h,
|
|
1133
|
+
app: n._a,
|
|
1134
|
+
pinia: n,
|
|
1135
|
+
options: i
|
|
1136
1136
|
}));
|
|
1137
|
-
Object.keys(
|
|
1137
|
+
Object.keys(l || {}).forEach((m) => h._customProperties.add(m)), I(h, l);
|
|
1138
1138
|
} else
|
|
1139
|
-
|
|
1140
|
-
store:
|
|
1141
|
-
app:
|
|
1142
|
-
pinia:
|
|
1143
|
-
options:
|
|
1139
|
+
I(h, a.run(() => f({
|
|
1140
|
+
store: h,
|
|
1141
|
+
app: n._a,
|
|
1142
|
+
pinia: n,
|
|
1143
|
+
options: i
|
|
1144
1144
|
})));
|
|
1145
|
-
}), process.env.NODE_ENV !== "production" &&
|
|
1145
|
+
}), process.env.NODE_ENV !== "production" && h.$state && typeof h.$state == "object" && typeof h.$state.constructor == "function" && !h.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
1146
1146
|
state: () => new MyClass()
|
|
1147
|
-
Found in store "${
|
|
1147
|
+
Found in store "${h.$id}".`), E && s && r.hydrate && r.hydrate(h.$state, E), c = !0, d = !0, h;
|
|
1148
1148
|
}
|
|
1149
1149
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
1150
1150
|
// @__NO_SIDE_EFFECTS__
|
|
1151
|
-
function
|
|
1152
|
-
let
|
|
1151
|
+
function vn(e, t, r) {
|
|
1152
|
+
let n, o;
|
|
1153
1153
|
const s = typeof t == "function";
|
|
1154
|
-
|
|
1155
|
-
function i
|
|
1156
|
-
const
|
|
1157
|
-
if (
|
|
1154
|
+
n = e, o = s ? r : t;
|
|
1155
|
+
function a(i, u) {
|
|
1156
|
+
const c = jt();
|
|
1157
|
+
if (i = // in test mode, ignore the argument provided as we can always retrieve a
|
|
1158
1158
|
// pinia instance with getActivePinia()
|
|
1159
|
-
(process.env.NODE_ENV === "test" &&
|
|
1159
|
+
(process.env.NODE_ENV === "test" && Q && Q._testing ? null : i) || (c ? Xe(nt, null) : null), i && X(i), process.env.NODE_ENV !== "production" && !Q)
|
|
1160
1160
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
1161
1161
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
1162
1162
|
This will fail in production.`);
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1165
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1163
|
+
i = Q, i._s.has(n) || (s ? _e(n, t, o, i) : xe(n, o, i), process.env.NODE_ENV !== "production" && (a._pinia = i));
|
|
1164
|
+
const d = i._s.get(n);
|
|
1165
|
+
if (process.env.NODE_ENV !== "production" && u) {
|
|
1166
|
+
const p = "__hot:" + n, g = s ? _e(p, t, o, i, !0) : xe(p, I({}, o), i, !0);
|
|
1167
|
+
u._hotUpdate(g), delete i.state.value[p], i._s.delete(p);
|
|
1168
1168
|
}
|
|
1169
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
1170
|
-
const
|
|
1171
|
-
if (
|
|
1172
|
-
!
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1169
|
+
if (process.env.NODE_ENV !== "production" && M) {
|
|
1170
|
+
const p = Rt();
|
|
1171
|
+
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
1172
|
+
!u) {
|
|
1173
|
+
const g = p.proxy, w = "_pStores" in g ? g._pStores : g._pStores = {};
|
|
1174
|
+
w[n] = d;
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
|
-
return
|
|
1177
|
+
return d;
|
|
1178
1178
|
}
|
|
1179
|
-
return
|
|
1179
|
+
return a.$id = n, a;
|
|
1180
1180
|
}
|
|
1181
|
-
const
|
|
1182
|
-
const e =
|
|
1181
|
+
const yn = /* @__PURE__ */ vn("data", () => {
|
|
1182
|
+
const e = R([]), t = R({});
|
|
1183
1183
|
return { records: e, record: t };
|
|
1184
1184
|
});
|
|
1185
|
-
function
|
|
1186
|
-
e || (e =
|
|
1185
|
+
function Tr(e) {
|
|
1186
|
+
e || (e = Xe("$registry"));
|
|
1187
1187
|
let t;
|
|
1188
1188
|
try {
|
|
1189
|
-
t =
|
|
1189
|
+
t = yn();
|
|
1190
1190
|
} catch {
|
|
1191
1191
|
throw new Error("Please enable the Stonecrop plugin before using the Stonecrop composable");
|
|
1192
1192
|
}
|
|
1193
|
-
const
|
|
1194
|
-
return
|
|
1195
|
-
var
|
|
1196
|
-
if (!e) return;
|
|
1197
|
-
const o = e.router.currentRoute.value, s = (
|
|
1198
|
-
if (!s && !
|
|
1193
|
+
const r = R(new me(e, t)), n = R(!1);
|
|
1194
|
+
return Ut(async () => {
|
|
1195
|
+
var u, c, d;
|
|
1196
|
+
if (!e || !e.router) return;
|
|
1197
|
+
const o = e.router.currentRoute.value, s = (u = o.params.records) == null ? void 0 : u.toString().toLowerCase(), a = (c = o.params.record) == null ? void 0 : c.toString().toLowerCase();
|
|
1198
|
+
if (!s && !a)
|
|
1199
1199
|
return;
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
}), { stonecrop:
|
|
1200
|
+
const i = await ((d = e.getMeta) == null ? void 0 : d.call(e, s));
|
|
1201
|
+
i && (e.addDoctype(i), r.value.setup(i), s && (a ? await r.value.getRecord(i, a) : await r.value.getRecords(i)), r.value.runAction(i, "LOAD", a ? [a] : void 0)), n.value = !0;
|
|
1202
|
+
}), { stonecrop: r, isReady: n };
|
|
1203
1203
|
}
|
|
1204
|
-
class
|
|
1204
|
+
class Dr {
|
|
1205
1205
|
// TODO: allow different components for different views; probably
|
|
1206
1206
|
// should be defined in the schema instead?
|
|
1207
|
-
constructor(t,
|
|
1207
|
+
constructor(t, r, n, o, s) {
|
|
1208
1208
|
/**
|
|
1209
1209
|
* The doctype name
|
|
1210
1210
|
* @public
|
|
1211
1211
|
* @readonly
|
|
1212
1212
|
*/
|
|
1213
|
-
|
|
1213
|
+
y(this, "doctype");
|
|
1214
1214
|
/**
|
|
1215
1215
|
* The doctype schema
|
|
1216
1216
|
* @public
|
|
1217
1217
|
* @readonly
|
|
1218
1218
|
*/
|
|
1219
|
-
|
|
1219
|
+
y(this, "schema");
|
|
1220
1220
|
/**
|
|
1221
1221
|
* The doctype workflow
|
|
1222
1222
|
* @public
|
|
1223
1223
|
* @readonly
|
|
1224
1224
|
*/
|
|
1225
|
-
|
|
1225
|
+
y(this, "workflow");
|
|
1226
1226
|
/**
|
|
1227
1227
|
* The doctype actions
|
|
1228
1228
|
* @public
|
|
1229
1229
|
* @readonly
|
|
1230
1230
|
*/
|
|
1231
|
-
|
|
1231
|
+
y(this, "actions");
|
|
1232
1232
|
/**
|
|
1233
1233
|
* The doctype component
|
|
1234
1234
|
* @public
|
|
1235
1235
|
* @readonly
|
|
1236
1236
|
*/
|
|
1237
|
-
|
|
1238
|
-
this.doctype = t, this.schema =
|
|
1237
|
+
y(this, "component");
|
|
1238
|
+
this.doctype = t, this.schema = r, this.workflow = n, this.actions = o, this.component = s;
|
|
1239
1239
|
}
|
|
1240
1240
|
/**
|
|
1241
1241
|
* Converts the registered doctype to a slug (kebab-case)
|
|
@@ -1246,32 +1246,32 @@ class Vi {
|
|
|
1246
1246
|
return this.doctype.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
1247
1247
|
}
|
|
1248
1248
|
}
|
|
1249
|
-
const
|
|
1250
|
-
constructor(t,
|
|
1249
|
+
const G = class G {
|
|
1250
|
+
constructor(t, r) {
|
|
1251
1251
|
/**
|
|
1252
1252
|
* The name of the Registry instance
|
|
1253
1253
|
*
|
|
1254
1254
|
* @defaultValue 'Registry'
|
|
1255
1255
|
*/
|
|
1256
|
-
|
|
1257
|
-
/**
|
|
1258
|
-
* The Vue router instance
|
|
1259
|
-
* @see {@link https://router.vuejs.org/}
|
|
1260
|
-
*/
|
|
1261
|
-
x(this, "router");
|
|
1256
|
+
y(this, "name");
|
|
1262
1257
|
/**
|
|
1263
1258
|
* The registry property contains a collection of doctypes
|
|
1264
1259
|
* @see {@link DoctypeMeta}
|
|
1265
1260
|
*/
|
|
1266
|
-
|
|
1261
|
+
y(this, "registry");
|
|
1262
|
+
/**
|
|
1263
|
+
* The Vue router instance
|
|
1264
|
+
* @see {@link https://router.vuejs.org/}
|
|
1265
|
+
*/
|
|
1266
|
+
y(this, "router");
|
|
1267
1267
|
/**
|
|
1268
1268
|
* The getMeta function fetches doctype metadata from an API
|
|
1269
1269
|
* @see {@link DoctypeMeta}
|
|
1270
1270
|
*/
|
|
1271
|
-
|
|
1272
|
-
if (
|
|
1273
|
-
return
|
|
1274
|
-
|
|
1271
|
+
y(this, "getMeta");
|
|
1272
|
+
if (G._root)
|
|
1273
|
+
return G._root;
|
|
1274
|
+
G._root = this, this.name = "Registry", this.registry = {}, this.router = t, this.getMeta = r;
|
|
1275
1275
|
}
|
|
1276
1276
|
/**
|
|
1277
1277
|
* Get doctype metadata
|
|
@@ -1280,7 +1280,7 @@ const Se = class Se {
|
|
|
1280
1280
|
* @see {@link DoctypeMeta}
|
|
1281
1281
|
*/
|
|
1282
1282
|
addDoctype(t) {
|
|
1283
|
-
t.doctype in Object.keys(this.registry) || (this.registry[t.slug] = t), !this.router.hasRoute(t.doctype) &&
|
|
1283
|
+
t.doctype in Object.keys(this.registry) || (this.registry[t.slug] = t), t.component && this.router && !this.router.hasRoute(t.doctype) && this.router.addRoute({
|
|
1284
1284
|
path: `/${t.slug}`,
|
|
1285
1285
|
name: t.slug,
|
|
1286
1286
|
component: t.component
|
|
@@ -1290,1857 +1290,58 @@ const Se = class Se {
|
|
|
1290
1290
|
/**
|
|
1291
1291
|
* The root Registry instance
|
|
1292
1292
|
*/
|
|
1293
|
-
|
|
1294
|
-
let
|
|
1295
|
-
|
|
1296
|
-
* vue-router v4.5.0
|
|
1297
|
-
* (c) 2024 Eduardo San Martin Morote
|
|
1298
|
-
* @license MIT
|
|
1299
|
-
*/
|
|
1300
|
-
const Z = typeof document < "u";
|
|
1301
|
-
function Vn(e) {
|
|
1302
|
-
return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
|
|
1303
|
-
}
|
|
1304
|
-
function no(e) {
|
|
1305
|
-
return e.__esModule || e[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
|
|
1306
|
-
// add the Module string tag
|
|
1307
|
-
e.default && Vn(e.default);
|
|
1308
|
-
}
|
|
1309
|
-
const I = Object.assign;
|
|
1310
|
-
function nt(e, t) {
|
|
1311
|
-
const n = {};
|
|
1312
|
-
for (const r in t) {
|
|
1313
|
-
const o = t[r];
|
|
1314
|
-
n[r] = H(o) ? o.map(e) : e(o);
|
|
1315
|
-
}
|
|
1316
|
-
return n;
|
|
1317
|
-
}
|
|
1318
|
-
const Re = () => {
|
|
1319
|
-
}, H = Array.isArray;
|
|
1320
|
-
function O(e) {
|
|
1321
|
-
const t = Array.from(arguments).slice(1);
|
|
1322
|
-
console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
|
|
1323
|
-
}
|
|
1324
|
-
const xn = /#/g, ro = /&/g, oo = /\//g, so = /=/g, io = /\?/g, jn = /\+/g, ao = /%5B/g, co = /%5D/g, Ln = /%5E/g, uo = /%60/g, Bn = /%7B/g, lo = /%7C/g, Un = /%7D/g, fo = /%20/g;
|
|
1325
|
-
function kt(e) {
|
|
1326
|
-
return encodeURI("" + e).replace(lo, "|").replace(ao, "[").replace(co, "]");
|
|
1327
|
-
}
|
|
1328
|
-
function ho(e) {
|
|
1329
|
-
return kt(e).replace(Bn, "{").replace(Un, "}").replace(Ln, "^");
|
|
1330
|
-
}
|
|
1331
|
-
function mt(e) {
|
|
1332
|
-
return kt(e).replace(jn, "%2B").replace(fo, "+").replace(xn, "%23").replace(ro, "%26").replace(uo, "`").replace(Bn, "{").replace(Un, "}").replace(Ln, "^");
|
|
1333
|
-
}
|
|
1334
|
-
function po(e) {
|
|
1335
|
-
return mt(e).replace(so, "%3D");
|
|
1336
|
-
}
|
|
1337
|
-
function mo(e) {
|
|
1338
|
-
return kt(e).replace(xn, "%23").replace(io, "%3F");
|
|
1339
|
-
}
|
|
1340
|
-
function go(e) {
|
|
1341
|
-
return e == null ? "" : mo(e).replace(oo, "%2F");
|
|
1342
|
-
}
|
|
1343
|
-
function Oe(e) {
|
|
1344
|
-
try {
|
|
1345
|
-
return decodeURIComponent("" + e);
|
|
1346
|
-
} catch {
|
|
1347
|
-
process.env.NODE_ENV !== "production" && O(`Error decoding "${e}". Using original value`);
|
|
1348
|
-
}
|
|
1349
|
-
return "" + e;
|
|
1350
|
-
}
|
|
1351
|
-
const vo = /\/$/, yo = (e) => e.replace(vo, "");
|
|
1352
|
-
function rt(e, t, n = "/") {
|
|
1353
|
-
let r, o = {}, s = "", i = "";
|
|
1354
|
-
const a = t.indexOf("#");
|
|
1355
|
-
let c = t.indexOf("?");
|
|
1356
|
-
return a < c && a >= 0 && (c = -1), c > -1 && (r = t.slice(0, c), s = t.slice(c + 1, a > -1 ? a : t.length), o = e(s)), a > -1 && (r = r || t.slice(0, a), i = t.slice(a, t.length)), r = wo(r ?? t, n), {
|
|
1357
|
-
fullPath: r + (s && "?") + s + i,
|
|
1358
|
-
path: r,
|
|
1359
|
-
query: o,
|
|
1360
|
-
hash: Oe(i)
|
|
1361
|
-
};
|
|
1362
|
-
}
|
|
1363
|
-
function _o(e, t) {
|
|
1364
|
-
const n = t.query ? e(t.query) : "";
|
|
1365
|
-
return t.path + (n && "?") + n + (t.hash || "");
|
|
1366
|
-
}
|
|
1367
|
-
function Gt(e, t) {
|
|
1368
|
-
return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
|
|
1369
|
-
}
|
|
1370
|
-
function zt(e, t, n) {
|
|
1371
|
-
const r = t.matched.length - 1, o = n.matched.length - 1;
|
|
1372
|
-
return r > -1 && r === o && ie(t.matched[r], n.matched[o]) && Fn(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
|
|
1373
|
-
}
|
|
1374
|
-
function ie(e, t) {
|
|
1375
|
-
return (e.aliasOf || e) === (t.aliasOf || t);
|
|
1376
|
-
}
|
|
1377
|
-
function Fn(e, t) {
|
|
1378
|
-
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1379
|
-
return !1;
|
|
1380
|
-
for (const n in e)
|
|
1381
|
-
if (!Eo(e[n], t[n]))
|
|
1382
|
-
return !1;
|
|
1383
|
-
return !0;
|
|
1384
|
-
}
|
|
1385
|
-
function Eo(e, t) {
|
|
1386
|
-
return H(e) ? qt(e, t) : H(t) ? qt(t, e) : e === t;
|
|
1387
|
-
}
|
|
1388
|
-
function qt(e, t) {
|
|
1389
|
-
return H(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
|
|
1390
|
-
}
|
|
1391
|
-
function wo(e, t) {
|
|
1392
|
-
if (e.startsWith("/"))
|
|
1393
|
-
return e;
|
|
1394
|
-
if (process.env.NODE_ENV !== "production" && !t.startsWith("/"))
|
|
1395
|
-
return O(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`), e;
|
|
1396
|
-
if (!e)
|
|
1397
|
-
return t;
|
|
1398
|
-
const n = t.split("/"), r = e.split("/"), o = r[r.length - 1];
|
|
1399
|
-
(o === ".." || o === ".") && r.push("");
|
|
1400
|
-
let s = n.length - 1, i, a;
|
|
1401
|
-
for (i = 0; i < r.length; i++)
|
|
1402
|
-
if (a = r[i], a !== ".")
|
|
1403
|
-
if (a === "..")
|
|
1404
|
-
s > 1 && s--;
|
|
1405
|
-
else
|
|
1406
|
-
break;
|
|
1407
|
-
return n.slice(0, s).join("/") + "/" + r.slice(i).join("/");
|
|
1408
|
-
}
|
|
1409
|
-
const te = {
|
|
1410
|
-
path: "/",
|
|
1411
|
-
// TODO: could we use a symbol in the future?
|
|
1412
|
-
name: void 0,
|
|
1413
|
-
params: {},
|
|
1414
|
-
query: {},
|
|
1415
|
-
hash: "",
|
|
1416
|
-
fullPath: "/",
|
|
1417
|
-
matched: [],
|
|
1418
|
-
meta: {},
|
|
1419
|
-
redirectedFrom: void 0
|
|
1420
|
-
};
|
|
1421
|
-
var De;
|
|
1422
|
-
(function(e) {
|
|
1423
|
-
e.pop = "pop", e.push = "push";
|
|
1424
|
-
})(De || (De = {}));
|
|
1425
|
-
var Ie;
|
|
1426
|
-
(function(e) {
|
|
1427
|
-
e.back = "back", e.forward = "forward", e.unknown = "";
|
|
1428
|
-
})(Ie || (Ie = {}));
|
|
1429
|
-
function bo(e) {
|
|
1430
|
-
if (!e)
|
|
1431
|
-
if (Z) {
|
|
1432
|
-
const t = document.querySelector("base");
|
|
1433
|
-
e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
|
|
1434
|
-
} else
|
|
1435
|
-
e = "/";
|
|
1436
|
-
return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), yo(e);
|
|
1437
|
-
}
|
|
1438
|
-
const So = /^[^#]+#/;
|
|
1439
|
-
function Oo(e, t) {
|
|
1440
|
-
return e.replace(So, "#") + t;
|
|
1441
|
-
}
|
|
1442
|
-
function No(e, t) {
|
|
1443
|
-
const n = document.documentElement.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
1444
|
-
return {
|
|
1445
|
-
behavior: t.behavior,
|
|
1446
|
-
left: r.left - n.left - (t.left || 0),
|
|
1447
|
-
top: r.top - n.top - (t.top || 0)
|
|
1448
|
-
};
|
|
1449
|
-
}
|
|
1450
|
-
const ze = () => ({
|
|
1451
|
-
left: window.scrollX,
|
|
1452
|
-
top: window.scrollY
|
|
1453
|
-
});
|
|
1454
|
-
function ko(e) {
|
|
1455
|
-
let t;
|
|
1456
|
-
if ("el" in e) {
|
|
1457
|
-
const n = e.el, r = typeof n == "string" && n.startsWith("#");
|
|
1458
|
-
if (process.env.NODE_ENV !== "production" && typeof e.el == "string" && (!r || !document.getElementById(e.el.slice(1))))
|
|
1459
|
-
try {
|
|
1460
|
-
const s = document.querySelector(e.el);
|
|
1461
|
-
if (r && s) {
|
|
1462
|
-
O(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);
|
|
1463
|
-
return;
|
|
1464
|
-
}
|
|
1465
|
-
} catch {
|
|
1466
|
-
O(`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).`);
|
|
1467
|
-
return;
|
|
1468
|
-
}
|
|
1469
|
-
const o = typeof n == "string" ? r ? document.getElementById(n.slice(1)) : document.querySelector(n) : n;
|
|
1470
|
-
if (!o) {
|
|
1471
|
-
process.env.NODE_ENV !== "production" && O(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);
|
|
1472
|
-
return;
|
|
1473
|
-
}
|
|
1474
|
-
t = No(o, e);
|
|
1475
|
-
} else
|
|
1476
|
-
t = e;
|
|
1477
|
-
"scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.scrollX, t.top != null ? t.top : window.scrollY);
|
|
1478
|
-
}
|
|
1479
|
-
function Jt(e, t) {
|
|
1480
|
-
return (history.state ? history.state.position - t : -1) + e;
|
|
1481
|
-
}
|
|
1482
|
-
const gt = /* @__PURE__ */ new Map();
|
|
1483
|
-
function Po(e, t) {
|
|
1484
|
-
gt.set(e, t);
|
|
1485
|
-
}
|
|
1486
|
-
function $o(e) {
|
|
1487
|
-
const t = gt.get(e);
|
|
1488
|
-
return gt.delete(e), t;
|
|
1489
|
-
}
|
|
1490
|
-
let Ro = () => location.protocol + "//" + location.host;
|
|
1491
|
-
function Hn(e, t) {
|
|
1492
|
-
const { pathname: n, search: r, hash: o } = t, s = e.indexOf("#");
|
|
1493
|
-
if (s > -1) {
|
|
1494
|
-
let a = o.includes(e.slice(s)) ? e.slice(s).length : 1, c = o.slice(a);
|
|
1495
|
-
return c[0] !== "/" && (c = "/" + c), Gt(c, "");
|
|
1496
|
-
}
|
|
1497
|
-
return Gt(n, e) + r + o;
|
|
1498
|
-
}
|
|
1499
|
-
function Io(e, t, n, r) {
|
|
1500
|
-
let o = [], s = [], i = null;
|
|
1501
|
-
const a = ({ state: d }) => {
|
|
1502
|
-
const p = Hn(e, location), w = n.value, S = t.value;
|
|
1503
|
-
let E = 0;
|
|
1504
|
-
if (d) {
|
|
1505
|
-
if (n.value = p, t.value = d, i && i === w) {
|
|
1506
|
-
i = null;
|
|
1507
|
-
return;
|
|
1508
|
-
}
|
|
1509
|
-
E = S ? d.position - S.position : 0;
|
|
1510
|
-
} else
|
|
1511
|
-
r(p);
|
|
1512
|
-
o.forEach((R) => {
|
|
1513
|
-
R(n.value, w, {
|
|
1514
|
-
delta: E,
|
|
1515
|
-
type: De.pop,
|
|
1516
|
-
direction: E ? E > 0 ? Ie.forward : Ie.back : Ie.unknown
|
|
1517
|
-
});
|
|
1518
|
-
});
|
|
1519
|
-
};
|
|
1520
|
-
function c() {
|
|
1521
|
-
i = n.value;
|
|
1522
|
-
}
|
|
1523
|
-
function l(d) {
|
|
1524
|
-
o.push(d);
|
|
1525
|
-
const p = () => {
|
|
1526
|
-
const w = o.indexOf(d);
|
|
1527
|
-
w > -1 && o.splice(w, 1);
|
|
1528
|
-
};
|
|
1529
|
-
return s.push(p), p;
|
|
1530
|
-
}
|
|
1531
|
-
function f() {
|
|
1532
|
-
const { history: d } = window;
|
|
1533
|
-
d.state && d.replaceState(I({}, d.state, { scroll: ze() }), "");
|
|
1534
|
-
}
|
|
1535
|
-
function u() {
|
|
1536
|
-
for (const d of s)
|
|
1537
|
-
d();
|
|
1538
|
-
s = [], window.removeEventListener("popstate", a), window.removeEventListener("beforeunload", f);
|
|
1539
|
-
}
|
|
1540
|
-
return window.addEventListener("popstate", a), window.addEventListener("beforeunload", f, {
|
|
1541
|
-
passive: !0
|
|
1542
|
-
}), {
|
|
1543
|
-
pauseListeners: c,
|
|
1544
|
-
listen: l,
|
|
1545
|
-
destroy: u
|
|
1546
|
-
};
|
|
1547
|
-
}
|
|
1548
|
-
function Kt(e, t, n, r = !1, o = !1) {
|
|
1549
|
-
return {
|
|
1550
|
-
back: e,
|
|
1551
|
-
current: t,
|
|
1552
|
-
forward: n,
|
|
1553
|
-
replaced: r,
|
|
1554
|
-
position: window.history.length,
|
|
1555
|
-
scroll: o ? ze() : null
|
|
1556
|
-
};
|
|
1557
|
-
}
|
|
1558
|
-
function Co(e) {
|
|
1559
|
-
const { history: t, location: n } = window, r = {
|
|
1560
|
-
value: Hn(e, n)
|
|
1561
|
-
}, o = { value: t.state };
|
|
1562
|
-
o.value || s(r.value, {
|
|
1563
|
-
back: null,
|
|
1564
|
-
current: r.value,
|
|
1565
|
-
forward: null,
|
|
1566
|
-
// the length is off by one, we need to decrease it
|
|
1567
|
-
position: t.length - 1,
|
|
1568
|
-
replaced: !0,
|
|
1569
|
-
// don't add a scroll as the user may have an anchor, and we want
|
|
1570
|
-
// scrollBehavior to be triggered without a saved position
|
|
1571
|
-
scroll: null
|
|
1572
|
-
}, !0);
|
|
1573
|
-
function s(c, l, f) {
|
|
1574
|
-
const u = e.indexOf("#"), d = u > -1 ? (n.host && document.querySelector("base") ? e : e.slice(u)) + c : Ro() + e + c;
|
|
1575
|
-
try {
|
|
1576
|
-
t[f ? "replaceState" : "pushState"](l, "", d), o.value = l;
|
|
1577
|
-
} catch (p) {
|
|
1578
|
-
process.env.NODE_ENV !== "production" ? O("Error with push/replace State", p) : console.error(p), n[f ? "replace" : "assign"](d);
|
|
1579
|
-
}
|
|
1580
|
-
}
|
|
1581
|
-
function i(c, l) {
|
|
1582
|
-
const f = I({}, t.state, Kt(
|
|
1583
|
-
o.value.back,
|
|
1584
|
-
// keep back and forward entries but override current position
|
|
1585
|
-
c,
|
|
1586
|
-
o.value.forward,
|
|
1587
|
-
!0
|
|
1588
|
-
), l, { position: o.value.position });
|
|
1589
|
-
s(c, f, !0), r.value = c;
|
|
1590
|
-
}
|
|
1591
|
-
function a(c, l) {
|
|
1592
|
-
const f = I(
|
|
1593
|
-
{},
|
|
1594
|
-
// use current history state to gracefully handle a wrong call to
|
|
1595
|
-
// history.replaceState
|
|
1596
|
-
// https://github.com/vuejs/router/issues/366
|
|
1597
|
-
o.value,
|
|
1598
|
-
t.state,
|
|
1599
|
-
{
|
|
1600
|
-
forward: c,
|
|
1601
|
-
scroll: ze()
|
|
1602
|
-
}
|
|
1603
|
-
);
|
|
1604
|
-
process.env.NODE_ENV !== "production" && !t.state && O(`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:
|
|
1605
|
-
|
|
1606
|
-
history.replaceState(history.state, '', url)
|
|
1607
|
-
|
|
1608
|
-
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`), s(f.current, f, !0);
|
|
1609
|
-
const u = I({}, Kt(r.value, c, null), { position: f.position + 1 }, l);
|
|
1610
|
-
s(c, u, !1), r.value = c;
|
|
1611
|
-
}
|
|
1612
|
-
return {
|
|
1613
|
-
location: r,
|
|
1614
|
-
state: o,
|
|
1615
|
-
push: a,
|
|
1616
|
-
replace: i
|
|
1617
|
-
};
|
|
1618
|
-
}
|
|
1619
|
-
function Ao(e) {
|
|
1620
|
-
e = bo(e);
|
|
1621
|
-
const t = Co(e), n = Io(e, t.state, t.location, t.replace);
|
|
1622
|
-
function r(s, i = !0) {
|
|
1623
|
-
i || n.pauseListeners(), history.go(s);
|
|
1624
|
-
}
|
|
1625
|
-
const o = I({
|
|
1626
|
-
// it's overridden right after
|
|
1627
|
-
location: "",
|
|
1628
|
-
base: e,
|
|
1629
|
-
go: r,
|
|
1630
|
-
createHref: Oo.bind(null, e)
|
|
1631
|
-
}, t, n);
|
|
1632
|
-
return Object.defineProperty(o, "location", {
|
|
1633
|
-
enumerable: !0,
|
|
1634
|
-
get: () => t.location.value
|
|
1635
|
-
}), Object.defineProperty(o, "state", {
|
|
1636
|
-
enumerable: !0,
|
|
1637
|
-
get: () => t.state.value
|
|
1638
|
-
}), o;
|
|
1639
|
-
}
|
|
1640
|
-
function Ge(e) {
|
|
1641
|
-
return typeof e == "string" || e && typeof e == "object";
|
|
1642
|
-
}
|
|
1643
|
-
function Wn(e) {
|
|
1644
|
-
return typeof e == "string" || typeof e == "symbol";
|
|
1645
|
-
}
|
|
1646
|
-
const vt = Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
|
|
1647
|
-
var Qt;
|
|
1648
|
-
(function(e) {
|
|
1649
|
-
e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
|
|
1650
|
-
})(Qt || (Qt = {}));
|
|
1651
|
-
const To = {
|
|
1652
|
-
1({ location: e, currentLocation: t }) {
|
|
1653
|
-
return `No match for
|
|
1654
|
-
${JSON.stringify(e)}${t ? `
|
|
1655
|
-
while being at
|
|
1656
|
-
` + JSON.stringify(t) : ""}`;
|
|
1657
|
-
},
|
|
1658
|
-
2({ from: e, to: t }) {
|
|
1659
|
-
return `Redirected from "${e.fullPath}" to "${Mo(t)}" via a navigation guard.`;
|
|
1660
|
-
},
|
|
1661
|
-
4({ from: e, to: t }) {
|
|
1662
|
-
return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`;
|
|
1663
|
-
},
|
|
1664
|
-
8({ from: e, to: t }) {
|
|
1665
|
-
return `Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`;
|
|
1666
|
-
},
|
|
1667
|
-
16({ from: e, to: t }) {
|
|
1668
|
-
return `Avoided redundant navigation to current location: "${e.fullPath}".`;
|
|
1669
|
-
}
|
|
1670
|
-
};
|
|
1671
|
-
function Ne(e, t) {
|
|
1672
|
-
return process.env.NODE_ENV !== "production" ? I(new Error(To[e](t)), {
|
|
1673
|
-
type: e,
|
|
1674
|
-
[vt]: !0
|
|
1675
|
-
}, t) : I(new Error(), {
|
|
1676
|
-
type: e,
|
|
1677
|
-
[vt]: !0
|
|
1678
|
-
}, t);
|
|
1679
|
-
}
|
|
1680
|
-
function X(e, t) {
|
|
1681
|
-
return e instanceof Error && vt in e && (t == null || !!(e.type & t));
|
|
1682
|
-
}
|
|
1683
|
-
const Do = ["params", "query", "hash"];
|
|
1684
|
-
function Mo(e) {
|
|
1685
|
-
if (typeof e == "string")
|
|
1686
|
-
return e;
|
|
1687
|
-
if (e.path != null)
|
|
1688
|
-
return e.path;
|
|
1689
|
-
const t = {};
|
|
1690
|
-
for (const n of Do)
|
|
1691
|
-
n in e && (t[n] = e[n]);
|
|
1692
|
-
return JSON.stringify(t, null, 2);
|
|
1693
|
-
}
|
|
1694
|
-
const Yt = "[^/]+?", Vo = {
|
|
1695
|
-
sensitive: !1,
|
|
1696
|
-
strict: !1,
|
|
1697
|
-
start: !0,
|
|
1698
|
-
end: !0
|
|
1699
|
-
}, xo = /[.+*?^${}()[\]/\\]/g;
|
|
1700
|
-
function jo(e, t) {
|
|
1701
|
-
const n = I({}, Vo, t), r = [];
|
|
1702
|
-
let o = n.start ? "^" : "";
|
|
1703
|
-
const s = [];
|
|
1704
|
-
for (const l of e) {
|
|
1705
|
-
const f = l.length ? [] : [
|
|
1706
|
-
90
|
|
1707
|
-
/* PathScore.Root */
|
|
1708
|
-
];
|
|
1709
|
-
n.strict && !l.length && (o += "/");
|
|
1710
|
-
for (let u = 0; u < l.length; u++) {
|
|
1711
|
-
const d = l[u];
|
|
1712
|
-
let p = 40 + (n.sensitive ? 0.25 : 0);
|
|
1713
|
-
if (d.type === 0)
|
|
1714
|
-
u || (o += "/"), o += d.value.replace(xo, "\\$&"), p += 40;
|
|
1715
|
-
else if (d.type === 1) {
|
|
1716
|
-
const { value: w, repeatable: S, optional: E, regexp: R } = d;
|
|
1717
|
-
s.push({
|
|
1718
|
-
name: w,
|
|
1719
|
-
repeatable: S,
|
|
1720
|
-
optional: E
|
|
1721
|
-
});
|
|
1722
|
-
const k = R || Yt;
|
|
1723
|
-
if (k !== Yt) {
|
|
1724
|
-
p += 10;
|
|
1725
|
-
try {
|
|
1726
|
-
new RegExp(`(${k})`);
|
|
1727
|
-
} catch (M) {
|
|
1728
|
-
throw new Error(`Invalid custom RegExp for param "${w}" (${k}): ` + M.message);
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
let P = S ? `((?:${k})(?:/(?:${k}))*)` : `(${k})`;
|
|
1732
|
-
u || (P = // avoid an optional / if there are more segments e.g. /:p?-static
|
|
1733
|
-
// or /:p?-:p2
|
|
1734
|
-
E && l.length < 2 ? `(?:/${P})` : "/" + P), E && (P += "?"), o += P, p += 20, E && (p += -8), S && (p += -20), k === ".*" && (p += -50);
|
|
1735
|
-
}
|
|
1736
|
-
f.push(p);
|
|
1737
|
-
}
|
|
1738
|
-
r.push(f);
|
|
1739
|
-
}
|
|
1740
|
-
if (n.strict && n.end) {
|
|
1741
|
-
const l = r.length - 1;
|
|
1742
|
-
r[l][r[l].length - 1] += 0.7000000000000001;
|
|
1743
|
-
}
|
|
1744
|
-
n.strict || (o += "/?"), n.end ? o += "$" : n.strict && !o.endsWith("/") && (o += "(?:/|$)");
|
|
1745
|
-
const i = new RegExp(o, n.sensitive ? "" : "i");
|
|
1746
|
-
function a(l) {
|
|
1747
|
-
const f = l.match(i), u = {};
|
|
1748
|
-
if (!f)
|
|
1749
|
-
return null;
|
|
1750
|
-
for (let d = 1; d < f.length; d++) {
|
|
1751
|
-
const p = f[d] || "", w = s[d - 1];
|
|
1752
|
-
u[w.name] = p && w.repeatable ? p.split("/") : p;
|
|
1753
|
-
}
|
|
1754
|
-
return u;
|
|
1755
|
-
}
|
|
1756
|
-
function c(l) {
|
|
1757
|
-
let f = "", u = !1;
|
|
1758
|
-
for (const d of e) {
|
|
1759
|
-
(!u || !f.endsWith("/")) && (f += "/"), u = !1;
|
|
1760
|
-
for (const p of d)
|
|
1761
|
-
if (p.type === 0)
|
|
1762
|
-
f += p.value;
|
|
1763
|
-
else if (p.type === 1) {
|
|
1764
|
-
const { value: w, repeatable: S, optional: E } = p, R = w in l ? l[w] : "";
|
|
1765
|
-
if (H(R) && !S)
|
|
1766
|
-
throw new Error(`Provided param "${w}" is an array but it is not repeatable (* or + modifiers)`);
|
|
1767
|
-
const k = H(R) ? R.join("/") : R;
|
|
1768
|
-
if (!k)
|
|
1769
|
-
if (E)
|
|
1770
|
-
d.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : u = !0);
|
|
1771
|
-
else
|
|
1772
|
-
throw new Error(`Missing required param "${w}"`);
|
|
1773
|
-
f += k;
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
return f || "/";
|
|
1777
|
-
}
|
|
1778
|
-
return {
|
|
1779
|
-
re: i,
|
|
1780
|
-
score: r,
|
|
1781
|
-
keys: s,
|
|
1782
|
-
parse: a,
|
|
1783
|
-
stringify: c
|
|
1784
|
-
};
|
|
1785
|
-
}
|
|
1786
|
-
function Lo(e, t) {
|
|
1787
|
-
let n = 0;
|
|
1788
|
-
for (; n < e.length && n < t.length; ) {
|
|
1789
|
-
const r = t[n] - e[n];
|
|
1790
|
-
if (r)
|
|
1791
|
-
return r;
|
|
1792
|
-
n++;
|
|
1793
|
-
}
|
|
1794
|
-
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;
|
|
1795
|
-
}
|
|
1796
|
-
function Gn(e, t) {
|
|
1797
|
-
let n = 0;
|
|
1798
|
-
const r = e.score, o = t.score;
|
|
1799
|
-
for (; n < r.length && n < o.length; ) {
|
|
1800
|
-
const s = Lo(r[n], o[n]);
|
|
1801
|
-
if (s)
|
|
1802
|
-
return s;
|
|
1803
|
-
n++;
|
|
1804
|
-
}
|
|
1805
|
-
if (Math.abs(o.length - r.length) === 1) {
|
|
1806
|
-
if (Xt(r))
|
|
1807
|
-
return 1;
|
|
1808
|
-
if (Xt(o))
|
|
1809
|
-
return -1;
|
|
1810
|
-
}
|
|
1811
|
-
return o.length - r.length;
|
|
1812
|
-
}
|
|
1813
|
-
function Xt(e) {
|
|
1814
|
-
const t = e[e.length - 1];
|
|
1815
|
-
return e.length > 0 && t[t.length - 1] < 0;
|
|
1816
|
-
}
|
|
1817
|
-
const Bo = {
|
|
1818
|
-
type: 0,
|
|
1819
|
-
value: ""
|
|
1820
|
-
}, Uo = /[a-zA-Z0-9_]/;
|
|
1821
|
-
function Fo(e) {
|
|
1822
|
-
if (!e)
|
|
1823
|
-
return [[]];
|
|
1824
|
-
if (e === "/")
|
|
1825
|
-
return [[Bo]];
|
|
1826
|
-
if (!e.startsWith("/"))
|
|
1827
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
|
|
1828
|
-
function t(p) {
|
|
1829
|
-
throw new Error(`ERR (${n})/"${l}": ${p}`);
|
|
1830
|
-
}
|
|
1831
|
-
let n = 0, r = n;
|
|
1832
|
-
const o = [];
|
|
1833
|
-
let s;
|
|
1834
|
-
function i() {
|
|
1835
|
-
s && o.push(s), s = [];
|
|
1836
|
-
}
|
|
1837
|
-
let a = 0, c, l = "", f = "";
|
|
1838
|
-
function u() {
|
|
1839
|
-
l && (n === 0 ? s.push({
|
|
1840
|
-
type: 0,
|
|
1841
|
-
value: l
|
|
1842
|
-
}) : n === 1 || n === 2 || n === 3 ? (s.length > 1 && (c === "*" || c === "+") && t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`), s.push({
|
|
1843
|
-
type: 1,
|
|
1844
|
-
value: l,
|
|
1845
|
-
regexp: f,
|
|
1846
|
-
repeatable: c === "*" || c === "+",
|
|
1847
|
-
optional: c === "*" || c === "?"
|
|
1848
|
-
})) : t("Invalid state to consume buffer"), l = "");
|
|
1849
|
-
}
|
|
1850
|
-
function d() {
|
|
1851
|
-
l += c;
|
|
1852
|
-
}
|
|
1853
|
-
for (; a < e.length; ) {
|
|
1854
|
-
if (c = e[a++], c === "\\" && n !== 2) {
|
|
1855
|
-
r = n, n = 4;
|
|
1856
|
-
continue;
|
|
1857
|
-
}
|
|
1858
|
-
switch (n) {
|
|
1859
|
-
case 0:
|
|
1860
|
-
c === "/" ? (l && u(), i()) : c === ":" ? (u(), n = 1) : d();
|
|
1861
|
-
break;
|
|
1862
|
-
case 4:
|
|
1863
|
-
d(), n = r;
|
|
1864
|
-
break;
|
|
1865
|
-
case 1:
|
|
1866
|
-
c === "(" ? n = 2 : Uo.test(c) ? d() : (u(), n = 0, c !== "*" && c !== "?" && c !== "+" && a--);
|
|
1867
|
-
break;
|
|
1868
|
-
case 2:
|
|
1869
|
-
c === ")" ? f[f.length - 1] == "\\" ? f = f.slice(0, -1) + c : n = 3 : f += c;
|
|
1870
|
-
break;
|
|
1871
|
-
case 3:
|
|
1872
|
-
u(), n = 0, c !== "*" && c !== "?" && c !== "+" && a--, f = "";
|
|
1873
|
-
break;
|
|
1874
|
-
default:
|
|
1875
|
-
t("Unknown state");
|
|
1876
|
-
break;
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
return n === 2 && t(`Unfinished custom RegExp for param "${l}"`), u(), i(), o;
|
|
1880
|
-
}
|
|
1881
|
-
function Ho(e, t, n) {
|
|
1882
|
-
const r = jo(Fo(e.path), n);
|
|
1883
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1884
|
-
const s = /* @__PURE__ */ new Set();
|
|
1885
|
-
for (const i of r.keys)
|
|
1886
|
-
s.has(i.name) && O(`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);
|
|
1887
|
-
}
|
|
1888
|
-
const o = I(r, {
|
|
1889
|
-
record: e,
|
|
1890
|
-
parent: t,
|
|
1891
|
-
// these needs to be populated by the parent
|
|
1892
|
-
children: [],
|
|
1893
|
-
alias: []
|
|
1894
|
-
});
|
|
1895
|
-
return t && !o.record.aliasOf == !t.record.aliasOf && t.children.push(o), o;
|
|
1896
|
-
}
|
|
1897
|
-
function Wo(e, t) {
|
|
1898
|
-
const n = [], r = /* @__PURE__ */ new Map();
|
|
1899
|
-
t = nn({ strict: !1, end: !0, sensitive: !1 }, t);
|
|
1900
|
-
function o(u) {
|
|
1901
|
-
return r.get(u);
|
|
1902
|
-
}
|
|
1903
|
-
function s(u, d, p) {
|
|
1904
|
-
const w = !p, S = en(u);
|
|
1905
|
-
process.env.NODE_ENV !== "production" && Jo(S, d), S.aliasOf = p && p.record;
|
|
1906
|
-
const E = nn(t, u), R = [S];
|
|
1907
|
-
if ("alias" in u) {
|
|
1908
|
-
const M = typeof u.alias == "string" ? [u.alias] : u.alias;
|
|
1909
|
-
for (const B of M)
|
|
1910
|
-
R.push(
|
|
1911
|
-
// we need to normalize again to ensure the `mods` property
|
|
1912
|
-
// being non enumerable
|
|
1913
|
-
en(I({}, S, {
|
|
1914
|
-
// this allows us to hold a copy of the `components` option
|
|
1915
|
-
// so that async components cache is hold on the original record
|
|
1916
|
-
components: p ? p.record.components : S.components,
|
|
1917
|
-
path: B,
|
|
1918
|
-
// we might be the child of an alias
|
|
1919
|
-
aliasOf: p ? p.record : S
|
|
1920
|
-
// the aliases are always of the same kind as the original since they
|
|
1921
|
-
// are defined on the same record
|
|
1922
|
-
}))
|
|
1923
|
-
);
|
|
1924
|
-
}
|
|
1925
|
-
let k, P;
|
|
1926
|
-
for (const M of R) {
|
|
1927
|
-
const { path: B } = M;
|
|
1928
|
-
if (d && B[0] !== "/") {
|
|
1929
|
-
const q = d.record.path, b = q[q.length - 1] === "/" ? "" : "/";
|
|
1930
|
-
M.path = d.record.path + (B && b + B);
|
|
1931
|
-
}
|
|
1932
|
-
if (process.env.NODE_ENV !== "production" && M.path === "*")
|
|
1933
|
-
throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
|
1934
|
-
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
|
|
1935
|
-
if (k = Ho(M, d, E), process.env.NODE_ENV !== "production" && d && B[0] === "/" && Qo(k, d), p ? (p.alias.push(k), process.env.NODE_ENV !== "production" && qo(p, k)) : (P = P || k, P !== k && P.alias.push(k), w && u.name && !tn(k) && (process.env.NODE_ENV !== "production" && Ko(u, d), i(u.name))), zn(k) && c(k), S.children) {
|
|
1936
|
-
const q = S.children;
|
|
1937
|
-
for (let b = 0; b < q.length; b++)
|
|
1938
|
-
s(q[b], k, p && p.children[b]);
|
|
1939
|
-
}
|
|
1940
|
-
p = p || k;
|
|
1941
|
-
}
|
|
1942
|
-
return P ? () => {
|
|
1943
|
-
i(P);
|
|
1944
|
-
} : Re;
|
|
1945
|
-
}
|
|
1946
|
-
function i(u) {
|
|
1947
|
-
if (Wn(u)) {
|
|
1948
|
-
const d = r.get(u);
|
|
1949
|
-
d && (r.delete(u), n.splice(n.indexOf(d), 1), d.children.forEach(i), d.alias.forEach(i));
|
|
1950
|
-
} else {
|
|
1951
|
-
const d = n.indexOf(u);
|
|
1952
|
-
d > -1 && (n.splice(d, 1), u.record.name && r.delete(u.record.name), u.children.forEach(i), u.alias.forEach(i));
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
function a() {
|
|
1956
|
-
return n;
|
|
1957
|
-
}
|
|
1958
|
-
function c(u) {
|
|
1959
|
-
const d = Yo(u, n);
|
|
1960
|
-
n.splice(d, 0, u), u.record.name && !tn(u) && r.set(u.record.name, u);
|
|
1961
|
-
}
|
|
1962
|
-
function l(u, d) {
|
|
1963
|
-
let p, w = {}, S, E;
|
|
1964
|
-
if ("name" in u && u.name) {
|
|
1965
|
-
if (p = r.get(u.name), !p)
|
|
1966
|
-
throw Ne(1, {
|
|
1967
|
-
location: u
|
|
1968
|
-
});
|
|
1969
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1970
|
-
const P = Object.keys(u.params || {}).filter((M) => !p.keys.find((B) => B.name === M));
|
|
1971
|
-
P.length && O(`Discarded invalid param(s) "${P.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
|
|
1972
|
-
}
|
|
1973
|
-
E = p.record.name, w = I(
|
|
1974
|
-
// paramsFromLocation is a new object
|
|
1975
|
-
Zt(
|
|
1976
|
-
d.params,
|
|
1977
|
-
// only keep params that exist in the resolved location
|
|
1978
|
-
// only keep optional params coming from a parent record
|
|
1979
|
-
p.keys.filter((P) => !P.optional).concat(p.parent ? p.parent.keys.filter((P) => P.optional) : []).map((P) => P.name)
|
|
1980
|
-
),
|
|
1981
|
-
// discard any existing params in the current location that do not exist here
|
|
1982
|
-
// #1497 this ensures better active/exact matching
|
|
1983
|
-
u.params && Zt(u.params, p.keys.map((P) => P.name))
|
|
1984
|
-
), S = p.stringify(w);
|
|
1985
|
-
} else if (u.path != null)
|
|
1986
|
-
S = u.path, process.env.NODE_ENV !== "production" && !S.startsWith("/") && O(`The Matcher cannot resolve relative paths but received "${S}". Unless you directly called \`matcher.resolve("${S}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), p = n.find((P) => P.re.test(S)), p && (w = p.parse(S), E = p.record.name);
|
|
1987
|
-
else {
|
|
1988
|
-
if (p = d.name ? r.get(d.name) : n.find((P) => P.re.test(d.path)), !p)
|
|
1989
|
-
throw Ne(1, {
|
|
1990
|
-
location: u,
|
|
1991
|
-
currentLocation: d
|
|
1992
|
-
});
|
|
1993
|
-
E = p.record.name, w = I({}, d.params, u.params), S = p.stringify(w);
|
|
1994
|
-
}
|
|
1995
|
-
const R = [];
|
|
1996
|
-
let k = p;
|
|
1997
|
-
for (; k; )
|
|
1998
|
-
R.unshift(k.record), k = k.parent;
|
|
1999
|
-
return {
|
|
2000
|
-
name: E,
|
|
2001
|
-
path: S,
|
|
2002
|
-
params: w,
|
|
2003
|
-
matched: R,
|
|
2004
|
-
meta: zo(R)
|
|
2005
|
-
};
|
|
2006
|
-
}
|
|
2007
|
-
e.forEach((u) => s(u));
|
|
2008
|
-
function f() {
|
|
2009
|
-
n.length = 0, r.clear();
|
|
2010
|
-
}
|
|
2011
|
-
return {
|
|
2012
|
-
addRoute: s,
|
|
2013
|
-
resolve: l,
|
|
2014
|
-
removeRoute: i,
|
|
2015
|
-
clearRoutes: f,
|
|
2016
|
-
getRoutes: a,
|
|
2017
|
-
getRecordMatcher: o
|
|
2018
|
-
};
|
|
2019
|
-
}
|
|
2020
|
-
function Zt(e, t) {
|
|
2021
|
-
const n = {};
|
|
2022
|
-
for (const r of t)
|
|
2023
|
-
r in e && (n[r] = e[r]);
|
|
2024
|
-
return n;
|
|
2025
|
-
}
|
|
2026
|
-
function en(e) {
|
|
2027
|
-
const t = {
|
|
2028
|
-
path: e.path,
|
|
2029
|
-
redirect: e.redirect,
|
|
2030
|
-
name: e.name,
|
|
2031
|
-
meta: e.meta || {},
|
|
2032
|
-
aliasOf: e.aliasOf,
|
|
2033
|
-
beforeEnter: e.beforeEnter,
|
|
2034
|
-
props: Go(e),
|
|
2035
|
-
children: e.children || [],
|
|
2036
|
-
instances: {},
|
|
2037
|
-
leaveGuards: /* @__PURE__ */ new Set(),
|
|
2038
|
-
updateGuards: /* @__PURE__ */ new Set(),
|
|
2039
|
-
enterCallbacks: {},
|
|
2040
|
-
// must be declared afterwards
|
|
2041
|
-
// mods: {},
|
|
2042
|
-
components: "components" in e ? e.components || null : e.component && { default: e.component }
|
|
2043
|
-
};
|
|
2044
|
-
return Object.defineProperty(t, "mods", {
|
|
2045
|
-
value: {}
|
|
2046
|
-
}), t;
|
|
2047
|
-
}
|
|
2048
|
-
function Go(e) {
|
|
2049
|
-
const t = {}, n = e.props || !1;
|
|
2050
|
-
if ("component" in e)
|
|
2051
|
-
t.default = n;
|
|
2052
|
-
else
|
|
2053
|
-
for (const r in e.components)
|
|
2054
|
-
t[r] = typeof n == "object" ? n[r] : n;
|
|
2055
|
-
return t;
|
|
2056
|
-
}
|
|
2057
|
-
function tn(e) {
|
|
2058
|
-
for (; e; ) {
|
|
2059
|
-
if (e.record.aliasOf)
|
|
2060
|
-
return !0;
|
|
2061
|
-
e = e.parent;
|
|
2062
|
-
}
|
|
2063
|
-
return !1;
|
|
2064
|
-
}
|
|
2065
|
-
function zo(e) {
|
|
2066
|
-
return e.reduce((t, n) => I(t, n.meta), {});
|
|
2067
|
-
}
|
|
2068
|
-
function nn(e, t) {
|
|
2069
|
-
const n = {};
|
|
2070
|
-
for (const r in e)
|
|
2071
|
-
n[r] = r in t ? t[r] : e[r];
|
|
2072
|
-
return n;
|
|
2073
|
-
}
|
|
2074
|
-
function yt(e, t) {
|
|
2075
|
-
return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
|
|
2076
|
-
}
|
|
2077
|
-
function qo(e, t) {
|
|
2078
|
-
for (const n of e.keys)
|
|
2079
|
-
if (!n.optional && !t.keys.find(yt.bind(null, n)))
|
|
2080
|
-
return O(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
|
2081
|
-
for (const n of t.keys)
|
|
2082
|
-
if (!n.optional && !e.keys.find(yt.bind(null, n)))
|
|
2083
|
-
return O(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
|
2084
|
-
}
|
|
2085
|
-
function Jo(e, t) {
|
|
2086
|
-
t && t.record.name && !e.name && !e.path && O(`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.`);
|
|
2087
|
-
}
|
|
2088
|
-
function Ko(e, t) {
|
|
2089
|
-
for (let n = t; n; n = n.parent)
|
|
2090
|
-
if (n.record.name === e.name)
|
|
2091
|
-
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.`);
|
|
2092
|
-
}
|
|
2093
|
-
function Qo(e, t) {
|
|
2094
|
-
for (const n of t.keys)
|
|
2095
|
-
if (!e.keys.find(yt.bind(null, n)))
|
|
2096
|
-
return O(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`);
|
|
2097
|
-
}
|
|
2098
|
-
function Yo(e, t) {
|
|
2099
|
-
let n = 0, r = t.length;
|
|
2100
|
-
for (; n !== r; ) {
|
|
2101
|
-
const s = n + r >> 1;
|
|
2102
|
-
Gn(e, t[s]) < 0 ? r = s : n = s + 1;
|
|
2103
|
-
}
|
|
2104
|
-
const o = Xo(e);
|
|
2105
|
-
return o && (r = t.lastIndexOf(o, r - 1), process.env.NODE_ENV !== "production" && r < 0 && O(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)), r;
|
|
2106
|
-
}
|
|
2107
|
-
function Xo(e) {
|
|
2108
|
-
let t = e;
|
|
2109
|
-
for (; t = t.parent; )
|
|
2110
|
-
if (zn(t) && Gn(e, t) === 0)
|
|
2111
|
-
return t;
|
|
2112
|
-
}
|
|
2113
|
-
function zn({ record: e }) {
|
|
2114
|
-
return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
|
|
2115
|
-
}
|
|
2116
|
-
function Zo(e) {
|
|
2117
|
-
const t = {};
|
|
2118
|
-
if (e === "" || e === "?")
|
|
2119
|
-
return t;
|
|
2120
|
-
const r = (e[0] === "?" ? e.slice(1) : e).split("&");
|
|
2121
|
-
for (let o = 0; o < r.length; ++o) {
|
|
2122
|
-
const s = r[o].replace(jn, " "), i = s.indexOf("="), a = Oe(i < 0 ? s : s.slice(0, i)), c = i < 0 ? null : Oe(s.slice(i + 1));
|
|
2123
|
-
if (a in t) {
|
|
2124
|
-
let l = t[a];
|
|
2125
|
-
H(l) || (l = t[a] = [l]), l.push(c);
|
|
2126
|
-
} else
|
|
2127
|
-
t[a] = c;
|
|
2128
|
-
}
|
|
2129
|
-
return t;
|
|
2130
|
-
}
|
|
2131
|
-
function rn(e) {
|
|
2132
|
-
let t = "";
|
|
2133
|
-
for (let n in e) {
|
|
2134
|
-
const r = e[n];
|
|
2135
|
-
if (n = po(n), r == null) {
|
|
2136
|
-
r !== void 0 && (t += (t.length ? "&" : "") + n);
|
|
2137
|
-
continue;
|
|
2138
|
-
}
|
|
2139
|
-
(H(r) ? r.map((s) => s && mt(s)) : [r && mt(r)]).forEach((s) => {
|
|
2140
|
-
s !== void 0 && (t += (t.length ? "&" : "") + n, s != null && (t += "=" + s));
|
|
2141
|
-
});
|
|
2142
|
-
}
|
|
2143
|
-
return t;
|
|
2144
|
-
}
|
|
2145
|
-
function es(e) {
|
|
2146
|
-
const t = {};
|
|
2147
|
-
for (const n in e) {
|
|
2148
|
-
const r = e[n];
|
|
2149
|
-
r !== void 0 && (t[n] = H(r) ? r.map((o) => o == null ? null : "" + o) : r == null ? r : "" + r);
|
|
2150
|
-
}
|
|
2151
|
-
return t;
|
|
2152
|
-
}
|
|
2153
|
-
const ts = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""), on = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""), Pt = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), qn = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""), _t = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
|
|
2154
|
-
function ke() {
|
|
2155
|
-
let e = [];
|
|
2156
|
-
function t(r) {
|
|
2157
|
-
return e.push(r), () => {
|
|
2158
|
-
const o = e.indexOf(r);
|
|
2159
|
-
o > -1 && e.splice(o, 1);
|
|
2160
|
-
};
|
|
2161
|
-
}
|
|
2162
|
-
function n() {
|
|
2163
|
-
e = [];
|
|
2164
|
-
}
|
|
2165
|
-
return {
|
|
2166
|
-
add: t,
|
|
2167
|
-
list: () => e.slice(),
|
|
2168
|
-
reset: n
|
|
2169
|
-
};
|
|
2170
|
-
}
|
|
2171
|
-
function ne(e, t, n, r, o, s = (i) => i()) {
|
|
2172
|
-
const i = r && // name is defined if record is because of the function overload
|
|
2173
|
-
(r.enterCallbacks[o] = r.enterCallbacks[o] || []);
|
|
2174
|
-
return () => new Promise((a, c) => {
|
|
2175
|
-
const l = (d) => {
|
|
2176
|
-
d === !1 ? c(Ne(4, {
|
|
2177
|
-
from: n,
|
|
2178
|
-
to: t
|
|
2179
|
-
})) : d instanceof Error ? c(d) : Ge(d) ? c(Ne(2, {
|
|
2180
|
-
from: t,
|
|
2181
|
-
to: d
|
|
2182
|
-
})) : (i && // since enterCallbackArray is truthy, both record and name also are
|
|
2183
|
-
r.enterCallbacks[o] === i && typeof d == "function" && i.push(d), a());
|
|
2184
|
-
}, f = s(() => e.call(r && r.instances[o], t, n, process.env.NODE_ENV !== "production" ? ns(l, t, n) : l));
|
|
2185
|
-
let u = Promise.resolve(f);
|
|
2186
|
-
if (e.length < 3 && (u = u.then(l)), process.env.NODE_ENV !== "production" && e.length > 2) {
|
|
2187
|
-
const d = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
|
|
2188
|
-
${e.toString()}
|
|
2189
|
-
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
|
|
2190
|
-
if (typeof f == "object" && "then" in f)
|
|
2191
|
-
u = u.then((p) => l._called ? p : (O(d), Promise.reject(new Error("Invalid navigation guard"))));
|
|
2192
|
-
else if (f !== void 0 && !l._called) {
|
|
2193
|
-
O(d), c(new Error("Invalid navigation guard"));
|
|
2194
|
-
return;
|
|
2195
|
-
}
|
|
2196
|
-
}
|
|
2197
|
-
u.catch((d) => c(d));
|
|
2198
|
-
});
|
|
2199
|
-
}
|
|
2200
|
-
function ns(e, t, n) {
|
|
2201
|
-
let r = 0;
|
|
2202
|
-
return function() {
|
|
2203
|
-
r++ === 1 && O(`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);
|
|
2204
|
-
};
|
|
2205
|
-
}
|
|
2206
|
-
function ot(e, t, n, r, o = (s) => s()) {
|
|
2207
|
-
const s = [];
|
|
2208
|
-
for (const i of e) {
|
|
2209
|
-
process.env.NODE_ENV !== "production" && !i.components && !i.children.length && O(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);
|
|
2210
|
-
for (const a in i.components) {
|
|
2211
|
-
let c = i.components[a];
|
|
2212
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2213
|
-
if (!c || typeof c != "object" && typeof c != "function")
|
|
2214
|
-
throw O(`Component "${a}" in record with path "${i.path}" is not a valid component. Received "${String(c)}".`), new Error("Invalid route component");
|
|
2215
|
-
if ("then" in c) {
|
|
2216
|
-
O(`Component "${a}" 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.`);
|
|
2217
|
-
const l = c;
|
|
2218
|
-
c = () => l;
|
|
2219
|
-
} else c.__asyncLoader && // warn only once per component
|
|
2220
|
-
!c.__warnedDefineAsync && (c.__warnedDefineAsync = !0, O(`Component "${a}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
|
|
2221
|
-
}
|
|
2222
|
-
if (!(t !== "beforeRouteEnter" && !i.instances[a]))
|
|
2223
|
-
if (Vn(c)) {
|
|
2224
|
-
const f = (c.__vccOpts || c)[t];
|
|
2225
|
-
f && s.push(ne(f, n, r, i, a, o));
|
|
2226
|
-
} else {
|
|
2227
|
-
let l = c();
|
|
2228
|
-
process.env.NODE_ENV !== "production" && !("catch" in l) && (O(`Component "${a}" 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.`), l = Promise.resolve(l)), s.push(() => l.then((f) => {
|
|
2229
|
-
if (!f)
|
|
2230
|
-
throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);
|
|
2231
|
-
const u = no(f) ? f.default : f;
|
|
2232
|
-
i.mods[a] = f, i.components[a] = u;
|
|
2233
|
-
const p = (u.__vccOpts || u)[t];
|
|
2234
|
-
return p && ne(p, n, r, i, a, o)();
|
|
2235
|
-
}));
|
|
2236
|
-
}
|
|
2237
|
-
}
|
|
2238
|
-
}
|
|
2239
|
-
return s;
|
|
2240
|
-
}
|
|
2241
|
-
function sn(e) {
|
|
2242
|
-
const t = pe(Pt), n = pe(qn);
|
|
2243
|
-
let r = !1, o = null;
|
|
2244
|
-
const s = z(() => {
|
|
2245
|
-
const f = de(e.to);
|
|
2246
|
-
return process.env.NODE_ENV !== "production" && (!r || f !== o) && (Ge(f) || (r ? O(`Invalid value for prop "to" in useLink()
|
|
2247
|
-
- to:`, f, `
|
|
2248
|
-
- previous to:`, o, `
|
|
2249
|
-
- props:`, e) : O(`Invalid value for prop "to" in useLink()
|
|
2250
|
-
- to:`, f, `
|
|
2251
|
-
- props:`, e)), o = f, r = !0), t.resolve(f);
|
|
2252
|
-
}), i = z(() => {
|
|
2253
|
-
const { matched: f } = s.value, { length: u } = f, d = f[u - 1], p = n.matched;
|
|
2254
|
-
if (!d || !p.length)
|
|
2255
|
-
return -1;
|
|
2256
|
-
const w = p.findIndex(ie.bind(null, d));
|
|
2257
|
-
if (w > -1)
|
|
2258
|
-
return w;
|
|
2259
|
-
const S = an(f[u - 2]);
|
|
2260
|
-
return (
|
|
2261
|
-
// we are dealing with nested routes
|
|
2262
|
-
u > 1 && // if the parent and matched route have the same path, this link is
|
|
2263
|
-
// referring to the empty child. Or we currently are on a different
|
|
2264
|
-
// child of the same parent
|
|
2265
|
-
an(d) === S && // avoid comparing the child with its parent
|
|
2266
|
-
p[p.length - 1].path !== S ? p.findIndex(ie.bind(null, f[u - 2])) : w
|
|
2267
|
-
);
|
|
2268
|
-
}), a = z(() => i.value > -1 && as(n.params, s.value.params)), c = z(() => i.value > -1 && i.value === n.matched.length - 1 && Fn(n.params, s.value.params));
|
|
2269
|
-
function l(f = {}) {
|
|
2270
|
-
if (is(f)) {
|
|
2271
|
-
const u = t[de(e.replace) ? "replace" : "push"](
|
|
2272
|
-
de(e.to)
|
|
2273
|
-
// avoid uncaught errors are they are logged anyway
|
|
2274
|
-
).catch(Re);
|
|
2275
|
-
return e.viewTransition && typeof document < "u" && "startViewTransition" in document && document.startViewTransition(() => u), u;
|
|
2276
|
-
}
|
|
2277
|
-
return Promise.resolve();
|
|
2278
|
-
}
|
|
2279
|
-
if (process.env.NODE_ENV !== "production" && Z) {
|
|
2280
|
-
const f = wt();
|
|
2281
|
-
if (f) {
|
|
2282
|
-
const u = {
|
|
2283
|
-
route: s.value,
|
|
2284
|
-
isActive: a.value,
|
|
2285
|
-
isExactActive: c.value,
|
|
2286
|
-
error: null
|
|
2287
|
-
};
|
|
2288
|
-
f.__vrl_devtools = f.__vrl_devtools || [], f.__vrl_devtools.push(u), Nr(() => {
|
|
2289
|
-
u.route = s.value, u.isActive = a.value, u.isExactActive = c.value, u.error = Ge(de(e.to)) ? null : 'Invalid "to" value';
|
|
2290
|
-
}, { flush: "post" });
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
return {
|
|
2294
|
-
route: s,
|
|
2295
|
-
href: z(() => s.value.href),
|
|
2296
|
-
isActive: a,
|
|
2297
|
-
isExactActive: c,
|
|
2298
|
-
navigate: l
|
|
2299
|
-
};
|
|
2300
|
-
}
|
|
2301
|
-
function rs(e) {
|
|
2302
|
-
return e.length === 1 ? e[0] : e;
|
|
2303
|
-
}
|
|
2304
|
-
const os = /* @__PURE__ */ wn({
|
|
2305
|
-
name: "RouterLink",
|
|
2306
|
-
compatConfig: { MODE: 3 },
|
|
2307
|
-
props: {
|
|
2308
|
-
to: {
|
|
2309
|
-
type: [String, Object],
|
|
2310
|
-
required: !0
|
|
2311
|
-
},
|
|
2312
|
-
replace: Boolean,
|
|
2313
|
-
activeClass: String,
|
|
2314
|
-
// inactiveClass: String,
|
|
2315
|
-
exactActiveClass: String,
|
|
2316
|
-
custom: Boolean,
|
|
2317
|
-
ariaCurrentValue: {
|
|
2318
|
-
type: String,
|
|
2319
|
-
default: "page"
|
|
2320
|
-
}
|
|
2321
|
-
},
|
|
2322
|
-
useLink: sn,
|
|
2323
|
-
setup(e, { slots: t }) {
|
|
2324
|
-
const n = En(sn(e)), { options: r } = pe(Pt), o = z(() => ({
|
|
2325
|
-
[cn(e.activeClass, r.linkActiveClass, "router-link-active")]: n.isActive,
|
|
2326
|
-
// [getLinkClass(
|
|
2327
|
-
// props.inactiveClass,
|
|
2328
|
-
// options.linkInactiveClass,
|
|
2329
|
-
// 'router-link-inactive'
|
|
2330
|
-
// )]: !link.isExactActive,
|
|
2331
|
-
[cn(e.exactActiveClass, r.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
|
|
2332
|
-
}));
|
|
2333
|
-
return () => {
|
|
2334
|
-
const s = t.default && rs(t.default(n));
|
|
2335
|
-
return e.custom ? s : bn("a", {
|
|
2336
|
-
"aria-current": n.isExactActive ? e.ariaCurrentValue : null,
|
|
2337
|
-
href: n.href,
|
|
2338
|
-
// this would override user added attrs but Vue will still add
|
|
2339
|
-
// the listener, so we end up triggering both
|
|
2340
|
-
onClick: n.navigate,
|
|
2341
|
-
class: o.value
|
|
2342
|
-
}, s);
|
|
2343
|
-
};
|
|
2344
|
-
}
|
|
2345
|
-
}), ss = os;
|
|
2346
|
-
function is(e) {
|
|
2347
|
-
if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
|
|
2348
|
-
if (e.currentTarget && e.currentTarget.getAttribute) {
|
|
2349
|
-
const t = e.currentTarget.getAttribute("target");
|
|
2350
|
-
if (/\b_blank\b/i.test(t))
|
|
2351
|
-
return;
|
|
2352
|
-
}
|
|
2353
|
-
return e.preventDefault && e.preventDefault(), !0;
|
|
2354
|
-
}
|
|
2355
|
-
}
|
|
2356
|
-
function as(e, t) {
|
|
2357
|
-
for (const n in t) {
|
|
2358
|
-
const r = t[n], o = e[n];
|
|
2359
|
-
if (typeof r == "string") {
|
|
2360
|
-
if (r !== o)
|
|
2361
|
-
return !1;
|
|
2362
|
-
} else if (!H(o) || o.length !== r.length || r.some((s, i) => s !== o[i]))
|
|
2363
|
-
return !1;
|
|
2364
|
-
}
|
|
2365
|
-
return !0;
|
|
2366
|
-
}
|
|
2367
|
-
function an(e) {
|
|
2368
|
-
return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
|
|
2369
|
-
}
|
|
2370
|
-
const cn = (e, t, n) => e ?? t ?? n, cs = /* @__PURE__ */ wn({
|
|
2371
|
-
name: "RouterView",
|
|
2372
|
-
// #674 we manually inherit them
|
|
2373
|
-
inheritAttrs: !1,
|
|
2374
|
-
props: {
|
|
2375
|
-
name: {
|
|
2376
|
-
type: String,
|
|
2377
|
-
default: "default"
|
|
2378
|
-
},
|
|
2379
|
-
route: Object
|
|
2380
|
-
},
|
|
2381
|
-
// Better compat for @vue/compat users
|
|
2382
|
-
// https://github.com/vuejs/router/issues/1315
|
|
2383
|
-
compatConfig: { MODE: 3 },
|
|
2384
|
-
setup(e, { attrs: t, slots: n }) {
|
|
2385
|
-
process.env.NODE_ENV !== "production" && ls();
|
|
2386
|
-
const r = pe(_t), o = z(() => e.route || r.value), s = pe(on, 0), i = z(() => {
|
|
2387
|
-
let l = de(s);
|
|
2388
|
-
const { matched: f } = o.value;
|
|
2389
|
-
let u;
|
|
2390
|
-
for (; (u = f[l]) && !u.components; )
|
|
2391
|
-
l++;
|
|
2392
|
-
return l;
|
|
2393
|
-
}), a = z(() => o.value.matched[i.value]);
|
|
2394
|
-
Ze(on, z(() => i.value + 1)), Ze(ts, a), Ze(_t, o);
|
|
2395
|
-
const c = se();
|
|
2396
|
-
return Me(() => [c.value, a.value, e.name], ([l, f, u], [d, p, w]) => {
|
|
2397
|
-
f && (f.instances[u] = l, p && p !== f && l && l === d && (f.leaveGuards.size || (f.leaveGuards = p.leaveGuards), f.updateGuards.size || (f.updateGuards = p.updateGuards))), l && f && // if there is no instance but to and from are the same this might be
|
|
2398
|
-
// the first visit
|
|
2399
|
-
(!p || !ie(f, p) || !d) && (f.enterCallbacks[u] || []).forEach((S) => S(l));
|
|
2400
|
-
}, { flush: "post" }), () => {
|
|
2401
|
-
const l = o.value, f = e.name, u = a.value, d = u && u.components[f];
|
|
2402
|
-
if (!d)
|
|
2403
|
-
return un(n.default, { Component: d, route: l });
|
|
2404
|
-
const p = u.props[f], w = p ? p === !0 ? l.params : typeof p == "function" ? p(l) : p : null, E = bn(d, I({}, w, t, {
|
|
2405
|
-
onVnodeUnmounted: (R) => {
|
|
2406
|
-
R.component.isUnmounted && (u.instances[f] = null);
|
|
2407
|
-
},
|
|
2408
|
-
ref: c
|
|
2409
|
-
}));
|
|
2410
|
-
if (process.env.NODE_ENV !== "production" && Z && E.ref) {
|
|
2411
|
-
const R = {
|
|
2412
|
-
depth: i.value,
|
|
2413
|
-
name: u.name,
|
|
2414
|
-
path: u.path,
|
|
2415
|
-
meta: u.meta
|
|
2416
|
-
};
|
|
2417
|
-
(H(E.ref) ? E.ref.map((P) => P.i) : [E.ref.i]).forEach((P) => {
|
|
2418
|
-
P.__vrv_devtools = R;
|
|
2419
|
-
});
|
|
2420
|
-
}
|
|
2421
|
-
return (
|
|
2422
|
-
// pass the vnode to the slot as a prop.
|
|
2423
|
-
// h and <component :is="..."> both accept vnodes
|
|
2424
|
-
un(n.default, { Component: E, route: l }) || E
|
|
2425
|
-
);
|
|
2426
|
-
};
|
|
2427
|
-
}
|
|
2428
|
-
});
|
|
2429
|
-
function un(e, t) {
|
|
2430
|
-
if (!e)
|
|
2431
|
-
return null;
|
|
2432
|
-
const n = e(t);
|
|
2433
|
-
return n.length === 1 ? n[0] : n;
|
|
2434
|
-
}
|
|
2435
|
-
const us = cs;
|
|
2436
|
-
function ls() {
|
|
2437
|
-
const e = wt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
|
|
2438
|
-
if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
|
|
2439
|
-
const r = t === "KeepAlive" ? "keep-alive" : "transition";
|
|
2440
|
-
O(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
|
2441
|
-
Use slot props instead:
|
|
2442
|
-
|
|
2443
|
-
<router-view v-slot="{ Component }">
|
|
2444
|
-
<${r}>
|
|
2445
|
-
<component :is="Component" />
|
|
2446
|
-
</${r}>
|
|
2447
|
-
</router-view>`);
|
|
2448
|
-
}
|
|
2449
|
-
}
|
|
2450
|
-
function Pe(e, t) {
|
|
2451
|
-
const n = I({}, e, {
|
|
2452
|
-
// remove variables that can contain vue instances
|
|
2453
|
-
matched: e.matched.map((r) => ws(r, ["instances", "children", "aliasOf"]))
|
|
2454
|
-
});
|
|
2455
|
-
return {
|
|
2456
|
-
_custom: {
|
|
2457
|
-
type: null,
|
|
2458
|
-
readOnly: !0,
|
|
2459
|
-
display: e.fullPath,
|
|
2460
|
-
tooltip: t,
|
|
2461
|
-
value: n
|
|
2462
|
-
}
|
|
2463
|
-
};
|
|
2464
|
-
}
|
|
2465
|
-
function Le(e) {
|
|
2466
|
-
return {
|
|
2467
|
-
_custom: {
|
|
2468
|
-
display: e
|
|
2469
|
-
}
|
|
2470
|
-
};
|
|
2471
|
-
}
|
|
2472
|
-
let fs = 0;
|
|
2473
|
-
function ds(e, t, n) {
|
|
2474
|
-
if (t.__hasDevtools)
|
|
2475
|
-
return;
|
|
2476
|
-
t.__hasDevtools = !0;
|
|
2477
|
-
const r = fs++;
|
|
2478
|
-
St({
|
|
2479
|
-
id: "org.vuejs.router" + (r ? "." + r : ""),
|
|
2480
|
-
label: "Vue Router",
|
|
2481
|
-
packageName: "vue-router",
|
|
2482
|
-
homepage: "https://router.vuejs.org",
|
|
2483
|
-
logo: "https://router.vuejs.org/logo.png",
|
|
2484
|
-
componentStateTypes: ["Routing"],
|
|
2485
|
-
app: e
|
|
2486
|
-
}, (o) => {
|
|
2487
|
-
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((f, u) => {
|
|
2488
|
-
f.instanceData && f.instanceData.state.push({
|
|
2489
|
-
type: "Routing",
|
|
2490
|
-
key: "$route",
|
|
2491
|
-
editable: !1,
|
|
2492
|
-
value: Pe(t.currentRoute.value, "Current Route")
|
|
2493
|
-
});
|
|
2494
|
-
}), o.on.visitComponentTree(({ treeNode: f, componentInstance: u }) => {
|
|
2495
|
-
if (u.__vrv_devtools) {
|
|
2496
|
-
const d = u.__vrv_devtools;
|
|
2497
|
-
f.tags.push({
|
|
2498
|
-
label: (d.name ? `${d.name.toString()}: ` : "") + d.path,
|
|
2499
|
-
textColor: 0,
|
|
2500
|
-
tooltip: "This component is rendered by <router-view>",
|
|
2501
|
-
backgroundColor: Jn
|
|
2502
|
-
});
|
|
2503
|
-
}
|
|
2504
|
-
H(u.__vrl_devtools) && (u.__devtoolsApi = o, u.__vrl_devtools.forEach((d) => {
|
|
2505
|
-
let p = d.route.path, w = Yn, S = "", E = 0;
|
|
2506
|
-
d.error ? (p = d.error, w = vs, E = ys) : d.isExactActive ? (w = Qn, S = "This is exactly active") : d.isActive && (w = Kn, S = "This link is active"), f.tags.push({
|
|
2507
|
-
label: p,
|
|
2508
|
-
textColor: E,
|
|
2509
|
-
tooltip: S,
|
|
2510
|
-
backgroundColor: w
|
|
2511
|
-
});
|
|
2512
|
-
}));
|
|
2513
|
-
}), Me(t.currentRoute, () => {
|
|
2514
|
-
c(), o.notifyComponentUpdate(), o.sendInspectorTree(a), o.sendInspectorState(a);
|
|
2515
|
-
});
|
|
2516
|
-
const s = "router:navigations:" + r;
|
|
2517
|
-
o.addTimelineLayer({
|
|
2518
|
-
id: s,
|
|
2519
|
-
label: `Router${r ? " " + r : ""} Navigations`,
|
|
2520
|
-
color: 4237508
|
|
2521
|
-
}), t.onError((f, u) => {
|
|
2522
|
-
o.addTimelineEvent({
|
|
2523
|
-
layerId: s,
|
|
2524
|
-
event: {
|
|
2525
|
-
title: "Error during Navigation",
|
|
2526
|
-
subtitle: u.fullPath,
|
|
2527
|
-
logType: "error",
|
|
2528
|
-
time: o.now(),
|
|
2529
|
-
data: { error: f },
|
|
2530
|
-
groupId: u.meta.__navigationId
|
|
2531
|
-
}
|
|
2532
|
-
});
|
|
2533
|
-
});
|
|
2534
|
-
let i = 0;
|
|
2535
|
-
t.beforeEach((f, u) => {
|
|
2536
|
-
const d = {
|
|
2537
|
-
guard: Le("beforeEach"),
|
|
2538
|
-
from: Pe(u, "Current Location during this navigation"),
|
|
2539
|
-
to: Pe(f, "Target location")
|
|
2540
|
-
};
|
|
2541
|
-
Object.defineProperty(f.meta, "__navigationId", {
|
|
2542
|
-
value: i++
|
|
2543
|
-
}), o.addTimelineEvent({
|
|
2544
|
-
layerId: s,
|
|
2545
|
-
event: {
|
|
2546
|
-
time: o.now(),
|
|
2547
|
-
title: "Start of navigation",
|
|
2548
|
-
subtitle: f.fullPath,
|
|
2549
|
-
data: d,
|
|
2550
|
-
groupId: f.meta.__navigationId
|
|
2551
|
-
}
|
|
2552
|
-
});
|
|
2553
|
-
}), t.afterEach((f, u, d) => {
|
|
2554
|
-
const p = {
|
|
2555
|
-
guard: Le("afterEach")
|
|
2556
|
-
};
|
|
2557
|
-
d ? (p.failure = {
|
|
2558
|
-
_custom: {
|
|
2559
|
-
type: Error,
|
|
2560
|
-
readOnly: !0,
|
|
2561
|
-
display: d ? d.message : "",
|
|
2562
|
-
tooltip: "Navigation Failure",
|
|
2563
|
-
value: d
|
|
2564
|
-
}
|
|
2565
|
-
}, p.status = Le("❌")) : p.status = Le("✅"), p.from = Pe(u, "Current Location during this navigation"), p.to = Pe(f, "Target location"), o.addTimelineEvent({
|
|
2566
|
-
layerId: s,
|
|
2567
|
-
event: {
|
|
2568
|
-
title: "End of navigation",
|
|
2569
|
-
subtitle: f.fullPath,
|
|
2570
|
-
time: o.now(),
|
|
2571
|
-
data: p,
|
|
2572
|
-
logType: d ? "warning" : "default",
|
|
2573
|
-
groupId: f.meta.__navigationId
|
|
2574
|
-
}
|
|
2575
|
-
});
|
|
2576
|
-
});
|
|
2577
|
-
const a = "router-inspector:" + r;
|
|
2578
|
-
o.addInspector({
|
|
2579
|
-
id: a,
|
|
2580
|
-
label: "Routes" + (r ? " " + r : ""),
|
|
2581
|
-
icon: "book",
|
|
2582
|
-
treeFilterPlaceholder: "Search routes"
|
|
2583
|
-
});
|
|
2584
|
-
function c() {
|
|
2585
|
-
if (!l)
|
|
2586
|
-
return;
|
|
2587
|
-
const f = l;
|
|
2588
|
-
let u = n.getRoutes().filter((d) => !d.parent || // these routes have a parent with no component which will not appear in the view
|
|
2589
|
-
// therefore we still need to include them
|
|
2590
|
-
!d.parent.record.components);
|
|
2591
|
-
u.forEach(er), f.filter && (u = u.filter((d) => (
|
|
2592
|
-
// save matches state based on the payload
|
|
2593
|
-
Et(d, f.filter.toLowerCase())
|
|
2594
|
-
))), u.forEach((d) => Zn(d, t.currentRoute.value)), f.rootNodes = u.map(Xn);
|
|
2595
|
-
}
|
|
2596
|
-
let l;
|
|
2597
|
-
o.on.getInspectorTree((f) => {
|
|
2598
|
-
l = f, f.app === e && f.inspectorId === a && c();
|
|
2599
|
-
}), o.on.getInspectorState((f) => {
|
|
2600
|
-
if (f.app === e && f.inspectorId === a) {
|
|
2601
|
-
const d = n.getRoutes().find((p) => p.record.__vd_id === f.nodeId);
|
|
2602
|
-
d && (f.state = {
|
|
2603
|
-
options: ps(d)
|
|
2604
|
-
});
|
|
2605
|
-
}
|
|
2606
|
-
}), o.sendInspectorTree(a), o.sendInspectorState(a);
|
|
2607
|
-
});
|
|
2608
|
-
}
|
|
2609
|
-
function hs(e) {
|
|
2610
|
-
return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : "";
|
|
2611
|
-
}
|
|
2612
|
-
function ps(e) {
|
|
2613
|
-
const { record: t } = e, n = [
|
|
2614
|
-
{ editable: !1, key: "path", value: t.path }
|
|
2615
|
-
];
|
|
2616
|
-
return t.name != null && n.push({
|
|
2617
|
-
editable: !1,
|
|
2618
|
-
key: "name",
|
|
2619
|
-
value: t.name
|
|
2620
|
-
}), n.push({ editable: !1, key: "regexp", value: e.re }), e.keys.length && n.push({
|
|
2621
|
-
editable: !1,
|
|
2622
|
-
key: "keys",
|
|
2623
|
-
value: {
|
|
2624
|
-
_custom: {
|
|
2625
|
-
type: null,
|
|
2626
|
-
readOnly: !0,
|
|
2627
|
-
display: e.keys.map((r) => `${r.name}${hs(r)}`).join(" "),
|
|
2628
|
-
tooltip: "Param keys",
|
|
2629
|
-
value: e.keys
|
|
2630
|
-
}
|
|
2631
|
-
}
|
|
2632
|
-
}), t.redirect != null && n.push({
|
|
2633
|
-
editable: !1,
|
|
2634
|
-
key: "redirect",
|
|
2635
|
-
value: t.redirect
|
|
2636
|
-
}), e.alias.length && n.push({
|
|
2637
|
-
editable: !1,
|
|
2638
|
-
key: "aliases",
|
|
2639
|
-
value: e.alias.map((r) => r.record.path)
|
|
2640
|
-
}), Object.keys(e.record.meta).length && n.push({
|
|
2641
|
-
editable: !1,
|
|
2642
|
-
key: "meta",
|
|
2643
|
-
value: e.record.meta
|
|
2644
|
-
}), n.push({
|
|
2645
|
-
key: "score",
|
|
2646
|
-
editable: !1,
|
|
2647
|
-
value: {
|
|
2648
|
-
_custom: {
|
|
2649
|
-
type: null,
|
|
2650
|
-
readOnly: !0,
|
|
2651
|
-
display: e.score.map((r) => r.join(", ")).join(" | "),
|
|
2652
|
-
tooltip: "Score used to sort routes",
|
|
2653
|
-
value: e.score
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
}), n;
|
|
2657
|
-
}
|
|
2658
|
-
const Jn = 15485081, Kn = 2450411, Qn = 8702998, ms = 2282478, Yn = 16486972, gs = 6710886, vs = 16704226, ys = 12131356;
|
|
2659
|
-
function Xn(e) {
|
|
2660
|
-
const t = [], { record: n } = e;
|
|
2661
|
-
n.name != null && t.push({
|
|
2662
|
-
label: String(n.name),
|
|
2663
|
-
textColor: 0,
|
|
2664
|
-
backgroundColor: ms
|
|
2665
|
-
}), n.aliasOf && t.push({
|
|
2666
|
-
label: "alias",
|
|
2667
|
-
textColor: 0,
|
|
2668
|
-
backgroundColor: Yn
|
|
2669
|
-
}), e.__vd_match && t.push({
|
|
2670
|
-
label: "matches",
|
|
2671
|
-
textColor: 0,
|
|
2672
|
-
backgroundColor: Jn
|
|
2673
|
-
}), e.__vd_exactActive && t.push({
|
|
2674
|
-
label: "exact",
|
|
2675
|
-
textColor: 0,
|
|
2676
|
-
backgroundColor: Qn
|
|
2677
|
-
}), e.__vd_active && t.push({
|
|
2678
|
-
label: "active",
|
|
2679
|
-
textColor: 0,
|
|
2680
|
-
backgroundColor: Kn
|
|
2681
|
-
}), n.redirect && t.push({
|
|
2682
|
-
label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects",
|
|
2683
|
-
textColor: 16777215,
|
|
2684
|
-
backgroundColor: gs
|
|
2685
|
-
});
|
|
2686
|
-
let r = n.__vd_id;
|
|
2687
|
-
return r == null && (r = String(_s++), n.__vd_id = r), {
|
|
2688
|
-
id: r,
|
|
2689
|
-
label: n.path,
|
|
2690
|
-
tags: t,
|
|
2691
|
-
children: e.children.map(Xn)
|
|
2692
|
-
};
|
|
2693
|
-
}
|
|
2694
|
-
let _s = 0;
|
|
2695
|
-
const Es = /^\/(.*)\/([a-z]*)$/;
|
|
2696
|
-
function Zn(e, t) {
|
|
2697
|
-
const n = t.matched.length && ie(t.matched[t.matched.length - 1], e.record);
|
|
2698
|
-
e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => ie(r, e.record))), e.children.forEach((r) => Zn(r, t));
|
|
2699
|
-
}
|
|
2700
|
-
function er(e) {
|
|
2701
|
-
e.__vd_match = !1, e.children.forEach(er);
|
|
2702
|
-
}
|
|
2703
|
-
function Et(e, t) {
|
|
2704
|
-
const n = String(e.re).match(Es);
|
|
2705
|
-
if (e.__vd_match = !1, !n || n.length < 3)
|
|
2706
|
-
return !1;
|
|
2707
|
-
if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t))
|
|
2708
|
-
return e.children.forEach((i) => Et(i, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
|
|
2709
|
-
const o = e.record.path.toLowerCase(), s = Oe(o);
|
|
2710
|
-
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) => Et(i, t));
|
|
2711
|
-
}
|
|
2712
|
-
function ws(e, t) {
|
|
2713
|
-
const n = {};
|
|
2714
|
-
for (const r in e)
|
|
2715
|
-
t.includes(r) || (n[r] = e[r]);
|
|
2716
|
-
return n;
|
|
2717
|
-
}
|
|
2718
|
-
function bs(e) {
|
|
2719
|
-
const t = Wo(e.routes, e), n = e.parseQuery || Zo, r = e.stringifyQuery || rn, o = e.history;
|
|
2720
|
-
if (process.env.NODE_ENV !== "production" && !o)
|
|
2721
|
-
throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
|
|
2722
|
-
const s = ke(), i = ke(), a = ke(), c = Sr(te);
|
|
2723
|
-
let l = te;
|
|
2724
|
-
Z && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
|
|
2725
|
-
const f = nt.bind(null, (h) => "" + h), u = nt.bind(null, go), d = (
|
|
2726
|
-
// @ts-expect-error: intentionally avoid the type check
|
|
2727
|
-
nt.bind(null, Oe)
|
|
2728
|
-
);
|
|
2729
|
-
function p(h, g) {
|
|
2730
|
-
let m, _;
|
|
2731
|
-
return Wn(h) ? (m = t.getRecordMatcher(h), process.env.NODE_ENV !== "production" && !m && O(`Parent route "${String(h)}" not found when adding child route`, g), _ = g) : _ = h, t.addRoute(_, m);
|
|
2732
|
-
}
|
|
2733
|
-
function w(h) {
|
|
2734
|
-
const g = t.getRecordMatcher(h);
|
|
2735
|
-
g ? t.removeRoute(g) : process.env.NODE_ENV !== "production" && O(`Cannot remove non-existent route "${String(h)}"`);
|
|
2736
|
-
}
|
|
2737
|
-
function S() {
|
|
2738
|
-
return t.getRoutes().map((h) => h.record);
|
|
2739
|
-
}
|
|
2740
|
-
function E(h) {
|
|
2741
|
-
return !!t.getRecordMatcher(h);
|
|
2742
|
-
}
|
|
2743
|
-
function R(h, g) {
|
|
2744
|
-
if (g = I({}, g || c.value), typeof h == "string") {
|
|
2745
|
-
const N = rt(n, h, g.path), T = t.resolve({ path: N.path }, g), ue = o.createHref(N.fullPath);
|
|
2746
|
-
return process.env.NODE_ENV !== "production" && (ue.startsWith("//") ? O(`Location "${h}" resolved to "${ue}". A resolved location cannot start with multiple slashes.`) : T.matched.length || O(`No match found for location with path "${h}"`)), I(N, T, {
|
|
2747
|
-
params: d(T.params),
|
|
2748
|
-
hash: Oe(N.hash),
|
|
2749
|
-
redirectedFrom: void 0,
|
|
2750
|
-
href: ue
|
|
2751
|
-
});
|
|
2752
|
-
}
|
|
2753
|
-
if (process.env.NODE_ENV !== "production" && !Ge(h))
|
|
2754
|
-
return O(`router.resolve() was passed an invalid location. This will fail in production.
|
|
2755
|
-
- Location:`, h), R({});
|
|
2756
|
-
let m;
|
|
2757
|
-
if (h.path != null)
|
|
2758
|
-
process.env.NODE_ENV !== "production" && "params" in h && !("name" in h) && // @ts-expect-error: the type is never
|
|
2759
|
-
Object.keys(h.params).length && O(`Path "${h.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), m = I({}, h, {
|
|
2760
|
-
path: rt(n, h.path, g.path).path
|
|
2761
|
-
});
|
|
2762
|
-
else {
|
|
2763
|
-
const N = I({}, h.params);
|
|
2764
|
-
for (const T in N)
|
|
2765
|
-
N[T] == null && delete N[T];
|
|
2766
|
-
m = I({}, h, {
|
|
2767
|
-
params: u(N)
|
|
2768
|
-
}), g.params = u(g.params);
|
|
2769
|
-
}
|
|
2770
|
-
const _ = t.resolve(m, g), C = h.hash || "";
|
|
2771
|
-
process.env.NODE_ENV !== "production" && C && !C.startsWith("#") && O(`A \`hash\` should always start with the character "#". Replace "${C}" with "#${C}".`), _.params = f(d(_.params));
|
|
2772
|
-
const D = _o(r, I({}, h, {
|
|
2773
|
-
hash: ho(C),
|
|
2774
|
-
path: _.path
|
|
2775
|
-
})), $ = o.createHref(D);
|
|
2776
|
-
return process.env.NODE_ENV !== "production" && ($.startsWith("//") ? O(`Location "${h}" resolved to "${$}". A resolved location cannot start with multiple slashes.`) : _.matched.length || O(`No match found for location with path "${h.path != null ? h.path : h}"`)), I({
|
|
2777
|
-
fullPath: D,
|
|
2778
|
-
// keep the hash encoded so fullPath is effectively path + encodedQuery +
|
|
2779
|
-
// hash
|
|
2780
|
-
hash: C,
|
|
2781
|
-
query: (
|
|
2782
|
-
// if the user is using a custom query lib like qs, we might have
|
|
2783
|
-
// nested objects, so we keep the query as is, meaning it can contain
|
|
2784
|
-
// numbers at `$route.query`, but at the point, the user will have to
|
|
2785
|
-
// use their own type anyway.
|
|
2786
|
-
// https://github.com/vuejs/router/issues/328#issuecomment-649481567
|
|
2787
|
-
r === rn ? es(h.query) : h.query || {}
|
|
2788
|
-
)
|
|
2789
|
-
}, _, {
|
|
2790
|
-
redirectedFrom: void 0,
|
|
2791
|
-
href: $
|
|
2792
|
-
});
|
|
2793
|
-
}
|
|
2794
|
-
function k(h) {
|
|
2795
|
-
return typeof h == "string" ? rt(n, h, c.value.path) : I({}, h);
|
|
2796
|
-
}
|
|
2797
|
-
function P(h, g) {
|
|
2798
|
-
if (l !== h)
|
|
2799
|
-
return Ne(8, {
|
|
2800
|
-
from: g,
|
|
2801
|
-
to: h
|
|
2802
|
-
});
|
|
2803
|
-
}
|
|
2804
|
-
function M(h) {
|
|
2805
|
-
return b(h);
|
|
2806
|
-
}
|
|
2807
|
-
function B(h) {
|
|
2808
|
-
return M(I(k(h), { replace: !0 }));
|
|
2809
|
-
}
|
|
2810
|
-
function q(h) {
|
|
2811
|
-
const g = h.matched[h.matched.length - 1];
|
|
2812
|
-
if (g && g.redirect) {
|
|
2813
|
-
const { redirect: m } = g;
|
|
2814
|
-
let _ = typeof m == "function" ? m(h) : m;
|
|
2815
|
-
if (typeof _ == "string" && (_ = _.includes("?") || _.includes("#") ? _ = k(_) : (
|
|
2816
|
-
// force empty params
|
|
2817
|
-
{ path: _ }
|
|
2818
|
-
), _.params = {}), process.env.NODE_ENV !== "production" && _.path == null && !("name" in _))
|
|
2819
|
-
throw O(`Invalid redirect found:
|
|
2820
|
-
${JSON.stringify(_, null, 2)}
|
|
2821
|
-
when navigating to "${h.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
|
|
2822
|
-
return I({
|
|
2823
|
-
query: h.query,
|
|
2824
|
-
hash: h.hash,
|
|
2825
|
-
// avoid transferring params if the redirect has a path
|
|
2826
|
-
params: _.path != null ? {} : h.params
|
|
2827
|
-
}, _);
|
|
2828
|
-
}
|
|
2829
|
-
}
|
|
2830
|
-
function b(h, g) {
|
|
2831
|
-
const m = l = R(h), _ = c.value, C = h.state, D = h.force, $ = h.replace === !0, N = q(m);
|
|
2832
|
-
if (N)
|
|
2833
|
-
return b(
|
|
2834
|
-
I(k(N), {
|
|
2835
|
-
state: typeof N == "object" ? I({}, C, N.state) : C,
|
|
2836
|
-
force: D,
|
|
2837
|
-
replace: $
|
|
2838
|
-
}),
|
|
2839
|
-
// keep original redirectedFrom if it exists
|
|
2840
|
-
g || m
|
|
2841
|
-
);
|
|
2842
|
-
const T = m;
|
|
2843
|
-
T.redirectedFrom = g;
|
|
2844
|
-
let ue;
|
|
2845
|
-
return !D && zt(r, _, m) && (ue = Ne(16, { to: T, from: _ }), Vt(
|
|
2846
|
-
_,
|
|
2847
|
-
_,
|
|
2848
|
-
// this is a push, the only way for it to be triggered from a
|
|
2849
|
-
// history.listen is with a redirect, which makes it become a push
|
|
2850
|
-
!0,
|
|
2851
|
-
// This cannot be the first navigation because the initial location
|
|
2852
|
-
// cannot be manually navigated to
|
|
2853
|
-
!1
|
|
2854
|
-
)), (ue ? Promise.resolve(ue) : y(T, _)).catch((U) => X(U) ? (
|
|
2855
|
-
// navigation redirects still mark the router as ready
|
|
2856
|
-
X(
|
|
2857
|
-
U,
|
|
2858
|
-
2
|
|
2859
|
-
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
|
2860
|
-
) ? U : Ke(U)
|
|
2861
|
-
) : (
|
|
2862
|
-
// reject any unknown error
|
|
2863
|
-
Q(U, T, _)
|
|
2864
|
-
)).then((U) => {
|
|
2865
|
-
if (U) {
|
|
2866
|
-
if (X(
|
|
2867
|
-
U,
|
|
2868
|
-
2
|
|
2869
|
-
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
|
2870
|
-
))
|
|
2871
|
-
return process.env.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
|
|
2872
|
-
zt(r, R(U.to), T) && // and we have done it a couple of times
|
|
2873
|
-
g && // @ts-expect-error: added only in dev
|
|
2874
|
-
(g._count = g._count ? (
|
|
2875
|
-
// @ts-expect-error
|
|
2876
|
-
g._count + 1
|
|
2877
|
-
) : 1) > 30 ? (O(`Detected a possibly infinite redirection in a navigation guard when going from "${_.fullPath}" to "${T.fullPath}". Aborting to avoid a Stack Overflow.
|
|
2878
|
-
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"))) : b(
|
|
2879
|
-
// keep options
|
|
2880
|
-
I({
|
|
2881
|
-
// preserve an existing replacement but allow the redirect to override it
|
|
2882
|
-
replace: $
|
|
2883
|
-
}, k(U.to), {
|
|
2884
|
-
state: typeof U.to == "object" ? I({}, C, U.to.state) : C,
|
|
2885
|
-
force: D
|
|
2886
|
-
}),
|
|
2887
|
-
// preserve the original redirectedFrom if any
|
|
2888
|
-
g || T
|
|
2889
|
-
);
|
|
2890
|
-
} else
|
|
2891
|
-
U = A(T, _, !0, $, C);
|
|
2892
|
-
return v(T, _, U), U;
|
|
2893
|
-
});
|
|
2894
|
-
}
|
|
2895
|
-
function Mt(h, g) {
|
|
2896
|
-
const m = P(h, g);
|
|
2897
|
-
return m ? Promise.reject(m) : Promise.resolve();
|
|
2898
|
-
}
|
|
2899
|
-
function W(h) {
|
|
2900
|
-
const g = xe.values().next().value;
|
|
2901
|
-
return g && typeof g.runWithContext == "function" ? g.runWithContext(h) : h();
|
|
2902
|
-
}
|
|
2903
|
-
function y(h, g) {
|
|
2904
|
-
let m;
|
|
2905
|
-
const [_, C, D] = Ss(h, g);
|
|
2906
|
-
m = ot(_.reverse(), "beforeRouteLeave", h, g);
|
|
2907
|
-
for (const N of _)
|
|
2908
|
-
N.leaveGuards.forEach((T) => {
|
|
2909
|
-
m.push(ne(T, h, g));
|
|
2910
|
-
});
|
|
2911
|
-
const $ = Mt.bind(null, h, g);
|
|
2912
|
-
return m.push($), ve(m).then(() => {
|
|
2913
|
-
m = [];
|
|
2914
|
-
for (const N of s.list())
|
|
2915
|
-
m.push(ne(N, h, g));
|
|
2916
|
-
return m.push($), ve(m);
|
|
2917
|
-
}).then(() => {
|
|
2918
|
-
m = ot(C, "beforeRouteUpdate", h, g);
|
|
2919
|
-
for (const N of C)
|
|
2920
|
-
N.updateGuards.forEach((T) => {
|
|
2921
|
-
m.push(ne(T, h, g));
|
|
2922
|
-
});
|
|
2923
|
-
return m.push($), ve(m);
|
|
2924
|
-
}).then(() => {
|
|
2925
|
-
m = [];
|
|
2926
|
-
for (const N of D)
|
|
2927
|
-
if (N.beforeEnter)
|
|
2928
|
-
if (H(N.beforeEnter))
|
|
2929
|
-
for (const T of N.beforeEnter)
|
|
2930
|
-
m.push(ne(T, h, g));
|
|
2931
|
-
else
|
|
2932
|
-
m.push(ne(N.beforeEnter, h, g));
|
|
2933
|
-
return m.push($), ve(m);
|
|
2934
|
-
}).then(() => (h.matched.forEach((N) => N.enterCallbacks = {}), m = ot(D, "beforeRouteEnter", h, g, W), m.push($), ve(m))).then(() => {
|
|
2935
|
-
m = [];
|
|
2936
|
-
for (const N of i.list())
|
|
2937
|
-
m.push(ne(N, h, g));
|
|
2938
|
-
return m.push($), ve(m);
|
|
2939
|
-
}).catch((N) => X(
|
|
2940
|
-
N,
|
|
2941
|
-
8
|
|
2942
|
-
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
2943
|
-
) ? N : Promise.reject(N));
|
|
2944
|
-
}
|
|
2945
|
-
function v(h, g, m) {
|
|
2946
|
-
a.list().forEach((_) => W(() => _(h, g, m)));
|
|
2947
|
-
}
|
|
2948
|
-
function A(h, g, m, _, C) {
|
|
2949
|
-
const D = P(h, g);
|
|
2950
|
-
if (D)
|
|
2951
|
-
return D;
|
|
2952
|
-
const $ = g === te, N = Z ? history.state : {};
|
|
2953
|
-
m && (_ || $ ? o.replace(h.fullPath, I({
|
|
2954
|
-
scroll: $ && N && N.scroll
|
|
2955
|
-
}, C)) : o.push(h.fullPath, C)), c.value = h, Vt(h, g, m, $), Ke();
|
|
2956
|
-
}
|
|
2957
|
-
let V;
|
|
2958
|
-
function ae() {
|
|
2959
|
-
V || (V = o.listen((h, g, m) => {
|
|
2960
|
-
if (!xt.listening)
|
|
2961
|
-
return;
|
|
2962
|
-
const _ = R(h), C = q(_);
|
|
2963
|
-
if (C) {
|
|
2964
|
-
b(I(C, { replace: !0, force: !0 }), _).catch(Re);
|
|
2965
|
-
return;
|
|
2966
|
-
}
|
|
2967
|
-
l = _;
|
|
2968
|
-
const D = c.value;
|
|
2969
|
-
Z && Po(Jt(D.fullPath, m.delta), ze()), y(_, D).catch(($) => X(
|
|
2970
|
-
$,
|
|
2971
|
-
12
|
|
2972
|
-
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
2973
|
-
) ? $ : X(
|
|
2974
|
-
$,
|
|
2975
|
-
2
|
|
2976
|
-
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
|
2977
|
-
) ? (b(
|
|
2978
|
-
I(k($.to), {
|
|
2979
|
-
force: !0
|
|
2980
|
-
}),
|
|
2981
|
-
_
|
|
2982
|
-
// avoid an uncaught rejection, let push call triggerError
|
|
2983
|
-
).then((N) => {
|
|
2984
|
-
X(
|
|
2985
|
-
N,
|
|
2986
|
-
20
|
|
2987
|
-
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
|
2988
|
-
) && !m.delta && m.type === De.pop && o.go(-1, !1);
|
|
2989
|
-
}).catch(Re), Promise.reject()) : (m.delta && o.go(-m.delta, !1), Q($, _, D))).then(($) => {
|
|
2990
|
-
$ = $ || A(
|
|
2991
|
-
// after navigation, all matched components are resolved
|
|
2992
|
-
_,
|
|
2993
|
-
D,
|
|
2994
|
-
!1
|
|
2995
|
-
), $ && (m.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
|
|
2996
|
-
// entry while a different route is displayed
|
|
2997
|
-
!X(
|
|
2998
|
-
$,
|
|
2999
|
-
8
|
|
3000
|
-
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
3001
|
-
) ? o.go(-m.delta, !1) : m.type === De.pop && X(
|
|
3002
|
-
$,
|
|
3003
|
-
20
|
|
3004
|
-
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
|
3005
|
-
) && o.go(-1, !1)), v(_, D, $);
|
|
3006
|
-
}).catch(Re);
|
|
3007
|
-
}));
|
|
3008
|
-
}
|
|
3009
|
-
let ce = ke(), Ve = ke(), ge;
|
|
3010
|
-
function Q(h, g, m) {
|
|
3011
|
-
Ke(h);
|
|
3012
|
-
const _ = Ve.list();
|
|
3013
|
-
return _.length ? _.forEach((C) => C(h, g, m)) : (process.env.NODE_ENV !== "production" && O("uncaught error during route navigation:"), console.error(h)), Promise.reject(h);
|
|
3014
|
-
}
|
|
3015
|
-
function F() {
|
|
3016
|
-
return ge && c.value !== te ? Promise.resolve() : new Promise((h, g) => {
|
|
3017
|
-
ce.add([h, g]);
|
|
3018
|
-
});
|
|
3019
|
-
}
|
|
3020
|
-
function Ke(h) {
|
|
3021
|
-
return ge || (ge = !h, ae(), ce.list().forEach(([g, m]) => h ? m(h) : g()), ce.reset()), h;
|
|
3022
|
-
}
|
|
3023
|
-
function Vt(h, g, m, _) {
|
|
3024
|
-
const { scrollBehavior: C } = e;
|
|
3025
|
-
if (!Z || !C)
|
|
3026
|
-
return Promise.resolve();
|
|
3027
|
-
const D = !m && $o(Jt(h.fullPath, 0)) || (_ || !m) && history.state && history.state.scroll || null;
|
|
3028
|
-
return ct().then(() => C(h, g, D)).then(($) => $ && ko($)).catch(($) => Q($, h, g));
|
|
3029
|
-
}
|
|
3030
|
-
const Qe = (h) => o.go(h);
|
|
3031
|
-
let Ye;
|
|
3032
|
-
const xe = /* @__PURE__ */ new Set(), xt = {
|
|
3033
|
-
currentRoute: c,
|
|
3034
|
-
listening: !0,
|
|
3035
|
-
addRoute: p,
|
|
3036
|
-
removeRoute: w,
|
|
3037
|
-
clearRoutes: t.clearRoutes,
|
|
3038
|
-
hasRoute: E,
|
|
3039
|
-
getRoutes: S,
|
|
3040
|
-
resolve: R,
|
|
3041
|
-
options: e,
|
|
3042
|
-
push: M,
|
|
3043
|
-
replace: B,
|
|
3044
|
-
go: Qe,
|
|
3045
|
-
back: () => Qe(-1),
|
|
3046
|
-
forward: () => Qe(1),
|
|
3047
|
-
beforeEach: s.add,
|
|
3048
|
-
beforeResolve: i.add,
|
|
3049
|
-
afterEach: a.add,
|
|
3050
|
-
onError: Ve.add,
|
|
3051
|
-
isReady: F,
|
|
3052
|
-
install(h) {
|
|
3053
|
-
const g = this;
|
|
3054
|
-
h.component("RouterLink", ss), h.component("RouterView", us), h.config.globalProperties.$router = g, Object.defineProperty(h.config.globalProperties, "$route", {
|
|
3055
|
-
enumerable: !0,
|
|
3056
|
-
get: () => de(c)
|
|
3057
|
-
}), Z && // used for the initial navigation client side to avoid pushing
|
|
3058
|
-
// multiple times when the router is used in multiple apps
|
|
3059
|
-
!Ye && c.value === te && (Ye = !0, M(o.location).catch((C) => {
|
|
3060
|
-
process.env.NODE_ENV !== "production" && O("Unexpected error when starting the router:", C);
|
|
3061
|
-
}));
|
|
3062
|
-
const m = {};
|
|
3063
|
-
for (const C in te)
|
|
3064
|
-
Object.defineProperty(m, C, {
|
|
3065
|
-
get: () => c.value[C],
|
|
3066
|
-
enumerable: !0
|
|
3067
|
-
});
|
|
3068
|
-
h.provide(Pt, g), h.provide(qn, Or(m)), h.provide(_t, c);
|
|
3069
|
-
const _ = h.unmount;
|
|
3070
|
-
xe.add(h), h.unmount = function() {
|
|
3071
|
-
xe.delete(h), xe.size < 1 && (l = te, V && V(), V = null, c.value = te, Ye = !1, ge = !1), _();
|
|
3072
|
-
}, process.env.NODE_ENV !== "production" && Z && ds(h, g, t);
|
|
3073
|
-
}
|
|
3074
|
-
};
|
|
3075
|
-
function ve(h) {
|
|
3076
|
-
return h.reduce((g, m) => g.then(() => W(m)), Promise.resolve());
|
|
3077
|
-
}
|
|
3078
|
-
return xt;
|
|
3079
|
-
}
|
|
3080
|
-
function Ss(e, t) {
|
|
3081
|
-
const n = [], r = [], o = [], s = Math.max(t.matched.length, e.matched.length);
|
|
3082
|
-
for (let i = 0; i < s; i++) {
|
|
3083
|
-
const a = t.matched[i];
|
|
3084
|
-
a && (e.matched.find((l) => ie(l, a)) ? r.push(a) : n.push(a));
|
|
3085
|
-
const c = e.matched[i];
|
|
3086
|
-
c && (t.matched.find((l) => ie(l, c)) || o.push(c));
|
|
3087
|
-
}
|
|
3088
|
-
return [n, r, o];
|
|
3089
|
-
}
|
|
3090
|
-
const Os = bs({
|
|
3091
|
-
history: Ao(),
|
|
3092
|
-
routes: []
|
|
3093
|
-
});
|
|
3094
|
-
function Ns(e) {
|
|
1293
|
+
y(G, "_root");
|
|
1294
|
+
let be = G;
|
|
1295
|
+
function _n(e) {
|
|
3095
1296
|
return e && typeof e.then == "function";
|
|
3096
1297
|
}
|
|
3097
1298
|
Promise.resolve(!1);
|
|
3098
1299
|
Promise.resolve(!0);
|
|
3099
|
-
var
|
|
3100
|
-
function
|
|
3101
|
-
return e || (e = 0), new Promise(function(
|
|
1300
|
+
var j = Promise.resolve();
|
|
1301
|
+
function pt(e, t) {
|
|
1302
|
+
return e || (e = 0), new Promise(function(r) {
|
|
3102
1303
|
return setTimeout(function() {
|
|
3103
|
-
return
|
|
1304
|
+
return r(t);
|
|
3104
1305
|
}, e);
|
|
3105
1306
|
});
|
|
3106
1307
|
}
|
|
3107
|
-
function
|
|
1308
|
+
function bn(e, t) {
|
|
3108
1309
|
return Math.floor(Math.random() * (t - e + 1) + e);
|
|
3109
1310
|
}
|
|
3110
|
-
function
|
|
1311
|
+
function Ie() {
|
|
3111
1312
|
return Math.random().toString(36).substring(2);
|
|
3112
1313
|
}
|
|
3113
|
-
var
|
|
3114
|
-
function
|
|
1314
|
+
var Ue = 0, de = 0;
|
|
1315
|
+
function se() {
|
|
3115
1316
|
var e = (/* @__PURE__ */ new Date()).getTime();
|
|
3116
|
-
return e ===
|
|
1317
|
+
return e === Ue ? (de++, e * 1e3 + de) : (Ue = e, de = 0, e * 1e3);
|
|
3117
1318
|
}
|
|
3118
|
-
var
|
|
3119
|
-
function
|
|
1319
|
+
var wn = se, En = "native";
|
|
1320
|
+
function Sn(e) {
|
|
3120
1321
|
var t = {
|
|
3121
1322
|
messagesCallback: null,
|
|
3122
1323
|
bc: new BroadcastChannel(e),
|
|
3123
1324
|
subFns: []
|
|
3124
1325
|
// subscriberFunctions
|
|
3125
1326
|
};
|
|
3126
|
-
return t.bc.onmessage = function(
|
|
3127
|
-
t.messagesCallback && t.messagesCallback(
|
|
1327
|
+
return t.bc.onmessage = function(r) {
|
|
1328
|
+
t.messagesCallback && t.messagesCallback(r.data);
|
|
3128
1329
|
}, t;
|
|
3129
1330
|
}
|
|
3130
|
-
function
|
|
1331
|
+
function On(e) {
|
|
3131
1332
|
e.bc.close(), e.subFns = [];
|
|
3132
1333
|
}
|
|
3133
|
-
function
|
|
1334
|
+
function In(e, t) {
|
|
3134
1335
|
try {
|
|
3135
|
-
return e.bc.postMessage(t, !1),
|
|
3136
|
-
} catch (
|
|
3137
|
-
return Promise.reject(
|
|
1336
|
+
return e.bc.postMessage(t, !1), j;
|
|
1337
|
+
} catch (r) {
|
|
1338
|
+
return Promise.reject(r);
|
|
3138
1339
|
}
|
|
3139
1340
|
}
|
|
3140
|
-
function
|
|
1341
|
+
function Nn(e, t) {
|
|
3141
1342
|
e.messagesCallback = t;
|
|
3142
1343
|
}
|
|
3143
|
-
function
|
|
1344
|
+
function Pn() {
|
|
3144
1345
|
if (typeof window > "u")
|
|
3145
1346
|
return !1;
|
|
3146
1347
|
if (typeof BroadcastChannel == "function") {
|
|
@@ -3150,19 +1351,19 @@ function Ts() {
|
|
|
3150
1351
|
} else
|
|
3151
1352
|
return !1;
|
|
3152
1353
|
}
|
|
3153
|
-
function
|
|
1354
|
+
function kn() {
|
|
3154
1355
|
return 150;
|
|
3155
1356
|
}
|
|
3156
|
-
var
|
|
3157
|
-
create:
|
|
3158
|
-
close:
|
|
3159
|
-
onMessage:
|
|
3160
|
-
postMessage:
|
|
3161
|
-
canBeUsed:
|
|
3162
|
-
type:
|
|
3163
|
-
averageResponseTime:
|
|
3164
|
-
microSeconds:
|
|
3165
|
-
},
|
|
1357
|
+
var $n = {
|
|
1358
|
+
create: Sn,
|
|
1359
|
+
close: On,
|
|
1360
|
+
onMessage: Nn,
|
|
1361
|
+
postMessage: In,
|
|
1362
|
+
canBeUsed: Pn,
|
|
1363
|
+
type: En,
|
|
1364
|
+
averageResponseTime: kn,
|
|
1365
|
+
microSeconds: wn
|
|
1366
|
+
}, ht = (
|
|
3166
1367
|
/** @class */
|
|
3167
1368
|
function() {
|
|
3168
1369
|
function e(t) {
|
|
@@ -3171,38 +1372,38 @@ var Ms = {
|
|
|
3171
1372
|
return e.prototype.has = function(t) {
|
|
3172
1373
|
return this.map.has(t);
|
|
3173
1374
|
}, e.prototype.add = function(t) {
|
|
3174
|
-
var
|
|
3175
|
-
this.map.set(t,
|
|
3176
|
-
|
|
1375
|
+
var r = this;
|
|
1376
|
+
this.map.set(t, gt()), this._to || (this._to = !0, setTimeout(function() {
|
|
1377
|
+
r._to = !1, Tn(r);
|
|
3177
1378
|
}, 0));
|
|
3178
1379
|
}, e.prototype.clear = function() {
|
|
3179
1380
|
this.map.clear();
|
|
3180
1381
|
}, e;
|
|
3181
1382
|
}()
|
|
3182
1383
|
);
|
|
3183
|
-
function
|
|
3184
|
-
for (var t =
|
|
3185
|
-
var
|
|
3186
|
-
if (!
|
|
1384
|
+
function Tn(e) {
|
|
1385
|
+
for (var t = gt() - e.ttl, r = e.map[Symbol.iterator](); ; ) {
|
|
1386
|
+
var n = r.next().value;
|
|
1387
|
+
if (!n)
|
|
3187
1388
|
return;
|
|
3188
|
-
var o =
|
|
1389
|
+
var o = n[0], s = n[1];
|
|
3189
1390
|
if (s < t)
|
|
3190
1391
|
e.map.delete(o);
|
|
3191
1392
|
else
|
|
3192
1393
|
return;
|
|
3193
1394
|
}
|
|
3194
1395
|
}
|
|
3195
|
-
function
|
|
1396
|
+
function gt() {
|
|
3196
1397
|
return (/* @__PURE__ */ new Date()).getTime();
|
|
3197
1398
|
}
|
|
3198
|
-
function
|
|
1399
|
+
function Ne() {
|
|
3199
1400
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = JSON.parse(JSON.stringify(e));
|
|
3200
1401
|
return typeof t.webWorkerSupport > "u" && (t.webWorkerSupport = !0), t.idb || (t.idb = {}), t.idb.ttl || (t.idb.ttl = 1e3 * 45), t.idb.fallbackInterval || (t.idb.fallbackInterval = 150), e.idb && typeof e.idb.onclose == "function" && (t.idb.onclose = e.idb.onclose), t.localstorage || (t.localstorage = {}), t.localstorage.removeTimeout || (t.localstorage.removeTimeout = 1e3 * 60), e.methods && (t.methods = e.methods), t.node || (t.node = {}), t.node.ttl || (t.node.ttl = 1e3 * 60 * 2), t.node.maxParallelWrites || (t.node.maxParallelWrites = 2048), typeof t.node.useFastPath > "u" && (t.node.useFastPath = !0), t;
|
|
3201
1402
|
}
|
|
3202
|
-
var
|
|
1403
|
+
var Dn = se, Mn = "pubkey.broadcast-channel-0-", $ = "messages", ie = {
|
|
3203
1404
|
durability: "relaxed"
|
|
3204
|
-
},
|
|
3205
|
-
function
|
|
1405
|
+
}, Cn = "idb";
|
|
1406
|
+
function mt() {
|
|
3206
1407
|
if (typeof indexedDB < "u") return indexedDB;
|
|
3207
1408
|
if (typeof window < "u") {
|
|
3208
1409
|
if (typeof window.mozIndexedDB < "u") return window.mozIndexedDB;
|
|
@@ -3211,184 +1412,184 @@ function or() {
|
|
|
3211
1412
|
}
|
|
3212
1413
|
return !1;
|
|
3213
1414
|
}
|
|
3214
|
-
function
|
|
1415
|
+
function Pe(e) {
|
|
3215
1416
|
e.commit && e.commit();
|
|
3216
1417
|
}
|
|
3217
|
-
function
|
|
3218
|
-
var t =
|
|
3219
|
-
return
|
|
1418
|
+
function Ln(e) {
|
|
1419
|
+
var t = mt(), r = Mn + e, n = t.open(r);
|
|
1420
|
+
return n.onupgradeneeded = function(o) {
|
|
3220
1421
|
var s = o.target.result;
|
|
3221
|
-
s.createObjectStore(
|
|
1422
|
+
s.createObjectStore($, {
|
|
3222
1423
|
keyPath: "id",
|
|
3223
1424
|
autoIncrement: !0
|
|
3224
1425
|
});
|
|
3225
1426
|
}, new Promise(function(o, s) {
|
|
3226
|
-
|
|
3227
|
-
return s(
|
|
3228
|
-
},
|
|
3229
|
-
o(
|
|
1427
|
+
n.onerror = function(a) {
|
|
1428
|
+
return s(a);
|
|
1429
|
+
}, n.onsuccess = function() {
|
|
1430
|
+
o(n.result);
|
|
3230
1431
|
};
|
|
3231
1432
|
});
|
|
3232
1433
|
}
|
|
3233
|
-
function
|
|
3234
|
-
var
|
|
1434
|
+
function An(e, t, r) {
|
|
1435
|
+
var n = (/* @__PURE__ */ new Date()).getTime(), o = {
|
|
3235
1436
|
uuid: t,
|
|
3236
|
-
time:
|
|
3237
|
-
data:
|
|
3238
|
-
}, s = e.transaction([
|
|
3239
|
-
return new Promise(function(
|
|
1437
|
+
time: n,
|
|
1438
|
+
data: r
|
|
1439
|
+
}, s = e.transaction([$], "readwrite", ie);
|
|
1440
|
+
return new Promise(function(a, i) {
|
|
3240
1441
|
s.oncomplete = function() {
|
|
3241
|
-
return
|
|
3242
|
-
}, s.onerror = function(
|
|
3243
|
-
return
|
|
1442
|
+
return a();
|
|
1443
|
+
}, s.onerror = function(c) {
|
|
1444
|
+
return i(c);
|
|
3244
1445
|
};
|
|
3245
|
-
var
|
|
3246
|
-
|
|
1446
|
+
var u = s.objectStore($);
|
|
1447
|
+
u.add(o), Pe(s);
|
|
3247
1448
|
});
|
|
3248
1449
|
}
|
|
3249
|
-
function
|
|
3250
|
-
var
|
|
3251
|
-
if (
|
|
3252
|
-
var
|
|
3253
|
-
return new Promise(function(
|
|
3254
|
-
|
|
3255
|
-
return
|
|
3256
|
-
},
|
|
3257
|
-
|
|
1450
|
+
function jn(e, t) {
|
|
1451
|
+
var r = e.transaction($, "readonly", ie), n = r.objectStore($), o = [], s = IDBKeyRange.bound(t + 1, 1 / 0);
|
|
1452
|
+
if (n.getAll) {
|
|
1453
|
+
var a = n.getAll(s);
|
|
1454
|
+
return new Promise(function(u, c) {
|
|
1455
|
+
a.onerror = function(d) {
|
|
1456
|
+
return c(d);
|
|
1457
|
+
}, a.onsuccess = function(d) {
|
|
1458
|
+
u(d.target.result);
|
|
3258
1459
|
};
|
|
3259
1460
|
});
|
|
3260
1461
|
}
|
|
3261
|
-
function
|
|
1462
|
+
function i() {
|
|
3262
1463
|
try {
|
|
3263
|
-
return s = IDBKeyRange.bound(t + 1, 1 / 0),
|
|
1464
|
+
return s = IDBKeyRange.bound(t + 1, 1 / 0), n.openCursor(s);
|
|
3264
1465
|
} catch {
|
|
3265
|
-
return
|
|
1466
|
+
return n.openCursor();
|
|
3266
1467
|
}
|
|
3267
1468
|
}
|
|
3268
|
-
return new Promise(function(
|
|
3269
|
-
var
|
|
3270
|
-
|
|
3271
|
-
return
|
|
3272
|
-
},
|
|
3273
|
-
var
|
|
3274
|
-
|
|
1469
|
+
return new Promise(function(u, c) {
|
|
1470
|
+
var d = i();
|
|
1471
|
+
d.onerror = function(p) {
|
|
1472
|
+
return c(p);
|
|
1473
|
+
}, d.onsuccess = function(p) {
|
|
1474
|
+
var g = p.target.result;
|
|
1475
|
+
g ? g.value.id < t + 1 ? g.continue(t + 1) : (o.push(g.value), g.continue()) : (Pe(r), u(o));
|
|
3275
1476
|
};
|
|
3276
1477
|
});
|
|
3277
1478
|
}
|
|
3278
|
-
function
|
|
1479
|
+
function Rn(e, t) {
|
|
3279
1480
|
if (e.closed)
|
|
3280
1481
|
return Promise.resolve([]);
|
|
3281
|
-
var
|
|
1482
|
+
var r = e.db.transaction($, "readwrite", ie), n = r.objectStore($);
|
|
3282
1483
|
return Promise.all(t.map(function(o) {
|
|
3283
|
-
var s =
|
|
3284
|
-
return new Promise(function(
|
|
1484
|
+
var s = n.delete(o);
|
|
1485
|
+
return new Promise(function(a) {
|
|
3285
1486
|
s.onsuccess = function() {
|
|
3286
|
-
return
|
|
1487
|
+
return a();
|
|
3287
1488
|
};
|
|
3288
1489
|
});
|
|
3289
1490
|
}));
|
|
3290
1491
|
}
|
|
3291
|
-
function
|
|
3292
|
-
var
|
|
3293
|
-
return new Promise(function(
|
|
3294
|
-
o.openCursor().onsuccess = function(
|
|
3295
|
-
var
|
|
3296
|
-
if (
|
|
3297
|
-
var
|
|
3298
|
-
|
|
1492
|
+
function Vn(e, t) {
|
|
1493
|
+
var r = (/* @__PURE__ */ new Date()).getTime() - t, n = e.transaction($, "readonly", ie), o = n.objectStore($), s = [];
|
|
1494
|
+
return new Promise(function(a) {
|
|
1495
|
+
o.openCursor().onsuccess = function(i) {
|
|
1496
|
+
var u = i.target.result;
|
|
1497
|
+
if (u) {
|
|
1498
|
+
var c = u.value;
|
|
1499
|
+
c.time < r ? (s.push(c), u.continue()) : (Pe(n), a(s));
|
|
3299
1500
|
} else
|
|
3300
|
-
|
|
1501
|
+
a(s);
|
|
3301
1502
|
};
|
|
3302
1503
|
});
|
|
3303
1504
|
}
|
|
3304
|
-
function
|
|
3305
|
-
return
|
|
3306
|
-
return
|
|
3307
|
-
return
|
|
1505
|
+
function Bn(e) {
|
|
1506
|
+
return Vn(e.db, e.options.idb.ttl).then(function(t) {
|
|
1507
|
+
return Rn(e, t.map(function(r) {
|
|
1508
|
+
return r.id;
|
|
3308
1509
|
}));
|
|
3309
1510
|
});
|
|
3310
1511
|
}
|
|
3311
|
-
function
|
|
3312
|
-
return t =
|
|
3313
|
-
var
|
|
1512
|
+
function xn(e, t) {
|
|
1513
|
+
return t = Ne(t), Ln(e).then(function(r) {
|
|
1514
|
+
var n = {
|
|
3314
1515
|
closed: !1,
|
|
3315
1516
|
lastCursorId: 0,
|
|
3316
1517
|
channelName: e,
|
|
3317
1518
|
options: t,
|
|
3318
|
-
uuid:
|
|
1519
|
+
uuid: Ie(),
|
|
3319
1520
|
/**
|
|
3320
1521
|
* emittedMessagesIds
|
|
3321
1522
|
* contains all messages that have been emitted before
|
|
3322
1523
|
* @type {ObliviousSet}
|
|
3323
1524
|
*/
|
|
3324
|
-
eMIs: new
|
|
1525
|
+
eMIs: new ht(t.idb.ttl * 2),
|
|
3325
1526
|
// ensures we do not read messages in parallel
|
|
3326
|
-
writeBlockPromise:
|
|
1527
|
+
writeBlockPromise: j,
|
|
3327
1528
|
messagesCallback: null,
|
|
3328
1529
|
readQueuePromises: [],
|
|
3329
|
-
db:
|
|
1530
|
+
db: r
|
|
3330
1531
|
};
|
|
3331
|
-
return
|
|
3332
|
-
|
|
3333
|
-
},
|
|
1532
|
+
return r.onclose = function() {
|
|
1533
|
+
n.closed = !0, t.idb.onclose && t.idb.onclose();
|
|
1534
|
+
}, vt(n), n;
|
|
3334
1535
|
});
|
|
3335
1536
|
}
|
|
3336
|
-
function
|
|
3337
|
-
e.closed ||
|
|
3338
|
-
return
|
|
1537
|
+
function vt(e) {
|
|
1538
|
+
e.closed || yt(e).then(function() {
|
|
1539
|
+
return pt(e.options.idb.fallbackInterval);
|
|
3339
1540
|
}).then(function() {
|
|
3340
|
-
return
|
|
1541
|
+
return vt(e);
|
|
3341
1542
|
});
|
|
3342
1543
|
}
|
|
3343
|
-
function
|
|
1544
|
+
function Un(e, t) {
|
|
3344
1545
|
return !(e.uuid === t.uuid || t.eMIs.has(e.id) || e.data.time < t.messagesCallbackTime);
|
|
3345
1546
|
}
|
|
3346
|
-
function
|
|
3347
|
-
return e.closed || !e.messagesCallback ?
|
|
3348
|
-
var
|
|
3349
|
-
return !!
|
|
3350
|
-
}).map(function(
|
|
3351
|
-
return
|
|
3352
|
-
}).filter(function(
|
|
3353
|
-
return
|
|
3354
|
-
}).sort(function(
|
|
3355
|
-
return
|
|
1547
|
+
function yt(e) {
|
|
1548
|
+
return e.closed || !e.messagesCallback ? j : jn(e.db, e.lastCursorId).then(function(t) {
|
|
1549
|
+
var r = t.filter(function(n) {
|
|
1550
|
+
return !!n;
|
|
1551
|
+
}).map(function(n) {
|
|
1552
|
+
return n.id > e.lastCursorId && (e.lastCursorId = n.id), n;
|
|
1553
|
+
}).filter(function(n) {
|
|
1554
|
+
return Un(n, e);
|
|
1555
|
+
}).sort(function(n, o) {
|
|
1556
|
+
return n.time - o.time;
|
|
3356
1557
|
});
|
|
3357
|
-
return
|
|
3358
|
-
e.messagesCallback && (e.eMIs.add(
|
|
3359
|
-
}),
|
|
1558
|
+
return r.forEach(function(n) {
|
|
1559
|
+
e.messagesCallback && (e.eMIs.add(n.id), e.messagesCallback(n.data));
|
|
1560
|
+
}), j;
|
|
3360
1561
|
});
|
|
3361
1562
|
}
|
|
3362
|
-
function
|
|
1563
|
+
function Fn(e) {
|
|
3363
1564
|
e.closed = !0, e.db.close();
|
|
3364
1565
|
}
|
|
3365
|
-
function
|
|
1566
|
+
function Hn(e, t) {
|
|
3366
1567
|
return e.writeBlockPromise = e.writeBlockPromise.then(function() {
|
|
3367
|
-
return
|
|
1568
|
+
return An(e.db, e.uuid, t);
|
|
3368
1569
|
}).then(function() {
|
|
3369
|
-
|
|
1570
|
+
bn(0, 10) === 0 && Bn(e);
|
|
3370
1571
|
}), e.writeBlockPromise;
|
|
3371
1572
|
}
|
|
3372
|
-
function
|
|
3373
|
-
e.messagesCallbackTime =
|
|
1573
|
+
function Jn(e, t, r) {
|
|
1574
|
+
e.messagesCallbackTime = r, e.messagesCallback = t, yt(e);
|
|
3374
1575
|
}
|
|
3375
|
-
function
|
|
3376
|
-
return !!
|
|
1576
|
+
function Gn() {
|
|
1577
|
+
return !!mt();
|
|
3377
1578
|
}
|
|
3378
|
-
function
|
|
1579
|
+
function Wn(e) {
|
|
3379
1580
|
return e.idb.fallbackInterval * 2;
|
|
3380
1581
|
}
|
|
3381
|
-
var
|
|
3382
|
-
create:
|
|
3383
|
-
close:
|
|
3384
|
-
onMessage:
|
|
3385
|
-
postMessage:
|
|
3386
|
-
canBeUsed:
|
|
3387
|
-
type:
|
|
3388
|
-
averageResponseTime:
|
|
3389
|
-
microSeconds:
|
|
3390
|
-
},
|
|
3391
|
-
function
|
|
1582
|
+
var zn = {
|
|
1583
|
+
create: xn,
|
|
1584
|
+
close: Fn,
|
|
1585
|
+
onMessage: Jn,
|
|
1586
|
+
postMessage: Hn,
|
|
1587
|
+
canBeUsed: Gn,
|
|
1588
|
+
type: Cn,
|
|
1589
|
+
averageResponseTime: Wn,
|
|
1590
|
+
microSeconds: Dn
|
|
1591
|
+
}, Qn = se, Yn = "pubkey.broadcastChannel-", qn = "localstorage";
|
|
1592
|
+
function _t() {
|
|
3392
1593
|
var e;
|
|
3393
1594
|
if (typeof window > "u") return null;
|
|
3394
1595
|
try {
|
|
@@ -3397,54 +1598,54 @@ function ar() {
|
|
|
3397
1598
|
}
|
|
3398
1599
|
return e;
|
|
3399
1600
|
}
|
|
3400
|
-
function
|
|
3401
|
-
return
|
|
1601
|
+
function bt(e) {
|
|
1602
|
+
return Yn + e;
|
|
3402
1603
|
}
|
|
3403
|
-
function
|
|
3404
|
-
return new Promise(function(
|
|
3405
|
-
|
|
3406
|
-
var
|
|
3407
|
-
token:
|
|
1604
|
+
function Xn(e, t) {
|
|
1605
|
+
return new Promise(function(r) {
|
|
1606
|
+
pt().then(function() {
|
|
1607
|
+
var n = bt(e.channelName), o = {
|
|
1608
|
+
token: Ie(),
|
|
3408
1609
|
time: (/* @__PURE__ */ new Date()).getTime(),
|
|
3409
1610
|
data: t,
|
|
3410
1611
|
uuid: e.uuid
|
|
3411
1612
|
}, s = JSON.stringify(o);
|
|
3412
|
-
|
|
3413
|
-
var
|
|
3414
|
-
|
|
1613
|
+
_t().setItem(n, s);
|
|
1614
|
+
var a = document.createEvent("Event");
|
|
1615
|
+
a.initEvent("storage", !0, !0), a.key = n, a.newValue = s, window.dispatchEvent(a), r();
|
|
3415
1616
|
});
|
|
3416
1617
|
});
|
|
3417
1618
|
}
|
|
3418
|
-
function
|
|
3419
|
-
var
|
|
3420
|
-
s.key ===
|
|
1619
|
+
function Kn(e, t) {
|
|
1620
|
+
var r = bt(e), n = function(s) {
|
|
1621
|
+
s.key === r && t(JSON.parse(s.newValue));
|
|
3421
1622
|
};
|
|
3422
|
-
return window.addEventListener("storage",
|
|
1623
|
+
return window.addEventListener("storage", n), n;
|
|
3423
1624
|
}
|
|
3424
|
-
function
|
|
1625
|
+
function Zn(e) {
|
|
3425
1626
|
window.removeEventListener("storage", e);
|
|
3426
1627
|
}
|
|
3427
|
-
function
|
|
3428
|
-
if (t =
|
|
1628
|
+
function er(e, t) {
|
|
1629
|
+
if (t = Ne(t), !wt())
|
|
3429
1630
|
throw new Error("BroadcastChannel: localstorage cannot be used");
|
|
3430
|
-
var
|
|
1631
|
+
var r = Ie(), n = new ht(t.localstorage.removeTimeout), o = {
|
|
3431
1632
|
channelName: e,
|
|
3432
|
-
uuid:
|
|
3433
|
-
eMIs:
|
|
1633
|
+
uuid: r,
|
|
1634
|
+
eMIs: n
|
|
3434
1635
|
// emittedMessagesIds
|
|
3435
1636
|
};
|
|
3436
|
-
return o.listener =
|
|
3437
|
-
o.messagesCallback && s.uuid !==
|
|
1637
|
+
return o.listener = Kn(e, function(s) {
|
|
1638
|
+
o.messagesCallback && s.uuid !== r && (!s.token || n.has(s.token) || s.data.time && s.data.time < o.messagesCallbackTime || (n.add(s.token), o.messagesCallback(s.data)));
|
|
3438
1639
|
}), o;
|
|
3439
1640
|
}
|
|
3440
|
-
function
|
|
3441
|
-
|
|
1641
|
+
function tr(e) {
|
|
1642
|
+
Zn(e.listener);
|
|
3442
1643
|
}
|
|
3443
|
-
function
|
|
3444
|
-
e.messagesCallbackTime =
|
|
1644
|
+
function nr(e, t, r) {
|
|
1645
|
+
e.messagesCallbackTime = r, e.messagesCallback = t;
|
|
3445
1646
|
}
|
|
3446
|
-
function
|
|
3447
|
-
var e =
|
|
1647
|
+
function wt() {
|
|
1648
|
+
var e = _t();
|
|
3448
1649
|
if (!e) return !1;
|
|
3449
1650
|
try {
|
|
3450
1651
|
var t = "__broadcastchannel_check";
|
|
@@ -3454,35 +1655,35 @@ function ur() {
|
|
|
3454
1655
|
}
|
|
3455
1656
|
return !0;
|
|
3456
1657
|
}
|
|
3457
|
-
function
|
|
1658
|
+
function rr() {
|
|
3458
1659
|
var e = 120, t = navigator.userAgent.toLowerCase();
|
|
3459
1660
|
return t.includes("safari") && !t.includes("chrome") ? e * 2 : e;
|
|
3460
1661
|
}
|
|
3461
|
-
var
|
|
3462
|
-
create:
|
|
3463
|
-
close:
|
|
3464
|
-
onMessage:
|
|
3465
|
-
postMessage:
|
|
3466
|
-
canBeUsed:
|
|
3467
|
-
type:
|
|
3468
|
-
averageResponseTime:
|
|
3469
|
-
microSeconds:
|
|
3470
|
-
},
|
|
3471
|
-
function
|
|
1662
|
+
var or = {
|
|
1663
|
+
create: er,
|
|
1664
|
+
close: tr,
|
|
1665
|
+
onMessage: nr,
|
|
1666
|
+
postMessage: Xn,
|
|
1667
|
+
canBeUsed: wt,
|
|
1668
|
+
type: qn,
|
|
1669
|
+
averageResponseTime: rr,
|
|
1670
|
+
microSeconds: Qn
|
|
1671
|
+
}, sr = se, ir = "simulate", ke = /* @__PURE__ */ new Set();
|
|
1672
|
+
function ar(e) {
|
|
3472
1673
|
var t = {
|
|
3473
1674
|
name: e,
|
|
3474
1675
|
messagesCallback: null
|
|
3475
1676
|
};
|
|
3476
|
-
return
|
|
1677
|
+
return ke.add(t), t;
|
|
3477
1678
|
}
|
|
3478
|
-
function
|
|
3479
|
-
|
|
1679
|
+
function cr(e) {
|
|
1680
|
+
ke.delete(e);
|
|
3480
1681
|
}
|
|
3481
|
-
function
|
|
3482
|
-
return new Promise(function(
|
|
1682
|
+
function ur(e, t) {
|
|
1683
|
+
return new Promise(function(r) {
|
|
3483
1684
|
return setTimeout(function() {
|
|
3484
|
-
var
|
|
3485
|
-
|
|
1685
|
+
var n = Array.from(ke);
|
|
1686
|
+
n.filter(function(o) {
|
|
3486
1687
|
return o.name === e.name;
|
|
3487
1688
|
}).filter(function(o) {
|
|
3488
1689
|
return o !== e;
|
|
@@ -3490,65 +1691,65 @@ function mi(e, t) {
|
|
|
3490
1691
|
return !!o.messagesCallback;
|
|
3491
1692
|
}).forEach(function(o) {
|
|
3492
1693
|
return o.messagesCallback(t);
|
|
3493
|
-
}),
|
|
1694
|
+
}), r();
|
|
3494
1695
|
}, 5);
|
|
3495
1696
|
});
|
|
3496
1697
|
}
|
|
3497
|
-
function
|
|
1698
|
+
function lr(e, t) {
|
|
3498
1699
|
e.messagesCallback = t;
|
|
3499
1700
|
}
|
|
3500
|
-
function
|
|
1701
|
+
function fr() {
|
|
3501
1702
|
return !0;
|
|
3502
1703
|
}
|
|
3503
|
-
function
|
|
1704
|
+
function dr() {
|
|
3504
1705
|
return 5;
|
|
3505
1706
|
}
|
|
3506
|
-
var
|
|
3507
|
-
create:
|
|
3508
|
-
close:
|
|
3509
|
-
onMessage:
|
|
3510
|
-
postMessage:
|
|
3511
|
-
canBeUsed:
|
|
3512
|
-
type:
|
|
3513
|
-
averageResponseTime:
|
|
3514
|
-
microSeconds:
|
|
3515
|
-
},
|
|
3516
|
-
|
|
1707
|
+
var pr = {
|
|
1708
|
+
create: ar,
|
|
1709
|
+
close: cr,
|
|
1710
|
+
onMessage: lr,
|
|
1711
|
+
postMessage: ur,
|
|
1712
|
+
canBeUsed: fr,
|
|
1713
|
+
type: ir,
|
|
1714
|
+
averageResponseTime: dr,
|
|
1715
|
+
microSeconds: sr
|
|
1716
|
+
}, Fe = [
|
|
1717
|
+
$n,
|
|
3517
1718
|
// fastest
|
|
3518
|
-
|
|
3519
|
-
|
|
1719
|
+
zn,
|
|
1720
|
+
or
|
|
3520
1721
|
];
|
|
3521
|
-
function
|
|
3522
|
-
var t = [].concat(e.methods,
|
|
1722
|
+
function hr(e) {
|
|
1723
|
+
var t = [].concat(e.methods, Fe).filter(Boolean);
|
|
3523
1724
|
if (e.type) {
|
|
3524
1725
|
if (e.type === "simulate")
|
|
3525
|
-
return
|
|
3526
|
-
var
|
|
1726
|
+
return pr;
|
|
1727
|
+
var r = t.find(function(o) {
|
|
3527
1728
|
return o.type === e.type;
|
|
3528
1729
|
});
|
|
3529
|
-
if (
|
|
1730
|
+
if (r) return r;
|
|
3530
1731
|
throw new Error("method-type " + e.type + " not found");
|
|
3531
1732
|
}
|
|
3532
1733
|
e.webWorkerSupport || (t = t.filter(function(o) {
|
|
3533
1734
|
return o.type !== "idb";
|
|
3534
1735
|
}));
|
|
3535
|
-
var
|
|
1736
|
+
var n = t.find(function(o) {
|
|
3536
1737
|
return o.canBeUsed();
|
|
3537
1738
|
});
|
|
3538
|
-
if (
|
|
3539
|
-
throw new Error("No usable method found in " + JSON.stringify(
|
|
1739
|
+
if (n) return n;
|
|
1740
|
+
throw new Error("No usable method found in " + JSON.stringify(Fe.map(function(o) {
|
|
3540
1741
|
return o.type;
|
|
3541
1742
|
})));
|
|
3542
1743
|
}
|
|
3543
|
-
var
|
|
3544
|
-
this.id =
|
|
1744
|
+
var Et = /* @__PURE__ */ new Set(), gr = 0, $e = function(t, r) {
|
|
1745
|
+
this.id = gr++, Et.add(this), this.name = t, He && (r = He), this.options = Ne(r), this.method = hr(this.options), this._iL = !1, this._onML = null, this._addEL = {
|
|
3545
1746
|
message: [],
|
|
3546
1747
|
internal: []
|
|
3547
|
-
}, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null,
|
|
1748
|
+
}, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null, mr(this);
|
|
3548
1749
|
};
|
|
3549
|
-
|
|
3550
|
-
var
|
|
3551
|
-
|
|
1750
|
+
$e._pubkey = !0;
|
|
1751
|
+
var He;
|
|
1752
|
+
$e.prototype = {
|
|
3552
1753
|
postMessage: function(t) {
|
|
3553
1754
|
if (this.closed)
|
|
3554
1755
|
throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed " + /**
|
|
@@ -3557,41 +1758,41 @@ At.prototype = {
|
|
|
3557
1758
|
* gives some clue about where in your application this happens.
|
|
3558
1759
|
*/
|
|
3559
1760
|
JSON.stringify(t));
|
|
3560
|
-
return
|
|
1761
|
+
return Je(this, "message", t);
|
|
3561
1762
|
},
|
|
3562
1763
|
postInternal: function(t) {
|
|
3563
|
-
return
|
|
1764
|
+
return Je(this, "internal", t);
|
|
3564
1765
|
},
|
|
3565
1766
|
set onmessage(e) {
|
|
3566
|
-
var t = this.method.microSeconds(),
|
|
1767
|
+
var t = this.method.microSeconds(), r = {
|
|
3567
1768
|
time: t,
|
|
3568
1769
|
fn: e
|
|
3569
1770
|
};
|
|
3570
|
-
|
|
1771
|
+
We(this, "message", this._onML), e && typeof e == "function" ? (this._onML = r, Ge(this, "message", r)) : this._onML = null;
|
|
3571
1772
|
},
|
|
3572
|
-
addEventListener: function(t,
|
|
3573
|
-
var
|
|
3574
|
-
time:
|
|
3575
|
-
fn:
|
|
1773
|
+
addEventListener: function(t, r) {
|
|
1774
|
+
var n = this.method.microSeconds(), o = {
|
|
1775
|
+
time: n,
|
|
1776
|
+
fn: r
|
|
3576
1777
|
};
|
|
3577
|
-
|
|
1778
|
+
Ge(this, t, o);
|
|
3578
1779
|
},
|
|
3579
|
-
removeEventListener: function(t,
|
|
3580
|
-
var
|
|
3581
|
-
return o.fn ===
|
|
1780
|
+
removeEventListener: function(t, r) {
|
|
1781
|
+
var n = this._addEL[t].find(function(o) {
|
|
1782
|
+
return o.fn === r;
|
|
3582
1783
|
});
|
|
3583
|
-
|
|
1784
|
+
We(this, t, n);
|
|
3584
1785
|
},
|
|
3585
1786
|
close: function() {
|
|
3586
1787
|
var t = this;
|
|
3587
1788
|
if (!this.closed) {
|
|
3588
|
-
|
|
3589
|
-
var
|
|
3590
|
-
return this._onML = null, this._addEL.message = [],
|
|
1789
|
+
Et.delete(this), this.closed = !0;
|
|
1790
|
+
var r = this._prepP ? this._prepP : j;
|
|
1791
|
+
return this._onML = null, this._addEL.message = [], r.then(function() {
|
|
3591
1792
|
return Promise.all(Array.from(t._uMP));
|
|
3592
1793
|
}).then(function() {
|
|
3593
|
-
return Promise.all(t._befC.map(function(
|
|
3594
|
-
return
|
|
1794
|
+
return Promise.all(t._befC.map(function(n) {
|
|
1795
|
+
return n();
|
|
3595
1796
|
}));
|
|
3596
1797
|
}).then(function() {
|
|
3597
1798
|
return t.method.close(t._state);
|
|
@@ -3605,79 +1806,79 @@ At.prototype = {
|
|
|
3605
1806
|
return this.closed;
|
|
3606
1807
|
}
|
|
3607
1808
|
};
|
|
3608
|
-
function
|
|
3609
|
-
var
|
|
3610
|
-
time:
|
|
1809
|
+
function Je(e, t, r) {
|
|
1810
|
+
var n = e.method.microSeconds(), o = {
|
|
1811
|
+
time: n,
|
|
3611
1812
|
type: t,
|
|
3612
|
-
data:
|
|
3613
|
-
}, s = e._prepP ? e._prepP :
|
|
1813
|
+
data: r
|
|
1814
|
+
}, s = e._prepP ? e._prepP : j;
|
|
3614
1815
|
return s.then(function() {
|
|
3615
|
-
var
|
|
3616
|
-
return e._uMP.add(
|
|
3617
|
-
return e._uMP.delete(
|
|
3618
|
-
}),
|
|
1816
|
+
var a = e.method.postMessage(e._state, o);
|
|
1817
|
+
return e._uMP.add(a), a.catch().then(function() {
|
|
1818
|
+
return e._uMP.delete(a);
|
|
1819
|
+
}), a;
|
|
3619
1820
|
});
|
|
3620
1821
|
}
|
|
3621
|
-
function
|
|
1822
|
+
function mr(e) {
|
|
3622
1823
|
var t = e.method.create(e.name, e.options);
|
|
3623
|
-
|
|
3624
|
-
e._state =
|
|
1824
|
+
_n(t) ? (e._prepP = t, t.then(function(r) {
|
|
1825
|
+
e._state = r;
|
|
3625
1826
|
})) : e._state = t;
|
|
3626
1827
|
}
|
|
3627
|
-
function
|
|
1828
|
+
function St(e) {
|
|
3628
1829
|
return e._addEL.message.length > 0 || e._addEL.internal.length > 0;
|
|
3629
1830
|
}
|
|
3630
|
-
function
|
|
3631
|
-
e._addEL[t].push(
|
|
1831
|
+
function Ge(e, t, r) {
|
|
1832
|
+
e._addEL[t].push(r), vr(e);
|
|
3632
1833
|
}
|
|
3633
|
-
function
|
|
3634
|
-
e._addEL[t] = e._addEL[t].filter(function(
|
|
3635
|
-
return
|
|
3636
|
-
}),
|
|
1834
|
+
function We(e, t, r) {
|
|
1835
|
+
e._addEL[t] = e._addEL[t].filter(function(n) {
|
|
1836
|
+
return n !== r;
|
|
1837
|
+
}), yr(e);
|
|
3637
1838
|
}
|
|
3638
|
-
function
|
|
3639
|
-
if (!e._iL &&
|
|
1839
|
+
function vr(e) {
|
|
1840
|
+
if (!e._iL && St(e)) {
|
|
3640
1841
|
var t = function(o) {
|
|
3641
1842
|
e._addEL[o.type].forEach(function(s) {
|
|
3642
|
-
var
|
|
3643
|
-
o.time >=
|
|
1843
|
+
var a = 1e5, i = s.time - a;
|
|
1844
|
+
o.time >= i && s.fn(o.data);
|
|
3644
1845
|
});
|
|
3645
|
-
},
|
|
1846
|
+
}, r = e.method.microSeconds();
|
|
3646
1847
|
e._prepP ? e._prepP.then(function() {
|
|
3647
|
-
e._iL = !0, e.method.onMessage(e._state, t,
|
|
3648
|
-
}) : (e._iL = !0, e.method.onMessage(e._state, t,
|
|
1848
|
+
e._iL = !0, e.method.onMessage(e._state, t, r);
|
|
1849
|
+
}) : (e._iL = !0, e.method.onMessage(e._state, t, r));
|
|
3649
1850
|
}
|
|
3650
1851
|
}
|
|
3651
|
-
function
|
|
3652
|
-
if (e._iL && !
|
|
1852
|
+
function yr(e) {
|
|
1853
|
+
if (e._iL && !St(e)) {
|
|
3653
1854
|
e._iL = !1;
|
|
3654
1855
|
var t = e.method.microSeconds();
|
|
3655
1856
|
e.method.onMessage(e._state, null, t);
|
|
3656
1857
|
}
|
|
3657
1858
|
}
|
|
3658
|
-
class
|
|
1859
|
+
class pe extends Error {
|
|
3659
1860
|
/**
|
|
3660
1861
|
* @param {string} message
|
|
3661
1862
|
* @param {string[]} keys
|
|
3662
1863
|
*/
|
|
3663
|
-
constructor(t,
|
|
3664
|
-
super(t), this.name = "DevalueError", this.path =
|
|
1864
|
+
constructor(t, r) {
|
|
1865
|
+
super(t), this.name = "DevalueError", this.path = r.join("");
|
|
3665
1866
|
}
|
|
3666
1867
|
}
|
|
3667
|
-
function
|
|
1868
|
+
function ze(e) {
|
|
3668
1869
|
return Object(e) !== e;
|
|
3669
1870
|
}
|
|
3670
|
-
const
|
|
1871
|
+
const _r = /* @__PURE__ */ Object.getOwnPropertyNames(
|
|
3671
1872
|
Object.prototype
|
|
3672
1873
|
).sort().join("\0");
|
|
3673
|
-
function
|
|
1874
|
+
function br(e) {
|
|
3674
1875
|
const t = Object.getPrototypeOf(e);
|
|
3675
|
-
return t === Object.prototype || t === null || Object.getOwnPropertyNames(t).sort().join("\0") ===
|
|
1876
|
+
return t === Object.prototype || t === null || Object.getOwnPropertyNames(t).sort().join("\0") === _r;
|
|
3676
1877
|
}
|
|
3677
|
-
function
|
|
1878
|
+
function wr(e) {
|
|
3678
1879
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3679
1880
|
}
|
|
3680
|
-
function
|
|
1881
|
+
function Er(e) {
|
|
3681
1882
|
switch (e) {
|
|
3682
1883
|
case '"':
|
|
3683
1884
|
return '\\"';
|
|
@@ -3704,231 +1905,231 @@ function $i(e) {
|
|
|
3704
1905
|
return e < " " ? `\\u${e.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
|
|
3705
1906
|
}
|
|
3706
1907
|
}
|
|
3707
|
-
function
|
|
3708
|
-
let t = "",
|
|
3709
|
-
const
|
|
3710
|
-
for (let o = 0; o <
|
|
3711
|
-
const s = e[o],
|
|
3712
|
-
|
|
1908
|
+
function H(e) {
|
|
1909
|
+
let t = "", r = 0;
|
|
1910
|
+
const n = e.length;
|
|
1911
|
+
for (let o = 0; o < n; o += 1) {
|
|
1912
|
+
const s = e[o], a = Er(s);
|
|
1913
|
+
a && (t += e.slice(r, o) + a, r = o + 1);
|
|
3713
1914
|
}
|
|
3714
|
-
return `"${
|
|
1915
|
+
return `"${r === 0 ? e : t + e.slice(r)}"`;
|
|
3715
1916
|
}
|
|
3716
|
-
const
|
|
3717
|
-
function
|
|
3718
|
-
return
|
|
1917
|
+
const Te = -1, Ot = -2, It = -3, Nt = -4, Pt = -5, De = -6;
|
|
1918
|
+
function Qe(e, t) {
|
|
1919
|
+
return Sr(JSON.parse(e));
|
|
3719
1920
|
}
|
|
3720
|
-
function
|
|
1921
|
+
function Sr(e, t) {
|
|
3721
1922
|
if (typeof e == "number") return o(e, !0);
|
|
3722
1923
|
if (!Array.isArray(e) || e.length === 0)
|
|
3723
1924
|
throw new Error("Invalid input");
|
|
3724
|
-
const
|
|
1925
|
+
const r = (
|
|
3725
1926
|
/** @type {any[]} */
|
|
3726
1927
|
e
|
|
3727
|
-
),
|
|
3728
|
-
function o(s,
|
|
3729
|
-
if (s ===
|
|
3730
|
-
if (s ===
|
|
3731
|
-
if (s ===
|
|
3732
|
-
if (s ===
|
|
3733
|
-
if (s ===
|
|
3734
|
-
if (
|
|
3735
|
-
if (s in
|
|
3736
|
-
const
|
|
3737
|
-
if (!
|
|
3738
|
-
|
|
3739
|
-
else if (Array.isArray(
|
|
3740
|
-
if (typeof
|
|
3741
|
-
const
|
|
3742
|
-
switch (
|
|
1928
|
+
), n = Array(r.length);
|
|
1929
|
+
function o(s, a = !1) {
|
|
1930
|
+
if (s === Te) return;
|
|
1931
|
+
if (s === It) return NaN;
|
|
1932
|
+
if (s === Nt) return 1 / 0;
|
|
1933
|
+
if (s === Pt) return -1 / 0;
|
|
1934
|
+
if (s === De) return -0;
|
|
1935
|
+
if (a) throw new Error("Invalid input");
|
|
1936
|
+
if (s in n) return n[s];
|
|
1937
|
+
const i = r[s];
|
|
1938
|
+
if (!i || typeof i != "object")
|
|
1939
|
+
n[s] = i;
|
|
1940
|
+
else if (Array.isArray(i))
|
|
1941
|
+
if (typeof i[0] == "string") {
|
|
1942
|
+
const u = i[0];
|
|
1943
|
+
switch (u) {
|
|
3743
1944
|
case "Date":
|
|
3744
|
-
|
|
1945
|
+
n[s] = new Date(i[1]);
|
|
3745
1946
|
break;
|
|
3746
1947
|
case "Set":
|
|
3747
|
-
const
|
|
3748
|
-
|
|
3749
|
-
for (let
|
|
3750
|
-
|
|
1948
|
+
const c = /* @__PURE__ */ new Set();
|
|
1949
|
+
n[s] = c;
|
|
1950
|
+
for (let g = 1; g < i.length; g += 1)
|
|
1951
|
+
c.add(o(i[g]));
|
|
3751
1952
|
break;
|
|
3752
1953
|
case "Map":
|
|
3753
|
-
const
|
|
3754
|
-
|
|
3755
|
-
for (let
|
|
3756
|
-
|
|
1954
|
+
const d = /* @__PURE__ */ new Map();
|
|
1955
|
+
n[s] = d;
|
|
1956
|
+
for (let g = 1; g < i.length; g += 2)
|
|
1957
|
+
d.set(o(i[g]), o(i[g + 1]));
|
|
3757
1958
|
break;
|
|
3758
1959
|
case "RegExp":
|
|
3759
|
-
|
|
1960
|
+
n[s] = new RegExp(i[1], i[2]);
|
|
3760
1961
|
break;
|
|
3761
1962
|
case "Object":
|
|
3762
|
-
|
|
1963
|
+
n[s] = Object(i[1]);
|
|
3763
1964
|
break;
|
|
3764
1965
|
case "BigInt":
|
|
3765
|
-
|
|
1966
|
+
n[s] = BigInt(i[1]);
|
|
3766
1967
|
break;
|
|
3767
1968
|
case "null":
|
|
3768
|
-
const
|
|
3769
|
-
|
|
3770
|
-
for (let
|
|
3771
|
-
|
|
1969
|
+
const p = /* @__PURE__ */ Object.create(null);
|
|
1970
|
+
n[s] = p;
|
|
1971
|
+
for (let g = 1; g < i.length; g += 2)
|
|
1972
|
+
p[i[g]] = o(i[g + 1]);
|
|
3772
1973
|
break;
|
|
3773
1974
|
default:
|
|
3774
|
-
throw new Error(`Unknown type ${
|
|
1975
|
+
throw new Error(`Unknown type ${u}`);
|
|
3775
1976
|
}
|
|
3776
1977
|
} else {
|
|
3777
|
-
const
|
|
3778
|
-
|
|
3779
|
-
for (let
|
|
3780
|
-
const
|
|
3781
|
-
|
|
1978
|
+
const u = new Array(i.length);
|
|
1979
|
+
n[s] = u;
|
|
1980
|
+
for (let c = 0; c < i.length; c += 1) {
|
|
1981
|
+
const d = i[c];
|
|
1982
|
+
d !== Ot && (u[c] = o(d));
|
|
3782
1983
|
}
|
|
3783
1984
|
}
|
|
3784
1985
|
else {
|
|
3785
|
-
const
|
|
3786
|
-
|
|
3787
|
-
for (const
|
|
3788
|
-
const
|
|
3789
|
-
c
|
|
1986
|
+
const u = {};
|
|
1987
|
+
n[s] = u;
|
|
1988
|
+
for (const c in i) {
|
|
1989
|
+
const d = i[c];
|
|
1990
|
+
u[c] = o(d);
|
|
3790
1991
|
}
|
|
3791
1992
|
}
|
|
3792
|
-
return
|
|
1993
|
+
return n[s];
|
|
3793
1994
|
}
|
|
3794
1995
|
return o(0);
|
|
3795
1996
|
}
|
|
3796
|
-
function
|
|
3797
|
-
const
|
|
3798
|
-
for (const
|
|
3799
|
-
o.push({ key:
|
|
1997
|
+
function Ye(e, t) {
|
|
1998
|
+
const r = [], n = /* @__PURE__ */ new Map(), o = [];
|
|
1999
|
+
for (const c in t)
|
|
2000
|
+
o.push({ key: c, fn: t[c] });
|
|
3800
2001
|
const s = [];
|
|
3801
|
-
let
|
|
3802
|
-
function
|
|
3803
|
-
if (typeof
|
|
3804
|
-
throw new
|
|
3805
|
-
if (
|
|
3806
|
-
if (
|
|
3807
|
-
if (Number.isNaN(
|
|
3808
|
-
if (
|
|
3809
|
-
if (
|
|
3810
|
-
if (
|
|
3811
|
-
const
|
|
3812
|
-
|
|
3813
|
-
for (const { key:
|
|
3814
|
-
const
|
|
3815
|
-
if (
|
|
3816
|
-
return
|
|
2002
|
+
let a = 0;
|
|
2003
|
+
function i(c) {
|
|
2004
|
+
if (typeof c == "function")
|
|
2005
|
+
throw new pe("Cannot stringify a function", s);
|
|
2006
|
+
if (n.has(c)) return n.get(c);
|
|
2007
|
+
if (c === void 0) return Te;
|
|
2008
|
+
if (Number.isNaN(c)) return It;
|
|
2009
|
+
if (c === 1 / 0) return Nt;
|
|
2010
|
+
if (c === -1 / 0) return Pt;
|
|
2011
|
+
if (c === 0 && 1 / c < 0) return De;
|
|
2012
|
+
const d = a++;
|
|
2013
|
+
n.set(c, d);
|
|
2014
|
+
for (const { key: g, fn: w } of o) {
|
|
2015
|
+
const E = w(c);
|
|
2016
|
+
if (E)
|
|
2017
|
+
return r[d] = `["${g}",${i(E)}]`, d;
|
|
3817
2018
|
}
|
|
3818
|
-
let
|
|
3819
|
-
if (
|
|
3820
|
-
|
|
2019
|
+
let p = "";
|
|
2020
|
+
if (ze(c))
|
|
2021
|
+
p = he(c);
|
|
3821
2022
|
else
|
|
3822
|
-
switch (
|
|
2023
|
+
switch (wr(c)) {
|
|
3823
2024
|
case "Number":
|
|
3824
2025
|
case "String":
|
|
3825
2026
|
case "Boolean":
|
|
3826
|
-
|
|
2027
|
+
p = `["Object",${he(c)}]`;
|
|
3827
2028
|
break;
|
|
3828
2029
|
case "BigInt":
|
|
3829
|
-
|
|
2030
|
+
p = `["BigInt",${c}]`;
|
|
3830
2031
|
break;
|
|
3831
2032
|
case "Date":
|
|
3832
|
-
|
|
2033
|
+
p = `["Date","${!isNaN(c.getDate()) ? c.toISOString() : ""}"]`;
|
|
3833
2034
|
break;
|
|
3834
2035
|
case "RegExp":
|
|
3835
|
-
const { source:
|
|
3836
|
-
|
|
2036
|
+
const { source: E, flags: B } = c;
|
|
2037
|
+
p = B ? `["RegExp",${H(E)},"${B}"]` : `["RegExp",${H(E)}]`;
|
|
3837
2038
|
break;
|
|
3838
2039
|
case "Array":
|
|
3839
|
-
|
|
3840
|
-
for (let
|
|
3841
|
-
|
|
3842
|
-
|
|
2040
|
+
p = "[";
|
|
2041
|
+
for (let v = 0; v < c.length; v += 1)
|
|
2042
|
+
v > 0 && (p += ","), v in c ? (s.push(`[${v}]`), p += i(c[v]), s.pop()) : p += Ot;
|
|
2043
|
+
p += "]";
|
|
3843
2044
|
break;
|
|
3844
2045
|
case "Set":
|
|
3845
|
-
|
|
3846
|
-
for (const
|
|
3847
|
-
|
|
3848
|
-
|
|
2046
|
+
p = '["Set"';
|
|
2047
|
+
for (const v of c)
|
|
2048
|
+
p += `,${i(v)}`;
|
|
2049
|
+
p += "]";
|
|
3849
2050
|
break;
|
|
3850
2051
|
case "Map":
|
|
3851
|
-
|
|
3852
|
-
for (const [
|
|
2052
|
+
p = '["Map"';
|
|
2053
|
+
for (const [v, T] of c)
|
|
3853
2054
|
s.push(
|
|
3854
|
-
`.get(${
|
|
3855
|
-
),
|
|
3856
|
-
|
|
2055
|
+
`.get(${ze(v) ? he(v) : "..."})`
|
|
2056
|
+
), p += `,${i(v)},${i(T)}`, s.pop();
|
|
2057
|
+
p += "]";
|
|
3857
2058
|
break;
|
|
3858
2059
|
default:
|
|
3859
|
-
if (!
|
|
3860
|
-
throw new
|
|
2060
|
+
if (!br(c))
|
|
2061
|
+
throw new pe(
|
|
3861
2062
|
"Cannot stringify arbitrary non-POJOs",
|
|
3862
2063
|
s
|
|
3863
2064
|
);
|
|
3864
|
-
if (Object.getOwnPropertySymbols(
|
|
3865
|
-
throw new
|
|
2065
|
+
if (Object.getOwnPropertySymbols(c).length > 0)
|
|
2066
|
+
throw new pe(
|
|
3866
2067
|
"Cannot stringify POJOs with symbolic keys",
|
|
3867
2068
|
s
|
|
3868
2069
|
);
|
|
3869
|
-
if (Object.getPrototypeOf(
|
|
3870
|
-
|
|
3871
|
-
for (const
|
|
3872
|
-
s.push(`.${
|
|
3873
|
-
|
|
2070
|
+
if (Object.getPrototypeOf(c) === null) {
|
|
2071
|
+
p = '["null"';
|
|
2072
|
+
for (const v in c)
|
|
2073
|
+
s.push(`.${v}`), p += `,${H(v)},${i(c[v])}`, s.pop();
|
|
2074
|
+
p += "]";
|
|
3874
2075
|
} else {
|
|
3875
|
-
|
|
3876
|
-
let
|
|
3877
|
-
for (const
|
|
3878
|
-
|
|
3879
|
-
|
|
2076
|
+
p = "{";
|
|
2077
|
+
let v = !1;
|
|
2078
|
+
for (const T in c)
|
|
2079
|
+
v && (p += ","), v = !0, s.push(`.${T}`), p += `${H(T)}:${i(c[T])}`, s.pop();
|
|
2080
|
+
p += "}";
|
|
3880
2081
|
}
|
|
3881
2082
|
}
|
|
3882
|
-
return
|
|
2083
|
+
return r[d] = p, d;
|
|
3883
2084
|
}
|
|
3884
|
-
const
|
|
3885
|
-
return
|
|
2085
|
+
const u = i(e);
|
|
2086
|
+
return u < 0 ? `${u}` : `[${r.join(",")}]`;
|
|
3886
2087
|
}
|
|
3887
|
-
function
|
|
2088
|
+
function he(e) {
|
|
3888
2089
|
const t = typeof e;
|
|
3889
|
-
return t === "string" ?
|
|
3890
|
-
}
|
|
3891
|
-
function
|
|
3892
|
-
let o = `${t.$id}-${e.toString()}`, s = new
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
}, { deep: !0 }), s.onmessage = (
|
|
3896
|
-
if (
|
|
3897
|
-
s.postMessage({ timestamp:
|
|
2090
|
+
return t === "string" ? H(e) : e instanceof String ? H(e.toString()) : e === void 0 ? Te.toString() : e === 0 && 1 / e < 0 ? De.toString() : t === "bigint" ? `["BigInt","${e}"]` : String(e);
|
|
2091
|
+
}
|
|
2092
|
+
function Or(e, t, { initialize: r, type: n }) {
|
|
2093
|
+
let o = `${t.$id}-${e.toString()}`, s = new $e(o, { type: n }), a = !1, i = 0;
|
|
2094
|
+
we(() => t[e], (d) => {
|
|
2095
|
+
a || (i = Date.now(), s.postMessage({ timestamp: i, state: Qe(Ye(d)) })), a = !1;
|
|
2096
|
+
}, { deep: !0 }), s.onmessage = (d) => {
|
|
2097
|
+
if (d === void 0) {
|
|
2098
|
+
s.postMessage({ timestamp: i, state: Qe(Ye(t[e])) });
|
|
3898
2099
|
return;
|
|
3899
2100
|
}
|
|
3900
|
-
|
|
2101
|
+
d.timestamp <= i || (a = !0, i = d.timestamp, t[e] = d.state);
|
|
3901
2102
|
};
|
|
3902
|
-
let
|
|
3903
|
-
return
|
|
3904
|
-
}
|
|
3905
|
-
var
|
|
3906
|
-
var
|
|
3907
|
-
let s = ((
|
|
3908
|
-
!s || Object.keys(
|
|
3909
|
-
var
|
|
3910
|
-
|
|
2103
|
+
let u = () => s.postMessage(void 0), c = () => s.close();
|
|
2104
|
+
return r && u(), { sync: u, unshare: c };
|
|
2105
|
+
}
|
|
2106
|
+
var Ir = (e, t) => Object.keys(t).includes(e), Nr = ({ initialize: e = !0, enable: t = !0, type: r }) => ({ store: n, options: o }) => {
|
|
2107
|
+
var i, u;
|
|
2108
|
+
let s = ((i = o == null ? void 0 : o.share) == null ? void 0 : i.enable) ?? t, a = ((u = o == null ? void 0 : o.share) == null ? void 0 : u.omit) ?? [];
|
|
2109
|
+
!s || Object.keys(n.$state).forEach((c) => {
|
|
2110
|
+
var d;
|
|
2111
|
+
a.includes(c) || !Ir(c, n.$state) || Or(c, n, { initialize: ((d = o == null ? void 0 : o.share) == null ? void 0 : d.initialize) ?? e, type: r });
|
|
3911
2112
|
});
|
|
3912
2113
|
};
|
|
3913
|
-
const
|
|
3914
|
-
|
|
3915
|
-
|
|
2114
|
+
const kt = pn();
|
|
2115
|
+
kt.use(
|
|
2116
|
+
Nr({
|
|
3916
2117
|
enable: !0,
|
|
3917
2118
|
initialize: !0
|
|
3918
2119
|
})
|
|
3919
2120
|
);
|
|
3920
|
-
const
|
|
2121
|
+
const Mr = {
|
|
3921
2122
|
install: (e, t) => {
|
|
3922
|
-
const n = (t == null ? void 0 : t.router)
|
|
3923
|
-
if (e.use(n), e.use(
|
|
3924
|
-
for (const [
|
|
3925
|
-
e.component(
|
|
2123
|
+
const r = e.config.globalProperties.$router, n = r || (t == null ? void 0 : t.router), o = new be(n, t == null ? void 0 : t.getMeta);
|
|
2124
|
+
if (!r && n && e.use(n), e.use(kt), e.provide("$registry", o), t != null && t.components)
|
|
2125
|
+
for (const [s, a] of Object.entries(t.components))
|
|
2126
|
+
e.component(s, a);
|
|
3926
2127
|
}
|
|
3927
2128
|
};
|
|
3928
2129
|
export {
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
2130
|
+
Dr as DoctypeMeta,
|
|
2131
|
+
be as Registry,
|
|
2132
|
+
Mr as Stonecrop,
|
|
2133
|
+
Tr as useStonecrop
|
|
3933
2134
|
};
|
|
3934
2135
|
//# sourceMappingURL=stonecrop.js.map
|