@maizzle/framework 6.0.13 → 6.0.14

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.
@@ -1,11 +1,145 @@
1
1
  import { At as onActivated, Bt as onUnmounted, Gn as reactive, Jn as shallowReactive, Pt as onDeactivated, St as inject, W as computed, Wt as provide, Xn as shallowRef, _n as watch, dt as getCurrentInstance, kt as nextTick, mt as h, qn as ref, rr as unref, rt as defineComponent, vn as watchEffect } from "./vue.runtime.esm-bundler-BHD3r-bP.js";
2
- //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/useApi-s_02lHjl.js
2
+ //#region ../../home/cosmin/Work/maizzle/framework/node_modules/nostics/dist/index.mjs
3
+ /**
4
+ * Renders a diagnostic into a multi-line, unicode-decorated string suitable
5
+ * for terminal output. The first line is `[<name>] <message>`; optional
6
+ * details (`fix`, `sources`, `docs`) follow with `├▶`/`╰▶` connectors.
7
+ */
8
+ function formatDiagnostic(diagnostic) {
9
+ const header = `[${diagnostic.name}] ${diagnostic.message}`;
10
+ const details = [];
11
+ if (diagnostic.fix) details.push(`fix: ${diagnostic.fix}`);
12
+ if (diagnostic.sources?.length) details.push(`sources: ${diagnostic.sources.join(", ")}`);
13
+ if (diagnostic.docs) details.push(`see: ${diagnostic.docs}`);
14
+ if (details.length === 0) return header;
15
+ return [header, ...details.map((detail, i) => {
16
+ return `${i < details.length - 1 ? "├▶" : "╰▶"} ${detail}`;
17
+ })].join("\n");
18
+ }
19
+ /**
20
+ * Transforms a value or a function that returns a value to a value.
21
+ *
22
+ * @param valFn either a value or a function that returns a value
23
+ * @param args arguments to pass to the function if `valFn` is a function
24
+ *
25
+ * @internal
26
+ */
27
+ function toValueWithArgs(valFn, ...args) {
28
+ return typeof valFn === "function" ? valFn(...args) : valFn;
29
+ }
30
+ /**
31
+ * Creates a console reporter that renders each diagnostic with `formatter` and
32
+ * prints the result via `console[method]`. Both default sensibly (`'warn'` and
33
+ * {@link formatDiagnostic}); `method` can also be overridden per call through
34
+ * the reporter options.
35
+ */
36
+ /* @__NO_SIDE_EFFECTS__ */
37
+ function createConsoleReporter({ method: defaultMethod = "warn", formatter = formatDiagnostic } = {}) {
38
+ return (diagnostic, { method = defaultMethod } = {}) => {
39
+ console[method](formatter(diagnostic));
40
+ };
41
+ }
42
+ var captureStackTrace = Error.captureStackTrace;
43
+ var Diagnostic = class Diagnostic extends Error {
44
+ name = "Diagnostic";
45
+ /**
46
+ * URL to extended documentation for this diagnostic code.
47
+ * Auto-generated from {@link DefineDiagnosticsOptions.docsBase}.
48
+ */
49
+ docs;
50
+ /**
51
+ * Optional actionable instructions on how to resolve the problem.
52
+ */
53
+ fix;
54
+ /**
55
+ * Locations in user code that contributed to this diagnostic, in
56
+ * `file:line:column` format. Relevant when the stack trace doesn't reflect
57
+ * the user's source (e.g. compilers, bundlers), otherwise redundant with the
58
+ * stack and should be omitted.
59
+ */
60
+ sources;
61
+ /**
62
+ * Alias for {@link Error.message}: the reason this diagnostic was raised.
63
+ */
64
+ get why() {
65
+ return this.message;
66
+ }
67
+ /**
68
+ * @param init structured initializer; `why` is required
69
+ * @param captureFrom V8 stack-cutoff frame. Defaults to {@link Diagnostic}
70
+ * so the top of the trace is the `new Diagnostic(...)` call site.
71
+ * `defineDiagnostics` passes its action method to strip its own frames too.
72
+ * Ignored on engines without `Error.captureStackTrace`.
73
+ */
74
+ constructor(init, captureFrom = Diagnostic) {
75
+ super(init.why, { cause: init.cause });
76
+ this.fix = init.fix;
77
+ this.docs = init.docs;
78
+ this.sources = init.sources;
79
+ captureStackTrace?.(this, captureFrom);
80
+ }
81
+ /**
82
+ * Converts the diagnostic into a serializable structured object.
83
+ */
84
+ toJSON() {
85
+ return {
86
+ name: this.name,
87
+ why: this.why,
88
+ fix: this.fix,
89
+ docs: this.docs,
90
+ sources: this.sources,
91
+ cause: this.cause,
92
+ stack: this.stack
93
+ };
94
+ }
95
+ };
96
+ /**
97
+ * Resolves the docs URL for a code from a `docsBase` (string template or
98
+ * resolver function). Shared by {@link defineDiagnostics} and
99
+ * {@link defineProdDiagnostics}. Per-code `docs` overrides are handled by the
100
+ * caller; this only covers the `docsBase`-derived case.
101
+ *
102
+ * @internal
103
+ */
104
+ function deriveDocs(docsBase, code) {
105
+ return typeof docsBase === "string" ? `${docsBase}/${code.toLowerCase()}` : docsBase?.(code);
106
+ }
107
+ /**
108
+ * Creates a typed diagnostics object from a set of code definitions. Each
109
+ * code becomes a callable {@link DiagnosticHandle}: invoke to report, or
110
+ * `throw` the result to raise. No `new` required, no proxy.
111
+ */
112
+ /* @__NO_SIDE_EFFECTS__ */
113
+ function defineDiagnostics(options) {
114
+ const reporters = options.reporters ?? [];
115
+ const result = {};
116
+ const { docsBase } = options;
117
+ for (const code of Object.keys(options.codes)) {
118
+ const def = options.codes[code];
119
+ const docs = def.docs === false ? void 0 : def.docs || deriveDocs(docsBase, code);
120
+ const handle = (params = {}, reporterOptions = {}) => {
121
+ const diagnostic = new Diagnostic({
122
+ why: toValueWithArgs(def.why, params),
123
+ fix: toValueWithArgs(def.fix, params),
124
+ docs,
125
+ cause: params.cause,
126
+ sources: params.sources
127
+ }, handle);
128
+ diagnostic.name = code;
129
+ for (const reporter of reporters) reporter(diagnostic, reporterOptions);
130
+ return diagnostic;
131
+ };
132
+ result[code] = handle;
133
+ }
134
+ return result;
135
+ }
136
+ //#endregion
137
+ //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/useApi-CROJJdhE.js
3
138
  /*!
4
- * vue-router v5.1.0
139
+ * vue-router v5.2.0
5
140
  * (c) 2026 Eduardo San Martin Morote
6
141
  * @license MIT
7
142
  */
8
- var isBrowser$1 = typeof document !== "undefined";
9
143
  /**
10
144
  * Allows differentiating lazy components from functional components and vue-class-component
11
145
  * @internal
@@ -100,14 +234,269 @@ var propertiesToLog = [
100
234
  "query",
101
235
  "hash"
102
236
  ];
237
+ /**
238
+ * Stringifies a raw location for display in dev warnings.
239
+ *
240
+ * @internal
241
+ */
103
242
  function stringifyRoute(to) {
104
- if (typeof to === "string") return to;
243
+ if (!to || typeof to === "string") return to;
105
244
  if (to.path != null) return to.path;
106
245
  const location = {};
107
246
  for (const key of propertiesToLog) if (key in to) location[key] = to[key];
108
247
  return JSON.stringify(location, null, 2);
109
248
  }
110
249
  /**
250
+ * Runtime diagnostics catalog for Vue Router.
251
+ *
252
+ * Every entry has a stable `VUE_ROUTER_R####` code, a `why` that states the problem
253
+ * (the diagnosis only, never the remedy) and a `fix` that states the remedy
254
+ * (only, never the diagnosis). They are complementary: the reporter prints
255
+ * both, so neither repeats the other. The diagnosis substrings asserted by the
256
+ * warning tests stay in `why`. All call sites stay behind the existing `__DEV__` (or
257
+ * `process.env.NODE_ENV !== 'production'`) guards and remain bare expression
258
+ * statements so they tree-shake out of production builds.
259
+ *
260
+ * Codes are permanent: never rename or reuse one.
261
+ * - `VUE_ROUTER_R0###` core runtime warnings
262
+ * - `VUE_ROUTER_R1###` experimental data-loaders
263
+ */
264
+ var diagnostics = /*#__PURE__*/ defineDiagnostics({
265
+ reporters: [/*#__PURE__*/ createConsoleReporter()],
266
+ codes: {
267
+ VUE_ROUTER_R0001: {
268
+ why: (p) => `Parent route "${p.name}" not found when adding child route`,
269
+ fix: "Add the parent route before its children, or check the parent name for typos.",
270
+ docs: "https://router.vuejs.org/guide/advanced/dynamic-routing.html#Adding-nested-routes"
271
+ },
272
+ VUE_ROUTER_R0002: {
273
+ why: (p) => `Cannot remove non-existent route "${p.name}"`,
274
+ fix: "Check the route name; it may already have been removed or was never added.",
275
+ docs: "https://router.vuejs.org/guide/advanced/dynamic-routing.html#Removing-routes"
276
+ },
277
+ VUE_ROUTER_R0003: {
278
+ why: (p) => `Location "${stringifyRoute(p.location)}" resolved to "${p.href}". A resolved location cannot start with multiple slashes.`,
279
+ fix: "Remove the leading slashes from the location or fix the route configuration."
280
+ },
281
+ VUE_ROUTER_R0004: {
282
+ why: (p) => `No match found for location with path "${stringifyRoute(p.path)}"`,
283
+ fix: "Add a route matching this path or check for typos in the location.",
284
+ docs: "https://router.vuejs.org/guide/essentials/dynamic-matching.html#Catch-all-404-Not-found-Route"
285
+ },
286
+ VUE_ROUTER_R0005: {
287
+ why: (p) => `router.resolve() was passed an invalid location. This will fail in production.\nLocation: ${stringifyRoute(p.rawLocation)}`,
288
+ fix: "Pass a valid route location: a string path or an object with `path` or `name`."
289
+ },
290
+ VUE_ROUTER_R0006: {
291
+ why: (p) => `Path "${p.path}" was passed with params but they will be ignored because a "path" was passed.`,
292
+ fix: "Use a named route `{ name, params }` instead of `{ path, params }`.",
293
+ docs: "https://router.vuejs.org/guide/essentials/navigation.html#Navigate-to-a-different-location"
294
+ },
295
+ VUE_ROUTER_R0007: {
296
+ why: (p) => `A \`hash\` should always start with the character "#" but received "${p.hash}".`,
297
+ fix: (p) => `Prepend "#" to the hash in your route location: use "#${p.hash}".`
298
+ },
299
+ VUE_ROUTER_R0008: {
300
+ why: (p) => `Invalid redirect found:\n${p.target}\n when navigating to "${p.to}".\nThis will break in production.`,
301
+ fix: "A redirect must resolve to a location with a `name` or `path`; return one of those (or a string path) from `redirect`.",
302
+ docs: "https://router.vuejs.org/guide/essentials/redirect-and-alias.html#Redirect"
303
+ },
304
+ VUE_ROUTER_R0009: {
305
+ why: (p) => `Detected a possibly infinite redirection in a navigation guard when going from "${p.from}" to "${p.to}". Aborting to avoid a Stack Overflow. This might break in production if not fixed.`,
306
+ fix: "A guard is returning a new location on every call; make that return conditional so it only redirects when actually needed.",
307
+ docs: "https://router.vuejs.org/guide/advanced/navigation-guards.html#Global-Before-Guards"
308
+ },
309
+ VUE_ROUTER_R0010: {
310
+ why: "Uncaught error during route navigation",
311
+ fix: "Register an error handler with `router.onError()` to handle navigation errors."
312
+ },
313
+ VUE_ROUTER_R0011: {
314
+ why: "Unexpected error when starting the router:",
315
+ fix: "Inspect the actual cause; a navigation guard or async component likely threw during the initial navigation."
316
+ },
317
+ VUE_ROUTER_R0020: {
318
+ why: (p) => `No active route record was found when calling \`${p.fn}()\`. Maybe you called it inside of App.vue?`,
319
+ fix: "Call it from a component rendered inside <router-view> (a page component or one of its children), not from App.vue.",
320
+ docs: "https://router.vuejs.org/guide/advanced/composition-api.html#Navigation-Guards"
321
+ },
322
+ VUE_ROUTER_R0021: {
323
+ why: "No active route record was found when reactivating component with navigation guard. This is likely a bug in vue-router.",
324
+ fix: "Report with a minimal reproduction at https://github.com/vuejs/router/issues/new/choose."
325
+ },
326
+ VUE_ROUTER_R0022: {
327
+ why: (p) => `${p.fn}() was called outside of component setup but it must be called at the top of a setup function`,
328
+ fix: "Call it synchronously at the top of `setup()`, before any `await`.",
329
+ docs: "https://router.vuejs.org/guide/advanced/composition-api.html#Navigation-Guards"
330
+ },
331
+ VUE_ROUTER_R0023: {
332
+ why: (p) => `The "next" callback was never called inside of ${p.name ? `"${p.name}"` : ""}:\n${p.guard}`,
333
+ fix: "Make sure `next()` runs on every branch, including early returns and async paths, or drop the `next` parameter and return the value instead.",
334
+ docs: "https://router.vuejs.org/guide/advanced/navigation-guards.html#Optional-third-argument-next"
335
+ },
336
+ VUE_ROUTER_R0024: {
337
+ why: (p) => `The "next" callback was called more than once in one navigation guard when going from "${p.from}" to "${p.to}". This will fail in production.`,
338
+ fix: "Call `next()` exactly once per guard: remove the extra call, or migrate to returning the value you passed to `next()`.",
339
+ docs: "https://router.vuejs.org/guide/advanced/navigation-guards.html#Optional-third-argument-next"
340
+ },
341
+ VUE_ROUTER_R0025: {
342
+ why: "The `next()` callback in navigation guards is deprecated.",
343
+ fix: "Return the value instead: `next()` becomes `return`, `next(false)` becomes `return false`, `next(\"/path\")` becomes `return \"/path\"`.",
344
+ docs: "https://router.vuejs.org/guide/advanced/navigation-guards.html#Optional-third-argument-next"
345
+ },
346
+ VUE_ROUTER_R0026: {
347
+ why: (p) => `Record with path "${p.path}" is either missing a "component(s)" or "children" property.`,
348
+ fix: "Add a `component`, `components`, or `children` to the route record.",
349
+ docs: "https://router.vuejs.org/guide/essentials/nested-routes.html"
350
+ },
351
+ VUE_ROUTER_R0027: {
352
+ why: (p) => `Component "${p.name}" in record with path "${p.path}" is not a valid component. Received "${p.received}".`,
353
+ fix: "Pass a component or a function returning a Promise that resolves to one."
354
+ },
355
+ VUE_ROUTER_R0028: {
356
+ why: (p) => `Component "${p.name}" in record with path "${p.path}" is a Promise instead of a function that returns a Promise. This will break in production if not fixed.`,
357
+ fix: `Defer the import in an arrow function so it loads lazily: write "() => import('./MyPage.vue')", not "import('./MyPage.vue')".`,
358
+ docs: "https://router.vuejs.org/guide/advanced/lazy-loading.html"
359
+ },
360
+ VUE_ROUTER_R0029: {
361
+ why: (p) => `Component "${p.name}" in record with path "${p.path}" is defined using "defineAsyncComponent()".`,
362
+ fix: `Drop the wrapper and pass "() => import('./MyPage.vue')" directly; the router handles lazy components itself.`,
363
+ docs: "https://router.vuejs.org/guide/advanced/lazy-loading.html#Relationship-to-async-components"
364
+ },
365
+ VUE_ROUTER_R0030: {
366
+ why: (p) => `Component "${p.name}" in record with path "${p.path}" is a function that does not return a Promise. This will break in production if not fixed.`,
367
+ fix: "Return a dynamic import (`() => import(\"./MyPage.vue\")`) from the function, or add a `displayName` if it is a functional component.",
368
+ docs: "https://router.vuejs.org/guide/advanced/lazy-loading.html"
369
+ },
370
+ VUE_ROUTER_R0040: {
371
+ why: (p) => `Because "${p.el}" starts with "#", scrollBehavior resolves it as an element id via document.getElementById("${p.el.slice(1)}"), not as a CSS selector. No element has that id, but "${p.el}" does match an element with document.querySelector().`,
372
+ fix: (p) => `Resolve the element yourself and return the node: el: document.querySelector('${p.el}').`,
373
+ docs: "https://router.vuejs.org/guide/advanced/scroll-behavior.html"
374
+ },
375
+ VUE_ROUTER_R0041: {
376
+ why: (p) => `The selector "${p.el}" is invalid. See https://mathiasbynens.be/notes/css-escapes or CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape) for the escaping rules.`,
377
+ fix: "Build an id selector as `#${CSS.escape(id)}` so special characters in the id are escaped.",
378
+ docs: "https://router.vuejs.org/guide/advanced/scroll-behavior.html"
379
+ },
380
+ VUE_ROUTER_R0042: {
381
+ why: (p) => `Couldn't find element using selector "${p.el}" returned by scrollBehavior.`,
382
+ fix: "Return a selector that matches an existing element, or guard against missing elements.",
383
+ docs: "https://router.vuejs.org/guide/advanced/scroll-behavior.html"
384
+ },
385
+ VUE_ROUTER_R0050: {
386
+ why: (p) => {
387
+ let to;
388
+ try {
389
+ to = p.to === void 0 ? "undefined" : JSON.stringify(p.to);
390
+ } catch {
391
+ to = String(p.to);
392
+ }
393
+ return `Invalid value for prop "to" in useLink()\n- to: ${to}`;
394
+ },
395
+ fix: "Pass a valid route location (a string path or an object) to the \"to\" prop."
396
+ },
397
+ VUE_ROUTER_R0060: {
398
+ why: (p) => `<router-view> can no longer be used directly inside <${p.comp}>.`,
399
+ fix: (p) => `Wrap the slot's resolved component with <${p.comp}> instead of nesting <router-view> in it:\n\n<router-view v-slot="{ Component }">\n <${p.comp}>\n <component :is="Component" />\n </${p.comp}>\n</router-view>`,
400
+ docs: "https://router.vuejs.org/guide/advanced/router-view-slot.html#KeepAlive-Transition"
401
+ },
402
+ VUE_ROUTER_R0070: {
403
+ why: (p) => `Cannot resolve a relative location without an absolute path. Trying to resolve "${p.to}" from "${p.from}".`,
404
+ fix: (p) => `Resolve from an absolute \`from\` path that starts with "/", e.g. "/${p.from}".`
405
+ },
406
+ VUE_ROUTER_R0080: {
407
+ why: (p) => `Error decoding "${p.text}". Using original value`,
408
+ fix: "Ensure the value is correctly percent-encoded."
409
+ },
410
+ VUE_ROUTER_R0090: {
411
+ why: (p) => `Found duplicated params with name "${p.name}" for path "${p.path}". Only the last one will be available on "$route.params".`,
412
+ fix: "Give each param a unique name within the path.",
413
+ docs: "https://router.vuejs.org/guide/essentials/route-matching-syntax.html"
414
+ },
415
+ VUE_ROUTER_R0100: {
416
+ why: (p) => `Discarded invalid param(s) "${p.params}" when navigating.` + p.inherited + ` See https://github.com/vuejs/router/commit/e887570 for more details.`,
417
+ fix: "Only pass params that exist on the target route."
418
+ },
419
+ VUE_ROUTER_R0101: {
420
+ why: (p) => `The Matcher cannot resolve relative paths but received "${p.path}". Unless you directly called \`matcher.resolve("${p.path}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`,
421
+ fix: "Pass an absolute path (starting with \"/\") to the matcher."
422
+ },
423
+ VUE_ROUTER_R0102: {
424
+ why: (p) => `Alias "${p.alias}" and the original record: "${p.original}" must have the exact same param named "${p.name}"`,
425
+ fix: "Use the same param names in the alias as in the original route.",
426
+ docs: "https://router.vuejs.org/guide/essentials/redirect-and-alias.html#Alias"
427
+ },
428
+ VUE_ROUTER_R0103: {
429
+ why: (p) => `The route named "${p.name}" has a child without a name, an empty path, and no children. Using that name won't render the empty path child, so this is probably a mistake.`,
430
+ fix: "Move the `name` onto the empty-path child; or, if intentional, give the child its own name to silence this.",
431
+ docs: "https://router.vuejs.org/guide/essentials/nested-routes.html#Nested-Named-Routes"
432
+ },
433
+ VUE_ROUTER_R0104: {
434
+ why: (p) => `Absolute path "${p.path}" must have the exact same param named "${p.name}" as its parent "${p.parent}".`,
435
+ fix: "Include the parent route params in the absolute child path.",
436
+ docs: "https://router.vuejs.org/guide/essentials/nested-routes.html"
437
+ },
438
+ VUE_ROUTER_R0105: {
439
+ why: (p) => `Finding ancestor route "${p.ancestor}" failed for "${p.record}"`,
440
+ fix: "Report a reproduction at https://github.com/vuejs/router/issues/new/choose."
441
+ },
442
+ VUE_ROUTER_R0110: {
443
+ why: `A hash base must end with a "#"`,
444
+ fix: (p) => `Append "#" to the "base" argument passed to "createWebHashHistory()": "${p.base}" should be "${p.suggestion}".`
445
+ },
446
+ VUE_ROUTER_R0120: {
447
+ why: "Error with push/replace State",
448
+ fix: "The browser rejected the history API call; check for cross-origin or rate-limit issues."
449
+ },
450
+ VUE_ROUTER_R0121: {
451
+ why: "history.state seems to have been manually replaced without preserving the necessary values.\nYou can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state",
452
+ fix: "Merge the router's state into your own when calling it manually: `history.replaceState({ ...history.state, ...yourState }, '', url)`.",
453
+ docs: "https://router.vuejs.org/guide/migration.html#Usage-of-history-state"
454
+ },
455
+ VUE_ROUTER_R1001: {
456
+ why: (p) => `Data loader "${String(p.key)}" has a different parent than the current context. This shouldn't be happening.`,
457
+ fix: "Report a bug with a minimal reproduction at https://github.com/vuejs/router/."
458
+ },
459
+ VUE_ROUTER_R1002: {
460
+ why: "Returning a NavigationResult is deprecated.",
461
+ fix: "Replace `return new NavigationResult(to)` with `reroute(to)`, which throws internally to reroute.",
462
+ docs: "https://router.vuejs.org/data-loaders/navigation-aware.html#Controlling-the-navigation-with-reroute-"
463
+ },
464
+ VUE_ROUTER_R1003: {
465
+ why: (p) => `Loader "${p.key}"'s "commit()" was called but there is no staged data.`,
466
+ fix: "Ensure the loader resolved before calling `commit()`.",
467
+ docs: "https://router.vuejs.org/data-loaders/defining-loaders.html#Delaying-data-updates-with-commit"
468
+ },
469
+ VUE_ROUTER_R1004: {
470
+ why: (p) => "A loader returned a NavigationResult but is not registered on the route." + p.key,
471
+ fix: "Export the loader from the page component so it gets registered, e.g. `export const useUserData = defineLoader(...)`.",
472
+ docs: "https://router.vuejs.org/data-loaders/organization.html"
473
+ },
474
+ VUE_ROUTER_R1005: {
475
+ why: (p) => `Data loader "${p.key}" has itself as parent. This shouldn't be happening.`,
476
+ fix: "Report a bug with a minimal reproduction at https://github.com/vuejs/router/."
477
+ },
478
+ VUE_ROUTER_R1006: {
479
+ why: (p) => `A query was defined with the same key as the loader "[${p.key}]".\nSee https://pinia-colada.esm.dev/#TODO`,
480
+ fix: "If the key is meant to match, use the data loader directly; otherwise rename the `useQuery()` key so it no longer collides.",
481
+ docs: "https://router.vuejs.org/data-loaders/colada.html"
482
+ },
483
+ VUE_ROUTER_R1007: {
484
+ why: "Data Loader was setup twice.",
485
+ fix: "Register `DataLoaderPlugin` a single time via `app.use()`.",
486
+ docs: "https://router.vuejs.org/data-loaders.html#Installation"
487
+ },
488
+ VUE_ROUTER_R1008: {
489
+ why: "Data Loader is experimental and subject to breaking changes in the future.",
490
+ docs: "https://router.vuejs.org/data-loaders.html"
491
+ },
492
+ VUE_ROUTER_R1009: {
493
+ why: "Returning a NavigationResult from a loader is deprecated.",
494
+ fix: "Call `reroute(to)` inside the loader instead of returning `new NavigationResult(to)`; it throws internally to reroute.",
495
+ docs: "https://router.vuejs.org/data-loaders/navigation-aware.html#Controlling-the-navigation-with-reroute-"
496
+ }
497
+ }
498
+ });
499
+ /**
111
500
  * RouteRecord being rendered by the closest ancestor Router View. Used for
112
501
  * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View
113
502
  * Location Matched
@@ -180,10 +569,10 @@ var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(
180
569
  value: mod,
181
570
  enumerable: true
182
571
  }) : target, mod));
183
- var isBrowser = typeof navigator !== "undefined";
572
+ var isBrowser$1 = typeof navigator !== "undefined";
184
573
  var target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
185
574
  typeof target.chrome !== "undefined" && target.chrome.devtools;
186
- isBrowser && (target.self, target.top);
575
+ isBrowser$1 && (target.self, target.top);
187
576
  typeof navigator !== "undefined" && navigator.userAgent?.toLowerCase().includes("electron");
188
577
  typeof window !== "undefined" && window.__NUXT__;
189
578
  var import_rfdc = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin$1(((exports, module) => {
@@ -1084,7 +1473,7 @@ var RefStateEditor = class {
1084
1473
  new StateEditor();
1085
1474
  var TIMELINE_LAYERS_STATE_STORAGE_ID = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
1086
1475
  function getTimelineLayersStateFromStorage() {
1087
- if (typeof window === "undefined" || !isBrowser || typeof localStorage === "undefined" || localStorage === null) return {
1476
+ if (typeof window === "undefined" || !isBrowser$1 || typeof localStorage === "undefined" || localStorage === null) return {
1088
1477
  recordingState: false,
1089
1478
  mouseEventEnabled: false,
1090
1479
  keyboardEventEnabled: false,
@@ -3900,16 +4289,13 @@ target.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ ??= null;
3900
4289
  target.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ ??= null;
3901
4290
  target.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ ??= null;
3902
4291
  //#endregion
3903
- //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/devtools-DCoWQoU_.js
4292
+ //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/devtools-Bpr7ZAVB.js
3904
4293
  /*!
3905
- * vue-router v5.1.0
4294
+ * vue-router v5.2.0
3906
4295
  * (c) 2026 Eduardo San Martin Morote
3907
4296
  * @license MIT
3908
4297
  */
3909
- function warn$1(msg) {
3910
- const args = Array.from(arguments).slice(1);
3911
- console.warn.apply(console, ["[Vue Router warn]: " + msg].concat(args));
3912
- }
4298
+ var isBrowser = typeof document !== "undefined";
3913
4299
  /**
3914
4300
  * Encoding Rules (␣ = Space)
3915
4301
  * - Path: ␣ " < > # ? { }
@@ -4019,7 +4405,7 @@ function decode(text) {
4019
4405
  try {
4020
4406
  return decodeURIComponent("" + text);
4021
4407
  } catch {
4022
- warn$1(`Error decoding "${text}". Using original value`);
4408
+ diagnostics.VUE_ROUTER_R0080({ text: "" + text });
4023
4409
  }
4024
4410
  return "" + text;
4025
4411
  }
@@ -4127,7 +4513,10 @@ function isEquivalentArray(a, b) {
4127
4513
  function resolveRelativePath(to, from) {
4128
4514
  if (to.startsWith("/")) return to;
4129
4515
  if (!from.startsWith("/")) {
4130
- warn$1(`Cannot resolve a relative location without an absolute path. Trying to resolve "${to}" from "${from}". It should look like "/${from}".`);
4516
+ diagnostics.VUE_ROUTER_R0070({
4517
+ to,
4518
+ from
4519
+ });
4131
4520
  return to;
4132
4521
  }
4133
4522
  if (!to) return from;
@@ -4180,7 +4569,7 @@ var START_LOCATION_NORMALIZED = {
4180
4569
  * @param base - base to normalize
4181
4570
  */
4182
4571
  function normalizeBase(base) {
4183
- if (!base) if (isBrowser$1) {
4572
+ if (!base) if (isBrowser) {
4184
4573
  const baseEl = document.querySelector("base");
4185
4574
  base = baseEl && baseEl.getAttribute("href") || "/";
4186
4575
  base = base.replace(/^\w+:\/\/[^/]+/, "");
@@ -4235,17 +4624,17 @@ function scrollToPosition(position) {
4235
4624
  if (!isIdSelector || !document.getElementById(position.el.slice(1))) try {
4236
4625
  const foundEl = document.querySelector(position.el);
4237
4626
  if (isIdSelector && foundEl) {
4238
- warn$1(`The selector "${position.el}" should be passed as "el: document.querySelector('${position.el}')" because it starts with "#".`);
4627
+ diagnostics.VUE_ROUTER_R0040({ el: position.el });
4239
4628
  return;
4240
4629
  }
4241
4630
  } catch {
4242
- warn$1(`The selector "${position.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).`);
4631
+ diagnostics.VUE_ROUTER_R0041({ el: position.el });
4243
4632
  return;
4244
4633
  }
4245
4634
  }
4246
4635
  const el = typeof positionEl === "string" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;
4247
4636
  if (!el) {
4248
- warn$1(`Couldn't find element using selector "${position.el}" returned by scrollBehavior.`);
4637
+ diagnostics.VUE_ROUTER_R0042({ el: position.el });
4249
4638
  return;
4250
4639
  }
4251
4640
  scrollToOptions = getElementPosition(el, position);
@@ -4368,7 +4757,10 @@ function useCallbacks() {
4368
4757
  function registerGuard(activeRecordRef, name, guard) {
4369
4758
  const record = activeRecordRef.value;
4370
4759
  if (!record) {
4371
- warn$1(`No active route record was found when calling \`${name === "updateGuards" ? "onBeforeRouteUpdate" : "onBeforeRouteLeave"}()\`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?`);
4760
+ {
4761
+ const fnName = name === "updateGuards" ? "onBeforeRouteUpdate" : "onBeforeRouteLeave";
4762
+ diagnostics.VUE_ROUTER_R0020({ fn: fnName });
4763
+ }
4372
4764
  return;
4373
4765
  }
4374
4766
  let currentRecord = record;
@@ -4379,7 +4771,7 @@ function registerGuard(activeRecordRef, name, guard) {
4379
4771
  onDeactivated(removeFromList);
4380
4772
  onActivated(() => {
4381
4773
  const newRecord = activeRecordRef.value;
4382
- if (!newRecord) warn$1("No active route record was found when reactivating component with navigation guard. This is likely a bug in vue-router. Please report it.");
4774
+ if (!newRecord) diagnostics.VUE_ROUTER_R0021();
4383
4775
  if (newRecord) currentRecord = newRecord;
4384
4776
  currentRecord[name].add(guard);
4385
4777
  });
@@ -4394,7 +4786,7 @@ function registerGuard(activeRecordRef, name, guard) {
4394
4786
  */
4395
4787
  function onBeforeRouteLeave(leaveGuard) {
4396
4788
  if (!getCurrentInstance()) {
4397
- warn$1("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");
4789
+ diagnostics.VUE_ROUTER_R0022({ fn: "onBeforeRouteLeave" });
4398
4790
  return;
4399
4791
  }
4400
4792
  registerGuard(inject(matchedRouteKey, {}), "leaveGuards", leaveGuard);
@@ -4408,7 +4800,7 @@ function onBeforeRouteLeave(leaveGuard) {
4408
4800
  */
4409
4801
  function onBeforeRouteUpdate(updateGuard) {
4410
4802
  if (!getCurrentInstance()) {
4411
- warn$1("getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function");
4803
+ diagnostics.VUE_ROUTER_R0022({ fn: "onBeforeRouteUpdate" });
4412
4804
  return;
4413
4805
  }
4414
4806
  registerGuard(inject(matchedRouteKey, {}), "updateGuards", updateGuard);
@@ -4435,17 +4827,20 @@ function guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) =
4435
4827
  let guardCall = Promise.resolve(guardReturn);
4436
4828
  if (guard.length < 3) guardCall = guardCall.then(next);
4437
4829
  if (guard.length > 2) {
4438
- const message = `The "next" callback was never called inside of ${guard.name ? "\"" + guard.name + "\"" : ""}:\n${guard.toString()}\n. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
4830
+ const guardInfo = {
4831
+ name: guard.name,
4832
+ guard: guard.toString()
4833
+ };
4439
4834
  if (typeof guardReturn === "object" && "then" in guardReturn) guardCall = guardCall.then((resolvedValue) => {
4440
4835
  if (!next._called) {
4441
- warn$1(message);
4836
+ diagnostics.VUE_ROUTER_R0023(guardInfo);
4442
4837
  return Promise.reject(/* @__PURE__ */ new Error("Invalid navigation guard"));
4443
4838
  }
4444
4839
  return resolvedValue;
4445
4840
  });
4446
4841
  else if (guardReturn !== void 0) {
4447
4842
  if (!next._called) {
4448
- warn$1(message);
4843
+ diagnostics.VUE_ROUTER_R0023(guardInfo);
4449
4844
  reject(/* @__PURE__ */ new Error("Invalid navigation guard"));
4450
4845
  return;
4451
4846
  }
@@ -4466,7 +4861,7 @@ function withDeprecationWarning(next) {
4466
4861
  return function() {
4467
4862
  if (!warned) {
4468
4863
  warned = true;
4469
- warn$1("The `next()` callback in navigation guards is deprecated. Return the value instead of calling `next(value)`.");
4864
+ diagnostics.VUE_ROUTER_R0025();
4470
4865
  }
4471
4866
  return next.apply(this, arguments);
4472
4867
  };
@@ -4474,7 +4869,10 @@ function withDeprecationWarning(next) {
4474
4869
  function canOnlyBeCalledOnce(next, to, from) {
4475
4870
  let called = 0;
4476
4871
  return function() {
4477
- if (called++ === 1) warn$1(`The "next" callback was called more than once in one navigation guard when going from "${from.fullPath}" to "${to.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`);
4872
+ if (called++ === 1) diagnostics.VUE_ROUTER_R0024({
4873
+ from: from.fullPath,
4874
+ to: to.fullPath
4875
+ });
4478
4876
  next._called = true;
4479
4877
  if (called === 1) next.apply(null, arguments);
4480
4878
  };
@@ -4482,19 +4880,29 @@ function canOnlyBeCalledOnce(next, to, from) {
4482
4880
  function extractComponentsGuards(matched, guardType, to, from, runWithContext = (fn) => fn()) {
4483
4881
  const guards = [];
4484
4882
  for (const record of matched) {
4485
- if (!record.components && record.children && !record.children.length) warn$1(`Record with path "${record.path}" is either missing a "component(s)" or "children" property.`);
4883
+ if (!record.components && record.children && !record.children.length) diagnostics.VUE_ROUTER_R0026({ path: record.path });
4486
4884
  for (const name in record.components) {
4487
4885
  let rawComponent = record.components[name];
4488
4886
  if (!rawComponent || typeof rawComponent !== "object" && typeof rawComponent !== "function") {
4489
- warn$1(`Component "${name}" in record with path "${record.path}" is not a valid component. Received "${String(rawComponent)}".`);
4887
+ diagnostics.VUE_ROUTER_R0027({
4888
+ name,
4889
+ path: record.path,
4890
+ received: String(rawComponent)
4891
+ });
4490
4892
  throw new Error("Invalid route component");
4491
4893
  } else if ("then" in rawComponent) {
4492
- warn$1(`Component "${name}" in record with path "${record.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.`);
4894
+ diagnostics.VUE_ROUTER_R0028({
4895
+ name,
4896
+ path: record.path
4897
+ });
4493
4898
  const promise = rawComponent;
4494
4899
  rawComponent = () => promise;
4495
4900
  } else if (rawComponent.__asyncLoader && !rawComponent.__warnedDefineAsync) {
4496
4901
  rawComponent.__warnedDefineAsync = true;
4497
- warn$1(`Component "${name}" in record with path "${record.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`);
4902
+ diagnostics.VUE_ROUTER_R0029({
4903
+ name,
4904
+ path: record.path
4905
+ });
4498
4906
  }
4499
4907
  if (guardType !== "beforeRouteEnter" && !record.instances[name]) continue;
4500
4908
  if (isRouteComponent(rawComponent)) {
@@ -4503,7 +4911,10 @@ function extractComponentsGuards(matched, guardType, to, from, runWithContext =
4503
4911
  } else {
4504
4912
  let componentPromise = rawComponent();
4505
4913
  if (!("catch" in componentPromise)) {
4506
- warn$1(`Component "${name}" in record with path "${record.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.`);
4914
+ diagnostics.VUE_ROUTER_R0030({
4915
+ name,
4916
+ path: record.path
4917
+ });
4507
4918
  componentPromise = Promise.resolve(componentPromise);
4508
4919
  }
4509
4920
  guards.push(() => componentPromise.then((resolved) => {
@@ -4908,7 +5319,7 @@ function omit(obj, keys) {
4908
5319
  //#endregion
4909
5320
  //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/vue-router.js
4910
5321
  /*!
4911
- * vue-router v5.1.0
5322
+ * vue-router v5.2.0
4912
5323
  * (c) 2026 Eduardo San Martin Morote
4913
5324
  * @license MIT
4914
5325
  */
@@ -5031,7 +5442,7 @@ function useHistoryStateNavigation(base) {
5031
5442
  history[replace ? "replaceState" : "pushState"](state, "", url);
5032
5443
  historyState.value = state;
5033
5444
  } catch (err) {
5034
- warn$1("Error with push/replace State", err);
5445
+ diagnostics.VUE_ROUTER_R0120({ cause: err });
5035
5446
  location[replace ? "replace" : "assign"](url);
5036
5447
  }
5037
5448
  }
@@ -5044,7 +5455,7 @@ function useHistoryStateNavigation(base) {
5044
5455
  forward: to,
5045
5456
  scroll: computeScrollPosition()
5046
5457
  });
5047
- if (!history.state) warn$1("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:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state");
5458
+ if (!history.state) diagnostics.VUE_ROUTER_R0121();
5048
5459
  changeLocation(currentState.current, currentState, true);
5049
5460
  changeLocation(to, assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data), false);
5050
5461
  currentLocation.value = to;
@@ -5112,7 +5523,10 @@ function createWebHistory(base) {
5112
5523
  function createWebHashHistory(base) {
5113
5524
  base = location.host ? base || location.pathname + location.search : "";
5114
5525
  if (!base.includes("#")) base += "#";
5115
- if (!base.endsWith("#/") && !base.endsWith("#")) warn$1(`A hash base must end with a "#":\n"${base}" should be "${base.replace(/#.*$/, "#")}".`);
5526
+ if (!base.endsWith("#/") && !base.endsWith("#")) diagnostics.VUE_ROUTER_R0110({
5527
+ base,
5528
+ suggestion: base.replace(/#.*$/, "#")
5529
+ });
5116
5530
  return createWebHistory(base);
5117
5531
  }
5118
5532
  /**
@@ -5447,7 +5861,10 @@ function createRouteRecordMatcher(record, parent, options) {
5447
5861
  {
5448
5862
  const existingKeys = /* @__PURE__ */ new Set();
5449
5863
  for (const key of parser.keys) {
5450
- if (existingKeys.has(key.name)) warn$1(`Found duplicated params with name "${key.name}" for path "${record.path}". Only the last one will be available on "$route.params".`);
5864
+ if (existingKeys.has(key.name)) diagnostics.VUE_ROUTER_R0090({
5865
+ name: key.name,
5866
+ path: record.path
5867
+ });
5451
5868
  existingKeys.add(key.name);
5452
5869
  }
5453
5870
  }
@@ -5564,7 +5981,10 @@ function createRouterMatcher(routes, globalOptions) {
5564
5981
  const invalidParams = Object.keys(location.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));
5565
5982
  if (invalidParams.length) {
5566
5983
  const isInherited = !matcher.keys.length && invalidParams.some((name) => name in currentLocation.params);
5567
- warn$1(`Discarded invalid param(s) "${invalidParams.join("\", \"")}" when navigating.` + (isInherited ? ` If you are using a catch-all route with a named redirect, pass an empty \`params\` object: \`redirect: { name: '...', params: {} }\`.` : "") + ` See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
5984
+ diagnostics.VUE_ROUTER_R0100({
5985
+ params: invalidParams.join("\", \""),
5986
+ inherited: isInherited ? ` If you are using a catch-all route with a named redirect, pass an empty \`params\` object: \`redirect: { name: '...', params: {} }\`.` : ""
5987
+ });
5568
5988
  }
5569
5989
  }
5570
5990
  name = matcher.record.name;
@@ -5572,7 +5992,7 @@ function createRouterMatcher(routes, globalOptions) {
5572
5992
  path = matcher.stringify(params);
5573
5993
  } else if (location.path != null) {
5574
5994
  path = location.path;
5575
- if (!path.startsWith("/")) warn$1(`The Matcher cannot resolve relative paths but received "${path}". Unless you directly called \`matcher.resolve("${path}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);
5995
+ if (!path.startsWith("/")) diagnostics.VUE_ROUTER_R0101({ path });
5576
5996
  matcher = matchers.find((m) => m.re.test(path));
5577
5997
  if (matcher) {
5578
5998
  params = matcher.parse(path);
@@ -5696,8 +6116,22 @@ function isSameParam(a, b) {
5696
6116
  * @param b - alias record
5697
6117
  */
5698
6118
  function checkSameParams(a, b) {
5699
- for (const key of a.keys) if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`);
5700
- for (const key of b.keys) if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`);
6119
+ for (const key of a.keys) if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) {
6120
+ diagnostics.VUE_ROUTER_R0102({
6121
+ alias: b.record.path,
6122
+ original: a.record.path,
6123
+ name: key.name
6124
+ });
6125
+ return;
6126
+ }
6127
+ for (const key of b.keys) if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) {
6128
+ diagnostics.VUE_ROUTER_R0102({
6129
+ alias: b.record.path,
6130
+ original: a.record.path,
6131
+ name: key.name
6132
+ });
6133
+ return;
6134
+ }
5701
6135
  }
5702
6136
  /**
5703
6137
  * A route with a name and a child with an empty path without a name should warn when adding the route
@@ -5706,13 +6140,20 @@ function checkSameParams(a, b) {
5706
6140
  * @param parent - RouteRecordMatcher
5707
6141
  */
5708
6142
  function checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {
5709
- if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path && mainNormalizedRecord.children.length === 0) warn$1(`The route named "${String(parent.record.name)}" has a child without a name, an empty path, and no children. This is probably a mistake: 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 silence the warning.`);
6143
+ if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path && mainNormalizedRecord.children.length === 0) diagnostics.VUE_ROUTER_R0103({ name: String(parent.record.name) });
5710
6144
  }
5711
6145
  function checkSameNameAsAncestor(record, parent) {
5712
6146
  for (let ancestor = parent; ancestor; ancestor = ancestor.parent) if (ancestor.record.name === record.name) throw new Error(`A route named "${String(record.name)}" has been added as a ${parent === ancestor ? "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.`);
5713
6147
  }
5714
6148
  function checkMissingParamsInAbsolutePath(record, parent) {
5715
- for (const key of parent.keys) if (!record.keys.find(isSameParam.bind(null, key))) return warn$1(`Absolute path "${record.record.path}" must have the exact same param named "${key.name}" as its parent "${parent.record.path}".`);
6149
+ for (const key of parent.keys) if (!record.keys.find(isSameParam.bind(null, key))) {
6150
+ diagnostics.VUE_ROUTER_R0104({
6151
+ path: record.record.path,
6152
+ name: key.name,
6153
+ parent: parent.record.path
6154
+ });
6155
+ return;
6156
+ }
5716
6157
  }
5717
6158
  /**
5718
6159
  * Performs a binary search to find the correct insertion index for a new matcher.
@@ -5734,7 +6175,10 @@ function findInsertionIndex(matcher, matchers) {
5734
6175
  const insertionAncestor = getInsertionAncestor(matcher);
5735
6176
  if (insertionAncestor) {
5736
6177
  upper = matchers.lastIndexOf(insertionAncestor, upper - 1);
5737
- if (upper < 0) warn$1(`Finding ancestor route "${insertionAncestor.record.path}" failed for "${matcher.record.path}"`);
6178
+ if (upper < 0) diagnostics.VUE_ROUTER_R0105({
6179
+ ancestor: insertionAncestor.record.path,
6180
+ record: matcher.record.path
6181
+ });
5738
6182
  }
5739
6183
  return upper;
5740
6184
  }
@@ -5765,8 +6209,7 @@ function useLink(props) {
5765
6209
  const route = computed(() => {
5766
6210
  const to = unref(props.to);
5767
6211
  if (!hasPrevious || to !== previousTo) {
5768
- if (!isRouteLocation(to)) if (hasPrevious) warn$1(`Invalid value for prop "to" in useLink()\n- to:`, to, `\n- previous to:`, previousTo, `\n- props:`, props);
5769
- else warn$1(`Invalid value for prop "to" in useLink()\n- to:`, to, `\n- props:`, props);
6212
+ if (!isRouteLocation(to)) diagnostics.VUE_ROUTER_R0050({ to });
5770
6213
  previousTo = to;
5771
6214
  hasPrevious = true;
5772
6215
  }
@@ -5793,7 +6236,7 @@ function useLink(props) {
5793
6236
  }
5794
6237
  return Promise.resolve();
5795
6238
  }
5796
- if (isBrowser$1) {
6239
+ if (isBrowser) {
5797
6240
  const instance = getCurrentInstance();
5798
6241
  if (instance) {
5799
6242
  const linkContextDevtools = {
@@ -5901,7 +6344,7 @@ function getOriginalPath(record) {
5901
6344
  * @param defaultClass
5902
6345
  */
5903
6346
  var getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;
5904
- var RouterViewImpl = /* @__PURE__ */ defineComponent({
6347
+ var RouterViewImpl = /*#__PURE__*/ defineComponent({
5905
6348
  name: "RouterView",
5906
6349
  inheritAttrs: false,
5907
6350
  props: {
@@ -5961,7 +6404,7 @@ var RouterViewImpl = /* @__PURE__ */ defineComponent({
5961
6404
  onVnodeUnmounted,
5962
6405
  ref: viewRef
5963
6406
  }));
5964
- if (isBrowser$1 && component.ref) {
6407
+ if (isBrowser && component.ref) {
5965
6408
  const info = {
5966
6409
  depth: depth.value,
5967
6410
  name: matchedRoute.name,
@@ -5994,7 +6437,7 @@ function warnDeprecatedUsage() {
5994
6437
  const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;
5995
6438
  if (parentName && (parentName === "KeepAlive" || parentName.includes("Transition")) && typeof parentSubTreeType === "object" && parentSubTreeType.name === "RouterView") {
5996
6439
  const comp = parentName === "KeepAlive" ? "keep-alive" : "transition";
5997
- warn$1(`<router-view> can no longer be used directly inside <${comp}>.\nUse slot props instead:\n\n<router-view v-slot="{ Component }">\n <${comp}>\n <component :is="Component" />\n </${comp}>\n</router-view>`);
6440
+ diagnostics.VUE_ROUTER_R0060({ comp });
5998
6441
  }
5999
6442
  }
6000
6443
  /**
@@ -6013,7 +6456,7 @@ function createRouter(options) {
6013
6456
  const afterGuards = useCallbacks();
6014
6457
  const currentRoute = shallowRef(START_LOCATION_NORMALIZED);
6015
6458
  let pendingLocation = START_LOCATION_NORMALIZED;
6016
- if (isBrowser$1 && options.scrollBehavior && "scrollRestoration" in history) history.scrollRestoration = "manual";
6459
+ if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) history.scrollRestoration = "manual";
6017
6460
  const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue);
6018
6461
  const encodeParams = applyToParams.bind(null, encodeParam);
6019
6462
  const decodeParams = applyToParams.bind(null, decode);
@@ -6022,7 +6465,7 @@ function createRouter(options) {
6022
6465
  let record;
6023
6466
  if (isRouteName(parentOrRoute)) {
6024
6467
  parent = matcher.getRecordMatcher(parentOrRoute);
6025
- if (!parent) warn$1(`Parent route "${String(parentOrRoute)}" not found when adding child route`, route);
6468
+ if (!parent) diagnostics.VUE_ROUTER_R0001({ name: String(parentOrRoute) });
6026
6469
  record = route;
6027
6470
  } else record = parentOrRoute;
6028
6471
  return matcher.addRoute(record, parent);
@@ -6030,7 +6473,7 @@ function createRouter(options) {
6030
6473
  function removeRoute(name) {
6031
6474
  const recordMatcher = matcher.getRecordMatcher(name);
6032
6475
  if (recordMatcher) matcher.removeRoute(recordMatcher);
6033
- else warn$1(`Cannot remove non-existent route "${String(name)}"`);
6476
+ else diagnostics.VUE_ROUTER_R0002({ name: String(name) });
6034
6477
  }
6035
6478
  function getRoutes() {
6036
6479
  return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);
@@ -6044,8 +6487,11 @@ function createRouter(options) {
6044
6487
  const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);
6045
6488
  const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);
6046
6489
  const href = routerHistory.createHref(locationNormalized.fullPath);
6047
- if (href.startsWith("//")) warn$1(`Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`);
6048
- else if (!matchedRoute.matched.length) warn$1(`No match found for location with path "${rawLocation}"`);
6490
+ if (href.startsWith("//")) diagnostics.VUE_ROUTER_R0003({
6491
+ location: rawLocation,
6492
+ href
6493
+ });
6494
+ else if (!matchedRoute.matched.length) diagnostics.VUE_ROUTER_R0004({ path: rawLocation });
6049
6495
  return assign(locationNormalized, matchedRoute, {
6050
6496
  params: decodeParams(matchedRoute.params),
6051
6497
  redirectedFrom: void 0,
@@ -6053,12 +6499,12 @@ function createRouter(options) {
6053
6499
  });
6054
6500
  }
6055
6501
  if (!isRouteLocation(rawLocation)) {
6056
- warn$1(`router.resolve() was passed an invalid location. This will fail in production.\n- Location:`, rawLocation);
6502
+ diagnostics.VUE_ROUTER_R0005({ rawLocation });
6057
6503
  return resolve({});
6058
6504
  }
6059
6505
  let matcherLocation;
6060
6506
  if (rawLocation.path != null) {
6061
- if ("params" in rawLocation && !("name" in rawLocation) && Object.keys(rawLocation.params).length) warn$1(`Path "${rawLocation.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`);
6507
+ if ("params" in rawLocation && !("name" in rawLocation) && Object.keys(rawLocation.params).length) diagnostics.VUE_ROUTER_R0006({ path: rawLocation.path });
6062
6508
  matcherLocation = assign({}, rawLocation, { path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path });
6063
6509
  } else {
6064
6510
  const targetParams = assign({}, rawLocation.params);
@@ -6068,15 +6514,18 @@ function createRouter(options) {
6068
6514
  }
6069
6515
  const matchedRoute = matcher.resolve(matcherLocation, currentLocation);
6070
6516
  const hash = rawLocation.hash || "";
6071
- if (hash && !hash.startsWith("#")) warn$1(`A \`hash\` should always start with the character "#". Replace "${hash}" with "#${hash}".`);
6517
+ if (hash && !hash.startsWith("#")) diagnostics.VUE_ROUTER_R0007({ hash });
6072
6518
  matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));
6073
6519
  const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {
6074
6520
  hash: encodeHash(hash),
6075
6521
  path: matchedRoute.path
6076
6522
  }));
6077
6523
  const href = routerHistory.createHref(fullPath);
6078
- if (href.startsWith("//")) warn$1(`Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`);
6079
- else if (!matchedRoute.matched.length) warn$1(`No match found for location with path "${rawLocation.path != null ? rawLocation.path : rawLocation}"`);
6524
+ if (href.startsWith("//")) diagnostics.VUE_ROUTER_R0003({
6525
+ location: rawLocation,
6526
+ href
6527
+ });
6528
+ else if (!matchedRoute.matched.length) diagnostics.VUE_ROUTER_R0004({ path: rawLocation.path != null ? rawLocation.path : rawLocation });
6080
6529
  return assign({
6081
6530
  fullPath,
6082
6531
  hash,
@@ -6111,7 +6560,10 @@ function createRouter(options) {
6111
6560
  newTargetLocation.params = {};
6112
6561
  }
6113
6562
  if (newTargetLocation.path == null && !("name" in newTargetLocation)) {
6114
- warn$1(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to "${to.fullPath}". A redirect must contain a name or path. This will break in production.`);
6563
+ diagnostics.VUE_ROUTER_R0008({
6564
+ target: JSON.stringify(newTargetLocation, null, 2),
6565
+ to: to.fullPath
6566
+ });
6115
6567
  throw new Error("Invalid redirect");
6116
6568
  }
6117
6569
  return assign({
@@ -6147,7 +6599,10 @@ function createRouter(options) {
6147
6599
  if (failure) {
6148
6600
  if (isNavigationFailure(failure, 2)) {
6149
6601
  if (isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) {
6150
- warn$1(`Detected a possibly infinite redirection in a navigation guard when going from "${from.fullPath}" to "${toLocation.fullPath}". Aborting to avoid a Stack Overflow.\n 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.`);
6602
+ diagnostics.VUE_ROUTER_R0009({
6603
+ from: from.fullPath,
6604
+ to: toLocation.fullPath
6605
+ });
6151
6606
  return Promise.reject(/* @__PURE__ */ new Error("Infinite redirect in navigation guard"));
6152
6607
  }
6153
6608
  return pushWithRedirect(assign({ replace }, locationAsObject(failure.to), {
@@ -6224,7 +6679,7 @@ function createRouter(options) {
6224
6679
  const error = checkCanceledNavigation(toLocation, from);
6225
6680
  if (error) return error;
6226
6681
  const isFirstNavigation = from === START_LOCATION_NORMALIZED;
6227
- const state = !isBrowser$1 ? {} : history.state;
6682
+ const state = !isBrowser ? {} : history.state;
6228
6683
  if (isPush) if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));
6229
6684
  else routerHistory.push(toLocation.fullPath, data);
6230
6685
  currentRoute.value = toLocation;
@@ -6247,7 +6702,7 @@ function createRouter(options) {
6247
6702
  }
6248
6703
  pendingLocation = toLocation;
6249
6704
  const from = currentRoute.value;
6250
- if (isBrowser$1) saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());
6705
+ if (isBrowser) saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());
6251
6706
  navigate(toLocation, from).catch((error) => {
6252
6707
  if (isNavigationFailure(error, 12)) return error;
6253
6708
  if (isNavigationFailure(error, 2)) {
@@ -6284,7 +6739,7 @@ function createRouter(options) {
6284
6739
  const list = errorListeners.list();
6285
6740
  if (list.length) list.forEach((handler) => handler(error, to, from));
6286
6741
  else {
6287
- warn$1("uncaught error during route navigation:");
6742
+ diagnostics.VUE_ROUTER_R0010();
6288
6743
  console.error(error);
6289
6744
  }
6290
6745
  return Promise.reject(error);
@@ -6306,9 +6761,9 @@ function createRouter(options) {
6306
6761
  }
6307
6762
  function handleScroll(to, from, isPush, isFirstNavigation) {
6308
6763
  const { scrollBehavior } = options;
6309
- if (!isBrowser$1 || !scrollBehavior) return Promise.resolve();
6764
+ if (!isBrowser || !scrollBehavior) return Promise.resolve();
6310
6765
  const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;
6311
- return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));
6766
+ return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => to === currentRoute.value && position && scrollToPosition(position)).catch((err) => to === currentRoute.value && triggerError(err, to, from));
6312
6767
  }
6313
6768
  const go = (delta) => routerHistory.go(delta);
6314
6769
  let started;
@@ -6341,10 +6796,10 @@ function createRouter(options) {
6341
6796
  enumerable: true,
6342
6797
  get: () => unref(currentRoute)
6343
6798
  });
6344
- if (isBrowser$1 && !started && currentRoute.value === START_LOCATION_NORMALIZED) {
6799
+ if (isBrowser && !started && currentRoute.value === START_LOCATION_NORMALIZED) {
6345
6800
  started = true;
6346
6801
  push(routerHistory.location).catch((err) => {
6347
- warn$1("Unexpected error when starting the router:", err);
6802
+ diagnostics.VUE_ROUTER_R0011({ cause: err });
6348
6803
  });
6349
6804
  }
6350
6805
  const reactiveRoute = {};
@@ -6369,7 +6824,7 @@ function createRouter(options) {
6369
6824
  }
6370
6825
  unmountApp();
6371
6826
  };
6372
- if (isBrowser$1 && true) addDevtools(app, router, matcher);
6827
+ if (isBrowser && true) addDevtools(app, router, matcher);
6373
6828
  }
6374
6829
  };
6375
6830
  function runGuardQueue(guards) {