@real-router/core 0.61.13 → 0.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/Router-Bm2qafJA.d.ts.map +1 -1
  2. package/dist/cjs/Router-D42q21nP.js +2 -0
  3. package/dist/cjs/Router-D42q21nP.js.map +1 -0
  4. package/dist/cjs/{index-DpvNcunp.d.ts → RouterError-BEqOMMFO.d.ts} +2 -19
  5. package/dist/cjs/RouterError-BEqOMMFO.d.ts.map +1 -0
  6. package/dist/cjs/api.js +1 -1
  7. package/dist/cjs/api.js.map +1 -1
  8. package/dist/cjs/{cloneRouter-C-rwSGFE.js → cloneRouter-X1HyZDAt.js} +2 -2
  9. package/dist/cjs/cloneRouter-X1HyZDAt.js.map +1 -0
  10. package/dist/cjs/index.d.ts +2 -2
  11. package/dist/cjs/index.d.ts.map +1 -1
  12. package/dist/cjs/index.js +1 -1
  13. package/dist/cjs/internals-DJjgSePy.js.map +1 -1
  14. package/dist/cjs/utils.js +1 -1
  15. package/dist/cjs/validation.d.ts +6 -1
  16. package/dist/cjs/validation.d.ts.map +1 -1
  17. package/dist/esm/Router-BWTSpdfc.mjs +2 -0
  18. package/dist/esm/Router-BWTSpdfc.mjs.map +1 -0
  19. package/dist/esm/Router-Bm2qafJA.d.mts.map +1 -1
  20. package/dist/esm/{index-DpvNcunp.d.mts → RouterError-BEqOMMFO.d.mts} +2 -19
  21. package/dist/esm/RouterError-BEqOMMFO.d.mts.map +1 -0
  22. package/dist/esm/api.mjs +1 -1
  23. package/dist/esm/api.mjs.map +1 -1
  24. package/dist/esm/cloneRouter-CyTzPPi6.mjs +2 -0
  25. package/dist/esm/cloneRouter-CyTzPPi6.mjs.map +1 -0
  26. package/dist/esm/index.d.mts +2 -2
  27. package/dist/esm/index.d.mts.map +1 -1
  28. package/dist/esm/index.mjs +1 -1
  29. package/dist/esm/index.mjs.map +1 -1
  30. package/dist/esm/internals-C8mRvTxc.mjs.map +1 -1
  31. package/dist/esm/utils.mjs +1 -1
  32. package/dist/esm/validation.d.mts +6 -1
  33. package/dist/esm/validation.d.mts.map +1 -1
  34. package/package.json +3 -3
  35. package/dist/cjs/Router-DIJ9xkus.js +0 -2
  36. package/dist/cjs/Router-DIJ9xkus.js.map +0 -1
  37. package/dist/cjs/cloneRouter-C-rwSGFE.js.map +0 -1
  38. package/dist/cjs/index-DpvNcunp.d.ts.map +0 -1
  39. package/dist/esm/Router-otXXM4MC.mjs +0 -2
  40. package/dist/esm/Router-otXXM4MC.mjs.map +0 -1
  41. package/dist/esm/cloneRouter-D41XizU9.mjs +0 -2
  42. package/dist/esm/cloneRouter-D41XizU9.mjs.map +0 -1
  43. package/dist/esm/index-DpvNcunp.d.mts.map +0 -1
@@ -1,2 +0,0 @@
1
- import{S as e,n as t,p as n,t as r,v as i}from"./Router-otXXM4MC.mjs";import{r as a}from"./internals-C8mRvTxc.mjs";function o(n){if(n())throw new t(e.ROUTER_DISPOSED)}const s=new WeakMap;function c(n){let r=s.get(n);if(r)return r;let i=a(n),c={makeState:(e,t,n,r)=>(i.validator?.state.validateMakeStateArgs(e,t,n),i.makeState(e,t,n,r?.params)),buildState:(e,t)=>{i.validator?.routes.validateStateBuilderArgs(e,t,`buildState`);let{name:n,params:r}=i.forwardState(e,t);return i.buildStateResolved(n,r)},forwardState:(e,t)=>(i.validator?.routes.validateStateBuilderArgs(e,t,`forwardState`),i.forwardState(e,t)),matchPath:e=>(i.validator?.routes.validateMatchPathArgs(e),i.matchPath(e,i.getOptions())),navigateToState:(e,t)=>(o(i.isDisposed),i.validator?.navigation.validateNavigateToStateArgs(e),t!==void 0&&i.validator?.navigation.validateNavigationOptions(t,`navigateToState`),i.navigateToState(e,t)),setRootPath:e=>{o(i.isDisposed),i.validator?.routes.validateSetRootPathArgs(e),i.setRootPath(e)},getRootPath:i.getRootPath,addEventListener:(e,t)=>(o(i.isDisposed),i.validator?.eventBus.validateListenerArgs(e,t),i.addEventListener(e,t)),buildNavigationState:(e,t={})=>{i.validator?.routes.validateStateBuilderArgs(e,t,`buildNavigationState`);let{name:n,params:r}=i.forwardState(e,t),a=i.buildStateResolved(n,r);if(a)return i.makeState(a.name,a.params,i.buildPath(a.name,a.params),a.meta)},getOptions:i.getOptions,getTree:i.getTree,addInterceptor:(e,t)=>{o(i.isDisposed),i.validator?.plugins.validateAddInterceptorArgs(e,t);let n=i.interceptors.get(e);return n||(n=[],i.interceptors.set(e,n)),n.push(t),()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}},getRouteConfig:e=>{let t=i.routeGetStore();if(t.matcher.hasRoute(e))return t.routeCustomFields[e]},extendRouter:r=>{o(i.isDisposed);let a=Object.keys(r);for(let r of a)if(r in n)throw new t(e.PLUGIN_CONFLICT,{message:`Cannot extend router: property "${r}" already exists`});for(let e of a)n[e]=r[e];let s={keys:a};i.routerExtensions.push(s);let c=!1;return()=>{if(c)return;c=!0;for(let e of s.keys)delete n[e];let e=i.routerExtensions.indexOf(s);e!==-1&&i.routerExtensions.splice(e,1)}},emitTransitionError:e=>{o(i.isDisposed),i.emitTransitionError(e)},claimContextNamespace:n=>{if(o(i.isDisposed),i.contextClaimRecords.has(n))throw new t(e.CONTEXT_NAMESPACE_ALREADY_CLAIMED,{message:`Cannot claim context namespace: "${n}" is already claimed by another plugin`});return i.contextClaimRecords.add(n),{write(e,t){e.context[n]=t},release(){i.contextClaimRecords.delete(n)}}}};return s.set(n,c),c}function l(e){let t=a(e),n=t.routeGetStore().lifecycleNamespace;return{addActivateGuard(e,r){o(t.isDisposed),t.validator?.routes.validateRouteName(e,`addActivateGuard`),t.validator?.lifecycle.validateHandler(r,`addActivateGuard`),n.addCanActivate(e,r)},addDeactivateGuard(e,r){o(t.isDisposed),t.validator?.routes.validateRouteName(e,`addDeactivateGuard`),t.validator?.lifecycle.validateHandler(r,`addDeactivateGuard`),n.addCanDeactivate(e,r)},removeActivateGuard(e){o(t.isDisposed),t.validator?.routes.validateRouteName(e,`removeActivateGuard`),n.clearCanActivate(e)},removeDeactivateGuard(e){o(t.isDisposed),t.validator?.routes.validateRouteName(e,`removeDeactivateGuard`),n.clearCanDeactivate(e)}}}function u(o,s){let c=a(o);if(c.isDisposed())throw new t(e.ROUTER_DISPOSED);c.validator?.dependencies.validateCloneArgs(s);let u=c.routeGetStore(),d=i(u.tree),f=u.config,p=u.resolvedForwardMap,m=u.routeCustomFields,{options:h,dependencies:g,pluginFactories:_}=c.getCloneState(),{definition:v,external:y}=u.lifecycleNamespace.getFactoriesByOrigin(),b=new r(d,h,{...g,...s}),x=a(b).routeGetStore(),S=x.lifecycleNamespace,[C,w]=v,[T,E]=y;for(let[e,t]of Object.entries(C))S.addCanDeactivate(e,t,!0);for(let[e,t]of Object.entries(w))S.addCanActivate(e,t,!0);let D=l(b);for(let[e,t]of Object.entries(T))D.addDeactivateGuard(e,t);for(let[e,t]of Object.entries(E))D.addActivateGuard(e,t);return _.length>0&&b.usePlugin(..._),n(x.config,f),Object.assign(x.resolvedForwardMap,p),Object.assign(x.routeCustomFields,m),b}export{o as i,l as n,c as r,u as t};
2
- //# sourceMappingURL=cloneRouter-D41XizU9.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloneRouter-D41XizU9.mjs","names":["routeTreeToDefinitions","RouterClass"],"sources":["../../src/api/helpers.ts","../../src/api/getPluginApi.ts","../../src/api/getLifecycleApi.ts","../../src/api/cloneRouter.ts"],"sourcesContent":["// packages/core/src/api/helpers.ts\n\nimport { errorCodes } from \"../constants\";\nimport { RouterError } from \"../RouterError\";\n\nexport function throwIfDisposed(isDisposed: () => boolean): void {\n if (isDisposed()) {\n throw new RouterError(errorCodes.ROUTER_DISPOSED);\n }\n}\n","import { throwIfDisposed } from \"./helpers\";\nimport { errorCodes } from \"../constants\";\nimport { getInternals } from \"../internals\";\nimport { RouterError } from \"../RouterError\";\n\nimport type { PluginApi } from \"./types\";\nimport type {\n ContextNamespaceClaim,\n DefaultDependencies,\n Params,\n Router,\n State,\n} from \"@real-router/types\";\n\n// Cache the assembled PluginApi per router — mirrors getNavigator() (#525):\n// avoids re-allocating the closure-bag on each call (plugins call this once\n// at init, but tests + nested plugins poll it), and gives spy/stub helpers\n// a stable object identity to attach to (e.g. spying on\n// `getPluginApi(router).navigateToState` to inject errors in popstate\n// recovery tests).\nconst cache = new WeakMap<object, PluginApi>();\n\nexport function getPluginApi<\n Dependencies extends DefaultDependencies = DefaultDependencies,\n>(router: Router<Dependencies>): PluginApi {\n const cached = cache.get(router);\n\n if (cached) {\n return cached;\n }\n\n const ctx = getInternals(router);\n const api: PluginApi = {\n makeState: (name, params, path, meta) => {\n ctx.validator?.state.validateMakeStateArgs(name, params, path);\n\n return ctx.makeState(\n name,\n params,\n path,\n meta?.params as\n | Record<string, Record<string, \"url\" | \"query\">>\n | undefined,\n );\n },\n buildState: (routeName, routeParams) => {\n ctx.validator?.routes.validateStateBuilderArgs(\n routeName,\n routeParams,\n \"buildState\",\n );\n\n const { name, params } = ctx.forwardState(routeName, routeParams);\n\n return ctx.buildStateResolved(name, params);\n },\n forwardState: <P extends Params = Params>(\n routeName: string,\n routeParams: P,\n ) => {\n ctx.validator?.routes.validateStateBuilderArgs(\n routeName,\n routeParams,\n \"forwardState\",\n );\n\n return ctx.forwardState(routeName, routeParams);\n },\n matchPath: (path) => {\n ctx.validator?.routes.validateMatchPathArgs(path);\n\n return ctx.matchPath(path, ctx.getOptions());\n },\n navigateToState: (state, options) => {\n throwIfDisposed(ctx.isDisposed);\n\n ctx.validator?.navigation.validateNavigateToStateArgs(state);\n\n if (options !== undefined) {\n ctx.validator?.navigation.validateNavigationOptions(\n options,\n \"navigateToState\",\n );\n }\n\n return ctx.navigateToState(state, options);\n },\n setRootPath: (rootPath) => {\n throwIfDisposed(ctx.isDisposed);\n\n ctx.validator?.routes.validateSetRootPathArgs(rootPath);\n\n ctx.setRootPath(rootPath);\n },\n getRootPath: ctx.getRootPath,\n addEventListener: (eventName, cb) => {\n throwIfDisposed(ctx.isDisposed);\n\n ctx.validator?.eventBus.validateListenerArgs(eventName, cb);\n\n return ctx.addEventListener(eventName, cb);\n },\n buildNavigationState: (name, params = {}) => {\n ctx.validator?.routes.validateStateBuilderArgs(\n name,\n params,\n \"buildNavigationState\",\n );\n\n const { name: resolvedName, params: resolvedParams } = ctx.forwardState(\n name,\n params,\n );\n const routeInfo = ctx.buildStateResolved(resolvedName, resolvedParams);\n\n if (!routeInfo) {\n return;\n }\n\n return ctx.makeState(\n routeInfo.name,\n routeInfo.params,\n ctx.buildPath(routeInfo.name, routeInfo.params),\n routeInfo.meta,\n );\n },\n getOptions: ctx.getOptions,\n getTree: ctx.getTree,\n addInterceptor: (method, fn) => {\n throwIfDisposed(ctx.isDisposed);\n ctx.validator?.plugins.validateAddInterceptorArgs(method, fn);\n let list = ctx.interceptors.get(method);\n\n if (!list) {\n list = [];\n ctx.interceptors.set(method, list);\n }\n\n list.push(fn);\n\n return () => {\n const index = list.indexOf(fn);\n\n if (index !== -1) {\n list.splice(index, 1);\n }\n };\n },\n getRouteConfig: (name) => {\n const store = ctx.routeGetStore();\n\n // Stryker disable next-line ConditionalExpression,BlockStatement: equivalent — a missing route yields routeCustomFields[name] === undefined, identical to this early return\n if (!store.matcher.hasRoute(name)) {\n return;\n }\n\n return store.routeCustomFields[name];\n },\n extendRouter: (extensions: Record<string, unknown>) => {\n throwIfDisposed(ctx.isDisposed);\n\n const keys = Object.keys(extensions);\n\n for (const key of keys) {\n if (key in router) {\n throw new RouterError(errorCodes.PLUGIN_CONFLICT, {\n message: `Cannot extend router: property \"${key}\" already exists`,\n });\n }\n }\n\n for (const key of keys) {\n (router as Record<string, unknown>)[key] = extensions[key];\n }\n\n const extensionRecord = { keys };\n\n ctx.routerExtensions.push(extensionRecord);\n\n let removed = false;\n\n return () => {\n if (removed) {\n return;\n }\n\n removed = true;\n\n for (const key of extensionRecord.keys) {\n delete (router as Record<string, unknown>)[key];\n }\n\n const idx = ctx.routerExtensions.indexOf(extensionRecord);\n\n // Stryker disable next-line ConditionalExpression,EqualityOperator,UnaryOperator,BlockStatement: equivalent — this splice only tidies the `routerExtensions` TRACKING array; the router INSTANCE is cleaned by the `delete router[key]` loop above, and dispose()'s safety-net re-deletes any leaked key harmlessly. So no mutation of this guard/splice is behaviourally observable (full suite green with `===`, `+1`, and an empty body). Contrast the addInterceptor splice, which IS observable through buildPath and is killed behaviourally by invariantGuardMutants.test.ts.\n if (idx !== -1) {\n ctx.routerExtensions.splice(idx, 1);\n }\n };\n },\n emitTransitionError: (error) => {\n throwIfDisposed(ctx.isDisposed);\n ctx.emitTransitionError(error);\n },\n claimContextNamespace: (namespace: string) => {\n throwIfDisposed(ctx.isDisposed);\n\n if (ctx.contextClaimRecords.has(namespace)) {\n throw new RouterError(errorCodes.CONTEXT_NAMESPACE_ALREADY_CLAIMED, {\n message: `Cannot claim context namespace: \"${namespace}\" is already claimed by another plugin`,\n });\n }\n\n ctx.contextClaimRecords.add(namespace);\n\n return {\n write(state: State, value: unknown) {\n state.context[namespace] = value;\n },\n release() {\n ctx.contextClaimRecords.delete(namespace);\n },\n } satisfies ContextNamespaceClaim;\n },\n };\n\n cache.set(router, api);\n\n return api;\n}\n","import { throwIfDisposed } from \"./helpers\";\nimport { getInternals } from \"../internals\";\n\nimport type { LifecycleApi } from \"./types\";\nimport type { DefaultDependencies, Router } from \"@real-router/types\";\n\nexport function getLifecycleApi<\n Dependencies extends DefaultDependencies = DefaultDependencies,\n>(router: Router<Dependencies>): LifecycleApi<Dependencies> {\n const ctx = getInternals(router);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- guaranteed set after wiring\n const lifecycleNamespace = ctx.routeGetStore().lifecycleNamespace!;\n\n return {\n addActivateGuard(name, handler) {\n throwIfDisposed(ctx.isDisposed);\n\n ctx.validator?.routes.validateRouteName(name, \"addActivateGuard\");\n ctx.validator?.lifecycle.validateHandler(handler, \"addActivateGuard\");\n\n // Handler-limit enforcement lives at the namespace registration choke point\n // (RouteLifecycleNamespace.#registerHandler) so all paths are bounded\n // uniformly — see #961.\n lifecycleNamespace.addCanActivate(name, handler);\n },\n\n addDeactivateGuard(name, handler) {\n throwIfDisposed(ctx.isDisposed);\n\n ctx.validator?.routes.validateRouteName(name, \"addDeactivateGuard\");\n ctx.validator?.lifecycle.validateHandler(handler, \"addDeactivateGuard\");\n\n lifecycleNamespace.addCanDeactivate(name, handler);\n },\n\n removeActivateGuard(name) {\n throwIfDisposed(ctx.isDisposed);\n\n ctx.validator?.routes.validateRouteName(name, \"removeActivateGuard\");\n\n lifecycleNamespace.clearCanActivate(name);\n },\n\n removeDeactivateGuard(name) {\n throwIfDisposed(ctx.isDisposed);\n\n ctx.validator?.routes.validateRouteName(name, \"removeDeactivateGuard\");\n\n lifecycleNamespace.clearCanDeactivate(name);\n },\n };\n}\n","import { routeTreeToDefinitions } from \"route-tree\";\n\nimport { errorCodes } from \"../constants\";\nimport { getInternals } from \"../internals\";\nimport { assignConfigEntries } from \"../namespaces/RoutesNamespace/helpers\";\nimport { Router as RouterClass } from \"../Router\";\nimport { RouterError } from \"../RouterError\";\nimport { getLifecycleApi } from \"./getLifecycleApi\";\n\nimport type { Route } from \"../types\";\nimport type { DefaultDependencies, Router } from \"@real-router/types\";\n\n/**\n * Build an independent router instance that shares the route tree, options,\n * lifecycle guards, and plugin factories of `router`. The primary use case\n * is **SSR multi-tenancy** — one base router per process, one clone per\n * request.\n *\n * @param router - Source router (must not be disposed).\n * @param dependencies - Optional per-clone overrides merged on top of the\n * base router's dependencies. Always **fresh per call** in the documented\n * SSR pattern: pass per-request state here, never store it in the base.\n *\n * @remarks\n *\n * **Dependency merge — shallow by design.** `base.dependencies` are spread\n * into the clone via `{ ...sourceDeps, ...dependencies }`. Top-level keys\n * are new objects, but **values are shared by reference**: a `Map`, `Set`,\n * class instance, function, or nested plain object stored in\n * `base.dependencies` is the **same instance** in every clone. Mutations\n * in one clone are visible in the base and in every sibling clone.\n *\n * This is intentional. `structuredClone` of dep values is **not** applied\n * because it would:\n * - strip class prototypes (`new DbClient()` → plain object, methods lost)\n * - reject functions and symbols (`DataCloneError`)\n * - fragment singleton pools (one connection pool per request — pool\n * semantics destroyed)\n * - reject circular references\n *\n * **SSR rule of thumb.** Place values in `base.dependencies` according to\n * their lifecycle:\n *\n * - **Singletons / shared services** → `base.dependencies`. Examples: DB\n * client, connection pool, logger, config, feature-flag client. Process-\n * wide pooling depends on sharing these by reference.\n * - **Per-request state** → the `dependencies` override parameter (or\n * `createRequestScope`'s `deps` argument). Examples: `currentUser`,\n * `traceId`, `sessionId`, `abortSignal`. The override is applied last,\n * so it wins over base keys; pass a fresh object per call.\n *\n * Cross-request data leaks are **only possible** when per-request mutable\n * state is incorrectly placed in `base.dependencies`. The override slot is\n * the safe channel.\n *\n * @example\n * ```typescript\n * // Server boot — singletons only\n * const base = createRouter(routes, options, {\n * db: new DbClient(dbUrl),\n * logger,\n * });\n *\n * // Per request — fresh override per call\n * const clone = cloneRouter(base, {\n * currentUser,\n * traceId,\n * });\n * // clone.deps.db === base.deps.db ✓ shared pool (intentional)\n * // clone.deps.currentUser ✓ unique per request\n * ```\n *\n * @see createRequestScope — `@real-router/core/utils` SSR helper that\n * wraps this function and injects `abortSignal` automatically.\n */\nexport function cloneRouter<\n Dependencies extends DefaultDependencies = DefaultDependencies,\n>(\n router: Router<Dependencies>,\n dependencies?: Dependencies,\n): RouterClass<Dependencies> {\n const ctx = getInternals(router);\n\n if (ctx.isDisposed()) {\n throw new RouterError(errorCodes.ROUTER_DISPOSED);\n }\n\n ctx.validator?.dependencies.validateCloneArgs(dependencies);\n\n // Get source store directly\n const sourceStore = ctx.routeGetStore();\n const routes = routeTreeToDefinitions(sourceStore.tree);\n const routeConfig = sourceStore.config;\n const resolvedForwardMap = sourceStore.resolvedForwardMap;\n const routeCustomFields = sourceStore.routeCustomFields;\n\n const {\n options,\n dependencies: sourceDeps,\n pluginFactories,\n } = ctx.getCloneState();\n // Origin-aware factory snapshot — definition guards are re-registered with\n // `isFromDefinition=true` on the clone so `replace()` can still strip them\n // via `clearDefinitionGuards()`. External guards take the public lifecycle\n // API path so they survive `replace()` symmetric with the base.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- guaranteed set after wiring\n const sourceLifecycleNamespace = sourceStore.lifecycleNamespace!;\n const { definition: definitionFactories, external: externalFactories } =\n sourceLifecycleNamespace.getFactoriesByOrigin();\n\n const mergedDeps = {\n ...sourceDeps,\n ...dependencies,\n } as Dependencies;\n\n const newRouter = new RouterClass<Dependencies>(\n routes as Route<Dependencies>[],\n options,\n mergedDeps,\n );\n\n const newCtx = getInternals(newRouter);\n const newStore = newCtx.routeGetStore();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- guaranteed set after wiring\n const newLifecycleNamespace = newStore.lifecycleNamespace!;\n\n const [definitionDeactivate, definitionActivate] = definitionFactories;\n const [externalDeactivate, externalActivate] = externalFactories;\n\n for (const [name, handler] of Object.entries(definitionDeactivate)) {\n newLifecycleNamespace.addCanDeactivate(name, handler, true);\n }\n\n for (const [name, handler] of Object.entries(definitionActivate)) {\n newLifecycleNamespace.addCanActivate(name, handler, true);\n }\n\n const lifecycle = getLifecycleApi(newRouter);\n\n for (const [name, handler] of Object.entries(externalDeactivate)) {\n lifecycle.addDeactivateGuard(name, handler);\n }\n\n for (const [name, handler] of Object.entries(externalActivate)) {\n lifecycle.addActivateGuard(name, handler);\n }\n\n // Stryker disable next-line EqualityOperator: equivalent — `>= 0` is always true, but `usePlugin(...[])` with an empty spread is a no-op, so entering the block on an empty list behaves identically to skipping it. (ConditionalExpression stays live: `→false` skips a real plugin list and is killable.)\n if (pluginFactories.length > 0) {\n newRouter.usePlugin(...pluginFactories);\n }\n\n // Copy the source config + store-level maps onto the new store. The five\n // RouteConfig sub-maps go through a single enumeration so a newly added config\n // field is carried over automatically (#965); resolvedForwardMap and\n // routeCustomFields are store-level (not part of RouteConfig) and stay explicit.\n assignConfigEntries(newStore.config, routeConfig);\n Object.assign(newStore.resolvedForward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,EAAS,kBAAmB,CAAiB,EAEpD,CACT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DpvNcunp.d.mts","names":["maxListeners","warnListeners","maxEventDepth","limits","EventEmitterLimits","onListenerError","eventName","error","onListenerWarn","count","Error","constructor","message","TEventMap","Record","private","EventEmitterOptions","options","validateCallback","cb","Function","setLimits","on","E","args","Unsubscribe","off","emit","arg1","arg2","arg3","arg4","clearAll","listenerCount"],"sources":["../../src/types/RouterValidator.ts","../../src/RouterError.ts","../../../event-emitter/dist/esm/index.d.mts"],"mappings":";;AAUA;;;;;;;;UAAiB,eAAA;EAOb;;;EAHF,MAAA;IACE,qBAAA,GAAwB,KAAA;IACxB,qBAAA,GAAwB,IAAA;IACxB,yBAAA,GACE,IAAA,WACA,MAAA,WACA,MAAA,WACA,QAAA;IAEF,4BAAA,GAA+B,IAAA;IAC/B,wBAAA,GACE,IAAA,WACA,MAAA,WACA,MAAA;IAEF,oBAAA,GAAuB,MAAA;IACvB,cAAA,GAAiB,MAAA,aAAmB,IAAA;IACpC,uBAAA,GAA0B,IAAA;IAC1B,4BAAA,GAA+B,IAAA,WAAe,OAAA;IAC9C,gCAAA,GAAmC,IAAA,UAAc,OAAA;IACjD,mBAAA,GACE,IAAA,UACA,OAAA,WACA,IAAA;IAEF,oBAAA,GAAuB,MAAA,WAAiB,IAAA;IACxC,iBAAA,GAAoB,IAAA,WAAe,MAAA;IACnC,oBAAA,GAAuB,IAAA,WAAe,MAAA;IACtC,2BAAA,GAA8B,MAAA,aAAmB,MAAA;IAEjD,sBAAA,GAAyB,KAAA;IACzB,4BAAA,GAA+B,KAAA;IAC/B,uBAAA,GAA0B,QAAA;IAC1B,mBAAA,GAAsB,KAAA;IACtB,qBAAA,GAAwB,KAAA;EAAA;EAbtB;;;EAmBJ,OAAA;IACE,kBAAA,GAAqB,IAAA,UAAc,KAAA;IACnC,cAAA,GAAiB,MAAA;IACjB,eAAA,GAAkB,OAAA,WAAkB,UAAA;IACpC,4BAAA,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