vue-micro-router 1.0.59 → 1.0.60
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/index.mjs +687 -671
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
import { shallowReactive as
|
|
2
|
-
import { i as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
1
|
+
import { shallowReactive as F, computed as C, defineAsyncComponent as Pe, reactive as we, nextTick as te, ref as ne, inject as V, watch as X, onMounted as Q, onBeforeUnmount as De, provide as O, toRefs as Ue, toRef as Ye, defineComponent as ie, openBlock as G, createBlock as z, resolveDynamicComponent as Ae, mergeProps as Ce, Teleport as Fe, createElementVNode as q, withModifiers as ce, normalizeStyle as Ie, normalizeClass as k, createElementBlock as j, createCommentVNode as Xe, renderSlot as Re, Fragment as oe, createVNode as Te, TransitionGroup as Le, withCtx as fe, renderList as ge, unref as Y } from "vue";
|
|
2
|
+
import { i as Ee, s as Se, g as H, w as ae, p as I, b as W, n as $, u as xe } from "./use-audio-manager.mjs";
|
|
3
|
+
const Be = Symbol("micro-router");
|
|
4
|
+
function Et() {
|
|
5
5
|
return Symbol("micro-router-nested");
|
|
6
6
|
}
|
|
7
|
-
const
|
|
8
|
-
function
|
|
7
|
+
const me = Symbol("micro-router-root"), Ge = Symbol("micro-route-path"), Ne = Symbol("micro-dialog-path"), Oe = Symbol("micro-control-name"), se = Symbol("micro-attrs-read"), re = Symbol("micro-attrs-write"), ze = 550;
|
|
8
|
+
function be() {
|
|
9
9
|
const e = /* @__PURE__ */ new Set();
|
|
10
|
-
function
|
|
10
|
+
function n(i, t) {
|
|
11
11
|
const l = setTimeout(() => {
|
|
12
12
|
e.delete(l), i();
|
|
13
13
|
}, t);
|
|
14
14
|
return e.add(l), l;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function o() {
|
|
17
17
|
e.forEach(clearTimeout), e.clear();
|
|
18
18
|
}
|
|
19
|
-
return { schedule:
|
|
19
|
+
return { schedule: n, cleanup: o };
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return new Promise((
|
|
21
|
+
function de(e) {
|
|
22
|
+
return new Promise((n) => setTimeout(n, e));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
const r =
|
|
24
|
+
function Ve(e, n) {
|
|
25
|
+
const o = e.defaultControlName, i = e.onboardingControlName, t = 300, l = be();
|
|
26
|
+
let u = !1;
|
|
27
|
+
const r = F(/* @__PURE__ */ new Map()), c = F(
|
|
28
28
|
/* @__PURE__ */ new Map()
|
|
29
29
|
), a = C(() => {
|
|
30
30
|
const s = [];
|
|
31
31
|
for (const f of r.values())
|
|
32
32
|
f.activated && s.push(f);
|
|
33
33
|
return s;
|
|
34
|
-
}),
|
|
35
|
-
() => a.value.some((s) => s.name !==
|
|
36
|
-
),
|
|
37
|
-
const s = a.value.find((f) => f.name !==
|
|
38
|
-
return (s == null ? void 0 : s.name) ??
|
|
34
|
+
}), d = a, R = C(
|
|
35
|
+
() => a.value.some((s) => s.name !== o)
|
|
36
|
+
), T = C(() => {
|
|
37
|
+
const s = a.value.find((f) => f.name !== o);
|
|
38
|
+
return (s == null ? void 0 : s.name) ?? o;
|
|
39
39
|
});
|
|
40
|
-
function M(s, f,
|
|
41
|
-
var
|
|
42
|
-
if (!(f &&
|
|
43
|
-
f && (
|
|
40
|
+
function M(s, f, p) {
|
|
41
|
+
var v, A, y;
|
|
42
|
+
if (!(f && u)) {
|
|
43
|
+
f && (u = !0);
|
|
44
44
|
try {
|
|
45
45
|
const h = r.get(s);
|
|
46
46
|
if (!h) return;
|
|
47
|
-
const
|
|
47
|
+
const m = r.get(o), D = s === o || s === i;
|
|
48
48
|
if (f)
|
|
49
|
-
(
|
|
50
|
-
var
|
|
51
|
-
w.name !==
|
|
49
|
+
(v = n == null ? void 0 : n.trackGuiEnter) == null || v.call(n, s), D ? r.forEach((w) => {
|
|
50
|
+
var b;
|
|
51
|
+
w.name !== o && w.activated && ((b = n == null ? void 0 : n.trackGuiLeave) == null || b.call(n, w.name), r.set(w.name, {
|
|
52
52
|
...w,
|
|
53
53
|
activated: !1,
|
|
54
54
|
attrs: void 0
|
|
55
55
|
}));
|
|
56
|
-
}) :
|
|
56
|
+
}) : m != null && m.activated && ((A = n == null ? void 0 : n.trackGuiLeave) == null || A.call(n, o), r.set(o, { ...m, activated: !1 })), p && c.set(s, { ...p }), r.set(s, {
|
|
57
57
|
...h,
|
|
58
58
|
activated: !0,
|
|
59
59
|
componentKey: (h.componentKey || 0) + 1,
|
|
60
|
-
attrs:
|
|
60
|
+
attrs: p ? { ...p } : void 0
|
|
61
61
|
});
|
|
62
62
|
else {
|
|
63
|
-
(
|
|
64
|
-
const w = r.get(
|
|
63
|
+
(y = n == null ? void 0 : n.trackGuiLeave) == null || y.call(n, s), c.delete(s), r.set(s, { ...h, activated: !1, attrs: void 0 });
|
|
64
|
+
const w = r.get(o);
|
|
65
65
|
if (!D && w && !w.activated) {
|
|
66
66
|
if (w.name === i) return;
|
|
67
|
-
r.set(
|
|
67
|
+
r.set(o, { ...w, activated: !0 });
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
} finally {
|
|
71
71
|
f && l.schedule(() => {
|
|
72
|
-
|
|
72
|
+
u = !1;
|
|
73
73
|
}, t);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function L(s) {
|
|
78
78
|
r.has(s.name) && console.warn(`[vue-micro-router] Control "${s.name}" already registered. Overwriting.`);
|
|
79
79
|
let { component: f } = s;
|
|
80
|
-
|
|
80
|
+
Ee(f) && (f = Pe(f)), r.set(s.name, {
|
|
81
81
|
...s,
|
|
82
|
-
component:
|
|
82
|
+
component: Se(f)
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
s.forEach(
|
|
85
|
+
function _(s) {
|
|
86
|
+
s.forEach(L);
|
|
87
87
|
}
|
|
88
88
|
function g(s) {
|
|
89
|
-
return
|
|
89
|
+
return c.get(s);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
|
|
91
|
+
function P(s, f) {
|
|
92
|
+
const p = c.get(s);
|
|
93
|
+
c.set(s, { ...p, ...f });
|
|
94
94
|
}
|
|
95
95
|
return {
|
|
96
|
-
resolveControls:
|
|
96
|
+
resolveControls: d,
|
|
97
97
|
activeControl: R,
|
|
98
|
-
currentControl:
|
|
98
|
+
currentControl: T,
|
|
99
99
|
toggleControl: M,
|
|
100
|
-
registerControl:
|
|
101
|
-
registerControls:
|
|
100
|
+
registerControl: L,
|
|
101
|
+
registerControls: _,
|
|
102
102
|
getControlAttrs: g,
|
|
103
|
-
updateControlAttrs:
|
|
103
|
+
updateControlAttrs: P,
|
|
104
104
|
cleanup: l.cleanup
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
const
|
|
108
|
-
async function
|
|
107
|
+
const ve = "micro-router-inspector", je = "micro-router-events";
|
|
108
|
+
async function qe(e) {
|
|
109
109
|
if (typeof import.meta < "u") return;
|
|
110
|
-
let
|
|
110
|
+
let n;
|
|
111
111
|
try {
|
|
112
|
-
|
|
112
|
+
n = (await import(
|
|
113
113
|
/* @vite-ignore */
|
|
114
114
|
"@vue/devtools-api"
|
|
115
115
|
)).setupDevtoolsPlugin;
|
|
116
116
|
} catch {
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
n && n(
|
|
120
120
|
{
|
|
121
121
|
id: "vue-micro-router",
|
|
122
122
|
label: "Micro Router",
|
|
123
123
|
packageName: "vue-micro-router",
|
|
124
124
|
homepage: "https://github.com/danh121097/vue-micro-router"
|
|
125
125
|
},
|
|
126
|
-
(
|
|
127
|
-
|
|
128
|
-
id:
|
|
126
|
+
(o) => {
|
|
127
|
+
o.addInspector({
|
|
128
|
+
id: ve,
|
|
129
129
|
label: "Micro Router",
|
|
130
130
|
icon: "route"
|
|
131
|
-
}),
|
|
132
|
-
id:
|
|
131
|
+
}), o.addTimelineLayer({
|
|
132
|
+
id: je,
|
|
133
133
|
label: "Micro Router",
|
|
134
134
|
color: 4372611
|
|
135
|
-
}),
|
|
136
|
-
i.inspectorId ===
|
|
135
|
+
}), o.on.getInspectorTree((i) => {
|
|
136
|
+
i.inspectorId === ve && (i.rootNodes = [
|
|
137
137
|
{
|
|
138
138
|
id: "routes",
|
|
139
139
|
label: `Routes (${e.resolveRoutes.value.length} active)`,
|
|
@@ -159,8 +159,8 @@ async function ze(e) {
|
|
|
159
159
|
}))
|
|
160
160
|
}
|
|
161
161
|
]);
|
|
162
|
-
}),
|
|
163
|
-
if (i.inspectorId ===
|
|
162
|
+
}), o.on.getInspectorState((i) => {
|
|
163
|
+
if (i.inspectorId === ve) {
|
|
164
164
|
if (i.nodeId === "routes")
|
|
165
165
|
i.state = {
|
|
166
166
|
Navigation: [
|
|
@@ -200,80 +200,117 @@ async function ze(e) {
|
|
|
200
200
|
}
|
|
201
201
|
);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
const
|
|
205
|
-
for (const r of
|
|
206
|
-
const
|
|
207
|
-
|
|
203
|
+
function He(e) {
|
|
204
|
+
const n = e.activePath.value.split("/").filter(Boolean), o = {};
|
|
205
|
+
for (const r of n) {
|
|
206
|
+
const c = e.getRouteAttrs(r);
|
|
207
|
+
c && (o[r] = { ...c });
|
|
208
208
|
}
|
|
209
209
|
const i = [], t = {};
|
|
210
210
|
for (const r of e.resolveDialogs.value) {
|
|
211
211
|
if (r.closing) continue;
|
|
212
212
|
i.push(r.path);
|
|
213
|
-
const
|
|
214
|
-
|
|
213
|
+
const c = e.getDialogAttrs(r.path);
|
|
214
|
+
c && (t[r.path] = { ...c });
|
|
215
215
|
}
|
|
216
|
-
const l = [],
|
|
216
|
+
const l = [], u = {};
|
|
217
217
|
for (const r of e.resolveControls.value) {
|
|
218
218
|
l.push(r.name);
|
|
219
|
-
const
|
|
220
|
-
|
|
219
|
+
const c = e.getControlAttrs(r.name);
|
|
220
|
+
c && (u[r.name] = { ...c });
|
|
221
221
|
}
|
|
222
222
|
return {
|
|
223
223
|
version: 1,
|
|
224
|
-
navigation: { activePath: e.activePath.value, routeAttrs:
|
|
224
|
+
navigation: { activePath: e.activePath.value, routeAttrs: o },
|
|
225
225
|
dialogs: { stack: i, attrs: t },
|
|
226
|
-
controls: { active: l, attrs:
|
|
226
|
+
controls: { active: l, attrs: u }
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
|
-
async function
|
|
230
|
-
if (
|
|
231
|
-
console.warn("[vue-micro-router] Unknown serialized state version:",
|
|
229
|
+
async function Je(e, n) {
|
|
230
|
+
if (n.version !== 1) {
|
|
231
|
+
console.warn("[vue-micro-router] Unknown serialized state version:", n.version);
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
|
-
const { activePath:
|
|
235
|
-
await e.push(
|
|
234
|
+
const { activePath: o, routeAttrs: i } = n.navigation;
|
|
235
|
+
await e.push(o);
|
|
236
236
|
for (const [t, l] of Object.entries(i))
|
|
237
237
|
e.updateRouteAttrs(t, l);
|
|
238
|
-
for (const t of
|
|
239
|
-
const l =
|
|
238
|
+
for (const t of n.dialogs.stack) {
|
|
239
|
+
const l = n.dialogs.attrs[t];
|
|
240
240
|
e.openDialog(t, l);
|
|
241
241
|
}
|
|
242
|
-
for (const t of
|
|
243
|
-
const l =
|
|
242
|
+
for (const t of n.controls.active) {
|
|
243
|
+
const l = n.controls.attrs[t];
|
|
244
244
|
e.toggleControl(t, !0, l);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
const Qe = /* @__PURE__ */ new Set(["A", "BUTTON", "INPUT", "SELECT", "TEXTAREA"]), Ze = /iPhone|iPad|iPod|Android/i;
|
|
248
|
+
let B = null, J = null, pe = !1;
|
|
249
|
+
function ke(e) {
|
|
250
|
+
return !(!Qe.has(e.tagName) && !e.hasAttribute("tabindex") || e.tagName === "A" && !e.hasAttribute("href") || e.hidden || e.closest("[hidden],[inert]") || e.getAttribute("aria-hidden") === "true" || e.getAttribute("tabindex") === "-1" || e.hasAttribute("disabled") || e instanceof HTMLInputElement && e.type === "hidden");
|
|
251
|
+
}
|
|
252
|
+
function Me(e) {
|
|
253
|
+
return Array.from(
|
|
254
|
+
e.querySelectorAll("*")
|
|
255
|
+
).filter(ke);
|
|
256
|
+
}
|
|
257
|
+
function et(e) {
|
|
258
|
+
return Me(e).find((n) => n.hasAttribute("autofocus"));
|
|
259
|
+
}
|
|
260
|
+
function tt(e) {
|
|
261
|
+
const n = Me(e);
|
|
262
|
+
return n.find((o) => o.hasAttribute("autofocus")) ?? n[0] ?? e;
|
|
263
|
+
}
|
|
264
|
+
function nt() {
|
|
265
|
+
typeof document > "u" || typeof navigator > "u" || !Ze.test(navigator.userAgent) || (pe = !0, B == null || B.remove(), B = document.createElement("input"), B.setAttribute("aria-hidden", "true"), B.setAttribute("tabindex", "-1"), B.style.cssText = [
|
|
266
|
+
"position:fixed",
|
|
267
|
+
"top:0",
|
|
268
|
+
"left:0",
|
|
269
|
+
"width:1px",
|
|
270
|
+
"height:1px",
|
|
271
|
+
"opacity:0",
|
|
272
|
+
"border:none",
|
|
273
|
+
"outline:none",
|
|
274
|
+
"padding:0",
|
|
275
|
+
"pointer-events:none",
|
|
276
|
+
"z-index:-1"
|
|
277
|
+
].join(";"), document.body.appendChild(B), B.focus(), J && clearTimeout(J), J = setTimeout(() => {
|
|
278
|
+
he();
|
|
279
|
+
}, 1500));
|
|
280
|
+
}
|
|
281
|
+
function he() {
|
|
282
|
+
!pe && !B || (pe = !1, J && (clearTimeout(J), J = null), B == null || B.remove(), B = null);
|
|
283
|
+
}
|
|
284
|
+
function ot(e) {
|
|
285
|
+
const o = be();
|
|
249
286
|
let i = !1;
|
|
250
|
-
const t =
|
|
287
|
+
const t = we({
|
|
251
288
|
activeDialog: "",
|
|
252
289
|
fromDialog: "",
|
|
253
290
|
toDialog: "",
|
|
254
291
|
/** Open order stack — last entry = topmost dialog. Used for z-index and focus management. */
|
|
255
292
|
dialogStack: [],
|
|
256
293
|
/** Dialog definitions. Re-set on open/close to trigger shallowReactive reactivity. */
|
|
257
|
-
dialogs:
|
|
294
|
+
dialogs: F(/* @__PURE__ */ new Map()),
|
|
258
295
|
/** Attrs stored separately for useMicroState access inside dialog components */
|
|
259
|
-
dialogAttrs:
|
|
296
|
+
dialogAttrs: F(/* @__PURE__ */ new Map())
|
|
260
297
|
}), l = C(() => {
|
|
261
|
-
const g = [],
|
|
298
|
+
const g = [], P = /* @__PURE__ */ new Set();
|
|
262
299
|
for (const s of t.dialogStack) {
|
|
263
300
|
const f = t.dialogs.get(s);
|
|
264
|
-
f && (f.activated || f.closing) && (g.push(f),
|
|
301
|
+
f && (f.activated || f.closing) && (g.push(f), P.add(s));
|
|
265
302
|
}
|
|
266
303
|
for (const s of t.dialogs.values())
|
|
267
|
-
s.closing && !
|
|
304
|
+
s.closing && !P.has(s.path) && g.push(s);
|
|
268
305
|
return g;
|
|
269
|
-
}),
|
|
270
|
-
function r(g,
|
|
271
|
-
return { path: g, attrs:
|
|
306
|
+
}), u = o.schedule;
|
|
307
|
+
function r(g, P) {
|
|
308
|
+
return { path: g, attrs: P };
|
|
272
309
|
}
|
|
273
|
-
function
|
|
310
|
+
function c({ path: g, open: P, attrs: s }) {
|
|
274
311
|
const f = t.dialogs.get(g);
|
|
275
|
-
return f &&
|
|
276
|
-
if (
|
|
312
|
+
return f && te(() => {
|
|
313
|
+
if (P)
|
|
277
314
|
t.fromDialog = t.activeDialog, t.toDialog = g, t.dialogStack.includes(g) || t.dialogStack.push(g), t.activeDialog = g, s && t.dialogAttrs.set(g, { ...s }), t.dialogs.set(g, {
|
|
278
315
|
...f,
|
|
279
316
|
activated: !0,
|
|
@@ -283,85 +320,85 @@ function je(e) {
|
|
|
283
320
|
path: g,
|
|
284
321
|
...s,
|
|
285
322
|
onClose: () => {
|
|
286
|
-
|
|
323
|
+
d(g), s != null && s.onClose && typeof s.onClose == "function" && s.onClose();
|
|
287
324
|
}
|
|
288
325
|
}
|
|
289
326
|
});
|
|
290
327
|
else {
|
|
291
328
|
t.fromDialog = t.activeDialog;
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
const
|
|
329
|
+
const p = t.dialogStack.indexOf(g);
|
|
330
|
+
p > -1 && t.dialogStack.splice(p, 1), t.activeDialog = t.dialogStack.at(-1) ?? "", t.toDialog = t.activeDialog;
|
|
331
|
+
const v = f.transitionDuration ?? (f.transition === "slide" ? 500 : 300);
|
|
295
332
|
t.dialogs.set(g, {
|
|
296
333
|
...f,
|
|
297
334
|
activated: !1,
|
|
298
335
|
closing: !0,
|
|
299
336
|
attrs: void 0
|
|
300
|
-
}),
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
},
|
|
337
|
+
}), u(() => {
|
|
338
|
+
const A = t.dialogs.get(g);
|
|
339
|
+
A && !A.activated && t.dialogs.set(g, { ...A, closing: !1 });
|
|
340
|
+
}, v + 200);
|
|
304
341
|
}
|
|
305
342
|
}), r(g, s);
|
|
306
343
|
}
|
|
307
|
-
function a(g,
|
|
308
|
-
var s;
|
|
309
|
-
if (i) return r(g,
|
|
310
|
-
i = !0;
|
|
344
|
+
function a(g, P) {
|
|
345
|
+
var s, f;
|
|
346
|
+
if (i) return r(g, P);
|
|
347
|
+
(s = t.dialogs.get(g)) != null && s.focusInput && nt(), i = !0;
|
|
311
348
|
try {
|
|
312
|
-
const
|
|
313
|
-
(
|
|
314
|
-
const
|
|
315
|
-
return
|
|
349
|
+
const p = t.activeDialog || "";
|
|
350
|
+
(f = e == null ? void 0 : e.trackDialogEnter) == null || f.call(e, g, p, g);
|
|
351
|
+
const v = c({ path: g, open: !0, attrs: P });
|
|
352
|
+
return u(() => {
|
|
316
353
|
i = !1;
|
|
317
|
-
}, 300),
|
|
318
|
-
} catch (
|
|
319
|
-
throw i = !1,
|
|
354
|
+
}, 300), v;
|
|
355
|
+
} catch (p) {
|
|
356
|
+
throw i = !1, p;
|
|
320
357
|
}
|
|
321
358
|
}
|
|
322
|
-
function
|
|
323
|
-
var
|
|
324
|
-
(
|
|
359
|
+
function d(g) {
|
|
360
|
+
var P;
|
|
361
|
+
(P = e == null ? void 0 : e.trackDialogLeave) == null || P.call(e, g, g, ""), t.dialogAttrs.delete(g), c({ path: g, open: !1 });
|
|
325
362
|
}
|
|
326
363
|
function R() {
|
|
327
|
-
const g = [],
|
|
364
|
+
const g = [], P = [];
|
|
328
365
|
t.dialogs.forEach((s, f) => {
|
|
329
|
-
var
|
|
366
|
+
var p, v;
|
|
330
367
|
if (s.activated) {
|
|
331
|
-
(
|
|
332
|
-
const
|
|
333
|
-
typeof
|
|
368
|
+
(p = e == null ? void 0 : e.trackDialogLeave) == null || p.call(e, f, f, "");
|
|
369
|
+
const A = (v = s.attrs) == null ? void 0 : v.onClose;
|
|
370
|
+
typeof A == "function" && P.push(A), t.dialogs.set(f, {
|
|
334
371
|
...s,
|
|
335
372
|
activated: !1,
|
|
336
373
|
closing: !0,
|
|
337
374
|
attrs: void 0
|
|
338
375
|
}), g.push(f);
|
|
339
376
|
}
|
|
340
|
-
}),
|
|
377
|
+
}), P.forEach((s) => s()), t.dialogAttrs.clear(), t.fromDialog = t.activeDialog, t.toDialog = "", t.activeDialog = "", t.dialogStack = [], u(() => {
|
|
341
378
|
g.forEach((s) => {
|
|
342
379
|
const f = t.dialogs.get(s);
|
|
343
380
|
f && !f.activated && t.dialogs.set(s, { ...f, closing: !1 });
|
|
344
381
|
});
|
|
345
382
|
}, 500);
|
|
346
383
|
}
|
|
347
|
-
function
|
|
384
|
+
function T(g) {
|
|
348
385
|
t.dialogs.has(g.path) && console.warn(`[vue-micro-router] Dialog "${g.path}" already registered. Overwriting.`);
|
|
349
|
-
let { component:
|
|
350
|
-
|
|
386
|
+
let { component: P } = g;
|
|
387
|
+
Ee(P) && (P = Pe(P)), t.dialogs.set(g.path, {
|
|
351
388
|
persistent: !0,
|
|
352
389
|
...g,
|
|
353
|
-
component:
|
|
390
|
+
component: Se(P)
|
|
354
391
|
});
|
|
355
392
|
}
|
|
356
393
|
function M(g) {
|
|
357
|
-
g.forEach(
|
|
394
|
+
g.forEach(T);
|
|
358
395
|
}
|
|
359
|
-
function
|
|
396
|
+
function L(g) {
|
|
360
397
|
return t.dialogAttrs.get(g);
|
|
361
398
|
}
|
|
362
|
-
function
|
|
399
|
+
function _(g, P) {
|
|
363
400
|
const s = t.dialogAttrs.get(g);
|
|
364
|
-
t.dialogAttrs.set(g, { ...s, ...
|
|
401
|
+
t.dialogAttrs.set(g, { ...s, ...P });
|
|
365
402
|
}
|
|
366
403
|
return {
|
|
367
404
|
activeDialog: C(() => t.activeDialog),
|
|
@@ -369,22 +406,22 @@ function je(e) {
|
|
|
369
406
|
toDialog: C(() => t.toDialog),
|
|
370
407
|
resolveDialogs: l,
|
|
371
408
|
openDialog: a,
|
|
372
|
-
closeDialog:
|
|
409
|
+
closeDialog: d,
|
|
373
410
|
closeAllDialogs: R,
|
|
374
|
-
registerDialog:
|
|
411
|
+
registerDialog: T,
|
|
375
412
|
registerDialogs: M,
|
|
376
|
-
getDialogAttrs:
|
|
377
|
-
updateDialogAttrs:
|
|
378
|
-
cleanup:
|
|
413
|
+
getDialogAttrs: L,
|
|
414
|
+
updateDialogAttrs: _,
|
|
415
|
+
cleanup: o.cleanup
|
|
379
416
|
};
|
|
380
417
|
}
|
|
381
|
-
const
|
|
382
|
-
async function
|
|
418
|
+
const Ke = 5e3;
|
|
419
|
+
async function ye(e, n, o, i) {
|
|
383
420
|
let t;
|
|
384
421
|
try {
|
|
385
422
|
const l = await Promise.race([
|
|
386
|
-
Promise.resolve(e(
|
|
387
|
-
new Promise((
|
|
423
|
+
Promise.resolve(e(n, o)),
|
|
424
|
+
new Promise((u, r) => {
|
|
388
425
|
t = setTimeout(() => r(new Error("Navigation guard timed out")), i);
|
|
389
426
|
})
|
|
390
427
|
]);
|
|
@@ -393,135 +430,135 @@ async function ve(e, o, n, i) {
|
|
|
393
430
|
return clearTimeout(t), !1;
|
|
394
431
|
}
|
|
395
432
|
}
|
|
396
|
-
async function
|
|
433
|
+
async function at(e, n, o, i = Ke) {
|
|
397
434
|
for (const t of e)
|
|
398
|
-
if (!await
|
|
435
|
+
if (!await ye(t, n, o, i)) return !1;
|
|
399
436
|
return !0;
|
|
400
437
|
}
|
|
401
|
-
async function
|
|
438
|
+
async function _e(e, n, o, i) {
|
|
402
439
|
var r;
|
|
403
|
-
const t =
|
|
404
|
-
if ((r =
|
|
440
|
+
const t = o.guardTimeout ?? Ke;
|
|
441
|
+
if ((r = o.beforeEach) != null && r.length && !await at(o.beforeEach, e, n, t))
|
|
405
442
|
return !1;
|
|
406
443
|
const l = H(e);
|
|
407
444
|
if (l) {
|
|
408
|
-
const
|
|
409
|
-
if (
|
|
445
|
+
const c = i.getRoute(l);
|
|
446
|
+
if (c != null && c.beforeEnter && !await ye(c.beforeEnter, e, n, t))
|
|
410
447
|
return !1;
|
|
411
448
|
}
|
|
412
|
-
const
|
|
413
|
-
if (
|
|
414
|
-
const
|
|
415
|
-
if (
|
|
449
|
+
const u = H(n);
|
|
450
|
+
if (u) {
|
|
451
|
+
const c = i.getRoute(u);
|
|
452
|
+
if (c != null && c.beforeLeave && !await ye(c.beforeLeave, e, n, t))
|
|
416
453
|
return !1;
|
|
417
454
|
}
|
|
418
455
|
return !0;
|
|
419
456
|
}
|
|
420
|
-
function
|
|
421
|
-
if (
|
|
422
|
-
for (const i of
|
|
457
|
+
function it(e, n, o) {
|
|
458
|
+
if (o != null && o.length)
|
|
459
|
+
for (const i of o)
|
|
423
460
|
try {
|
|
424
|
-
i(e,
|
|
461
|
+
i(e, n);
|
|
425
462
|
} catch {
|
|
426
463
|
}
|
|
427
464
|
}
|
|
428
|
-
function
|
|
429
|
-
const
|
|
465
|
+
function st(e, n) {
|
|
466
|
+
const o = e.maxEntries ?? 50, i = [];
|
|
430
467
|
let t = -1, l = !1;
|
|
431
|
-
const
|
|
432
|
-
function r(g,
|
|
433
|
-
!e.enabled || l || (t < i.length - 1 && i.splice(t + 1), i.push({ path: g, timestamp: Date.now(), props:
|
|
468
|
+
const u = ne(0);
|
|
469
|
+
function r(g, P) {
|
|
470
|
+
!e.enabled || l || (t < i.length - 1 && i.splice(t + 1), i.push({ path: g, timestamp: Date.now(), props: P ? { ...P } : void 0 }), t = i.length - 1, i.length > o && (i.shift(), t--), u.value++);
|
|
434
471
|
}
|
|
435
|
-
const
|
|
472
|
+
const c = C(() => (u.value, [...i])), a = C(() => (u.value, t > 0)), d = C(() => (u.value, t < i.length - 1));
|
|
436
473
|
async function R(g) {
|
|
437
474
|
if (g < 0 || g >= i.length) return;
|
|
438
|
-
const
|
|
439
|
-
if (
|
|
440
|
-
t = g, l = !0,
|
|
475
|
+
const P = i[g];
|
|
476
|
+
if (P) {
|
|
477
|
+
t = g, l = !0, u.value++;
|
|
441
478
|
try {
|
|
442
|
-
await
|
|
479
|
+
await n(P.path);
|
|
443
480
|
} finally {
|
|
444
481
|
l = !1;
|
|
445
482
|
}
|
|
446
483
|
}
|
|
447
484
|
}
|
|
448
|
-
async function
|
|
485
|
+
async function T() {
|
|
449
486
|
a.value && await R(t - 1);
|
|
450
487
|
}
|
|
451
488
|
async function M() {
|
|
452
|
-
|
|
489
|
+
d.value && await R(t + 1);
|
|
453
490
|
}
|
|
454
|
-
async function
|
|
455
|
-
const
|
|
456
|
-
await R(
|
|
491
|
+
async function L(g) {
|
|
492
|
+
const P = t + g;
|
|
493
|
+
await R(P);
|
|
457
494
|
}
|
|
458
|
-
function
|
|
459
|
-
i.length = 0, t = -1,
|
|
495
|
+
function _() {
|
|
496
|
+
i.length = 0, t = -1, u.value++;
|
|
460
497
|
}
|
|
461
|
-
return { entries:
|
|
498
|
+
return { entries: c, canGoBack: a, canGoForward: d, back: T, forward: M, go: L, clear: _, record: r };
|
|
462
499
|
}
|
|
463
|
-
function
|
|
464
|
-
const e =
|
|
465
|
-
function
|
|
466
|
-
e.has(
|
|
467
|
-
let { component: r } =
|
|
468
|
-
|
|
469
|
-
...
|
|
470
|
-
component:
|
|
471
|
-
}),
|
|
500
|
+
function rt() {
|
|
501
|
+
const e = F(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Map();
|
|
502
|
+
function o(u) {
|
|
503
|
+
e.has(u.path) && console.warn(`[vue-micro-router] Route "${u.path}" already registered. Overwriting.`);
|
|
504
|
+
let { component: r } = u;
|
|
505
|
+
Ee(r) && (n.set(u.path, r), r = Pe(r)), e.set(u.path, {
|
|
506
|
+
...u,
|
|
507
|
+
component: Se(r)
|
|
508
|
+
}), u.preload === "eager" && n.has(u.path) && ae(n.get(u.path));
|
|
472
509
|
}
|
|
473
|
-
function i(
|
|
474
|
-
|
|
510
|
+
function i(u) {
|
|
511
|
+
u.forEach(o);
|
|
475
512
|
}
|
|
476
|
-
async function t(
|
|
477
|
-
const r =
|
|
478
|
-
r && await
|
|
513
|
+
async function t(u) {
|
|
514
|
+
const r = n.get(u);
|
|
515
|
+
r && await ae(r);
|
|
479
516
|
}
|
|
480
|
-
function l(
|
|
481
|
-
for (const [r,
|
|
482
|
-
if (
|
|
483
|
-
const a =
|
|
484
|
-
a &&
|
|
517
|
+
function l(u) {
|
|
518
|
+
for (const [r, c] of e.entries())
|
|
519
|
+
if (c.preload === "adjacent" && !u.includes(r)) {
|
|
520
|
+
const a = n.get(r);
|
|
521
|
+
a && ae(a);
|
|
485
522
|
}
|
|
486
523
|
}
|
|
487
|
-
return { routes: e, asyncLoaders:
|
|
524
|
+
return { routes: e, asyncLoaders: n, registerRoute: o, registerRoutes: i, preloadRoute: t, preloadAdjacent: l };
|
|
488
525
|
}
|
|
489
|
-
function
|
|
490
|
-
const
|
|
491
|
-
async function
|
|
526
|
+
function lt(e) {
|
|
527
|
+
const n = e.stepWiseDelay ?? Math.max(e.stepDelay * 1.2, e.stepDelay + 100);
|
|
528
|
+
async function o(t, l) {
|
|
492
529
|
if (!t || e.isLocked()) return;
|
|
493
|
-
const
|
|
494
|
-
if (e.getActivePath() !==
|
|
530
|
+
const u = $(t);
|
|
531
|
+
if (e.getActivePath() !== u) {
|
|
495
532
|
e.lock();
|
|
496
533
|
try {
|
|
497
534
|
if (e.runGuards) {
|
|
498
|
-
const a =
|
|
499
|
-
if (!await e.runGuards(
|
|
535
|
+
const a = $(e.getActivePath());
|
|
536
|
+
if (!await e.runGuards(u, a)) {
|
|
500
537
|
e.unlock();
|
|
501
538
|
return;
|
|
502
539
|
}
|
|
503
540
|
}
|
|
504
|
-
const r =
|
|
541
|
+
const r = I(e.getActivePath()), c = I(u);
|
|
505
542
|
if (t.startsWith("/"))
|
|
506
|
-
for (let a = 0; a <
|
|
507
|
-
const
|
|
508
|
-
|
|
543
|
+
for (let a = 0; a < c.length; a++) {
|
|
544
|
+
const d = W(
|
|
545
|
+
c.slice(0, a + 1)
|
|
509
546
|
);
|
|
510
|
-
if (e.getActivePath() ===
|
|
511
|
-
const R = a ===
|
|
512
|
-
await e.pushCore(
|
|
547
|
+
if (e.getActivePath() === d) continue;
|
|
548
|
+
const R = a === c.length - 1;
|
|
549
|
+
await e.pushCore(d, R ? l : void 0), R || await de(n);
|
|
513
550
|
}
|
|
514
551
|
else {
|
|
515
|
-
const a =
|
|
516
|
-
(
|
|
552
|
+
const a = c.filter(
|
|
553
|
+
(d) => !r.includes(d)
|
|
517
554
|
);
|
|
518
555
|
if (a.length === 0) {
|
|
519
556
|
await e.pushCore(t, l), e.scheduleUnlock();
|
|
520
557
|
return;
|
|
521
558
|
}
|
|
522
|
-
for (let
|
|
523
|
-
const R =
|
|
524
|
-
await e.pushCore(a[
|
|
559
|
+
for (let d = 0; d < a.length; d++) {
|
|
560
|
+
const R = d === a.length - 1;
|
|
561
|
+
await e.pushCore(a[d], R ? l : void 0), R || await de(n);
|
|
525
562
|
}
|
|
526
563
|
}
|
|
527
564
|
e.scheduleUnlock();
|
|
@@ -532,200 +569,200 @@ function Ze(e) {
|
|
|
532
569
|
}
|
|
533
570
|
async function i(t) {
|
|
534
571
|
if (t < 1 || e.isLocked()) return;
|
|
535
|
-
const l =
|
|
536
|
-
if (!(
|
|
572
|
+
const l = I(e.getActivePath()), u = Math.min(t, l.length - 1);
|
|
573
|
+
if (!(u < 1)) {
|
|
537
574
|
e.lock();
|
|
538
575
|
try {
|
|
539
576
|
if (e.runGuards) {
|
|
540
|
-
const r = l.slice(0, l.length -
|
|
541
|
-
if (!await e.runGuards(
|
|
577
|
+
const r = l.slice(0, l.length - u), c = W(r), a = $(e.getActivePath());
|
|
578
|
+
if (!await e.runGuards(c, a)) {
|
|
542
579
|
e.unlock();
|
|
543
580
|
return;
|
|
544
581
|
}
|
|
545
582
|
}
|
|
546
|
-
for (let r = 0; r <
|
|
547
|
-
await e.pushCore(-1), r <
|
|
583
|
+
for (let r = 0; r < u; r++)
|
|
584
|
+
await e.pushCore(-1), r < u - 1 && await de(n);
|
|
548
585
|
e.scheduleUnlock();
|
|
549
586
|
} catch (r) {
|
|
550
587
|
throw e.unlock(), r;
|
|
551
588
|
}
|
|
552
589
|
}
|
|
553
590
|
}
|
|
554
|
-
return { stepWisePush:
|
|
591
|
+
return { stepWisePush: o, stepWiseBack: i };
|
|
555
592
|
}
|
|
556
|
-
function
|
|
557
|
-
const
|
|
558
|
-
activePath:
|
|
559
|
-
fromPath:
|
|
560
|
-
toPath:
|
|
593
|
+
function ut(e, n) {
|
|
594
|
+
const o = e.defaultPath, i = e.stepDelay ?? ze, t = e.guards ?? {}, l = e.history ?? {}, u = be(), r = rt(), c = ne(!1), a = we({
|
|
595
|
+
activePath: o,
|
|
596
|
+
fromPath: o,
|
|
597
|
+
toPath: o,
|
|
561
598
|
/** Attrs stored separately — changes here do NOT invalidate resolveRoutes computed */
|
|
562
|
-
routeAttrs:
|
|
599
|
+
routeAttrs: F(/* @__PURE__ */ new Map()),
|
|
563
600
|
/** Version stamp per segment — incremented on re-navigation to same segment (forces transition) */
|
|
564
|
-
routeKeys:
|
|
601
|
+
routeKeys: F(/* @__PURE__ */ new Map()),
|
|
565
602
|
/** Component key per segment — incremented to force Vue full remount (resets local state) */
|
|
566
|
-
componentKeys:
|
|
567
|
-
}),
|
|
568
|
-
const
|
|
569
|
-
for (const
|
|
570
|
-
const D = r.routes.get(
|
|
603
|
+
componentKeys: F(/* @__PURE__ */ new Map())
|
|
604
|
+
}), d = /* @__PURE__ */ new Map(), R = C(() => {
|
|
605
|
+
const y = I(a.activePath), h = [];
|
|
606
|
+
for (const m of y) {
|
|
607
|
+
const D = r.routes.get(m);
|
|
571
608
|
if (!D) continue;
|
|
572
|
-
const w = a.routeKeys.get(
|
|
573
|
-
if (E && E.key ===
|
|
609
|
+
const w = a.routeKeys.get(m) || 0, b = a.componentKeys.get(m) || 0, S = `${D.path}-${w}`, E = d.get(m);
|
|
610
|
+
if (E && E.key === S && E.componentKey === b)
|
|
574
611
|
h.push(E);
|
|
575
612
|
else {
|
|
576
|
-
const
|
|
577
|
-
|
|
613
|
+
const K = { ...D, key: S, componentKey: b };
|
|
614
|
+
d.set(m, K), h.push(K);
|
|
578
615
|
}
|
|
579
616
|
}
|
|
580
|
-
for (const
|
|
581
|
-
|
|
617
|
+
for (const m of d.keys())
|
|
618
|
+
y.includes(m) || d.delete(m);
|
|
582
619
|
return h;
|
|
583
620
|
});
|
|
584
|
-
function
|
|
585
|
-
var
|
|
586
|
-
const
|
|
621
|
+
function T(y, h) {
|
|
622
|
+
var K, N;
|
|
623
|
+
const m = I(a.activePath), D = Math.min(y, m.length - 1);
|
|
587
624
|
if (D <= 0) return;
|
|
588
|
-
const w =
|
|
589
|
-
for (let
|
|
590
|
-
a.routeAttrs.delete(
|
|
591
|
-
const
|
|
592
|
-
if (
|
|
593
|
-
const
|
|
594
|
-
a.routeAttrs.set(
|
|
595
|
-
|
|
596
|
-
(a.componentKeys.get(
|
|
625
|
+
const w = m.slice(0, -D), b = W(w);
|
|
626
|
+
for (let U = m.length - D; U < m.length; U++)
|
|
627
|
+
a.routeAttrs.delete(m[U]);
|
|
628
|
+
const S = w.at(-1);
|
|
629
|
+
if (S && h) {
|
|
630
|
+
const U = a.routeAttrs.get(S);
|
|
631
|
+
a.routeAttrs.set(S, { ...U, ...h }), a.componentKeys.set(
|
|
632
|
+
S,
|
|
633
|
+
(a.componentKeys.get(S) || 0) + 1
|
|
597
634
|
);
|
|
598
635
|
}
|
|
599
636
|
const E = a.activePath;
|
|
600
|
-
(
|
|
637
|
+
(K = n == null ? void 0 : n.trackPageLeave) == null || K.call(n, E, E, b), a.fromPath = E, a.toPath = b, a.activePath = b, (N = n == null ? void 0 : n.trackPageEnter) == null || N.call(n, b, E, b);
|
|
601
638
|
}
|
|
602
|
-
async function M(
|
|
603
|
-
var
|
|
604
|
-
const
|
|
639
|
+
async function M(y, h) {
|
|
640
|
+
var b, S;
|
|
641
|
+
const m = $(y), D = I(m);
|
|
605
642
|
await Promise.all(
|
|
606
|
-
D.map((E) => r.asyncLoaders.get(E)).filter((E) => !!E).map((E) =>
|
|
643
|
+
D.map((E) => r.asyncLoaders.get(E)).filter((E) => !!E).map((E) => ae(E))
|
|
607
644
|
);
|
|
608
645
|
const w = a.activePath;
|
|
609
|
-
w !==
|
|
646
|
+
w !== m && ((b = n == null ? void 0 : n.trackPageLeave) == null || b.call(n, w, w, m)), a.fromPath = w, a.toPath = m, a.activePath = m, h && L(m, h), (S = n == null ? void 0 : n.trackPageEnter) == null || S.call(n, m, w, m);
|
|
610
647
|
}
|
|
611
|
-
function
|
|
612
|
-
const
|
|
613
|
-
if (!
|
|
614
|
-
const D = a.routeAttrs.get(
|
|
615
|
-
a.routeAttrs.set(
|
|
648
|
+
function L(y, h) {
|
|
649
|
+
const m = I(y).at(-1);
|
|
650
|
+
if (!m) return;
|
|
651
|
+
const D = a.routeAttrs.get(m);
|
|
652
|
+
a.routeAttrs.set(m, { ...D, ...h });
|
|
616
653
|
}
|
|
617
|
-
function
|
|
618
|
-
const
|
|
619
|
-
a.routeAttrs.set(
|
|
654
|
+
function _(y, h) {
|
|
655
|
+
const m = a.routeAttrs.get(y);
|
|
656
|
+
a.routeAttrs.set(y, { ...m, ...h });
|
|
620
657
|
}
|
|
621
|
-
function g(
|
|
622
|
-
return a.routeAttrs.get(
|
|
658
|
+
function g(y) {
|
|
659
|
+
return a.routeAttrs.get(y);
|
|
623
660
|
}
|
|
624
|
-
async function y
|
|
625
|
-
if (!
|
|
626
|
-
if (typeof
|
|
627
|
-
|
|
661
|
+
async function P(y, h) {
|
|
662
|
+
if (!y && y !== 0) return;
|
|
663
|
+
if (typeof y == "number" && y < 0) {
|
|
664
|
+
T(Math.abs(y), h);
|
|
628
665
|
return;
|
|
629
666
|
}
|
|
630
|
-
const
|
|
631
|
-
if (
|
|
632
|
-
const
|
|
633
|
-
if (
|
|
634
|
-
if (E.length -
|
|
635
|
-
|
|
667
|
+
const m = y.toString();
|
|
668
|
+
if (m.startsWith("/")) {
|
|
669
|
+
const S = I(m), E = I(a.activePath);
|
|
670
|
+
if (S.length < E.length && S.every((U, le) => E[le] === U)) {
|
|
671
|
+
if (E.length - S.length === 1)
|
|
672
|
+
T(1, h);
|
|
636
673
|
else {
|
|
637
|
-
const
|
|
638
|
-
for (let
|
|
639
|
-
a.routeAttrs.delete(E[
|
|
640
|
-
a.activePath =
|
|
674
|
+
const le = E.slice(0, S.length + 1), $e = W(le);
|
|
675
|
+
for (let ue = S.length + 1; ue < E.length; ue++)
|
|
676
|
+
a.routeAttrs.delete(E[ue]);
|
|
677
|
+
a.activePath = $e, await te(), T(1, h);
|
|
641
678
|
}
|
|
642
679
|
return;
|
|
643
680
|
}
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
(a.routeKeys.get(
|
|
648
|
-
), await M(
|
|
681
|
+
const N = S.at(-1);
|
|
682
|
+
N && E.at(-1) === N && a.routeKeys.set(
|
|
683
|
+
N,
|
|
684
|
+
(a.routeKeys.get(N) || 0) + 1
|
|
685
|
+
), await M(m, h);
|
|
649
686
|
return;
|
|
650
687
|
}
|
|
651
|
-
const D =
|
|
688
|
+
const D = I(a.activePath), w = D.indexOf(m);
|
|
652
689
|
if (w !== -1) {
|
|
653
|
-
const
|
|
654
|
-
if (
|
|
655
|
-
|
|
656
|
-
else if (
|
|
657
|
-
const E = D.slice(0, w + 2),
|
|
658
|
-
for (let
|
|
659
|
-
a.routeAttrs.delete(D[
|
|
660
|
-
a.activePath =
|
|
690
|
+
const S = D.length - (w + 1);
|
|
691
|
+
if (S === 1)
|
|
692
|
+
T(1, h);
|
|
693
|
+
else if (S > 1) {
|
|
694
|
+
const E = D.slice(0, w + 2), K = W(E);
|
|
695
|
+
for (let N = w + 2; N < D.length; N++)
|
|
696
|
+
a.routeAttrs.delete(D[N]);
|
|
697
|
+
a.activePath = K, await te(), T(1, h);
|
|
661
698
|
} else
|
|
662
|
-
a.routeKeys.set(
|
|
663
|
-
|
|
699
|
+
a.routeKeys.set(m, (a.routeKeys.get(m) || 0) + 1), await M(
|
|
700
|
+
W(D.slice(0, w + 1)),
|
|
664
701
|
h
|
|
665
702
|
);
|
|
666
703
|
return;
|
|
667
704
|
}
|
|
668
|
-
const
|
|
669
|
-
await M(
|
|
705
|
+
const b = W([...D, m]);
|
|
706
|
+
await M(b, h);
|
|
670
707
|
}
|
|
671
|
-
function s(
|
|
672
|
-
if (typeof
|
|
673
|
-
const w =
|
|
674
|
-
return
|
|
708
|
+
function s(y) {
|
|
709
|
+
if (typeof y == "number" && y < 0) {
|
|
710
|
+
const w = I(a.activePath), b = Math.min(Math.abs(y), w.length - 1);
|
|
711
|
+
return b <= 0 ? a.activePath : W(w.slice(0, -b));
|
|
675
712
|
}
|
|
676
|
-
const h =
|
|
677
|
-
if (h.startsWith("/")) return
|
|
678
|
-
const
|
|
679
|
-
return D !== -1 ?
|
|
713
|
+
const h = y.toString();
|
|
714
|
+
if (h.startsWith("/")) return $(h);
|
|
715
|
+
const m = I(a.activePath), D = m.indexOf(h);
|
|
716
|
+
return D !== -1 ? W(m.slice(0, D + 1)) : W([...m, h]);
|
|
680
717
|
}
|
|
681
|
-
const f = { getRoute: (
|
|
682
|
-
async function
|
|
683
|
-
var
|
|
684
|
-
if (!
|
|
685
|
-
|
|
718
|
+
const f = { getRoute: (y) => r.routes.get(y) };
|
|
719
|
+
async function p(y, h) {
|
|
720
|
+
var m;
|
|
721
|
+
if (!c.value) {
|
|
722
|
+
c.value = !0;
|
|
686
723
|
try {
|
|
687
|
-
const D = (((
|
|
688
|
-
if ((D || w) &&
|
|
689
|
-
const E = s(
|
|
690
|
-
if (!await
|
|
691
|
-
|
|
724
|
+
const D = (((m = t.beforeEach) == null ? void 0 : m.length) ?? 0) > 0, w = r.routes.size > 0;
|
|
725
|
+
if ((D || w) && y) {
|
|
726
|
+
const E = s(y), K = $(a.activePath);
|
|
727
|
+
if (!await _e(E, K, t, f)) {
|
|
728
|
+
c.value = !1;
|
|
692
729
|
return;
|
|
693
730
|
}
|
|
694
731
|
}
|
|
695
|
-
const
|
|
696
|
-
await y
|
|
697
|
-
const
|
|
698
|
-
|
|
699
|
-
|
|
732
|
+
const b = $(a.activePath);
|
|
733
|
+
await P(y, h);
|
|
734
|
+
const S = $(a.activePath);
|
|
735
|
+
v == null || v.record(S, h), it(S, b, t.afterEach), r.preloadAdjacent(I(a.activePath)), u.schedule(() => {
|
|
736
|
+
c.value = !1;
|
|
700
737
|
}, i);
|
|
701
738
|
} catch (D) {
|
|
702
|
-
throw
|
|
739
|
+
throw c.value = !1, D;
|
|
703
740
|
}
|
|
704
741
|
}
|
|
705
742
|
}
|
|
706
|
-
const
|
|
707
|
-
const h =
|
|
708
|
-
if (
|
|
709
|
-
const w = h.length -
|
|
710
|
-
await
|
|
743
|
+
const v = l.enabled ? st(l, async (y) => {
|
|
744
|
+
const h = I(a.activePath), m = I(y);
|
|
745
|
+
if (m.length < h.length && m.every((w, b) => h[b] === w)) {
|
|
746
|
+
const w = h.length - m.length;
|
|
747
|
+
await p(-w);
|
|
711
748
|
} else
|
|
712
|
-
await
|
|
749
|
+
await p(y);
|
|
713
750
|
}) : void 0;
|
|
714
|
-
|
|
715
|
-
const
|
|
751
|
+
v && v.record($(o));
|
|
752
|
+
const A = lt({
|
|
716
753
|
getActivePath: () => a.activePath,
|
|
717
|
-
pushCore:
|
|
718
|
-
runGuards: (
|
|
719
|
-
scheduleUnlock: () =>
|
|
720
|
-
|
|
754
|
+
pushCore: P,
|
|
755
|
+
runGuards: (y, h) => _e(y, h, t, f),
|
|
756
|
+
scheduleUnlock: () => u.schedule(() => {
|
|
757
|
+
c.value = !1;
|
|
721
758
|
}, i),
|
|
722
759
|
lock: () => {
|
|
723
|
-
|
|
760
|
+
c.value = !0;
|
|
724
761
|
},
|
|
725
762
|
unlock: () => {
|
|
726
|
-
|
|
763
|
+
c.value = !1;
|
|
727
764
|
},
|
|
728
|
-
isLocked: () =>
|
|
765
|
+
isLocked: () => c.value,
|
|
729
766
|
stepDelay: i
|
|
730
767
|
});
|
|
731
768
|
return {
|
|
@@ -735,83 +772,83 @@ function ke(e, o) {
|
|
|
735
772
|
activePage: C(() => H(a.activePath)),
|
|
736
773
|
fromPage: C(() => H(a.fromPath)),
|
|
737
774
|
toPage: C(() => H(a.toPath)),
|
|
738
|
-
isNavigating: C(() =>
|
|
775
|
+
isNavigating: C(() => c.value),
|
|
739
776
|
resolveRoutes: R,
|
|
740
|
-
push:
|
|
741
|
-
stepWisePush:
|
|
742
|
-
stepWiseBack:
|
|
777
|
+
push: p,
|
|
778
|
+
stepWisePush: A.stepWisePush,
|
|
779
|
+
stepWiseBack: A.stepWiseBack,
|
|
743
780
|
registerRoute: r.registerRoute,
|
|
744
781
|
registerRoutes: r.registerRoutes,
|
|
745
|
-
updateRouteAttrs:
|
|
782
|
+
updateRouteAttrs: _,
|
|
746
783
|
getRouteAttrs: g,
|
|
747
784
|
preloadRoute: r.preloadRoute,
|
|
748
785
|
routes: r.routes,
|
|
749
|
-
history:
|
|
750
|
-
cleanup:
|
|
786
|
+
history: v,
|
|
787
|
+
cleanup: u.cleanup
|
|
751
788
|
};
|
|
752
789
|
}
|
|
753
|
-
const
|
|
790
|
+
const x = () => {
|
|
754
791
|
};
|
|
755
|
-
function
|
|
792
|
+
function ct(e) {
|
|
756
793
|
return {
|
|
757
|
-
trackPageEnter: (e == null ? void 0 : e.trackPageEnter) ??
|
|
758
|
-
trackPageLeave: (e == null ? void 0 : e.trackPageLeave) ??
|
|
759
|
-
trackDialogEnter: (e == null ? void 0 : e.trackDialogEnter) ??
|
|
760
|
-
trackDialogLeave: (e == null ? void 0 : e.trackDialogLeave) ??
|
|
761
|
-
trackGuiEnter: (e == null ? void 0 : e.trackGuiEnter) ??
|
|
762
|
-
trackGuiLeave: (e == null ? void 0 : e.trackGuiLeave) ??
|
|
763
|
-
cleanupAllSessions: (e == null ? void 0 : e.cleanupAllSessions) ??
|
|
794
|
+
trackPageEnter: (e == null ? void 0 : e.trackPageEnter) ?? x,
|
|
795
|
+
trackPageLeave: (e == null ? void 0 : e.trackPageLeave) ?? x,
|
|
796
|
+
trackDialogEnter: (e == null ? void 0 : e.trackDialogEnter) ?? x,
|
|
797
|
+
trackDialogLeave: (e == null ? void 0 : e.trackDialogLeave) ?? x,
|
|
798
|
+
trackGuiEnter: (e == null ? void 0 : e.trackGuiEnter) ?? x,
|
|
799
|
+
trackGuiLeave: (e == null ? void 0 : e.trackGuiLeave) ?? x,
|
|
800
|
+
cleanupAllSessions: (e == null ? void 0 : e.cleanupAllSessions) ?? x
|
|
764
801
|
};
|
|
765
802
|
}
|
|
766
|
-
function
|
|
767
|
-
const
|
|
803
|
+
function ft(e) {
|
|
804
|
+
const n = ct(e.tracker), o = ut(
|
|
768
805
|
{
|
|
769
806
|
defaultPath: e.defaultPath,
|
|
770
807
|
stepDelay: e.stepDelay,
|
|
771
808
|
guards: e.guards,
|
|
772
809
|
history: e.history
|
|
773
810
|
},
|
|
774
|
-
|
|
775
|
-
), i =
|
|
811
|
+
n
|
|
812
|
+
), i = ot(n), t = Ve(
|
|
776
813
|
{
|
|
777
814
|
defaultControlName: e.defaultControlName,
|
|
778
815
|
onboardingControlName: e.onboardingControlName
|
|
779
816
|
},
|
|
780
|
-
|
|
781
|
-
), l = e.volumeRef ?
|
|
817
|
+
n
|
|
818
|
+
), l = e.volumeRef ? xe({
|
|
782
819
|
volumeRef: e.volumeRef,
|
|
783
820
|
defaultBgm: e.defaultBgm
|
|
784
|
-
}) : null,
|
|
821
|
+
}) : null, u = {
|
|
785
822
|
// Navigation
|
|
786
|
-
activePath:
|
|
787
|
-
fromPath:
|
|
788
|
-
toPath:
|
|
789
|
-
activePage:
|
|
790
|
-
fromPage:
|
|
791
|
-
toPage:
|
|
792
|
-
isNavigating:
|
|
793
|
-
resolveRoutes:
|
|
794
|
-
push: async (a,
|
|
795
|
-
await
|
|
823
|
+
activePath: o.activePath,
|
|
824
|
+
fromPath: o.fromPath,
|
|
825
|
+
toPath: o.toPath,
|
|
826
|
+
activePage: o.activePage,
|
|
827
|
+
fromPage: o.fromPage,
|
|
828
|
+
toPage: o.toPage,
|
|
829
|
+
isNavigating: o.isNavigating,
|
|
830
|
+
resolveRoutes: o.resolveRoutes,
|
|
831
|
+
push: async (a, d) => {
|
|
832
|
+
await o.push(a, d), l && l.updateBackgroundMusic(o.activePath.value, o.routes);
|
|
796
833
|
},
|
|
797
|
-
stepWisePush: async (a,
|
|
798
|
-
await
|
|
834
|
+
stepWisePush: async (a, d) => {
|
|
835
|
+
await o.stepWisePush(a, d), l && l.updateBackgroundMusic(o.activePath.value, o.routes);
|
|
799
836
|
},
|
|
800
837
|
stepWiseBack: async (a) => {
|
|
801
|
-
await
|
|
838
|
+
await o.stepWiseBack(a), l && l.updateBackgroundMusic(o.activePath.value, o.routes);
|
|
802
839
|
},
|
|
803
|
-
registerRoute:
|
|
804
|
-
registerRoutes:
|
|
805
|
-
updateRouteAttrs:
|
|
806
|
-
getRouteAttrs:
|
|
807
|
-
preloadRoute:
|
|
840
|
+
registerRoute: o.registerRoute,
|
|
841
|
+
registerRoutes: o.registerRoutes,
|
|
842
|
+
updateRouteAttrs: o.updateRouteAttrs,
|
|
843
|
+
getRouteAttrs: o.getRouteAttrs,
|
|
844
|
+
preloadRoute: o.preloadRoute,
|
|
808
845
|
// History (conditional — only if enabled)
|
|
809
|
-
...
|
|
810
|
-
canGoBack:
|
|
811
|
-
canGoForward:
|
|
812
|
-
historyBack:
|
|
813
|
-
historyForward:
|
|
814
|
-
historyGo:
|
|
846
|
+
...o.history ? {
|
|
847
|
+
canGoBack: o.history.canGoBack,
|
|
848
|
+
canGoForward: o.history.canGoForward,
|
|
849
|
+
historyBack: o.history.back,
|
|
850
|
+
historyForward: o.history.forward,
|
|
851
|
+
historyGo: o.history.go
|
|
815
852
|
} : {},
|
|
816
853
|
// Dialogs
|
|
817
854
|
activeDialog: i.activeDialog,
|
|
@@ -835,8 +872,8 @@ function tt(e) {
|
|
|
835
872
|
getControlAttrs: t.getControlAttrs,
|
|
836
873
|
updateControlAttrs: t.updateControlAttrs,
|
|
837
874
|
// Serialization
|
|
838
|
-
serialize: () =>
|
|
839
|
-
restore: (a) =>
|
|
875
|
+
serialize: () => He(u),
|
|
876
|
+
restore: (a) => Je(u, a),
|
|
840
877
|
// Audio (conditional — only if volumeRef provided in config)
|
|
841
878
|
...l ? {
|
|
842
879
|
playSound: l.playSound,
|
|
@@ -846,117 +883,117 @@ function tt(e) {
|
|
|
846
883
|
updateBackgroundMusic: l.updateBackgroundMusic
|
|
847
884
|
} : {}
|
|
848
885
|
}, r = H(e.defaultPath);
|
|
849
|
-
return X(
|
|
850
|
-
if (!
|
|
886
|
+
return X(o.activePage, (a, d) => {
|
|
887
|
+
if (!d) return;
|
|
851
888
|
const R = t.currentControl.value;
|
|
852
|
-
|
|
889
|
+
d === r && a !== r && n.trackGuiLeave(R), a === r && d !== r && n.trackGuiEnter(R);
|
|
853
890
|
}), l && e.defaultBgm && e.bgmStartRef && X(e.bgmStartRef, (a) => {
|
|
854
891
|
a && !l.isStarted() && l.playSoundSync(e.defaultBgm, !0);
|
|
855
|
-
}, { flush: "sync" }),
|
|
856
|
-
await
|
|
857
|
-
|
|
892
|
+
}, { flush: "sync" }), Q(async () => {
|
|
893
|
+
await te(), t.toggleControl(e.defaultControlName, !0), n.trackPageEnter(
|
|
894
|
+
o.activePath.value,
|
|
858
895
|
void 0,
|
|
859
|
-
|
|
860
|
-
), l && document.addEventListener("visibilitychange", l.handleVisibilityChange),
|
|
861
|
-
}),
|
|
862
|
-
|
|
863
|
-
}),
|
|
896
|
+
o.activePath.value
|
|
897
|
+
), l && document.addEventListener("visibilitychange", l.handleVisibilityChange), qe(u);
|
|
898
|
+
}), De(() => {
|
|
899
|
+
n.cleanupAllSessions(), o.cleanup(), i.cleanup(), t.cleanup(), l && (document.removeEventListener("visibilitychange", l.handleVisibilityChange), l.cleanup());
|
|
900
|
+
}), O(Be, u), V(me, null) || O(me, u), u;
|
|
864
901
|
}
|
|
865
|
-
function
|
|
866
|
-
const
|
|
867
|
-
if (!
|
|
902
|
+
function Z(e) {
|
|
903
|
+
const n = e != null && e.root ? me : Be, o = V(n);
|
|
904
|
+
if (!o)
|
|
868
905
|
throw new Error(
|
|
869
906
|
e != null && e.root ? "[vue-micro-router] useMicroRouter({ root: true }) failed — no root <MicroRouterView> found." : "[vue-micro-router] useMicroRouter() must be called inside <MicroRouterView>. Did you forget to wrap your app with <MicroRouterView>?"
|
|
870
907
|
);
|
|
871
|
-
return
|
|
908
|
+
return o;
|
|
872
909
|
}
|
|
873
|
-
function
|
|
874
|
-
const
|
|
875
|
-
!
|
|
910
|
+
function St(e) {
|
|
911
|
+
const n = V(se), o = V(re);
|
|
912
|
+
!n && !e && console.warn(
|
|
876
913
|
"[vue-micro-router] useMicroState() called without provider and no defaults. Ensure component is inside <RoutePage>, <MicroDialog>, or <MicroControlWrapper>."
|
|
877
914
|
);
|
|
878
|
-
const i = (
|
|
915
|
+
const i = (n == null ? void 0 : n()) ?? {}, t = e ? { ...e } : {};
|
|
879
916
|
for (const r of Object.keys(i))
|
|
880
917
|
t[r] = i[r];
|
|
881
|
-
const l =
|
|
882
|
-
|
|
918
|
+
const l = we(t);
|
|
919
|
+
o && X(
|
|
883
920
|
l,
|
|
884
|
-
(r) =>
|
|
921
|
+
(r) => o({ ...r }),
|
|
885
922
|
{ deep: !0, flush: "post" }
|
|
886
923
|
);
|
|
887
|
-
const
|
|
888
|
-
return new Proxy(
|
|
889
|
-
get(r,
|
|
890
|
-
return typeof
|
|
924
|
+
const u = Ue(l);
|
|
925
|
+
return new Proxy(u, {
|
|
926
|
+
get(r, c, a) {
|
|
927
|
+
return typeof c == "string" && !(c in r) && (r[c] = Ye(l, c)), Reflect.get(r, c, a);
|
|
891
928
|
}
|
|
892
929
|
});
|
|
893
930
|
}
|
|
894
|
-
function
|
|
895
|
-
const
|
|
896
|
-
if (!
|
|
931
|
+
function bt(e) {
|
|
932
|
+
const n = V(Ge);
|
|
933
|
+
if (!n) {
|
|
897
934
|
console.warn(
|
|
898
935
|
"[vue-micro-router] useRouteLifecycle() must be called inside a route component rendered by <MicroRouterView>."
|
|
899
936
|
);
|
|
900
937
|
return;
|
|
901
938
|
}
|
|
902
|
-
const { activePage:
|
|
903
|
-
let i =
|
|
904
|
-
i &&
|
|
939
|
+
const { activePage: o } = Z();
|
|
940
|
+
let i = o.value === n;
|
|
941
|
+
i && Q(() => {
|
|
905
942
|
var t;
|
|
906
943
|
return (t = e.onRouteEnter) == null ? void 0 : t.call(e);
|
|
907
|
-
}), X(
|
|
908
|
-
var
|
|
909
|
-
const l = t ===
|
|
910
|
-
l && !i ? (
|
|
944
|
+
}), X(o, (t) => {
|
|
945
|
+
var u, r;
|
|
946
|
+
const l = t === n;
|
|
947
|
+
l && !i ? (u = e.onRouteEnter) == null || u.call(e) : !l && i && ((r = e.onRouteLeave) == null || r.call(e)), i = l;
|
|
911
948
|
});
|
|
912
949
|
}
|
|
913
|
-
function
|
|
914
|
-
const
|
|
915
|
-
if (!
|
|
950
|
+
function Mt(e) {
|
|
951
|
+
const n = V(Ne);
|
|
952
|
+
if (!n) {
|
|
916
953
|
console.warn(
|
|
917
954
|
"[vue-micro-router] useDialogLifecycle() must be called inside a dialog component rendered by <MicroDialog>."
|
|
918
955
|
);
|
|
919
956
|
return;
|
|
920
957
|
}
|
|
921
|
-
const { activeDialog:
|
|
922
|
-
let i =
|
|
923
|
-
i &&
|
|
958
|
+
const { activeDialog: o } = Z();
|
|
959
|
+
let i = o.value === n;
|
|
960
|
+
i && Q(() => {
|
|
924
961
|
var t;
|
|
925
962
|
return (t = e.onDialogEnter) == null ? void 0 : t.call(e);
|
|
926
|
-
}), X(
|
|
927
|
-
var
|
|
928
|
-
const l = t ===
|
|
929
|
-
l && !i ? (
|
|
963
|
+
}), X(o, (t) => {
|
|
964
|
+
var u, r;
|
|
965
|
+
const l = t === n;
|
|
966
|
+
l && !i ? (u = e.onDialogEnter) == null || u.call(e) : !l && i && ((r = e.onDialogLeave) == null || r.call(e)), i = l;
|
|
930
967
|
});
|
|
931
968
|
}
|
|
932
|
-
function
|
|
933
|
-
const
|
|
934
|
-
if (!
|
|
969
|
+
function Tt(e) {
|
|
970
|
+
const n = V(Oe);
|
|
971
|
+
if (!n) {
|
|
935
972
|
console.warn(
|
|
936
973
|
"[vue-micro-router] useControlLifecycle() must be called inside a control component rendered by <MicroControlWrapper>."
|
|
937
974
|
);
|
|
938
975
|
return;
|
|
939
976
|
}
|
|
940
|
-
const { currentControl:
|
|
941
|
-
let i =
|
|
942
|
-
i &&
|
|
977
|
+
const { currentControl: o } = Z();
|
|
978
|
+
let i = o.value === n;
|
|
979
|
+
i && Q(() => {
|
|
943
980
|
var t;
|
|
944
981
|
return (t = e.onControlEnter) == null ? void 0 : t.call(e);
|
|
945
|
-
}), X(
|
|
946
|
-
var
|
|
947
|
-
const l = t ===
|
|
948
|
-
l && !i ? (
|
|
982
|
+
}), X(o, (t) => {
|
|
983
|
+
var u, r;
|
|
984
|
+
const l = t === n;
|
|
985
|
+
l && !i ? (u = e.onControlEnter) == null || u.call(e) : !l && i && ((r = e.onControlLeave) == null || r.call(e)), i = l;
|
|
949
986
|
});
|
|
950
987
|
}
|
|
951
|
-
function
|
|
988
|
+
function gt(e, n) {
|
|
952
989
|
if (!e.enabled) return;
|
|
953
|
-
const
|
|
954
|
-
let l = 0,
|
|
990
|
+
const o = e.edgeWidth ?? 20, i = e.threshold ?? 0.3, t = e.velocityThreshold ?? 0.5;
|
|
991
|
+
let l = 0, u = 0, r = 0, c = !1, a = null, d = null;
|
|
955
992
|
function R() {
|
|
956
|
-
const s =
|
|
993
|
+
const s = n.containerRef.value;
|
|
957
994
|
return s ? "$el" in s ? s.$el : s : null;
|
|
958
995
|
}
|
|
959
|
-
function
|
|
996
|
+
function T() {
|
|
960
997
|
const s = R();
|
|
961
998
|
if (!s) return { current: null, previous: null };
|
|
962
999
|
const f = s.querySelectorAll(".route-page");
|
|
@@ -966,220 +1003,199 @@ function nt(e, o) {
|
|
|
966
1003
|
};
|
|
967
1004
|
}
|
|
968
1005
|
function M(s) {
|
|
969
|
-
var
|
|
970
|
-
if (!
|
|
971
|
-
const { current: f, previous:
|
|
1006
|
+
var A;
|
|
1007
|
+
if (!n.canGoBack() || s.clientX > o) return;
|
|
1008
|
+
const { current: f, previous: p } = T();
|
|
972
1009
|
if (!f) return;
|
|
973
|
-
|
|
974
|
-
const
|
|
975
|
-
(
|
|
1010
|
+
c = !0, l = s.clientX, u = s.clientY, r = Date.now(), a = f, d = p;
|
|
1011
|
+
const v = R();
|
|
1012
|
+
(A = v == null ? void 0 : v.setPointerCapture) == null || A.call(v, s.pointerId), a.style.willChange = "transform", d && (d.style.willChange = "transform", d.style.transition = "none"), a.style.transition = "none";
|
|
976
1013
|
}
|
|
977
|
-
function
|
|
978
|
-
if (!
|
|
1014
|
+
function L(s) {
|
|
1015
|
+
if (!c || !a) return;
|
|
979
1016
|
const f = Math.max(0, s.clientX - l);
|
|
980
|
-
if (Math.abs(s.clientY -
|
|
1017
|
+
if (Math.abs(s.clientY - u) > f * 1.5) {
|
|
981
1018
|
g();
|
|
982
1019
|
return;
|
|
983
1020
|
}
|
|
984
|
-
const
|
|
985
|
-
if (a.style.transform = `translateX(${f}px)`,
|
|
986
|
-
const
|
|
987
|
-
|
|
1021
|
+
const v = f / window.innerWidth;
|
|
1022
|
+
if (a.style.transform = `translateX(${f}px)`, d) {
|
|
1023
|
+
const A = -20 + 20 * v;
|
|
1024
|
+
d.style.transform = `translateX(${A}%)`;
|
|
988
1025
|
}
|
|
989
1026
|
}
|
|
990
|
-
function
|
|
991
|
-
if (!
|
|
1027
|
+
function _(s) {
|
|
1028
|
+
if (!c || !a) return;
|
|
992
1029
|
if (!a.isConnected) {
|
|
993
|
-
|
|
1030
|
+
P(), c = !1;
|
|
994
1031
|
return;
|
|
995
1032
|
}
|
|
996
|
-
const f = s.clientX - l,
|
|
997
|
-
f / window.innerWidth > i ||
|
|
998
|
-
|
|
999
|
-
}, 200)) : (a.style.transition = "transform 0.2s ease-out", a.style.transform = "translateX(0)",
|
|
1033
|
+
const f = s.clientX - l, p = Date.now() - r, v = f / p;
|
|
1034
|
+
f / window.innerWidth > i || v > t ? (a.style.transition = "transform 0.2s ease-out", a.style.transform = "translateX(100%)", d && (d.style.transition = "transform 0.2s ease-out", d.style.transform = "translateX(0)"), setTimeout(() => {
|
|
1035
|
+
P(), n.goBack();
|
|
1036
|
+
}, 200)) : (a.style.transition = "transform 0.2s ease-out", a.style.transform = "translateX(0)", d && (d.style.transition = "transform 0.2s ease-out", d.style.transform = "translateX(-20%)"), setTimeout(P, 200)), c = !1;
|
|
1000
1037
|
}
|
|
1001
1038
|
function g() {
|
|
1002
|
-
|
|
1039
|
+
c && (a && (a.style.transition = "transform 0.15s ease-out", a.style.transform = "translateX(0)"), d && (d.style.transition = "transform 0.15s ease-out", d.style.transform = "translateX(-20%)"), setTimeout(P, 150), c = !1);
|
|
1003
1040
|
}
|
|
1004
|
-
function
|
|
1005
|
-
a && (a.style.willChange = "", a.style.transition = "", a.style.transform = ""),
|
|
1041
|
+
function P() {
|
|
1042
|
+
a && (a.style.willChange = "", a.style.transition = "", a.style.transform = ""), d && (d.style.willChange = "", d.style.transition = "", d.style.transform = ""), a = null, d = null;
|
|
1006
1043
|
}
|
|
1007
|
-
|
|
1044
|
+
Q(() => {
|
|
1008
1045
|
const s = R();
|
|
1009
|
-
s != null && s.addEventListener && (s.addEventListener("pointerdown", M, { passive: !0 }), s.addEventListener("pointermove",
|
|
1010
|
-
}),
|
|
1046
|
+
s != null && s.addEventListener && (s.addEventListener("pointerdown", M, { passive: !0 }), s.addEventListener("pointermove", L, { passive: !0 }), s.addEventListener("pointerup", _, { passive: !0 }), s.addEventListener("pointercancel", g, { passive: !0 }));
|
|
1047
|
+
}), De(() => {
|
|
1011
1048
|
const s = R();
|
|
1012
|
-
s != null && s.removeEventListener && (s.removeEventListener("pointerdown", M), s.removeEventListener("pointermove",
|
|
1049
|
+
s != null && s.removeEventListener && (s.removeEventListener("pointerdown", M), s.removeEventListener("pointermove", L), s.removeEventListener("pointerup", _), s.removeEventListener("pointercancel", g));
|
|
1013
1050
|
});
|
|
1014
1051
|
}
|
|
1015
|
-
function
|
|
1052
|
+
function Lt(e) {
|
|
1016
1053
|
return { ...e };
|
|
1017
1054
|
}
|
|
1018
|
-
function
|
|
1019
|
-
var
|
|
1055
|
+
function dt(e, n) {
|
|
1056
|
+
var o, i, t;
|
|
1020
1057
|
for (const l of e)
|
|
1021
|
-
(
|
|
1058
|
+
(o = l.routes) != null && o.length && n.registerRoutes(l.routes), (i = l.dialogs) != null && i.length && n.registerDialogs(l.dialogs), (t = l.controls) != null && t.length && n.registerControls(l.controls);
|
|
1022
1059
|
}
|
|
1023
|
-
const
|
|
1060
|
+
const vt = /* @__PURE__ */ ie({
|
|
1024
1061
|
__name: "MicroControlWrapper",
|
|
1025
1062
|
props: {
|
|
1026
1063
|
control: {}
|
|
1027
1064
|
},
|
|
1028
1065
|
setup(e) {
|
|
1029
|
-
const
|
|
1030
|
-
return
|
|
1031
|
-
i(
|
|
1032
|
-
}), (t, l) => (
|
|
1066
|
+
const n = e, { getControlAttrs: o, updateControlAttrs: i } = Z();
|
|
1067
|
+
return O(Oe, n.control.name), O(se, () => o(n.control.name)), O(re, (t) => {
|
|
1068
|
+
i(n.control.name, t);
|
|
1069
|
+
}), (t, l) => (G(), z(Ae(e.control.component), Ce({
|
|
1033
1070
|
key: e.control.componentKey || 0
|
|
1034
1071
|
}, e.control.attrs), null, 16));
|
|
1035
1072
|
}
|
|
1036
1073
|
});
|
|
1037
|
-
let
|
|
1038
|
-
function
|
|
1039
|
-
|
|
1040
|
-
}
|
|
1041
|
-
function st() {
|
|
1042
|
-
Z = Math.max(0, Z - 1), Z === 0 && (document.body.style.overflow = Be);
|
|
1043
|
-
}
|
|
1044
|
-
const rt = /* @__PURE__ */ new Set(["A", "BUTTON", "INPUT", "SELECT", "TEXTAREA"]);
|
|
1045
|
-
function lt(e) {
|
|
1046
|
-
return !(!rt.has(e.tagName) && !e.hasAttribute("tabindex") || e.tagName === "A" && !e.hasAttribute("href") || e.hidden || e.closest("[hidden],[inert]") || e.getAttribute("aria-hidden") === "true" || e.getAttribute("tabindex") === "-1" || e.hasAttribute("disabled") || e instanceof HTMLInputElement && e.type === "hidden");
|
|
1047
|
-
}
|
|
1048
|
-
function Ge(e) {
|
|
1049
|
-
return Array.from(
|
|
1050
|
-
e.querySelectorAll("*")
|
|
1051
|
-
).filter(lt);
|
|
1074
|
+
let ee = 0, We = "";
|
|
1075
|
+
function mt() {
|
|
1076
|
+
ee === 0 && (We = document.body.style.overflow, document.body.style.overflow = "hidden"), ee++;
|
|
1052
1077
|
}
|
|
1053
|
-
function
|
|
1054
|
-
|
|
1055
|
-
return o.find((n) => n.hasAttribute("autofocus")) ?? o[0] ?? e;
|
|
1078
|
+
function pt() {
|
|
1079
|
+
ee = Math.max(0, ee - 1), ee === 0 && (document.body.style.overflow = We);
|
|
1056
1080
|
}
|
|
1057
|
-
const
|
|
1081
|
+
const ht = 12, yt = /* @__PURE__ */ ie({
|
|
1058
1082
|
__name: "MicroDialog",
|
|
1059
1083
|
props: {
|
|
1060
1084
|
dialog: {},
|
|
1061
1085
|
stackIndex: {}
|
|
1062
1086
|
},
|
|
1063
1087
|
emits: ["close"],
|
|
1064
|
-
setup(e, { emit:
|
|
1065
|
-
const
|
|
1066
|
-
let
|
|
1067
|
-
const
|
|
1068
|
-
function
|
|
1069
|
-
return
|
|
1088
|
+
setup(e, { emit: n }) {
|
|
1089
|
+
const o = e, i = n, { getDialogAttrs: t, updateDialogAttrs: l } = Z();
|
|
1090
|
+
let u = !1, r = 0;
|
|
1091
|
+
const c = ne(null), a = ne(null), d = C(() => o.dialog.transition ?? "scale"), R = C(() => o.dialog.transitionDuration != null ? o.dialog.transitionDuration : d.value === "slide" ? 500 : 300), T = C(() => o.dialog.position ?? "standard"), M = C(() => o.dialog.seamless ?? !1);
|
|
1092
|
+
function L() {
|
|
1093
|
+
return c.value ? Me(c.value) : [];
|
|
1070
1094
|
}
|
|
1071
|
-
function
|
|
1072
|
-
var
|
|
1073
|
-
if (
|
|
1074
|
-
if (
|
|
1075
|
-
|
|
1095
|
+
function _(p) {
|
|
1096
|
+
var D, w;
|
|
1097
|
+
if (p.key === "Escape") {
|
|
1098
|
+
if (o.dialog.persistent) return;
|
|
1099
|
+
p.preventDefault(), p.stopPropagation(), i("close", o.dialog.path);
|
|
1076
1100
|
return;
|
|
1077
1101
|
}
|
|
1078
|
-
if (
|
|
1079
|
-
const
|
|
1080
|
-
if (
|
|
1081
|
-
|
|
1102
|
+
if (p.key !== "Tab") return;
|
|
1103
|
+
const v = L();
|
|
1104
|
+
if (v.length === 0) {
|
|
1105
|
+
p.preventDefault(), (D = c.value) == null || D.focus();
|
|
1082
1106
|
return;
|
|
1083
1107
|
}
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1086
|
-
}
|
|
1087
|
-
function g(d) {
|
|
1088
|
-
n.dialog.persistent || d.target === d.currentTarget && i("close", n.dialog.path);
|
|
1108
|
+
const A = v[0], y = v[v.length - 1], h = document.activeElement, m = !!((w = c.value) != null && w.contains(h));
|
|
1109
|
+
p.shiftKey ? (!m || h === A) && (p.preventDefault(), y.focus()) : (!m || h === y) && (p.preventDefault(), A.focus());
|
|
1089
1110
|
}
|
|
1090
|
-
function
|
|
1091
|
-
|
|
1092
|
-
d();
|
|
1093
|
-
return;
|
|
1094
|
-
}
|
|
1095
|
-
const P = document.createElement("input");
|
|
1096
|
-
P.style.cssText = "position:fixed;opacity:0;height:0;width:0;top:-100px;", u.value.appendChild(P), P.focus(), setTimeout(() => {
|
|
1097
|
-
P.remove(), d();
|
|
1098
|
-
}, 50);
|
|
1111
|
+
function g(p) {
|
|
1112
|
+
o.dialog.persistent || p.target === p.currentTarget && i("close", o.dialog.path);
|
|
1099
1113
|
}
|
|
1100
|
-
function
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
};
|
|
1107
|
-
if (d) {
|
|
1108
|
-
y(p);
|
|
1114
|
+
function P(p) {
|
|
1115
|
+
const v = ++r, A = (y = 0) => {
|
|
1116
|
+
if (!c.value || !o.dialog.activated || v !== r) return;
|
|
1117
|
+
const h = et(c.value);
|
|
1118
|
+
if (h) {
|
|
1119
|
+
h.focus(), he();
|
|
1109
1120
|
return;
|
|
1110
1121
|
}
|
|
1111
|
-
p
|
|
1112
|
-
|
|
1122
|
+
if (p && y < ht) {
|
|
1123
|
+
requestAnimationFrame(() => A(y + 1));
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
tt(c.value).focus(), he();
|
|
1127
|
+
};
|
|
1128
|
+
te(() => A());
|
|
1113
1129
|
}
|
|
1114
|
-
function
|
|
1115
|
-
if (
|
|
1116
|
-
|
|
1130
|
+
function s() {
|
|
1131
|
+
if (u) {
|
|
1132
|
+
P(o.dialog.focusInput ?? !1);
|
|
1117
1133
|
return;
|
|
1118
1134
|
}
|
|
1119
|
-
|
|
1135
|
+
u = !0, a.value = document.activeElement, mt(), P(o.dialog.focusInput ?? !1);
|
|
1120
1136
|
}
|
|
1121
|
-
function
|
|
1122
|
-
var
|
|
1123
|
-
if (!
|
|
1124
|
-
r++,
|
|
1125
|
-
const
|
|
1137
|
+
function f() {
|
|
1138
|
+
var h;
|
|
1139
|
+
if (!u) return;
|
|
1140
|
+
r++, u = !1, pt();
|
|
1141
|
+
const p = a.value;
|
|
1126
1142
|
a.value = null;
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1143
|
+
const v = document.activeElement, A = !!((h = c.value) != null && h.contains(v)), y = !v || v === document.body;
|
|
1144
|
+
p && typeof p.focus == "function" && document.contains(p) && (A || y) && p.focus();
|
|
1129
1145
|
}
|
|
1130
|
-
return
|
|
1131
|
-
l(
|
|
1146
|
+
return O(Ne, o.dialog.path), O(se, () => t(o.dialog.path)), O(re, (p) => {
|
|
1147
|
+
l(o.dialog.path, p);
|
|
1132
1148
|
}), X(
|
|
1133
|
-
() =>
|
|
1134
|
-
(
|
|
1135
|
-
|
|
1149
|
+
() => o.dialog.activated,
|
|
1150
|
+
(p) => {
|
|
1151
|
+
p && s();
|
|
1136
1152
|
}
|
|
1137
1153
|
), X(
|
|
1138
|
-
() =>
|
|
1139
|
-
(
|
|
1140
|
-
!
|
|
1154
|
+
() => o.dialog.closing,
|
|
1155
|
+
(p) => {
|
|
1156
|
+
!p && !o.dialog.activated && u && f();
|
|
1141
1157
|
}
|
|
1142
|
-
),
|
|
1143
|
-
|
|
1144
|
-
}),
|
|
1145
|
-
|
|
1146
|
-
}), (
|
|
1147
|
-
|
|
1148
|
-
class:
|
|
1149
|
-
`micro-dialog--${
|
|
1158
|
+
), Q(() => {
|
|
1159
|
+
o.dialog.activated && s();
|
|
1160
|
+
}), De(() => {
|
|
1161
|
+
u && f();
|
|
1162
|
+
}), (p, v) => (G(), z(Fe, { to: "body" }, [
|
|
1163
|
+
q("div", {
|
|
1164
|
+
class: k(["micro-dialog-portal", [
|
|
1165
|
+
`micro-dialog--${T.value}`,
|
|
1150
1166
|
e.dialog.fullscreen && "micro-dialog--fullscreen",
|
|
1151
1167
|
M.value && "micro-dialog--seamless"
|
|
1152
1168
|
]]),
|
|
1153
|
-
style:
|
|
1169
|
+
style: Ie({
|
|
1154
1170
|
zIndex: 100 + e.stackIndex,
|
|
1155
1171
|
"--dialog-duration": `${R.value}ms`
|
|
1156
1172
|
}),
|
|
1157
|
-
onClick:
|
|
1173
|
+
onClick: ce(g, ["self"])
|
|
1158
1174
|
}, [
|
|
1159
|
-
M.value ?
|
|
1175
|
+
M.value ? Xe("", !0) : (G(), j("div", {
|
|
1160
1176
|
key: 0,
|
|
1161
|
-
class:
|
|
1177
|
+
class: k(["micro-dialog-backdrop", e.dialog.closing && "micro-dialog-backdrop--closing"])
|
|
1162
1178
|
}, null, 2)),
|
|
1163
|
-
|
|
1179
|
+
q("div", {
|
|
1164
1180
|
ref_key: "wrapperRef",
|
|
1165
|
-
ref:
|
|
1181
|
+
ref: c,
|
|
1166
1182
|
role: "dialog",
|
|
1167
1183
|
"aria-modal": "true",
|
|
1168
1184
|
tabindex: "-1",
|
|
1169
|
-
class:
|
|
1170
|
-
`dialog-transition-${
|
|
1185
|
+
class: k(["micro-dialog", [
|
|
1186
|
+
`dialog-transition-${d.value}`,
|
|
1171
1187
|
e.dialog.closing && "micro-dialog--closing"
|
|
1172
1188
|
]]),
|
|
1173
|
-
onClick:
|
|
1174
|
-
onKeydown:
|
|
1189
|
+
onClick: ce(g, ["self"]),
|
|
1190
|
+
onKeydown: _
|
|
1175
1191
|
}, [
|
|
1176
|
-
|
|
1192
|
+
q("div", {
|
|
1177
1193
|
class: "micro-dialog__content",
|
|
1178
|
-
onClick:
|
|
1194
|
+
onClick: v[0] || (v[0] = ce(() => {
|
|
1179
1195
|
}, ["stop"]))
|
|
1180
1196
|
}, [
|
|
1181
|
-
|
|
1182
|
-
(
|
|
1197
|
+
Re(p.$slots, "default"),
|
|
1198
|
+
(G(), z(Ae(e.dialog.component), Ce({
|
|
1183
1199
|
key: e.dialog.componentKey
|
|
1184
1200
|
}, e.dialog.attrs), null, 16))
|
|
1185
1201
|
])
|
|
@@ -1187,28 +1203,28 @@ const ut = /* @__PURE__ */ oe({
|
|
|
1187
1203
|
], 6)
|
|
1188
1204
|
]));
|
|
1189
1205
|
}
|
|
1190
|
-
}),
|
|
1206
|
+
}), Pt = { class: "route-page" }, wt = { class: "route-page__body" }, Dt = /* @__PURE__ */ ie({
|
|
1191
1207
|
__name: "RoutePage",
|
|
1192
1208
|
props: {
|
|
1193
1209
|
routePath: {}
|
|
1194
1210
|
},
|
|
1195
1211
|
setup(e) {
|
|
1196
|
-
const
|
|
1197
|
-
if (
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
const { updateRouteAttrs: i, getRouteAttrs: t } =
|
|
1201
|
-
|
|
1202
|
-
i(
|
|
1212
|
+
const n = e;
|
|
1213
|
+
if (n.routePath) {
|
|
1214
|
+
const o = n.routePath;
|
|
1215
|
+
O(Ge, o);
|
|
1216
|
+
const { updateRouteAttrs: i, getRouteAttrs: t } = Z();
|
|
1217
|
+
O(se, () => t(o)), O(re, (l) => {
|
|
1218
|
+
i(o, l);
|
|
1203
1219
|
});
|
|
1204
1220
|
}
|
|
1205
|
-
return (
|
|
1206
|
-
|
|
1207
|
-
|
|
1221
|
+
return (o, i) => (G(), j("div", Pt, [
|
|
1222
|
+
q("div", wt, [
|
|
1223
|
+
Re(o.$slots, "default")
|
|
1208
1224
|
])
|
|
1209
1225
|
]));
|
|
1210
1226
|
}
|
|
1211
|
-
}),
|
|
1227
|
+
}), At = { class: "micro-router-content-layer" }, _t = /* @__PURE__ */ ie({
|
|
1212
1228
|
__name: "MicroRouterView",
|
|
1213
1229
|
props: {
|
|
1214
1230
|
config: {},
|
|
@@ -1216,120 +1232,120 @@ const ut = /* @__PURE__ */ oe({
|
|
|
1216
1232
|
nested: { type: Boolean }
|
|
1217
1233
|
},
|
|
1218
1234
|
setup(e) {
|
|
1219
|
-
var
|
|
1220
|
-
const
|
|
1221
|
-
(
|
|
1235
|
+
var P, s;
|
|
1236
|
+
const n = e, o = ft(n.config);
|
|
1237
|
+
(P = n.plugins) != null && P.length && dt(n.plugins, o);
|
|
1222
1238
|
const {
|
|
1223
1239
|
resolveRoutes: i,
|
|
1224
1240
|
resolveDialogs: t,
|
|
1225
1241
|
resolveControls: l,
|
|
1226
|
-
fromPath:
|
|
1242
|
+
fromPath: u,
|
|
1227
1243
|
toPath: r,
|
|
1228
|
-
isNavigating:
|
|
1244
|
+
isNavigating: c,
|
|
1229
1245
|
closeDialog: a
|
|
1230
|
-
} =
|
|
1231
|
-
const f =
|
|
1232
|
-
return f.some((
|
|
1233
|
-
}),
|
|
1246
|
+
} = o, d = ne(null), R = C(() => {
|
|
1247
|
+
const f = u.value.split("/").filter(Boolean), p = new Set(r.value.split("/").filter(Boolean));
|
|
1248
|
+
return f.some((v) => p.has(v));
|
|
1249
|
+
}), T = C(() => l.value.length > 0), M = C(() => {
|
|
1234
1250
|
const f = i.value.at(-1);
|
|
1235
1251
|
return (f == null ? void 0 : f.transition) ?? "slide";
|
|
1236
|
-
}),
|
|
1252
|
+
}), L = C(() => M.value === "none" ? "" : M.value === "fade" ? "page-fade" : "page-slide"), _ = C(() => {
|
|
1237
1253
|
const f = i.value.at(-1);
|
|
1238
1254
|
return f != null && f.transitionDuration ? f.transitionDuration : M.value === "fade" ? 300 : 500;
|
|
1239
1255
|
}), g = C(
|
|
1240
1256
|
() => R.value && M.value !== "none"
|
|
1241
1257
|
);
|
|
1242
|
-
return (s =
|
|
1243
|
-
containerRef:
|
|
1244
|
-
goBack: () =>
|
|
1258
|
+
return (s = n.config.gesture) != null && s.enabled && gt(n.config.gesture, {
|
|
1259
|
+
containerRef: d,
|
|
1260
|
+
goBack: () => o.push(-1),
|
|
1245
1261
|
canGoBack: () => i.value.length > 1
|
|
1246
|
-
}), (f,
|
|
1247
|
-
|
|
1262
|
+
}), (f, p) => (G(), j(oe, null, [
|
|
1263
|
+
Te(Le, {
|
|
1248
1264
|
ref_key: "pageContainerRef",
|
|
1249
|
-
ref:
|
|
1250
|
-
name:
|
|
1265
|
+
ref: d,
|
|
1266
|
+
name: L.value,
|
|
1251
1267
|
css: g.value
|
|
1252
1268
|
}, {
|
|
1253
|
-
default:
|
|
1254
|
-
(
|
|
1255
|
-
key:
|
|
1256
|
-
"route-path":
|
|
1257
|
-
class:
|
|
1258
|
-
deactivate: Y(i).length > 1 &&
|
|
1259
|
-
"micro-router--navigating": Y(
|
|
1269
|
+
default: fe(() => [
|
|
1270
|
+
(G(!0), j(oe, null, ge(Y(i), (v, A) => (G(), z(Dt, {
|
|
1271
|
+
key: v.key || v.path,
|
|
1272
|
+
"route-path": v.path,
|
|
1273
|
+
class: k({
|
|
1274
|
+
deactivate: Y(i).length > 1 && A !== Y(i).length - 1,
|
|
1275
|
+
"micro-router--navigating": Y(c)
|
|
1260
1276
|
}),
|
|
1261
|
-
style:
|
|
1262
|
-
transition: g.value ? `transform ${
|
|
1263
|
-
zIndex: 10 +
|
|
1277
|
+
style: Ie({
|
|
1278
|
+
transition: g.value ? `transform ${_.value}ms cubic-bezier(0.65, 0, 0.35, 1), opacity ${_.value}ms ease` : "none",
|
|
1279
|
+
zIndex: 10 + A,
|
|
1264
1280
|
"--mr-page-height": e.nested ? "100%" : "100dvh"
|
|
1265
1281
|
})
|
|
1266
1282
|
}, {
|
|
1267
|
-
default:
|
|
1268
|
-
(
|
|
1269
|
-
key:
|
|
1270
|
-
}, { ref_for: !0 }, Y(
|
|
1283
|
+
default: fe(() => [
|
|
1284
|
+
(G(), z(Ae(v.component), Ce({
|
|
1285
|
+
key: v.componentKey
|
|
1286
|
+
}, { ref_for: !0 }, Y(o).getRouteAttrs(v.path)), null, 16))
|
|
1271
1287
|
]),
|
|
1272
1288
|
_: 2
|
|
1273
1289
|
}, 1032, ["route-path", "class", "style"]))), 128))
|
|
1274
1290
|
]),
|
|
1275
1291
|
_: 1
|
|
1276
1292
|
}, 8, ["name", "css"]),
|
|
1277
|
-
|
|
1278
|
-
|
|
1293
|
+
q("div", At, [
|
|
1294
|
+
Re(f.$slots, "default")
|
|
1279
1295
|
]),
|
|
1280
|
-
|
|
1281
|
-
class:
|
|
1296
|
+
q("div", {
|
|
1297
|
+
class: k(["micro-router-gui-layer", { "gui-visible": T.value }])
|
|
1282
1298
|
}, [
|
|
1283
|
-
|
|
1284
|
-
default:
|
|
1285
|
-
(
|
|
1286
|
-
key:
|
|
1287
|
-
control:
|
|
1299
|
+
Te(Le, { name: "control-fade" }, {
|
|
1300
|
+
default: fe(() => [
|
|
1301
|
+
(G(!0), j(oe, null, ge(Y(l), (v) => (G(), z(vt, {
|
|
1302
|
+
key: v.name + "-" + (v.componentKey || 0),
|
|
1303
|
+
control: v
|
|
1288
1304
|
}, null, 8, ["control"]))), 128))
|
|
1289
1305
|
]),
|
|
1290
1306
|
_: 1
|
|
1291
1307
|
})
|
|
1292
1308
|
], 2),
|
|
1293
|
-
(
|
|
1294
|
-
key: "dialog-" +
|
|
1295
|
-
dialog:
|
|
1296
|
-
"stack-index":
|
|
1309
|
+
(G(!0), j(oe, null, ge(Y(t), (v, A) => (G(), z(yt, {
|
|
1310
|
+
key: "dialog-" + v.path,
|
|
1311
|
+
dialog: v,
|
|
1312
|
+
"stack-index": A,
|
|
1297
1313
|
onClose: Y(a)
|
|
1298
1314
|
}, null, 8, ["dialog", "stack-index", "onClose"]))), 128))
|
|
1299
1315
|
], 64));
|
|
1300
1316
|
}
|
|
1301
1317
|
});
|
|
1302
1318
|
export {
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1319
|
+
se as MICRO_ATTRS_READ_KEY,
|
|
1320
|
+
re as MICRO_ATTRS_WRITE_KEY,
|
|
1321
|
+
Oe as MICRO_CONTROL_NAME_KEY,
|
|
1322
|
+
Ne as MICRO_DIALOG_PATH_KEY,
|
|
1323
|
+
Be as MICRO_ROUTER_KEY,
|
|
1324
|
+
me as MICRO_ROUTER_ROOT_KEY,
|
|
1325
|
+
Ge as MICRO_ROUTE_PATH_KEY,
|
|
1326
|
+
vt as MicroControlWrapper,
|
|
1327
|
+
yt as MicroDialogComponent,
|
|
1328
|
+
_t as MicroRouterView,
|
|
1329
|
+
Dt as RoutePage,
|
|
1330
|
+
ze as STEP_DELAY,
|
|
1331
|
+
W as buildPathFromSegments,
|
|
1332
|
+
Et as createRouterKey,
|
|
1333
|
+
Lt as defineFeaturePlugin,
|
|
1318
1334
|
H as getLastSegment,
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
+
Ee as isAsyncLoader,
|
|
1336
|
+
$ as normalizePath,
|
|
1337
|
+
I as parsePathSegments,
|
|
1338
|
+
dt as registerFeaturePlugins,
|
|
1339
|
+
Se as safeMarkRaw,
|
|
1340
|
+
Tt as useControlLifecycle,
|
|
1341
|
+
Ve as useControlManager,
|
|
1342
|
+
Mt as useDialogLifecycle,
|
|
1343
|
+
ot as useDialogManager,
|
|
1344
|
+
gt as useGestureNavigation,
|
|
1345
|
+
ft as useGlobalMicroRouter,
|
|
1346
|
+
Z as useMicroRouter,
|
|
1347
|
+
St as useMicroState,
|
|
1348
|
+
ut as useNavigation,
|
|
1349
|
+
ct as usePageTracker,
|
|
1350
|
+
bt as useRouteLifecycle
|
|
1335
1351
|
};
|