diff --git a/app/src/app.ts b/app/src/app.ts index fcb36f8..052034f 100644 --- a/app/src/app.ts +++ b/app/src/app.ts @@ -7,20 +7,11 @@ import { SignalInspector } from './pages/signal-inspector'; import { DiInspector } from './pages/di-inspector'; import { StoreInspector } from './pages/store-inspector'; import { FormsInspector } from './pages/forms-inspector'; +import { PipesInspector } from './pages/pipes-inspector'; +import type { Tab, Tabs } from './types/tab.types'; import { AnalogInspector } from './pages/analog-inspector'; import { NetworkInspector } from './pages/network-inspector'; -type Tab = - | 'dashboard' - | 'components' - | 'routes' - | 'signals' - | 'injectors' - | 'store' - | 'forms' - | 'network' - | 'analog'; - @Component({ selector: 'app-root', imports: [ @@ -31,6 +22,7 @@ type Tab = DiInspector, StoreInspector, FormsInspector, + PipesInspector, AnalogInspector, NetworkInspector, ], @@ -101,6 +93,9 @@ type Tab = (focusHandled)="formFocus.set(null)" /> } + @case ('pipes') { + + } @case ('analog') { } @@ -187,16 +182,17 @@ type Tab = }) export class App implements OnInit, OnDestroy { readonly analog = signal(false); - private readonly allTabs = [ - { id: 'dashboard' as Tab, label: 'Dashboard' }, - { id: 'analog' as Tab, label: 'Analog' }, - { id: 'components' as Tab, label: 'Components' }, - { id: 'routes' as Tab, label: 'Routes' }, - { id: 'signals' as Tab, label: 'Signals' }, - { id: 'injectors' as Tab, label: 'Injectors' }, - { id: 'store' as Tab, label: 'Store' }, - { id: 'forms' as Tab, label: 'Forms' }, - { id: 'network' as Tab, label: 'SSR & HTTP' }, + private readonly allTabs: Tabs[] = [ + { id: 'dashboard', label: 'Dashboard' }, + { id: 'analog', label: 'Analog' }, + { id: 'components', label: 'Components' }, + { id: 'routes', label: 'Routes' }, + { id: 'signals', label: 'Signals' }, + { id: 'injectors', label: 'Injectors' }, + { id: 'store', label: 'Store' }, + { id: 'forms', label: 'Forms' }, + { id: 'pipes', label: 'Pipes' }, + { id: 'network', label: 'SSR & HTTP' }, ]; readonly tabs = computed(() => this.allTabs.filter((t) => t.id !== 'analog' || this.analog())); diff --git a/app/src/pages/component-tree.ts b/app/src/pages/component-tree.ts index 47eac77..f1e478e 100644 --- a/app/src/pages/component-tree.ts +++ b/app/src/pages/component-tree.ts @@ -8,7 +8,6 @@ import { output, signal, } from '@angular/core'; -import { JsonPipe } from '@angular/common'; import type { DevframeRpcClient } from 'devframe/client'; interface ComponentInfo { @@ -38,7 +37,6 @@ interface ProviderEntry { @Component({ selector: 'app-component-tree', - imports: [JsonPipe], template: `
{{ storeCount() }}

store entries

+
+

Pipes

+

{{ pipeCount() }}

+

template transformers

+
`, styles: ` @@ -102,7 +108,7 @@ import type { DevframeRpcClient } from 'devframe/client'; }) export class Dashboard { rpc = input(null); - navigate = output(); + navigate = output(); meta = signal(null); componentCount = signal(0); @@ -110,6 +116,7 @@ export class Dashboard { signalCount = signal(0); providerCount = signal(0); storeCount = signal(0); + pipeCount = signal(0); constructor() { effect(() => { @@ -141,6 +148,10 @@ export class Dashboard { .call('get-ngrx-store') .then((s: any[]) => this.storeCount.set(s.length)) .catch(() => {}); + my.rpc + .call('get-pipes') + .then((s: any[]) => this.pipeCount.set(s.length)) + .catch(() => {}); }); } } diff --git a/app/src/pages/di-inspector.ts b/app/src/pages/di-inspector.ts index bf69494..078cea3 100644 --- a/app/src/pages/di-inspector.ts +++ b/app/src/pages/di-inspector.ts @@ -1,3 +1,4 @@ +import { NgTemplateOutlet } from '@angular/common'; import { Component, input, signal, effect, computed } from '@angular/core'; import type { DevframeRpcClient } from 'devframe/client'; @@ -30,6 +31,7 @@ const TYPE_COLORS: Record = { @Component({ selector: 'app-di-inspector', + imports: [NgTemplateOutlet], template: `
+ + + +
+ @if (instrumenting()) { +

+ Recording live call counts, instance counts and last input/output. This patches pipe + prototypes in the inspected page, so turn it off when you're done. +

+ } + + @if (loading()) { +

Scanning pipes…

+ } @else if (filtered().length === 0) { +

No pipes found.

+ } @else { +
    + @for (p of filtered(); track p.file + p.name) { +
  • + + @if (isSelected(p)) { +
    +
    +
    Class
    +
    {{ p.className }}
    +
    Source
    +
    {{ p.builtin ? '@angular/common' : 'This project' }}
    + @if (!p.builtin) { +
    File
    +
    {{ p.file }}:{{ p.line }}
    + } +
    Standalone
    +
    {{ p.isStandalone ? 'Yes' : 'No' }}
    +
    Pure
    +
    {{ p.isPure ? 'Yes' : 'No' }}
    + @if (p.builtin && p.usages?.length) { +
    Used in ({{ p.usageCount }})
    +
    +
      + @for (u of p.usages; track u.file + ':' + u.line) { +
    • {{ u.file }}:{{ u.line }}
    • + } +
    +
    + } +
    + @if (liveFor(p.name); as live) { +
    +
    Live
    + @if (live.stale) { +

    + experimental + Fed an argument that changed contents without changing reference — this pure + pipe may be showing a stale value. +

    + } +
    +
    Instances
    +
    {{ live.instanceCount }}
    +
    Used by
    +
    +
      + @for (c of live.components; track c.name) { +
    • {{ c.name }} ({{ c.count }})
    • + } +
    +
    + @if (live.call; as call) { +
    Calls
    +
    {{ call.callCount }}
    +
    Last input
    +
    {{ describe(call.lastArgs) }}
    +
    Last output
    +
    {{ describe(call.lastResult) }}
    + @if (call.instances?.length) { +
    Per instance
    +
    +
      + @for (i of call.instances; track $index) { +
    • + {{ describe(i.lastArgs) }} → {{ describe(i.lastResult) }} ({{ + i.callCount + }}) +
    • + } +
    +
    + } + @if (call.lastCaller) { +
    Last caller
    +
    {{ call.lastCaller }}
    + } + } @else if (instrumenting()) { +
    Calls
    +
    None recorded yet.
    + } +
    +
    + } @else if (instrumenting()) { +

    Not seen on the page yet.

    + } +
    + } +
  • + } +
+ } + + @if (async().length > 0) { +
+

Async pipes ({{ async().length }})

+
    + @for (a of async(); track $index) { +
  • +
    + {{ a.component }} + @if (!a.hasSource) { + no source + } + @if (a.duplicate) { + duplicate subscription + } +
    +
    {{ a.latestValue ?? '(none yet)' }}
    +
  • + } +
+
+ } + +
+

Lint

+ @if (lintFailed()) { + + } @else if (lint() === null) { +

Checking…

+ } @else if (!lint()!.length) { +

No problems found.

+ } @else { +
    + @for (f of lint(); track $index) { +
  • + {{ f.severity }} + {{ f.rule }} + on {{ f.pipe }} at {{ f.file }}:{{ f.line }} +
    {{ f.message }}
    +
    Fix: {{ f.fix }}
    +
  • + } +
+ } +
+ `, + styles: ` + .toolbar { + display: flex; + gap: 8px; + margin-bottom: 16px; + } + input { + flex: 1; + padding: 8px 12px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 6px; + color: #e4e4e7; + font-size: 14px; + outline: none; + } + input:focus { + border-color: var(--accent); + } + button { + padding: 8px 16px; + background: #3f3f46; + border: none; + border-radius: 6px; + color: #e4e4e7; + cursor: pointer; + font-size: 13px; + } + button:hover { + background: #52525b; + } + button.instrument.on { + background: #7c2d12; + color: #fdba74; + } + .muted { + color: #71717a; + font-size: 14px; + } + .instrument-hint { + margin: -8px 0 16px; + } + .live-section { + padding: 12px 16px 4px; + border-top: 1px solid #27272a; + } + .live-heading { + font-size: 11px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + color: #71717a; + margin-bottom: 8px; + } + .live-hint { + padding: 0 16px 12px; + margin: 0; + } + .stale-warning { + display: flex; + align-items: baseline; + gap: 8px; + font-size: 12px; + color: #fdba74; + background: #431407; + border-radius: 6px; + padding: 8px 10px; + margin: 0 0 12px; + } + .mono { + font-family: monospace; + font-size: 12px; + word-break: break-all; + } + .pipe-list { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + gap: 8px; + } + .pipe-item { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 0; + transition: border-color 0.15s; + } + .pipe-item:has(.pipe-toggle:hover) { + border-color: var(--accent); + } + .pipe-item.expanded { + border-color: var(--accent); + } + .pipe-toggle { + display: block; + width: 100%; + padding: 12px 16px; + background: none; + border: none; + color: inherit; + text-align: left; + cursor: pointer; + font: inherit; + } + .name-row { + display: flex; + align-items: center; + gap: 8px; + } + .name { + font-family: monospace; + font-size: 15px; + color: var(--accent); + font-weight: 600; + } + .badge { + font-size: 11px; + padding: 2px 8px; + border-radius: 4px; + background: #14532d; + color: #4ade80; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + } + .badge.impure { + background: #7c2d12; + color: #fdba74; + } + .badge.module { + background: #3f3f46; + color: #a1a1aa; + } + .badge.builtin { + background: #1e3a8a; + color: #93c5fd; + } + .file { + font-size: 12px; + color: #71717a; + margin-top: 2px; + } + .usage-count { + margin-left: 6px; + color: #52525b; + } + .usage-list { + list-style: none; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + gap: 2px; + } + .inline-detail { + padding: 0 16px 12px; + border-top: 1px solid #27272a; + margin-top: 0; + padding-top: 12px; + } + dl { + display: grid; + grid-template-columns: auto 1fr; + gap: 4px 12px; + font-size: 13px; + } + dt { + color: #71717a; + } + dd { + color: #e4e4e7; + } + .async-panel { + margin-top: 20px; + } + .async-heading { + font-size: 13px; + font-weight: 600; + color: #a1a1aa; + margin: 0 0 8px; + } + .async-list { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + gap: 8px; + } + .async-item { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 10px 16px; + } + .async-row { + display: flex; + align-items: center; + gap: 8px; + } + .component { + font-family: monospace; + font-size: 13px; + color: var(--accent); + } + .async-value { + margin-top: 4px; + color: #a1a1aa; + } + .lint-panel { + margin-top: 20px; + } + .findings { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + gap: 8px; + font-size: 13px; + } + .finding { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 10px 16px; + } + .finding-rule { + color: #c4b5fd; + } + .finding-meta, + .finding-message, + .finding-fix { + display: block; + margin-top: 0.5rem; + } + .tag { + display: inline-block; + margin: 0 4px 2px 0; + padding: 0 5px; + border: 1px solid #3f3f46; + border-radius: 4px; + color: #d4d4d8; + font-size: 11px; + } + .tag[data-tone='warn'] { + border-color: #a16207; + color: #fef08a; + } + .tag[data-tone='bad'] { + border-color: #b91c1c; + color: #fca5a5; + } + `, +}) +export class PipesInspector { + private readonly destroyRef = inject(DestroyRef); + + rpc = input(null); + + pipes = signal([]); + filter = signal(''); + loading = signal(false); + selected = signal(null); + + filtered = signal([]); + + live = signal([]); + async = signal([]); + lint = signal(null); + lintFailed = signal(false); + instrumentedPages = signal([]); + instrumenting = signal(false); + + private unsubscribe?: () => void; + + constructor() { + effect(() => { + const q = this.filter().toLowerCase(); + const all = this.pipes(); + this.filtered.set( + q + ? all.filter( + (p) => + p.name.toLowerCase().includes(q) || + p.className.toLowerCase().includes(q) || + p.file.toLowerCase().includes(q), + ) + : all, + ); + }); + + effect(() => { + const client = this.rpc(); + if (client) { + this.refresh(); + this.loadLive(client); + } + }); + + this.destroyRef.onDestroy(() => this.unsubscribe?.()); + } + + async refresh() { + const client = this.rpc(); + if (!client) return; + this.loading.set(true); + try { + const my = client.scope('ng-devtools'); + const pipes = (await my.rpc.call('get-pipes')) as PipeInfo[]; + this.pipes.set(pipes); + const sel = this.selected(); + if (sel) { + const refreshed = pipes.find((p) => p.name === sel.name && p.file === sel.file); + this.selected.set(refreshed ?? null); + } + } catch { + // RPC not available + } finally { + this.loading.set(false); + } + this.loadLint(client); + } + + async loadLint(client: DevframeRpcClient) { + this.lintFailed.set(false); + try { + const findings = (await client + .scope('ng-devtools') + .rpc.call('pipe-lint')) as PipeLintFinding[]; + this.lint.set(findings); + } catch { + this.lintFailed.set(true); + } + } + + async loadLive(client: DevframeRpcClient) { + try { + const state = await client.scope('ng-devtools').rpc.sharedState('pipe-usage'); + if (this.destroyRef.destroyed) return; + const apply = (value: unknown) => { + const snapshot = value as PipesSnapshot | undefined; + this.live.set(snapshot?.pipes ?? []); + this.async.set(snapshot?.async ?? []); + const pages = snapshot?.instrumented ?? []; + this.instrumentedPages.set(pages); + this.instrumenting.set(pages.length > 0); + }; + apply(state.value()); + this.unsubscribe?.(); + this.unsubscribe = state.on('updated', apply); + } catch { + // RPC not available + } + } + + async toggleInstrument() { + const client = this.rpc(); + if (!client) return; + const on = !this.instrumenting(); + this.instrumenting.set(on); + try { + await client.scope('ng-devtools').rpc.call('request-instrument-pipes', on); + } catch { + this.instrumenting.set(!on); + } + } + + liveFor(name: string): LivePipeInfo | undefined { + return this.live().find((p) => p.name === name); + } + + describe(value: unknown): string { + if (Array.isArray(value)) return value.map((v) => this.describe(v)).join(', '); + if (typeof value === 'string') return value.length > 80 ? `${value.slice(0, 80)}…` : value; + try { + const json = JSON.stringify(value); + return json && json.length > 120 ? `${json.slice(0, 120)}…` : (json ?? String(value)); + } catch { + return String(value); + } + } + + isSelected(pipe: PipeInfo): boolean { + const sel = this.selected(); + return sel !== null && sel.name === pipe.name && sel.file === pipe.file; + } + + select(pipe: PipeInfo) { + this.selected.set(this.isSelected(pipe) ? null : pipe); + } +} diff --git a/app/src/types/tab.types.ts b/app/src/types/tab.types.ts new file mode 100644 index 0000000..78e4f24 --- /dev/null +++ b/app/src/types/tab.types.ts @@ -0,0 +1,16 @@ +export type Tab = + | 'dashboard' + | 'components' + | 'pipes' + | 'routes' + | 'signals' + | 'injectors' + | 'store' + | 'forms' + | 'network' + | 'analog'; + +export type Tabs = { + id: Tab; + label: string; +}; diff --git a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-44OHts1W.js b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-D1NJaqR8.js similarity index 93% rename from extension/ui/assets/browser-agent-rpc-BXhoSh1z-44OHts1W.js rename to extension/ui/assets/browser-agent-rpc-BXhoSh1z-D1NJaqR8.js index 58a0a9b..bef4bf6 100644 --- a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-44OHts1W.js +++ b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-D1NJaqR8.js @@ -1 +1 @@ -import{t as e}from"./index-rRLFaB2o.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-TNlU-6c2.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-rRLFaB2o.js b/extension/ui/assets/index-TNlU-6c2.js similarity index 56% rename from extension/ui/assets/index-rRLFaB2o.js rename to extension/ui/assets/index-TNlU-6c2.js index bdacfd8..d963590 100644 --- a/extension/ui/assets/index-rRLFaB2o.js +++ b/extension/ui/assets/index-TNlU-6c2.js @@ -3,9 +3,9 @@ \r \v ᠎ - \u2028\u2029   `;`${Zt}`,`${Zt}`;var Qt=(function(e){return e[e.Character=0]=`Character`,e[e.Identifier=1]=`Identifier`,e[e.PrivateIdentifier=2]=`PrivateIdentifier`,e[e.Keyword=3]=`Keyword`,e[e.String=4]=`String`,e[e.Operator=5]=`Operator`,e[e.Number=6]=`Number`,e[e.RegExpBody=7]=`RegExpBody`,e[e.RegExpFlags=8]=`RegExpFlags`,e[e.Error=9]=`Error`,e})(Qt||{}),$t=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})($t||{});Qt.Character,E.StyleMap,E.ClassMap,E.StyleProp,E.ClassProp,E.Attribute,E.Property,E.Attribute,E.Control,E.DomProperty,E.DomProperty,E.Attribute,E.StyleMap,E.ClassMap,E.StyleProp,E.ClassProp,E.Listener,E.TwoWayListener,E.AnimationListener,E.StyleMap,E.ClassMap,E.StyleProp,E.ClassProp,E.Property,E.TwoWayProperty,E.DomProperty,E.Attribute,E.Animation,E.Control,Kt.Idle,T.deferOnIdle,T.deferPrefetchOnIdle,T.deferHydrateOnIdle,Kt.Immediate,T.deferOnImmediate,T.deferPrefetchOnImmediate,T.deferHydrateOnImmediate,Kt.Timer,T.deferOnTimer,T.deferPrefetchOnTimer,T.deferHydrateOnTimer,Kt.Hover,T.deferOnHover,T.deferPrefetchOnHover,T.deferHydrateOnHover,Kt.Interaction,T.deferOnInteraction,T.deferPrefetchOnInteraction,T.deferHydrateOnInteraction,Kt.Viewport,T.deferOnViewport,T.deferPrefetchOnViewport,T.deferHydrateOnViewport,Kt.Never,T.deferHydrateNever,T.deferHydrateNever,T.deferHydrateNever,T.pipeBind1,T.pipeBind2,T.pipeBind3,T.pipeBind4,T.textInterpolate,T.textInterpolate1,T.textInterpolate2,T.textInterpolate3,T.textInterpolate4,T.textInterpolate5,T.textInterpolate6,T.textInterpolate7,T.textInterpolate8,T.textInterpolateV,T.interpolate,T.interpolate1,T.interpolate2,T.interpolate3,T.interpolate4,T.interpolate5,T.interpolate6,T.interpolate7,T.interpolate8,T.interpolateV,T.pureFunction0,T.pureFunction1,T.pureFunction2,T.pureFunction3,T.pureFunction4,T.pureFunction5,T.pureFunction6,T.pureFunction7,T.pureFunction8,T.pureFunctionV,T.resolveWindow,T.resolveDocument,T.resolveBody,$e.HTML,T.sanitizeHtml,$e.RESOURCE_URL,T.sanitizeResourceUrl,$e.SCRIPT,T.sanitizeScript,$e.STYLE,T.sanitizeStyle,$e.URL,T.sanitizeUrl,$e.ATTRIBUTE_NO_BINDING,T.validateAttribute,$e.HTML,T.trustConstantHtml,$e.RESOURCE_URL,T.trustConstantResourceUrl;var en=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(en||{});D.Tmpl,D.Tmpl,D.Both,D.Host,D.Tmpl,D.Tmpl,D.Tmpl,D.Both,D.Both,D.Both,D.Tmpl,D.Both,D.Both,D.Tmpl,D.Both,D.Tmpl,D.Both,D.Both,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Both,D.Both,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Both,D.Both,D.Both,D.Tmpl,D.Tmpl,D.Both,D.Tmpl,D.Tmpl,D.Tmpl,D.Both,D.Both,D.Tmpl,D.Both,D.Both,D.Both,D.Both,D.Both,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Both,D.Tmpl,D.Both,D.Tmpl,D.Both,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Tmpl,D.Both,D.Both,D.Both,At.Property,Vt.Property,At.TwoWay,Vt.TwoWayProperty,At.Attribute,Vt.Attribute,At.Class,Vt.ClassName,At.Style,Vt.StyleProperty,At.LegacyAnimation,Vt.LegacyAnimation,At.Animation,Vt.Animation;var tn=`%COMP%`;`${tn}`,`${tn}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof kt?t.visit(n):t.receiver.visit(n)}visitUnary(e){return e.expr.visit(this)}visitBinary(e){return e.left.visit(this)||e.right.visit(this)}visitChain(){return!1}visitConditional(e){return e.condition.visit(this)||e.trueExp.visit(this)||e.falseExp.visit(this)}visitCall(){return!0}visitSafeCall(){return!1}visitImplicitReceiver(){return!1}visitThisReceiver(){return!1}visitInterpolation(e){return e.expressions.some(e=>e.visit(this))}visitKeyedRead(){return!1}visitLiteralArray(){return!0}visitLiteralMap(){return!0}visitLiteralPrimitive(){return!1}visitPipe(){return!0}visitPrefixNot(e){return e.expression.visit(this)}visitTypeofExpression(e){return e.expression.visit(this)}visitVoidExpression(e){return e.expression.visit(this)}visitNonNullAssert(e){return e.expression.visit(this)}visitPropertyRead(){return!1}visitSafePropertyRead(){return!1}visitSafeKeyedRead(){return!1}visitTemplateLiteral(){return!1}visitTemplateLiteralElement(){return!1}visitTaggedTemplateLiteral(){return!1}visitParenthesizedExpression(e){return e.expression.visit(this)}visitRegularExpressionLiteral(){return!1}visitSpreadElement(e){return e.expression.visit(this)}visitArrowFunction(e,t){return!1}};var nn=null,rn=!1,an=1,on=null,sn=Symbol(`SIGNAL`);function O(e){let t=nn;return nn=e,t}function cn(){return nn}var ln={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:`unknown`,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function un(e){if(rn)throw Error(``);if(nn===null)return;nn.consumerOnSignalRead(e);let t=nn.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=nn.recomputing;if(r&&(n=t===void 0?nn.producers:t.nextProducer,n!==void 0&&n.producer===e)){nn.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=an;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===nn&&(!r||i.knownValidAtEpoch===an))return;let a=Tn(nn),o={producer:e,consumer:nn,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:an,lastReadVersion:e.version,nextConsumer:void 0};nn.producersTail=o,t===void 0?nn.producers=o:t.nextProducer=o,a&&Cn(e,o)}function dn(){an++}function fn(e){if((!Tn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==an)){if(!e.producerMustRecompute(e)&&!xn(e)){gn(e);return}e.producerRecomputeValue(e),gn(e)}}function pn(e){if(e.consumers===void 0)return;let t=rn;rn=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||hn(e)}}finally{rn=t}}function mn(){return nn?.consumerAllowSignalWrites!==!1}function hn(e){e.dirty=!0,pn(e),e.consumerMarkedDirty?.(e)}function gn(e){e.dirty=!1,e.lastCleanEpoch=an}function _n(e){return e&&vn(e),O(e)}function vn(e){if(e.producersTail?.knownValidAtEpoch===an){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function yn(e,t){O(t),e&&bn(e)}function bn(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(Tn(e))do n=wn(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function xn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(fn(e),n!==e.version))return!0}return!1}function Sn(e){if(Tn(e)){let t=e.producers;for(;t!==void 0;)t=wn(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Cn(e,t){let n=e.consumersTail,r=Tn(e);if(n===void 0?(t.nextConsumer=void 0,e.consumers=t):(t.nextConsumer=n.nextConsumer,n.nextConsumer=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let t=e.producers;t!==void 0;t=t.nextProducer)Cn(t.producer,t)}function wn(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,i=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r===void 0?t.consumersTail=i:r.prevConsumer=i,i!==void 0)i.nextConsumer=r;else if(t.consumers=r,!Tn(t)){let e=t.producers;for(;e!==void 0;)e=wn(e)}return n}function Tn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function En(e){on?.(e)}function Dn(e,t){return Object.is(e,t)}function On(e,t){let n=Object.create(Mn);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(fn(n),un(n),n.value===jn)throw n.error;return n.value};return r[sn]=n,En(n),r}var kn=Symbol(`UNSET`),An=Symbol(`COMPUTING`),jn=Symbol(`ERRORED`),Mn={...ln,value:kn,dirty:!0,error:null,equal:Dn,kind:`computed`,producerMustRecompute(e){return e.value===kn||e.value===An},producerRecomputeValue(e){if(e.value===An)throw Error(``);let t=e.value;e.value=An;let n=_n(e),r,i=!1;try{r=e.computation(),O(null),i=t!==kn&&t!==jn&&r!==jn&&e.equal(t,r)}catch(t){r=jn,e.error=t}finally{yn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function Nn(){throw Error()}var Pn=Nn;function Fn(e){Pn(e)}function In(e){Pn=e}var Ln=null;function Rn(e,t){let n=Object.create(Hn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>zn(n);return r[sn]=n,En(n),[r,e=>Bn(n,e),e=>Vn(n,e)]}function zn(e){return un(e),e.value}function Bn(e,t){mn()||Fn(e),e.equal(e.value,t)||(e.value=t,Un(e))}function Vn(e,t){mn()||Fn(e),Bn(e,t(e.value))}var Hn={...ln,equal:Dn,value:void 0,kind:`signal`};function Un(e){e.version++,dn(),pn(e),Ln?.(e)}var Wn={...ln,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Gn(e){if(e.dirty=!1,e.version>0&&!xn(e))return;e.version++;let t=_n(e);try{e.cleanup(),e.fn()}finally{yn(e,t)}}var Kn=void 0;function qn(){return Kn}function Jn(e){let t=Kn;return Kn=e,t}var Yn=Symbol(`NotFound`);function Xn(e){return e===Yn||e?.name===`ɵNotFound`}function Zn(e,t,n){let r=Object.create(er);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(fn(r),un(r),r.value===jn)throw r.error;return r.value};return i[sn]=r,En(r),i}function Qn(e,t){fn(e),Bn(e,t),gn(e)}function $n(e,t){if(fn(e),e.value===jn)throw e.error;Vn(e,t),gn(e)}var er={...ln,value:kn,dirty:!0,error:null,equal:Dn,kind:`linkedSignal`,producerMustRecompute(e){return e.value===kn||e.value===An},producerRecomputeValue(e){if(e.value===An)throw Error(``);let t=e.value;e.value=An;let n=_n(e),r,i=!1;try{let n=e.source(),a=t!==kn&&t!==jn,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,O(null),i=a&&r!==jn&&e.equal(t,r)}catch(t){r=jn,e.error=t}finally{yn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function tr(e){let t=O(null);try{return e()}finally{O(t)}}var nr=function(e,t){return nr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},nr(e,t)};function rr(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);nr(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function ir(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function ar(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function or(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?fr:(this.currentObservers=null,a.push(e),new dr(function(){t.currentObservers=null,ur(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Rr;return e.source=this,e},t.create=function(e,t){return new Jr(e,t)},t}(Rr),Jr=function(e){rr(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??fr},t}(qr),Yr=function(e){rr(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(qr);function Xr(e,t){return Ur(function(n,r){var i=0;n.subscribe(Wr(r,function(n){r.next(e.call(t,n,i++))}))})}var Zr=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,k=class extends Error{code;constructor(e,t){super($r(e,t)),this.code=e}};function Qr(e){return`NG0${Math.abs(e)}`}function $r(e,t){return`${Qr(e)}${t?`: `+t:``}`}function ei(e){for(let t in e)if(e[t]===ei)return t;throw Error(``)}function ti(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(ti).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` -`);return r>=0?n.slice(0,r):n}function ni(e,t){return e?t?`${e} ${t}`:e:t||``}var ri=ei({__forward_ref__:ei});function ii(e){return e.__forward_ref__=ii,e}function ai(e){return oi(e)?e():e}function oi(e){return typeof e==`function`&&Object.hasOwn(e,ri)&&e.__forward_ref__===ii}function si(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function ci(e){return li(e,fi)}function li(e,t){return Object.hasOwn(e,t)&&e[t]||null}function ui(e){return(e?.[fi]??null)||null}function di(e){return e&&Object.hasOwn(e,pi)?e[pi]:null}var fi=ei({ɵprov:ei}),pi=ei({ɵinj:ei}),mi=class{_desc;ngMetadataName=`InjectionToken`;ɵprov;constructor(e,t){this._desc=e,this.ɵprov=void 0,typeof t==`number`?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.ɵprov=si({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function hi(e){return e&&!!e.ɵproviders}var gi=ei({ɵcmp:ei}),_i=ei({ɵdir:ei}),vi=ei({ɵpipe:ei}),yi=ei({ɵfac:ei}),bi=ei({__NG_ELEMENT_ID__:ei}),xi=ei({__NG_ENV_ID__:ei});function Si(e){return Ti(e,`@Component`),e[gi]||null}function Ci(e){return Ti(e,`@Directive`),e[_i]||null}function wi(e){return Ti(e,`@Pipe`),e[vi]||null}function Ti(e,t){if(e==null)throw new k(-919,!1)}function Ei(e){return typeof e==`string`?e:e==null?``:String(e)}var Di=ei({ngErrorCode:ei}),Oi=ei({ngErrorMessage:ei}),ki=ei({ngTokenPath:ei});function Ai(e,t){return Mi(``,-200,t)}function ji(e,t){throw new k(-201,!1)}function Mi(e,t,n){let r=new k(t,e);return r[Di]=t,r[Oi]=e,n&&(r[ki]=n),r}function Ni(e){return e[Di]}var Pi;function Fi(){return Pi}function Ii(e){let t=Pi;return Pi=e,t}function Li(e,t,n){let r=ci(e);if(r&&r.providedIn==`root`)return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;ji(e,``)}var Ri=globalThis,zi={},Bi=`__NG_DI_FLAG__`,Vi=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Wi(t)||0;try{return this.injector.get(e,n&8?null:zi,n)}catch(e){if(Xn(e))return e;throw e}}};function Hi(e,t=0){let n=qn();if(n===void 0)throw new k(-203,!1);if(n===null)return Li(e,void 0,t);{let r=Gi(t),i=n.retrieve(e,r);if(Xn(i)){if(r.optional)return null;throw i}return i}}function Ui(e,t=0){return(Fi()||Hi)(ai(e),t)}function A(e,t){return Ui(e,Wi(t))}function Wi(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Gi(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Ki(e){let t=[];for(let n=0;nArray.isArray(e)?Yi(e,t):t(e))}function Xi(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Zi(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Qi(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function $i(e,t,n){let r=ta(e,t);return r>=0?e[r|1]=n:(r=~r,Qi(e,r,t,n)),r}function ea(e,t){let n=ta(e,t);if(n>=0)return e[n|1]}function ta(e,t){return na(e,t,1)}function na(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let a=r+(i-r>>1),o=e[a<t?i=a:r=a+1}return~(i<{n.push(e)};return Yi(t,e=>{let t=e;fa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&da(i,a),n}function da(e,t){for(let n=0;n{t(e,r)})}}function fa(e,t,n,r){if(e=ai(e),!e)return!1;let i=null,a=di(e),o=!a&&Si(e);if(!a&&!o){let t=e.ngModule;if(a=di(t),a)i=t;else return!1}else if(o&&!o.standalone)return!1;else i=e;let s=r.has(i);if(o){if(s)return!1;if(r.add(i),o.dependencies){let e=typeof o.dependencies==`function`?o.dependencies():o.dependencies;for(let i of e)fa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{Yi(a.imports,i=>{fa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&da(e,t)}if(!s){let e=Ji(i)||(()=>new i);t({provide:i,useFactory:e,deps:ia},i),t({provide:sa,useValue:i,multi:!0},i),t({provide:aa,useValue:()=>Ui(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;pa(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function pa(e,t){for(let n of e)hi(n)&&(n=n.ɵproviders),Array.isArray(n)?pa(n,t):t(n)}var ma=ei({provide:String,useValue:ei});function ha(e){return typeof e==`object`&&!!e&&ma in e}function ga(e){return!!(e&&e.useExisting)}function _a(e){return!!(e&&e.useFactory)}function va(e){return typeof e==`function`}var ya=new mi(``),ba={},xa={},Sa=void 0;function Ca(){return Sa===void 0&&(Sa=new ca),Sa}var wa=class{},Ta=class extends wa{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Fa(e,e=>this.processProvider(e)),this.records.set(oa,ja(void 0,this)),r.has(`environment`)&&this.records.set(wa,ja(void 0,this));let i=this.records.get(ya);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(sa,ia,{self:!0}))}retrieve(e,t){let n=Wi(t)||0;try{return this.get(e,zi,n)}catch(e){if(Xn(e))return e;throw e}}destroy(){Aa(this),this._destroyed=!0;let e=O(null);try{for(let e of this._ngOnDestroyHooks)e.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let t of e)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),O(e)}}onDestroy(e){return Aa(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Aa(this);let t=Jn(this),n=Ii(void 0);try{return e()}finally{Jn(t),Ii(n)}}get(e,t=zi,n){if(Aa(this),Object.hasOwn(e,xi))return e[xi](this);let r=Wi(n),i=Jn(this),a=Ii(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Pa(e)&&ci(e);t=n&&this.injectableDefInScope(n)?ja(Ea(e),ba):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ca():this.parent;return t=r&8&&t===zi?null:t,n.get(e,t)}catch(e){let t=Ni(e);throw t===-200||t===-201?new k(t,null):e}finally{Ii(a),Jn(i)}}resolveInjectorInitializers(){let e=O(null),t=Jn(this),n=Ii(void 0);try{let e=this.get(aa,ia,{self:!0});for(let t of e)t()}finally{Jn(t),Ii(n),O(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=ai(e);let t=va(e)?e:ai(e&&e.provide),n=Oa(e);if(!va(e)&&e.multi===!0){let n=this.records.get(t);n||(n=ja(void 0,ba,!0),n.factory=()=>Ki(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=O(null);try{if(t.value===xa)throw Ai(``);return t.value===ba&&(t.value=xa,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Na(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{O(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=ai(e.providedIn);return typeof t==`string`?t===`any`||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Ea(e){let t=ci(e),n=t===null?Ji(e):t.factory;if(n!==null)return n;if(e instanceof mi)throw new k(-204,!1);if(e instanceof Function)return Da(e);throw new k(-204,!1)}function Da(e){if(e.length>0)throw new k(-204,!1);let t=ui(e);return t===null?()=>new e:()=>t.factory(e)}function Oa(e){return ha(e)?ja(void 0,e.useValue):ja(ka(e),ba)}function ka(e,t,n){let r;if(va(e)){let t=ai(e);return Ji(t)||Ea(t)}if(ha(e))r=()=>ai(e.useValue);else if(_a(e))r=()=>e.useFactory(...Ki(e.deps||[]));else if(ga(e))r=(t,n)=>Ui(ai(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=ai(e&&(e.useClass||e.provide));if(Ma(e))r=()=>new t(...Ki(e.deps));else return Ji(t)||Ea(t)}return r}function Aa(e){if(e.destroyed)throw new k(-205,!1)}function ja(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ma(e){return!!e.deps}function Na(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Pa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Fa(e,t){for(let n of e)Array.isArray(n)?Fa(n,t):n&&hi(n)?Fa(n.ɵproviders,t):t(n)}function Ia(e,t){let n;e instanceof Ta?(Aa(e),n=e):n=new Vi(e);let r=Jn(n),i=Ii(void 0);try{return t()}finally{Jn(r),Ii(i)}}function La(){return Fi()!==void 0||qn()!=null}var Ra=1;function za(e){return Array.isArray(e)&&typeof e[Ra]==`object`}function Ba(e){return Array.isArray(e)&&e[Ra]===!0}function Va(e){return!!(e.flags&4)}function Ha(e){return e.componentOffset>-1}function Ua(e){return(e.flags&1)==1}function Wa(e){return!!e.template}function Ga(e){return!!(e[2]&512)}function Ka(e){return(e[2]&256)==256}var qa=`math`;function Ja(e){for(;Array.isArray(e);)e=e[0];return e}function Ya(e,t){return Ja(t[e])}function Xa(e,t){return Ja(t[e.index])}function Za(e,t){return e.data[t]}function Qa(e,t){return e[t]}function $a(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function eo(e,t){let n=t[e];return za(n)?n:n[0]}function to(e){return(e[2]&128)==128}function no(e,t){return t==null?null:e[t]}function ro(e){e[17]=0}function io(e){e[2]&1024||(e[2]|=1024,to(e)&&co(e))}function ao(e,t){for(;e>0;)t=t[14],e--;return t}function oo(e){return!!(e[2]&9216||e[24]?.dirty)}function so(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),oo(e)&&co(e)}function co(e){e[10].changeDetectionScheduler?.notify(0);let t=fo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!to(t)));)t=fo(t)}function lo(e,t){if(Ka(e))throw new k(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function uo(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function fo(e){let t=e[3];return Ba(t)?t[3]:t}function po(e){return e[7]??=[]}function mo(e){return e.cleanup??=[]}var j={lFrame:qo(null),bindingsEnabled:!0,skipHydrationRootTNode:null},ho=!1;function go(){return j.lFrame.elementDepthCount}function _o(){j.lFrame.elementDepthCount++}function vo(){j.lFrame.elementDepthCount--}function yo(){return j.bindingsEnabled}function bo(){return j.skipHydrationRootTNode!==null}function xo(e){return j.skipHydrationRootTNode===e}function So(){j.skipHydrationRootTNode=null}function M(){return j.lFrame.lView}function Co(){return j.lFrame.tView}function N(e){return j.lFrame.contextLView=e,e[8]}function P(e){return j.lFrame.contextLView=null,e}function wo(){let e=To();for(;e!==null&&e.type===64;)e=e.parent;return e}function To(){return j.lFrame.currentTNode}function Eo(){let e=j.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Do(e,t){let n=j.lFrame;n.currentTNode=e,n.isParent=t}function Oo(){return j.lFrame.isParent}function ko(){j.lFrame.isParent=!1}function Ao(){return ho}function jo(e){let t=ho;return ho=e,t}function Mo(){let e=j.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function No(){return j.lFrame.bindingIndex}function Po(e){return j.lFrame.bindingIndex=e}function Fo(){return j.lFrame.bindingIndex++}function Io(e){let t=j.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Lo(){return j.lFrame.inI18n}function Ro(e,t){let n=j.lFrame;n.bindingIndex=n.bindingRootIndex=e,Bo(t)}function zo(){return j.lFrame.currentDirectiveIndex}function Bo(e){j.lFrame.currentDirectiveIndex=e}function Vo(e){let t=j.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Ho(e){j.lFrame.currentQueryIndex=e}function Uo(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function Wo(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=Uo(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=j.lFrame=Ko();return r.currentTNode=t,r.lView=e,!0}function Go(e){let t=Ko(),n=e[1];j.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Ko(){let e=j.lFrame,t=e===null?null:e.child;return t===null?qo(e):t}function qo(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Jo(){let e=j.lFrame;return j.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Yo=Jo;function Xo(){let e=Jo();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Zo(e){return(j.lFrame.contextLView=ao(e,j.lFrame.contextLView))[8]}function Qo(){return j.lFrame.selectedIndex}function $o(e){j.lFrame.selectedIndex=e}function es(){let e=j.lFrame;return Za(e.tView,e.selectedIndex)}function ts(){j.lFrame.currentNamespace=`svg`}function ns(){rs()}function rs(){j.lFrame.currentNamespace=null}function is(){return j.lFrame.currentNamespace}var as=!0;function os(){return as}function ss(e){as=e}function cs(e,t=null,n=null,r){let i=ls(e,t,n,r);return i.resolveInjectorInitializers(),i}function ls(e,t=null,n=null,r,i=new Set){return new Ta([n||ia,la(e)],t||Ca(),null,i)}var us=class e{static THROW_IF_NOT_FOUND=zi;static NULL=new ca;static create(e,t){if(Array.isArray(e))return cs({name:``},t,e,``);{let t=e.name??``;return cs({name:t},e.parent,e.providers,t)}}static ɵprov=si({token:e,providedIn:`any`,factory:()=>Ui(oa)});static __NG_ELEMENT_ID__=-1},ds=new mi(``),fs=class{static __NG_ELEMENT_ID__=ms;static __NG_ENV_ID__=e=>e},ps=class extends fs{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Ka(this._lView)}onDestroy(e){let t=this._lView;return lo(t,e),()=>uo(t,e)}};function ms(){return new ps(M())}var hs=new mi(``),gs=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Yr(!1);debugTaskTracker=A(hs,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Rr(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),this.debugTaskTracker?.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.debugTaskTracker?.remove(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static ɵprov=si({token:e,providedIn:`root`,factory:()=>new e})}return e})(),_s=class extends qr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,La()&&(this.destroyRef=A(fs,{optional:!0})??void 0,this.pendingTasks=A(gs,{optional:!0})??void 0)}emit(e){let t=O(null);try{super.next(e)}finally{O(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),a=n;if(e&&typeof e==`object`){let t=e;r=t.next?.bind(t),i=t.error?.bind(t),a=t.complete?.bind(t)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&=this.wrapInTimeout(r),a&&=this.wrapInTimeout(a));let o=super.subscribe({next:r,error:i,complete:a});return e instanceof dr&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}};function vs(...e){}function ys(e){let t,n;function r(){e=vs;try{n!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame==`function`&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function bs(e){return queueMicrotask(()=>e()),()=>{e=vs}}var xs=`isAngularZone`,Ss=`isAngularZone_ID`,Cs=0,ws=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new _s(!1);onMicrotaskEmpty=new _s(!1);onStable=new _s(!1);onError=new _s(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new k(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=i,Os(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(xs)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new k(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new k(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let i=this._inner,a=i.scheduleEventTask(`NgZoneEvent: `+r,e,Ts,vs,vs);try{return i.runTask(a,t,n)}finally{i.cancelTask(a)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},Ts={};function Es(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function Ds(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){ys(()=>{e.callbackScheduled=!1,ks(e),e.isCheckStableRunning=!0,Es(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),ks(e)}function Os(e){let t=()=>{Ds(e)},n=Cs++;e._inner=e._inner.fork({name:`angular`,properties:{[xs]:!0,[Ss]:n,[Ss+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Ns(s))return n.invokeTask(i,a,o,s);try{return As(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),js(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return As(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Ps(s)&&t(),js(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,ks(e),Es(e)):i.change==`macroTask`&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,n,r,i)=>(t.handleError(r,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}function ks(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function As(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function js(e){e._nesting--,Es(e)}var Ms=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new _s;onMicrotaskEmpty=new _s;onStable=new _s;onError=new _s;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function Ns(e){return Fs(e,`__ignore_ng_zone__`)}function Ps(e){return Fs(e,`__scheduler_tick__`)}function Fs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Is=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Ls=new mi(``,{factory:()=>{let e=A(ws),t=A(wa),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Is),n.handleError(r))})}}}),Rs={provide:aa,useValue:()=>{A(Is,{optional:!0})},multi:!0};function F(e,t){let[n,r,i]=Rn(e,t?.equal),a=n;return a[sn],a.set=r,a.update=i,a.asReadonly=zs.bind(a),a}function zs(){let e=this[sn];if(e.readonlyFn===void 0){let t=()=>this();t[sn]=e,e.readonlyFn=t}return e.readonlyFn}var Bs=new mi(``,{factory:()=>Vs}),Vs=`ng`,Hs=new mi(``),Us=new mi(``,{providedIn:`platform`,factory:()=>`unknown`}),Ws=new mi(``,{factory:()=>A(ds).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),Gs=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=Ks}return e})();function Ks(){return new Gs(M(),wo())}var qs=class{},Js=new mi(``,{factory:()=>!0}),Ys=new mi(``),Xs=(()=>{class e{static ɵprov=si({token:e,providedIn:`root`,factory:()=>new Zs})}return e})(),Zs=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)e||=t===null?this.flushQueue(n):t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},Qs=class{[sn];constructor(e){this[sn]=e}destroy(){this[sn].destroy()}};function $s(e,t){let n=t?.injector??A(us),r=t?.manualCleanup===!0?null:n.get(fs),i,a=n.get(Gs,null,{optional:!0}),o=n.get(qs);return a===null?i=ic(e,n.get(Xs),o):(i=rc(a.view,o,e),r instanceof ps&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new Qs(i)}var ec={...Wn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=jo(!1);try{Gn(this)}finally{jo(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=O(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],O(e)}}},tc={...ec,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(Sn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},nc={...ec,consumerMarkedDirty(){this.view[2]|=8192,co(this.view),this.notifier.notify(13)},destroy(){if(Sn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function rc(e,t,n){let r=Object.create(nc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=ac(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function ic(e,t,n){let r=Object.create(tc);return r.fn=ac(r,e),r.scheduler=t,r.notifier=n,r.zone=typeof Zone<`u`?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function ac(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}var oc=(()=>{class e{internalPendingTasks=A(gs);scheduler=A(qs);errorHandler=A(Ls);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let t=this.add();try{e().catch(this.errorHandler).finally(t)}catch(e){this.errorHandler(e),t()}}static ɵprov=si({token:e,providedIn:`root`,factory:()=>new e})}return e})(),sc=Symbol(`InputSignalNode#UNSET`),cc={...Hn,transformFn:void 0,applyValueToInputSignal(e,t){Bn(e,t)}};function lc(e){return{toString:e}.toString()}var uc=(function(e){return e[e.TemplateCreateStart=0]=`TemplateCreateStart`,e[e.TemplateCreateEnd=1]=`TemplateCreateEnd`,e[e.TemplateUpdateStart=2]=`TemplateUpdateStart`,e[e.TemplateUpdateEnd=3]=`TemplateUpdateEnd`,e[e.LifecycleHookStart=4]=`LifecycleHookStart`,e[e.LifecycleHookEnd=5]=`LifecycleHookEnd`,e[e.OutputStart=6]=`OutputStart`,e[e.OutputEnd=7]=`OutputEnd`,e[e.BootstrapApplicationStart=8]=`BootstrapApplicationStart`,e[e.BootstrapApplicationEnd=9]=`BootstrapApplicationEnd`,e[e.BootstrapComponentStart=10]=`BootstrapComponentStart`,e[e.BootstrapComponentEnd=11]=`BootstrapComponentEnd`,e[e.ChangeDetectionStart=12]=`ChangeDetectionStart`,e[e.ChangeDetectionEnd=13]=`ChangeDetectionEnd`,e[e.ChangeDetectionSyncStart=14]=`ChangeDetectionSyncStart`,e[e.ChangeDetectionSyncEnd=15]=`ChangeDetectionSyncEnd`,e[e.AfterRenderHooksStart=16]=`AfterRenderHooksStart`,e[e.AfterRenderHooksEnd=17]=`AfterRenderHooksEnd`,e[e.ComponentStart=18]=`ComponentStart`,e[e.ComponentEnd=19]=`ComponentEnd`,e[e.DeferBlockStateStart=20]=`DeferBlockStateStart`,e[e.DeferBlockStateEnd=21]=`DeferBlockStateEnd`,e[e.DynamicComponentStart=22]=`DynamicComponentStart`,e[e.DynamicComponentEnd=23]=`DynamicComponentEnd`,e[e.HostBindingsUpdateStart=24]=`HostBindingsUpdateStart`,e[e.HostBindingsUpdateEnd=25]=`HostBindingsUpdateEnd`,e})(uc||{});function dc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var fc=null;function pc(){return fc}var mc=[],hc=function(e,t=null,n){for(let r=0;r=r)break}else t[c]<0&&(e[17]+=65536),(s>14>16&&(e[2]&3)===t&&(e[2]+=16384,Sc(o,a)):Sc(o,a)}var wc=-1,Tc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function Ec(e){return!!(e.flags&8)}function Dc(e){return!!(e.flags&16)}function Oc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function Ic(e,t){let n=Fc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Lc=!0;function Rc(e){let t=Lc;return Lc=e,t}var zc=255,Bc=5,Vc=0,Hc={};function Uc(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,bi)&&(r=n[bi]),r??=n[bi]=Vc++;let i=r&zc,a=1<>Bc)]|=a}function Wc(e,t){let n=Kc(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,Gc(r.data,e),Gc(t,null),Gc(r.blueprint,null));let i=qc(e,t),a=e.injectorIndex;if(Nc(i)){let e=Pc(i),n=Ic(i,t),r=n[1].data;for(let i=0;i<8;i++)t[a+i]=n[e+i]|r[e+i]}return t[a+8]=i,a}function Gc(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Kc(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function qc(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=cl(i),r===null)return wc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return wc}function Jc(e,t,n){Uc(e,t,n)}function Yc(e,t,n){if(n&8||e!==void 0)return e;ji(t,`NodeInjector`)}function Xc(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ii(void 0);try{return i?i.get(t,r,n&8):Li(t,r,n&8)}finally{Ii(a)}}return Yc(r,t,n)}function Zc(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=sl(e,t,n,r,Hc);if(i!==Hc)return i}let i=Qc(e,t,n,r,Hc);if(i!==Hc)return i}return Xc(t,n,r,i)}function Qc(e,t,n,r,i){let a=nl(n);if(typeof a==`function`){if(!Wo(t,e,r))return r&1?Yc(i,n,r):Xc(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))ji(n);else return e}finally{Yo()}}else if(typeof a==`number`){let i=null,o=Kc(e,t),s=wc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?qc(e,t):t[o+8],s===wc||!il(r,!1)?o=-1:(i=t[1],o=Pc(s),t=Ic(s,t)));o!==-1;){let e=t[1];if(rl(a,o,e.data)){let e=$c(o,t,n,i,r,c);if(e!==Hc)return e}s=t[o+8],s!==wc&&il(r,t[1].data[o+8]===c)&&rl(a,o,t)?(i=e,o=Pc(s),t=Ic(s,t)):o=-1}}return i}function $c(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=el(s,o,n,r==null?Ha(s)&&Lc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?Hc:tl(t,o,c,s,i)}function el(e,t,n,r,i){let a=e.providerIndexes,o=t.data,s=a&1048575,c=e.directiveStart,l=e.directiveEnd,u=a>>20,d=r?s:s+u,f=i?s+u:l;for(let e=d;e=c&&t.type===n)return e}if(i){let e=o[c];if(e&&Wa(e)&&e.type===n)return c}return null}function tl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Tc){let s=a;if(s.resolving)throw Ai(``);let c=Rc(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ii(s.injectImpl):null;Wo(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&gc(n,o[n],t)}finally{l!==null&&Ii(l),Rc(c),s.resolving=!1,Yo()}}return a}function nl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,bi)?e[bi]:void 0;return typeof t==`number`?t>=0?t&zc:ol:t}function rl(e,t,n){let r=1<>Bc)]&r)}function il(e,t){return!(e&2)&&!(e&1&&t)}var al=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return Zc(this._tNode,this._lView,e,Wi(n),t)}};function ol(){return new al(wo(),M())}function sl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!Ga(o);){let e=Qc(a,o,n,r|2,Hc);if(e!==Hc)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,Hc,r);if(t!==Hc)return t}t=cl(o),o=o[14]}a=t}return i}function cl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}var ll=()=>(typeof requestIdleCallback<`u`?requestIdleCallback:e=>setTimeout(e)).bind(globalThis),ul=()=>(typeof requestIdleCallback<`u`?cancelIdleCallback:clearTimeout).bind(globalThis),dl=new mi(``,{factory:()=>new fl}),fl=class{requestIdleCallback=ll();cancelIdleCallback=ul();requestOnIdle(e,t){return this.requestIdleCallback(e,t)}cancelOnIdle(e){return this.cancelIdleCallback(e)}};function pl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function ml(){return hl(wo(),M())}function hl(e,t){return new gl(Xa(e,t))}var gl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=ml}return e})();function _l(e){return(e.flags&128)==128}var vl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(vl||{}),yl=new Map,bl=0;function xl(){return bl++}function Sl(e){yl.set(e[19],e)}function Cl(e){yl.delete(e[19])}var wl=`__ngContext__`;function Tl(e,t){za(t)?(e[wl]=t[19],Sl(t)):e[wl]=t}function El(e){return Ol(e[12])}function Dl(e){return Ol(e[4])}function Ol(e){for(;e!==null&&!Ba(e);)e=e[4];return e}var kl=void 0;function Al(e){kl=e}function jl(){if(kl!==void 0)return kl;if(typeof document<`u`)return document;throw new k(210,!1)}var Ml=!1,Nl=new mi(``,{factory:()=>Ml}),Pl=new mi(``),Fl=new WeakMap;function Il(e,t){if(typeof e!=`object`||!e)return;let n=Fl.get(e);n||(n=new WeakSet,Fl.set(e,n)),n.add(t)}var Ll=new mi(``);function Rl(e){return(e.flags&32)==32}var zl=()=>null;function Bl(e,t,n=!1){return zl(e,t,n)}function Vl(e){return e.get(Pl,!1,{optional:!0})}function Hl(e,t){let n=e.contentQueries;if(n!==null){let r=O(null);try{for(let r=0;r|^->||--!>|)/g,Xl=`​$1​`;function Zl(e){return e.replace(Jl,e=>e.replace(Yl,Xl))}function Ql(e,t){return e.createText(t)}function $l(e,t,n){e.setValue(t,n)}function eu(e,t){return e.createComment(Zl(t))}function tu(e,t,n){return e.createElement(t,n)}function nu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function ru(e,t,n){e.appendChild(t,n)}function iu(e,t,n,r,i){r===null?ru(e,t,n):nu(e,t,n,r,i)}function au(e,t,n,r){e.removeChild(null,t,n,r)}function ou(e,t,n){e.setAttribute(t,`style`,n)}function su(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function cu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Oc(e,t,r),i!==null&&su(e,t,i),a!==null&&ou(e,t,a)}function lu(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var uu=`ng-template`;function du(e,t,n,r){let i=0;if(r){for(;i-1){let e;for(;++ia?``:i[u+1].toLowerCase(),r&2&&l!==e){if(hu(r))return!1;o=!0}}}}}return hu(r)||o}function hu(e){return!(e&1)}function gu(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let n=!1;for(;i-1)for(n++;n0?`="`+t+`"`:``)+`]`}else r&8?i+=`.`+o:r&4&&(i+=` `+o)}else i!==``&&!hu(o)&&(t+=bu(a,i),i=``),r=o,a||=!hu(r);n++}return i!==``&&(t+=bu(a,i)),t}function Su(e){return e.map(xu).join(`,`)}function Cu(e){let t=[],n=[],r=1,i=2;for(;r=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),ju.add(n),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):(a&&n===a||c&&i&&c!==i&&(o===null||s===null||o===s))&&(r.splice(e,1),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),n.parentNode?.removeChild(n))}}function Nu(e,t,n){let r=Au(n),i=ku.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):ku.set(e,[{el:t,declarationView:r}])}var Pu=(function(e){return e[e.CHANGE_DETECTION=0]=`CHANGE_DETECTION`,e[e.AFTER_NEXT_RENDER=1]=`AFTER_NEXT_RENDER`,e})(Pu||{}),Fu=new mi(``),Iu=new Set;function Lu(e){Iu.has(e)||(Iu.add(e),performance?.mark?.(`mark_feature_usage`,{detail:{feature:e}}))}var Ru=(()=>{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=si({token:e,providedIn:`root`,factory:()=>new e})}return e})(),zu=new mi(``,{factory:()=>{let e=A(wa),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Bu(e,t,n){let r=e.get(zu);if(Array.isArray(t))for(let e of t)r.queue.add(e),n?.detachedLeaveAnimationFns?.push(e);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function Vu(e,t){let n=e.get(zu);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Hu(e,t){let n=e.get(zu);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Uu(e,t){for(let[n,r]of t)Bu(e,r.animateFns)}function Wu(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Uu(r,i)}function Gu(e,t,n,r){try{n.get(oa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Vu(n,i.enter.get(t.index).animateFns);let a=Ku(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];Ju(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Ou.add(e[19]),Bu(n,()=>qu(e,t,i||void 0,a,r),i||void 0)}function Ku(e,t,n){let r=new Map,i=n?.leave;if(i&&i.has(t.index)&&r.set(t.index,i.get(t.index)),e&&i)for(let[n,a]of i){if(r.has(n))continue;let i=e[1].data[n].parent;for(;i;){if(i===t){r.set(n,a);break}i=i.parent}}return r}function qu(e,t,n,r,i){let a=[];if(n&&n.leave)for(let[e]of r){if(!n.leave.has(e))continue;let t=n.leave.get(e);for(let e of t.animateFns){let{promise:t}=e();a.push(t)}n.detachedLeaveAnimationFns=void 0}if(e&&Ju(e,t,a),a.length>0){let t=n||e?.[26];if(t){let n=t.running;n&&a.push(n),t.running=Promise.allSettled(a),Xu(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Ou.delete(e[19]),i(!0)})}else e&&Ou.delete(e[19]),i(!1)}function Ju(e,t,n){if(t.type&12){let r=e[t.index];if(Ba(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Ou.delete(e[19])),n(!0)})}function Zu(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Ba(i)?c=i:za(i)&&(l=!0,i=i[0]);let u=Ja(i);e===0&&r!==null?(Wu(s,r,a,n),o==null?ru(t,r,u):nu(t,r,u,o||null,!0)):e===1&&r!==null?(Wu(s,r,a,n),nu(t,r,u,o||null,!0),Mu(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Nu(a,u,s),ju.delete(u),Gu(s,a,n,e=>{if(ju.has(u)){ju.delete(u);return}au(t,u,l,e)})):e===3&&(ju.delete(u),Gu(s,a,n,()=>{t.destroyNode(u)})),c!=null&&bd(t,e,n,c,a,r,o)}}function Qu(e,t){ed(e,t),t[0]=null,t[5]=null}function $u(e,t,n,r,i,a){r[0]=i,r[5]=t,_d(e,r,n,1,i,a)}function ed(e,t){t[10].changeDetectionScheduler?.notify(9),_d(e,t,t[11],2,null,null)}function td(e){let t=e[12];if(!t)return id(e[1],e);for(;t;){let n=null;if(za(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)za(t)&&id(t[1],t),t=t[3];t===null&&(t=e),za(t)&&id(t[1],t),n=t&&t[4]}t=n}}function nd(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function rd(e,t){if(Ka(t))return;let n=t[11];n.destroyNode&&_d(e,t,n,3,null,null),td(t)}function id(e,t){if(Ka(t))return;let n=O(null);try{t[2]&=-129,t[2]|=256,t[24]&&Sn(t[24]),od(e,t),ad(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Ba(t[3])){n!==t[3]&&nd(n,t);let r=t[18];r!==null&&r.detachView(e)}Cl(t)}finally{O(n)}}function ad(e,t){let n=e.cleanup,r=t[7];if(n!==null)for(let e=0;e=0?r[t]():r[-t].unsubscribe(),e+=2}else{let t=r[n[e+1]];n[e].call(t)}r!==null&&(t[7]=null);let i=t[21];if(i!==null){t[21]=null;for(let e=0;e27&&Ad(e,t,27,!1),hc(o?uc.TemplateUpdateStart:uc.TemplateCreateStart,i,n),n(r,i)}finally{$o(a),hc(o?uc.TemplateUpdateEnd:uc.TemplateCreateEnd,i,n)}}function Pd(e,t,n){Vd(e,t,n),(n.flags&64)==64&&Hd(e,t,n)}function Fd(e,t,n=Xa){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{co(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function pf(e){let t=e[24]??Object.create(mf);return t.lView=e,t}var mf={...ln,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=fo(e.lView);for(;t&&!hf(t[1]);)t=fo(t);t&&io(t)},consumerOnSignalRead(){this.lView[24]=this}};function hf(e){return e.type!==2}function gf(e){if(e[23]===null)return;let t=!0;for(;t;){let n=!1;for(let t of e[23])if(t.dirty&&(n=!0,t.zone===null||Zone.current===t.zone?t.run():t.zone.run(()=>t.run()),e[23]===null))return;t=n&&!!(e[2]&8192)}}var _f=100;function vf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{yf(e,t)}finally{n.end?.()}}function yf(e,t){let n=Ao();try{jo(!0),Tf(e,t);let n=0;for(;oo(e);){if(n===_f)throw new k(103,!1);n++,Tf(e,1)}}finally{jo(n)}}function bf(e,t,n,r){if(Ka(t))return;let i=t[2];Go(t);let a=!0,o=null,s=null;hf(e)?(s=lf(t),o=_n(s)):cn()===null?(a=!1,s=pf(t),o=_n(s)):t[24]&&=(Sn(t[24]),null);try{ro(t),Po(e.bindingStartIndex),n!==null&&Nd(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&vc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&yc(t,n,0,null),bc(t,0)}if(Sf(t),gf(t),xf(t,0),e.contentQueries!==null&&Hl(e,t),a){let n=e.contentCheckHooks;n!==null&&vc(t,n)}else{let n=e.contentHooks;n!==null&&yc(t,n,1),bc(t,1)}Df(e,t);let o=e.components;o!==null&&Ef(t,o,0);let s=e.viewQuery;if(s!==null&&Ul(2,s,r),a){let n=e.viewCheckHooks;n!==null&&vc(t,n)}else{let n=e.viewHooks;n!==null&&yc(t,n,2),bc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}sf(t),t[2]&=-73}catch(e){throw co(t),e}finally{s!==null&&(yn(s,o),a&&df(s)),Xo()}}function xf(e,t){for(let n=El(e);n!==null;n=Dl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=Zi(e,10+t);Qu(r[1],r);let o=a[18];o!==null&&o.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function Pf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Nf(e,n),Zi(t,n))}this._attachedToViewContainer=!1}rd(this._lView[1],this._lView)}onDestroy(e){lo(this._lView,e)}markForCheck(){Of(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){so(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,vf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new k(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Ga(this._lView),t=this._lView[16];t!==null&&!e&&nd(t,this._lView),ed(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new k(902,!1);this._appRef=e;let t=Ga(this._lView),n=this._lView[16];n!==null&&!t&&Ff(n,this._lView),so(this._lView)}};function Lf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Rf(e,t,n,r,i),Lo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Eo();a.injectorIndex=e===null?-1:e.injectorIndex}return Do(a,!0),a}function Rf(e,t,n,r,i){let a=To(),o=Oo(),s=o?a:a&&a.parent,c=e.data[t]=Bf(e,s,n,t,r,i);return zf(e,c,a,o),c}function zf(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function Bf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return bo()&&(s|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:s,providerIndexes:0,value:i,namespace:is(),attrs:a,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Vf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Hf(e,n):r.push(e);e[6]=r}function Hf(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,Wf=()=>null;function Gf(e,t){return Uf(e,t)}function Kf(e,t,n){return Wf(e,t,n)}var qf=class{},Jf=class{},Yf=(()=>{class e{static ɵprov=si({token:e,providedIn:`root`,factory:()=>null})}return e})();function Xf(e){return e.debugInfo?.className||e.type.name||null}var Zf={},Qf=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Zf,n);return r!==Zf||t===Zf?r:this.parentInjector.get(e,t,n)}};function $f(e,t,n){return e[t]=n}function ep(e,t){return e[t]}function tp(e,t,n){if(n===wu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function np(e,t,n,r){let i=tp(e,t,n);return tp(e,t+1,r)||i}function rp(e,t,n,r,i){let a=np(e,t,n,r);return tp(e,t+2,i)||a}function ip(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&Il(i,a),Of(Ha(e)?eo(e.index,t):t,5);let o=t[8],s=ap(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=ap(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function ap(e,t,n,r){let i=O(null);try{return hc(uc.OutputStart,t,n),n(r)!==!1}catch(t){return Xd(e,t),!1}finally{hc(uc.OutputEnd,t,n),O(i)}}function op(e,t,n,r,i,a,o,s){let c=Ua(e),l=!1,u=null;if(!r&&c&&(u=cp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=Xa(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);sp(a)||lp(r?t=>r(Ja(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function sp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function cp(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;er?n[r]:null}typeof a==`string`&&(e+=2)}return null}function lp(e,t,n,r,i,a,o){let s=t.firstCreatePass?mo(t):null,c=po(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function up(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);lp(e.index,s,t,i,a,c,!0)}var dp=Symbol(`BINDING`),fp=new mi(``);function pp(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e0&&(n.directiveToIndex=new Map);for(let c=0;c0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function Dp(e,t,n){if(n){if(t.exportAs)for(let r=0;r{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&jd.SignalBased)!==0};return i&&(a.transform=i),a})}function Fp(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Ip(e,t,n){let r=t instanceof wa?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Qf(n,r):n}function Lp(e){let t=e.get(Jf,null);if(t===null)throw new k(407,!1);return{rendererFactory:t,sanitizer:e.get(Yf,null),changeDetectionScheduler:e.get(qs,null),ngReflect:!1,tracingService:e.get(Fu,null,{optional:!0})}}function Rp(e,t,n){let r=Bp(e);return tu(t,r,r===`svg`?`svg`:r===`math`?qa:n)}function zp(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new k(905,!1)}function Bp(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Vp=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Pp(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Fp(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Su(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){hc(uc.DynamicComponentStart);let s=O(null);try{let s=this.componentDef,c=Ip(s,r||this.ngModule,e),l=Lp(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Xf(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{O(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Hp(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Id(l,r,s.encapsulation,t):Rp(s,l,o??null);zp(u);let d=t.get(fp,null),f=Up(u,()=>t.get(ds,null)??jl());d&&d.addHost(f);let p=a?.some(Gp)||i?.some(e=>typeof e!=`function`&&e.bindings.some(Gp)),m=Td(null,c,null,512|Dd(s),null,null,e,l,t,null,Bl(u,t,!0));d&&Mp&&f instanceof ShadowRoot&&lo(m,()=>{d.removeHost(f)}),m[27]=u,Go(m);let h=null;try{let e=kp(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);cu(l,u,e),Tl(u,m),Pd(c,m,e),Wl(c,e,m),Ap(c,e),n!==void 0&&qp(e,this.ngContentSelectors,n),h=eo(e.index,m),m[8]=h[8],ef(c,m,null)}catch(e){throw h!==null&&Cl(h),Cl(m),e}finally{hc(uc.DynamicComponentEnd),Xo()}return new Kp(this.componentType,m,!!p)}};function Hp(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:Cu(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[dp].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function Gp(e){let t=e[dp].kind;return t===`input`||t===`twoWay`}var Kp=class extends qf{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=Za(t[1],27),this.location=hl(this._tNode,t),this.instance=eo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new If(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView;Zd(n,r[1],r,e,t),this.previousInputValues.set(e,t),Of(eo(n.index,r),1)}get injector(){return new al(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function qp(e,t,n){let r=e.projection=[];for(let e=0;e!1;function Yp(e,t,n){return Jp(e,t,n)}function Xp(e){return!!e&&typeof e.then==`function`}function Zp(e){return!!e&&typeof e.subscribe==`function`}var Qp=class{},$p=class extends Qp{injector;instance=null;constructor(e){super();let t=new Ta([...e.providers,{provide:Qp,useValue:this}],e.parent||Ca(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function em(e,t,n=null){return new $p({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var tm=(()=>{class e{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let t=ua(!1,e.type),n=t.length>0?em([t],this._injector,``):null;this.cachedInjectors.set(e,n)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=si({token:e,providedIn:`environment`,factory:()=>new e(Ui(wa))})}return e})();function nm(e){return lc(()=>{let t=sm(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==vl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(tm).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Gl.Emulated,styles:e.styles||ia,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Lu(`NgStandalone`),cm(n);let r=e.dependencies;return n.directiveDefs=lm(r,rm),n.pipeDefs=lm(r,wi),n.id=um(n),n})}function rm(e){return Si(e)||Ci(e)}function im(e,t){if(e==null)return ra;let n={};for(let r in e)if(Object.hasOwn(e,r)){let i=e[r],a,o,s,c;Array.isArray(i)?(s=i[0],a=i[1],o=i[2]??a,c=i[3]||null):(a=i,o=i,s=jd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function am(e){if(e==null)return ra;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function om(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function sm(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||ra,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ia,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:im(e.inputs,t),outputs:am(e.outputs),debugInfo:null}}function cm(e){e.features?.forEach(t=>t(e))}function lm(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let e of n){let n=t(e);n!==null&&r.push(n)}return r}:null}function um(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let e of r.join(`|`))t=Math.imul(31,t)+e.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var dm=new mi(``),fm=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=A(dm,{optional:!0})??[];injector=A(us);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ia(this.injector,t);if(Xp(n))e.push(n);else if(Zp(n)){let t=new Promise((e,t)=>{n.subscribe({complete:e,error:t})});e.push(t)}}let t=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),e.length===0&&t(),this.initialized=!0}static ɵfac=function(t){return new(t||e)};static ɵprov=pl({token:e,factory:e.ɵfac})}return e})();function pm(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=jc(e.mergedAttrs,e.attrs);let t=e.tView=Sd(2,e,i,a,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),t.queries=n.queries.embeddedTView(e))}s&&(e.flags|=s),Do(e,!1);let c=gm(n,t,e,r);os()&&fd(n,t,c,e),Tl(c,t);let l=kf(c,t,c,e);t[r+27]=l,kd(t,l),Yp(l,e,t)}function mm(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Lf(t,d,4,o||null,s||null),l!=null){let e=no(t.consts,l);f.localNames=[];for(let t=0;t{class e{cachedInjectors=new Map;getOrCreateInjector(e,t,n,r){if(!this.cachedInjectors.has(e)){let i=n.length>0?em(n,t,r):null;this.cachedInjectors.set(e,i)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=si({token:e,providedIn:`environment`,factory:()=>new e})}return e})(),Km=new mi(``);function qm(e,t,n){return e.get(Gm).getOrCreateInjector(t,e,n,``)}function Jm(e,t,n){if(e instanceof Qf){let r=e.injector,i=e.parentInjector;return new Qf(r,qm(i,t,n))}let r=e.get(wa);return r===e?qm(e,t,n):new Qf(e,qm(r,t,n))}function Ym(e,t,n,r=!1){let i=n[3],a=i[1];if(Ka(i))return;let o=Im(i,t),s=o[1],c=o[Dm];if(!(c!==null&&ee.data.s===t[1])??-1;return{dehydratedView:n>-1?e[6][n]:null,dehydratedViewIx:n}}function Zm(e,t,n,r,i){hc(uc.DeferBlockStateStart);let a=Bm(e,i,r);if(a!==null){t[1]=e;let o=i[1],s=Za(o,a+27);Mf(n,0);let c;if(e===xm.Complete){let e=Rm(o,r),t=e.providers;t&&t.length>0&&(c=Jm(i[9],e,t))}let{dehydratedView:l,dehydratedViewIx:u}=Xm(n,t),d=nf(i,s,null,{injector:c,dehydratedView:l});if(jf(n,d,0,rf(s,l)),io(d),u>-1&&n[6]?.splice(u,1),(e===xm.Complete||e===xm.Error)&&Array.isArray(t[Om])){for(let e of t[Om])e();t[Om]=null}}hc(uc.DeferBlockStateEnd)}function Qm(e,t){return e{e.loadingState===vm.COMPLETE?Ym(xm.Complete,t,n):e.loadingState===vm.FAILED&&Ym(xm.Error,t,n)})}var th=null;function nh(e,t){return t[9].get(Km,null,{optional:!0})?.behavior!==Am.Manual}var rh=new mi(``),ih=new mi(``);function ah(){In(()=>{throw new k(600,``)})}var oh=10,sh=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=A(Ls);afterRenderManager=A(Ru);zonelessEnabled=A(Js);rootEffectScheduler=A(Xs);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new qr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=A(gs);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Xr(e=>!e))}constructor(){A(Fu,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=A(wa);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=us.NULL){return this._injector.get(ws).run(()=>{if(hc(uc.BootstrapComponentStart),!this._injector.get(fm).done)throw new k(405,``);let r=Si(e),i=this._injector.get(Qp),a=new Vp(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=ch(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(rh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),lh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),hc(uc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){hc(uc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(Pu.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw hc(uc.ChangeDetectionEnd),new k(101,!1);let e=O(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,O(e),this.afterTick.next(),hc(uc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Jf,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++oo(e))){this.dirtyFlags|=2;return}this.dirtyFlags&=-8}attachView(e){let t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){let t=e;lh(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(e){this.internalErrorHandler(e)}this.components.push(e),this._injector.get(ih,[]).forEach(t=>t(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>lh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new k(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static ɵfac=function(t){return new(t||e)};static ɵprov=pl({token:e,factory:e.ɵfac})}return e})();function ch(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function lh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function uh(e,t,n){let r=t.get(fh);return r.add(e,n),()=>r.remove(e)}function dh(e){return(t,n)=>uh(t,n,e)}var fh=(()=>{class e{buckets=new Map;callbackBucket=new Map;applicationRef=A(sh);ngZone=A(ws);idleService=A(dl);add(e,t){let n=ph(t);this.callbackBucket.set(e,n);let r=this.buckets.get(n);r??(r={idleId:null,queue:new Set},this.buckets.set(n,r)),r.queue.add(e),this.scheduleBucket(r,t)}remove(e){let t=this.callbackBucket.get(e);if(t===void 0)return;this.callbackBucket.delete(e);let n=this.buckets.get(t);n&&(n.queue.delete(e),n.queue.size===0&&(this.cancelBucket(n),this.buckets.delete(t)))}scheduleBucket(e,t){if(e.idleId!==null)return;let n=ph(t),r=r=>{for(let t of e.queue)if(t(),this.applicationRef._tick(),e.queue.delete(t),this.callbackBucket.delete(t),r&&r.timeRemaining()===0&&!r.didTimeout)break;e.idleId=null,e.queue.size>0?this.scheduleBucket(e,t):this.buckets.delete(n)};e.idleId=this.idleService.requestOnIdle(e=>this.ngZone.run(()=>r(e)),t)}cancelBucket(e){e.idleId!==null&&(this.idleService.cancelOnIdle(e.idleId),e.idleId=null)}ngOnDestroy(){for(let e of this.buckets.values())this.cancelBucket(e);this.buckets.clear(),this.callbackBucket.clear()}static ɵprov=si({token:e,providedIn:`root`,factory:()=>new e})}return e})();function ph(e){return!e||e.timeout==null?``:`${e.timeout}`}function mh(e){let t=M(),n=wo();if($m(t,n),!nh(0,t))return;let r=t[9];jm(0,Im(t,n),e(()=>gh(0,t,n),r))}function hh(e,t,n){let r=t[9],i=t[1];if(e.loadingState!==vm.NOT_STARTED)return e.loadingPromise??Promise.resolve();let a=Im(t,n),o=Wm(i,e);e.loadingState=vm.IN_PROGRESS,Mm(1,a);let s=e.dependencyResolverFn,c=r.get(oc).add();return s?(e.loadingPromise=Promise.allSettled(s()).then(n=>{let r=!1,i=[],a=[];for(let e=0;e0&&(t.directiveRegistry=Um(t.directiveRegistry,i),e.providers=ua(!1,...i.map(e=>e.type))),a.length>0&&(t.pipeRegistry=Um(t.pipeRegistry,a))}}),e.loadingPromise.finally(()=>{e.loadingPromise=null,c()})):(e.loadingPromise=Promise.resolve().then(()=>{e.loadingPromise=null,e.loadingState=vm.COMPLETE,c()}),e.loadingPromise)}function gh(e,t,n){let r=t[1],i=t[n.index];if(!nh(e,t))return;let a=Im(t,n),o=Rm(r,n);switch(Nm(a),o.loadingState){case vm.NOT_STARTED:Ym(xm.Loading,n,i),hh(o,t,n),o.loadingState===vm.IN_PROGRESS&&eh(o,n,i);break;case vm.IN_PROGRESS:Ym(xm.Loading,n,i),eh(o,n,i);break;case vm.COMPLETE:Ym(xm.Complete,n,i);break;case vm.FAILED:Ym(xm.Error,n,i)}}function _h(e,t,n){return e===0?yh(t,n):e!==2||!yh(t,n)}function vh(e){return e!=null&&(e&1)==1}function yh(e,t){let n=e[9],r=Rm(e[1],t),i=Vl(n),a=vh(r.flags),o=Im(e,t)[Em]!==null;return!(a&&o&&i)}function bh(e,t,n,r,i,a,o,s,c,l){let u=M(),d=Co(),f=e+27,p=mm(u,d,e,null,0,0),m=u[9],h=Vl(m);if(d.firstCreatePass){Lu(`NgDefer`);let e={primaryTmplIndex:t,loadingTmplIndex:r??null,placeholderTmplIndex:i??null,errorTmplIndex:a??null,placeholderBlockConfig:null,loadingBlockConfig:null,dependencyResolverFn:n??null,loadingState:vm.NOT_STARTED,loadingPromise:null,providers:null,hydrateTriggers:null,debug:null,flags:l??0};c?.(d,e,s,o),zm(d,f,e)}let g=u[f];Yp(g,p,u);let _=null,v=null;if(g[6]?.length>0){let e=g[6][0].data;v=e.di??null,_=e.s}let y=[null,Sm.Initial,null,null,null,null,v,_,null,null];Lm(u,f,y);let b=null;v!==null&&h&&(b=m.get(Ll),b.add(v,{lView:u,tNode:p,lContainer:g}));let ee=()=>{Nm(y),v!==null&&b?.cleanup([v])};jm(0,y,()=>uo(u,ee)),lo(u,ee)}function xh(e){_h(0,M(),wo())&&mh(dh({timeout:e}))}function L(e,t,n,r){let i=M();return tp(i,Fo(),t)&&(Co(),Gd(es(),i,e,t,n,r)),L}var Sh=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let e=this.detach(n);this.attach(n,i),this.attach(r,e)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function Ch(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function wh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){O(r);let c=t.length-1;for(O(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=Ch(o,r,o,l,n);if(u!==0){u<0&&e.updateValue(o,l),o++;continue}let d=e.at(s),f=t[c],p=Ch(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new Oh,a??=Dh(e,o,s,n),Th(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)Eh(e,i,n,o,t[o]),o++}else if(t!=null){O(r);let c=t[Symbol.iterator]();O(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=Ch(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Oh,a??=Dh(e,o,s,n);let u=n(o,r);if(Th(e,i,o,u))e.updateValue(o,r),o++,s++,l=c.next();else if(!a.has(u))e.attach(o,e.create(o,r)),o++,s++,l=c.next();else{let r=n(o,t);i.set(r,e.detach(o)),s--}}}for(;!l.done;)Eh(e,i,n,e.length,l.value),l=c.next()}for(;o<=s;)e.destroy(e.detach(s--));i?.forEach(t=>{e.destroy(t)})}function Th(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Eh(e,t,n,r,i){if(Th(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Dh(e,t,n,r){let i=new Set;for(let a=t;a<=n;a++)i.add(r(a,e.at(a)));return i}var Oh=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function R(e,t,n,r,i,a,o,s){Lu(`NgControlFlow`);let c=M(),l=Co();return mm(c,l,e,t,n,r,i,no(l.consts,a),256,o,s),kh}function kh(e,t,n,r,i,a,o,s){Lu(`NgControlFlow`);let c=M(),l=Co();return mm(c,l,e,t,n,r,i,no(l.consts,a),512,o,s),kh}function z(e,t){Lu(`NgControlFlow`);let n=M(),r=Fo(),i=n[r]===wu?-1:n[r],a=i===-1?void 0:Fh(n,27+i);if(tp(n,r,e)){let r=O(null);try{if(a!==void 0&&Mf(a,0),e!==-1){let r=27+e,i=Fh(n,r),a=Bh(n[1],r),o=Kf(i,a,n);jf(i,nf(n,a,t,{dehydratedView:o}),0,rf(a,o))}}finally{O(r)}}else if(a!==void 0){let e=Af(a,0);e!==void 0&&(e[8]=t)}}var Ah=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-10}};function jh(e){return e}function Mh(e,t){return t}var Nh=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function B(e,t,n,r,i,a,o,s,c,l,u,d,f){Lu(`NgControlFlow`);let p=M(),m=Co(),h=c!==void 0,g=M(),_=new Nh(h,s?o.bind(g[15][8]):o);g[27+e]=_,mm(p,m,e+1,t,n,r,i,no(m.consts,a),256),h&&mm(p,m,e+2,c,l,u,d,no(m.consts,f),512)}var Ph=class extends Sh{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-10}at(e){return this.getLView(e)[8].$implicit}attach(e,t){let n=t[6];this.needsIndexUpdate||=e!==this.length,jf(this.lContainer,t,e,rf(this.templateTNode,n)),Ih(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Lh(this.lContainer,e),Rh(this.lContainer,e)}create(e,t){let n=Gf(this.lContainer,this.templateTNode.tView.ssrId);return nf(this.hostLView,this.templateTNode,new Ah(this.lContainer,t,e),{dehydratedView:n})}destroy(e){rd(e[1],e)}updateValue(e,t){this.getLView(e)[8].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e0){let e=n[9];Hu(e,r),Ou.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Lh(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function Rh(e,t){return Nf(e,t)}function zh(e,t){return Af(e,t)}function Bh(e,t){return Za(e,t)}function Vh(e,t,n){let r=M();return tp(r,Fo(),t)&&(Co(),Rd(es(),r,e,t,r[11],n)),Vh}function Hh(e,t,n,r,i){Zd(t,e,n,i?`class`:`style`,r)}function H(e,t,n,r){let i=M(),a=i[1],o=e+27,s=a.firstCreatePass?kp(o,i,2,t,Wd,yo(),n,r):a.data[o];if(Ha(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Xf(o),()=>(Uh(e,t,i,s,r),H))}}return Uh(e,t,i,s,r),H}function Uh(e,t,n,r,i){if(Jd(r,n,e,t,Kh),Ua(r)){let e=n[1];Pd(e,n,r),Wl(e,r,n)}i!=null&&Fd(n,r)}function U(){let e=Co(),t=Yd(wo());return e.firstCreatePass&&Ap(e,t),xo(t)&&So(),vo(),t.classesWithoutHost!=null&&Ec(t)&&Hh(e,t,M(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Dc(t)&&Hh(e,t,M(),t.stylesWithoutHost,!1),U}function Wh(e,t,n,r){return H(e,t,n,r),U(),Wh}function W(e,t,n,r){let i=M(),a=i[1],o=e+27,s=a.firstCreatePass?jp(o,a,2,t,n,r):a.data[o];return Jd(s,i,e,t,Kh),r!=null&&Fd(i,s),W}function G(){return xo(Yd(wo()))&&So(),vo(),G}function Gh(e,t,n,r){return W(e,t,n,r),G(),Gh}var Kh=(e,t,n,r,i)=>(ss(!0),tu(t[11],r,is()));function qh(){let e=Co(),t=Yd(wo());return e.firstCreatePass&&Ap(e,t),qh}function Jh(e,t,n){let r=M(),i=r[1],a=e+27,o=i.firstCreatePass?jp(a,i,8,`ng-container`,t,n):i.data[a];return Jd(o,r,e,`ng-container`,Zh),n!=null&&Fd(r,o),Jh}function Yh(){return Yd(wo()),qh}function Xh(e,t,n){return Jh(e,t,n),Yh(),Xh}var Zh=(e,t,n,r,i)=>(ss(!0),eu(t[11],``));function K(){return M()}function q(e,t,n){let r=M();return tp(r,Fo(),t)&&(Co(),zd(es(),r,e,t,r[11],n)),q}var Qh=void 0;function $h(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var eg=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],Qh,[[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],Qh,[[`B`,`A`],[`BC`,`AD`],[`Before Christ`,`Anno Domini`]],0,[6,0],[`M/d/yy`,`MMM d, y`,`MMMM d, y`,`EEEE, MMMM d, y`],[`h:mm a`,`h:mm:ss a`,`h:mm:ss a z`,`h:mm:ss a zzzz`],[`{1}, {0}`,Qh,Qh,Qh],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,$h],tg=Object.create(null);function ng(e){let t=ag(e),n=rg(t);if(n)return n;let r=t.split(`-`)[0];if(n=rg(r),n)return n;if(r===`en`)return eg;throw new k(701,!1)}function rg(e){if(!(e in tg)){let t=Ri.ng&&Ri.ng.common&&Ri.ng.common.locales&&Ri.ng.common.locales[e];return t!==void 0&&(tg[e]=t),t}return tg[e]}var ig={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function ag(e){return e.toLowerCase().replace(/_/g,`-`)}var og=`en-US`;function sg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function cg(e,t,n){let r=M(),i=Co(),a=wo();return lg(i,r,r[11],a,e,t,n),cg}function J(e,t,n){let r=M(),i=Co(),a=wo();return(a.type&3||n)&&op(a,i,r,n,r[11],e,t,ip(a,r,t)),J}function lg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=ip(r,t,a),op(r,e,t,o,n,i,a,c)&&(s=!1)),s){let e=r.outputs?.[i],n=r.hostDirectiveOutputs?.[i];if(n&&n.length)for(let e=0;e>17&32767}function fg(e){return(e&2)==2}function pg(e,t){return e&131071|t<<17}function mg(e){return e|2}function hg(e){return(e&131068)>>2}function gg(e,t){return e&-131069|t<<2}function _g(e){return(e&1)==1}function vg(e){return e|1}function yg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=dg(o),c=hg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ta(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=dg(e[s+1]);e[r+1]=ug(t,s),t!==0&&(e[t+1]=gg(e[t+1],r)),e[s+1]=pg(e[s+1],r)}else e[r+1]=ug(s,0),s!==0&&(e[s+1]=gg(e[s+1],r)),s=r}else e[r+1]=ug(c,0),s===0?s=r:e[c+1]=gg(e[c+1],r),c=r;l&&(e[r+1]=mg(e[r+1])),xg(e,u,r,!0),xg(e,u,r,!1),bg(t,u,e,r,a),o=ug(s,c),a?t.classBindings=o:t.styleBindings=o}function bg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ta(a,t)>=0&&(n[r+1]=vg(n[r+1]))}function xg(e,t,n,r){let i=e[n+1],a=t===null,o=r?dg(i):hg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Sg(n,t)&&(s=!0,e[o+1]=r?vg(i):mg(i)),o=r?dg(i):hg(i)}s&&(e[n+1]=r?mg(i):vg(i))}function Sg(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ta(e,t)>=0:!1}var Cg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function wg(e){return e.substring(Cg.key,Cg.keyEnd)}function Tg(e){return Dg(e),Eg(e,Og(e,0,Cg.textEnd))}function Eg(e,t){let n=Cg.textEnd;return n===t?-1:(t=Cg.keyEnd=kg(e,Cg.key=t,n),Og(e,t,n))}function Dg(e){Cg.key=0,Cg.keyEnd=0,Cg.value=0,Cg.valueEnd=0,Cg.textEnd=e.length}function Og(e,t,n){for(;t32;)t++;return t}function Ag(e,t,n){return Pg(e,t,n,!1),Ag}function jg(e,t){return Pg(e,t,null,!0),jg}function Mg(e){Fg(Gg,Ng,e,!0)}function Ng(e,t){for(let n=Tg(t);n>=0;n=Eg(t,n))$i(e,wg(t),!0)}function Pg(e,t,n,r){let i=M(),a=Co(),o=Io(2);if(a.firstUpdatePass&&Lg(a,e,o,r),t!==wu&&tp(i,o,t)){let s=a.data[Qo()];qg(a,s,i,i[11],e,i[o+1]=Xg(t,n),r,o)}}function Fg(e,t,n,r){let i=Co(),a=Io(2);i.firstUpdatePass&&Lg(i,null,a,r);let o=M();if(n!==wu&&tp(o,a,n)){let s=i.data[Qo()];if(Zg(s,r)&&!Ig(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=ni(e,n||``)),Hh(i,s,o,n,r)}else Kg(i,s,o,o[11],o[a+1],o[a+1]=Wg(e,t,n),r,a)}}function Ig(e,t){return t>=e.expandoStartIndex}function Lg(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[Qo()],o=Ig(e,n);Zg(a,r)&&t===null&&!o&&(t=!1),t=Rg(i,a,t,r),yg(i,a,t,n,o,r)}}function Rg(e,t,n,r){let i=Vo(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=Hg(null,e,t,n,r),n=Ug(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=Hg(i,e,t,n,r),a===null){let n=zg(e,t,r);n!==void 0&&Array.isArray(n)&&(n=Hg(null,e,t,n[1],r),n=Ug(n,t.attrs,r),Bg(e,t,r,n))}else a=Vg(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function zg(e,t,n){let r=n?t.classBindings:t.styleBindings;if(hg(r)!==0)return e[dg(r)]}function Bg(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[dg(i)]=r}function Vg(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===wu&&(u=l?ia:void 0);let d=l?ea(u,r):c===r?u:void 0;if(a&&!Yg(d)&&(d=ea(t,r)),Yg(d)&&(s=d,o))return s;let f=e[i+1];i=o?dg(f):hg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ea(e,r))}return s}function Yg(e){return e!==void 0}function Xg(e,t){return e==null||e===``||(typeof t==`string`?e=ql(e)+t:typeof e==`object`&&(e=ti(ql(e)))),e}function Zg(e,t){return!!(e.flags&(t?8:16))}function X(e,t=``){let n=M(),r=Co(),i=e+27,a=r.firstCreatePass?Lf(r,i,1,t,null):r.data[i],o=Qg(r,n,a,t);n[i]=o,os()&&fd(r,n,o,a),Do(a,!1)}var Qg=(e,t,n,r)=>(ss(!0),Ql(t[11],r));function $g(e,t,n,r=``){return tp(e,Fo(),n)?t+Ei(n)+r:wu}function e_(e,t,n,r,i,a=``){let o=np(e,No(),n,i);return Io(2),o?t+Ei(n)+r+Ei(i)+a:wu}function t_(e,t,n,r,i,a,o,s=``){let c=rp(e,No(),n,i,o);return Io(3),c?t+Ei(n)+r+Ei(i)+a+Ei(o)+s:wu}function Z(e){return Q(``,e),Z}function Q(e,t,n){let r=M(),i=$g(r,e,t,n);return i!==wu&&i_(r,Qo(),i),Q}function n_(e,t,n,r,i){let a=M(),o=e_(a,e,t,n,r,i);return o!==wu&&i_(a,Qo(),o),n_}function r_(e,t,n,r,i,a,o){let s=M(),c=t_(s,e,t,n,r,i,a,o);return c!==wu&&i_(s,Qo(),c),r_}function i_(e,t,n){let r=Ya(t,e);$l(e[11],r,n)}function a_(e,t){let n=Mo()+e,r=M();return r[n]===wu?$f(r,n,t()):ep(r,n)}function o_(e,t,n,r){return l_(M(),Mo(),e,t,n,r)}function s_(e,t){let n=e[t];return n===wu?void 0:n}function c_(e,t,n,r,i,a){let o=t+n;return tp(e,o,i)?$f(e,o+1,a?r.call(a,i):r(i)):s_(e,o+1)}function l_(e,t,n,r,i,a,o){let s=t+n;return np(e,s,i,a)?$f(e,s+2,o?r.call(o,i,a):r(i,a)):s_(e,s+2)}function u_(e,t){let n=Co(),r,i=e+27;n.firstCreatePass?(r=d_(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let a=r.factory||(r.factory=Ji(r.type,!0)),o=Ii(mp);try{let e=Rc(!1),t=a();return Rc(e),$a(n,M(),i,t),t}finally{Ii(o)}}function d_(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function f_(e,t,n){let r=e+27,i=M(),a=Qa(i,r);return m_(i,r)?c_(i,Mo(),t,a.transform,n,a):a.transform(n)}function p_(e,t,n,r){let i=e+27,a=M(),o=Qa(a,i);return m_(a,i)?l_(a,Mo(),t,o.transform,n,r,o):o.transform(n,r)}function m_(e,t){return e[1].data[t].pure}var h_=(()=>{class e{applicationErrorHandler=A(Ls);appRef=A(sh);taskService=A(gs);ngZone=A(ws);zonelessEnabled=A(Js);tracing=A(Fu,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new dr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ss):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(A(Ys,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let e=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(e);return}this.switchToMicrotaskScheduler(),this.taskService.remove(e)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let e=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})})}notify(e){if(!this.zonelessEnabled&&e===5)return;switch(e){case 0:case 2:this.appRef.dirtyFlags|=2;break;case 3:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 6:this.appRef.dirtyFlags|=2;break;case 12:this.appRef.dirtyFlags|=16;break;case 13:this.appRef.dirtyFlags|=2;break;case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let t=this.useMicrotaskScheduler?bs:ys;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>t(()=>this.tick())):this.ngZone.runOutsideAngular(()=>t(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(`isAngularZone_ID`+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(e){this.applicationErrorHandler(e)}finally{this.taskService.remove(e),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static ɵfac=function(t){return new(t||e)};static ɵprov=pl({token:e,factory:e.ɵfac})}return e})();function g_(){return[{provide:qs,useExisting:h_},{provide:ws,useClass:Ms},{provide:Js,useValue:!0}]}function __(){return typeof $localize<`u`&&$localize.locale||`en-US`}var v_=new mi(``,{factory:()=>A(v_,{optional:!0,skipSelf:!0})||__()}),y_=class{destroyed=!1;listeners=null;errorHandler=A(Is,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=A(fs);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new k(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?this.listeners.indexOf(e):-1;t>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[t]=null):this.listeners.splice(t,1))}}}emit(e){if(this.destroyed){console.warn($r(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=O(null);try{for(let t of this.listeners)try{t!==null&&t(e)}catch(e){this.errorHandler?.handleError(e)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&b_(this.listeners)),O(t),this.isEmitting=!1}}};function b_(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function $(e,t){return On(e,t?.equal)}function x_(e){return tr(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var S_=e=>e;function C_(e,t){return typeof e==`function`?w_(Zn(e,S_,t?.equal),t?.debugName,t?.set):w_(Zn(e.source,e.computation,e.equal),e.debugName,e.set)}function w_(e,t,n){let r=e[sn],i=e;if(n!==void 0){let t=e=>Qn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(x_(e)),t)}else i.set=e=>Qn(r,e),i.update=e=>$n(r,e);return i.asReadonly=zs.bind(e),i}function T_(e,t){let n=Object.create(cc);n.value=e,n.transformFn=t?.transform;function r(){if(un(n),n.value===sc)throw new k(-950,null);return n.value}return r[sn]=n,r}function E_(e){return new y_}function D_(e,t){return T_(e,t)}function O_(e){return T_(sc,e)}var k_=(D_.required=O_,D_),A_=new mi(``),j_=new mi(``);function M_(e){return!e.moduleRef}function N_(e){let t=M_(e)?e.r3Injector:e.moduleRef.injector,n=t.get(ws);return n.run(()=>{M_(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ls),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),M_(e)){let n=()=>t.destroy(),r=e.platformInjector.get(A_);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(A_);n.add(t),e.moduleRef.onDestroy(()=>{lh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return F_(r,n,()=>{let n=t.get(gs),r=n.add(),i=t.get(fm);return i.runInitializers(),i.donePromise.then(()=>{if(sg(t.get(v_,og)||`en-US`),!t.get(j_,!0))return M_(e)?t.get(sh):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(M_(e)){let n=t.get(sh);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return P_?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var P_;function F_(e,t,n){try{let r=n();return Xp(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var I_=null;function L_(e=[],t){return us.create({name:t,providers:[{provide:ya,useValue:`platform`},{provide:A_,useValue:new Set([()=>I_=null])},...e]})}function R_(e=[]){if(I_)return I_;let t=L_(e);return I_=t,ah(),z_(t),t}function z_(e){let t=e.get(Hs,null);Ia(e,()=>{t?.forEach(e=>e())})}function B_(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;hc(uc.BootstrapApplicationStart);try{let e=i?.injector??R_(r);return N_({r3Injector:new $p({providers:[g_(),Rs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{hc(uc.BootstrapApplicationEnd)}}var V_=null;function H_(){return V_}function U_(e){V_??=e}var W_=class{},G_=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(G_||{}),K_=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(K_||{}),q_=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(q_||{}),J_={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Y_(e){return ng(e)[ig.LocaleId]}function X_(e,t,n){let r=ng(e);return sv(sv([r[ig.DayPeriodsFormat],r[ig.DayPeriodsStandalone]],t),n)}function Z_(e,t,n){let r=ng(e);return sv(sv([r[ig.DaysFormat],r[ig.DaysStandalone]],t),n)}function Q_(e,t,n){let r=ng(e);return sv(sv([r[ig.MonthsFormat],r[ig.MonthsStandalone]],t),n)}function $_(e,t){let n=ng(e)[ig.Eras];return sv(n,t)}function ev(e,t){return sv(ng(e)[ig.DateFormat],t)}function tv(e,t){return sv(ng(e)[ig.TimeFormat],t)}function nv(e,t){let n=ng(e)[ig.DateTimeFormat];return sv(n,t)}function rv(e,t){let n=ng(e),r=n[ig.NumberSymbols][t];if(r===void 0){if(t===J_.CurrencyDecimal)return n[ig.NumberSymbols][J_.Decimal];if(t===J_.CurrencyGroup)return n[ig.NumberSymbols][J_.Group]}return r}function iv(e){if(!e[ig.ExtraData])throw new k(2303,!1)}function av(e){let t=ng(e);return iv(t),(t[ig.ExtraData][2]||[]).map(e=>typeof e==`string`?cv(e):[cv(e[0]),cv(e[1])])}function ov(e,t,n){let r=ng(e);return iv(r),sv(sv([r[ig.ExtraData][0],r[ig.ExtraData][1]],t)||[],n)||[]}function sv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new k(2304,!1)}function cv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var lv=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,uv=Object.create(null),dv=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,fv=256;function pv(e,t,n,r){let i=Iv(e);mv(t),t=gv(n,t)||t;let a=[],o;for(;t;)if(o=dv.exec(t),o){a=a.concat(o.slice(1));let e=a.pop();if(!e)break;t=e}else{a.push(t);break}let s=i.getTimezoneOffset();r&&(s=Nv(r,s),i=Fv(i,r));let c=``;return a.forEach(e=>{let t=Mv(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function mv(e){if(e.length>fv)throw new k(2300,!1)}function hv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function gv(e,t){let n=Y_(e);if(uv[n]??=Object.create(null),uv[n][t])return uv[n][t];let r=``;switch(t){case`shortDate`:r=ev(e,q_.Short);break;case`mediumDate`:r=ev(e,q_.Medium);break;case`longDate`:r=ev(e,q_.Long);break;case`fullDate`:r=ev(e,q_.Full);break;case`shortTime`:r=tv(e,q_.Short);break;case`mediumTime`:r=tv(e,q_.Medium);break;case`longTime`:r=tv(e,q_.Long);break;case`fullTime`:r=tv(e,q_.Full);break;case`short`:let t=gv(e,`shortTime`),n=gv(e,`shortDate`);r=_v(nv(e,q_.Short),[t,n]);break;case`medium`:let i=gv(e,`mediumTime`),a=gv(e,`mediumDate`);r=_v(nv(e,q_.Medium),[i,a]);break;case`long`:let o=gv(e,`longTime`),s=gv(e,`longDate`);r=_v(nv(e,q_.Long),[o,s]);break;case`full`:let c=gv(e,`fullTime`),l=gv(e,`fullDate`);r=_v(nv(e,q_.Full),[c,l])}return r&&(uv[n][t]=r),r}function _v(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function vv(e,t,n=`-`,r,i){let a=``;(e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,a=n));let o=String(e);for(;o.length0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return yv(s,t);let c=rv(o,J_.MinusSign);return vv(s,t,c,r,i)}}function xv(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new k(2301,!1)}}function Sv(e,t,n=G_.Format,r=!1){return function(i,a){return Cv(i,a,e,t,n,r)}}function Cv(e,t,n,r,i,a){switch(n){case 2:return Q_(t,i,r)[e.getMonth()];case 1:return Z_(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=av(t),a=ov(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+vv(o,2,a)+vv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+vv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+vv(o,2,a)+`:`+vv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+vv(o,2,a)+`:`+vv(Math.abs(i%60),2,a);default:throw new k(2310,!1)}}}var Tv=0,Ev=4;function Dv(e){let t=hv(e,Tv,1).getDay();return hv(e,0,1+(t<=Ev?Ev:11)-t)}function Ov(e){let t=e.getDay(),n=t===0?-3:Ev-t;return hv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function kv(e,t=!1){return function(n,r){let i;if(t){let e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();i=1+Math.floor((t+e)/7)}else{let e=Ov(n),t=Dv(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return vv(i,e,rv(r,J_.MinusSign))}}function Av(e,t=!1){return function(n,r){return vv(Ov(n).getFullYear(),e,rv(r,J_.MinusSign),t)}}var jv=Object.create(null);function Mv(e){if(jv[e])return jv[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Sv(3,K_.Abbreviated);break;case`GGGG`:t=Sv(3,K_.Wide);break;case`GGGGG`:t=Sv(3,K_.Narrow);break;case`y`:t=bv(0,1,0,!1,!0);break;case`yy`:t=bv(0,2,0,!0,!0);break;case`yyy`:t=bv(0,3,0,!1,!0);break;case`yyyy`:t=bv(0,4,0,!1,!0);break;case`Y`:t=Av(1);break;case`YY`:t=Av(2,!0);break;case`YYY`:t=Av(3);break;case`YYYY`:t=Av(4);break;case`M`:case`L`:t=bv(1,1,1);break;case`MM`:case`LL`:t=bv(1,2,1);break;case`MMM`:t=Sv(2,K_.Abbreviated);break;case`MMMM`:t=Sv(2,K_.Wide);break;case`MMMMM`:t=Sv(2,K_.Narrow);break;case`LLL`:t=Sv(2,K_.Abbreviated,G_.Standalone);break;case`LLLL`:t=Sv(2,K_.Wide,G_.Standalone);break;case`LLLLL`:t=Sv(2,K_.Narrow,G_.Standalone);break;case`w`:t=kv(1);break;case`ww`:t=kv(2);break;case`W`:t=kv(1,!0);break;case`d`:t=bv(2,1);break;case`dd`:t=bv(2,2);break;case`c`:case`cc`:t=bv(7,1);break;case`ccc`:t=Sv(1,K_.Abbreviated,G_.Standalone);break;case`cccc`:t=Sv(1,K_.Wide,G_.Standalone);break;case`ccccc`:t=Sv(1,K_.Narrow,G_.Standalone);break;case`cccccc`:t=Sv(1,K_.Short,G_.Standalone);break;case`E`:case`EE`:case`EEE`:t=Sv(1,K_.Abbreviated);break;case`EEEE`:t=Sv(1,K_.Wide);break;case`EEEEE`:t=Sv(1,K_.Narrow);break;case`EEEEEE`:t=Sv(1,K_.Short);break;case`a`:case`aa`:case`aaa`:t=Sv(0,K_.Abbreviated);break;case`aaaa`:t=Sv(0,K_.Wide);break;case`aaaaa`:t=Sv(0,K_.Narrow);break;case`b`:case`bb`:case`bbb`:t=Sv(0,K_.Abbreviated,G_.Standalone,!0);break;case`bbbb`:t=Sv(0,K_.Wide,G_.Standalone,!0);break;case`bbbbb`:t=Sv(0,K_.Narrow,G_.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Sv(0,K_.Abbreviated,G_.Format,!0);break;case`BBBB`:t=Sv(0,K_.Wide,G_.Format,!0);break;case`BBBBB`:t=Sv(0,K_.Narrow,G_.Format,!0);break;case`h`:t=bv(3,1,-12);break;case`hh`:t=bv(3,2,-12);break;case`H`:t=bv(3,1);break;case`HH`:t=bv(3,2);break;case`m`:t=bv(4,1);break;case`mm`:t=bv(4,2);break;case`s`:t=bv(5,1);break;case`ss`:t=bv(5,2);break;case`S`:t=bv(6,1);break;case`SS`:t=bv(6,2);break;case`SSS`:t=bv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=wv(0);break;case`ZZZZZ`:t=wv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=wv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=wv(2);break;default:return null}return jv[e]=t,t}function Nv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function Pv(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Fv(e,t,n){let r=e.getTimezoneOffset();return Pv(e,-1*(Nv(t,r)-r))}function Iv(e){if(Rv(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[t,n=1,r=1]=e.split(`-`).map(e=>+e);return hv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(lv))return Lv(n)}let t=new Date(e);if(!Rv(t))throw new k(2311,!1);return t}function Lv(e){let t=new Date(0),n=0,r=0,i=e[8]?t.setUTCFullYear:t.setFullYear,a=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,s=Number(e[5]||0)-r,c=Number(e[6]||0),l=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return a.call(t,o,s,c,l),t}function Rv(e){return e instanceof Date&&!isNaN(e.valueOf())}function zv(e,t){return new k(2100,!1)}var Bv=`mediumDate`,Vv=new mi(``),Hv=new mi(``),Uv=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(t,n,r,i){if(t==null||t===``||t!==t)return null;try{let e=n??this.defaultOptions?.dateFormat??Bv,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return pv(t,e,i||this.locale,a)}catch(t){throw zv(e,t.message)}}static ɵfac=function(t){return new(t||e)(mp(v_,16),mp(Vv,24),mp(Hv,24))};static ɵpipe=om({name:`date`,type:e,pure:!0})}return e})(),Wv=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=om({name:`json`,type:e,pure:!1})}return e})();function Gv(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let e=n.indexOf(`=`),[r,i]=e==-1?[n,``]:[n.slice(0,e),n.slice(e+1)];if(r.trim()!==t)continue;let a=i;try{a=decodeURIComponent(i)}catch{}return a.length>1&&a[0]===`"`&&a[a.length-1]===`"`&&(a=a.slice(1,-1)),a}return null}var Kv=`browser`,qv=class{_doc;constructor(e){this._doc=e}manager},Jv=(()=>{class e extends qv{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,r){return e.addEventListener(t,n,r),()=>this.removeEventListener(e,t,n,r)}removeEventListener(e,t,n,r){return e.removeEventListener(t,n,r)}static ɵfac=function(t){return new(t||e)(Ui(ds))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})(),Yv=new mi(``),Xv=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(e=>{e.manager=this});let n=e.filter(e=>!(e instanceof Jv));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof Jv);r&&this._plugins.push(r)}addEventListener(e,t,n,r){return this._findPluginFor(t).addEventListener(e,t,n,r)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(t=>t.supports(e)),!t)throw new k(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(Ui(Yv),Ui(ws))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})(),Zv=`ng-app-id`;function Qv(e){for(let t of e)t.remove()}function $v(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function ey(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Zv}="${t}"],link[${Zv}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Zv),e instanceof HTMLLinkElement?r.set(e.href.slice(e.href.lastIndexOf(`/`)+1),{usage:0,elements:[e]}):e.textContent&&n.set(e.textContent,{usage:0,elements:[e]});return!0}function ty(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var ny=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,r={}){this.doc=e,this.appId=t,this.nonce=n,ey(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,$v);t?.forEach(e=>this.addUsage(e,this.external,ty))}removeStyles(e,t){for(let t of e)this.removeUsage(t,this.inline);t?.forEach(e=>this.removeUsage(e,this.external))}addUsage(e,t,n){let r=t.get(e);r?r.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(t=>this.addElement(t,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(Qv(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Qv(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,$v(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,ty(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let r of t.elements)r.parentNode===e?r.remove():n.push(r);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute(`nonce`,this.nonce),e.appendChild(t)}static ɵfac=function(t){return new(t||e)(Ui(ds),Ui(Bs),Ui(Ws,8),Ui(Us))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})(),ry={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},iy=/%COMP%/g,ay=`%COMP%`,oy=`_nghost-${ay}`,sy=`_ngcontent-${ay}`,cy=!0,ly=new mi(``,{factory:()=>cy}),uy=new mi(``);function dy(e){return sy.replace(iy,e)}function fy(e){return oy.replace(iy,e)}function py(e,t){return t.map(t=>t.replace(iy,e))}var my=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,t,n,r,i,a,o=null,s=null,c=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=r,this.doc=i,this.ngZone=a,this.nonce=o,this.tracingService=s,this.cssVarNamespace=c??``,this.defaultRenderer=new hy(e,i,a,this.tracingService,this.cssVarNamespace)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof yy?n.applyToHost(e):n instanceof vy&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,r=n.get(t.id);if(!r){let i=this.doc,a=this.ngZone,o=this.eventManager,s=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,l=this.tracingService;switch(t.encapsulation){case Gl.Emulated:r=new yy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case Gl.ShadowDom:return new _y(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case Gl.ExperimentalIsolatedShadowDom:return new _y(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new vy(o,s,t,c,i,a,l,this.cssVarNamespace)}n.set(t.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(t){return new(t||e)(Ui(Xv),Ui(fp),Ui(Bs),Ui(ly),Ui(ds),Ui(ws),Ui(Ws),Ui(Fu,8),Ui(uy,8))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})(),hy=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(ry[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(gy(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=gy(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new k(-5106,!1);r.insertBefore(t,n)}}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e==`string`?this.doc.querySelector(e):e;if(!n)throw new k(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=ry[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=ry[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(Tu.DashCase|Tu.Important)?e.style.setProperty(t,n,r&Tu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Tu.DashCase?e.style.removeProperty(t):e.style[t]=``}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e==`string`&&(e=H_().getGlobalEventTarget(this.doc,e),!e))throw new k(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function gy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var _y=class extends hy{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,i,a,o,s,c){super(e,r,i,o,s),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=py(n.id,l).map(e=>e.replace(/%NS%/g,s));for(let e of l){let t=document.createElement(`style`);a&&t.setAttribute(`nonce`,a),t.textContent=e,this.shadowRoot.appendChild(t)}let u=n.getExternalStyles?.();if(u)for(let e of u){let t=ty(e,r);a&&t.setAttribute(`nonce`,a),this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},vy=class extends hy{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,a,o,s,c){super(e,i,a,o,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let l=n.styles,u=c?py(c,l):l;this.styles=u.map(e=>e.replace(/%NS%/g,s)),this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Ou.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},yy=class extends vy{contentAttr;hostAttr;constructor(e,t,n,r,i,a,o,s,c){let l=r+`-`+n.id;super(e,t,n,i,a,o,s,c,l),this.contentAttr=dy(l),this.hostAttr=fy(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,``)}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,``),n}},by=class e extends W_{supportsDOMEvents=!0;static makeCurrent(){U_(new e)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t||=this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t===`window`?window:t===`document`?e:t===`body`?e.body:null}getBaseHref(e){let t=Sy();return t==null?null:Cy(t)}resetBaseElement(){xy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Gv(document.cookie,e)}},xy=null;function Sy(){return xy||=document.head.querySelector(`base`),xy?xy.getAttribute(`href`):null}function Cy(e){return new URL(e,document.baseURI).pathname}var wy=[`alt`,`control`,`meta`,`shift`],Ty={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Ey={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Dy=(()=>{class e extends qv{constructor(e){super(e)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,n,r,i){let a=e.parseEventName(n),o=e.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>H_().onAndCancel(t,a.domEventName,o,i))}static parseEventName(t){let n=t.toLowerCase().split(`.`),r=n.shift();if(n.length===0||r!==`keydown`&&r!==`keyup`)return null;let i=e._normalizeKey(n.pop()),a=``,o=n.indexOf(`code`);if(o>-1&&(n.splice(o,1),a=`code.`),wy.forEach(e=>{let t=n.indexOf(e);t>-1&&(n.splice(t,1),a+=e+`.`)}),a+=i,n.length!=0||i.length===0)return null;let s={};return s.domEventName=r,s.fullKey=a,s}static matchEventFullKeyCode(e,t){let n=Ty[e.key]||e.key,r=``;return t.indexOf(`code.`)>-1&&(n=e.code,r=`code.`),n==null||!n?!1:(n=n.toLowerCase(),n===` `?n=`space`:n===`.`&&(n=`dot`),wy.forEach(t=>{if(t!==n){let n=Ey[t];n(e)&&(r+=t+`.`)}}),r+=n,r===t)}static eventCallback(t,n,r){return i=>{e.matchEventFullKeyCode(i,t)&&r.runGuarded(()=>n(i))}}static _normalizeKey(e){return e===`esc`?`escape`:e}static ɵfac=function(t){return new(t||e)(Ui(ds))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})();async function Oy(e,t,n){return B_({rootComponent:e,...ky(t,n)})}function ky(e,t){return{platformRef:t?.platformRef,appProviders:[...Py,...e?.providers??[]],platformProviders:Ny}}function Ay(){by.makeCurrent()}function jy(){return new Is}function My(){return Al(document),document}var Ny=[{provide:Us,useValue:Kv},{provide:Hs,useValue:Ay,multi:!0},{provide:ds,useFactory:My}],Py=[{provide:ya,useValue:`root`},{provide:Is,useFactory:jy},{provide:Yv,useClass:Jv,multi:!0},{provide:Yv,useClass:Dy,multi:!0},my,{provide:fp,useClass:ny},{provide:ny,useExisting:fp},Xv,{provide:Jf,useExisting:my},[]];function Fy(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e{let r=new zy({code:i,why:Ly(a.why,e),fix:Ly(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:Ly(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Hy(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n{e=n,t=r}),resolve:e,reject:t}}var Jy=Math.random.bind(Math),Yy=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Xy(e=21){let t=``,n=e;for(;n--;)t+=Yy[Jy()*64|0];return t}var Zy=6e4,Qy=e=>e,$y=Qy,{clearTimeout:eb,setTimeout:tb}=globalThis;function nb(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Qy,deserialize:s=$y,resolver:c,bind:l=`rpc`,timeout:u=Zy,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=qy(),_=Xy();s.i=_;let v;async function y(n=s){return u>=0&&(v=tb(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{eb(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(eb(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function rb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var ib=Object.freeze({type:`object`,additionalProperties:!0});function ab(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return ib}return ib}function ob(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;rn[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function cb(e,t){return sb(e,t)??[e]}function lb(e){return typeof e==`string`?`'${e}'`:new pb().serialize(e)}var ub=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,db=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[ub.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function fb(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;ia?-1:1)}return e.length===t.length?r:e.lengththis.compare(e[0],t[0])),r=`${e}{`;for(let e=0;ethis.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),mb=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],hb=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],gb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,_b=[],vb=class{_data=new yb;_hash=new yb([...mb]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)_b[n]=e[t+n]|0;else{let e=_b[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=_b[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;_b[n]=t+_b[n-7]+i+_b[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+hb[n]+_b[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=yb.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function bb(e){return new vb().finalize(e).toBase64()}function xb(e){return bb(lb(e))}function Sb(e){return xb(e)}function Cb(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var wb=/^[\w+.-]{2,}:\/\//;function Tb(e){return e.endsWith(`/`)?e:`${e}/`}function Eb(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Db(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Tb(n)+e.replace(/^\.?\//,``):e);return n}function Ob(e,t){if(!t||t===`/`||wb.test(e))return e;let n=Eb(t);return e.startsWith(n)?e:Db(n,e)}function kb(e,t){let n=e.match(wb);return t+(n?e.slice(n[0].length):e)}var Ab=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function jb(e=21){let t=``,n=e;for(;n--;)t+=Ab[Math.random()*64|0];return t}var Mb=Symbol.for(`immer-nothing`),Nb=Symbol.for(`immer-draftable`),Pb=Symbol.for(`immer-state`),Fb=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function Ib(e,...t){{let n=Fb[e],r=ox(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var Lb=Object,Rb=Lb.getPrototypeOf,zb=`constructor`,Bb=`prototype`,Vb=`configurable`,Hb=`enumerable`,Ub=`writable`,Wb=`value`,Gb=e=>!!e&&!!e[Pb];function Kb(e){return e?Yb(e)||nx(e)||!!e[Nb]||!!e[zb]?.[Nb]||rx(e)||ix(e):!1}var qb=Lb[Bb][zb].toString(),Jb=new WeakMap;function Yb(e){if(!e||!ax(e))return!1;let t=Rb(e);if(t===null||t===Lb[Bb])return!0;let n=Lb.hasOwnProperty.call(t,zb)&&t[zb];if(n===Object)return!0;if(!ox(n))return!1;let r=Jb.get(n);return r===void 0&&(r=Function.toString.call(n),Jb.set(n,r)),r===qb}function Xb(e,t,n=!0){Zb(e)===0?(n?Reflect.ownKeys(e):Lb.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Zb(e){let t=e[Pb];return t?t.type_:nx(e)?1:rx(e)?2:ix(e)?3:0}var Qb=(e,t,n=Zb(e))=>n===2?e.has(t):Lb[Bb].hasOwnProperty.call(e,t),$b=(e,t,n=Zb(e))=>n===2?e.get(t):e[t],ex=(e,t,n,r=Zb(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function tx(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var nx=Array.isArray,rx=e=>e instanceof Map,ix=e=>e instanceof Set,ax=e=>typeof e==`object`,ox=e=>typeof e==`function`,sx=e=>typeof e==`boolean`;function cx(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var lx=e=>ax(e)?e?.[Pb]:null,ux=e=>e.copy_||e.base_,dx=e=>e.modified_?e.copy_:e.base_;function fx(e,t){if(rx(e))return new Map(e);if(ix(e))return new Set(e);if(nx(e))return Array[Bb].slice.call(e);let n=Yb(e);if(t===!0||t===`class_only`&&!n){let t=Lb.getOwnPropertyDescriptors(e);delete t[Pb];let n=Reflect.ownKeys(t);for(let r=0;r1&&Lb.defineProperties(e,{set:hx,add:hx,clear:hx,delete:hx}),Lb.freeze(e),t&&Xb(e,(e,t)=>{px(t,!0)},!1),e)}function mx(){Ib(2)}var hx={[Wb]:mx};function gx(e){return e===null||!ax(e)||Lb.isFrozen(e)}var _x=`MapSet`,vx=`Patches`,yx=`ArrayMethods`,bx={};function xx(e){let t=bx[e];return t||Ib(0,e),t}var Sx=e=>!!bx[e];function Cx(e,t){bx[e]||(bx[e]=t)}var wx,Tx=()=>wx,Ex=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Sx(_x)?xx(_x):void 0,arrayMethodsPlugin_:Sx(yx)?xx(yx):void 0});function Dx(e,t){t&&(e.patchPlugin_=xx(vx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ox(e){kx(e),e.drafts_.forEach(jx),e.drafts_=null}function kx(e){e===wx&&(wx=e.parent_)}var Ax=e=>wx=Ex(wx,e);function jx(e){let t=e[Pb];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Mx(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Pb].modified_&&(Ox(t),Ib(4)),Kb(e)&&(e=Nx(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Pb].base_,e,t)}else e=Nx(t,n);return Px(t,e,!0),Ox(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Mb?void 0:e}function Nx(e,t){if(gx(t))return t;let n=t[Pb];if(!n)return Hx(t,e.handledSet_,e);if(!Ix(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Bx(n,e)}return n.copy_}function Px(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&px(t,n)}function Fx(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ix=(e,t)=>e.scope_===t,Lx=[];function Rx(e,t,n,r){let i=ux(e),a=e.type_;if(r!==void 0&&$b(i,r,a)===t){ex(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Xb(i,(e,n)=>{if(Gb(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Lx;for(let e of o)ex(i,e,n,a)}function zx(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Ix(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=dx(i);Rx(e,i.draft_??i,a,n),Bx(i,r)})}function Bx(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Fx(e)}}function Vx(e,t,n){let{scope_:r}=e;if(Gb(n)){let i=n[Pb];Ix(i,r)&&i.callbacks_.push(function(){Zx(e),Rx(e,n,dx(i),t)})}else Kb(n)&&e.callbacks_.push(function(){let i=ux(e);e.type_===3?i.has(n)&&Hx(n,r.handledSet_,r):$b(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Hx($b(e.copy_,t,e.type_),r.handledSet_,r)})}function Hx(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Gb(e)||t.has(e)||!Kb(e)||gx(e)?e:(t.add(e),Xb(e,(r,i)=>{if(Gb(i)){let t=i[Pb];Ix(t,n)&&(ex(e,r,dx(t),e.type_),Fx(t))}else Kb(i)&&Hx(i,t,n)}),e)}function Ux(e,t){let n=nx(e),r={type_:+!!n,scope_:t?t.scope_:Tx(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Wx;n&&(i=[r],a=Gx);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Wx={get(e,t){if(t===Pb)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=ux(e);if(!Qb(i,t,e.type_))return Jx(e,i,t);let a=i[t];if(e.finalized_||!Kb(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&cx(t))return a;if(a===Kx(e.base_,t)||qx(e,t,a)){Zx(e);let n=e.type_===1?+t:t,r=$x(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in ux(e)},ownKeys(e){return Reflect.ownKeys(ux(e))},set(e,t,n){let r=Yx(ux(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Kx(ux(e),t),i=r?.[Pb];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(tx(n,r)&&(n!==void 0||Qb(e.base_,t,e.type_)))return!0;Zx(e),Xx(e)}return e.copy_[t]===n&&(n!==void 0||Qb(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Vx(e,t,n),!0)},deleteProperty(e,t){return Zx(e),Kx(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Xx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=ux(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Ub]:!0,[Vb]:e.type_!==1||t!==`length`,[Hb]:r[Hb],[Wb]:n[t]}},defineProperty(){Ib(11)},getPrototypeOf(e){return Rb(e.base_)},setPrototypeOf(){Ib(12)}},Gx={};for(let e in Wx){let t=Wx[e];Gx[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Gx.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Ib(13),Gx.set.call(this,e,t,void 0)},Gx.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&Ib(14),Wx.set.call(this,e[0],t,n,e[0])};function Kx(e,t){let n=e[Pb];return(n?ux(n):e)[t]}function qx(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Kb(n)||n[Pb]?!1:e.baseRefs_.has(n)}function Jx(e,t,n){let r=Yx(t,n);return r?Wb in r?r[Wb]:r.get?.call(e.draft_):void 0}function Yx(e,t){if(!(t in e))return;let n=Rb(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Rb(n)}}function Xx(e){e.modified_||(e.modified_=!0,e.parent_&&Xx(e.parent_))}function Zx(e){e.copy_||=(e.assigned_=new Map,fx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Qx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(ox(e)&&!ox(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}ox(t)||Ib(6),n!==void 0&&!ox(n)&&Ib(7);let r;if(Kb(e)){let i=Ax(this),a=$x(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Ox(i):kx(i)}return Dx(i,n),Mx(r,i)}if(!e||!ax(e)){if(r=t(e),r===void 0&&(r=e),r===Mb&&(r=void 0),this.autoFreeze_&&px(r,!0),n){let t=[],i=[];xx(vx).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Ib(1,e)},this.produceWithPatches=(e,t)=>{if(ox(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},sx(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),sx(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),sx(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Kb(e)||Ib(8),Gb(e)&&(e=eS(e));let t=Ax(this),n=$x(t,e,void 0);return n[Pb].isManual_=!0,kx(t),n}finishDraft(e,t){let n=e&&e[Pb];(!n||!n.isManual_)&&Ib(9);let{scope_:r}=n;return Dx(r,t),Mx(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=xx(vx).applyPatches_;return Gb(e)?r(e,t):this.produce(e,e=>r(e,t))}};function $x(e,t,n,r){let[i,a]=rx(t)?xx(_x).proxyMap_(t,n):ix(t)?xx(_x).proxySet_(t,n):Ux(t,n);return(n?.scope_??Tx()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?zx(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function eS(e){return Gb(e)||Ib(10,e),tS(e)}function tS(e){if(!Kb(e)||gx(e))return e;let t=e[Pb],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=fx(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=fx(e,!0);return Xb(n,(e,t)=>{ex(n,e,tS(t))},r),t&&(t.finalized_=!1),n}function nS(){Fb.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=lx($b(e,n.key_)),i=$b(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||Qb(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=$b(o,e,c),f=$b(s,e,c),p=l?Qb(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===Mb?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e[e,u(t)]));if(ix(e))return new Set(Array.from(e).map(u));let t=Object.create(Rb(e));for(let n in e)t[n]=u(e[n]);return Qb(e,Nb)&&(t[Nb]=e[Nb]),t}function d(e){return Gb(e)?u(e):e}Cx(vx,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var rS=new Qx,iS=rS.produce,aS=rS.produceWithPatches.bind(rS),oS=rS.applyPatches.bind(rS),sS=1e3;function cS(e,t){if(e.add(t),e.size>sS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function lS(e){let{enablePatches:t=!1}=e;t&&nS();let n=Cb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=jb())=>{i.has(t)||(nS(),r=oS(r,e),cS(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=jb())=>{if(!i.has(a)){if(cS(i,a),t){let[t,i]=aS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=iS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var uS=typeof self==`object`?self:globalThis,dS=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),fS=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function pS(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=dS.has(e)?uS[e]:void 0;return n(new(r??uS.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&fS.has(a))return n(new uS[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function mS(e){return pS(new Map,e)(0)}var hS=``,{toString:gS}={},{keys:_S}=Object;function vS(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=gS.call(e).slice(8,-1);switch(n){case`Array`:return[1,hS];case`Object`:return[2,hS];case`Date`:return[3,hS];case`RegExp`:return[4,hS];case`Map`:return[5,hS];case`Set`:return[6,hS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function yS([e,t]){return e===0&&(t===`function`||t===`symbol`)}function bS(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=vS(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of _S(r))(e||!yS(vS(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(yS(vS(n))||yS(vS(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!yS(vS(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function xS(e,t={}){let n=[];return bS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:SS,stringify:CS}=JSON,wS={json:!0,lossy:!0};function TS(e){return mS(SS(e))}function ES(e){return CS(xS(e,wS))}function DS(e){return mS(e)}function OS(e){return ES(e)}function kS(e){return TS(e)}var AS=256,jS=class extends Error{name=`StreamClosedError`};function MS(e={}){let t=e.id??jb(),n=Math.max(0,e.replayWindow??0),r=Cb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new jS(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=PS(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function NS(e={}){let t=e.id??jb(),n=Math.max(1,e.highWaterMark??AS),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function PS(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var FS=128;function IS(e){return e.replace(/[^\w-]+/g,`_`).slice(0,FS)}var LS=`modulepreload`,RS=function(e,t){return new URL(e,t).href},zS={},BS=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=RS(t,n),t=s(t),t in zS)return;zS[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:LS,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},VS=`__connection.json`,HS=`__DEVFRAME_CONNECTION__`,US=`x-birpc-session`,WS=`__rpc-dump/index.json`,GS=`devframe:services`,KS=`devframe_otp`,qS=`devframe_auth_token`;Uy.postMessage.remoteAssetsError;var JS=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Sb(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},YS=Ky({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function XS(e){if(e.agent&&e.jsonSerializable===!1)throw YS.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function ZS(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function QS(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function $S(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function nC(e,t){let n=e.handler;if(!n){let r=await tC(e,t);if(!r.handler)throw YS.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await $S(e.name,r,t),o=await a(...n);return await eC(e.name,i,o)}}var rC=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return nC(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw YS.DF0021({name:e.name});XS(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw YS.DF0022({name:e.name});XS(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await nC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw YS.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function iC(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw oC(t,`undefined`,r,e);return n}return i!==null&&aC(i,r,e,t),n})}function aC(e,t,n,r){if(typeof e==`bigint`)throw oC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw oC(r,`Map`,t,n);if(e instanceof Set)throw oC(r,`Set`,t,n);if(e instanceof Date)throw oC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw oC(r,e.constructor?.name??`class instance`,t,n)}function oC(e,t,n,r){let i=sC(n,r);return YS.DF0020({name:e||``,type:t,path:i})}function sC(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var cC=`__DEVFRAME_CONNECTION_META__`,lC=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function uC(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function dC(){return uC(HS)}function fC(){return uC(cC)}function pC(e){if(e)return e;try{let e=localStorage.getItem(lC);if(e)return e}catch{}return uC(lC)}function mC(e){globalThis[HS]=e,globalThis[cC]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&hC(e.authToken)}function hC(e){try{localStorage.setItem(lC,e)}catch{}globalThis[lC]=e;let t=dC();t&&(globalThis[HS]={...t,authToken:e})}function gC(e){let t=Ob(VS,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function _C(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function vC(){let e=dC();if(e)return _C(e,pC()??e.authToken??e.connectionMeta.authToken);let t=fC();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??gC(`./`),authToken:pC(t.authToken)}}async function yC(e={}){if(e.connection){let t=_C(e.connection,pC(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return mC(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:gC(t[0]??`./`),authToken:pC(e.authToken??e.connectionMeta.authToken)};return mC(n),n}let n=vC();if(n){let t=_C(n,pC(e.authToken??n.authToken??n.connectionMeta.authToken));return mC(t),t}let r=[];for(let n of t){let t=Ob(VS,n),i=gC(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:pC(e.authToken??r.authToken)};return mC(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var bC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function xC(e=KS){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function SC(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function CC(e=KS){let t=xC(e);return t&&SC(e),t}async function wC(e,t={}){let n=CC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function TC(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(GS,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function EC(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:Uy.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:Uy.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=lS({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(Uy.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var DC=new Map;function OC(e=DC){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?iC(n,r??``):`s:${OS(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?kS(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function kC(){}function AC(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function jC(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function MC(e){let{onConnected:t=kC,onError:n=kC,onDisconnected:r=kC,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${qS}=${encodeURIComponent(e.authToken)}`);let s=OC(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function v(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=AC(r);if(!e)break;r=e.rest;let{event:t,data:n}=jC(e.frame);n.length>0&&_(t,n.join(` -`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[US]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function NC(e,t){let{channel:n,rpcOptions:r={}}=t;return nb(e,{...n,timeout:-1,...r,proxify:!1})}function PC(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(Uy.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new bC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new bC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Uy.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new bC(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(Uy.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(Uy.client.connectionError,e),m(new bC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new bC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=NC(a.functions,{channel:v,rpcOptions:o});a.register({name:Uy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new bC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Uy.client.connectionError,e),m(e),i.emit(Uy.client.isTrustedUpdated,!1)}});let b=n;async function ee(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new bC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Uy.client.connectionError,e)}return i.emit(Uy.client.isTrustedUpdated,c),t.isTrusted}async function te(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Uy.client.isTrustedUpdated,!0)),t}async function ne(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function re(){return c?!0:ee(b??``)}async function x(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:re,requestTrustWithToken:ee,requestTrustWithCode:te,requestAuthCode:ne,ensureTrusted:x,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Uy.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(Uy.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Uy.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function FC(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function IC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=FC(n.sse,r??`./`,location);return PC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>MC({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function LC(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:RC(r)?LC(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function RC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function zC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function BC(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function VC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function HC(e){if(e.error)throw LC(e.error);return e.output}function UC(e){return e.some(e=>e!=null)}function WC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function GC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?DS(e):e}function a(e,t){return i(WC(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return VC(r)?HC(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(zC(r)){if(UC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(BC(r)){let e=Sb(n),i=r.records[e];if(i)return HC(await s(i,r.serialization));if(r.fallback)return HC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!UC(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function KC(e){let t=GC(await e.fetchJsonFromBases(WS),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var qC=``;function JC(e,t){return`${e}${qC}${t}`}function YC(e){let t=new Map,n=new Map;e.client.register({name:Uy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(JC(e,n))?._push(r,i)}}),e.client.register({name:Uy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=JC(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Uy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=JC(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Uy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(qC);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=JC(n,r),o=t.get(a);if(o)return o;let s=NS({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Uy.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=JC(t,r),a=n.get(i);if(a)return a;let o=MS({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function XC(){}var ZC=new Map;function QC(e){let t=e.url;e.authToken&&(t=`${t}?${qS}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=XC,onError:i=XC,onDisconnected:a=XC,definitions:o=ZC}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=OC(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function $C(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return kb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function ew(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=$C(n.websocket,r??`./`,location);return PC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>QC({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function tw(e){return e.includes(`:`)}function nw(e,t){return tw(t)?t:`${e}:${t}`}function rw(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function iw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return rw(a)}function aw(e,t){return{global:iw(e,t,`global`),project:iw(e,t,`project`)}}function ow(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(tw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(nw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(nw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(nw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(nw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(nw(t,n),r,i),upload:(n,r)=>e.streaming.upload(nw(t,n),r)}},settings:aw(e,t),scope:e.scope}}function sw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function cw(e,t={}){let n=t.modelContext??sw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=IS(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=rb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:ob(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>lw(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function lw(e,t,n){try{let r=cb(n,e.args?.length);return{content:[{type:`text`,text:uw(await(await nC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:dw(e)}]}}}function uw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function dw(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function fw(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function pw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Cb(),a=Array.isArray(t)?t:[t],o=await yC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new JS({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new rC(f),m=e.webmcp===!1?void 0:cw(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Ob(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=fw(e.transport??`auto`,s),b=y===`static`?await KC({fetchJsonFromBases:_}):y===`sse`?IC({...v,sseOptions:e.sseOptions}):ew({...v,wsOptions:e.wsOptions}),ee;try{ee=new BroadcastChannel(`devframe-auth`)}catch{}let te,ne=!1;function re(e){return((...t)=>ne||!te?e(...t):te.then(()=>e(...t)))}function x(){g=!0;try{h?.(),m?.()}finally{try{ee?.close()}finally{b.close?.()}}}let ie={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(hC(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;hC(t),o={...o,authToken:t};try{ee?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:re(b.call),callEvent:re(b.callEvent),callOptional:re(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:x};ie.sharedState=EC(ie),ie.streaming=YC(ie),ie.services=TC(ie);let ae=new Map;ie.scope=(e=>{if(!e)return ie;let t=ae.get(e);return t||(t=ow(ie,e),ae.set(e,t)),t}),f.rpc=ie;function oe(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function se(){if(e.simpleAuth!==!1&&oe()&&typeof globalThis.prompt==`function`)for(await ie.requestAuthCode().catch(()=>{});!ie.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await ie.requestTrustWithCode(t))return}}async function S(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await wC(ie,{param:n}):!1;t||r||ie.isTrusted||await se()}return te=S().then(()=>{ne=!0},()=>{ne=!0}),s.mcp&&BS(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-44OHts1W.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ie))}).catch(()=>{}),ee&&(ee.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ie.requestTrustWithToken(e.data.authToken)}),ie}var mw=pw;function hw(e,t){e&1&&(W(0,`dt`),X(1,`Analog`),G(),W(2,`dd`),X(3),G()),e&2&&(I(3),Z(t))}var gw=class e{rpc=k_(null);navigate=E_();meta=F(null);componentCount=F(0);routeCount=F(0);signalCount=F(0);providerCount=F(0);storeCount=F(0);constructor(){$s(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);t.rpc.call(`build-meta`).then(e=>this.meta.set(e)).catch(()=>{}),t.rpc.call(`get-components`).then(e=>this.componentCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-routes`).then(e=>this.routeCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-signals`).then(e=>this.signalCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-providers`).then(e=>this.providerCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-ngrx-store`).then(e=>this.storeCount.set(e.length)).catch(()=>{})})}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:57,vars:10,consts:[[1,`grid`],[1,`card`],[1,`card`,`clickable`,3,`click`],[1,`big`],[1,`sub`]],template:function(e,t){if(e&1&&(W(0,`div`,0)(1,`div`,1)(2,`h2`),X(3,`Project`),G(),W(4,`dl`)(5,`dt`),X(6,`Name`),G(),W(7,`dd`),X(8),G(),W(9,`dt`),X(10,`Angular`),G(),W(11,`dd`),X(12),G(),W(13,`dt`),X(14,`TypeScript`),G(),W(15,`dd`),X(16),G(),W(17,`dt`),X(18,`SSR`),G(),W(19,`dd`),X(20),G(),R(21,hw,4,1),G()(),W(22,`div`,2),J(`click`,function(){return t.navigate.emit(`components`)}),W(23,`h2`),X(24,`Components`),G(),W(25,`p`,3),X(26),G(),W(27,`p`,4),X(28,`discovered in source`),G()(),W(29,`div`,2),J(`click`,function(){return t.navigate.emit(`routes`)}),W(30,`h2`),X(31,`Routes`),G(),W(32,`p`,3),X(33),G(),W(34,`p`,4),X(35,`registered paths`),G()(),W(36,`div`,2),J(`click`,function(){return t.navigate.emit(`signals`)}),W(37,`h2`),X(38,`Signals`),G(),W(39,`p`,3),X(40),G(),W(41,`p`,4),X(42,`reactive primitives`),G()(),W(43,`div`,2),J(`click`,function(){return t.navigate.emit(`injectors`)}),W(44,`h2`),X(45,`Injectors`),G(),W(46,`p`,3),X(47),G(),W(48,`p`,4),X(49,`DI providers`),G()(),W(50,`div`,2),J(`click`,function(){return t.navigate.emit(`store`)}),W(51,`h2`),X(52,`NgRx Store`),G(),W(53,`p`,3),X(54),G(),W(55,`p`,4),X(56,`store entries`),G()()()),e&2){let e;I(8),Z(t.meta()?.projectName??`…`),I(4),Z(t.meta()?.angularVersion??`…`),I(4),Z(t.meta()?.typescript??`…`),I(4),Z(t.meta()?.ssr?`Yes`:`No`),I(),z((e=t.meta()?.analog)?21:-1,e),I(5),Z(t.componentCount()),I(7),Z(t.routeCount()),I(7),Z(t.signalCount()),I(7),Z(t.providerCount()),I(7),Z(t.storeCount())}},styles:[`.grid[_ngcontent-%COMP%] { +`);return r>=0?n.slice(0,r):n}function ni(e,t){return e?t?`${e} ${t}`:e:t||``}var ri=ei({__forward_ref__:ei});function ii(e){return e.__forward_ref__=ii,e}function ai(e){return oi(e)?e():e}function oi(e){return typeof e==`function`&&Object.hasOwn(e,ri)&&e.__forward_ref__===ii}function si(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function ci(e){return li(e,fi)}function li(e,t){return Object.hasOwn(e,t)&&e[t]||null}function ui(e){return(e?.[fi]??null)||null}function di(e){return e&&Object.hasOwn(e,pi)?e[pi]:null}var fi=ei({ɵprov:ei}),pi=ei({ɵinj:ei}),mi=class{_desc;ngMetadataName=`InjectionToken`;ɵprov;constructor(e,t){this._desc=e,this.ɵprov=void 0,typeof t==`number`?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.ɵprov=si({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function hi(e){return e&&!!e.ɵproviders}var gi=ei({ɵcmp:ei}),_i=ei({ɵdir:ei}),vi=ei({ɵpipe:ei}),yi=ei({ɵfac:ei}),bi=ei({__NG_ELEMENT_ID__:ei}),xi=ei({__NG_ENV_ID__:ei});function Si(e){return Ti(e,`@Component`),e[gi]||null}function Ci(e){return Ti(e,`@Directive`),e[_i]||null}function wi(e){return Ti(e,`@Pipe`),e[vi]||null}function Ti(e,t){if(e==null)throw new k(-919,!1)}function Ei(e){return typeof e==`string`?e:e==null?``:String(e)}var Di=ei({ngErrorCode:ei}),Oi=ei({ngErrorMessage:ei}),ki=ei({ngTokenPath:ei});function Ai(e,t){return Mi(``,-200,t)}function ji(e,t){throw new k(-201,!1)}function Mi(e,t,n){let r=new k(t,e);return r[Di]=t,r[Oi]=e,n&&(r[ki]=n),r}function Ni(e){return e[Di]}var Pi;function Fi(){return Pi}function Ii(e){let t=Pi;return Pi=e,t}function Li(e,t,n){let r=ci(e);if(r&&r.providedIn==`root`)return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;ji(e,``)}var Ri=globalThis,zi={},Bi=`__NG_DI_FLAG__`,Vi=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Wi(t)||0;try{return this.injector.get(e,n&8?null:zi,n)}catch(e){if(Xn(e))return e;throw e}}};function Hi(e,t=0){let n=qn();if(n===void 0)throw new k(-203,!1);if(n===null)return Li(e,void 0,t);{let r=Gi(t),i=n.retrieve(e,r);if(Xn(i)){if(r.optional)return null;throw i}return i}}function Ui(e,t=0){return(Fi()||Hi)(ai(e),t)}function A(e,t){return Ui(e,Wi(t))}function Wi(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Gi(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Ki(e){let t=[];for(let n=0;nArray.isArray(e)?Yi(e,t):t(e))}function Xi(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Zi(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Qi(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function $i(e,t,n){let r=ta(e,t);return r>=0?e[r|1]=n:(r=~r,Qi(e,r,t,n)),r}function ea(e,t){let n=ta(e,t);if(n>=0)return e[n|1]}function ta(e,t){return na(e,t,1)}function na(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let a=r+(i-r>>1),o=e[a<t?i=a:r=a+1}return~(i<{n.push(e)};return Yi(t,e=>{let t=e;fa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&da(i,a),n}function da(e,t){for(let n=0;n{t(e,r)})}}function fa(e,t,n,r){if(e=ai(e),!e)return!1;let i=null,a=di(e),o=!a&&Si(e);if(!a&&!o){let t=e.ngModule;if(a=di(t),a)i=t;else return!1}else if(o&&!o.standalone)return!1;else i=e;let s=r.has(i);if(o){if(s)return!1;if(r.add(i),o.dependencies){let e=typeof o.dependencies==`function`?o.dependencies():o.dependencies;for(let i of e)fa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{Yi(a.imports,i=>{fa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&da(e,t)}if(!s){let e=Ji(i)||(()=>new i);t({provide:i,useFactory:e,deps:ia},i),t({provide:sa,useValue:i,multi:!0},i),t({provide:aa,useValue:()=>Ui(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;pa(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function pa(e,t){for(let n of e)hi(n)&&(n=n.ɵproviders),Array.isArray(n)?pa(n,t):t(n)}var ma=ei({provide:String,useValue:ei});function ha(e){return typeof e==`object`&&!!e&&ma in e}function ga(e){return!!(e&&e.useExisting)}function _a(e){return!!(e&&e.useFactory)}function va(e){return typeof e==`function`}var ya=new mi(``),ba={},xa={},Sa=void 0;function Ca(){return Sa===void 0&&(Sa=new ca),Sa}var wa=class{},Ta=class extends wa{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Fa(e,e=>this.processProvider(e)),this.records.set(oa,ja(void 0,this)),r.has(`environment`)&&this.records.set(wa,ja(void 0,this));let i=this.records.get(ya);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(sa,ia,{self:!0}))}retrieve(e,t){let n=Wi(t)||0;try{return this.get(e,zi,n)}catch(e){if(Xn(e))return e;throw e}}destroy(){Aa(this),this._destroyed=!0;let e=O(null);try{for(let e of this._ngOnDestroyHooks)e.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let t of e)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),O(e)}}onDestroy(e){return Aa(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Aa(this);let t=Jn(this),n=Ii(void 0);try{return e()}finally{Jn(t),Ii(n)}}get(e,t=zi,n){if(Aa(this),Object.hasOwn(e,xi))return e[xi](this);let r=Wi(n),i=Jn(this),a=Ii(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Pa(e)&&ci(e);t=n&&this.injectableDefInScope(n)?ja(Ea(e),ba):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ca():this.parent;return t=r&8&&t===zi?null:t,n.get(e,t)}catch(e){let t=Ni(e);throw t===-200||t===-201?new k(t,null):e}finally{Ii(a),Jn(i)}}resolveInjectorInitializers(){let e=O(null),t=Jn(this),n=Ii(void 0);try{let e=this.get(aa,ia,{self:!0});for(let t of e)t()}finally{Jn(t),Ii(n),O(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=ai(e);let t=va(e)?e:ai(e&&e.provide),n=Oa(e);if(!va(e)&&e.multi===!0){let n=this.records.get(t);n||(n=ja(void 0,ba,!0),n.factory=()=>Ki(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=O(null);try{if(t.value===xa)throw Ai(``);return t.value===ba&&(t.value=xa,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Na(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{O(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=ai(e.providedIn);return typeof t==`string`?t===`any`||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Ea(e){let t=ci(e),n=t===null?Ji(e):t.factory;if(n!==null)return n;if(e instanceof mi)throw new k(-204,!1);if(e instanceof Function)return Da(e);throw new k(-204,!1)}function Da(e){if(e.length>0)throw new k(-204,!1);let t=ui(e);return t===null?()=>new e:()=>t.factory(e)}function Oa(e){return ha(e)?ja(void 0,e.useValue):ja(ka(e),ba)}function ka(e,t,n){let r;if(va(e)){let t=ai(e);return Ji(t)||Ea(t)}if(ha(e))r=()=>ai(e.useValue);else if(_a(e))r=()=>e.useFactory(...Ki(e.deps||[]));else if(ga(e))r=(t,n)=>Ui(ai(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=ai(e&&(e.useClass||e.provide));if(Ma(e))r=()=>new t(...Ki(e.deps));else return Ji(t)||Ea(t)}return r}function Aa(e){if(e.destroyed)throw new k(-205,!1)}function ja(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ma(e){return!!e.deps}function Na(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Pa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Fa(e,t){for(let n of e)Array.isArray(n)?Fa(n,t):n&&hi(n)?Fa(n.ɵproviders,t):t(n)}function Ia(e,t){let n;e instanceof Ta?(Aa(e),n=e):n=new Vi(e);let r=Jn(n),i=Ii(void 0);try{return t()}finally{Jn(r),Ii(i)}}function La(){return Fi()!==void 0||qn()!=null}var Ra=1;function za(e){return Array.isArray(e)&&typeof e[Ra]==`object`}function Ba(e){return Array.isArray(e)&&e[Ra]===!0}function Va(e){return!!(e.flags&4)}function Ha(e){return e.componentOffset>-1}function Ua(e){return(e.flags&1)==1}function Wa(e){return!!e.template}function Ga(e){return!!(e[2]&512)}function Ka(e){return(e[2]&256)==256}var qa=`math`;function Ja(e){for(;Array.isArray(e);)e=e[0];return e}function Ya(e,t){return Ja(t[e])}function Xa(e,t){return Ja(t[e.index])}function Za(e,t){return e.data[t]}function Qa(e,t){return e[t]}function $a(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function eo(e,t){let n=t[e];return za(n)?n:n[0]}function to(e){return(e[2]&128)==128}function no(e){return Ba(e[3])}function ro(e,t){return t==null?null:e[t]}function io(e){e[17]=0}function ao(e){e[2]&1024||(e[2]|=1024,to(e)&&lo(e))}function oo(e,t){for(;e>0;)t=t[14],e--;return t}function so(e){return!!(e[2]&9216||e[24]?.dirty)}function co(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),so(e)&&lo(e)}function lo(e){e[10].changeDetectionScheduler?.notify(0);let t=po(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!to(t)));)t=po(t)}function uo(e,t){if(Ka(e))throw new k(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function fo(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function po(e){let t=e[3];return Ba(t)?t[3]:t}function mo(e){return e[7]??=[]}function ho(e){return e.cleanup??=[]}var j={lFrame:Yo(null),bindingsEnabled:!0,skipHydrationRootTNode:null},go=!1;function _o(){return j.lFrame.elementDepthCount}function vo(){j.lFrame.elementDepthCount++}function yo(){j.lFrame.elementDepthCount--}function bo(){return j.bindingsEnabled}function xo(){return j.skipHydrationRootTNode!==null}function So(e){return j.skipHydrationRootTNode===e}function Co(){j.skipHydrationRootTNode=null}function M(){return j.lFrame.lView}function wo(){return j.lFrame.tView}function N(e){return j.lFrame.contextLView=e,e[8]}function P(e){return j.lFrame.contextLView=null,e}function To(){let e=Eo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Eo(){return j.lFrame.currentTNode}function Do(){let e=j.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Oo(e,t){let n=j.lFrame;n.currentTNode=e,n.isParent=t}function ko(){return j.lFrame.isParent}function Ao(){j.lFrame.isParent=!1}function jo(){return j.lFrame.contextLView}function Mo(){return go}function No(e){let t=go;return go=e,t}function Po(){let e=j.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Fo(){return j.lFrame.bindingIndex}function Io(e){return j.lFrame.bindingIndex=e}function Lo(){return j.lFrame.bindingIndex++}function Ro(e){let t=j.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function zo(){return j.lFrame.inI18n}function Bo(e,t){let n=j.lFrame;n.bindingIndex=n.bindingRootIndex=e,Ho(t)}function Vo(){return j.lFrame.currentDirectiveIndex}function Ho(e){j.lFrame.currentDirectiveIndex=e}function Uo(e){let t=j.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Wo(e){j.lFrame.currentQueryIndex=e}function Go(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function Ko(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=Go(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=j.lFrame=Jo();return r.currentTNode=t,r.lView=e,!0}function qo(e){let t=Jo(),n=e[1];j.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Jo(){let e=j.lFrame,t=e===null?null:e.child;return t===null?Yo(e):t}function Yo(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Xo(){let e=j.lFrame;return j.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Zo=Xo;function Qo(){let e=Xo();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function $o(e){return(j.lFrame.contextLView=oo(e,j.lFrame.contextLView))[8]}function es(){return j.lFrame.selectedIndex}function ts(e){j.lFrame.selectedIndex=e}function ns(){let e=j.lFrame;return Za(e.tView,e.selectedIndex)}function rs(){j.lFrame.currentNamespace=`svg`}function is(){as()}function as(){j.lFrame.currentNamespace=null}function os(){return j.lFrame.currentNamespace}var ss=!0;function cs(){return ss}function ls(e){ss=e}function us(e,t=null,n=null,r){let i=ds(e,t,n,r);return i.resolveInjectorInitializers(),i}function ds(e,t=null,n=null,r,i=new Set){return new Ta([n||ia,la(e)],t||Ca(),null,i)}var fs=class e{static THROW_IF_NOT_FOUND=zi;static NULL=new ca;static create(e,t){if(Array.isArray(e))return us({name:``},t,e,``);{let t=e.name??``;return us({name:t},e.parent,e.providers,t)}}static ɵprov=si({token:e,providedIn:`any`,factory:()=>Ui(oa)});static __NG_ELEMENT_ID__=-1},ps=new mi(``),ms=class{static __NG_ELEMENT_ID__=gs;static __NG_ENV_ID__=e=>e},hs=class extends ms{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Ka(this._lView)}onDestroy(e){let t=this._lView;return uo(t,e),()=>fo(t,e)}};function gs(){return new hs(M())}var _s=new mi(``),vs=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Yr(!1);debugTaskTracker=A(_s,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Rr(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),this.debugTaskTracker?.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.debugTaskTracker?.remove(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static ɵprov=si({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ys=class extends qr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,La()&&(this.destroyRef=A(ms,{optional:!0})??void 0,this.pendingTasks=A(vs,{optional:!0})??void 0)}emit(e){let t=O(null);try{super.next(e)}finally{O(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),a=n;if(e&&typeof e==`object`){let t=e;r=t.next?.bind(t),i=t.error?.bind(t),a=t.complete?.bind(t)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&=this.wrapInTimeout(r),a&&=this.wrapInTimeout(a));let o=super.subscribe({next:r,error:i,complete:a});return e instanceof dr&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}};function bs(...e){}function xs(e){let t,n;function r(){e=bs;try{n!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame==`function`&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Ss(e){return queueMicrotask(()=>e()),()=>{e=bs}}var Cs=`isAngularZone`,ws=`isAngularZone_ID`,Ts=0,Es=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ys(!1);onMicrotaskEmpty=new ys(!1);onStable=new ys(!1);onError=new ys(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new k(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=i,As(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Cs)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new k(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new k(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let i=this._inner,a=i.scheduleEventTask(`NgZoneEvent: `+r,e,Ds,bs,bs);try{return i.runTask(a,t,n)}finally{i.cancelTask(a)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},Ds={};function Os(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function ks(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){xs(()=>{e.callbackScheduled=!1,js(e),e.isCheckStableRunning=!0,Os(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),js(e)}function As(e){let t=()=>{ks(e)},n=Ts++;e._inner=e._inner.fork({name:`angular`,properties:{[Cs]:!0,[ws]:n,[ws+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Fs(s))return n.invokeTask(i,a,o,s);try{return Ms(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ns(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Ms(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Is(s)&&t(),Ns(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,js(e),Os(e)):i.change==`macroTask`&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,n,r,i)=>(t.handleError(r,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}function js(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Ms(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ns(e){e._nesting--,Os(e)}var Ps=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ys;onMicrotaskEmpty=new ys;onStable=new ys;onError=new ys;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function Fs(e){return Ls(e,`__ignore_ng_zone__`)}function Is(e){return Ls(e,`__scheduler_tick__`)}function Ls(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Rs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},zs=new mi(``,{factory:()=>{let e=A(Es),t=A(wa),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Rs),n.handleError(r))})}}}),Bs={provide:aa,useValue:()=>{A(Rs,{optional:!0})},multi:!0};function F(e,t){let[n,r,i]=Rn(e,t?.equal),a=n;return a[sn],a.set=r,a.update=i,a.asReadonly=Vs.bind(a),a}function Vs(){let e=this[sn];if(e.readonlyFn===void 0){let t=()=>this();t[sn]=e,e.readonlyFn=t}return e.readonlyFn}var Hs=new mi(``,{factory:()=>Us}),Us=`ng`,Ws=new mi(``),Gs=new mi(``,{providedIn:`platform`,factory:()=>`unknown`}),Ks=new mi(``,{factory:()=>A(ps).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),qs=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=Js}return e})();function Js(){return new qs(M(),To())}var Ys=class{},Xs=new mi(``,{factory:()=>!0}),Zs=new mi(``),Qs=(()=>{class e{static ɵprov=si({token:e,providedIn:`root`,factory:()=>new $s})}return e})(),$s=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)e||=t===null?this.flushQueue(n):t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},ec=class{[sn];constructor(e){this[sn]=e}destroy(){this[sn].destroy()}};function tc(e,t){let n=t?.injector??A(fs),r=t?.manualCleanup===!0?null:n.get(ms),i,a=n.get(qs,null,{optional:!0}),o=n.get(Ys);return a===null?i=oc(e,n.get(Qs),o):(i=ac(a.view,o,e),r instanceof hs&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new ec(i)}var nc={...Wn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=No(!1);try{Gn(this)}finally{No(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=O(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],O(e)}}},rc={...nc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(Sn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},ic={...nc,consumerMarkedDirty(){this.view[2]|=8192,lo(this.view),this.notifier.notify(13)},destroy(){if(Sn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function ac(e,t,n){let r=Object.create(ic);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=sc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function oc(e,t,n){let r=Object.create(rc);return r.fn=sc(r,e),r.scheduler=t,r.notifier=n,r.zone=typeof Zone<`u`?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function sc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}var cc=(()=>{class e{internalPendingTasks=A(vs);scheduler=A(Ys);errorHandler=A(zs);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let t=this.add();try{e().catch(this.errorHandler).finally(t)}catch(e){this.errorHandler(e),t()}}static ɵprov=si({token:e,providedIn:`root`,factory:()=>new e})}return e})(),lc=Symbol(`InputSignalNode#UNSET`),uc={...Hn,transformFn:void 0,applyValueToInputSignal(e,t){Bn(e,t)}};function dc(e){return{toString:e}.toString()}var fc=(function(e){return e[e.TemplateCreateStart=0]=`TemplateCreateStart`,e[e.TemplateCreateEnd=1]=`TemplateCreateEnd`,e[e.TemplateUpdateStart=2]=`TemplateUpdateStart`,e[e.TemplateUpdateEnd=3]=`TemplateUpdateEnd`,e[e.LifecycleHookStart=4]=`LifecycleHookStart`,e[e.LifecycleHookEnd=5]=`LifecycleHookEnd`,e[e.OutputStart=6]=`OutputStart`,e[e.OutputEnd=7]=`OutputEnd`,e[e.BootstrapApplicationStart=8]=`BootstrapApplicationStart`,e[e.BootstrapApplicationEnd=9]=`BootstrapApplicationEnd`,e[e.BootstrapComponentStart=10]=`BootstrapComponentStart`,e[e.BootstrapComponentEnd=11]=`BootstrapComponentEnd`,e[e.ChangeDetectionStart=12]=`ChangeDetectionStart`,e[e.ChangeDetectionEnd=13]=`ChangeDetectionEnd`,e[e.ChangeDetectionSyncStart=14]=`ChangeDetectionSyncStart`,e[e.ChangeDetectionSyncEnd=15]=`ChangeDetectionSyncEnd`,e[e.AfterRenderHooksStart=16]=`AfterRenderHooksStart`,e[e.AfterRenderHooksEnd=17]=`AfterRenderHooksEnd`,e[e.ComponentStart=18]=`ComponentStart`,e[e.ComponentEnd=19]=`ComponentEnd`,e[e.DeferBlockStateStart=20]=`DeferBlockStateStart`,e[e.DeferBlockStateEnd=21]=`DeferBlockStateEnd`,e[e.DynamicComponentStart=22]=`DynamicComponentStart`,e[e.DynamicComponentEnd=23]=`DynamicComponentEnd`,e[e.HostBindingsUpdateStart=24]=`HostBindingsUpdateStart`,e[e.HostBindingsUpdateEnd=25]=`HostBindingsUpdateEnd`,e})(fc||{}),pc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function mc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var hc=null,gc=(()=>{hc=vc;let e=()=>vc;return e.ngInherit=!0,e})();function _c(){return hc}function vc(e){return e.type.prototype.ngOnChanges&&(e.setInput=bc),yc}function yc(){let e=Sc(this),t=e?.current;if(t){let n=e.previous;if(n===ra)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function bc(e,t,n,r,i){let a=this.declaredInputs[r],o=Sc(e)||Cc(e,{previous:ra,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new pc(l&&l.currentValue,n,c===ra),mc(e,t,i,n)}var xc=`__ngSimpleChanges__`;function Sc(e){return Object.hasOwn(e,xc)&&e[xc]||null}function Cc(e,t){return e[xc]=t}var wc=[],Tc=function(e,t=null,n){for(let r=0;r=r)break}else t[c]<0&&(e[17]+=65536),(s>14>16&&(e[2]&3)===t&&(e[2]+=16384,Mc(o,a)):Mc(o,a)}var Pc=-1,Fc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function Ic(e){return!!(e.flags&8)}function Lc(e){return!!(e.flags&16)}function Rc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function Kc(e,t){let n=Gc(e),r=t;for(;n>0;)r=r[14],n--;return r}var qc=!0;function Jc(e){let t=qc;return qc=e,t}var Yc=255,Xc=5,Zc=0,Qc={};function $c(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,bi)&&(r=n[bi]),r??=n[bi]=Zc++;let i=r&Yc,a=1<>Xc)]|=a}function el(e,t){let n=nl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,tl(r.data,e),tl(t,null),tl(r.blueprint,null));let i=rl(e,t),a=e.injectorIndex;if(Uc(i)){let e=Wc(i),n=Kc(i,t),r=n[1].data;for(let i=0;i<8;i++)t[a+i]=n[e+i]|r[e+i]}return t[a+8]=i,a}function tl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function nl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function rl(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=vl(i),r===null)return Pc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Pc}function il(e,t,n){$c(e,t,n)}function al(e,t,n){if(n&8||e!==void 0)return e;ji(t,`NodeInjector`)}function ol(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ii(void 0);try{return i?i.get(t,r,n&8):Li(t,r,n&8)}finally{Ii(a)}}return al(r,t,n)}function sl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=_l(e,t,n,r,Qc);if(i!==Qc)return i}let i=cl(e,t,n,r,Qc);if(i!==Qc)return i}return ol(t,n,r,i)}function cl(e,t,n,r,i){let a=fl(n);if(typeof a==`function`){if(!Ko(t,e,r))return r&1?al(i,n,r):ol(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))ji(n);else return e}finally{Zo()}}else if(typeof a==`number`){let i=null,o=nl(e,t),s=Pc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?rl(e,t):t[o+8],s===Pc||!ml(r,!1)?o=-1:(i=t[1],o=Wc(s),t=Kc(s,t)));o!==-1;){let e=t[1];if(pl(a,o,e.data)){let e=ll(o,t,n,i,r,c);if(e!==Qc)return e}s=t[o+8],s!==Pc&&ml(r,t[1].data[o+8]===c)&&pl(a,o,t)?(i=e,o=Wc(s),t=Kc(s,t)):o=-1}}return i}function ll(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=ul(s,o,n,r==null?Ha(s)&&qc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?Qc:dl(t,o,c,s,i)}function ul(e,t,n,r,i){let a=e.providerIndexes,o=t.data,s=a&1048575,c=e.directiveStart,l=e.directiveEnd,u=a>>20,d=r?s:s+u,f=i?s+u:l;for(let e=d;e=c&&t.type===n)return e}if(i){let e=o[c];if(e&&Wa(e)&&e.type===n)return c}return null}function dl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Fc){let s=a;if(s.resolving)throw Ai(``);let c=Jc(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ii(s.injectImpl):null;Ko(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Ec(n,o[n],t)}finally{l!==null&&Ii(l),Jc(c),s.resolving=!1,Zo()}}return a}function fl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,bi)?e[bi]:void 0;return typeof t==`number`?t>=0?t&Yc:gl:t}function pl(e,t,n){let r=1<>Xc)]&r)}function ml(e,t){return!(e&2)&&!(e&1&&t)}var hl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return sl(this._tNode,this._lView,e,Wi(n),t)}};function gl(){return new hl(To(),M())}function _l(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!Ga(o);){let e=cl(a,o,n,r|2,Qc);if(e!==Qc)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,Qc,r);if(t!==Qc)return t}t=vl(o),o=o[14]}a=t}return i}function vl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}var yl=()=>(typeof requestIdleCallback<`u`?requestIdleCallback:e=>setTimeout(e)).bind(globalThis),bl=()=>(typeof requestIdleCallback<`u`?cancelIdleCallback:clearTimeout).bind(globalThis),xl=new mi(``,{factory:()=>new Sl}),Sl=class{requestIdleCallback=yl();cancelIdleCallback=bl();requestOnIdle(e,t){return this.requestIdleCallback(e,t)}cancelOnIdle(e){return this.cancelIdleCallback(e)}};function Cl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function wl(){return Tl(To(),M())}function Tl(e,t){return new El(Xa(e,t))}var El=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=wl}return e})();function Dl(e){return(e.flags&128)==128}var Ol=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Ol||{}),kl=new Map,Al=0;function jl(){return Al++}function Ml(e){kl.set(e[19],e)}function Nl(e){kl.delete(e[19])}var Pl=`__ngContext__`;function Fl(e,t){za(t)?(e[Pl]=t[19],Ml(t)):e[Pl]=t}function Il(e){return Rl(e[12])}function Ll(e){return Rl(e[4])}function Rl(e){for(;e!==null&&!Ba(e);)e=e[4];return e}var zl=void 0;function Bl(e){zl=e}function Vl(){if(zl!==void 0)return zl;if(typeof document<`u`)return document;throw new k(210,!1)}var Hl=!1,Ul=new mi(``,{factory:()=>Hl}),Wl=new mi(``),Gl=new WeakMap;function Kl(e,t){if(typeof e!=`object`||!e)return;let n=Gl.get(e);n||(n=new WeakSet,Gl.set(e,n)),n.add(t)}var ql=new mi(``);function Jl(e){return(e.flags&32)==32}var Yl=()=>null;function Xl(e,t,n=!1){return Yl(e,t,n)}function Zl(e){return e.get(Wl,!1,{optional:!0})}function Ql(e,t){let n=e.contentQueries;if(n!==null){let r=O(null);try{for(let r=0;r|^->||--!>|)/g,ou=`​$1​`;function su(e){return e.replace(iu,e=>e.replace(au,ou))}function cu(e,t){return e.createText(t)}function lu(e,t,n){e.setValue(t,n)}function uu(e,t){return e.createComment(su(t))}function du(e,t,n){return e.createElement(t,n)}function fu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function pu(e,t,n){e.appendChild(t,n)}function mu(e,t,n,r,i){r===null?pu(e,t,n):fu(e,t,n,r,i)}function hu(e,t,n,r){e.removeChild(null,t,n,r)}function gu(e,t,n){e.setAttribute(t,`style`,n)}function _u(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function vu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Rc(e,t,r),i!==null&&_u(e,t,i),a!==null&&gu(e,t,a)}function yu(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var bu=`ng-template`;function xu(e,t,n,r){let i=0;if(r){for(;i-1){let e;for(;++ia?``:i[u+1].toLowerCase(),r&2&&l!==e){if(Tu(r))return!1;o=!0}}}}}return Tu(r)||o}function Tu(e){return!(e&1)}function Eu(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let n=!1;for(;i-1)for(n++;n0?`="`+t+`"`:``)+`]`}else r&8?i+=`.`+o:r&4&&(i+=` `+o)}else i!==``&&!Tu(o)&&(t+=Au(a,i),i=``),r=o,a||=!Tu(r);n++}return i!==``&&(t+=Au(a,i)),t}function Mu(e){return e.map(ju).join(`,`)}function Nu(e){let t=[],n=[],r=1,i=2;for(;r=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),Vu.add(n),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):(a&&n===a||c&&i&&c!==i&&(o===null||s===null||o===s))&&(r.splice(e,1),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),n.parentNode?.removeChild(n))}}function Uu(e,t,n){let r=Bu(n),i=zu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):zu.set(e,[{el:t,declarationView:r}])}var Wu=(function(e){return e[e.CHANGE_DETECTION=0]=`CHANGE_DETECTION`,e[e.AFTER_NEXT_RENDER=1]=`AFTER_NEXT_RENDER`,e})(Wu||{}),Gu=new mi(``),Ku=new Set;function qu(e){Ku.has(e)||(Ku.add(e),performance?.mark?.(`mark_feature_usage`,{detail:{feature:e}}))}var Ju=(()=>{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=si({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Yu=new mi(``,{factory:()=>{let e=A(wa),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Xu(e,t,n){let r=e.get(Yu);if(Array.isArray(t))for(let e of t)r.queue.add(e),n?.detachedLeaveAnimationFns?.push(e);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function Zu(e,t){let n=e.get(Yu);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Qu(e,t){let n=e.get(Yu);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function $u(e,t){for(let[n,r]of t)Xu(e,r.animateFns)}function ed(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&$u(r,i)}function td(e,t,n,r){try{n.get(oa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Zu(n,i.enter.get(t.index).animateFns);let a=nd(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];id(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Ru.add(e[19]),Xu(n,()=>rd(e,t,i||void 0,a,r),i||void 0)}function nd(e,t,n){let r=new Map,i=n?.leave;if(i&&i.has(t.index)&&r.set(t.index,i.get(t.index)),e&&i)for(let[n,a]of i){if(r.has(n))continue;let i=e[1].data[n].parent;for(;i;){if(i===t){r.set(n,a);break}i=i.parent}}return r}function rd(e,t,n,r,i){let a=[];if(n&&n.leave)for(let[e]of r){if(!n.leave.has(e))continue;let t=n.leave.get(e);for(let e of t.animateFns){let{promise:t}=e();a.push(t)}n.detachedLeaveAnimationFns=void 0}if(e&&id(e,t,a),a.length>0){let t=n||e?.[26];if(t){let n=t.running;n&&a.push(n),t.running=Promise.allSettled(a),od(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Ru.delete(e[19]),i(!0)})}else e&&Ru.delete(e[19]),i(!1)}function id(e,t,n){if(t.type&12){let r=e[t.index];if(Ba(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Ru.delete(e[19])),n(!0)})}function sd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Ba(i)?c=i:za(i)&&(l=!0,i=i[0]);let u=Ja(i);e===0&&r!==null?(ed(s,r,a,n),o==null?pu(t,r,u):fu(t,r,u,o||null,!0)):e===1&&r!==null?(ed(s,r,a,n),fu(t,r,u,o||null,!0),Hu(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Uu(a,u,s),Vu.delete(u),td(s,a,n,e=>{if(Vu.has(u)){Vu.delete(u);return}hu(t,u,l,e)})):e===3&&(Vu.delete(u),td(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Ad(t,e,n,c,a,r,o)}}function cd(e,t){ud(e,t),t[0]=null,t[5]=null}function ld(e,t,n,r,i,a){r[0]=i,r[5]=t,Dd(e,r,n,1,i,a)}function ud(e,t){t[10].changeDetectionScheduler?.notify(9),Dd(e,t,t[11],2,null,null)}function dd(e){let t=e[12];if(!t)return md(e[1],e);for(;t;){let n=null;if(za(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)za(t)&&md(t[1],t),t=t[3];t===null&&(t=e),za(t)&&md(t[1],t),n=t&&t[4]}t=n}}function fd(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function pd(e,t){if(Ka(t))return;let n=t[11];n.destroyNode&&Dd(e,t,n,3,null,null),dd(t)}function md(e,t){if(Ka(t))return;let n=O(null);try{t[2]&=-129,t[2]|=256,t[24]&&Sn(t[24]),gd(e,t),hd(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Ba(t[3])){n!==t[3]&&fd(n,t);let r=t[18];r!==null&&r.detachView(e)}Nl(t)}finally{O(n)}}function hd(e,t){let n=e.cleanup,r=t[7];if(n!==null)for(let e=0;e=0?r[t]():r[-t].unsubscribe(),e+=2}else{let t=r[n[e+1]];n[e].call(t)}r!==null&&(t[7]=null);let i=t[21];if(i!==null){t[21]=null;for(let e=0;e27&&Bd(e,t,27,!1),Tc(o?fc.TemplateUpdateStart:fc.TemplateCreateStart,i,n),n(r,i)}finally{ts(a),Tc(o?fc.TemplateUpdateEnd:fc.TemplateCreateEnd,i,n)}}function Wd(e,t,n){Zd(e,t,n),(n.flags&64)==64&&Qd(e,t,n)}function Gd(e,t,n=Xa){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{lo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Cf(e){let t=e[24]??Object.create(wf);return t.lView=e,t}var wf={...ln,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=po(e.lView);for(;t&&!Tf(t[1]);)t=po(t);t&&ao(t)},consumerOnSignalRead(){this.lView[24]=this}};function Tf(e){return e.type!==2}function Ef(e){if(e[23]===null)return;let t=!0;for(;t;){let n=!1;for(let t of e[23])if(t.dirty&&(n=!0,t.zone===null||Zone.current===t.zone?t.run():t.zone.run(()=>t.run()),e[23]===null))return;t=n&&!!(e[2]&8192)}}var Df=100;function Of(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{kf(e,t)}finally{n.end?.()}}function kf(e,t){let n=Mo();try{No(!0),Ff(e,t);let n=0;for(;so(e);){if(n===Df)throw new k(103,!1);n++,Ff(e,1)}}finally{No(n)}}function Af(e,t,n,r){if(Ka(t))return;let i=t[2];qo(t);let a=!0,o=null,s=null;Tf(e)?(s=yf(t),o=_n(s)):cn()===null?(a=!1,s=Cf(t),o=_n(s)):t[24]&&=(Sn(t[24]),null);try{io(t),Io(e.bindingStartIndex),n!==null&&Ud(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Oc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&kc(t,n,0,null),Ac(t,0)}if(Mf(t),Ef(t),jf(t,0),e.contentQueries!==null&&Ql(e,t),a){let n=e.contentCheckHooks;n!==null&&Oc(t,n)}else{let n=e.contentHooks;n!==null&&kc(t,n,1),Ac(t,1)}Lf(e,t);let o=e.components;o!==null&&If(t,o,0);let s=e.viewQuery;if(s!==null&&$l(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Oc(t,n)}else{let n=e.viewHooks;n!==null&&kc(t,n,2),Ac(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}_f(t),t[2]&=-73}catch(e){throw lo(t),e}finally{s!==null&&(yn(s,o),a&&xf(s)),Qo()}}function jf(e,t){for(let n=Il(e);n!==null;n=Ll(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=Zi(e,10+t);cd(r[1],r);let o=a[18];o!==null&&o.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function Wf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Uf(e,n),Zi(t,n))}this._attachedToViewContainer=!1}pd(this._lView[1],this._lView)}onDestroy(e){uo(this._lView,e)}markForCheck(){Rf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){co(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Of(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new k(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Ga(this._lView),t=this._lView[16];t!==null&&!e&&fd(t,this._lView),ud(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new k(902,!1);this._appRef=e;let t=Ga(this._lView),n=this._lView[16];n!==null&&!t&&Gf(n,this._lView),co(this._lView)}};function qf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Jf(e,t,n,r,i),zo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Do();a.injectorIndex=e===null?-1:e.injectorIndex}return Oo(a,!0),a}function Jf(e,t,n,r,i){let a=Eo(),o=ko(),s=o?a:a&&a.parent,c=e.data[t]=Xf(e,s,n,t,r,i);return Yf(e,c,a,o),c}function Yf(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function Xf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return xo()&&(s|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:s,providerIndexes:0,value:i,namespace:os(),attrs:a,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Zf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Qf(e,n):r.push(e);e[6]=r}function Qf(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,ep=()=>null;function tp(e,t){return $f(e,t)}function np(e,t,n){return ep(e,t,n)}var rp=class{},ip=class{},ap=(()=>{class e{static ɵprov=si({token:e,providedIn:`root`,factory:()=>null})}return e})();function op(e){return e.debugInfo?.className||e.type.name||null}var sp={},cp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,sp,n);return r!==sp||t===sp?r:this.parentInjector.get(e,t,n)}};function lp(e,t,n){return e[t]=n}function up(e,t){return e[t]}function dp(e,t,n){if(n===Pu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function fp(e,t,n,r){let i=dp(e,t,n);return dp(e,t+1,r)||i}function pp(e,t,n,r,i){let a=fp(e,t,n,r);return dp(e,t+2,i)||a}function mp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&Kl(i,a),Rf(Ha(e)?eo(e.index,t):t,5);let o=t[8],s=hp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=hp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function hp(e,t,n,r){let i=O(null);try{return Tc(fc.OutputStart,t,n),n(r)!==!1}catch(t){return sf(e,t),!1}finally{Tc(fc.OutputEnd,t,n),O(i)}}function gp(e,t,n,r,i,a,o,s){let c=Ua(e),l=!1,u=null;if(!r&&c&&(u=vp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=Xa(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);_p(a)||yp(r?t=>r(Ja(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function _p(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function vp(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;er?n[r]:null}typeof a==`string`&&(e+=2)}return null}function yp(e,t,n,r,i,a,o){let s=t.firstCreatePass?ho(t):null,c=mo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function bp(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);yp(e.index,s,t,i,a,c,!0)}var xp=Symbol(`BINDING`),Sp=new mi(``);function Cp(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e0&&(n.directiveToIndex=new Map);for(let c=0;c0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function Lp(e,t,n){if(n){if(t.exportAs)for(let r=0;r{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&Vd.SignalBased)!==0};return i&&(a.transform=i),a})}function Gp(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Kp(e,t,n){let r=t instanceof wa?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new cp(n,r):n}function qp(e){let t=e.get(ip,null);if(t===null)throw new k(407,!1);return{rendererFactory:t,sanitizer:e.get(ap,null),changeDetectionScheduler:e.get(Ys,null),ngReflect:!1,tracingService:e.get(Gu,null,{optional:!0})}}function Jp(e,t,n){let r=Xp(e);return du(t,r,r===`svg`?`svg`:r===`math`?qa:n)}function Yp(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new k(905,!1)}function Xp(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Zp=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Wp(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Gp(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Mu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Tc(fc.DynamicComponentStart);let s=O(null);try{let s=this.componentDef,c=Kp(s,r||this.ngModule,e),l=qp(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(op(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{O(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Qp(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Kd(l,r,s.encapsulation,t):Jp(s,l,o??null);Yp(u);let d=t.get(Sp,null),f=$p(u,()=>t.get(ps,null)??Vl());d&&d.addHost(f);let p=a?.some(tm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(tm)),m=Fd(null,c,null,512|Ld(s),null,null,e,l,t,null,Xl(u,t,!0));d&&Hp&&f instanceof ShadowRoot&&uo(m,()=>{d.removeHost(f)}),m[27]=u,qo(m);let h=null;try{let e=zp(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);vu(l,u,e),Fl(u,m),Wd(c,m,e),eu(c,e,m),Bp(c,e),n!==void 0&&rm(e,this.ngContentSelectors,n),h=eo(e.index,m),m[8]=h[8],df(c,m,null)}catch(e){throw h!==null&&Nl(h),Nl(m),e}finally{Tc(fc.DynamicComponentEnd),Qo()}return new nm(this.componentType,m,!!p)}};function Qp(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:Nu(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[xp].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function tm(e){let t=e[xp].kind;return t===`input`||t===`twoWay`}var nm=class extends rp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=Za(t[1],27),this.location=Tl(this._tNode,t),this.instance=eo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Kf(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView;cf(n,r[1],r,e,t),this.previousInputValues.set(e,t),Rf(eo(n.index,r),1)}get injector(){return new hl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function rm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=am}return e})();function am(){return lm(To(),M())}var om=class e extends im{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Tl(this._hostTNode,this._hostLView)}get injector(){return new hl(this._hostTNode,this._hostLView)}get parentInjector(){let e=rl(this._hostTNode,this._hostLView);if(Uc(e)){let t=Kc(e,this._hostLView),n=Wc(e),r=t[1].data[n+8];return new hl(r,t)}return new hl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=sm(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,n){let r,i;typeof n==`number`?r=n:n!=null&&(r=n.index,i=n.injector);let a=tp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,mf(this._hostTNode,a)),o}createComponent(e,t,n,r,i,a,o){let s,c=t||{};s=c.index,n=c.injector,r=c.projectableNodes,i=c.environmentInjector||c.ngModuleRef,a=c.directives,o=c.bindings;let l=new Zp(Si(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(wa,null);e&&(i=e)}let d=Si(l.componentType??{}),f=tp(this._lContainer,d?.id??null),p=f?.firstChild??null,m=l.create(u,r,p,i,a,o,this._getHostElementNamespace());return this.insertImpl(m.hostView,s,mf(this._hostTNode,f)),m}_getHostElementNamespace(){if(this._hostTNode.type&2){let e=this._hostTNode.parent??this._hostLView[5];return e!==null&&e.type&2&&typeof e.value==`string`&&e.value.toLowerCase()===`foreignobject`?null:e?.namespace??null}return this._hostTNode.namespace}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(t,n,r){let i=t._lView;if(no(i)){let n=this.indexOf(t);if(n!==-1)this.detach(n);else{let n=i[3],r=new e(n,n[5],n[3]);r.detach(r.indexOf(t))}}let a=this._adjustIndex(n),o=this._lContainer;return Vf(o,i,a,r),t.attachToViewContainerRef(),Xi(cm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=sm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Uf(this._lContainer,t);n&&(Zi(cm(this._lContainer),t),pd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Uf(this._lContainer,t);return n&&Zi(cm(this._lContainer),t)!=null?new Kf(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function sm(e){return e[8]}function cm(e){return e[8]||=[]}function lm(e,t){let n,r=t[e.index];return Ba(r)?n=r:(n=zf(r,t,null,e),t[e.index]=n,zd(t,n)),dm(n,t,e,r),new om(n,e,t)}function um(e,t){let n=e[11],r=n.createComment(``),i=Xa(t,e);return fu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var dm=mm,fm=()=>!1;function pm(e,t,n){return fm(e,t,n)}function mm(e,t,n,r){if(e[7])return;let i;i=n.type&8?Ja(r):um(t,n),e[7]=i}function hm(e){return!!e&&typeof e.then==`function`}function gm(e){return!!e&&typeof e.subscribe==`function`}var _m=class{},vm=class extends _m{injector;instance=null;constructor(e){super();let t=new Ta([...e.providers,{provide:_m,useValue:this}],e.parent||Ca(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function ym(e,t,n=null){return new vm({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var bm=(()=>{class e{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let t=ua(!1,e.type),n=t.length>0?ym([t],this._injector,``):null;this.cachedInjectors.set(e,n)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=si({token:e,providedIn:`environment`,factory:()=>new e(Ui(wa))})}return e})();function xm(e){return dc(()=>{let t=Dm(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Ol.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(bm).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||tu.Emulated,styles:e.styles||ia,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&qu(`NgStandalone`),Om(n);let r=e.dependencies;return n.directiveDefs=km(r,Sm),n.pipeDefs=km(r,wi),n.id=Am(n),n})}function Sm(e){return Si(e)||Ci(e)}function Cm(e,t){if(e==null)return ra;let n={};for(let r in e)if(Object.hasOwn(e,r)){let i=e[r],a,o,s,c;Array.isArray(i)?(s=i[0],a=i[1],o=i[2]??a,c=i[3]||null):(a=i,o=i,s=Vd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function wm(e){if(e==null)return ra;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Tm(e){return dc(()=>{let t=Dm(e);return Om(t),t})}function Em(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function Dm(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||ra,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ia,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Cm(e.inputs,t),outputs:wm(e.outputs),debugInfo:null}}function Om(e){e.features?.forEach(t=>t(e))}function km(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let e of n){let n=t(e);n!==null&&r.push(n)}return r}:null}function Am(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let e of r.join(`|`))t=Math.imul(31,t)+e.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var jm=new mi(``),Mm=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=A(jm,{optional:!0})??[];injector=A(fs);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ia(this.injector,t);if(hm(n))e.push(n);else if(gm(n)){let t=new Promise((e,t)=>{n.subscribe({complete:e,error:t})});e.push(t)}}let t=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),e.length===0&&t(),this.initialized=!0}static ɵfac=function(t){return new(t||e)};static ɵprov=Cl({token:e,factory:e.ɵfac})}return e})();function Nm(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Vc(e.mergedAttrs,e.attrs);let t=e.tView=Md(2,e,i,a,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),t.queries=n.queries.embeddedTView(e))}s&&(e.flags|=s),Oo(e,!1);let c=Rm(n,t,e,r);cs()&&Sd(n,t,c,e),Fl(c,t);let l=zf(c,t,c,e);t[r+27]=l,zd(t,l),pm(l,e,t)}function Pm(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=qf(t,d,4,o||null,s||null),bo()&&Tp(t,e,f,ro(t.consts,l),ef),Dc(t,f)):f=t.data[d],Nm(f,e,t,n,r,i,a,c),Ua(f)&&Wd(t,e,f),l!=null&&Gd(e,f,u),f}function Fm(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=qf(t,d,4,o||null,s||null),l!=null){let e=ro(t.consts,l);f.localNames=[];for(let t=0;t{class e{cachedInjectors=new Map;getOrCreateInjector(e,t,n,r){if(!this.cachedInjectors.has(e)){let i=n.length>0?ym(n,t,r):null;this.cachedInjectors.set(e,i)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=si({token:e,providedIn:`environment`,factory:()=>new e})}return e})(),mh=new mi(``);function hh(e,t,n){return e.get(ph).getOrCreateInjector(t,e,n,``)}function gh(e,t,n){if(e instanceof cp){let r=e.injector,i=e.parentInjector;return new cp(r,hh(i,t,n))}let r=e.get(wa);return r===e?hh(e,t,n):new cp(e,hh(r,t,n))}function _h(e,t,n,r=!1){let i=n[3],a=i[1];if(Ka(i))return;let o=ih(i,t),s=o[1],c=o[Ym];if(!(c!==null&&ee.data.s===t[1])??-1;return{dehydratedView:n>-1?e[6][n]:null,dehydratedViewIx:n}}function yh(e,t,n,r,i){Tc(fc.DeferBlockStateStart);let a=ch(e,i,r);if(a!==null){t[1]=e;let o=i[1],s=Za(o,a+27);Hf(n,0);let c;if(e===Um.Complete){let e=oh(o,r),t=e.providers;t&&t.length>0&&(c=gh(i[9],e,t))}let{dehydratedView:l,dehydratedViewIx:u}=vh(n,t),d=pf(i,s,null,{injector:c,dehydratedView:l});if(Vf(n,d,0,mf(s,l)),ao(d),u>-1&&n[6]?.splice(u,1),(e===Um.Complete||e===Um.Error)&&Array.isArray(t[Xm])){for(let e of t[Xm])e();t[Xm]=null}}Tc(fc.DeferBlockStateEnd)}function bh(e,t){return e{e.loadingState===Bm.COMPLETE?_h(Um.Complete,t,n):e.loadingState===Bm.FAILED&&_h(Um.Error,t,n)})}var Ch=null;function wh(e,t){return t[9].get(mh,null,{optional:!0})?.behavior!==Qm.Manual}var Th=new mi(``),Eh=new mi(``);function Dh(){In(()=>{throw new k(600,``)})}var Oh=10,kh=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=A(zs);afterRenderManager=A(Ju);zonelessEnabled=A(Xs);rootEffectScheduler=A(Qs);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new qr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=A(vs);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Xr(e=>!e))}constructor(){A(Gu,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=A(wa);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=fs.NULL){return this._injector.get(Es).run(()=>{if(Tc(fc.BootstrapComponentStart),!this._injector.get(Mm).done)throw new k(405,``);let r=Si(e),i=this._injector.get(_m),a=new Zp(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Ah(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Th,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),jh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Tc(fc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Tc(fc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(Wu.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Tc(fc.ChangeDetectionEnd),new k(101,!1);let e=O(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,O(e),this.afterTick.next(),Tc(fc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(ip,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++so(e))){this.dirtyFlags|=2;return}this.dirtyFlags&=-8}attachView(e){let t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){let t=e;jh(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(e){this.internalErrorHandler(e)}this.components.push(e),this._injector.get(Eh,[]).forEach(t=>t(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>jh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new k(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static ɵfac=function(t){return new(t||e)};static ɵprov=Cl({token:e,factory:e.ɵfac})}return e})();function Ah(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function jh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Mh(e,t,n){let r=t.get(Ph);return r.add(e,n),()=>r.remove(e)}function Nh(e){return(t,n)=>Mh(t,n,e)}var Ph=(()=>{class e{buckets=new Map;callbackBucket=new Map;applicationRef=A(kh);ngZone=A(Es);idleService=A(xl);add(e,t){let n=Fh(t);this.callbackBucket.set(e,n);let r=this.buckets.get(n);r??(r={idleId:null,queue:new Set},this.buckets.set(n,r)),r.queue.add(e),this.scheduleBucket(r,t)}remove(e){let t=this.callbackBucket.get(e);if(t===void 0)return;this.callbackBucket.delete(e);let n=this.buckets.get(t);n&&(n.queue.delete(e),n.queue.size===0&&(this.cancelBucket(n),this.buckets.delete(t)))}scheduleBucket(e,t){if(e.idleId!==null)return;let n=Fh(t),r=r=>{for(let t of e.queue)if(t(),this.applicationRef._tick(),e.queue.delete(t),this.callbackBucket.delete(t),r&&r.timeRemaining()===0&&!r.didTimeout)break;e.idleId=null,e.queue.size>0?this.scheduleBucket(e,t):this.buckets.delete(n)};e.idleId=this.idleService.requestOnIdle(e=>this.ngZone.run(()=>r(e)),t)}cancelBucket(e){e.idleId!==null&&(this.idleService.cancelOnIdle(e.idleId),e.idleId=null)}ngOnDestroy(){for(let e of this.buckets.values())this.cancelBucket(e);this.buckets.clear(),this.callbackBucket.clear()}static ɵprov=si({token:e,providedIn:`root`,factory:()=>new e})}return e})();function Fh(e){return!e||e.timeout==null?``:`${e.timeout}`}function Ih(e){let t=M(),n=To();if(xh(t,n),!wh(0,t))return;let r=t[9];$m(0,ih(t,n),e(()=>Rh(0,t,n),r))}function Lh(e,t,n){let r=t[9],i=t[1];if(e.loadingState!==Bm.NOT_STARTED)return e.loadingPromise??Promise.resolve();let a=ih(t,n),o=fh(i,e);e.loadingState=Bm.IN_PROGRESS,eh(1,a);let s=e.dependencyResolverFn,c=r.get(cc).add();return s?(e.loadingPromise=Promise.allSettled(s()).then(n=>{let r=!1,i=[],a=[];for(let e=0;e0&&(t.directiveRegistry=dh(t.directiveRegistry,i),e.providers=ua(!1,...i.map(e=>e.type))),a.length>0&&(t.pipeRegistry=dh(t.pipeRegistry,a))}}),e.loadingPromise.finally(()=>{e.loadingPromise=null,c()})):(e.loadingPromise=Promise.resolve().then(()=>{e.loadingPromise=null,e.loadingState=Bm.COMPLETE,c()}),e.loadingPromise)}function Rh(e,t,n){let r=t[1],i=t[n.index];if(!wh(e,t))return;let a=ih(t,n),o=oh(r,n);switch(th(a),o.loadingState){case Bm.NOT_STARTED:_h(Um.Loading,n,i),Lh(o,t,n),o.loadingState===Bm.IN_PROGRESS&&Sh(o,n,i);break;case Bm.IN_PROGRESS:_h(Um.Loading,n,i),Sh(o,n,i);break;case Bm.COMPLETE:_h(Um.Complete,n,i);break;case Bm.FAILED:_h(Um.Error,n,i)}}function zh(e,t,n){return e===0?Vh(t,n):e!==2||!Vh(t,n)}function Bh(e){return e!=null&&(e&1)==1}function Vh(e,t){let n=e[9],r=oh(e[1],t),i=Zl(n),a=Bh(r.flags),o=ih(e,t)[Jm]!==null;return!(a&&o&&i)}function Hh(e,t,n,r,i,a,o,s,c,l){let u=M(),d=wo(),f=e+27,p=Fm(u,d,e,null,0,0),m=u[9],h=Zl(m);if(d.firstCreatePass){qu(`NgDefer`);let e={primaryTmplIndex:t,loadingTmplIndex:r??null,placeholderTmplIndex:i??null,errorTmplIndex:a??null,placeholderBlockConfig:null,loadingBlockConfig:null,dependencyResolverFn:n??null,loadingState:Bm.NOT_STARTED,loadingPromise:null,providers:null,hydrateTriggers:null,debug:null,flags:l??0};c?.(d,e,s,o),sh(d,f,e)}let g=u[f];pm(g,p,u);let _=null,v=null;if(g[6]?.length>0){let e=g[6][0].data;v=e.di??null,_=e.s}let y=[null,Wm.Initial,null,null,null,null,v,_,null,null];ah(u,f,y);let b=null;v!==null&&h&&(b=m.get(ql),b.add(v,{lView:u,tNode:p,lContainer:g}));let ee=()=>{th(y),v!==null&&b?.cleanup([v])};$m(0,y,()=>fo(u,ee)),uo(u,ee)}function Uh(e){zh(0,M(),To())&&Ih(Nh({timeout:e}))}function L(e,t,n,r){let i=M();return dp(i,Lo(),t)&&(wo(),tf(ns(),i,e,t,n,r)),L}var Wh=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let e=this.detach(n);this.attach(n,i),this.attach(r,e)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function Gh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Kh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){O(r);let c=t.length-1;for(O(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=Gh(o,r,o,l,n);if(u!==0){u<0&&e.updateValue(o,l),o++;continue}let d=e.at(s),f=t[c],p=Gh(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new Xh,a??=Yh(e,o,s,n),qh(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)Jh(e,i,n,o,t[o]),o++}else if(t!=null){O(r);let c=t[Symbol.iterator]();O(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=Gh(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Xh,a??=Yh(e,o,s,n);let u=n(o,r);if(qh(e,i,o,u))e.updateValue(o,r),o++,s++,l=c.next();else if(!a.has(u))e.attach(o,e.create(o,r)),o++,s++,l=c.next();else{let r=n(o,t);i.set(r,e.detach(o)),s--}}}for(;!l.done;)Jh(e,i,n,e.length,l.value),l=c.next()}for(;o<=s;)e.destroy(e.detach(s--));i?.forEach(t=>{e.destroy(t)})}function qh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Jh(e,t,n,r,i){if(qh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Yh(e,t,n,r){let i=new Set;for(let a=t;a<=n;a++)i.add(r(a,e.at(a)));return i}var Xh=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function R(e,t,n,r,i,a,o,s){qu(`NgControlFlow`);let c=M(),l=wo();return Fm(c,l,e,t,n,r,i,ro(l.consts,a),256,o,s),Zh}function Zh(e,t,n,r,i,a,o,s){qu(`NgControlFlow`);let c=M(),l=wo();return Fm(c,l,e,t,n,r,i,ro(l.consts,a),512,o,s),Zh}function z(e,t){qu(`NgControlFlow`);let n=M(),r=Lo(),i=n[r]===Pu?-1:n[r],a=i===-1?void 0:rg(n,27+i);if(dp(n,r,e)){let r=O(null);try{if(a!==void 0&&Hf(a,0),e!==-1){let r=27+e,i=rg(n,r),a=cg(n[1],r),o=np(i,a,n);Vf(i,pf(n,a,t,{dehydratedView:o}),0,mf(a,o))}}finally{O(r)}}else if(a!==void 0){let e=Bf(a,0);e!==void 0&&(e[8]=t)}}var Qh=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-10}};function $h(e){return e}function eg(e,t){return t}var tg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function B(e,t,n,r,i,a,o,s,c,l,u,d,f){qu(`NgControlFlow`);let p=M(),m=wo(),h=c!==void 0,g=M(),_=new tg(h,s?o.bind(g[15][8]):o);g[27+e]=_,Fm(p,m,e+1,t,n,r,i,ro(m.consts,a),256),h&&Fm(p,m,e+2,c,l,u,d,ro(m.consts,f),512)}var ng=class extends Wh{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-10}at(e){return this.getLView(e)[8].$implicit}attach(e,t){let n=t[6];this.needsIndexUpdate||=e!==this.length,Vf(this.lContainer,t,e,mf(this.templateTNode,n)),ig(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,ag(this.lContainer,e),og(this.lContainer,e)}create(e,t){let n=tp(this.lContainer,this.templateTNode.tView.ssrId);return pf(this.hostLView,this.templateTNode,new Qh(this.lContainer,t,e),{dehydratedView:n})}destroy(e){pd(e[1],e)}updateValue(e,t){this.getLView(e)[8].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e0){let e=n[9];Qu(e,r),Ru.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function ag(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function og(e,t){return Uf(e,t)}function sg(e,t){return Bf(e,t)}function cg(e,t){return Za(e,t)}function lg(e,t,n){let r=M();return dp(r,Lo(),t)&&(wo(),Jd(ns(),r,e,t,r[11],n)),lg}function ug(e,t,n,r,i){cf(t,e,n,i?`class`:`style`,r)}function H(e,t,n,r){let i=M(),a=i[1],o=e+27,s=a.firstCreatePass?zp(o,i,2,t,ef,bo(),n,r):a.data[o];if(Ha(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(op(o),()=>(dg(e,t,i,s,r),H))}}return dg(e,t,i,s,r),H}function dg(e,t,n,r,i){if(af(r,n,e,t,mg),Ua(r)){let e=n[1];Wd(e,n,r),eu(e,r,n)}i!=null&&Gd(n,r)}function U(){let e=wo(),t=of(To());return e.firstCreatePass&&Bp(e,t),So(t)&&Co(),yo(),t.classesWithoutHost!=null&&Ic(t)&&ug(e,t,M(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Lc(t)&&ug(e,t,M(),t.stylesWithoutHost,!1),U}function fg(e,t,n,r){return H(e,t,n,r),U(),fg}function W(e,t,n,r){let i=M(),a=i[1],o=e+27,s=a.firstCreatePass?Vp(o,a,2,t,n,r):a.data[o];return af(s,i,e,t,mg),r!=null&&Gd(i,s),W}function G(){return So(of(To()))&&Co(),yo(),G}function pg(e,t,n,r){return W(e,t,n,r),G(),pg}var mg=(e,t,n,r,i)=>(ls(!0),du(t[11],r,os()));function hg(e,t,n){let r=M(),i=r[1],a=e+27,o=i.firstCreatePass?zp(a,r,8,`ng-container`,ef,bo(),t,n):i.data[a];if(af(o,r,e,`ng-container`,vg),Ua(o)){let e=r[1];Wd(e,r,o),eu(e,o,r)}return n!=null&&Gd(r,o),hg}function gg(){let e=wo(),t=of(To());return e.firstCreatePass&&Bp(e,t),gg}function _g(e,t,n){return hg(e,t,n),gg(),_g}var vg=(e,t,n,r,i)=>(ls(!0),uu(t[11],``));function K(){return M()}function q(e,t,n){let r=M();return dp(r,Lo(),t)&&(wo(),Yd(ns(),r,e,t,r[11],n)),q}var yg=void 0;function bg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var xg=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],yg,[[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],yg,[[`B`,`A`],[`BC`,`AD`],[`Before Christ`,`Anno Domini`]],0,[6,0],[`M/d/yy`,`MMM d, y`,`MMMM d, y`,`EEEE, MMMM d, y`],[`h:mm a`,`h:mm:ss a`,`h:mm:ss a z`,`h:mm:ss a zzzz`],[`{1}, {0}`,yg,yg,yg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,bg],Sg=Object.create(null);function Cg(e){let t=Eg(e),n=wg(t);if(n)return n;let r=t.split(`-`)[0];if(n=wg(r),n)return n;if(r===`en`)return xg;throw new k(701,!1)}function wg(e){if(!(e in Sg)){let t=Ri.ng&&Ri.ng.common&&Ri.ng.common.locales&&Ri.ng.common.locales[e];return t!==void 0&&(Sg[e]=t),t}return Sg[e]}var Tg={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function Eg(e){return e.toLowerCase().replace(/_/g,`-`)}var Dg=`en-US`;function Og(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function kg(e,t,n){let r=M(),i=wo(),a=To();return Ag(i,r,r[11],a,e,t,n),kg}function J(e,t,n){let r=M(),i=wo(),a=To();return(a.type&3||n)&&gp(a,i,r,n,r[11],e,t,mp(a,r,t)),J}function Ag(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=mp(r,t,a),gp(r,e,t,o,n,i,a,c)&&(s=!1)),s){let e=r.outputs?.[i],n=r.hostDirectiveOutputs?.[i];if(n&&n.length)for(let e=0;e>17&32767}function Pg(e){return(e&2)==2}function Fg(e,t){return e&131071|t<<17}function Ig(e){return e|2}function Lg(e){return(e&131068)>>2}function Rg(e,t){return e&-131069|t<<2}function zg(e){return(e&1)==1}function Bg(e){return e|1}function Vg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Ng(o),c=Lg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ta(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Ng(e[s+1]);e[r+1]=Mg(t,s),t!==0&&(e[t+1]=Rg(e[t+1],r)),e[s+1]=Fg(e[s+1],r)}else e[r+1]=Mg(s,0),s!==0&&(e[s+1]=Rg(e[s+1],r)),s=r}else e[r+1]=Mg(c,0),s===0?s=r:e[c+1]=Rg(e[c+1],r),c=r;l&&(e[r+1]=Ig(e[r+1])),Ug(e,u,r,!0),Ug(e,u,r,!1),Hg(t,u,e,r,a),o=Mg(s,c),a?t.classBindings=o:t.styleBindings=o}function Hg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ta(a,t)>=0&&(n[r+1]=Bg(n[r+1]))}function Ug(e,t,n,r){let i=e[n+1],a=t===null,o=r?Ng(i):Lg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Wg(n,t)&&(s=!0,e[o+1]=r?Bg(i):Ig(i)),o=r?Ng(i):Lg(i)}s&&(e[n+1]=r?Ig(i):Bg(i))}function Wg(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ta(e,t)>=0:!1}var Gg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Kg(e){return e.substring(Gg.key,Gg.keyEnd)}function qg(e){return Yg(e),Jg(e,Xg(e,0,Gg.textEnd))}function Jg(e,t){let n=Gg.textEnd;return n===t?-1:(t=Gg.keyEnd=Zg(e,Gg.key=t,n),Xg(e,t,n))}function Yg(e){Gg.key=0,Gg.keyEnd=0,Gg.value=0,Gg.valueEnd=0,Gg.textEnd=e.length}function Xg(e,t,n){for(;t32;)t++;return t}function Qg(e,t,n){return n_(e,t,n,!1),Qg}function $g(e,t){return n_(e,t,null,!0),$g}function e_(e){r_(p_,t_,e,!0)}function t_(e,t){for(let n=qg(t);n>=0;n=Jg(t,n))$i(e,Kg(t),!0)}function n_(e,t,n,r){let i=M(),a=wo(),o=Ro(2);if(a.firstUpdatePass&&a_(a,e,o,r),t!==Pu&&dp(i,o,t)){let s=a.data[es()];h_(a,s,i,i[11],e,i[o+1]=v_(t,n),r,o)}}function r_(e,t,n,r){let i=wo(),a=Ro(2);i.firstUpdatePass&&a_(i,null,a,r);let o=M();if(n!==Pu&&dp(o,a,n)){let s=i.data[es()];if(y_(s,r)&&!i_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=ni(e,n||``)),ug(i,s,o,n,r)}else m_(i,s,o,o[11],o[a+1],o[a+1]=f_(e,t,n),r,a)}}function i_(e,t){return t>=e.expandoStartIndex}function a_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[es()],o=i_(e,n);y_(a,r)&&t===null&&!o&&(t=!1),t=o_(i,a,t,r),Vg(i,a,t,n,o,r)}}function o_(e,t,n,r){let i=Uo(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=u_(null,e,t,n,r),n=d_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=u_(i,e,t,n,r),a===null){let n=s_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=u_(null,e,t,n[1],r),n=d_(n,t.attrs,r),c_(e,t,r,n))}else a=l_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function s_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Lg(r)!==0)return e[Ng(r)]}function c_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Ng(i)]=r}function l_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Pu&&(u=l?ia:void 0);let d=l?ea(u,r):c===r?u:void 0;if(a&&!__(d)&&(d=ea(t,r)),__(d)&&(s=d,o))return s;let f=e[i+1];i=o?Ng(f):Lg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ea(e,r))}return s}function __(e){return e!==void 0}function v_(e,t){return e==null||e===``||(typeof t==`string`?e=ru(e)+t:typeof e==`object`&&(e=ti(ru(e)))),e}function y_(e,t){return!!(e.flags&(t?8:16))}function X(e,t=``){let n=M(),r=wo(),i=e+27,a=r.firstCreatePass?qf(r,i,1,t,null):r.data[i],o=b_(r,n,a,t);n[i]=o,cs()&&Sd(r,n,o,a),Oo(a,!1)}var b_=(e,t,n,r)=>(ls(!0),cu(t[11],r));function x_(e,t,n,r=``){return dp(e,Lo(),n)?t+Ei(n)+r:Pu}function S_(e,t,n,r,i,a=``){let o=fp(e,Fo(),n,i);return Ro(2),o?t+Ei(n)+r+Ei(i)+a:Pu}function C_(e,t,n,r,i,a,o,s=``){let c=pp(e,Fo(),n,i,o);return Ro(3),c?t+Ei(n)+r+Ei(i)+a+Ei(o)+s:Pu}function Z(e){return Q(``,e),Z}function Q(e,t,n){let r=M(),i=x_(r,e,t,n);return i!==Pu&&E_(r,es(),i),Q}function w_(e,t,n,r,i){let a=M(),o=S_(a,e,t,n,r,i);return o!==Pu&&E_(a,es(),o),w_}function T_(e,t,n,r,i,a,o){let s=M(),c=C_(s,e,t,n,r,i,a,o);return c!==Pu&&E_(s,es(),c),T_}function E_(e,t,n){let r=Ya(t,e);lu(e[11],r,n)}function D_(e,t){let n=Po()+e,r=M();return r[n]===Pu?lp(r,n,t()):up(r,n)}function O_(e,t,n,r){return j_(M(),Po(),e,t,n,r)}function k_(e,t){let n=e[t];return n===Pu?void 0:n}function A_(e,t,n,r,i,a){let o=t+n;return dp(e,o,i)?lp(e,o+1,a?r.call(a,i):r(i)):k_(e,o+1)}function j_(e,t,n,r,i,a,o){let s=t+n;return fp(e,s,i,a)?lp(e,s+2,o?r.call(o,i,a):r(i,a)):k_(e,s+2)}function M_(e,t){let n=wo(),r,i=e+27;n.firstCreatePass?(r=N_(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let a=r.factory||(r.factory=Ji(r.type,!0)),o=Ii(wp);try{let e=Jc(!1),t=a();return Jc(e),$a(n,M(),i,t),t}finally{Ii(o)}}function N_(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function P_(e,t,n){let r=e+27,i=M(),a=Qa(i,r);return I_(i,r)?A_(i,Po(),t,a.transform,n,a):a.transform(n)}function F_(e,t,n,r){let i=e+27,a=M(),o=Qa(a,i);return I_(a,i)?j_(a,Po(),t,o.transform,n,r,o):o.transform(n,r)}function I_(e,t){return e[1].data[t].pure}var L_=(()=>{class e{applicationErrorHandler=A(zs);appRef=A(kh);taskService=A(vs);ngZone=A(Es);zonelessEnabled=A(Xs);tracing=A(Gu,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new dr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ws):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(A(Zs,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let e=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(e);return}this.switchToMicrotaskScheduler(),this.taskService.remove(e)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let e=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})})}notify(e){if(!this.zonelessEnabled&&e===5)return;switch(e){case 0:case 2:this.appRef.dirtyFlags|=2;break;case 3:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 6:this.appRef.dirtyFlags|=2;break;case 12:this.appRef.dirtyFlags|=16;break;case 13:this.appRef.dirtyFlags|=2;break;case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let t=this.useMicrotaskScheduler?Ss:xs;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>t(()=>this.tick())):this.ngZone.runOutsideAngular(()=>t(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(`isAngularZone_ID`+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(e){this.applicationErrorHandler(e)}finally{this.taskService.remove(e),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static ɵfac=function(t){return new(t||e)};static ɵprov=Cl({token:e,factory:e.ɵfac})}return e})();function R_(){return[{provide:Ys,useExisting:L_},{provide:Es,useClass:Ps},{provide:Xs,useValue:!0}]}function z_(){return typeof $localize<`u`&&$localize.locale||`en-US`}var B_=new mi(``,{factory:()=>A(B_,{optional:!0,skipSelf:!0})||z_()}),V_=class{destroyed=!1;listeners=null;errorHandler=A(Rs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=A(ms);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new k(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?this.listeners.indexOf(e):-1;t>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[t]=null):this.listeners.splice(t,1))}}}emit(e){if(this.destroyed){console.warn($r(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=O(null);try{for(let t of this.listeners)try{t!==null&&t(e)}catch(e){this.errorHandler?.handleError(e)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&H_(this.listeners)),O(t),this.isEmitting=!1}}};function H_(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function $(e,t){return On(e,t?.equal)}function U_(e){return tr(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var W_=e=>e;function G_(e,t){return typeof e==`function`?K_(Zn(e,W_,t?.equal),t?.debugName,t?.set):K_(Zn(e.source,e.computation,e.equal),e.debugName,e.set)}function K_(e,t,n){let r=e[sn],i=e;if(n!==void 0){let t=e=>Qn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(U_(e)),t)}else i.set=e=>Qn(r,e),i.update=e=>$n(r,e);return i.asReadonly=Vs.bind(e),i}function q_(e,t){let n=Object.create(uc);n.value=e,n.transformFn=t?.transform;function r(){if(un(n),n.value===lc)throw new k(-950,null);return n.value}return r[sn]=n,r}function J_(e){return new V_}function Y_(e,t){return q_(e,t)}function X_(e){return q_(lc,e)}var Z_=(Y_.required=X_,Y_),Q_=new mi(``),$_=new mi(``);function ev(e){return!e.moduleRef}function tv(e){let t=ev(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Es);return n.run(()=>{ev(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(zs),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),ev(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Q_);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Q_);n.add(t),e.moduleRef.onDestroy(()=>{jh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return rv(r,n,()=>{let n=t.get(vs),r=n.add(),i=t.get(Mm);return i.runInitializers(),i.donePromise.then(()=>{if(Og(t.get(B_,Dg)||`en-US`),!t.get($_,!0))return ev(e)?t.get(kh):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(ev(e)){let n=t.get(kh);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return nv?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var nv;function rv(e,t,n){try{let r=n();return hm(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var iv=null;function av(e=[],t){return fs.create({name:t,providers:[{provide:ya,useValue:`platform`},{provide:Q_,useValue:new Set([()=>iv=null])},...e]})}function ov(e=[]){if(iv)return iv;let t=av(e);return iv=t,Dh(),sv(t),t}function sv(e){let t=e.get(Ws,null);Ia(e,()=>{t?.forEach(e=>e())})}function cv(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Tc(fc.BootstrapApplicationStart);try{let e=i?.injector??ov(r);return tv({r3Injector:new vm({providers:[R_(),Bs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Tc(fc.BootstrapApplicationEnd)}}var lv=null;function uv(){return lv}function dv(e){lv??=e}var fv=class{},pv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(pv||{}),mv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(mv||{}),hv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(hv||{}),gv={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function _v(e){return Cg(e)[Tg.LocaleId]}function vv(e,t,n){let r=Cg(e);return kv(kv([r[Tg.DayPeriodsFormat],r[Tg.DayPeriodsStandalone]],t),n)}function yv(e,t,n){let r=Cg(e);return kv(kv([r[Tg.DaysFormat],r[Tg.DaysStandalone]],t),n)}function bv(e,t,n){let r=Cg(e);return kv(kv([r[Tg.MonthsFormat],r[Tg.MonthsStandalone]],t),n)}function xv(e,t){let n=Cg(e)[Tg.Eras];return kv(n,t)}function Sv(e,t){return kv(Cg(e)[Tg.DateFormat],t)}function Cv(e,t){return kv(Cg(e)[Tg.TimeFormat],t)}function wv(e,t){let n=Cg(e)[Tg.DateTimeFormat];return kv(n,t)}function Tv(e,t){let n=Cg(e),r=n[Tg.NumberSymbols][t];if(r===void 0){if(t===gv.CurrencyDecimal)return n[Tg.NumberSymbols][gv.Decimal];if(t===gv.CurrencyGroup)return n[Tg.NumberSymbols][gv.Group]}return r}function Ev(e){if(!e[Tg.ExtraData])throw new k(2303,!1)}function Dv(e){let t=Cg(e);return Ev(t),(t[Tg.ExtraData][2]||[]).map(e=>typeof e==`string`?Av(e):[Av(e[0]),Av(e[1])])}function Ov(e,t,n){let r=Cg(e);return Ev(r),kv(kv([r[Tg.ExtraData][0],r[Tg.ExtraData][1]],t)||[],n)||[]}function kv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new k(2304,!1)}function Av(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var jv=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Mv=Object.create(null),Nv=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,Pv=256;function Fv(e,t,n,r){let i=iy(e);Iv(t),t=Rv(n,t)||t;let a=[],o;for(;t;)if(o=Nv.exec(t),o){a=a.concat(o.slice(1));let e=a.pop();if(!e)break;t=e}else{a.push(t);break}let s=i.getTimezoneOffset();r&&(s=ty(r,s),i=ry(i,r));let c=``;return a.forEach(e=>{let t=ey(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Iv(e){if(e.length>Pv)throw new k(2300,!1)}function Lv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Rv(e,t){let n=_v(e);if(Mv[n]??=Object.create(null),Mv[n][t])return Mv[n][t];let r=``;switch(t){case`shortDate`:r=Sv(e,hv.Short);break;case`mediumDate`:r=Sv(e,hv.Medium);break;case`longDate`:r=Sv(e,hv.Long);break;case`fullDate`:r=Sv(e,hv.Full);break;case`shortTime`:r=Cv(e,hv.Short);break;case`mediumTime`:r=Cv(e,hv.Medium);break;case`longTime`:r=Cv(e,hv.Long);break;case`fullTime`:r=Cv(e,hv.Full);break;case`short`:let t=Rv(e,`shortTime`),n=Rv(e,`shortDate`);r=zv(wv(e,hv.Short),[t,n]);break;case`medium`:let i=Rv(e,`mediumTime`),a=Rv(e,`mediumDate`);r=zv(wv(e,hv.Medium),[i,a]);break;case`long`:let o=Rv(e,`longTime`),s=Rv(e,`longDate`);r=zv(wv(e,hv.Long),[o,s]);break;case`full`:let c=Rv(e,`fullTime`),l=Rv(e,`fullDate`);r=zv(wv(e,hv.Full),[c,l])}return r&&(Mv[n][t]=r),r}function zv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Bv(e,t,n=`-`,r,i){let a=``;(e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,a=n));let o=String(e);for(;o.length0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return Vv(s,t);let c=Tv(o,gv.MinusSign);return Bv(s,t,c,r,i)}}function Uv(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new k(2301,!1)}}function Wv(e,t,n=pv.Format,r=!1){return function(i,a){return Gv(i,a,e,t,n,r)}}function Gv(e,t,n,r,i,a){switch(n){case 2:return bv(t,i,r)[e.getMonth()];case 1:return yv(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Dv(t),a=Ov(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+Bv(o,2,a)+Bv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Bv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Bv(o,2,a)+`:`+Bv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Bv(o,2,a)+`:`+Bv(Math.abs(i%60),2,a);default:throw new k(2310,!1)}}}var qv=0,Jv=4;function Yv(e){let t=Lv(e,qv,1).getDay();return Lv(e,0,1+(t<=Jv?Jv:11)-t)}function Xv(e){let t=e.getDay(),n=t===0?-3:Jv-t;return Lv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Zv(e,t=!1){return function(n,r){let i;if(t){let e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();i=1+Math.floor((t+e)/7)}else{let e=Xv(n),t=Yv(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Bv(i,e,Tv(r,gv.MinusSign))}}function Qv(e,t=!1){return function(n,r){return Bv(Xv(n).getFullYear(),e,Tv(r,gv.MinusSign),t)}}var $v=Object.create(null);function ey(e){if($v[e])return $v[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Wv(3,mv.Abbreviated);break;case`GGGG`:t=Wv(3,mv.Wide);break;case`GGGGG`:t=Wv(3,mv.Narrow);break;case`y`:t=Hv(0,1,0,!1,!0);break;case`yy`:t=Hv(0,2,0,!0,!0);break;case`yyy`:t=Hv(0,3,0,!1,!0);break;case`yyyy`:t=Hv(0,4,0,!1,!0);break;case`Y`:t=Qv(1);break;case`YY`:t=Qv(2,!0);break;case`YYY`:t=Qv(3);break;case`YYYY`:t=Qv(4);break;case`M`:case`L`:t=Hv(1,1,1);break;case`MM`:case`LL`:t=Hv(1,2,1);break;case`MMM`:t=Wv(2,mv.Abbreviated);break;case`MMMM`:t=Wv(2,mv.Wide);break;case`MMMMM`:t=Wv(2,mv.Narrow);break;case`LLL`:t=Wv(2,mv.Abbreviated,pv.Standalone);break;case`LLLL`:t=Wv(2,mv.Wide,pv.Standalone);break;case`LLLLL`:t=Wv(2,mv.Narrow,pv.Standalone);break;case`w`:t=Zv(1);break;case`ww`:t=Zv(2);break;case`W`:t=Zv(1,!0);break;case`d`:t=Hv(2,1);break;case`dd`:t=Hv(2,2);break;case`c`:case`cc`:t=Hv(7,1);break;case`ccc`:t=Wv(1,mv.Abbreviated,pv.Standalone);break;case`cccc`:t=Wv(1,mv.Wide,pv.Standalone);break;case`ccccc`:t=Wv(1,mv.Narrow,pv.Standalone);break;case`cccccc`:t=Wv(1,mv.Short,pv.Standalone);break;case`E`:case`EE`:case`EEE`:t=Wv(1,mv.Abbreviated);break;case`EEEE`:t=Wv(1,mv.Wide);break;case`EEEEE`:t=Wv(1,mv.Narrow);break;case`EEEEEE`:t=Wv(1,mv.Short);break;case`a`:case`aa`:case`aaa`:t=Wv(0,mv.Abbreviated);break;case`aaaa`:t=Wv(0,mv.Wide);break;case`aaaaa`:t=Wv(0,mv.Narrow);break;case`b`:case`bb`:case`bbb`:t=Wv(0,mv.Abbreviated,pv.Standalone,!0);break;case`bbbb`:t=Wv(0,mv.Wide,pv.Standalone,!0);break;case`bbbbb`:t=Wv(0,mv.Narrow,pv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Wv(0,mv.Abbreviated,pv.Format,!0);break;case`BBBB`:t=Wv(0,mv.Wide,pv.Format,!0);break;case`BBBBB`:t=Wv(0,mv.Narrow,pv.Format,!0);break;case`h`:t=Hv(3,1,-12);break;case`hh`:t=Hv(3,2,-12);break;case`H`:t=Hv(3,1);break;case`HH`:t=Hv(3,2);break;case`m`:t=Hv(4,1);break;case`mm`:t=Hv(4,2);break;case`s`:t=Hv(5,1);break;case`ss`:t=Hv(5,2);break;case`S`:t=Hv(6,1);break;case`SS`:t=Hv(6,2);break;case`SSS`:t=Hv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Kv(0);break;case`ZZZZZ`:t=Kv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Kv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Kv(2);break;default:return null}return $v[e]=t,t}function ty(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function ny(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function ry(e,t,n){let r=e.getTimezoneOffset();return ny(e,-1*(ty(t,r)-r))}function iy(e){if(oy(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[t,n=1,r=1]=e.split(`-`).map(e=>+e);return Lv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(jv))return ay(n)}let t=new Date(e);if(!oy(t))throw new k(2311,!1);return t}function ay(e){let t=new Date(0),n=0,r=0,i=e[8]?t.setUTCFullYear:t.setFullYear,a=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,s=Number(e[5]||0)-r,c=Number(e[6]||0),l=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return a.call(t,o,s,c,l),t}function oy(e){return e instanceof Date&&!isNaN(e.valueOf())}var sy=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=A(fs);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let e=this._viewContainerRef;if(this._viewRef&&e.remove(e.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let t=this._createContextForwardProxy();this._viewRef=e.createEmbeddedView(this.ngTemplateOutlet,t,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static ɵfac=function(t){return new(t||e)(wp(im))};static ɵdir=Tm({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[gc]})}return e})();function cy(e,t){return new k(2100,!1)}var ly=`mediumDate`,uy=new mi(``),dy=new mi(``),fy=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(t,n,r,i){if(t==null||t===``||t!==t)return null;try{let e=n??this.defaultOptions?.dateFormat??ly,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Fv(t,e,i||this.locale,a)}catch(t){throw cy(e,t.message)}}static ɵfac=function(t){return new(t||e)(wp(B_,16),wp(uy,24),wp(dy,24))};static ɵpipe=Em({name:`date`,type:e,pure:!0})}return e})(),py=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Em({name:`json`,type:e,pure:!1})}return e})();function my(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let e=n.indexOf(`=`),[r,i]=e==-1?[n,``]:[n.slice(0,e),n.slice(e+1)];if(r.trim()!==t)continue;let a=i;try{a=decodeURIComponent(i)}catch{}return a.length>1&&a[0]===`"`&&a[a.length-1]===`"`&&(a=a.slice(1,-1)),a}return null}var hy=`browser`,gy=class{_doc;constructor(e){this._doc=e}manager},_y=(()=>{class e extends gy{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,r){return e.addEventListener(t,n,r),()=>this.removeEventListener(e,t,n,r)}removeEventListener(e,t,n,r){return e.removeEventListener(t,n,r)}static ɵfac=function(t){return new(t||e)(Ui(ps))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})(),vy=new mi(``),yy=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(e=>{e.manager=this});let n=e.filter(e=>!(e instanceof _y));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof _y);r&&this._plugins.push(r)}addEventListener(e,t,n,r){return this._findPluginFor(t).addEventListener(e,t,n,r)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(t=>t.supports(e)),!t)throw new k(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(Ui(vy),Ui(Es))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})(),by=`ng-app-id`;function xy(e){for(let t of e)t.remove()}function Sy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Cy(e,t,n,r){let i=e.head?.querySelectorAll(`style[${by}="${t}"],link[${by}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(by),e instanceof HTMLLinkElement?r.set(e.href.slice(e.href.lastIndexOf(`/`)+1),{usage:0,elements:[e]}):e.textContent&&n.set(e.textContent,{usage:0,elements:[e]});return!0}function wy(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Ty=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,r={}){this.doc=e,this.appId=t,this.nonce=n,Cy(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Sy);t?.forEach(e=>this.addUsage(e,this.external,wy))}removeStyles(e,t){for(let t of e)this.removeUsage(t,this.inline);t?.forEach(e=>this.removeUsage(e,this.external))}addUsage(e,t,n){let r=t.get(e);r?r.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(t=>this.addElement(t,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(xy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])xy(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,Sy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,wy(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let r of t.elements)r.parentNode===e?r.remove():n.push(r);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute(`nonce`,this.nonce),e.appendChild(t)}static ɵfac=function(t){return new(t||e)(Ui(ps),Ui(Hs),Ui(Ks,8),Ui(Gs))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})(),Ey={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},Dy=/%COMP%/g,Oy=`%COMP%`,ky=`_nghost-${Oy}`,Ay=`_ngcontent-${Oy}`,jy=!0,My=new mi(``,{factory:()=>jy}),Ny=new mi(``);function Py(e){return Ay.replace(Dy,e)}function Fy(e){return ky.replace(Dy,e)}function Iy(e,t){return t.map(t=>t.replace(Dy,e))}var Ly=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,t,n,r,i,a,o=null,s=null,c=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=r,this.doc=i,this.ngZone=a,this.nonce=o,this.tracingService=s,this.cssVarNamespace=c??``,this.defaultRenderer=new Ry(e,i,a,this.tracingService,this.cssVarNamespace)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof Hy?n.applyToHost(e):n instanceof Vy&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,r=n.get(t.id);if(!r){let i=this.doc,a=this.ngZone,o=this.eventManager,s=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,l=this.tracingService;switch(t.encapsulation){case tu.Emulated:r=new Hy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case tu.ShadowDom:return new By(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case tu.ExperimentalIsolatedShadowDom:return new By(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Vy(o,s,t,c,i,a,l,this.cssVarNamespace)}n.set(t.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(t){return new(t||e)(Ui(yy),Ui(Sp),Ui(Hs),Ui(My),Ui(ps),Ui(Es),Ui(Ks),Ui(Gu,8),Ui(Ny,8))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})(),Ry=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Ey[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(zy(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=zy(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new k(-5106,!1);r.insertBefore(t,n)}}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e==`string`?this.doc.querySelector(e):e;if(!n)throw new k(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=Ey[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ey[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(Fu.DashCase|Fu.Important)?e.style.setProperty(t,n,r&Fu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Fu.DashCase?e.style.removeProperty(t):e.style[t]=``}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e==`string`&&(e=uv().getGlobalEventTarget(this.doc,e),!e))throw new k(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function zy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var By=class extends Ry{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,i,a,o,s,c){super(e,r,i,o,s),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=Iy(n.id,l).map(e=>e.replace(/%NS%/g,s));for(let e of l){let t=document.createElement(`style`);a&&t.setAttribute(`nonce`,a),t.textContent=e,this.shadowRoot.appendChild(t)}let u=n.getExternalStyles?.();if(u)for(let e of u){let t=wy(e,r);a&&t.setAttribute(`nonce`,a),this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Vy=class extends Ry{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,a,o,s,c){super(e,i,a,o,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let l=n.styles,u=c?Iy(c,l):l;this.styles=u.map(e=>e.replace(/%NS%/g,s)),this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Ru.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Hy=class extends Vy{contentAttr;hostAttr;constructor(e,t,n,r,i,a,o,s,c){let l=r+`-`+n.id;super(e,t,n,i,a,o,s,c,l),this.contentAttr=Py(l),this.hostAttr=Fy(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,``)}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,``),n}},Uy=class e extends fv{supportsDOMEvents=!0;static makeCurrent(){dv(new e)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t||=this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t===`window`?window:t===`document`?e:t===`body`?e.body:null}getBaseHref(e){let t=Gy();return t==null?null:Ky(t)}resetBaseElement(){Wy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return my(document.cookie,e)}},Wy=null;function Gy(){return Wy||=document.head.querySelector(`base`),Wy?Wy.getAttribute(`href`):null}function Ky(e){return new URL(e,document.baseURI).pathname}var qy=[`alt`,`control`,`meta`,`shift`],Jy={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Yy={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Xy=(()=>{class e extends gy{constructor(e){super(e)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,n,r,i){let a=e.parseEventName(n),o=e.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>uv().onAndCancel(t,a.domEventName,o,i))}static parseEventName(t){let n=t.toLowerCase().split(`.`),r=n.shift();if(n.length===0||r!==`keydown`&&r!==`keyup`)return null;let i=e._normalizeKey(n.pop()),a=``,o=n.indexOf(`code`);if(o>-1&&(n.splice(o,1),a=`code.`),qy.forEach(e=>{let t=n.indexOf(e);t>-1&&(n.splice(t,1),a+=e+`.`)}),a+=i,n.length!=0||i.length===0)return null;let s={};return s.domEventName=r,s.fullKey=a,s}static matchEventFullKeyCode(e,t){let n=Jy[e.key]||e.key,r=``;return t.indexOf(`code.`)>-1&&(n=e.code,r=`code.`),n==null||!n?!1:(n=n.toLowerCase(),n===` `?n=`space`:n===`.`&&(n=`dot`),qy.forEach(t=>{if(t!==n){let n=Yy[t];n(e)&&(r+=t+`.`)}}),r+=n,r===t)}static eventCallback(t,n,r){return i=>{e.matchEventFullKeyCode(i,t)&&r.runGuarded(()=>n(i))}}static _normalizeKey(e){return e===`esc`?`escape`:e}static ɵfac=function(t){return new(t||e)(Ui(ps))};static ɵprov=si({token:e,factory:e.ɵfac})}return e})();async function Zy(e,t,n){return cv({rootComponent:e,...Qy(t,n)})}function Qy(e,t){return{platformRef:t?.platformRef,appProviders:[...rb,...e?.providers??[]],platformProviders:nb}}function $y(){Uy.makeCurrent()}function eb(){return new Rs}function tb(){return Bl(document),document}var nb=[{provide:Gs,useValue:hy},{provide:Ws,useValue:$y,multi:!0},{provide:ps,useFactory:tb}],rb=[{provide:ya,useValue:`root`},{provide:Rs,useFactory:eb},{provide:vy,useClass:_y,multi:!0},{provide:vy,useClass:Xy,multi:!0},Ly,{provide:Sp,useClass:Ty},{provide:Ty,useExisting:Sp},yy,{provide:ip,useExisting:Ly},[]];function ib(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e{let r=new cb({code:i,why:ob(a.why,e),fix:ob(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:ob(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function db(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n{e=n,t=r}),resolve:e,reject:t}}var _b=Math.random.bind(Math),vb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function yb(e=21){let t=``,n=e;for(;n--;)t+=vb[_b()*64|0];return t}var bb=6e4,xb=e=>e,Sb=xb,{clearTimeout:Cb,setTimeout:wb}=globalThis;function Tb(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=xb,deserialize:s=Sb,resolver:c,bind:l=`rpc`,timeout:u=bb,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=gb(),_=yb();s.i=_;let v;async function y(n=s){return u>=0&&(v=wb(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Cb(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Cb(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function Eb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Db=Object.freeze({type:`object`,additionalProperties:!0});function Ob(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Db}return Db}function kb(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;rn[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function jb(e,t){return Ab(e,t)??[e]}function Mb(e){return typeof e==`string`?`'${e}'`:new Ib().serialize(e)}var Nb=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Pb=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Nb.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Fb(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;ia?-1:1)}return e.length===t.length?r:e.lengththis.compare(e[0],t[0])),r=`${e}{`;for(let e=0;ethis.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),Lb=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Rb=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],zb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Bb=[],Vb=class{_data=new Hb;_hash=new Hb([...Lb]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)Bb[n]=e[t+n]|0;else{let e=Bb[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Bb[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Bb[n]=t+Bb[n-7]+i+Bb[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Rb[n]+Bb[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Hb.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Ub(e){return new Vb().finalize(e).toBase64()}function Wb(e){return Ub(Mb(e))}function Gb(e){return Wb(e)}function Kb(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var qb=/^[\w+.-]{2,}:\/\//;function Jb(e){return e.endsWith(`/`)?e:`${e}/`}function Yb(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Xb(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Jb(n)+e.replace(/^\.?\//,``):e);return n}function Zb(e,t){if(!t||t===`/`||qb.test(e))return e;let n=Yb(t);return e.startsWith(n)?e:Xb(n,e)}function Qb(e,t){let n=e.match(qb);return t+(n?e.slice(n[0].length):e)}var $b=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function ex(e=21){let t=``,n=e;for(;n--;)t+=$b[Math.random()*64|0];return t}var tx=Symbol.for(`immer-nothing`),nx=Symbol.for(`immer-draftable`),rx=Symbol.for(`immer-state`),ix=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function ax(e,...t){{let n=ix[e],r=kx(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var ox=Object,sx=ox.getPrototypeOf,cx=`constructor`,lx=`prototype`,ux=`configurable`,dx=`enumerable`,fx=`writable`,px=`value`,mx=e=>!!e&&!!e[rx];function hx(e){return e?vx(e)||Tx(e)||!!e[nx]||!!e[cx]?.[nx]||Ex(e)||Dx(e):!1}var gx=ox[lx][cx].toString(),_x=new WeakMap;function vx(e){if(!e||!Ox(e))return!1;let t=sx(e);if(t===null||t===ox[lx])return!0;let n=ox.hasOwnProperty.call(t,cx)&&t[cx];if(n===Object)return!0;if(!kx(n))return!1;let r=_x.get(n);return r===void 0&&(r=Function.toString.call(n),_x.set(n,r)),r===gx}function yx(e,t,n=!0){bx(e)===0?(n?Reflect.ownKeys(e):ox.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function bx(e){let t=e[rx];return t?t.type_:Tx(e)?1:Ex(e)?2:Dx(e)?3:0}var xx=(e,t,n=bx(e))=>n===2?e.has(t):ox[lx].hasOwnProperty.call(e,t),Sx=(e,t,n=bx(e))=>n===2?e.get(t):e[t],Cx=(e,t,n,r=bx(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function wx(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Tx=Array.isArray,Ex=e=>e instanceof Map,Dx=e=>e instanceof Set,Ox=e=>typeof e==`object`,kx=e=>typeof e==`function`,Ax=e=>typeof e==`boolean`;function jx(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Mx=e=>Ox(e)?e?.[rx]:null,Nx=e=>e.copy_||e.base_,Px=e=>e.modified_?e.copy_:e.base_;function Fx(e,t){if(Ex(e))return new Map(e);if(Dx(e))return new Set(e);if(Tx(e))return Array[lx].slice.call(e);let n=vx(e);if(t===!0||t===`class_only`&&!n){let t=ox.getOwnPropertyDescriptors(e);delete t[rx];let n=Reflect.ownKeys(t);for(let r=0;r1&&ox.defineProperties(e,{set:Rx,add:Rx,clear:Rx,delete:Rx}),ox.freeze(e),t&&yx(e,(e,t)=>{Ix(t,!0)},!1),e)}function Lx(){ax(2)}var Rx={[px]:Lx};function zx(e){return e===null||!Ox(e)||ox.isFrozen(e)}var Bx=`MapSet`,Vx=`Patches`,Hx=`ArrayMethods`,Ux={};function Wx(e){let t=Ux[e];return t||ax(0,e),t}var Gx=e=>!!Ux[e];function Kx(e,t){Ux[e]||(Ux[e]=t)}var qx,Jx=()=>qx,Yx=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Gx(Bx)?Wx(Bx):void 0,arrayMethodsPlugin_:Gx(Hx)?Wx(Hx):void 0});function Xx(e,t){t&&(e.patchPlugin_=Wx(Vx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zx(e){Qx(e),e.drafts_.forEach(eS),e.drafts_=null}function Qx(e){e===qx&&(qx=e.parent_)}var $x=e=>qx=Yx(qx,e);function eS(e){let t=e[rx];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tS(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[rx].modified_&&(Zx(t),ax(4)),hx(e)&&(e=nS(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[rx].base_,e,t)}else e=nS(t,n);return rS(t,e,!0),Zx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===tx?void 0:e}function nS(e,t){if(zx(t))return t;let n=t[rx];if(!n)return dS(t,e.handledSet_,e);if(!aS(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);lS(n,e)}return n.copy_}function rS(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ix(t,n)}function iS(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var aS=(e,t)=>e.scope_===t,oS=[];function sS(e,t,n,r){let i=Nx(e),a=e.type_;if(r!==void 0&&Sx(i,r,a)===t){Cx(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;yx(i,(e,n)=>{if(mx(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??oS;for(let e of o)Cx(i,e,n,a)}function cS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!aS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Px(i);sS(e,i.draft_??i,a,n),lS(i,r)})}function lS(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}iS(e)}}function uS(e,t,n){let{scope_:r}=e;if(mx(n)){let i=n[rx];aS(i,r)&&i.callbacks_.push(function(){bS(e),sS(e,n,Px(i),t)})}else hx(n)&&e.callbacks_.push(function(){let i=Nx(e);e.type_===3?i.has(n)&&dS(n,r.handledSet_,r):Sx(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&dS(Sx(e.copy_,t,e.type_),r.handledSet_,r)})}function dS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||mx(e)||t.has(e)||!hx(e)||zx(e)?e:(t.add(e),yx(e,(r,i)=>{if(mx(i)){let t=i[rx];aS(t,n)&&(Cx(e,r,Px(t),e.type_),iS(t))}else hx(i)&&dS(i,t,n)}),e)}function fS(e,t){let n=Tx(e),r={type_:+!!n,scope_:t?t.scope_:Jx(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=pS;n&&(i=[r],a=mS);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var pS={get(e,t){if(t===rx)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Nx(e);if(!xx(i,t,e.type_))return _S(e,i,t);let a=i[t];if(e.finalized_||!hx(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&jx(t))return a;if(a===hS(e.base_,t)||gS(e,t,a)){bS(e);let n=e.type_===1?+t:t,r=SS(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Nx(e)},ownKeys(e){return Reflect.ownKeys(Nx(e))},set(e,t,n){let r=vS(Nx(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=hS(Nx(e),t),i=r?.[rx];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(wx(n,r)&&(n!==void 0||xx(e.base_,t,e.type_)))return!0;bS(e),yS(e)}return e.copy_[t]===n&&(n!==void 0||xx(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),uS(e,t,n),!0)},deleteProperty(e,t){return bS(e),hS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),yS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Nx(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[fx]:!0,[ux]:e.type_!==1||t!==`length`,[dx]:r[dx],[px]:n[t]}},defineProperty(){ax(11)},getPrototypeOf(e){return sx(e.base_)},setPrototypeOf(){ax(12)}},mS={};for(let e in pS){let t=pS[e];mS[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}mS.deleteProperty=function(e,t){return isNaN(parseInt(t))&&ax(13),mS.set.call(this,e,t,void 0)},mS.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&ax(14),pS.set.call(this,e[0],t,n,e[0])};function hS(e,t){let n=e[rx];return(n?Nx(n):e)[t]}function gS(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!hx(n)||n[rx]?!1:e.baseRefs_.has(n)}function _S(e,t,n){let r=vS(t,n);return r?px in r?r[px]:r.get?.call(e.draft_):void 0}function vS(e,t){if(!(t in e))return;let n=sx(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=sx(n)}}function yS(e){e.modified_||(e.modified_=!0,e.parent_&&yS(e.parent_))}function bS(e){e.copy_||=(e.assigned_=new Map,Fx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var xS=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(kx(e)&&!kx(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}kx(t)||ax(6),n!==void 0&&!kx(n)&&ax(7);let r;if(hx(e)){let i=$x(this),a=SS(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Zx(i):Qx(i)}return Xx(i,n),tS(r,i)}if(!e||!Ox(e)){if(r=t(e),r===void 0&&(r=e),r===tx&&(r=void 0),this.autoFreeze_&&Ix(r,!0),n){let t=[],i=[];Wx(Vx).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}ax(1,e)},this.produceWithPatches=(e,t)=>{if(kx(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Ax(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ax(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ax(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){hx(e)||ax(8),mx(e)&&(e=CS(e));let t=$x(this),n=SS(t,e,void 0);return n[rx].isManual_=!0,Qx(t),n}finishDraft(e,t){let n=e&&e[rx];(!n||!n.isManual_)&&ax(9);let{scope_:r}=n;return Xx(r,t),tS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Wx(Vx).applyPatches_;return mx(e)?r(e,t):this.produce(e,e=>r(e,t))}};function SS(e,t,n,r){let[i,a]=Ex(t)?Wx(Bx).proxyMap_(t,n):Dx(t)?Wx(Bx).proxySet_(t,n):fS(t,n);return(n?.scope_??Jx()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?cS(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function CS(e){return mx(e)||ax(10,e),wS(e)}function wS(e){if(!hx(e)||zx(e))return e;let t=e[rx],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Fx(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Fx(e,!0);return yx(n,(e,t)=>{Cx(n,e,wS(t))},r),t&&(t.finalized_=!1),n}function TS(){ix.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=Mx(Sx(e,n.key_)),i=Sx(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||xx(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=Sx(o,e,c),f=Sx(s,e,c),p=l?xx(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===tx?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e[e,u(t)]));if(Dx(e))return new Set(Array.from(e).map(u));let t=Object.create(sx(e));for(let n in e)t[n]=u(e[n]);return xx(e,nx)&&(t[nx]=e[nx]),t}function d(e){return mx(e)?u(e):e}Kx(Vx,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var ES=new xS,DS=ES.produce,OS=ES.produceWithPatches.bind(ES),kS=ES.applyPatches.bind(ES),AS=1e3;function jS(e,t){if(e.add(t),e.size>AS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function MS(e){let{enablePatches:t=!1}=e;t&&TS();let n=Kb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=ex())=>{i.has(t)||(TS(),r=kS(r,e),jS(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=ex())=>{if(!i.has(a)){if(jS(i,a),t){let[t,i]=OS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=DS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var NS=typeof self==`object`?self:globalThis,PS=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),FS=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function IS(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=PS.has(e)?NS[e]:void 0;return n(new(r??NS.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&FS.has(a))return n(new NS[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function LS(e){return IS(new Map,e)(0)}var RS=``,{toString:zS}={},{keys:BS}=Object;function VS(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=zS.call(e).slice(8,-1);switch(n){case`Array`:return[1,RS];case`Object`:return[2,RS];case`Date`:return[3,RS];case`RegExp`:return[4,RS];case`Map`:return[5,RS];case`Set`:return[6,RS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function HS([e,t]){return e===0&&(t===`function`||t===`symbol`)}function US(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=VS(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of BS(r))(e||!HS(VS(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(HS(VS(n))||HS(VS(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!HS(VS(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function WS(e,t={}){let n=[];return US(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:GS,stringify:KS}=JSON,qS={json:!0,lossy:!0};function JS(e){return LS(GS(e))}function YS(e){return KS(WS(e,qS))}function XS(e){return LS(e)}function ZS(e){return YS(e)}function QS(e){return JS(e)}var $S=256,eC=class extends Error{name=`StreamClosedError`};function tC(e={}){let t=e.id??ex(),n=Math.max(0,e.replayWindow??0),r=Kb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new eC(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=rC(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function nC(e={}){let t=e.id??ex(),n=Math.max(1,e.highWaterMark??$S),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function rC(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var iC=128;function aC(e){return e.replace(/[^\w-]+/g,`_`).slice(0,iC)}var oC=`modulepreload`,sC=function(e,t){return new URL(e,t).href},cC={},lC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=sC(t,n),t=s(t),t in cC)return;cC[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:oC,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},uC=`__connection.json`,dC=`__DEVFRAME_CONNECTION__`,fC=`x-birpc-session`,pC=`__rpc-dump/index.json`,mC=`devframe:services`,hC=`devframe_otp`,gC=`devframe_auth_token`;fb.postMessage.remoteAssetsError;var _C=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Gb(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},vC=hb({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function yC(e){if(e.agent&&e.jsonSerializable===!1)throw vC.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function bC(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function xC(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function SC(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function TC(e,t){let n=e.handler;if(!n){let r=await wC(e,t);if(!r.handler)throw vC.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await SC(e.name,r,t),o=await a(...n);return await CC(e.name,i,o)}}var EC=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return TC(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw vC.DF0021({name:e.name});yC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw vC.DF0022({name:e.name});yC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await TC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw vC.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function DC(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw kC(t,`undefined`,r,e);return n}return i!==null&&OC(i,r,e,t),n})}function OC(e,t,n,r){if(typeof e==`bigint`)throw kC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw kC(r,`Map`,t,n);if(e instanceof Set)throw kC(r,`Set`,t,n);if(e instanceof Date)throw kC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw kC(r,e.constructor?.name??`class instance`,t,n)}function kC(e,t,n,r){let i=AC(n,r);return vC.DF0020({name:e||``,type:t,path:i})}function AC(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var jC=`__DEVFRAME_CONNECTION_META__`,MC=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function NC(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function PC(){return NC(dC)}function FC(){return NC(jC)}function IC(e){if(e)return e;try{let e=localStorage.getItem(MC);if(e)return e}catch{}return NC(MC)}function LC(e){globalThis[dC]=e,globalThis[jC]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&RC(e.authToken)}function RC(e){try{localStorage.setItem(MC,e)}catch{}globalThis[MC]=e;let t=PC();t&&(globalThis[dC]={...t,authToken:e})}function zC(e){let t=Zb(uC,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function BC(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function VC(){let e=PC();if(e)return BC(e,IC()??e.authToken??e.connectionMeta.authToken);let t=FC();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??zC(`./`),authToken:IC(t.authToken)}}async function HC(e={}){if(e.connection){let t=BC(e.connection,IC(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return LC(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:zC(t[0]??`./`),authToken:IC(e.authToken??e.connectionMeta.authToken)};return LC(n),n}let n=VC();if(n){let t=BC(n,IC(e.authToken??n.authToken??n.connectionMeta.authToken));return LC(t),t}let r=[];for(let n of t){let t=Zb(uC,n),i=zC(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:IC(e.authToken??r.authToken)};return LC(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var UC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function WC(e=hC){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function GC(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function KC(e=hC){let t=WC(e);return t&&GC(e),t}async function qC(e,t={}){let n=KC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function JC(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(mC,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function YC(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:fb.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:fb.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=MS({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(fb.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var XC=new Map;function ZC(e=XC){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?DC(n,r??``):`s:${ZS(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?QS(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function QC(){}function $C(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function ew(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function tw(e){let{onConnected:t=QC,onError:n=QC,onDisconnected:r=QC,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${gC}=${encodeURIComponent(e.authToken)}`);let s=ZC(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function v(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=$C(r);if(!e)break;r=e.rest;let{event:t,data:n}=ew(e.frame);n.length>0&&_(t,n.join(` +`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[fC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function nw(e,t){let{channel:n,rpcOptions:r={}}=t;return Tb(e,{...n,timeout:-1,...r,proxify:!1})}function rw(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(fb.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new UC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new UC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(fb.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new UC(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(fb.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(fb.client.connectionError,e),m(new UC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new UC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=nw(a.functions,{channel:v,rpcOptions:o});a.register({name:fb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new UC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(fb.client.connectionError,e),m(e),i.emit(fb.client.isTrustedUpdated,!1)}});let b=n;async function ee(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new UC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(fb.client.connectionError,e)}return i.emit(fb.client.isTrustedUpdated,c),t.isTrusted}async function te(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(fb.client.isTrustedUpdated,!0)),t}async function ne(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function re(){return c?!0:ee(b??``)}async function x(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:re,requestTrustWithToken:ee,requestTrustWithCode:te,requestAuthCode:ne,ensureTrusted:x,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(fb.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(fb.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(fb.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function iw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function aw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=iw(n.sse,r??`./`,location);return rw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>tw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function ow(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:sw(r)?ow(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function sw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function cw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function lw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function uw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function dw(e){if(e.error)throw ow(e.error);return e.output}function fw(e){return e.some(e=>e!=null)}function pw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function mw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?XS(e):e}function a(e,t){return i(pw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return uw(r)?dw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(cw(r)){if(fw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(lw(r)){let e=Gb(n),i=r.records[e];if(i)return dw(await s(i,r.serialization));if(r.fallback)return dw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!fw(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function hw(e){let t=mw(await e.fetchJsonFromBases(pC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var gw=``;function _w(e,t){return`${e}${gw}${t}`}function vw(e){let t=new Map,n=new Map;e.client.register({name:fb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(_w(e,n))?._push(r,i)}}),e.client.register({name:fb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=_w(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:fb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=_w(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(fb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(gw);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=_w(n,r),o=t.get(a);if(o)return o;let s=nC({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(fb.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=_w(t,r),a=n.get(i);if(a)return a;let o=tC({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function yw(){}var bw=new Map;function xw(e){let t=e.url;e.authToken&&(t=`${t}?${gC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=yw,onError:i=yw,onDisconnected:a=yw,definitions:o=bw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=ZC(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Sw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return Qb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Cw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Sw(n.websocket,r??`./`,location);return rw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>xw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function ww(e){return e.includes(`:`)}function Tw(e,t){return ww(t)?t:`${e}:${t}`}function Ew(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function Dw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return Ew(a)}function Ow(e,t){return{global:Dw(e,t,`global`),project:Dw(e,t,`project`)}}function kw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(ww(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(Tw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(Tw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(Tw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(Tw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(Tw(t,n),r,i),upload:(n,r)=>e.streaming.upload(Tw(t,n),r)}},settings:Ow(e,t),scope:e.scope}}function Aw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function jw(e,t={}){let n=t.modelContext??Aw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=aC(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Eb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:kb(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Mw(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function Mw(e,t,n){try{let r=jb(n,e.args?.length);return{content:[{type:`text`,text:Nw(await(await TC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Pw(e)}]}}}function Nw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Pw(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function Fw(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function Iw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Kb(),a=Array.isArray(t)?t:[t],o=await HC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new _C({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new EC(f),m=e.webmcp===!1?void 0:jw(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Zb(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=Fw(e.transport??`auto`,s),b=y===`static`?await hw({fetchJsonFromBases:_}):y===`sse`?aw({...v,sseOptions:e.sseOptions}):Cw({...v,wsOptions:e.wsOptions}),ee;try{ee=new BroadcastChannel(`devframe-auth`)}catch{}let te,ne=!1;function re(e){return((...t)=>ne||!te?e(...t):te.then(()=>e(...t)))}function x(){g=!0;try{h?.(),m?.()}finally{try{ee?.close()}finally{b.close?.()}}}let ie={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(RC(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;RC(t),o={...o,authToken:t};try{ee?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:re(b.call),callEvent:re(b.callEvent),callOptional:re(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:x};ie.sharedState=YC(ie),ie.streaming=vw(ie),ie.services=JC(ie);let ae=new Map;ie.scope=(e=>{if(!e)return ie;let t=ae.get(e);return t||(t=kw(ie,e),ae.set(e,t)),t}),f.rpc=ie;function oe(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function se(){if(e.simpleAuth!==!1&&oe()&&typeof globalThis.prompt==`function`)for(await ie.requestAuthCode().catch(()=>{});!ie.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await ie.requestTrustWithCode(t))return}}async function S(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await qC(ie,{param:n}):!1;t||r||ie.isTrusted||await se()}return te=S().then(()=>{ne=!0},()=>{ne=!0}),s.mcp&&lC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-D1NJaqR8.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ie))}).catch(()=>{}),ee&&(ee.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ie.requestTrustWithToken(e.data.authToken)}),ie}var Lw=Iw;function Rw(e,t){e&1&&(W(0,`dt`),X(1,`Analog`),G(),W(2,`dd`),X(3),G()),e&2&&(I(3),Z(t))}var zw=class e{rpc=Z_(null);navigate=J_();meta=F(null);componentCount=F(0);routeCount=F(0);signalCount=F(0);providerCount=F(0);storeCount=F(0);pipeCount=F(0);constructor(){tc(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);t.rpc.call(`build-meta`).then(e=>this.meta.set(e)).catch(()=>{}),t.rpc.call(`get-components`).then(e=>this.componentCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-routes`).then(e=>this.routeCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-signals`).then(e=>this.signalCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-providers`).then(e=>this.providerCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-ngrx-store`).then(e=>this.storeCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-pipes`).then(e=>this.pipeCount.set(e.length)).catch(()=>{})})}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:64,vars:11,consts:[[1,`grid`],[1,`card`],[1,`card`,`clickable`,3,`click`],[1,`big`],[1,`sub`]],template:function(e,t){if(e&1&&(W(0,`div`,0)(1,`div`,1)(2,`h2`),X(3,`Project`),G(),W(4,`dl`)(5,`dt`),X(6,`Name`),G(),W(7,`dd`),X(8),G(),W(9,`dt`),X(10,`Angular`),G(),W(11,`dd`),X(12),G(),W(13,`dt`),X(14,`TypeScript`),G(),W(15,`dd`),X(16),G(),W(17,`dt`),X(18,`SSR`),G(),W(19,`dd`),X(20),G(),R(21,Rw,4,1),G()(),W(22,`div`,2),J(`click`,function(){return t.navigate.emit(`components`)}),W(23,`h2`),X(24,`Components`),G(),W(25,`p`,3),X(26),G(),W(27,`p`,4),X(28,`discovered in source`),G()(),W(29,`div`,2),J(`click`,function(){return t.navigate.emit(`routes`)}),W(30,`h2`),X(31,`Routes`),G(),W(32,`p`,3),X(33),G(),W(34,`p`,4),X(35,`registered paths`),G()(),W(36,`div`,2),J(`click`,function(){return t.navigate.emit(`signals`)}),W(37,`h2`),X(38,`Signals`),G(),W(39,`p`,3),X(40),G(),W(41,`p`,4),X(42,`reactive primitives`),G()(),W(43,`div`,2),J(`click`,function(){return t.navigate.emit(`injectors`)}),W(44,`h2`),X(45,`Injectors`),G(),W(46,`p`,3),X(47),G(),W(48,`p`,4),X(49,`DI providers`),G()(),W(50,`div`,2),J(`click`,function(){return t.navigate.emit(`store`)}),W(51,`h2`),X(52,`NgRx Store`),G(),W(53,`p`,3),X(54),G(),W(55,`p`,4),X(56,`store entries`),G()(),W(57,`div`,2),J(`click`,function(){return t.navigate.emit(`pipes`)}),W(58,`h2`),X(59,`Pipes`),G(),W(60,`p`,3),X(61),G(),W(62,`p`,4),X(63,`template transformers`),G()()()),e&2){let e;I(8),Z(t.meta()?.projectName??`…`),I(4),Z(t.meta()?.angularVersion??`…`),I(4),Z(t.meta()?.typescript??`…`),I(4),Z(t.meta()?.ssr?`Yes`:`No`),I(),z((e=t.meta()?.analog)?21:-1,e),I(5),Z(t.componentCount()),I(7),Z(t.routeCount()),I(7),Z(t.signalCount()),I(7),Z(t.providerCount()),I(7),Z(t.storeCount()),I(7),Z(t.pipeCount())}},styles:[`.grid[_ngcontent-%COMP%] { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; @@ -52,7 +52,7 @@ font-size: 13px; color: #71717a; margin-top: 4px; - }`]})},_w=()=>[],vw=(e,t)=>t.selector,yw=(e,t)=>t.outlet+t.route,bw=(e,t)=>t.formId,xw=(e,t)=>t.token+t.line;function Sw(e,t){e&1&&(W(0,`p`,3),X(1,`Scanning components…`),G())}function Cw(e,t){e&1&&(W(0,`p`,3),X(1,`No components found.`),G())}function ww(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=t.$implicit;I(),n_(`routed `,e.route,` · outlet `,e.outlet)}}function Tw(e,t){if(e&1){let e=K();W(0,`button`,14),J(`click`,function(){let t=N(e).$implicit;return P(Y(4).showForm.emit(t.formId))}),X(1),G()}if(e&2){let e=t.$implicit;I(),Q(` Show `,e.label,` in Forms `)}}function Ew(e,t){if(e&1&&(W(0,`li`,16),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function Dw(e,t){if(e&1&&(W(0,`h4`),X(1,`Inputs`),G(),W(2,`ul`,15),B(3,Ew,2,1,`li`,16,Mh),G()),e&2){let e=Y(2).$implicit;I(3),V(e.inputs)}}function Ow(e,t){if(e&1&&(W(0,`li`,17),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function kw(e,t){if(e&1&&(W(0,`h4`),X(1,`Outputs`),G(),W(2,`ul`,15),B(3,Ow,2,1,`li`,17,Mh),G()),e&2){let e=Y(2).$implicit;I(3),V(e.outputs)}}function Aw(e,t){if(e&1&&(W(0,`span`,22),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`→ `,e.source)}}function jw(e,t){if(e&1&&(W(0,`li`,19)(1,`span`,20),X(2),G(),W(3,`span`,21),X(4),G(),R(5,Aw,2,1,`span`,22),G()),e&2){let e=t.$implicit;I(2),Z(e.token),I(2),Z(e.type),I(),z(e.source&&e.source!==`class`&&e.source!==`providers array`?5:-1)}}function Mw(e,t){if(e&1&&(W(0,`h4`),X(1,`Injected Providers`),G(),W(2,`ul`,18),B(3,jw,6,3,`li`,19,xw),G()),e&2){let e=Y(4);I(3),V(e.selectedProviders())}}function Nw(e,t){e&1&&(W(0,`p`,13),X(1,`No injected providers detected.`),G())}function Pw(e,t){if(e&1&&(W(0,`div`,11)(1,`dl`)(2,`dt`),X(3,`File`),G(),W(4,`dd`),X(5),G(),W(6,`dt`),X(7,`Standalone`),G(),W(8,`dd`),X(9),G()(),B(10,Tw,2,1,`button`,12,bw),R(12,Dw,5,0),R(13,kw,5,0),R(14,Mw,5,0)(15,Nw,2,0,`p`,13),G()),e&2){let e=Y().$implicit,t=Y(2);I(5),Z(e.file),I(4),Z(e.isStandalone?`Yes`:`No`),I(),V(t.formsIn(e.file)),I(2),z(e.inputs.length?12:-1),I(),z(e.outputs.length?13:-1),I(),z(t.selectedProviders().length?14:15)}}function Fw(e,t){if(e&1){let e=K();W(0,`li`,6)(1,`button`,7),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).select(t))}),W(2,`div`,8),X(3),G(),W(4,`div`,9),X(5),G(),B(6,ww,2,2,`span`,10,yw),G(),R(8,Pw,16,5,`div`,11),G()}if(e&2){let e=t.$implicit,n=Y(2);jg(`expanded`,n.isSelected(e)),I(),L(`aria-expanded`,n.isSelected(e)),I(2),Q(`<`,e.selector,`>`),I(2),Z(e.file),I(),V(n.routedBy().get(e.selector)??a_(6,_w)),I(2),z(n.isSelected(e)?8:-1)}}function Iw(e,t){if(e&1&&(W(0,`ul`,4),B(1,Fw,9,7,`li`,5,vw),G()),e&2){let e=Y();I(),V(e.filtered())}}var Lw=class e{rpc=k_(null);showForm=E_();formOwners=F([]);components=F([]);allProviders=F([]);filter=F(``);loading=F(!1);selected=F(null);selectedProviders=F([]);filtered=F([]);outlets=F([]);unsubscribeRouter=null;destroyRef=A(fs);routedBy=$(()=>{let e=new Map,t=n=>{for(let r of n)r.activated&&r.element&&r.route&&e.set(r.element,[...e.get(r.element)??[],{route:r.route,outlet:r.outlet}]),r.children&&t(r.children)};return t(this.outlets()),e});constructor(){$s(()=>{let e=this.filter().toLowerCase(),t=this.components();this.filtered.set(e?t.filter(t=>t.selector.includes(e)||t.file.includes(e)):t)}),$s(()=>{let e=this.rpc();e&&(this.refresh(),this.watchRouter(e))}),this.destroyRef.onDestroy(()=>this.unsubscribeRouter?.())}async watchRouter(e){try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages??[],n=t.find(e=>e.snapshot)??t[0];this.outlets.set(n?.outlets??[])};n(t.value()),this.unsubscribeRouter?.(),this.unsubscribeRouter=t.on(`updated`,n)}catch{this.outlets.set([])}}async refresh(){let e=this.rpc();if(e){this.loading.set(!0);try{let t=e.scope(`ng-devtools`),[n,r]=await Promise.all([t.rpc.call(`get-components`),t.rpc.call(`get-providers`)]);this.components.set(n);let i=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(i??[]),this.allProviders.set(r);let a=this.selected();if(a){let e=n.find(e=>e.selector===a.selector);e?(this.selected.set(e),this.selectedProviders.set(r.filter(t=>t.file===e.file))):(this.selected.set(null),this.selectedProviders.set([]))}}finally{this.loading.set(!1)}}}formsIn(e){return this.formOwners().filter(t=>t.file===e)}isSelected(e){return this.selected()?.selector===e.selector}select(e){if(this.isSelected(e)){this.selected.set(null),this.selectedProviders.set([]);let e=this.rpc();e&&e.scope(`ng-devtools`).rpc.callEvent(`select-component`,null);return}this.selected.set(e),this.selectedProviders.set(this.allProviders().filter(t=>t.file===e.file));let t=this.rpc();t&&t.scope(`ng-devtools`).rpc.callEvent(`select-component`,e.selector)}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-component-tree`]],inputs:{rpc:[1,`rpc`]},outputs:{showForm:`showForm`},decls:7,vars:2,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter components…`,3,`input`,`value`],[3,`click`],[1,`muted`],[`role`,`list`,1,`component-list`],[1,`component-item`,3,`expanded`],[1,`component-item`],[1,`component-toggle`,3,`click`],[1,`selector`],[1,`file`],[1,`routed`],[1,`inline-detail`],[`type`,`button`,1,`show-form`],[1,`no-providers`],[`type`,`button`,1,`show-form`,3,`click`],[`role`,`list`,1,`prop-list`],[1,`prop-chip`,`input-chip`],[1,`prop-chip`,`output-chip`],[`role`,`list`,1,`provider-list`],[1,`provider-item`],[1,`provider-token`],[1,`provider-type`],[1,`provider-source`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`input`,1),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),W(2,`button`,2),J(`click`,function(){return t.refresh()}),X(3,`Refresh`),G()(),R(4,Sw,2,0,`p`,3)(5,Cw,2,0,`p`,3)(6,Iw,3,0,`ul`,4)),e&2&&(I(),q(`value`,t.filter()),I(3),z(t.loading()?4:t.filtered().length===0?5:6))},styles:[`.toolbar[_ngcontent-%COMP%] { + }`]})},Bw=()=>[],Vw=(e,t)=>t.selector,Hw=(e,t)=>t.outlet+t.route,Uw=(e,t)=>t.formId,Ww=(e,t)=>t.token+t.line;function Gw(e,t){e&1&&(W(0,`p`,3),X(1,`Scanning components…`),G())}function Kw(e,t){e&1&&(W(0,`p`,3),X(1,`No components found.`),G())}function qw(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=t.$implicit;I(),w_(`routed `,e.route,` · outlet `,e.outlet)}}function Jw(e,t){if(e&1){let e=K();W(0,`button`,14),J(`click`,function(){let t=N(e).$implicit;return P(Y(4).showForm.emit(t.formId))}),X(1),G()}if(e&2){let e=t.$implicit;I(),Q(` Show `,e.label,` in Forms `)}}function Yw(e,t){if(e&1&&(W(0,`li`,16),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function Xw(e,t){if(e&1&&(W(0,`h4`),X(1,`Inputs`),G(),W(2,`ul`,15),B(3,Yw,2,1,`li`,16,eg),G()),e&2){let e=Y(2).$implicit;I(3),V(e.inputs)}}function Zw(e,t){if(e&1&&(W(0,`li`,17),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function Qw(e,t){if(e&1&&(W(0,`h4`),X(1,`Outputs`),G(),W(2,`ul`,15),B(3,Zw,2,1,`li`,17,eg),G()),e&2){let e=Y(2).$implicit;I(3),V(e.outputs)}}function $w(e,t){if(e&1&&(W(0,`span`,22),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`→ `,e.source)}}function eT(e,t){if(e&1&&(W(0,`li`,19)(1,`span`,20),X(2),G(),W(3,`span`,21),X(4),G(),R(5,$w,2,1,`span`,22),G()),e&2){let e=t.$implicit;I(2),Z(e.token),I(2),Z(e.type),I(),z(e.source&&e.source!==`class`&&e.source!==`providers array`?5:-1)}}function tT(e,t){if(e&1&&(W(0,`h4`),X(1,`Injected Providers`),G(),W(2,`ul`,18),B(3,eT,6,3,`li`,19,Ww),G()),e&2){let e=Y(4);I(3),V(e.selectedProviders())}}function nT(e,t){e&1&&(W(0,`p`,13),X(1,`No injected providers detected.`),G())}function rT(e,t){if(e&1&&(W(0,`div`,11)(1,`dl`)(2,`dt`),X(3,`File`),G(),W(4,`dd`),X(5),G(),W(6,`dt`),X(7,`Standalone`),G(),W(8,`dd`),X(9),G()(),B(10,Jw,2,1,`button`,12,Uw),R(12,Xw,5,0),R(13,Qw,5,0),R(14,tT,5,0)(15,nT,2,0,`p`,13),G()),e&2){let e=Y().$implicit,t=Y(2);I(5),Z(e.file),I(4),Z(e.isStandalone?`Yes`:`No`),I(),V(t.formsIn(e.file)),I(2),z(e.inputs.length?12:-1),I(),z(e.outputs.length?13:-1),I(),z(t.selectedProviders().length?14:15)}}function iT(e,t){if(e&1){let e=K();W(0,`li`,6)(1,`button`,7),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).select(t))}),W(2,`div`,8),X(3),G(),W(4,`div`,9),X(5),G(),B(6,qw,2,2,`span`,10,Hw),G(),R(8,rT,16,5,`div`,11),G()}if(e&2){let e=t.$implicit,n=Y(2);$g(`expanded`,n.isSelected(e)),I(),L(`aria-expanded`,n.isSelected(e)),I(2),Q(`<`,e.selector,`>`),I(2),Z(e.file),I(),V(n.routedBy().get(e.selector)??D_(6,Bw)),I(2),z(n.isSelected(e)?8:-1)}}function aT(e,t){if(e&1&&(W(0,`ul`,4),B(1,iT,9,7,`li`,5,Vw),G()),e&2){let e=Y();I(),V(e.filtered())}}var oT=class e{rpc=Z_(null);showForm=J_();formOwners=F([]);components=F([]);allProviders=F([]);filter=F(``);loading=F(!1);selected=F(null);selectedProviders=F([]);filtered=F([]);outlets=F([]);unsubscribeRouter=null;destroyRef=A(ms);routedBy=$(()=>{let e=new Map,t=n=>{for(let r of n)r.activated&&r.element&&r.route&&e.set(r.element,[...e.get(r.element)??[],{route:r.route,outlet:r.outlet}]),r.children&&t(r.children)};return t(this.outlets()),e});constructor(){tc(()=>{let e=this.filter().toLowerCase(),t=this.components();this.filtered.set(e?t.filter(t=>t.selector.includes(e)||t.file.includes(e)):t)}),tc(()=>{let e=this.rpc();e&&(this.refresh(),this.watchRouter(e))}),this.destroyRef.onDestroy(()=>this.unsubscribeRouter?.())}async watchRouter(e){try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages??[],n=t.find(e=>e.snapshot)??t[0];this.outlets.set(n?.outlets??[])};n(t.value()),this.unsubscribeRouter?.(),this.unsubscribeRouter=t.on(`updated`,n)}catch{this.outlets.set([])}}async refresh(){let e=this.rpc();if(e){this.loading.set(!0);try{let t=e.scope(`ng-devtools`),[n,r]=await Promise.all([t.rpc.call(`get-components`),t.rpc.call(`get-providers`)]);this.components.set(n);let i=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(i??[]),this.allProviders.set(r);let a=this.selected();if(a){let e=n.find(e=>e.selector===a.selector);e?(this.selected.set(e),this.selectedProviders.set(r.filter(t=>t.file===e.file))):(this.selected.set(null),this.selectedProviders.set([]))}}finally{this.loading.set(!1)}}}formsIn(e){return this.formOwners().filter(t=>t.file===e)}isSelected(e){return this.selected()?.selector===e.selector}select(e){if(this.isSelected(e)){this.selected.set(null),this.selectedProviders.set([]);let e=this.rpc();e&&e.scope(`ng-devtools`).rpc.callEvent(`select-component`,null);return}this.selected.set(e),this.selectedProviders.set(this.allProviders().filter(t=>t.file===e.file));let t=this.rpc();t&&t.scope(`ng-devtools`).rpc.callEvent(`select-component`,e.selector)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-component-tree`]],inputs:{rpc:[1,`rpc`]},outputs:{showForm:`showForm`},decls:7,vars:2,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter components…`,3,`input`,`value`],[3,`click`],[1,`muted`],[`role`,`list`,1,`component-list`],[1,`component-item`,3,`expanded`],[1,`component-item`],[1,`component-toggle`,3,`click`],[1,`selector`],[1,`file`],[1,`routed`],[1,`inline-detail`],[`type`,`button`,1,`show-form`],[1,`no-providers`],[`type`,`button`,1,`show-form`,3,`click`],[`role`,`list`,1,`prop-list`],[1,`prop-chip`,`input-chip`],[1,`prop-chip`,`output-chip`],[`role`,`list`,1,`provider-list`],[1,`provider-item`],[1,`provider-token`],[1,`provider-type`],[1,`provider-source`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`input`,1),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),W(2,`button`,2),J(`click`,function(){return t.refresh()}),X(3,`Refresh`),G()(),R(4,Gw,2,0,`p`,3)(5,Kw,2,0,`p`,3)(6,aT,3,0,`ul`,4)),e&2&&(I(),q(`value`,t.filter()),I(3),z(t.loading()?4:t.filtered().length===0?5:6))},styles:[`.toolbar[_ngcontent-%COMP%] { display: flex; gap: 8px; margin-bottom: 16px; @@ -233,7 +233,7 @@ .no-providers[_ngcontent-%COMP%] { font-size: 13px; color: #52525b; - }`]})};function Rw(e,t,n){return e?e.scope(`ng-devtools`).rpc.call(t,...n===void 0?[]:[n]).then(e=>e,()=>null):Promise.resolve(null)}function zw(e,t,n){return Rw(e,`request-router-action`,{pageId:t,request:n})}function Bw(e){return e===`succeeded`?`good`:e===`redirected`||e===`pending`||e===`skipped`?`warn`:e===`cancelled`||e===`failed`?`bad`:``}var Vw=()=>[],Hw=(e,t)=>t[0],Uw=(e,t)=>t.input;function Ww(e,t){if(e&1&&(W(0,`p`,2),X(1,` The browser shows `),W(2,`code`),X(3),G(),X(4,`, not the router URL (skipLocationChange, browserUrl, a failed navigation or code that changed history). `),G()),e&2){let e=Y();I(3),Z(e.browserUrl)}}function Gw(e,t){if(e&1){let e=K();W(0,`div`,3),X(1,` Navigating to `),W(2,`code`),X(3),G(),X(4),W(5,`button`,8),J(`click`,function(){return N(e),P(Y(2).abort())}),X(6,`Abort`),G()()}if(e&2){let e=t;I(3),Z(e.url),I(),Q(` (#`,e.id,`) `)}}function Kw(e,t){if(e&1&&(W(0,`p`,4),X(1),G()),e&2){let e=Y(2);I(),Z(e.message())}}function qw(e,t){if(e&1&&(W(0,`dt`),X(1,`Document title`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y();I(3),Z(e.title)}}function Jw(e,t){if(e&1&&(W(0,`dt`),X(1,`Query params`),G(),W(2,`dd`)(3,`code`),X(4),u_(5,`json`),G()()),e&2){let e=Y();I(4),Z(f_(5,1,e.queryParams))}}function Yw(e,t){if(e&1&&(W(0,`dt`),X(1,`Fragment`),G(),W(2,`dd`)(3,`code`),X(4),G()()),e&2){let e=Y();I(4),Z(e.fragment)}}function Xw(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.route.outlet)}}function Zw(e,t){e&1&&(W(0,`span`,10),X(1,`lazy`),G())}function Qw(e,t){if(e&1&&(W(0,`div`,11),X(1),G()),e&2){let e=Y().$implicit;I(),n_(` title `,e.route.title,``,e.route.ownTitle===!1?` (inherited)`:``,` `)}}function $w(e,t){e&1&&(W(0,`span`,10),X(1,`inherited`),G())}function eT(e,t){if(e&1&&(W(0,`div`)(1,`code`),X(2),u_(3,`json`),G(),R(4,$w,2,0,`span`,10),G()),e&2){let e=t.$implicit,n=Y().$implicit;I(2),n_(``,e[0],`: `,f_(3,3,e[1])),I(2),z(n.route.paramSources?.[e[0]]===`inherited`?4:-1)}}function tT(e,t){e&1&&X(0,` — `)}function nT(e,t){e&1&&(W(0,`span`,10),X(1),G()),e&2&&(I(),Z(t))}function rT(e,t){if(e&1&&(W(0,`div`,12)(1,`code`),X(2),u_(3,`json`),G(),R(4,nT,2,1,`span`,10),G()),e&2){let e,n=t.$implicit,r=Y().$implicit;I(2),n_(``,n[0],`: `,f_(3,3,n[1])),I(2),z((e=r.route.dataSources?.[n[0]])?4:-1,e)}}function iT(e,t){e&1&&X(0,` — `)}function aT(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function oT(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=t.$implicit;I(),Q(`resolve `,e)}}function sT(e,t){e&1&&X(0,` — `)}function cT(e,t){if(e&1&&(W(0,`tr`)(1,`td`,9),X(2),R(3,Xw,2,1,`span`,10),R(4,Zw,2,0,`span`,10),R(5,Qw,2,2,`div`,11),G(),W(6,`td`),X(7),G(),W(8,`td`),B(9,eT,5,5,`div`,null,Hw,!1,tT,1,0),G(),W(12,`td`),B(13,rT,5,5,`div`,12,Hw,!1,iT,1,0),G(),W(16,`td`),B(17,aT,2,1,`span`,10,Mh),B(19,oT,2,1,`span`,10,Mh),R(21,sT,1,0),G()()),e&2){let e=t.$implicit,n=Y(2);I(),Ag(`padding-left`,12+e.depth*16,`px`),I(),Q(` `,e.depth===0&&!e.route.path?`(root)`:`/`+e.route.path,` `),I(),z(e.route.outlet===`primary`?-1:3),I(),z(e.route.lazy?4:-1),I(),z(e.route.title?5:-1),I(2),Z(e.route.component??`—`),I(2),V(n.entries(e.route.params)),I(4),V(n.entries(e.route.data)),I(4),V(n.guardList(e.route)),I(2),V(e.route.resolvers??a_(10,Vw)),I(2),z(!n.guardList(e.route).length&&!e.route.resolvers?21:-1)}}function lT(e,t){if(e&1&&(W(0,`code`),X(1),G(),X(2,` for `),W(3,`code`),X(4),G()),e&2){let e=Y().$implicit;I(),Z(e.outlet.component??`?`),I(3),Z(e.outlet.route??`?`)}}function uT(e,t){e&1&&(W(0,`span`,0),X(1,`not activated`),G())}function dT(e,t){e&1&&(W(0,`span`,10),X(1,`detached by reuse strategy`),G())}function fT(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=t.$implicit;I(),n_(`input `,e.input,` ← `,e.source)}}function pT(e,t){if(e&1&&(W(0,`li`)(1,`span`,10),X(2),G(),R(3,lT,5,2)(4,uT,2,0,`span`,0),R(5,dT,2,0,`span`,10),B(6,fT,2,2,`span`,10,Uw),G()),e&2){let e=t.$implicit,n=Y(3);Ag(`padding-left`,e.depth*16,`px`),I(2),Z(e.outlet.outlet),I(),z(e.outlet.activated?3:4),I(2),z(e.outlet.detached?5:-1),I(),V(n.boundInputs(e.outlet))}}function mT(e,t){if(e&1&&(W(0,`h3`),X(1,`Outlets`),G(),W(2,`ul`,13),B(3,pT,8,5,`li`,14,jh),G()),e&2){let e=Y(2);I(3),V(e.outletRows())}}function hT(e,t){if(e&1&&(W(0,`p`,1)(1,`code`),X(2),G()(),R(3,Ww,5,1,`p`,2),R(4,Gw,7,2,`div`,3),R(5,Kw,2,1,`p`,4),W(6,`dl`,5),R(7,qw,4,1),R(8,Jw,6,3),R(9,Yw,5,1),G(),W(10,`h3`),X(11,`Active routes`),G(),W(12,`div`,6)(13,`table`)(14,`thead`)(15,`tr`)(16,`th`,7),X(17,`Route`),G(),W(18,`th`,7),X(19,`Component`),G(),W(20,`th`,7),X(21,`Params`),G(),W(22,`th`,7),X(23,`Data`),G(),W(24,`th`,7),X(25,`Guards and resolvers`),G()()(),W(26,`tbody`),B(27,cT,22,11,`tr`,null,jh),G()()(),R(29,mT,5,0)),e&2){let e,n=t,r=Y();I(2),Z(n.url),I(),z(n.urlDrift&&n.browserUrl?3:-1),I(),z((e=n.pending)?4:-1,e),I(),z(r.message()?5:-1),I(2),z(n.title?7:-1),I(),z(r.hasKeys(n.queryParams)?8:-1),I(),z(n.fragment?9:-1),I(18),V(r.rows()),I(2),z(r.outletRows().length?29:-1)}}function gT(e,t){e&1&&(W(0,`p`,0),X(1,`This page reports no Router.`),G())}var _T=class e{page=k_.required();rpc=k_(null);message=F(``);rows=$(()=>{let e=[],t=(n,r)=>{e.push({route:n,depth:r});for(let e of n.children)t(e,r+1)},n=this.page().snapshot?.root;return n&&t(n,0),e});outletRows=$(()=>{let e=[],t=(n,r)=>{for(let i of n)e.push({outlet:i,depth:r}),i.children&&t(i.children,r+1)};return t(this.page().outlets??[],0),e});hasKeys(e){return Object.keys(e).length>0}entries(e){return Object.entries(e)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}boundInputs(e){return(e.inputs??[]).filter(e=>e.source!==`unset`)}async abort(){let e=await zw(this.rpc(),this.page().pageId,{action:`abort`});this.message.set(e?.error?String(e.error):`Aborted navigation #${e?.aborted}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-route-current`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:2,vars:1,consts:[[1,`muted`],[1,`url`],[`role`,`note`,1,`note`],[`role`,`status`,1,`pending`],[`role`,`status`,1,`muted`],[1,`facts`],[`role`,`region`,`aria-label`,`Active routes`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[`type`,`button`,1,`small`,3,`click`],[1,`path`],[1,`tag`],[1,`sub`],[1,`data`],[1,`outlets`],[3,`padding-left`]],template:function(e,t){if(e&1&&R(0,hT,30,8)(1,gT,2,0,`p`,0),e&2){let e;z((e=t.page().snapshot)?0:1,e)}},dependencies:[Wv],styles:[`.muted[_ngcontent-%COMP%] { + }`]})};function sT(e,t,n){return e?e.scope(`ng-devtools`).rpc.call(t,...n===void 0?[]:[n]).then(e=>e,()=>null):Promise.resolve(null)}function cT(e,t,n){return sT(e,`request-router-action`,{pageId:t,request:n})}function lT(e){return e===`succeeded`?`good`:e===`redirected`||e===`pending`||e===`skipped`?`warn`:e===`cancelled`||e===`failed`?`bad`:``}var uT=()=>[],dT=(e,t)=>t[0],fT=(e,t)=>t.input;function pT(e,t){if(e&1&&(W(0,`p`,2),X(1,` The browser shows `),W(2,`code`),X(3),G(),X(4,`, not the router URL (skipLocationChange, browserUrl, a failed navigation or code that changed history). `),G()),e&2){let e=Y();I(3),Z(e.browserUrl)}}function mT(e,t){if(e&1){let e=K();W(0,`div`,3),X(1,` Navigating to `),W(2,`code`),X(3),G(),X(4),W(5,`button`,8),J(`click`,function(){return N(e),P(Y(2).abort())}),X(6,`Abort`),G()()}if(e&2){let e=t;I(3),Z(e.url),I(),Q(` (#`,e.id,`) `)}}function hT(e,t){if(e&1&&(W(0,`p`,4),X(1),G()),e&2){let e=Y(2);I(),Z(e.message())}}function gT(e,t){if(e&1&&(W(0,`dt`),X(1,`Document title`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y();I(3),Z(e.title)}}function _T(e,t){if(e&1&&(W(0,`dt`),X(1,`Query params`),G(),W(2,`dd`)(3,`code`),X(4),M_(5,`json`),G()()),e&2){let e=Y();I(4),Z(P_(5,1,e.queryParams))}}function vT(e,t){if(e&1&&(W(0,`dt`),X(1,`Fragment`),G(),W(2,`dd`)(3,`code`),X(4),G()()),e&2){let e=Y();I(4),Z(e.fragment)}}function yT(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.route.outlet)}}function bT(e,t){e&1&&(W(0,`span`,10),X(1,`lazy`),G())}function xT(e,t){if(e&1&&(W(0,`div`,11),X(1),G()),e&2){let e=Y().$implicit;I(),w_(` title `,e.route.title,``,e.route.ownTitle===!1?` (inherited)`:``,` `)}}function ST(e,t){e&1&&(W(0,`span`,10),X(1,`inherited`),G())}function CT(e,t){if(e&1&&(W(0,`div`)(1,`code`),X(2),M_(3,`json`),G(),R(4,ST,2,0,`span`,10),G()),e&2){let e=t.$implicit,n=Y().$implicit;I(2),w_(``,e[0],`: `,P_(3,3,e[1])),I(2),z(n.route.paramSources?.[e[0]]===`inherited`?4:-1)}}function wT(e,t){e&1&&X(0,` — `)}function TT(e,t){e&1&&(W(0,`span`,10),X(1),G()),e&2&&(I(),Z(t))}function ET(e,t){if(e&1&&(W(0,`div`,12)(1,`code`),X(2),M_(3,`json`),G(),R(4,TT,2,1,`span`,10),G()),e&2){let e,n=t.$implicit,r=Y().$implicit;I(2),w_(``,n[0],`: `,P_(3,3,n[1])),I(2),z((e=r.route.dataSources?.[n[0]])?4:-1,e)}}function DT(e,t){e&1&&X(0,` — `)}function OT(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function kT(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=t.$implicit;I(),Q(`resolve `,e)}}function AT(e,t){e&1&&X(0,` — `)}function jT(e,t){if(e&1&&(W(0,`tr`)(1,`td`,9),X(2),R(3,yT,2,1,`span`,10),R(4,bT,2,0,`span`,10),R(5,xT,2,2,`div`,11),G(),W(6,`td`),X(7),G(),W(8,`td`),B(9,CT,5,5,`div`,null,dT,!1,wT,1,0),G(),W(12,`td`),B(13,ET,5,5,`div`,12,dT,!1,DT,1,0),G(),W(16,`td`),B(17,OT,2,1,`span`,10,eg),B(19,kT,2,1,`span`,10,eg),R(21,AT,1,0),G()()),e&2){let e=t.$implicit,n=Y(2);I(),Qg(`padding-left`,12+e.depth*16,`px`),I(),Q(` `,e.depth===0&&!e.route.path?`(root)`:`/`+e.route.path,` `),I(),z(e.route.outlet===`primary`?-1:3),I(),z(e.route.lazy?4:-1),I(),z(e.route.title?5:-1),I(2),Z(e.route.component??`—`),I(2),V(n.entries(e.route.params)),I(4),V(n.entries(e.route.data)),I(4),V(n.guardList(e.route)),I(2),V(e.route.resolvers??D_(10,uT)),I(2),z(!n.guardList(e.route).length&&!e.route.resolvers?21:-1)}}function MT(e,t){if(e&1&&(W(0,`code`),X(1),G(),X(2,` for `),W(3,`code`),X(4),G()),e&2){let e=Y().$implicit;I(),Z(e.outlet.component??`?`),I(3),Z(e.outlet.route??`?`)}}function NT(e,t){e&1&&(W(0,`span`,0),X(1,`not activated`),G())}function PT(e,t){e&1&&(W(0,`span`,10),X(1,`detached by reuse strategy`),G())}function FT(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=t.$implicit;I(),w_(`input `,e.input,` ← `,e.source)}}function IT(e,t){if(e&1&&(W(0,`li`)(1,`span`,10),X(2),G(),R(3,MT,5,2)(4,NT,2,0,`span`,0),R(5,PT,2,0,`span`,10),B(6,FT,2,2,`span`,10,fT),G()),e&2){let e=t.$implicit,n=Y(3);Qg(`padding-left`,e.depth*16,`px`),I(2),Z(e.outlet.outlet),I(),z(e.outlet.activated?3:4),I(2),z(e.outlet.detached?5:-1),I(),V(n.boundInputs(e.outlet))}}function LT(e,t){if(e&1&&(W(0,`h3`),X(1,`Outlets`),G(),W(2,`ul`,13),B(3,IT,8,5,`li`,14,$h),G()),e&2){let e=Y(2);I(3),V(e.outletRows())}}function RT(e,t){if(e&1&&(W(0,`p`,1)(1,`code`),X(2),G()(),R(3,pT,5,1,`p`,2),R(4,mT,7,2,`div`,3),R(5,hT,2,1,`p`,4),W(6,`dl`,5),R(7,gT,4,1),R(8,_T,6,3),R(9,vT,5,1),G(),W(10,`h3`),X(11,`Active routes`),G(),W(12,`div`,6)(13,`table`)(14,`thead`)(15,`tr`)(16,`th`,7),X(17,`Route`),G(),W(18,`th`,7),X(19,`Component`),G(),W(20,`th`,7),X(21,`Params`),G(),W(22,`th`,7),X(23,`Data`),G(),W(24,`th`,7),X(25,`Guards and resolvers`),G()()(),W(26,`tbody`),B(27,jT,22,11,`tr`,null,$h),G()()(),R(29,LT,5,0)),e&2){let e,n=t,r=Y();I(2),Z(n.url),I(),z(n.urlDrift&&n.browserUrl?3:-1),I(),z((e=n.pending)?4:-1,e),I(),z(r.message()?5:-1),I(2),z(n.title?7:-1),I(),z(r.hasKeys(n.queryParams)?8:-1),I(),z(n.fragment?9:-1),I(18),V(r.rows()),I(2),z(r.outletRows().length?29:-1)}}function zT(e,t){e&1&&(W(0,`p`,0),X(1,`This page reports no Router.`),G())}var BT=class e{page=Z_.required();rpc=Z_(null);message=F(``);rows=$(()=>{let e=[],t=(n,r)=>{e.push({route:n,depth:r});for(let e of n.children)t(e,r+1)},n=this.page().snapshot?.root;return n&&t(n,0),e});outletRows=$(()=>{let e=[],t=(n,r)=>{for(let i of n)e.push({outlet:i,depth:r}),i.children&&t(i.children,r+1)};return t(this.page().outlets??[],0),e});hasKeys(e){return Object.keys(e).length>0}entries(e){return Object.entries(e)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}boundInputs(e){return(e.inputs??[]).filter(e=>e.source!==`unset`)}async abort(){let e=await cT(this.rpc(),this.page().pageId,{action:`abort`});this.message.set(e?.error?String(e.error):`Aborted navigation #${e?.aborted}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-route-current`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:2,vars:1,consts:[[1,`muted`],[1,`url`],[`role`,`note`,1,`note`],[`role`,`status`,1,`pending`],[`role`,`status`,1,`muted`],[1,`facts`],[`role`,`region`,`aria-label`,`Active routes`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[`type`,`button`,1,`small`,3,`click`],[1,`path`],[1,`tag`],[1,`sub`],[1,`data`],[1,`outlets`],[3,`padding-left`]],template:function(e,t){if(e&1&&R(0,RT,30,8)(1,zT,2,0,`p`,0),e&2){let e;z((e=t.page().snapshot)?0:1,e)}},dependencies:[py],styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; font-size: 13px; } @@ -393,7 +393,7 @@ gap: 6px; font-size: 13px; color: #e4e4e7; - }`]})};function vT(e,t){e&1&&(W(0,`p`,2),X(1,`Checking…`),G())}function yT(e,t){if(e&1&&(W(0,`li`)(1,`div`,4)(2,`span`,5),X(3),G(),W(4,`code`),X(5),G(),W(6,`code`,6),X(7),G()(),W(8,`p`),X(9),G(),W(10,`p`,7),X(11),W(12,`span`,2),X(13),G()()()),e&2){let e=t.$implicit;I(2),L(`data-tone`,e.severity===`error`?`bad`:e.severity===`warning`?`warn`:``),I(),Z(e.severity),I(2),Z(e.rule),I(2),Z(e.route),I(2),Z(e.message),I(2),Q(` Fix: `,e.fix,` `),I(2),Q(`(Angular `,e.angular===`throws`?`throws`:e.angular===`warns`?`warns`:`does not warn`,`)`)}}function bT(e,t){if(e&1&&(W(0,`ul`,3),B(1,yT,14,7,`li`,null,jh),G()),e&2){let e=Y();I(),V(e.findings())}}function xT(e,t){e&1&&(W(0,`p`,2),X(1,`No route config problems found.`),G())}var ST=class e{page=k_.required();rpc=k_(null);findings=F([]);loading=F(!1);key=$(()=>`${this.page().pageId}:${this.page().generation}:${this.page().navigations.length}`);constructor(){$s(()=>{this.key(),x_(()=>void this.run())})}async run(){this.loading.set(!0),this.findings.set(await Rw(this.rpc(),`router-lint`,this.page().pageId)??[]),this.loading.set(!1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-route-lint`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:8,vars:1,consts:[[1,`toolbar`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`findings`],[1,`head`],[1,`badge`],[1,`route`],[1,`fix`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`button`,1),J(`click`,function(){return t.run()}),X(2,`Check again`),G(),W(3,`span`,2),X(4,`Checks the live config, links and recent navigations. Lazy routes that have not loaded are skipped.`),G()(),R(5,vT,2,0,`p`,2)(6,bT,3,0,`ul`,3)(7,xT,2,0,`p`,2)),e&2&&(I(5),z(t.loading()?5:t.findings().length?6:7))},styles:[`.muted[_ngcontent-%COMP%] { + }`]})};function VT(e,t){e&1&&(W(0,`p`,2),X(1,`Checking…`),G())}function HT(e,t){if(e&1&&(W(0,`li`)(1,`div`,4)(2,`span`,5),X(3),G(),W(4,`code`),X(5),G(),W(6,`code`,6),X(7),G()(),W(8,`p`),X(9),G(),W(10,`p`,7),X(11),W(12,`span`,2),X(13),G()()()),e&2){let e=t.$implicit;I(2),L(`data-tone`,e.severity===`error`?`bad`:e.severity===`warning`?`warn`:``),I(),Z(e.severity),I(2),Z(e.rule),I(2),Z(e.route),I(2),Z(e.message),I(2),Q(` Fix: `,e.fix,` `),I(2),Q(`(Angular `,e.angular===`throws`?`throws`:e.angular===`warns`?`warns`:`does not warn`,`)`)}}function UT(e,t){if(e&1&&(W(0,`ul`,3),B(1,HT,14,7,`li`,null,$h),G()),e&2){let e=Y();I(),V(e.findings())}}function WT(e,t){e&1&&(W(0,`p`,2),X(1,`No route config problems found.`),G())}var GT=class e{page=Z_.required();rpc=Z_(null);findings=F([]);loading=F(!1);key=$(()=>`${this.page().pageId}:${this.page().generation}:${this.page().navigations.length}`);constructor(){tc(()=>{this.key(),U_(()=>void this.run())})}async run(){this.loading.set(!0),this.findings.set(await sT(this.rpc(),`router-lint`,this.page().pageId)??[]),this.loading.set(!1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-route-lint`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:8,vars:1,consts:[[1,`toolbar`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`findings`],[1,`head`],[1,`badge`],[1,`route`],[1,`fix`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`button`,1),J(`click`,function(){return t.run()}),X(2,`Check again`),G(),W(3,`span`,2),X(4,`Checks the live config, links and recent navigations. Lazy routes that have not loaded are skipped.`),G()(),R(5,VT,2,0,`p`,2)(6,UT,3,0,`ul`,3)(7,WT,2,0,`p`,2)),e&2&&(I(5),z(t.loading()?5:t.findings().length?6:7))},styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; font-size: 13px; } @@ -531,7 +531,7 @@ } .fix[_ngcontent-%COMP%] { color: #d4d4d8; - }`]})},CT=(e,t)=>t.name,wT=(e,t)=>t[0];function TT(e,t){e&1&&(W(0,`p`,1),X(1,` Events-only mode: this build has no debug utils (production build or unusual setup), so the route config, lint and actions are limited. `),G())}function ET(e,t){if(e&1&&(W(0,`dt`),X(1,`Angular`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y();I(3),Z(e.angularVersion)}}function DT(e,t){if(e&1&&(W(0,`dt`),X(1,`Base href`),G(),W(2,`dd`)(3,`code`),X(4),G()()),e&2){let e=Y();I(4),Z(e.baseHref)}}function OT(e,t){if(e&1&&(W(0,`dt`),X(1,`Hydration`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y();I(3),Q(``,e.hydrated,` component(s) hydrated from server HTML`)}}function kT(e,t){if(e&1&&(W(0,`tr`)(1,`td`)(2,`code`),X(3),G()(),W(4,`td`)(5,`code`),X(6),G()(),W(7,`td`)(8,`span`,6),X(9),G()()()),e&2){let e=t.$implicit;I(3),Z(e.name),I(3),Z(e.value),I(2),L(`data-tone`,e.set?`warn`:``),I(),Z(e.set?`set`:`default`)}}function AT(e,t){if(e&1&&(W(0,`li`)(1,`span`,6),X(2),G()()),e&2){let e=t.$implicit;I(),L(`data-tone`,e[1]===`off`?``:`good`),I(),n_(``,e[0],`: `,e[1])}}function jT(e,t){if(e&1&&(W(0,`dt`),X(1),G(),W(2,`dd`)(3,`code`),X(4),G()()),e&2){let e=t.$implicit;I(),Z(e[0]),I(3),Z(e[1])}}function MT(e,t){if(e&1&&(R(0,TT,2,0,`p`,1),W(1,`dl`,2)(2,`dt`),X(3,`Set up with`),G(),W(4,`dd`),X(5),G(),R(6,ET,4,1),R(7,DT,5,1),R(8,OT,4,1),G(),W(9,`h3`),X(10,`Options`),G(),W(11,`div`,3)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,4),X(16,`Option`),G(),W(17,`th`,4),X(18,`Value`),G(),W(19,`th`,4),X(20,`Source`),G()()(),W(21,`tbody`),B(22,kT,10,4,`tr`,null,CT),G()()(),W(24,`h3`),X(25,`Features`),G(),W(26,`ul`,5),B(27,AT,3,3,`li`,null,wT),G(),W(29,`h3`),X(30,`Strategies`),G(),W(31,`dl`,2),B(32,jT,5,2,null,null,wT),G()),e&2){let e=t,n=Y();z(e.mode===`events-only`?0:-1),I(5),n_(` `,e.setupKind,``,e.routers>1?`, `+e.routers+` routers on the page`:``,` `),I(),z(e.angularVersion?6:-1),I(),z(e.baseHref?7:-1),I(),z(e.hydrated?8:-1),I(14),V(e.options),I(5),V(n.entries(e.features)),I(5),V(n.entries(e.strategies))}}function NT(e,t){e&1&&(W(0,`p`,0),X(1,`The page has not reported its router setup yet.`),G())}var PT=class e{page=k_.required();entries(e){return Object.entries(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-route-setup`]],inputs:{page:[1,`page`]},decls:2,vars:1,consts:[[1,`muted`],[`role`,`note`,1,`note`],[1,`facts`],[`role`,`region`,`aria-label`,`Router options`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`chips`],[1,`badge`]],template:function(e,t){if(e&1&&R(0,MT,34,6)(1,NT,2,0,`p`,0),e&2){let e;z((e=t.page().setup)?0:1,e)}},styles:[`.muted[_ngcontent-%COMP%] { + }`]})},KT=(e,t)=>t.name,qT=(e,t)=>t[0];function JT(e,t){e&1&&(W(0,`p`,1),X(1,` Events-only mode: this build has no debug utils (production build or unusual setup), so the route config, lint and actions are limited. `),G())}function YT(e,t){if(e&1&&(W(0,`dt`),X(1,`Angular`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y();I(3),Z(e.angularVersion)}}function XT(e,t){if(e&1&&(W(0,`dt`),X(1,`Base href`),G(),W(2,`dd`)(3,`code`),X(4),G()()),e&2){let e=Y();I(4),Z(e.baseHref)}}function ZT(e,t){if(e&1&&(W(0,`dt`),X(1,`Hydration`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y();I(3),Q(``,e.hydrated,` component(s) hydrated from server HTML`)}}function QT(e,t){if(e&1&&(W(0,`tr`)(1,`td`)(2,`code`),X(3),G()(),W(4,`td`)(5,`code`),X(6),G()(),W(7,`td`)(8,`span`,6),X(9),G()()()),e&2){let e=t.$implicit;I(3),Z(e.name),I(3),Z(e.value),I(2),L(`data-tone`,e.set?`warn`:``),I(),Z(e.set?`set`:`default`)}}function $T(e,t){if(e&1&&(W(0,`li`)(1,`span`,6),X(2),G()()),e&2){let e=t.$implicit;I(),L(`data-tone`,e[1]===`off`?``:`good`),I(),w_(``,e[0],`: `,e[1])}}function eE(e,t){if(e&1&&(W(0,`dt`),X(1),G(),W(2,`dd`)(3,`code`),X(4),G()()),e&2){let e=t.$implicit;I(),Z(e[0]),I(3),Z(e[1])}}function tE(e,t){if(e&1&&(R(0,JT,2,0,`p`,1),W(1,`dl`,2)(2,`dt`),X(3,`Set up with`),G(),W(4,`dd`),X(5),G(),R(6,YT,4,1),R(7,XT,5,1),R(8,ZT,4,1),G(),W(9,`h3`),X(10,`Options`),G(),W(11,`div`,3)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,4),X(16,`Option`),G(),W(17,`th`,4),X(18,`Value`),G(),W(19,`th`,4),X(20,`Source`),G()()(),W(21,`tbody`),B(22,QT,10,4,`tr`,null,KT),G()()(),W(24,`h3`),X(25,`Features`),G(),W(26,`ul`,5),B(27,$T,3,3,`li`,null,qT),G(),W(29,`h3`),X(30,`Strategies`),G(),W(31,`dl`,2),B(32,eE,5,2,null,null,qT),G()),e&2){let e=t,n=Y();z(e.mode===`events-only`?0:-1),I(5),w_(` `,e.setupKind,``,e.routers>1?`, `+e.routers+` routers on the page`:``,` `),I(),z(e.angularVersion?6:-1),I(),z(e.baseHref?7:-1),I(),z(e.hydrated?8:-1),I(14),V(e.options),I(5),V(n.entries(e.features)),I(5),V(n.entries(e.strategies))}}function nE(e,t){e&1&&(W(0,`p`,0),X(1,`The page has not reported its router setup yet.`),G())}var rE=class e{page=Z_.required();entries(e){return Object.entries(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-route-setup`]],inputs:{page:[1,`page`]},decls:2,vars:1,consts:[[1,`muted`],[`role`,`note`,1,`note`],[1,`facts`],[`role`,`region`,`aria-label`,`Router options`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`chips`],[1,`badge`]],template:function(e,t){if(e&1&&R(0,tE,34,6)(1,nE,2,0,`p`,0),e&2){let e;z((e=t.page().setup)?0:1,e)}},styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; font-size: 13px; } @@ -664,7 +664,7 @@ margin: 0; padding: 0; list-style: none; - }`]})},FT=(e,t)=>[e,t],IT=(e,t)=>t.id,LT=(e,t)=>t.phase;function RT(e,t){if(e&1&&(W(0,`p`,5),X(1),G()),e&2){let e=Y();I(),Z(e.message())}}function zT(e,t){if(e&1&&(W(0,`span`),Gh(1,`i`),X(2),G()),e&2){let e=t.$implicit,n=Y();I(),Ag(`background`,n.color(e)),I(),Z(e)}}function BT(e,t){if(e&1&&(W(0,`time`),X(1),G()),e&2){let e=Y().$implicit,t=Y(2);I(),Z(t.time(e.startedAt))}}function VT(e,t){if(e&1&&(W(0,`span`,15),X(1,`→`),G(),W(2,`span`,16),X(3,`redirected to`),G(),W(4,`code`),X(5),G()),e&2){let e=Y().$implicit;I(5),Z(e.finalUrl)}}function HT(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.endedAt===void 0&&e.outcome!==`pending`?`before DevTools connected`:`started before DevTools connected`)}}function UT(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Q(``,e.phases?.total,`ms`)}}function WT(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Q(``,e.endedAt-e.startedAt,`ms`)}}function GT(e,t){e&1&&(W(0,`span`,11),X(1,`probe`),G())}function KT(e,t){if(e&1&&Gh(0,`span`),e&2){let e=t.$implicit,n=Y(4);Ag(`width`,e.width,`%`)(`background`,n.color(e.phase)),L(`title`,e.phase+` `+e.ms+`ms`)}}function qT(e,t){if(e&1&&(W(0,`div`,12),B(1,KT,1,5,`span`,17,LT),G()),e&2){let e=Y().$implicit,t=Y(2);L(`aria-label`,t.barLabel(e)),I(),V(t.bars(e))}}function JT(e,t){if(e&1&&(W(0,`dt`),X(1,`From`),G(),W(2,`dd`)(3,`code`),X(4),G()()),e&2){let e=Y().$implicit;I(4),Z(e.from)}}function YT(e,t){if(e&1&&(W(0,`dt`),X(1,`Started by`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),n_(``,e.caller,` (`,e.trigger,`)`)}}function XT(e,t){if(e&1&&(W(0,`dt`),X(1,`Extras`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.extras?.join(`, `))}}function ZT(e,t){if(e&1&&(W(0,`dt`),X(1,`Redirect of`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Q(`#`,e.redirectedFrom)}}function QT(e,t){if(e&1&&(W(0,`dt`),X(1,`Redirects to`),G(),W(2,`dd`)(3,`code`),X(4),G(),X(5),G()),e&2){let e=Y().$implicit;I(4),Z(e.redirectTo),I(),Q(` (`,e.redirectKind,`) `)}}function $T(e,t){if(e&1&&(W(0,`dt`),X(1,`Guards`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit,t=Y(2);I(3),n_(``,e.guards.names.join(`, `)||`none`,`: `,t.guardResult(e))}}function eE(e,t){if(e&1&&(W(0,`div`)(1,`code`),X(2),G(),X(3),W(4,`code`),X(5),G(),X(6,`: `),W(7,`strong`),X(8),G(),X(9),G()),e&2){let e=t.$implicit,n=Y(4);I(2),Z(e.guard),I(),Q(` `,e.kind,` on `),I(2),Z(e.route),I(2),jg(`bad`,n.isBad(e.result)),I(),Z(e.result),I(),Q(` (`,e.ms,`ms) `)}}function tE(e,t){if(e&1&&(W(0,`dt`),X(1,`Runs`),G(),W(2,`dd`),B(3,eE,10,7,`div`,null,jh),G()),e&2){let e=Y().$implicit;I(3),V(e.runs)}}function nE(e,t){if(e&1&&X(0),e&2){let e=Y(2).$implicit;Q(` leaving `,e.checked.deactivate.join(`, `),`; `)}}function rE(e,t){if(e&1&&(W(0,`dt`),X(1,`Checked`),G(),W(2,`dd`),R(3,nE,1,1),X(4),G()),e&2){let e=Y().$implicit;I(3),z(e.checked.deactivate.length?3:-1),I(),Q(` entering `,e.checked.activate.join(`, `)||`nothing new`,` `)}}function iE(e,t){if(e&1&&(W(0,`dt`),X(1,`Resolvers`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.resolvers?.names?.join(`, `))}}function aE(e,t){if(e&1&&(W(0,`dt`),X(1,`Lazy loaded`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.lazyLoaded?.join(`, `))}}function oE(e,t){if(e&1&&(W(0,`dt`),X(1,`Reused`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Q(` `,e.reused?.join(`, `),` (component kept, only inputs and params change) `)}}function sE(e,t){if(e&1&&(W(0,`dt`),X(1,`HTTP`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),n_(``,e.requests.count,` request(s): `,e.requests.urls.join(`, `))}}function cE(e,t){if(e&1&&(W(0,`dt`),X(1,`Scroll`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.scroll)}}function lE(e,t){if(e&1&&(W(0,`dt`),X(1,`Title after`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.title)}}function uE(e,t){if(e&1&&(W(0,`dt`),X(1,`Warnings`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.warnings?.join(` · `))}}function dE(e,t){if(e&1&&(W(0,`dt`),X(1,`Reason`),G(),W(2,`dd`,18),X(3),G()),e&2){let e=Y().$implicit,t=Y(2);I(3),Z(o_(1,FT,e.code,e.reason).filter(t.Boolean).join(`: `))}}function fE(e,t){if(e&1&&(W(0,`dt`),X(1,`Error`),G(),W(2,`dd`,18),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.errorCode)}}function pE(e,t){if(e&1&&(W(0,`dt`),X(1,`Error handler`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.errorHandler)}}function mE(e,t){if(e&1&&(W(0,`dt`),X(1,`Earlier`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Q(``,e.earlier,` navigation(s) before DevTools connected`)}}function hE(e,t){if(e&1){let e=K();W(0,`li`)(1,`div`,9),R(2,BT,2,1,`time`),W(3,`span`,8),X(4),G(),W(5,`code`),X(6),G(),R(7,VT,6,1),W(8,`span`,10),X(9),G(),R(10,HT,2,1,`span`,8)(11,UT,2,1,`span`,8)(12,WT,2,1,`span`,8),R(13,GT,2,0,`span`,11),G(),R(14,qT,3,1,`div`,12),W(15,`dl`,13),R(16,JT,5,1),R(17,YT,4,2),R(18,XT,4,1),R(19,ZT,4,1),R(20,QT,6,2),R(21,$T,4,2),R(22,tE,5,0),R(23,rE,5,2),R(24,iE,4,1),R(25,aE,4,1),R(26,oE,4,1),R(27,sE,4,2),R(28,cE,4,1),R(29,lE,4,1),R(30,uE,4,1),R(31,dE,4,4),R(32,fE,4,1),R(33,pE,4,1),R(34,mE,4,1),G(),W(35,`div`,14)(36,`button`,4),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).replay(t))}),X(37,` Replay `),G(),W(38,`button`,4),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).copy(t))}),X(39,` Copy repro `),G()()()}if(e&2){let e=t.$implicit,n=Y(2);I(2),z(e.beforeConnect?-1:2),I(2),Q(`#`,e.id),I(2),Z(e.url),I(),z(e.finalUrl&&e.finalUrl!==e.url?7:-1),I(),L(`data-tone`,n.tone(e.outcome)),I(),Z(e.outcome),I(),z(e.beforeConnect?10:e.phases?.total===void 0?e.endedAt===void 0?-1:12:11),I(3),z(e.probe?13:-1),I(),z(n.bars(e).length?14:-1),I(2),z(e.from?16:-1),I(),z(e.caller?17:-1),I(),z(e.extras?.length?18:-1),I(),z(e.redirectedFrom===void 0?-1:19),I(),z(e.redirectTo?20:-1),I(),z(e.guards&&(e.guards.names.length||e.guards.passed===!1)?21:-1),I(),z(e.runs?.length?22:-1),I(),z(e.checked&&(e.checked.activate.length||e.checked.deactivate.length)?23:-1),I(),z(e.resolvers?.names?.length?24:-1),I(),z(e.lazyLoaded?.length?25:-1),I(),z(e.reused?.length?26:-1),I(),z(e.requests?27:-1),I(),z(e.scroll?28:-1),I(),z(e.title?29:-1),I(),z(e.warnings?.length?30:-1),I(),z(e.reason||e.code?31:-1),I(),z(e.errorCode?32:-1),I(),z(e.errorHandler?33:-1),I(),z(e.earlier?34:-1),I(2),L(`aria-label`,`Replay navigation `+e.id),I(2),L(`aria-label`,`Copy repro for navigation `+e.id)}}function gE(e,t){if(e&1&&(W(0,`ol`,7),B(1,hE,40,30,`li`,null,IT),G()),e&2){let e=Y();I(),V(e.items())}}function _E(e,t){e&1&&(W(0,`p`,8),X(1,` No navigations since DevTools connected; earlier ones are not visible. Click a link in the app. `),G())}var vE=[`recognize`,`guards`,`resolve`,`activate`],yE={recognize:`#60a5fa`,guards:`#f59e0b`,resolve:`#a78bfa`,activate:`#34d399`},bE=class e{page=k_.required();rpc=k_(null);phases=vE;filter=F(``);onlyProblems=F(!1);message=F(``);items=$(()=>{let e=this.filter().toLowerCase();return[...this.page().navigations].reverse().filter(t=>(!e||t.url.toLowerCase().includes(e)||!!t.finalUrl?.toLowerCase().includes(e))&&(!this.onlyProblems()||![`succeeded`,`pending`].includes(t.outcome)))});tone(e){return Bw(e)}color(e){return yE[e]}bars(e){let t=e.phases?.total;return t?vE.filter(t=>(e.phases?.[t]??0)>0).map(n=>({phase:n,ms:e.phases[n],width:Math.max(1,e.phases[n]/t*100)})):[]}barLabel(e){return`Phases: ${this.bars(e).map(e=>`${e.phase} ${e.ms}ms`).join(`, `)}`}guardResult(e){let t=e.guards?.passed;return t===!0?`passed`:t===!1?e.outcome===`redirected`?`redirected`:`blocked`:e.outcome===`pending`?`running`:`did not finish, navigation ${e.outcome}`}isBad(e){return e===`false`||/^(UrlTree|RedirectCommand|threw)/.test(e)}time(e){return new Date(e).toLocaleTimeString()}async toggleInstrument(e){let t=e.target.checked,n=await zw(this.rpc(),this.page().pageId,{action:`instrument`,on:t});this.message.set(n?.error?String(n.error):t?`Recording each guard and resolver.`:`Stopped recording guards and resolvers.`)}async replay(e){this.message.set(`Replaying #${e.id}…`);let t=await zw(this.rpc(),this.page().pageId,{action:`replay`,id:e.id});if(!t||t.error){this.message.set(String(t?.error??`Replay failed.`));return}let n=t.replay;this.message.set(`Replay of #${e.id}: ${n?.outcome??`unknown`}${t.same?` (same as before)`:` (different from before)`}.`)}async copy(e){let t=await Rw(this.rpc(),`router-export`,{pageId:this.page().pageId,id:e.id});if(!t){this.message.set(`Could not build the repro.`);return}try{await navigator.clipboard.writeText(t),this.message.set(`Copied a markdown repro of #${e.id}.`)}catch{this.message.set(`The clipboard is not available here.`)}}exportJson(){let e=new Blob([JSON.stringify(this.page().navigations,null,2)],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`navigations-${this.page().pageId}.json`,n.click(),URL.revokeObjectURL(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-route-timeline`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:16,vars:5,consts:[[1,`toolbar`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`text`,`aria-label`,`Filter navigations by URL`,`placeholder`,`Filter by URL`,1,`field`,3,`input`,`value`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`muted`],[`aria-hidden`,`true`,1,`legend`],[1,`navs`],[1,`muted`],[1,`head`],[1,`badge`],[1,`tag`],[`role`,`img`,1,`bar`],[1,`details`],[1,`actions`],[`aria-hidden`,`true`],[1,`visually-hidden`],[3,`width`,`background`],[1,`reason`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`label`,1)(2,`input`,2),J(`change`,function(e){return t.toggleInstrument(e)}),G(),X(3,` Record each guard and resolver `),G(),W(4,`input`,3),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),W(5,`label`,1)(6,`input`,2),J(`change`,function(e){return t.onlyProblems.set(e.target.checked)}),G(),X(7,` Only problems `),G(),W(8,`button`,4),J(`click`,function(){return t.exportJson()}),X(9,`Export JSON`),G()(),R(10,RT,2,1,`p`,5),W(11,`div`,6),B(12,zT,3,3,`span`,null,Mh),G(),R(14,gE,3,0,`ol`,7)(15,_E,2,0,`p`,8)),e&2&&(I(2),q(`checked`,t.page().instrumented),I(2),q(`value`,t.filter()),I(2),q(`checked`,t.onlyProblems()),I(4),z(t.message()?10:-1),I(2),V(t.phases),I(2),z(t.items().length?14:15))},styles:[`.muted[_ngcontent-%COMP%] { + }`]})},iE=(e,t)=>[e,t],aE=(e,t)=>t.id,oE=(e,t)=>t.phase;function sE(e,t){if(e&1&&(W(0,`p`,5),X(1),G()),e&2){let e=Y();I(),Z(e.message())}}function cE(e,t){if(e&1&&(W(0,`span`),pg(1,`i`),X(2),G()),e&2){let e=t.$implicit,n=Y();I(),Qg(`background`,n.color(e)),I(),Z(e)}}function lE(e,t){if(e&1&&(W(0,`time`),X(1),G()),e&2){let e=Y().$implicit,t=Y(2);I(),Z(t.time(e.startedAt))}}function uE(e,t){if(e&1&&(W(0,`span`,15),X(1,`→`),G(),W(2,`span`,16),X(3,`redirected to`),G(),W(4,`code`),X(5),G()),e&2){let e=Y().$implicit;I(5),Z(e.finalUrl)}}function dE(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.endedAt===void 0&&e.outcome!==`pending`?`before DevTools connected`:`started before DevTools connected`)}}function fE(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Q(``,e.phases?.total,`ms`)}}function pE(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Q(``,e.endedAt-e.startedAt,`ms`)}}function mE(e,t){e&1&&(W(0,`span`,11),X(1,`probe`),G())}function hE(e,t){if(e&1&&pg(0,`span`),e&2){let e=t.$implicit,n=Y(4);Qg(`width`,e.width,`%`)(`background`,n.color(e.phase)),L(`title`,e.phase+` `+e.ms+`ms`)}}function gE(e,t){if(e&1&&(W(0,`div`,12),B(1,hE,1,5,`span`,17,oE),G()),e&2){let e=Y().$implicit,t=Y(2);L(`aria-label`,t.barLabel(e)),I(),V(t.bars(e))}}function _E(e,t){if(e&1&&(W(0,`dt`),X(1,`From`),G(),W(2,`dd`)(3,`code`),X(4),G()()),e&2){let e=Y().$implicit;I(4),Z(e.from)}}function vE(e,t){if(e&1&&(W(0,`dt`),X(1,`Started by`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),w_(``,e.caller,` (`,e.trigger,`)`)}}function yE(e,t){if(e&1&&(W(0,`dt`),X(1,`Extras`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.extras?.join(`, `))}}function bE(e,t){if(e&1&&(W(0,`dt`),X(1,`Redirect of`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Q(`#`,e.redirectedFrom)}}function xE(e,t){if(e&1&&(W(0,`dt`),X(1,`Redirects to`),G(),W(2,`dd`)(3,`code`),X(4),G(),X(5),G()),e&2){let e=Y().$implicit;I(4),Z(e.redirectTo),I(),Q(` (`,e.redirectKind,`) `)}}function SE(e,t){if(e&1&&(W(0,`dt`),X(1,`Guards`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit,t=Y(2);I(3),w_(``,e.guards.names.join(`, `)||`none`,`: `,t.guardResult(e))}}function CE(e,t){if(e&1&&(W(0,`div`)(1,`code`),X(2),G(),X(3),W(4,`code`),X(5),G(),X(6,`: `),W(7,`strong`),X(8),G(),X(9),G()),e&2){let e=t.$implicit,n=Y(4);I(2),Z(e.guard),I(),Q(` `,e.kind,` on `),I(2),Z(e.route),I(2),$g(`bad`,n.isBad(e.result)),I(),Z(e.result),I(),Q(` (`,e.ms,`ms) `)}}function wE(e,t){if(e&1&&(W(0,`dt`),X(1,`Runs`),G(),W(2,`dd`),B(3,CE,10,7,`div`,null,$h),G()),e&2){let e=Y().$implicit;I(3),V(e.runs)}}function TE(e,t){if(e&1&&X(0),e&2){let e=Y(2).$implicit;Q(` leaving `,e.checked.deactivate.join(`, `),`; `)}}function EE(e,t){if(e&1&&(W(0,`dt`),X(1,`Checked`),G(),W(2,`dd`),R(3,TE,1,1),X(4),G()),e&2){let e=Y().$implicit;I(3),z(e.checked.deactivate.length?3:-1),I(),Q(` entering `,e.checked.activate.join(`, `)||`nothing new`,` `)}}function DE(e,t){if(e&1&&(W(0,`dt`),X(1,`Resolvers`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.resolvers?.names?.join(`, `))}}function OE(e,t){if(e&1&&(W(0,`dt`),X(1,`Lazy loaded`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.lazyLoaded?.join(`, `))}}function kE(e,t){if(e&1&&(W(0,`dt`),X(1,`Reused`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Q(` `,e.reused?.join(`, `),` (component kept, only inputs and params change) `)}}function AE(e,t){if(e&1&&(W(0,`dt`),X(1,`HTTP`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),w_(``,e.requests.count,` request(s): `,e.requests.urls.join(`, `))}}function jE(e,t){if(e&1&&(W(0,`dt`),X(1,`Scroll`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.scroll)}}function ME(e,t){if(e&1&&(W(0,`dt`),X(1,`Title after`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.title)}}function NE(e,t){if(e&1&&(W(0,`dt`),X(1,`Warnings`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.warnings?.join(` · `))}}function PE(e,t){if(e&1&&(W(0,`dt`),X(1,`Reason`),G(),W(2,`dd`,18),X(3),G()),e&2){let e=Y().$implicit,t=Y(2);I(3),Z(O_(1,iE,e.code,e.reason).filter(t.Boolean).join(`: `))}}function FE(e,t){if(e&1&&(W(0,`dt`),X(1,`Error`),G(),W(2,`dd`,18),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.errorCode)}}function IE(e,t){if(e&1&&(W(0,`dt`),X(1,`Error handler`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Z(e.errorHandler)}}function LE(e,t){if(e&1&&(W(0,`dt`),X(1,`Earlier`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y().$implicit;I(3),Q(``,e.earlier,` navigation(s) before DevTools connected`)}}function RE(e,t){if(e&1){let e=K();W(0,`li`)(1,`div`,9),R(2,lE,2,1,`time`),W(3,`span`,8),X(4),G(),W(5,`code`),X(6),G(),R(7,uE,6,1),W(8,`span`,10),X(9),G(),R(10,dE,2,1,`span`,8)(11,fE,2,1,`span`,8)(12,pE,2,1,`span`,8),R(13,mE,2,0,`span`,11),G(),R(14,gE,3,1,`div`,12),W(15,`dl`,13),R(16,_E,5,1),R(17,vE,4,2),R(18,yE,4,1),R(19,bE,4,1),R(20,xE,6,2),R(21,SE,4,2),R(22,wE,5,0),R(23,EE,5,2),R(24,DE,4,1),R(25,OE,4,1),R(26,kE,4,1),R(27,AE,4,2),R(28,jE,4,1),R(29,ME,4,1),R(30,NE,4,1),R(31,PE,4,4),R(32,FE,4,1),R(33,IE,4,1),R(34,LE,4,1),G(),W(35,`div`,14)(36,`button`,4),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).replay(t))}),X(37,` Replay `),G(),W(38,`button`,4),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).copy(t))}),X(39,` Copy repro `),G()()()}if(e&2){let e=t.$implicit,n=Y(2);I(2),z(e.beforeConnect?-1:2),I(2),Q(`#`,e.id),I(2),Z(e.url),I(),z(e.finalUrl&&e.finalUrl!==e.url?7:-1),I(),L(`data-tone`,n.tone(e.outcome)),I(),Z(e.outcome),I(),z(e.beforeConnect?10:e.phases?.total===void 0?e.endedAt===void 0?-1:12:11),I(3),z(e.probe?13:-1),I(),z(n.bars(e).length?14:-1),I(2),z(e.from?16:-1),I(),z(e.caller?17:-1),I(),z(e.extras?.length?18:-1),I(),z(e.redirectedFrom===void 0?-1:19),I(),z(e.redirectTo?20:-1),I(),z(e.guards&&(e.guards.names.length||e.guards.passed===!1)?21:-1),I(),z(e.runs?.length?22:-1),I(),z(e.checked&&(e.checked.activate.length||e.checked.deactivate.length)?23:-1),I(),z(e.resolvers?.names?.length?24:-1),I(),z(e.lazyLoaded?.length?25:-1),I(),z(e.reused?.length?26:-1),I(),z(e.requests?27:-1),I(),z(e.scroll?28:-1),I(),z(e.title?29:-1),I(),z(e.warnings?.length?30:-1),I(),z(e.reason||e.code?31:-1),I(),z(e.errorCode?32:-1),I(),z(e.errorHandler?33:-1),I(),z(e.earlier?34:-1),I(2),L(`aria-label`,`Replay navigation `+e.id),I(2),L(`aria-label`,`Copy repro for navigation `+e.id)}}function zE(e,t){if(e&1&&(W(0,`ol`,7),B(1,RE,40,30,`li`,null,aE),G()),e&2){let e=Y();I(),V(e.items())}}function BE(e,t){e&1&&(W(0,`p`,8),X(1,` No navigations since DevTools connected; earlier ones are not visible. Click a link in the app. `),G())}var VE=[`recognize`,`guards`,`resolve`,`activate`],HE={recognize:`#60a5fa`,guards:`#f59e0b`,resolve:`#a78bfa`,activate:`#34d399`},UE=class e{page=Z_.required();rpc=Z_(null);phases=VE;filter=F(``);onlyProblems=F(!1);message=F(``);items=$(()=>{let e=this.filter().toLowerCase();return[...this.page().navigations].reverse().filter(t=>(!e||t.url.toLowerCase().includes(e)||!!t.finalUrl?.toLowerCase().includes(e))&&(!this.onlyProblems()||![`succeeded`,`pending`].includes(t.outcome)))});tone(e){return lT(e)}color(e){return HE[e]}bars(e){let t=e.phases?.total;return t?VE.filter(t=>(e.phases?.[t]??0)>0).map(n=>({phase:n,ms:e.phases[n],width:Math.max(1,e.phases[n]/t*100)})):[]}barLabel(e){return`Phases: ${this.bars(e).map(e=>`${e.phase} ${e.ms}ms`).join(`, `)}`}guardResult(e){let t=e.guards?.passed;return t===!0?`passed`:t===!1?e.outcome===`redirected`?`redirected`:`blocked`:e.outcome===`pending`?`running`:`did not finish, navigation ${e.outcome}`}isBad(e){return e===`false`||/^(UrlTree|RedirectCommand|threw)/.test(e)}time(e){return new Date(e).toLocaleTimeString()}async toggleInstrument(e){let t=e.target.checked,n=await cT(this.rpc(),this.page().pageId,{action:`instrument`,on:t});this.message.set(n?.error?String(n.error):t?`Recording each guard and resolver.`:`Stopped recording guards and resolvers.`)}async replay(e){this.message.set(`Replaying #${e.id}…`);let t=await cT(this.rpc(),this.page().pageId,{action:`replay`,id:e.id});if(!t||t.error){this.message.set(String(t?.error??`Replay failed.`));return}let n=t.replay;this.message.set(`Replay of #${e.id}: ${n?.outcome??`unknown`}${t.same?` (same as before)`:` (different from before)`}.`)}async copy(e){let t=await sT(this.rpc(),`router-export`,{pageId:this.page().pageId,id:e.id});if(!t){this.message.set(`Could not build the repro.`);return}try{await navigator.clipboard.writeText(t),this.message.set(`Copied a markdown repro of #${e.id}.`)}catch{this.message.set(`The clipboard is not available here.`)}}exportJson(){let e=new Blob([JSON.stringify(this.page().navigations,null,2)],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`navigations-${this.page().pageId}.json`,n.click(),URL.revokeObjectURL(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-route-timeline`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:16,vars:5,consts:[[1,`toolbar`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`text`,`aria-label`,`Filter navigations by URL`,`placeholder`,`Filter by URL`,1,`field`,3,`input`,`value`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`muted`],[`aria-hidden`,`true`,1,`legend`],[1,`navs`],[1,`muted`],[1,`head`],[1,`badge`],[1,`tag`],[`role`,`img`,1,`bar`],[1,`details`],[1,`actions`],[`aria-hidden`,`true`],[1,`visually-hidden`],[3,`width`,`background`],[1,`reason`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`label`,1)(2,`input`,2),J(`change`,function(e){return t.toggleInstrument(e)}),G(),X(3,` Record each guard and resolver `),G(),W(4,`input`,3),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),W(5,`label`,1)(6,`input`,2),J(`change`,function(e){return t.onlyProblems.set(e.target.checked)}),G(),X(7,` Only problems `),G(),W(8,`button`,4),J(`click`,function(){return t.exportJson()}),X(9,`Export JSON`),G()(),R(10,sE,2,1,`p`,5),W(11,`div`,6),B(12,cE,3,3,`span`,null,eg),G(),R(14,zE,3,0,`ol`,7)(15,BE,2,0,`p`,8)),e&2&&(I(2),q(`checked`,t.page().instrumented),I(2),q(`value`,t.filter()),I(2),q(`checked`,t.onlyProblems()),I(4),z(t.message()?10:-1),I(2),V(t.phases),I(2),z(t.items().length?14:15))},styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; font-size: 13px; } @@ -852,7 +852,7 @@ display: flex; gap: 8px; margin-top: 8px; - }`]})},xE=()=>[],SE=(e,t)=>t.node.id;function CE(e,t){if(e&1&&(X(0,` with `),W(1,`code`),X(2),u_(3,`json`),G()),e&2){let e=Y(2);I(2),Z(f_(3,1,e.params))}}function wE(e,t){if(e&1&&(X(0),R(1,CE,4,3)),e&2){let e=Y(),t=Y();Q(` Matches `,t.chainText(e),` `),I(),z(t.hasKeys(e.params)?1:-1)}}function TE(e,t){e&1&&X(0),e&2&&Q(` Nearest: `,Y(2).nearest.join(`, `),` `)}function EE(e,t){if(e&1&&(X(0,` Matches no route (NG04002). `),R(1,TE,1,1)),e&2){let e=Y();I(),z(e.nearest.length?1:-1)}}function DE(e,t){if(e&1&&(W(0,`div`,8),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function OE(e,t){if(e&1&&(W(0,`div`,5),R(1,wE,2,2)(2,EE,2,1),B(3,DE,2,1,`div`,8,Mh),G()),e&2){let e=t;I(),z(e.matched?1:2),I(2),V(e.notes)}}function kE(e,t){if(e&1&&(W(0,`p`,6),X(1),G()),e&2){let e=Y();I(),Z(e.message())}}function AE(e,t){if(e&1&&(W(0,`p`,8),X(1),G()),e&2){let e=Y();I(),Q(` `,e.page().setup?.mode===`events-only`?`This build has no debug utils, so the live config cannot be read.`:`The page has not reported its route config yet.`,` `)}}function jE(e,t){e&1&&(W(0,`span`,14),X(1,`active`),G())}function ME(e,t){if(e&1&&(W(0,`span`,14),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`lazy `,e.node.lazy)}}function NE(e,t){if(e&1&&(W(0,`span`,14),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`outlet `,e.node.outlet)}}function PE(e,t){if(e&1&&(X(0,` redirect → `),W(1,`code`),X(2),G()),e&2){let e=Y().$implicit;I(2),Z(e.node.redirectTo)}}function FE(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` `,e.node.component??(e.node.lazy===`unloaded`?`lazy, not loaded yet`:e.node.kind),` `)}}function IE(e,t){if(e&1&&(W(0,`span`,14),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function LE(e,t){if(e&1&&(W(0,`span`,14),X(1),G()),e&2){let e=t.$implicit;I(),Q(`resolve `,e)}}function RE(e,t){if(e&1){let e=K();W(0,`input`,18),J(`input`,function(t){let n=N(e).$implicit,r=Y(2).$implicit;return P(Y(2).setParam(r.node.id,n,t.target.value))}),G()}if(e&2){let e=t.$implicit,n=Y(2).$implicit;q(`placeholder`,e),L(`aria-label`,e+` for `+n.node.fullPath)}}function zE(e,t){if(e&1){let e=K();B(0,RE,1,2,`input`,17,Mh),W(2,`button`,4),J(`click`,function(){N(e);let t=Y().$implicit;return P(Y(2).navigate(t.node))}),X(3,` Go `),G()}if(e&2){let e=Y().$implicit;V(Y(2).params(e.node)),I(2),L(`aria-label`,`Navigate to `+e.node.fullPath)}}function BE(e,t){if(e&1){let e=K();W(0,`button`,4),J(`click`,function(){N(e);let t=Y().$implicit;return P(Y(2).resolveLazy(t.node))}),X(1,` Read lazy `),G()}if(e&2){let e=Y().$implicit;L(`aria-label`,`Read lazy routes of `+e.node.fullPath)}}function VE(e,t){if(e&1&&(W(0,`tr`)(1,`td`,13),X(2),R(3,jE,2,0,`span`,14),R(4,ME,2,1,`span`,14),R(5,NE,2,1,`span`,14),G(),W(6,`td`),R(7,PE,3,1)(8,FE,1,1),G(),W(9,`td`),B(10,IE,2,1,`span`,14,Mh),B(12,LE,2,1,`span`,14,Mh),G(),W(14,`td`),X(15),G(),W(16,`td`,15),R(17,zE,4,1),R(18,BE,2,1,`button`,16),G()()),e&2){let e=t.$implicit,n=Y(2);jg(`active`,n.isActive(e.node)),I(),Ag(`padding-left`,12+e.depth*16,`px`),I(),Q(` `,e.node.fullPath,` `),I(),z(n.isActive(e.node)?3:-1),I(),z(e.node.lazy?4:-1),I(),z(e.node.outlet?5:-1),I(2),z(e.node.redirectTo===void 0?8:7),I(3),V(n.guardList(e.node)),I(2),V(e.node.resolvers??a_(12,xE)),I(3),Z(e.node.title??``),I(2),z(n.canNavigate(e.node)?17:-1),I(),z(e.node.kind===`lazy`&&e.node.lazy===`unloaded`?18:-1)}}function HE(e,t){if(e&1&&(W(0,`p`,8),X(1),G(),W(2,`div`,9)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,10),X(7,`Path`),G(),W(8,`th`,10),X(9,`Target`),G(),W(10,`th`,10),X(11,`Guards and resolvers`),G(),W(12,`th`,10),X(13,`Title`),G(),W(14,`th`,10)(15,`span`,11),X(16,`Actions`),G()()()(),W(17,`tbody`),B(18,VE,19,13,`tr`,12,SE),G()()()),e&2){let e=Y();I(),n_(` Generation `,e.page().generation,` · `,e.rows().length,` route(s). Lazy routes show their children once loaded. `),I(17),V(e.rows())}}var UE=class e{page=k_.required();rpc=k_(null);filter=F(``);testUrl=F(``);match=F(null);message=F(``);paramValues=new Map;active=$(()=>new Set(this.page().activeIds??[]));rows=$(()=>{let e=this.filter().toLowerCase(),t=[],n=(r,i)=>{for(let a of r)(!e||a.fullPath.toLowerCase().includes(e)||a.component?.toLowerCase().includes(e))&&t.push({node:a,depth:i}),a.children&&n(a.children,i+1)};return n(this.page().config??[],0),t});hasKeys(e){return Object.keys(e).length>0}isActive(e){return this.active().has(e.id)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}params(e){return(e.fullPath.match(/:([A-Za-z0-9_]+)/g)??[]).map(e=>e.slice(1))}canNavigate(e){return e.redirectTo===void 0&&!e.outlet&&!e.fullPath.includes(`**`)&&(!!e.component||e.kind===`component`||e.kind===`lazy`)}setParam(e,t,n){this.paramValues.set(e,{...this.paramValues.get(e),[t]:n})}chainText(e){return e.chain.map(e=>e.fullPath).join(` → `)}async predict(){let e=this.testUrl().trim();e&&this.match.set(await Rw(this.rpc(),`router-match`,{pageId:this.page().pageId,url:e}))}async probe(){let e=this.testUrl().trim();if(!e)return;this.message.set(`Running the real matcher in the app…`);let t=await zw(this.rpc(),this.page().pageId,{action:`probe`,url:e});if(!t||t.error){this.message.set(String(t?.error??`Probe failed.`));return}this.message.set(t.matched?`The app matched ${e} (see the probe entry in Navigations).`:`The app did not match ${e}: ${String(t.reason??``)}`)}async navigate(e){let t=this.paramValues.get(e.id)??{};this.message.set(`Navigating to ${e.fullPath}…`);let n=await zw(this.rpc(),this.page().pageId,{action:`navigate`,pattern:e.fullPath,params:t});this.message.set(!n||n.error?String(n?.error??`Navigation failed.`):`Navigation #${n.id}: ${n.outcome}${n.finalUrl?` at ${n.finalUrl}`:``}.`)}async resolveLazy(e){let t=await zw(this.rpc(),this.page().pageId,{action:`resolve-lazy`,id:e.id});if(!t||t.error){this.message.set(String(t?.error??`Could not read the lazy routes.`));return}let n=t.routes??[];this.message.set(`${e.fullPath} declares ${n.length} route(s): ${n.map(e=>`/${e.path}`).join(`, `)}. The router loads them for real on the first navigation that needs them.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-route-tree`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:13,vars:5,consts:[[1,`test`,3,`submit`],[`for`,`test-url`],[`id`,`test-url`,`type`,`text`,`placeholder`,`/users/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`small`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`result`],[`role`,`status`,1,`muted`],[`type`,`text`,`aria-label`,`Filter routes`,`placeholder`,`Filter by path or component`,1,`field`,`filter`,3,`input`,`value`],[1,`muted`],[`role`,`region`,`aria-label`,`Live route config`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`visually-hidden`],[3,`active`],[1,`path`],[1,`tag`],[1,`actions`],[`type`,`button`,1,`small`],[`type`,`text`,1,`field`,`param`,3,`placeholder`],[`type`,`text`,1,`field`,`param`,3,`input`,`placeholder`]],template:function(e,t){if(e&1&&(W(0,`form`,0),J(`submit`,function(e){return e.preventDefault(),t.predict()}),W(1,`label`,1),X(2,`Test a URL`),G(),W(3,`input`,2),J(`input`,function(e){return t.testUrl.set(e.target.value)}),G(),W(4,`button`,3),X(5,`Predict`),G(),W(6,`button`,4),J(`click`,function(){return t.probe()}),X(7,`Probe in app`),G()(),R(8,OE,5,1,`div`,5),R(9,kE,2,1,`p`,6),W(10,`input`,7),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),R(11,AE,2,1,`p`,8)(12,HE,20,2)),e&2){let e;I(3),q(`value`,t.testUrl()),I(5),z((e=t.match())?8:-1,e),I(),z(t.message()?9:-1),I(),q(`value`,t.filter()),I(),z(t.page().config?12:11)}},dependencies:[Wv],styles:[`.muted[_ngcontent-%COMP%] { + }`]})},WE=()=>[],GE=(e,t)=>t.node.id;function KE(e,t){if(e&1&&(X(0,` with `),W(1,`code`),X(2),M_(3,`json`),G()),e&2){let e=Y(2);I(2),Z(P_(3,1,e.params))}}function qE(e,t){if(e&1&&(X(0),R(1,KE,4,3)),e&2){let e=Y(),t=Y();Q(` Matches `,t.chainText(e),` `),I(),z(t.hasKeys(e.params)?1:-1)}}function JE(e,t){e&1&&X(0),e&2&&Q(` Nearest: `,Y(2).nearest.join(`, `),` `)}function YE(e,t){if(e&1&&(X(0,` Matches no route (NG04002). `),R(1,JE,1,1)),e&2){let e=Y();I(),z(e.nearest.length?1:-1)}}function XE(e,t){if(e&1&&(W(0,`div`,8),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function ZE(e,t){if(e&1&&(W(0,`div`,5),R(1,qE,2,2)(2,YE,2,1),B(3,XE,2,1,`div`,8,eg),G()),e&2){let e=t;I(),z(e.matched?1:2),I(2),V(e.notes)}}function QE(e,t){if(e&1&&(W(0,`p`,6),X(1),G()),e&2){let e=Y();I(),Z(e.message())}}function $E(e,t){if(e&1&&(W(0,`p`,8),X(1),G()),e&2){let e=Y();I(),Q(` `,e.page().setup?.mode===`events-only`?`This build has no debug utils, so the live config cannot be read.`:`The page has not reported its route config yet.`,` `)}}function eD(e,t){e&1&&(W(0,`span`,14),X(1,`active`),G())}function tD(e,t){if(e&1&&(W(0,`span`,14),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`lazy `,e.node.lazy)}}function nD(e,t){if(e&1&&(W(0,`span`,14),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`outlet `,e.node.outlet)}}function rD(e,t){if(e&1&&(X(0,` redirect → `),W(1,`code`),X(2),G()),e&2){let e=Y().$implicit;I(2),Z(e.node.redirectTo)}}function iD(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` `,e.node.component??(e.node.lazy===`unloaded`?`lazy, not loaded yet`:e.node.kind),` `)}}function aD(e,t){if(e&1&&(W(0,`span`,14),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function oD(e,t){if(e&1&&(W(0,`span`,14),X(1),G()),e&2){let e=t.$implicit;I(),Q(`resolve `,e)}}function sD(e,t){if(e&1){let e=K();W(0,`input`,18),J(`input`,function(t){let n=N(e).$implicit,r=Y(2).$implicit;return P(Y(2).setParam(r.node.id,n,t.target.value))}),G()}if(e&2){let e=t.$implicit,n=Y(2).$implicit;q(`placeholder`,e),L(`aria-label`,e+` for `+n.node.fullPath)}}function cD(e,t){if(e&1){let e=K();B(0,sD,1,2,`input`,17,eg),W(2,`button`,4),J(`click`,function(){N(e);let t=Y().$implicit;return P(Y(2).navigate(t.node))}),X(3,` Go `),G()}if(e&2){let e=Y().$implicit;V(Y(2).params(e.node)),I(2),L(`aria-label`,`Navigate to `+e.node.fullPath)}}function lD(e,t){if(e&1){let e=K();W(0,`button`,4),J(`click`,function(){N(e);let t=Y().$implicit;return P(Y(2).resolveLazy(t.node))}),X(1,` Read lazy `),G()}if(e&2){let e=Y().$implicit;L(`aria-label`,`Read lazy routes of `+e.node.fullPath)}}function uD(e,t){if(e&1&&(W(0,`tr`)(1,`td`,13),X(2),R(3,eD,2,0,`span`,14),R(4,tD,2,1,`span`,14),R(5,nD,2,1,`span`,14),G(),W(6,`td`),R(7,rD,3,1)(8,iD,1,1),G(),W(9,`td`),B(10,aD,2,1,`span`,14,eg),B(12,oD,2,1,`span`,14,eg),G(),W(14,`td`),X(15),G(),W(16,`td`,15),R(17,cD,4,1),R(18,lD,2,1,`button`,16),G()()),e&2){let e=t.$implicit,n=Y(2);$g(`active`,n.isActive(e.node)),I(),Qg(`padding-left`,12+e.depth*16,`px`),I(),Q(` `,e.node.fullPath,` `),I(),z(n.isActive(e.node)?3:-1),I(),z(e.node.lazy?4:-1),I(),z(e.node.outlet?5:-1),I(2),z(e.node.redirectTo===void 0?8:7),I(3),V(n.guardList(e.node)),I(2),V(e.node.resolvers??D_(12,WE)),I(3),Z(e.node.title??``),I(2),z(n.canNavigate(e.node)?17:-1),I(),z(e.node.kind===`lazy`&&e.node.lazy===`unloaded`?18:-1)}}function dD(e,t){if(e&1&&(W(0,`p`,8),X(1),G(),W(2,`div`,9)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,10),X(7,`Path`),G(),W(8,`th`,10),X(9,`Target`),G(),W(10,`th`,10),X(11,`Guards and resolvers`),G(),W(12,`th`,10),X(13,`Title`),G(),W(14,`th`,10)(15,`span`,11),X(16,`Actions`),G()()()(),W(17,`tbody`),B(18,uD,19,13,`tr`,12,GE),G()()()),e&2){let e=Y();I(),w_(` Generation `,e.page().generation,` · `,e.rows().length,` route(s). Lazy routes show their children once loaded. `),I(17),V(e.rows())}}var fD=class e{page=Z_.required();rpc=Z_(null);filter=F(``);testUrl=F(``);match=F(null);message=F(``);paramValues=new Map;active=$(()=>new Set(this.page().activeIds??[]));rows=$(()=>{let e=this.filter().toLowerCase(),t=[],n=(r,i)=>{for(let a of r)(!e||a.fullPath.toLowerCase().includes(e)||a.component?.toLowerCase().includes(e))&&t.push({node:a,depth:i}),a.children&&n(a.children,i+1)};return n(this.page().config??[],0),t});hasKeys(e){return Object.keys(e).length>0}isActive(e){return this.active().has(e.id)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}params(e){return(e.fullPath.match(/:([A-Za-z0-9_]+)/g)??[]).map(e=>e.slice(1))}canNavigate(e){return e.redirectTo===void 0&&!e.outlet&&!e.fullPath.includes(`**`)&&(!!e.component||e.kind===`component`||e.kind===`lazy`)}setParam(e,t,n){this.paramValues.set(e,{...this.paramValues.get(e),[t]:n})}chainText(e){return e.chain.map(e=>e.fullPath).join(` → `)}async predict(){let e=this.testUrl().trim();e&&this.match.set(await sT(this.rpc(),`router-match`,{pageId:this.page().pageId,url:e}))}async probe(){let e=this.testUrl().trim();if(!e)return;this.message.set(`Running the real matcher in the app…`);let t=await cT(this.rpc(),this.page().pageId,{action:`probe`,url:e});if(!t||t.error){this.message.set(String(t?.error??`Probe failed.`));return}this.message.set(t.matched?`The app matched ${e} (see the probe entry in Navigations).`:`The app did not match ${e}: ${String(t.reason??``)}`)}async navigate(e){let t=this.paramValues.get(e.id)??{};this.message.set(`Navigating to ${e.fullPath}…`);let n=await cT(this.rpc(),this.page().pageId,{action:`navigate`,pattern:e.fullPath,params:t});this.message.set(!n||n.error?String(n?.error??`Navigation failed.`):`Navigation #${n.id}: ${n.outcome}${n.finalUrl?` at ${n.finalUrl}`:``}.`)}async resolveLazy(e){let t=await cT(this.rpc(),this.page().pageId,{action:`resolve-lazy`,id:e.id});if(!t||t.error){this.message.set(String(t?.error??`Could not read the lazy routes.`));return}let n=t.routes??[];this.message.set(`${e.fullPath} declares ${n.length} route(s): ${n.map(e=>`/${e.path}`).join(`, `)}. The router loads them for real on the first navigation that needs them.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-route-tree`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:13,vars:5,consts:[[1,`test`,3,`submit`],[`for`,`test-url`],[`id`,`test-url`,`type`,`text`,`placeholder`,`/users/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`small`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`result`],[`role`,`status`,1,`muted`],[`type`,`text`,`aria-label`,`Filter routes`,`placeholder`,`Filter by path or component`,1,`field`,`filter`,3,`input`,`value`],[1,`muted`],[`role`,`region`,`aria-label`,`Live route config`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`visually-hidden`],[3,`active`],[1,`path`],[1,`tag`],[1,`actions`],[`type`,`button`,1,`small`],[`type`,`text`,1,`field`,`param`,3,`placeholder`],[`type`,`text`,1,`field`,`param`,3,`input`,`placeholder`]],template:function(e,t){if(e&1&&(W(0,`form`,0),J(`submit`,function(e){return e.preventDefault(),t.predict()}),W(1,`label`,1),X(2,`Test a URL`),G(),W(3,`input`,2),J(`input`,function(e){return t.testUrl.set(e.target.value)}),G(),W(4,`button`,3),X(5,`Predict`),G(),W(6,`button`,4),J(`click`,function(){return t.probe()}),X(7,`Probe in app`),G()(),R(8,ZE,5,1,`div`,5),R(9,QE,2,1,`p`,6),W(10,`input`,7),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),R(11,$E,2,1,`p`,8)(12,dD,20,2)),e&2){let e;I(3),q(`value`,t.testUrl()),I(5),z((e=t.match())?8:-1,e),I(),z(t.message()?9:-1),I(),q(`value`,t.filter()),I(),z(t.page().config?12:11)}},dependencies:[py],styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; font-size: 13px; } @@ -988,7 +988,7 @@ .param[_ngcontent-%COMP%] { width: 80px; margin-right: 4px; - }`]})},WE=(e,t)=>t.id,GE=(e,t)=>t.pageId;function KE(e,t){e&1&&(H(0,`p`,0),X(1,`Could not load the live router state.`),U())}function qE(e,t){e&1&&(H(0,`p`,0),X(1,`Loading the live router state…`),U())}function JE(e,t){if(e&1&&(H(0,`option`,8),X(1),U()),e&2){let e=t.$implicit,n=Y(2);Vh(`value`,e.pageId)(`selected`,e.pageId===n.pageId),I(),n_(` `,e.snapshot?.url??e.pageId,` (`,e.pageId,`) `)}}function YE(e,t){if(e&1){let e=K();H(0,`label`,1),X(1,` Page `),H(2,`select`,7),cg(`change`,function(t){return N(e),P(Y(2).pickPage(t))}),B(3,JE,2,4,`option`,8,GE),U()()}if(e&2){let e=Y(2);I(3),V(e.pages())}}function XE(e,t){if(e&1&&(H(0,`span`,10),X(1),U()),e&2){let e=Y(3);L(`aria-label`,e.problems()+` problem navigations`),I(),Z(e.problems())}}function ZE(e,t){if(e&1){let e=K();H(0,`button`,9),cg(`click`,function(){let t=N(e).$implicit;return P(Y(2).selected.set(t.id))}),X(1),R(2,XE,2,2,`span`,10),U()}if(e&2){let e=t.$implicit,n=Y(2);Vh(`id`,`router-tab-`+e.id),L(`aria-selected`,e.id===n.selected())(`aria-controls`,`router-panel-`+e.id)(`tabindex`,e.id===n.selected()?0:-1),I(),Q(` `,e.label,` `),I(),z(e.id===`navigations`&&n.problems()>0?2:-1)}}function QE(e,t){if(e&1&&Wh(0,`app-route-current`,5),e&2){let e=Y(),t=Y();Vh(`page`,e)(`rpc`,t.rpc())}}function $E(e,t){if(e&1&&Wh(0,`app-route-timeline`,5),e&2){let e=Y(),t=Y();Vh(`page`,e)(`rpc`,t.rpc())}}function eD(e,t){if(e&1&&Wh(0,`app-route-tree`,5),e&2){let e=Y(),t=Y();Vh(`page`,e)(`rpc`,t.rpc())}}function tD(e,t){e&1&&Wh(0,`app-route-setup`,6),e&2&&Vh(`page`,Y())}function nD(e,t){if(e&1&&Wh(0,`app-route-lint`,5),e&2){let e=Y(),t=Y();Vh(`page`,e)(`rpc`,t.rpc())}}function rD(e,t){if(e&1){let e=K();R(0,YE,5,0,`label`,1),H(1,`div`,2),cg(`keydown`,function(t){return N(e),P(Y().onKey(t))}),B(2,ZE,3,6,`button`,3,WE),U(),H(4,`div`,4),R(5,QE,1,2,`app-route-current`,5)(6,$E,1,2,`app-route-timeline`,5)(7,eD,1,2,`app-route-tree`,5)(8,tD,1,1,`app-route-setup`,6)(9,nD,1,2,`app-route-lint`,5),U()}if(e&2){let e,t=Y();z(t.pages().length>1?0:-1),I(2),V(t.tabs),I(2),Vh(`id`,`router-panel-`+t.selected()),L(`aria-labelledby`,`router-tab-`+t.selected()),I(),z((e=t.selected())===`current`?5:e===`navigations`?6:e===`routes`?7:e===`setup`?8:e===`lint`?9:-1)}}function iD(e,t){e&1&&(H(0,`p`,0),X(1,`No page is reporting router state yet. Open the app in a browser.`),U())}var aD=[{id:`current`,label:`Current`},{id:`navigations`,label:`Navigations`},{id:`routes`,label:`Routes`},{id:`setup`,label:`Setup`},{id:`lint`,label:`Lint`}],oD=class e{rpc=k_(null);tabs=aD;selected=F(`current`);pages=F([]);loading=F(!0);failed=F(!1);pageId=C_({source:this.pages,computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.snapshot)?.pageId??e[0]?.pageId??null});unsubscribe=null;destroyRef=A(fs);page=$(()=>{let e=this.pages();return e.find(e=>e.pageId===this.pageId())??e[0]??null});problems=$(()=>(this.page()?.navigations??[]).filter(e=>!e.probe&&[`failed`,`cancelled`,`redirected`].includes(e.outcome)).length);constructor(){$s(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{this.pages.set(e?.pages??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}pickPage(e){this.pageId.set(e.target.value)}onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.selected()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.selected.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#router-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-live-route`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[1,`muted`],[1,`page-pick`],[`role`,`tablist`,`aria-label`,`Router views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`page`,`rpc`],[3,`page`],[3,`change`],[3,`value`,`selected`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`]],template:function(e,t){if(e&1&&R(0,KE,2,0,`p`,0)(1,qE,2,0,`p`,0)(2,rD,10,4)(3,iD,2,0,`p`,0),e&2){let e;z(t.failed()?0:t.loading()?1:(e=t.page())?2:3,e)}},dependencies:[_T,ST,PT,bE,UE],styles:[`[_nghost-%COMP%] { + }`]})},pD=(e,t)=>t.id,mD=(e,t)=>t.pageId;function hD(e,t){e&1&&(H(0,`p`,0),X(1,`Could not load the live router state.`),U())}function gD(e,t){e&1&&(H(0,`p`,0),X(1,`Loading the live router state…`),U())}function _D(e,t){if(e&1&&(H(0,`option`,8),X(1),U()),e&2){let e=t.$implicit,n=Y(2);lg(`value`,e.pageId)(`selected`,e.pageId===n.pageId),I(),w_(` `,e.snapshot?.url??e.pageId,` (`,e.pageId,`) `)}}function vD(e,t){if(e&1){let e=K();H(0,`label`,1),X(1,` Page `),H(2,`select`,7),kg(`change`,function(t){return N(e),P(Y(2).pickPage(t))}),B(3,_D,2,4,`option`,8,mD),U()()}if(e&2){let e=Y(2);I(3),V(e.pages())}}function yD(e,t){if(e&1&&(H(0,`span`,10),X(1),U()),e&2){let e=Y(3);L(`aria-label`,e.problems()+` problem navigations`),I(),Z(e.problems())}}function bD(e,t){if(e&1){let e=K();H(0,`button`,9),kg(`click`,function(){let t=N(e).$implicit;return P(Y(2).selected.set(t.id))}),X(1),R(2,yD,2,2,`span`,10),U()}if(e&2){let e=t.$implicit,n=Y(2);lg(`id`,`router-tab-`+e.id),L(`aria-selected`,e.id===n.selected())(`aria-controls`,`router-panel-`+e.id)(`tabindex`,e.id===n.selected()?0:-1),I(),Q(` `,e.label,` `),I(),z(e.id===`navigations`&&n.problems()>0?2:-1)}}function xD(e,t){if(e&1&&fg(0,`app-route-current`,5),e&2){let e=Y(),t=Y();lg(`page`,e)(`rpc`,t.rpc())}}function SD(e,t){if(e&1&&fg(0,`app-route-timeline`,5),e&2){let e=Y(),t=Y();lg(`page`,e)(`rpc`,t.rpc())}}function CD(e,t){if(e&1&&fg(0,`app-route-tree`,5),e&2){let e=Y(),t=Y();lg(`page`,e)(`rpc`,t.rpc())}}function wD(e,t){e&1&&fg(0,`app-route-setup`,6),e&2&&lg(`page`,Y())}function TD(e,t){if(e&1&&fg(0,`app-route-lint`,5),e&2){let e=Y(),t=Y();lg(`page`,e)(`rpc`,t.rpc())}}function ED(e,t){if(e&1){let e=K();R(0,vD,5,0,`label`,1),H(1,`div`,2),kg(`keydown`,function(t){return N(e),P(Y().onKey(t))}),B(2,bD,3,6,`button`,3,pD),U(),H(4,`div`,4),R(5,xD,1,2,`app-route-current`,5)(6,SD,1,2,`app-route-timeline`,5)(7,CD,1,2,`app-route-tree`,5)(8,wD,1,1,`app-route-setup`,6)(9,TD,1,2,`app-route-lint`,5),U()}if(e&2){let e,t=Y();z(t.pages().length>1?0:-1),I(2),V(t.tabs),I(2),lg(`id`,`router-panel-`+t.selected()),L(`aria-labelledby`,`router-tab-`+t.selected()),I(),z((e=t.selected())===`current`?5:e===`navigations`?6:e===`routes`?7:e===`setup`?8:e===`lint`?9:-1)}}function DD(e,t){e&1&&(H(0,`p`,0),X(1,`No page is reporting router state yet. Open the app in a browser.`),U())}var OD=[{id:`current`,label:`Current`},{id:`navigations`,label:`Navigations`},{id:`routes`,label:`Routes`},{id:`setup`,label:`Setup`},{id:`lint`,label:`Lint`}],kD=class e{rpc=Z_(null);tabs=OD;selected=F(`current`);pages=F([]);loading=F(!0);failed=F(!1);pageId=G_({source:this.pages,computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.snapshot)?.pageId??e[0]?.pageId??null});unsubscribe=null;destroyRef=A(ms);page=$(()=>{let e=this.pages();return e.find(e=>e.pageId===this.pageId())??e[0]??null});problems=$(()=>(this.page()?.navigations??[]).filter(e=>!e.probe&&[`failed`,`cancelled`,`redirected`].includes(e.outcome)).length);constructor(){tc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{this.pages.set(e?.pages??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}pickPage(e){this.pageId.set(e.target.value)}onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.selected()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.selected.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#router-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-live-route`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[1,`muted`],[1,`page-pick`],[`role`,`tablist`,`aria-label`,`Router views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`page`,`rpc`],[3,`page`],[3,`change`],[3,`value`,`selected`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`]],template:function(e,t){if(e&1&&R(0,hD,2,0,`p`,0)(1,gD,2,0,`p`,0)(2,ED,10,4)(3,DD,2,0,`p`,0),e&2){let e;z(t.failed()?0:t.loading()?1:(e=t.page())?2:3,e)}},dependencies:[BT,GT,rE,UE,fD],styles:[`[_nghost-%COMP%] { display: grid; gap: 12px; margin-bottom: 28px; @@ -1045,7 +1045,7 @@ background: #7f1d1d; color: #fecaca; font-size: 11px; - }`]})};function sD(e,t){e&1&&(H(0,`p`,5),X(1,`Scanning routes…`),U())}function cD(e,t){e&1&&(H(0,`p`,5),X(1,`No routes found.`),U())}function lD(e,t){if(e&1&&(H(0,`span`,9),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`➜ `,e.redirectTo)}}function uD(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` `,e.component??`—`,` `)}}function dD(e,t){if(e&1&&(H(0,`tr`)(1,`td`,8),X(2),U(),H(3,`td`),R(4,lD,2,1,`span`,9)(5,uD,1,1),U(),H(6,`td`),X(7),U(),H(8,`td`,10),X(9),U(),H(10,`td`),X(11),U()()),e&2){let e=t.$implicit;I(2),Q(`/`,e.path),I(2),z(e.redirectTo===void 0?5:4),I(3),Z(e.title??`—`),I(2),Z(e.file),I(2),Z(e.hasChildren?`Yes`:`—`)}}function fD(e,t){if(e&1&&(H(0,`table`,6)(1,`thead`)(2,`tr`)(3,`th`,7),X(4,`Path`),U(),H(5,`th`,7),X(6,`Component / Target`),U(),H(7,`th`,7),X(8,`Title`),U(),H(9,`th`,7),X(10,`File`),U(),H(11,`th`,7),X(12,`Children`),U()()(),H(13,`tbody`),B(14,dD,12,5,`tr`,null,jh),U()()),e&2){let e=Y();I(14),V(e.filtered())}}var pD=class e{rpc=k_(null);routes=F([]);filter=F(``);loading=F(!1);filtered=$(()=>{let e=this.filter().toLowerCase().trim(),t=this.routes();return e?t.filter(t=>t.path.toLowerCase().includes(e)||t.component&&t.component.toLowerCase().includes(e)||t.redirectTo&&t.redirectTo.toLowerCase().includes(e)||t.title&&t.title.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});constructor(){$s(()=>{this.rpc()&&this.refresh()})}onFilterInput(e){let t=e.target;this.filter.set(t?.value??``)}async refresh(){let e=this.rpc();if(e){this.loading.set(!0);try{let t=await e.scope(`ng-devtools`).rpc.call(`get-routes`);this.routes.set(t)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-route-inspector`]],inputs:{rpc:[1,`rpc`]},decls:10,vars:3,consts:[[3,`rpc`],[1,`config-heading`],[1,`toolbar`],[`type`,`text`,`aria-label`,`Filter routes`,`placeholder`,`Filter routes…`,3,`input`,`value`],[`type`,`button`,3,`click`],[1,`muted`],[`role`,`table`],[`scope`,`col`],[1,`path`],[1,`redirect`],[1,`file`]],template:function(e,t){e&1&&(Wh(0,`app-live-route`,0),H(1,`h2`,1),X(2,`Route config`),U(),H(3,`div`,2)(4,`input`,3),cg(`input`,function(e){return t.onFilterInput(e)}),U(),H(5,`button`,4),cg(`click`,function(){return t.refresh()}),X(6,`Refresh`),U()(),R(7,sD,2,0,`p`,5)(8,cD,2,0,`p`,5)(9,fD,16,0,`table`,6)),e&2&&(Vh(`rpc`,t.rpc()),I(4),Vh(`value`,t.filter()),I(3),z(t.loading()?7:t.filtered().length===0?8:9))},dependencies:[oD],styles:[`.config-heading[_ngcontent-%COMP%] { + }`]})};function AD(e,t){e&1&&(H(0,`p`,5),X(1,`Scanning routes…`),U())}function jD(e,t){e&1&&(H(0,`p`,5),X(1,`No routes found.`),U())}function MD(e,t){if(e&1&&(H(0,`span`,9),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`➜ `,e.redirectTo)}}function ND(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` `,e.component??`—`,` `)}}function PD(e,t){if(e&1&&(H(0,`tr`)(1,`td`,8),X(2),U(),H(3,`td`),R(4,MD,2,1,`span`,9)(5,ND,1,1),U(),H(6,`td`),X(7),U(),H(8,`td`,10),X(9),U(),H(10,`td`),X(11),U()()),e&2){let e=t.$implicit;I(2),Q(`/`,e.path),I(2),z(e.redirectTo===void 0?5:4),I(3),Z(e.title??`—`),I(2),Z(e.file),I(2),Z(e.hasChildren?`Yes`:`—`)}}function FD(e,t){if(e&1&&(H(0,`table`,6)(1,`thead`)(2,`tr`)(3,`th`,7),X(4,`Path`),U(),H(5,`th`,7),X(6,`Component / Target`),U(),H(7,`th`,7),X(8,`Title`),U(),H(9,`th`,7),X(10,`File`),U(),H(11,`th`,7),X(12,`Children`),U()()(),H(13,`tbody`),B(14,PD,12,5,`tr`,null,$h),U()()),e&2){let e=Y();I(14),V(e.filtered())}}var ID=class e{rpc=Z_(null);routes=F([]);filter=F(``);loading=F(!1);filtered=$(()=>{let e=this.filter().toLowerCase().trim(),t=this.routes();return e?t.filter(t=>t.path.toLowerCase().includes(e)||t.component&&t.component.toLowerCase().includes(e)||t.redirectTo&&t.redirectTo.toLowerCase().includes(e)||t.title&&t.title.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});constructor(){tc(()=>{this.rpc()&&this.refresh()})}onFilterInput(e){let t=e.target;this.filter.set(t?.value??``)}async refresh(){let e=this.rpc();if(e){this.loading.set(!0);try{let t=await e.scope(`ng-devtools`).rpc.call(`get-routes`);this.routes.set(t)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-route-inspector`]],inputs:{rpc:[1,`rpc`]},decls:10,vars:3,consts:[[3,`rpc`],[1,`config-heading`],[1,`toolbar`],[`type`,`text`,`aria-label`,`Filter routes`,`placeholder`,`Filter routes…`,3,`input`,`value`],[`type`,`button`,3,`click`],[1,`muted`],[`role`,`table`],[`scope`,`col`],[1,`path`],[1,`redirect`],[1,`file`]],template:function(e,t){e&1&&(fg(0,`app-live-route`,0),H(1,`h2`,1),X(2,`Route config`),U(),H(3,`div`,2)(4,`input`,3),kg(`input`,function(e){return t.onFilterInput(e)}),U(),H(5,`button`,4),kg(`click`,function(){return t.refresh()}),X(6,`Refresh`),U()(),R(7,AD,2,0,`p`,5)(8,jD,2,0,`p`,5)(9,FD,16,0,`table`,6)),e&2&&(lg(`rpc`,t.rpc()),I(4),lg(`value`,t.filter()),I(3),z(t.loading()?7:t.filtered().length===0?8:9))},dependencies:[kD],styles:[`.config-heading[_ngcontent-%COMP%] { margin: 0 0 8px; font-size: 15px; color: #e4e4e7; @@ -1122,7 +1122,7 @@ .file[_ngcontent-%COMP%] { font-size: 12px; color: #a1a1aa; - }`]})},mD=(e,t)=>t.name+t.file+t.line,hD=(e,t)=>t.kind,gD=(e,t)=>t.id,_D=(e,t)=>t.epoch;function vD(e,t){e&1&&(W(0,`div`,3)(1,`p`,4),X(2,`No signals found.`),G(),W(3,`p`,5),X(4,` No signal(), computed(), effect() calls found in source. Runtime graph requires Angular 19+ with the overlay connected. `),G()())}function yD(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · in <`,e.component,`> `)}}function bD(e,t){if(e&1&&(W(0,`div`,8)(1,`div`,9)(2,`span`,10),X(3),G(),W(4,`span`,11),X(5),G()(),W(6,`div`,12),X(7),R(8,yD,1,1),G()()),e&2){let e=t.$implicit,n=Y(2);I(2),Ag(`background`,n.kindColor(e.kind)),I(),Z(e.kind),I(2),Z(e.name),I(2),n_(` `,e.file,`:`,e.line,` `),I(),z(e.component?8:-1)}}function xD(e,t){if(e&1&&(W(0,`p`,6),X(1,`Signals from source scan (static analysis):`),G(),W(2,`div`,7),B(3,bD,9,7,`div`,8,mD),G()),e&2){let e=Y();I(3),V(e.filteredSourceSignals())}}function SD(e,t){if(e&1&&(W(0,`span`,14),Gh(1,`span`,16),X(2),G()),e&2){let e=t.$implicit;I(),Ag(`background`,e.color),I(),Q(` `,e.kind,` `)}}function CD(e,t){e&1&&(W(0,`span`,18),X(1,`watching`),G())}function wD(e,t){if(e&1&&(W(0,`span`,19),X(1),G()),e&2){let e=t;I(),n_(``,e,` `,e===1?`change`:`changes`)}}function TD(e,t){if(e&1&&(W(0,`span`,20),X(1),u_(2,`json`),G()),e&2){let e=Y().$implicit;I(),Z(f_(2,1,e.value))}}function ED(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · Deps: `,Y(2).getDependencies(e).length,` `)}}function DD(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · Consumers: `,Y(2).getConsumers(e).length,` `)}}function OD(e,t){if(e&1&&(W(0,`dt`),X(1,`Value`),G(),W(2,`dd`)(3,`pre`),X(4),u_(5,`json`),G()()),e&2){let e=Y(4);I(4),Z(f_(5,1,e.selectedNode().value))}}function kD(e,t){if(e&1&&(W(0,`li`)(1,`span`,22),X(2),G(),X(3),G()),e&2){let e=t.$implicit,n=Y(5);I(),Ag(`background`,n.kindColor(e.kind)),I(),Z(e.kind),I(),Q(` `,e.label??e.id,` `)}}function AD(e,t){if(e&1&&(W(0,`h4`),X(1,`Dependencies (producers)`),G(),W(2,`ul`),B(3,kD,4,4,`li`,null,gD),G()),e&2){let e=Y(4);I(3),V(e.getDependencies(e.selectedNode()))}}function jD(e,t){if(e&1&&(W(0,`li`)(1,`span`,22),X(2),G(),X(3),G()),e&2){let e=t.$implicit,n=Y(5);I(),Ag(`background`,n.kindColor(e.kind)),I(),Z(e.kind),I(),Q(` `,e.label??e.id,` `)}}function MD(e,t){if(e&1&&(W(0,`h4`),X(1,`Consumers`),G(),W(2,`ul`),B(3,jD,4,4,`li`,null,gD),G()),e&2){let e=Y(4);I(3),V(e.getConsumers(e.selectedNode()))}}function ND(e,t){if(e&1&&(W(0,`span`,28),X(1),G()),e&2){let e=Y().$implicit;I(),Q(``,e.missed,` earlier not captured`)}}function PD(e,t){if(e&1&&(W(0,`li`)(1,`span`,26)(2,`time`),X(3),u_(4,`date`),G(),W(5,`span`,27),X(6),G(),W(7,`span`),X(8),G(),R(9,ND,2,1,`span`,28),G(),W(10,`pre`),X(11),u_(12,`json`),G()()),e&2){let e=t.$implicit,n=Y(5);I(3),Z(p_(4,7,e.at,`HH:mm:ss.SSS`)),I(2),Mg(`source-`+e.source),I(),Z(n.sourceLabel(e.source)),I(2),Q(`epoch `,e.epoch),I(),z(e.missed?9:-1),I(2),Z(f_(12,10,e.value))}}function FD(e,t){if(e&1&&(W(0,`h4`,23),X(1,`Value history`),G(),W(2,`p`,24),X(3),G(),W(4,`ol`,25),B(5,PD,13,12,`li`,null,_D),G()),e&2){let e=Y(4);I(3),Q(` `,e.changeCount(e.selectedNode().id),` changes recorded, newest first. `),I(2),V(e.selectedHistory())}}function ID(e,t){if(e&1&&(W(0,`div`,21)(1,`h3`),X(2),G(),W(3,`dl`)(4,`dt`),X(5,`Kind`),G(),W(6,`dd`),X(7),G(),W(8,`dt`),X(9,`Epoch`),G(),W(10,`dd`),X(11),G(),R(12,OD,6,3),G(),R(13,AD,5,0),R(14,MD,5,0),R(15,FD,7,1),G()),e&2){let e=Y().$implicit,t=Y(2);q(`id`,`signal-detail-`+e.id),I(2),Z(t.selectedNode().label??t.selectedNode().id),I(5),Z(t.selectedNode().kind),I(4),Z(t.selectedNode().epoch),I(),z(t.selectedNode().value===void 0?-1:12),I(),z(t.getDependencies(t.selectedNode()).length?13:-1),I(),z(t.getConsumers(t.selectedNode()).length?14:-1),I(),z(t.selectedHistory().length?15:-1)}}function LD(e,t){if(e&1){let e=K();W(0,`li`)(1,`button`,17),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).selectNode(t))}),W(2,`span`,9)(3,`span`,10),X(4),G(),W(5,`span`,11),X(6),G(),R(7,CD,2,0,`span`,18),R(8,wD,2,2,`span`,19),G(),R(9,TD,3,3,`span`,20),W(10,`span`,12),X(11),R(12,ED,1,1),R(13,DD,1,1),G()(),R(14,ID,16,8,`div`,21),G()}if(e&2){let e,n=t.$implicit,r=Y(2);I(),jg(`selected`,r.selectedId()===n.id),L(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id),I(2),Ag(`background`,r.kindColor(n.kind)),I(),Z(n.kind),I(2),Z(n.label??`(unnamed)`),I(),z(n.watched?7:-1),I(),z((e=r.changeCount(n.id))?8:-1,e),I(),z(n.value===void 0?-1:9),I(2),Q(` Epoch: `,n.epoch,` `),I(),z(r.getDependencies(n).length?12:-1),I(),z(r.getConsumers(n).length?13:-1),I(),z(r.selectedId()===n.id&&r.selectedNode()?14:-1)}}function RD(e,t){if(e&1&&(W(0,`div`,13),B(1,SD,3,3,`span`,14,hD),G(),W(3,`ul`,15),B(4,LD,15,15,`li`,null,gD),G()),e&2){let e=Y();I(),V(e.kindLegend),I(3),V(e.filteredNodes())}}var zD={write:`set`,sample:`sampled`,initial:`initial`},BD={signal:`#a78bfa`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#c084fc`,"input (signal)":`#f59e0b`,"input.required (signal)":`#f59e0b`,"output (signal)":`#ec4899`,"model (signal)":`#14b8a6`,"model.required (signal)":`#14b8a6`,"viewChild (signal)":`#8b5cf6`,"viewChild.required (signal)":`#8b5cf6`,"viewChildren (signal)":`#8b5cf6`,"contentChild (signal)":`#6366f1`,"contentChild.required (signal)":`#6366f1`,"contentChildren (signal)":`#6366f1`,resource:`#06b6d4`,unknown:`#71717a`},VD=class e{rpc=k_(null);graph=F(null);sourceSignals=F([]);filter=F(``);selectedId=F(null);selectedNode=$(()=>this.graph()?.nodes.find(e=>e.id===this.selectedId())??null);selectedHistory=$(()=>{let e=this.selectedId();return e?[...this.graph()?.history?.[e]??[]].reverse():[]});kindLegend=Object.entries(BD).map(([e,t])=>({kind:e,color:t}));filteredNodes=$(()=>{let e=this.graph();if(!e)return[];let t=this.filter().toLowerCase();return(t?e.nodes.filter(e=>(e.label??``).toLowerCase().includes(t)||e.kind.includes(t)):[...e.nodes]).sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}))});filteredSourceSignals=$(()=>{let e=this.filter().toLowerCase(),t=this.sourceSignals();return e?t.filter(t=>t.name.toLowerCase().includes(e)||t.kind.includes(e)||t.file.includes(e)):t});constructor(){$s(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))})}async loadSignalGraph(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`signal-graph`),n=new URLSearchParams(location.search).get(`pageId`),r=e=>n&&e?.pages?.[n]||e?.graph,i=r(t.value());i&&this.graph.set(i),t.on(`updated`,e=>{let t=r(e);t&&this.graph.set(t)})}async loadSourceSignals(e){let t=e.scope(`ng-devtools`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e)}catch{}}selectNode(e){this.selectedId.set(this.selectedId()===e.id?null:e.id)}changeCount(e){return(this.graph()?.history?.[e]??[]).reduce((e,t)=>e+(t.source===`initial`?0:1+(t.missed??0)),0)}sourceLabel(e){return zD[e]}kindColor(e){return BD[e]??BD.unknown}getDependencies(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.consumer===n).map(e=>t.nodes[e.producer]).filter(Boolean)}getConsumers(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.producer===n).map(e=>t.nodes[e.consumer]).filter(Boolean)}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-signal-inspector`]],inputs:{rpc:[1,`rpc`]},decls:7,vars:5,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by name or kind…`,3,`input`,`value`],[1,`label`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`legend`],[1,`legend-item`],[`role`,`list`,1,`nodes`],[1,`dot`],[`type`,`button`,1,`node-card`,3,`click`],[1,`watched-badge`],[1,`changed-badge`],[1,`node-value`],[1,`detail-panel`,3,`id`],[1,`kind-badge`,`sm`],[`id`,`value-history-heading`],[`aria-live`,`polite`,1,`history-summary`],[`aria-labelledby`,`value-history-heading`,1,`history`],[1,`history-meta`],[1,`source-tag`],[1,`missed`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`input`,1),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),W(2,`span`,2),X(3),G()(),R(4,vD,5,0,`div`,3),R(5,xD,5,0),R(6,RD,6,0)),e&2&&(I(),q(`value`,t.filter()),I(2),Q(`Component: `,t.graph()?.componentSelector??`—`),I(),z(!t.graph()&&t.sourceSignals().length===0?4:-1),I(),z(!t.graph()&&t.sourceSignals().length>0?5:-1),I(),z(t.graph()?6:-1))},dependencies:[Uv,Wv],styles:[`.toolbar[_ngcontent-%COMP%] { + }`]})},LD=(e,t)=>t.name+t.file+t.line,RD=(e,t)=>t.kind,zD=(e,t)=>t.id,BD=(e,t)=>t.epoch;function VD(e,t){e&1&&(W(0,`div`,3)(1,`p`,4),X(2,`No signals found.`),G(),W(3,`p`,5),X(4,` No signal(), computed(), effect() calls found in source. Runtime graph requires Angular 19+ with the overlay connected. `),G()())}function HD(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · in <`,e.component,`> `)}}function UD(e,t){if(e&1&&(W(0,`div`,8)(1,`div`,9)(2,`span`,10),X(3),G(),W(4,`span`,11),X(5),G()(),W(6,`div`,12),X(7),R(8,HD,1,1),G()()),e&2){let e=t.$implicit,n=Y(2);I(2),Qg(`background`,n.kindColor(e.kind)),I(),Z(e.kind),I(2),Z(e.name),I(2),w_(` `,e.file,`:`,e.line,` `),I(),z(e.component?8:-1)}}function WD(e,t){if(e&1&&(W(0,`p`,6),X(1,`Signals from source scan (static analysis):`),G(),W(2,`div`,7),B(3,UD,9,7,`div`,8,LD),G()),e&2){let e=Y();I(3),V(e.filteredSourceSignals())}}function GD(e,t){if(e&1&&(W(0,`span`,14),pg(1,`span`,16),X(2),G()),e&2){let e=t.$implicit;I(),Qg(`background`,e.color),I(),Q(` `,e.kind,` `)}}function KD(e,t){e&1&&(W(0,`span`,18),X(1,`watching`),G())}function qD(e,t){if(e&1&&(W(0,`span`,19),X(1),G()),e&2){let e=t;I(),w_(``,e,` `,e===1?`change`:`changes`)}}function JD(e,t){if(e&1&&(W(0,`span`,20),X(1),M_(2,`json`),G()),e&2){let e=Y().$implicit;I(),Z(P_(2,1,e.value))}}function YD(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · Deps: `,Y(2).getDependencies(e).length,` `)}}function XD(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · Consumers: `,Y(2).getConsumers(e).length,` `)}}function ZD(e,t){if(e&1&&(W(0,`dt`),X(1,`Value`),G(),W(2,`dd`)(3,`pre`),X(4),M_(5,`json`),G()()),e&2){let e=Y(4);I(4),Z(P_(5,1,e.selectedNode().value))}}function QD(e,t){if(e&1&&(W(0,`li`)(1,`span`,22),X(2),G(),X(3),G()),e&2){let e=t.$implicit,n=Y(5);I(),Qg(`background`,n.kindColor(e.kind)),I(),Z(e.kind),I(),Q(` `,e.label??e.id,` `)}}function $D(e,t){if(e&1&&(W(0,`h4`),X(1,`Dependencies (producers)`),G(),W(2,`ul`),B(3,QD,4,4,`li`,null,zD),G()),e&2){let e=Y(4);I(3),V(e.getDependencies(e.selectedNode()))}}function eO(e,t){if(e&1&&(W(0,`li`)(1,`span`,22),X(2),G(),X(3),G()),e&2){let e=t.$implicit,n=Y(5);I(),Qg(`background`,n.kindColor(e.kind)),I(),Z(e.kind),I(),Q(` `,e.label??e.id,` `)}}function tO(e,t){if(e&1&&(W(0,`h4`),X(1,`Consumers`),G(),W(2,`ul`),B(3,eO,4,4,`li`,null,zD),G()),e&2){let e=Y(4);I(3),V(e.getConsumers(e.selectedNode()))}}function nO(e,t){if(e&1&&(W(0,`span`,28),X(1),G()),e&2){let e=Y().$implicit;I(),Q(``,e.missed,` earlier not captured`)}}function rO(e,t){if(e&1&&(W(0,`li`)(1,`span`,26)(2,`time`),X(3),M_(4,`date`),G(),W(5,`span`,27),X(6),G(),W(7,`span`),X(8),G(),R(9,nO,2,1,`span`,28),G(),W(10,`pre`),X(11),M_(12,`json`),G()()),e&2){let e=t.$implicit,n=Y(5);I(3),Z(F_(4,7,e.at,`HH:mm:ss.SSS`)),I(2),e_(`source-`+e.source),I(),Z(n.sourceLabel(e.source)),I(2),Q(`epoch `,e.epoch),I(),z(e.missed?9:-1),I(2),Z(P_(12,10,e.value))}}function iO(e,t){if(e&1&&(W(0,`h4`,23),X(1,`Value history`),G(),W(2,`p`,24),X(3),G(),W(4,`ol`,25),B(5,rO,13,12,`li`,null,BD),G()),e&2){let e=Y(4);I(3),Q(` `,e.changeCount(e.selectedNode().id),` changes recorded, newest first. `),I(2),V(e.selectedHistory())}}function aO(e,t){if(e&1&&(W(0,`div`,21)(1,`h3`),X(2),G(),W(3,`dl`)(4,`dt`),X(5,`Kind`),G(),W(6,`dd`),X(7),G(),W(8,`dt`),X(9,`Epoch`),G(),W(10,`dd`),X(11),G(),R(12,ZD,6,3),G(),R(13,$D,5,0),R(14,tO,5,0),R(15,iO,7,1),G()),e&2){let e=Y().$implicit,t=Y(2);q(`id`,`signal-detail-`+e.id),I(2),Z(t.selectedNode().label??t.selectedNode().id),I(5),Z(t.selectedNode().kind),I(4),Z(t.selectedNode().epoch),I(),z(t.selectedNode().value===void 0?-1:12),I(),z(t.getDependencies(t.selectedNode()).length?13:-1),I(),z(t.getConsumers(t.selectedNode()).length?14:-1),I(),z(t.selectedHistory().length?15:-1)}}function oO(e,t){if(e&1){let e=K();W(0,`li`)(1,`button`,17),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).selectNode(t))}),W(2,`span`,9)(3,`span`,10),X(4),G(),W(5,`span`,11),X(6),G(),R(7,KD,2,0,`span`,18),R(8,qD,2,2,`span`,19),G(),R(9,JD,3,3,`span`,20),W(10,`span`,12),X(11),R(12,YD,1,1),R(13,XD,1,1),G()(),R(14,aO,16,8,`div`,21),G()}if(e&2){let e,n=t.$implicit,r=Y(2);I(),$g(`selected`,r.selectedId()===n.id),L(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id),I(2),Qg(`background`,r.kindColor(n.kind)),I(),Z(n.kind),I(2),Z(n.label??`(unnamed)`),I(),z(n.watched?7:-1),I(),z((e=r.changeCount(n.id))?8:-1,e),I(),z(n.value===void 0?-1:9),I(2),Q(` Epoch: `,n.epoch,` `),I(),z(r.getDependencies(n).length?12:-1),I(),z(r.getConsumers(n).length?13:-1),I(),z(r.selectedId()===n.id&&r.selectedNode()?14:-1)}}function sO(e,t){if(e&1&&(W(0,`div`,13),B(1,GD,3,3,`span`,14,RD),G(),W(3,`ul`,15),B(4,oO,15,15,`li`,null,zD),G()),e&2){let e=Y();I(),V(e.kindLegend),I(3),V(e.filteredNodes())}}var cO={write:`set`,sample:`sampled`,initial:`initial`},lO={signal:`#a78bfa`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#c084fc`,"input (signal)":`#f59e0b`,"input.required (signal)":`#f59e0b`,"output (signal)":`#ec4899`,"model (signal)":`#14b8a6`,"model.required (signal)":`#14b8a6`,"viewChild (signal)":`#8b5cf6`,"viewChild.required (signal)":`#8b5cf6`,"viewChildren (signal)":`#8b5cf6`,"contentChild (signal)":`#6366f1`,"contentChild.required (signal)":`#6366f1`,"contentChildren (signal)":`#6366f1`,resource:`#06b6d4`,unknown:`#71717a`},uO=class e{rpc=Z_(null);graph=F(null);sourceSignals=F([]);filter=F(``);selectedId=F(null);selectedNode=$(()=>this.graph()?.nodes.find(e=>e.id===this.selectedId())??null);selectedHistory=$(()=>{let e=this.selectedId();return e?[...this.graph()?.history?.[e]??[]].reverse():[]});kindLegend=Object.entries(lO).map(([e,t])=>({kind:e,color:t}));filteredNodes=$(()=>{let e=this.graph();if(!e)return[];let t=this.filter().toLowerCase();return(t?e.nodes.filter(e=>(e.label??``).toLowerCase().includes(t)||e.kind.includes(t)):[...e.nodes]).sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}))});filteredSourceSignals=$(()=>{let e=this.filter().toLowerCase(),t=this.sourceSignals();return e?t.filter(t=>t.name.toLowerCase().includes(e)||t.kind.includes(e)||t.file.includes(e)):t});constructor(){tc(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))})}async loadSignalGraph(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`signal-graph`),n=new URLSearchParams(location.search).get(`pageId`),r=e=>n&&e?.pages?.[n]||e?.graph,i=r(t.value());i&&this.graph.set(i),t.on(`updated`,e=>{let t=r(e);t&&this.graph.set(t)})}async loadSourceSignals(e){let t=e.scope(`ng-devtools`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e)}catch{}}selectNode(e){this.selectedId.set(this.selectedId()===e.id?null:e.id)}changeCount(e){return(this.graph()?.history?.[e]??[]).reduce((e,t)=>e+(t.source===`initial`?0:1+(t.missed??0)),0)}sourceLabel(e){return cO[e]}kindColor(e){return lO[e]??lO.unknown}getDependencies(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.consumer===n).map(e=>t.nodes[e.producer]).filter(Boolean)}getConsumers(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.producer===n).map(e=>t.nodes[e.consumer]).filter(Boolean)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-signal-inspector`]],inputs:{rpc:[1,`rpc`]},decls:7,vars:5,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by name or kind…`,3,`input`,`value`],[1,`label`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`legend`],[1,`legend-item`],[`role`,`list`,1,`nodes`],[1,`dot`],[`type`,`button`,1,`node-card`,3,`click`],[1,`watched-badge`],[1,`changed-badge`],[1,`node-value`],[1,`detail-panel`,3,`id`],[1,`kind-badge`,`sm`],[`id`,`value-history-heading`],[`aria-live`,`polite`,1,`history-summary`],[`aria-labelledby`,`value-history-heading`,1,`history`],[1,`history-meta`],[1,`source-tag`],[1,`missed`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`input`,1),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),W(2,`span`,2),X(3),G()(),R(4,VD,5,0,`div`,3),R(5,WD,5,0),R(6,sO,6,0)),e&2&&(I(),q(`value`,t.filter()),I(2),Q(`Component: `,t.graph()?.componentSelector??`—`),I(),z(!t.graph()&&t.sourceSignals().length===0?4:-1),I(),z(!t.graph()&&t.sourceSignals().length>0?5:-1),I(),z(t.graph()?6:-1))},dependencies:[fy,py],styles:[`.toolbar[_ngcontent-%COMP%] { display: flex; gap: 12px; align-items: center; @@ -1353,7 +1353,7 @@ display: flex; align-items: center; gap: 6px; - }`]})},HD=(e,t)=>t.type,UD=(e,t)=>t.token+t.file+t.line,WD=(e,t)=>t.injector.id,GD=(e,t)=>t.node.injector.id,KD=(e,t)=>t.token;function qD(e,t){e&1&&(W(0,`div`,4)(1,`p`,5),X(2,`No DI data found.`),G(),W(3,`p`,6),X(4,` No providers, injectables, or inject() calls found. Runtime tree requires Angular 17+ with the overlay connected. `),G()())}function JD(e,t){if(e&1&&(W(0,`span`,14),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`providedIn: `,e.providedIn)}}function YD(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · as `,e.source,` `)}}function XD(e,t){if(e&1&&(W(0,`div`,11)(1,`div`,12)(2,`span`,13),X(3),G(),R(4,JD,2,1,`span`,14),G(),W(5,`div`,15),X(6),R(7,YD,1,1),G()()),e&2){let e=t.$implicit;I(3),Z(e.token),I(),z(e.providedIn?4:-1),I(2),n_(` `,e.file,`:`,e.line,` `),I(),z(e.source!==`class`&&e.source!==`providers array`?7:-1)}}function ZD(e,t){if(e&1&&(W(0,`div`,9)(1,`h3`),X(2),G(),W(3,`div`,10),B(4,XD,8,5,`div`,11,UD),G()()),e&2){let e=t.$implicit;I(2),n_(``,e.label,` (`,e.items.length,`)`),I(2),V(e.items)}}function QD(e,t){if(e&1&&(W(0,`p`,7),X(1,`DI from source scan (static analysis):`),G(),W(2,`div`,8),B(3,ZD,6,2,`div`,9,HD),G()),e&2){let e=Y();I(3),V(e.groupedProviders())}}function $D(e,t){e&1&&Xh(0)}function eO(e,t){if(e&1&&(W(0,`span`,24),X(1),G()),e&2){let e=Y().$implicit;I(),Q(``,e.node.injector.providerCount,` providers`)}}function tO(e,t){if(e&1){let e=K();W(0,`div`,21),J(`click`,function(){let t=N(e).$implicit;return P(Y(4).select(t.node))}),W(1,`span`,22),X(2),G(),W(3,`span`,23),X(4),G(),R(5,eO,2,1,`span`,24),G()}if(e&2){let e=t.$implicit,n=Y(4);Ag(`padding-left`,e.depth*24+12,`px`),jg(`selected`,n.selectedId()===e.node.injector.id),I(),Ag(`background`,n.typeColor(e.node.injector.type)),I(),Q(` `,e.node.injector.type,` `),I(2),Z(e.node.injector.name),I(),z(e.node.injector.providerCount>0?5:-1)}}function nO(e,t){if(e&1&&(W(0,`div`,19),B(1,tO,6,9,`div`,20,GD),G()),e&2){let e=Y().$implicit,t=Y(2);I(),V(t.flattenTree(e))}}function rO(e,t){e&1&&(hm(0,$D,1,0,`ng-container`,18)(1,nO,3,0),bh(2,1),xh()),e&2&&q(`ngTemplateOutlet`,void 0)}function iO(e,t){e&1&&(W(0,`p`,5),X(1,`No providers configured on this injector.`),G())}function aO(e,t){if(e&1&&(W(0,`tr`)(1,`td`,13),X(2),G(),W(3,`td`),X(4),G(),W(5,`td`),X(6),G()()),e&2){let e=t.$implicit;I(2),Z(e.token),I(2),Z(e.type),I(2),Z(e.isViewProvider?`Yes`:`—`)}}function oO(e,t){if(e&1&&(W(0,`table`,26)(1,`thead`)(2,`tr`)(3,`th`),X(4,`Token`),G(),W(5,`th`),X(6,`Type`),G(),W(7,`th`),X(8,`View`),G()()(),W(9,`tbody`),B(10,aO,7,3,`tr`,null,KD),G()()),e&2){let e=Y(3);I(10),V(e.selectedInjector().providers)}}function sO(e,t){if(e&1&&(W(0,`aside`,17)(1,`div`,25)(2,`span`,22),X(3),G(),W(4,`h3`),X(5),G()(),R(6,iO,2,0,`p`,5)(7,oO,12,0,`table`,26),G()),e&2){let e=Y(2);I(2),Ag(`background`,e.typeColor(e.selectedInjector().injector.type)),I(),Q(` `,e.selectedInjector().injector.type,` `),I(2),Z(e.selectedInjector().injector.name),I(),z(e.selectedInjector().providers.length===0?6:7)}}function cO(e,t){if(e&1&&(W(0,`div`,16),B(1,rO,4,1,null,null,WD),G(),R(3,sO,8,5,`aside`,17)),e&2){let e=Y();I(),V(e.filteredRoots()),I(2),z(e.selectedInjector()?3:-1)}}var lO={element:`#60a5fa`,environment:`#34d399`,null:`#71717a`},uO=class e{rpc=k_(null);roots=F([]);sourceProviders=F([]);filter=F(``);hideEmpty=F(!1);selectedId=F(null);selectedInjector=$(()=>{let e=this.selectedId();return e?this.findNode(this.roots(),e):null});filteredRoots=$(()=>{let e=this.roots();this.hideEmpty()&&(e=this.filterEmpty(e));let t=this.filter().toLowerCase();return t&&(e=this.filterByQuery(e,t)),e});groupedProviders=$(()=>{let e=this.sourceProviders(),t=this.filter().toLowerCase(),n=t?e.filter(e=>e.token.toLowerCase().includes(t)||e.file.includes(t)):e,r=[{type:`root-provider`,label:`Root Providers (provide*)`,items:[]},{type:`injectable`,label:`Injectable Services`,items:[]},{type:`injection`,label:`inject() Calls`,items:[]},{type:`provider`,label:`Component Providers`,items:[]}];for(let e of n){let t=r.find(t=>t.type===e.type);t&&t.items.push(e)}return r.filter(e=>e.items.length>0)});constructor(){$s(()=>{let e=this.rpc();e&&(this.loadInjectorTree(e),this.loadSourceProviders(e))})}async loadInjectorTree(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`injector-tree`),n=t.value();n?.roots?.length&&this.roots.set(n.roots),t.on(`updated`,e=>{e?.roots&&this.roots.set(e.roots)})}async loadSourceProviders(e){let t=e.scope(`ng-devtools`);try{let e=await t.rpc.call(`get-providers`);this.sourceProviders.set(e)}catch{}}select(e){this.selectedId.set(this.selectedId()===e.injector.id?null:e.injector.id)}typeColor(e){return lO[e]??lO.null}flattenTree(e){let t=[],n=(e,r)=>{t.push({node:e,depth:r});for(let t of e.children)n(t,r+1)};return n(e,0),t}findNode(e,t){for(let n of e){if(n.injector.id===t)return n;let e=this.findNode(n.children,t);if(e)return e}return null}filterEmpty(e){return e.map(e=>({...e,children:this.filterEmpty(e.children)})).filter(e=>e.injector.providerCount>0||e.children.length>0)}filterByQuery(e,t){return e.map(e=>({...e,children:this.filterByQuery(e.children,t)})).filter(e=>e.injector.name.toLowerCase().includes(t)||e.providers.some(e=>e.token.toLowerCase().includes(t))||e.children.length>0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-di-inspector`]],inputs:{rpc:[1,`rpc`]},decls:8,vars:5,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by injector name or token…`,3,`input`,`value`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`source-label`],[1,`source-providers`],[1,`provider-group`],[1,`provider-list`],[1,`provider-card`],[1,`provider-header`],[1,`token`],[1,`provided-in`],[1,`provider-meta`],[1,`tree-container`],[1,`detail-panel`],[4,`ngTemplateOutlet`],[1,`injector-tree`],[1,`injector-row`,3,`selected`,`paddingLeft`],[1,`injector-row`,3,`click`],[1,`type-badge`],[1,`name`],[1,`provider-count`],[1,`detail-header`],[`role`,`table`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`input`,1),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),W(2,`label`,2)(3,`input`,3),J(`change`,function(){return t.hideEmpty.set(!t.hideEmpty())}),G(),X(4,` Hide empty injectors `),G()(),R(5,qD,5,0,`div`,4),R(6,QD,5,0),R(7,cO,4,1)),e&2&&(I(),q(`value`,t.filter()),I(2),q(`checked`,t.hideEmpty()),I(2),z(t.roots().length===0&&t.sourceProviders().length===0?5:-1),I(),z(t.roots().length===0&&t.sourceProviders().length>0?6:-1),I(),z(t.roots().length>0?7:-1))},styles:[`.toolbar[_ngcontent-%COMP%] { + }`]})},dO=(e,t)=>t.type,fO=(e,t)=>t.token+t.file+t.line,pO=(e,t)=>t.injector.id,mO=(e,t)=>t.node.injector.id,hO=(e,t)=>t.token;function gO(e,t){e&1&&(H(0,`div`,4)(1,`p`,5),X(2,`No DI data found.`),U(),H(3,`p`,6),X(4,` No providers, injectables, or inject() calls found. Runtime tree requires Angular 17+ with the overlay connected. `),U()())}function _O(e,t){if(e&1&&(H(0,`span`,14),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`providedIn: `,e.providedIn)}}function vO(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · as `,e.source,` `)}}function yO(e,t){if(e&1&&(H(0,`div`,11)(1,`div`,12)(2,`span`,13),X(3),U(),R(4,_O,2,1,`span`,14),U(),H(5,`div`,15),X(6),R(7,vO,1,1),U()()),e&2){let e=t.$implicit;I(3),Z(e.token),I(),z(e.providedIn?4:-1),I(2),w_(` `,e.file,`:`,e.line,` `),I(),z(e.source!==`class`&&e.source!==`providers array`?7:-1)}}function bO(e,t){if(e&1&&(H(0,`div`,9)(1,`h3`),X(2),U(),H(3,`div`,10),B(4,yO,8,5,`div`,11,fO),U()()),e&2){let e=t.$implicit;I(2),w_(``,e.label,` (`,e.items.length,`)`),I(2),V(e.items)}}function xO(e,t){if(e&1&&(H(0,`p`,7),X(1,`DI from source scan (static analysis):`),U(),H(2,`div`,8),B(3,bO,6,2,`div`,9,dO),U()),e&2){let e=Y();I(3),V(e.groupedProviders())}}function SO(e,t){e&1&&_g(0)}function CO(e,t){if(e&1&&(H(0,`span`,24),X(1),U()),e&2){let e=Y().$implicit;I(),Q(``,e.node.injector.providerCount,` providers`)}}function wO(e,t){if(e&1){let e=K();H(0,`div`,21),kg(`click`,function(){let t=N(e).$implicit;return P(Y(4).select(t.node))}),H(1,`span`,22),X(2),U(),H(3,`span`,23),X(4),U(),R(5,CO,2,1,`span`,24),U()}if(e&2){let e=t.$implicit,n=Y(4);Qg(`padding-left`,e.depth*24+12,`px`),$g(`selected`,n.selectedId()===e.node.injector.id),I(),Qg(`background`,n.typeColor(e.node.injector.type)),I(),Q(` `,e.node.injector.type,` `),I(2),Z(e.node.injector.name),I(),z(e.node.injector.providerCount>0?5:-1)}}function TO(e,t){if(e&1&&(H(0,`div`,19),B(1,wO,6,9,`div`,20,mO),U()),e&2){let e=Y().$implicit,t=Y(2);I(),V(t.flattenTree(e))}}function EO(e,t){e&1&&(Im(0,SO,1,0,`ng-container`,18),Lm(1,TO,3,0),Hh(2,1),Uh()),e&2&&lg(`ngTemplateOutlet`,void 0)}function DO(e,t){e&1&&(H(0,`p`,5),X(1,`No providers configured on this injector.`),U())}function OO(e,t){if(e&1&&(H(0,`tr`)(1,`td`,13),X(2),U(),H(3,`td`),X(4),U(),H(5,`td`),X(6),U()()),e&2){let e=t.$implicit;I(2),Z(e.token),I(2),Z(e.type),I(2),Z(e.isViewProvider?`Yes`:`—`)}}function kO(e,t){if(e&1&&(H(0,`table`,26)(1,`thead`)(2,`tr`)(3,`th`),X(4,`Token`),U(),H(5,`th`),X(6,`Type`),U(),H(7,`th`),X(8,`View`),U()()(),H(9,`tbody`),B(10,OO,7,3,`tr`,null,hO),U()()),e&2){let e=Y(3);I(10),V(e.selectedInjector().providers)}}function AO(e,t){if(e&1&&(H(0,`aside`,17)(1,`div`,25)(2,`span`,22),X(3),U(),H(4,`h3`),X(5),U()(),R(6,DO,2,0,`p`,5)(7,kO,12,0,`table`,26),U()),e&2){let e=Y(2);I(2),Qg(`background`,e.typeColor(e.selectedInjector().injector.type)),I(),Q(` `,e.selectedInjector().injector.type,` `),I(2),Z(e.selectedInjector().injector.name),I(),z(e.selectedInjector().providers.length===0?6:7)}}function jO(e,t){if(e&1&&(H(0,`div`,16),B(1,EO,4,1,null,null,pO),U(),R(3,AO,8,5,`aside`,17)),e&2){let e=Y();I(),V(e.filteredRoots()),I(2),z(e.selectedInjector()?3:-1)}}var MO={element:`#60a5fa`,environment:`#34d399`,null:`#71717a`},NO=class e{rpc=Z_(null);roots=F([]);sourceProviders=F([]);filter=F(``);hideEmpty=F(!1);selectedId=F(null);selectedInjector=$(()=>{let e=this.selectedId();return e?this.findNode(this.roots(),e):null});filteredRoots=$(()=>{let e=this.roots();this.hideEmpty()&&(e=this.filterEmpty(e));let t=this.filter().toLowerCase();return t&&(e=this.filterByQuery(e,t)),e});groupedProviders=$(()=>{let e=this.sourceProviders(),t=this.filter().toLowerCase(),n=t?e.filter(e=>e.token.toLowerCase().includes(t)||e.file.includes(t)):e,r=[{type:`root-provider`,label:`Root Providers (provide*)`,items:[]},{type:`injectable`,label:`Injectable Services`,items:[]},{type:`injection`,label:`inject() Calls`,items:[]},{type:`provider`,label:`Component Providers`,items:[]}];for(let e of n){let t=r.find(t=>t.type===e.type);t&&t.items.push(e)}return r.filter(e=>e.items.length>0)});constructor(){tc(()=>{let e=this.rpc();e&&(this.loadInjectorTree(e),this.loadSourceProviders(e))})}async loadInjectorTree(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`injector-tree`),n=t.value();n?.roots?.length&&this.roots.set(n.roots),t.on(`updated`,e=>{e?.roots&&this.roots.set(e.roots)})}async loadSourceProviders(e){let t=e.scope(`ng-devtools`);try{let e=await t.rpc.call(`get-providers`);this.sourceProviders.set(e)}catch{}}select(e){this.selectedId.set(this.selectedId()===e.injector.id?null:e.injector.id)}typeColor(e){return MO[e]??MO.null}flattenTree(e){let t=[],n=(e,r)=>{t.push({node:e,depth:r});for(let t of e.children)n(t,r+1)};return n(e,0),t}findNode(e,t){for(let n of e){if(n.injector.id===t)return n;let e=this.findNode(n.children,t);if(e)return e}return null}filterEmpty(e){return e.map(e=>({...e,children:this.filterEmpty(e.children)})).filter(e=>e.injector.providerCount>0||e.children.length>0)}filterByQuery(e,t){return e.map(e=>({...e,children:this.filterByQuery(e.children,t)})).filter(e=>e.injector.name.toLowerCase().includes(t)||e.providers.some(e=>e.token.toLowerCase().includes(t))||e.children.length>0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-di-inspector`]],inputs:{rpc:[1,`rpc`]},decls:8,vars:5,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by injector name or token…`,3,`input`,`value`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`source-label`],[1,`source-providers`],[1,`provider-group`],[1,`provider-list`],[1,`provider-card`],[1,`provider-header`],[1,`token`],[1,`provided-in`],[1,`provider-meta`],[1,`tree-container`],[1,`detail-panel`],[4,`ngTemplateOutlet`],[1,`injector-tree`],[1,`injector-row`,3,`selected`,`paddingLeft`],[1,`injector-row`,3,`click`],[1,`type-badge`],[1,`name`],[1,`provider-count`],[1,`detail-header`],[`role`,`table`]],template:function(e,t){e&1&&(H(0,`div`,0)(1,`input`,1),kg(`input`,function(e){return t.filter.set(e.target.value)}),U(),H(2,`label`,2)(3,`input`,3),kg(`change`,function(){return t.hideEmpty.set(!t.hideEmpty())}),U(),X(4,` Hide empty injectors `),U()(),R(5,gO,5,0,`div`,4),R(6,xO,5,0),R(7,jO,4,1)),e&2&&(I(),lg(`value`,t.filter()),I(2),lg(`checked`,t.hideEmpty()),I(2),z(t.roots().length===0&&t.sourceProviders().length===0?5:-1),I(),z(t.roots().length===0&&t.sourceProviders().length>0?6:-1),I(),z(t.roots().length>0?7:-1))},dependencies:[sy],styles:[`.toolbar[_ngcontent-%COMP%] { display: flex; gap: 12px; align-items: center; @@ -1522,7 +1522,7 @@ font-size: 11px; color: #52525b; margin-top: 4px; - }`]})},dO=(e,t)=>t.kind,fO=(e,t)=>t.name+t.file+t.line;function pO(e,t){e&1&&Gh(0,`span`,4)}function mO(e,t){e&1&&(W(0,`div`,5)(1,`p`,6),X(2,`No NgRx store patterns found.`),G(),W(3,`p`,7),X(4,` No createAction, createReducer, createEffect, createSelector, or createFeature calls found in source. Make sure your app uses @ngrx/store. `),G()())}function hO(e,t){if(e&1&&(W(0,`span`,9),Gh(1,`span`,14),X(2),G()),e&2){let e=t.$implicit;I(),Ag(`background`,e.color),I(),Q(` `,e.kind,` `)}}function gO(e,t){if(e&1&&(W(0,`span`,15),X(1),G()),e&2){let e=t.$implicit;Ag(`border-color`,Y(3).kindColor(e.kind)),I(),r_(` `,e.count,` `,e.kind,``,e.count===1?``:`s`,` `)}}function _O(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · `,e.detail,` `)}}function vO(e,t){if(e&1&&(W(0,`div`,13)(1,`div`,16)(2,`span`,17),X(3),G(),W(4,`span`,18),X(5),G()(),W(6,`div`,19),X(7),R(8,_O,1,1),G()()),e&2){let e=t.$implicit,n=Y(3);I(2),Ag(`background`,n.kindColor(e.kind)),I(),Q(` `,e.kind,` `),I(2),Z(e.name),I(2),n_(` `,e.file,`:`,e.line,` `),I(),z(e.detail?8:-1)}}function yO(e,t){if(e&1&&(W(0,`div`,8),B(1,hO,3,3,`span`,9,dO),G(),W(3,`div`,10),B(4,gO,2,5,`span`,11,dO),G(),W(6,`div`,12),B(7,vO,9,7,`div`,13,fO),G()),e&2){let e=Y(2);I(),V(e.kindLegend),I(3),V(e.groupedEntries()),I(3),V(e.filteredEntries())}}function bO(e,t){e&1&&R(0,mO,5,0,`div`,5)(1,yO,9,0),e&2&&z(Y().sourceEntries().length===0?0:1)}function xO(e,t){e&1&&(W(0,`div`,5)(1,`p`,6),X(2,`No NgRx store connection detected.`),G(),W(3,`p`,7),X(4,` Runtime inspection requires @ngrx/store-devtools to be configured in your app. The store devtools use the Redux DevTools protocol to expose state. `),G()())}function SO(e,t){if(e&1){let e=K();W(0,`div`,28),J(`click`,function(){let t=N(e).$implicit;return P(Y(3).selectedAction.set(t))}),W(1,`div`,29),X(2),G(),W(3,`div`,30),X(4),G()()}if(e&2){let e=t.$implicit,n=Y(3);jg(`selected`,n.selectedAction()===e),I(2),Z(e.type),I(2),Z(n.formatTime(e.timestamp))}}function CO(e,t){e&1&&(W(0,`p`,6),X(1,`No actions dispatched yet.`),G())}function wO(e,t){if(e&1&&(W(0,`dt`),X(1,`Payload`),G(),W(2,`dd`)(3,`pre`),X(4),u_(5,`json`),G()()),e&2){let e=Y(4);I(4),Z(f_(5,1,e.selectedAction().payload))}}function TO(e,t){if(e&1&&(W(0,`aside`,27)(1,`h3`),X(2),G(),W(3,`dl`)(4,`dt`),X(5,`Type`),G(),W(6,`dd`),X(7),G(),W(8,`dt`),X(9,`Time`),G(),W(10,`dd`),X(11),G(),R(12,wO,6,3),G()()),e&2){let e=Y(3);I(2),Z(e.selectedAction().type),I(5),Z(e.selectedAction().type),I(4),Z(e.formatTime(e.selectedAction().timestamp)),I(),z(e.selectedAction().payload===void 0?-1:12)}}function EO(e,t){if(e&1&&(W(0,`div`,20)(1,`section`,21)(2,`h3`),X(3,`Current State`),G(),W(4,`pre`,22),X(5),u_(6,`json`),G()(),W(7,`section`,23)(8,`h3`),X(9,` Recent Actions `),W(10,`span`,24),X(11),G()(),W(12,`div`,25),B(13,SO,5,4,`div`,26,jh,!1,CO,2,0,`p`,6),G()()(),R(16,TO,13,4,`aside`,27)),e&2){let e=Y(2);I(5),Z(f_(6,4,e.runtimeState()?.state)),I(6),Z(e.filteredActions().length),I(2),V(e.filteredActions()),I(3),z(e.selectedAction()?16:-1)}}function DO(e,t){e&1&&R(0,xO,5,0,`div`,5)(1,EO,17,6),e&2&&z(+!!Y().runtimeState()?.connected)}var OO={action:`#f59e0b`,reducer:`#a78bfa`,effect:`#fb923c`,selector:`#60a5fa`,feature:`#34d399`,"store-setup":`#94a3b8`,"signal-store":`#e879f9`,"signal-state":`#22d3ee`,"signal-method":`#fb7185`},kO=class e{rpc=k_(null);filter=F(``);mode=F(`source`);sourceEntries=F([]);runtimeState=F(null);selectedAction=F(null);kindLegend=Object.entries(OO).map(([e,t])=>({kind:e,color:t}));filteredEntries=$(()=>{let e=this.filter().toLowerCase();return this.sourceEntries().filter(t=>t.name.toLowerCase().includes(e)||t.kind.toLowerCase().includes(e))});groupedEntries=$(()=>{let e=this.sourceEntries(),t=new Map;for(let n of e)t.set(n.kind,(t.get(n.kind)??0)+1);return[...t.entries()].map(([e,t])=>({kind:e,count:t}))});filteredActions=$(()=>{let e=this.filter().toLowerCase(),t=[...this.runtimeState()?.actions??[]].reverse();return e?t.filter(t=>t.type.toLowerCase().includes(e)):t});constructor(){$s(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);t.rpc.call(`get-ngrx-store`).then(e=>{this.sourceEntries.set(e),e.length===0&&this.mode.set(`runtime`)}).catch(()=>this.sourceEntries.set([])),t.rpc.sharedState(`ngrx-store`).then(e=>{e?.subscribe&&e.subscribe(e=>this.runtimeState.set(e))})})}kindColor(e){return OO[e]??`#71717a`}formatTime(e){return new Date(e).toLocaleTimeString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-store-inspector`]],inputs:{rpc:[1,`rpc`]},decls:10,vars:8,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by name or kind…`,3,`input`,`value`],[1,`toggle-group`],[3,`click`],[1,`live-dot`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`legend`],[1,`legend-item`],[1,`summary`],[1,`summary-badge`,3,`border-color`],[1,`nodes`],[1,`node-card`],[1,`dot`],[1,`summary-badge`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`runtime-layout`],[1,`state-panel`],[1,`state-tree`],[1,`actions-panel`],[1,`action-count`],[1,`action-list`],[1,`action-card`,3,`selected`],[1,`detail-panel`],[1,`action-card`,3,`click`],[1,`action-type`],[1,`action-time`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`input`,1),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),W(2,`div`,2)(3,`button`,3),J(`click`,function(){return t.mode.set(`source`)}),X(4,`Source`),G(),W(5,`button`,3),J(`click`,function(){return t.mode.set(`runtime`)}),X(6,` Runtime `),R(7,pO,1,0,`span`,4),G()()(),R(8,bO,2,1),R(9,DO,2,1)),e&2&&(I(),q(`value`,t.filter()),I(2),jg(`active`,t.mode()===`source`),I(2),jg(`active`,t.mode()===`runtime`),I(2),z(t.runtimeState()?.connected?7:-1),I(),z(t.mode()===`source`?8:-1),I(),z(t.mode()===`runtime`?9:-1))},dependencies:[Wv],styles:[`.toolbar[_ngcontent-%COMP%] { + }`]})},PO=(e,t)=>t.kind,FO=(e,t)=>t.name+t.file+t.line;function IO(e,t){e&1&&pg(0,`span`,4)}function LO(e,t){e&1&&(W(0,`div`,5)(1,`p`,6),X(2,`No NgRx store patterns found.`),G(),W(3,`p`,7),X(4,` No createAction, createReducer, createEffect, createSelector, or createFeature calls found in source. Make sure your app uses @ngrx/store. `),G()())}function RO(e,t){if(e&1&&(W(0,`span`,9),pg(1,`span`,14),X(2),G()),e&2){let e=t.$implicit;I(),Qg(`background`,e.color),I(),Q(` `,e.kind,` `)}}function zO(e,t){if(e&1&&(W(0,`span`,15),X(1),G()),e&2){let e=t.$implicit;Qg(`border-color`,Y(3).kindColor(e.kind)),I(),T_(` `,e.count,` `,e.kind,``,e.count===1?``:`s`,` `)}}function BO(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · `,e.detail,` `)}}function VO(e,t){if(e&1&&(W(0,`div`,13)(1,`div`,16)(2,`span`,17),X(3),G(),W(4,`span`,18),X(5),G()(),W(6,`div`,19),X(7),R(8,BO,1,1),G()()),e&2){let e=t.$implicit,n=Y(3);I(2),Qg(`background`,n.kindColor(e.kind)),I(),Q(` `,e.kind,` `),I(2),Z(e.name),I(2),w_(` `,e.file,`:`,e.line,` `),I(),z(e.detail?8:-1)}}function HO(e,t){if(e&1&&(W(0,`div`,8),B(1,RO,3,3,`span`,9,PO),G(),W(3,`div`,10),B(4,zO,2,5,`span`,11,PO),G(),W(6,`div`,12),B(7,VO,9,7,`div`,13,FO),G()),e&2){let e=Y(2);I(),V(e.kindLegend),I(3),V(e.groupedEntries()),I(3),V(e.filteredEntries())}}function UO(e,t){e&1&&R(0,LO,5,0,`div`,5)(1,HO,9,0),e&2&&z(Y().sourceEntries().length===0?0:1)}function WO(e,t){e&1&&(W(0,`div`,5)(1,`p`,6),X(2,`No NgRx store connection detected.`),G(),W(3,`p`,7),X(4,` Runtime inspection requires @ngrx/store-devtools to be configured in your app. The store devtools use the Redux DevTools protocol to expose state. `),G()())}function GO(e,t){if(e&1){let e=K();W(0,`div`,28),J(`click`,function(){let t=N(e).$implicit;return P(Y(3).selectedAction.set(t))}),W(1,`div`,29),X(2),G(),W(3,`div`,30),X(4),G()()}if(e&2){let e=t.$implicit,n=Y(3);$g(`selected`,n.selectedAction()===e),I(2),Z(e.type),I(2),Z(n.formatTime(e.timestamp))}}function KO(e,t){e&1&&(W(0,`p`,6),X(1,`No actions dispatched yet.`),G())}function qO(e,t){if(e&1&&(W(0,`dt`),X(1,`Payload`),G(),W(2,`dd`)(3,`pre`),X(4),M_(5,`json`),G()()),e&2){let e=Y(4);I(4),Z(P_(5,1,e.selectedAction().payload))}}function JO(e,t){if(e&1&&(W(0,`aside`,27)(1,`h3`),X(2),G(),W(3,`dl`)(4,`dt`),X(5,`Type`),G(),W(6,`dd`),X(7),G(),W(8,`dt`),X(9,`Time`),G(),W(10,`dd`),X(11),G(),R(12,qO,6,3),G()()),e&2){let e=Y(3);I(2),Z(e.selectedAction().type),I(5),Z(e.selectedAction().type),I(4),Z(e.formatTime(e.selectedAction().timestamp)),I(),z(e.selectedAction().payload===void 0?-1:12)}}function YO(e,t){if(e&1&&(W(0,`div`,20)(1,`section`,21)(2,`h3`),X(3,`Current State`),G(),W(4,`pre`,22),X(5),M_(6,`json`),G()(),W(7,`section`,23)(8,`h3`),X(9,` Recent Actions `),W(10,`span`,24),X(11),G()(),W(12,`div`,25),B(13,GO,5,4,`div`,26,$h,!1,KO,2,0,`p`,6),G()()(),R(16,JO,13,4,`aside`,27)),e&2){let e=Y(2);I(5),Z(P_(6,4,e.runtimeState()?.state)),I(6),Z(e.filteredActions().length),I(2),V(e.filteredActions()),I(3),z(e.selectedAction()?16:-1)}}function XO(e,t){e&1&&R(0,WO,5,0,`div`,5)(1,YO,17,6),e&2&&z(+!!Y().runtimeState()?.connected)}var ZO={action:`#f59e0b`,reducer:`#a78bfa`,effect:`#fb923c`,selector:`#60a5fa`,feature:`#34d399`,"store-setup":`#94a3b8`,"signal-store":`#e879f9`,"signal-state":`#22d3ee`,"signal-method":`#fb7185`},QO=class e{rpc=Z_(null);filter=F(``);mode=F(`source`);sourceEntries=F([]);runtimeState=F(null);selectedAction=F(null);kindLegend=Object.entries(ZO).map(([e,t])=>({kind:e,color:t}));filteredEntries=$(()=>{let e=this.filter().toLowerCase();return this.sourceEntries().filter(t=>t.name.toLowerCase().includes(e)||t.kind.toLowerCase().includes(e))});groupedEntries=$(()=>{let e=this.sourceEntries(),t=new Map;for(let n of e)t.set(n.kind,(t.get(n.kind)??0)+1);return[...t.entries()].map(([e,t])=>({kind:e,count:t}))});filteredActions=$(()=>{let e=this.filter().toLowerCase(),t=[...this.runtimeState()?.actions??[]].reverse();return e?t.filter(t=>t.type.toLowerCase().includes(e)):t});constructor(){tc(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);t.rpc.call(`get-ngrx-store`).then(e=>{this.sourceEntries.set(e),e.length===0&&this.mode.set(`runtime`)}).catch(()=>this.sourceEntries.set([])),t.rpc.sharedState(`ngrx-store`).then(e=>{e?.subscribe&&e.subscribe(e=>this.runtimeState.set(e))})})}kindColor(e){return ZO[e]??`#71717a`}formatTime(e){return new Date(e).toLocaleTimeString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-store-inspector`]],inputs:{rpc:[1,`rpc`]},decls:10,vars:8,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by name or kind…`,3,`input`,`value`],[1,`toggle-group`],[3,`click`],[1,`live-dot`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`legend`],[1,`legend-item`],[1,`summary`],[1,`summary-badge`,3,`border-color`],[1,`nodes`],[1,`node-card`],[1,`dot`],[1,`summary-badge`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`runtime-layout`],[1,`state-panel`],[1,`state-tree`],[1,`actions-panel`],[1,`action-count`],[1,`action-list`],[1,`action-card`,3,`selected`],[1,`detail-panel`],[1,`action-card`,3,`click`],[1,`action-type`],[1,`action-time`]],template:function(e,t){e&1&&(W(0,`div`,0)(1,`input`,1),J(`input`,function(e){return t.filter.set(e.target.value)}),G(),W(2,`div`,2)(3,`button`,3),J(`click`,function(){return t.mode.set(`source`)}),X(4,`Source`),G(),W(5,`button`,3),J(`click`,function(){return t.mode.set(`runtime`)}),X(6,` Runtime `),R(7,IO,1,0,`span`,4),G()()(),R(8,UO,2,1),R(9,XO,2,1)),e&2&&(I(),q(`value`,t.filter()),I(2),$g(`active`,t.mode()===`source`),I(2),$g(`active`,t.mode()===`runtime`),I(2),z(t.runtimeState()?.connected?7:-1),I(),z(t.mode()===`source`?8:-1),I(),z(t.mode()===`runtime`?9:-1))},dependencies:[py],styles:[`.toolbar[_ngcontent-%COMP%] { display: flex; gap: 12px; align-items: center; @@ -1756,7 +1756,7 @@ font-size: 12px; white-space: pre-wrap; word-break: break-all; - }`]})},AO={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},jO={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`};function MO(e,t,n){return e?e.scope(`ng-devtools`).rpc.call(t,...n===void 0?[]:[n]).then(e=>e,()=>null):Promise.resolve(null)}async function NO(e,t){return await MO(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function PO(e){return`${e.ok?e.message??`Done.`:e.error??`Failed.`}${e.skipped?.length?` Skipped: ${e.skipped.map(e=>`${e.path} (${e.reason})`).join(`, `)}.`:``}${e.status?` Status: ${e.status}.`:``}`}function FO(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(/`/g,``).replace(/\*\*/g,``)}function IO(e,t){if(e&1){let e=K();W(0,`label`,4),X(1),G(),W(2,`input`,5),J(`input`,function(t){return N(e),P(Y().draft.set(t.target.value))})(`keydown.enter`,function(){return N(e),P(Y().setValue())}),G(),W(3,`button`,2),J(`click`,function(){return N(e),P(Y().setValue())}),X(4,`Set`),G()}if(e&2){let e=Y();I(),Q(`New value for `,e.node().path),I(),q(`value`,e.draft())}}var LO=class e{form=k_.required();node=k_.required();version=k_(0);rpc=k_(null);text=F(``);target=$(()=>`${this.form().id}|${this.node().path}`);draft=C_({source:this.target,computation:()=>``});message=C_({source:this.target,computation:()=>``});constructor(){$s(()=>{let e=this.form().id,t=this.node().path;this.version();let n=this.rpc();x_(()=>this.load(n,e,t))})}async load(e,t,n){let r=await MO(e,`forms-explain`,{kind:`field`,form:t,path:n});this.form().id===t&&this.node().path===n&&this.text.set(FO(r))}async act(e){let t=await NO(this.rpc(),{action:e,formId:this.form().id,path:this.node().path});this.message.set(t.expression?`${PO(t)} ${t.expression}`:PO(t))}async setValue(){let e=this.draft(),t=e;try{t=JSON.parse(e)}catch{t=e}let n=await NO(this.rpc(),{action:`set-value`,formId:this.form().id,path:this.node().path,value:t,mode:`user`});this.message.set(PO(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-forms-field-detail`]],inputs:{form:[1,`form`],node:[1,`node`],version:[1,`version`],rpc:[1,`rpc`]},decls:16,vars:4,consts:[[1,`explain`],[1,`row`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[`for`,`field-value`,1,`sr-only`],[`id`,`field-value`,`type`,`text`,`placeholder`,`New value (JSON or text)`,1,`field-input`,3,`input`,`keydown.enter`,`value`]],template:function(e,t){e&1&&(W(0,`h3`),X(1),G(),W(2,`pre`,0),X(3),G(),W(4,`div`,1),R(5,IO,5,2),W(6,`button`,2),J(`click`,function(){return t.act(`focus`)}),X(7,`Focus`),G(),W(8,`button`,2),J(`click`,function(){return t.act(`mark-touched`)}),X(9,`Touch`),G(),W(10,`button`,2),J(`click`,function(){return t.act(`revalidate`)}),X(11,`Revalidate`),G(),W(12,`button`,2),J(`click`,function(){return t.act(`store-as-global`)}),X(13,`Store as global`),G()(),W(14,`p`,3),X(15),G()),e&2&&(I(),Z(t.node().path||`(form)`),I(2),Z(t.text()||`Loading…`),I(2),z(t.node().type===`control`&&!t.node().redacted?5:-1),I(10),Z(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { + }`]})},$O={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},ek={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`};function tk(e,t,n){return e?e.scope(`ng-devtools`).rpc.call(t,...n===void 0?[]:[n]).then(e=>e,()=>null):Promise.resolve(null)}async function nk(e,t){return await tk(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function rk(e){return`${e.ok?e.message??`Done.`:e.error??`Failed.`}${e.skipped?.length?` Skipped: ${e.skipped.map(e=>`${e.path} (${e.reason})`).join(`, `)}.`:``}${e.status?` Status: ${e.status}.`:``}`}function ik(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(/`/g,``).replace(/\*\*/g,``)}function ak(e,t){if(e&1){let e=K();W(0,`label`,4),X(1),G(),W(2,`input`,5),J(`input`,function(t){return N(e),P(Y().draft.set(t.target.value))})(`keydown.enter`,function(){return N(e),P(Y().setValue())}),G(),W(3,`button`,2),J(`click`,function(){return N(e),P(Y().setValue())}),X(4,`Set`),G()}if(e&2){let e=Y();I(),Q(`New value for `,e.node().path),I(),q(`value`,e.draft())}}var ok=class e{form=Z_.required();node=Z_.required();version=Z_(0);rpc=Z_(null);text=F(``);target=$(()=>`${this.form().id}|${this.node().path}`);draft=G_({source:this.target,computation:()=>``});message=G_({source:this.target,computation:()=>``});constructor(){tc(()=>{let e=this.form().id,t=this.node().path;this.version();let n=this.rpc();U_(()=>this.load(n,e,t))})}async load(e,t,n){let r=await tk(e,`forms-explain`,{kind:`field`,form:t,path:n});this.form().id===t&&this.node().path===n&&this.text.set(ik(r))}async act(e){let t=await nk(this.rpc(),{action:e,formId:this.form().id,path:this.node().path});this.message.set(t.expression?`${rk(t)} ${t.expression}`:rk(t))}async setValue(){let e=this.draft(),t=e;try{t=JSON.parse(e)}catch{t=e}let n=await nk(this.rpc(),{action:`set-value`,formId:this.form().id,path:this.node().path,value:t,mode:`user`});this.message.set(rk(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-forms-field-detail`]],inputs:{form:[1,`form`],node:[1,`node`],version:[1,`version`],rpc:[1,`rpc`]},decls:16,vars:4,consts:[[1,`explain`],[1,`row`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[`for`,`field-value`,1,`sr-only`],[`id`,`field-value`,`type`,`text`,`placeholder`,`New value (JSON or text)`,1,`field-input`,3,`input`,`keydown.enter`,`value`]],template:function(e,t){e&1&&(W(0,`h3`),X(1),G(),W(2,`pre`,0),X(3),G(),W(4,`div`,1),R(5,ak,5,2),W(6,`button`,2),J(`click`,function(){return t.act(`focus`)}),X(7,`Focus`),G(),W(8,`button`,2),J(`click`,function(){return t.act(`mark-touched`)}),X(9,`Touch`),G(),W(10,`button`,2),J(`click`,function(){return t.act(`revalidate`)}),X(11,`Revalidate`),G(),W(12,`button`,2),J(`click`,function(){return t.act(`store-as-global`)}),X(13,`Store as global`),G()(),W(14,`p`,3),X(15),G()),e&2&&(I(),Z(t.node().path||`(form)`),I(2),Z(t.text()||`Loading…`),I(2),z(t.node().type===`control`&&!t.node().redacted?5:-1),I(10),Z(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; } .small[_ngcontent-%COMP%] { @@ -1845,7 +1845,7 @@ overflow: hidden; clip-path: inset(50%); white-space: nowrap; - }`]})};function RO(e,t){e&1&&(W(0,`p`,0),X(1,`Checking…`),G())}function zO(e,t){e&1&&(W(0,`p`,0),X(1,`No problems found. For generic accessibility, run axe on the page.`),G())}function BO(e,t){if(e&1&&(W(0,`span`,0),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`at `,e.path)}}function VO(e,t){if(e&1&&(W(0,`li`)(1,`span`,2),X(2),G(),W(3,`code`),X(4),G(),R(5,BO,2,1,`span`,0),W(6,`div`),X(7),G(),W(8,`div`,0),X(9),G()()),e&2){let e=t.$implicit;I(),L(`data-tone`,e.severity===`info`?``:e.severity===`error`?`bad`:`warn`),I(),Z(e.severity),I(2),Z(e.rule),I(),z(e.path?5:-1),I(2),Z(e.message),I(2),Q(`Fix: `,e.fix)}}function HO(e,t){if(e&1&&(W(0,`ul`,1),B(1,VO,10,6,`li`,null,jh),G()),e&2){let e=Y();I(),V(e.findings())}}var UO=class e{formId=k_.required();version=k_(0);rpc=k_(null);submit=F(``);payload=F(``);message=F(``);constructor(){$s(()=>{let e=this.formId();this.version();let t=this.rpc();x_(async()=>{let[n,r]=await Promise.all([MO(t,`forms-explain`,{kind:`submit`,form:e}),MO(t,`forms-explain`,{kind:`payload`,form:e})]);this.formId()===e&&(this.submit.set(FO(n)),this.payload.set(FO(r)))})})}async copyFixture(){let e=(await MO(this.rpc(),`forms-explain`,{kind:`fixture`,form:this.formId()})??``).match(/```ts\n([\s\S]*?)```/)?.[1];if(!e){this.message.set(`No test fixture is available for this form.`);return}try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-forms-submit`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:13,vars:3,consts:[[1,`explain`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`]],template:function(e,t){e&1&&(W(0,`h3`),X(1,`Submit`),G(),W(2,`pre`,0),X(3),G(),W(4,`h3`),X(5,`Payload`),G(),W(6,`pre`,0),X(7),G(),W(8,`div`)(9,`button`,1),J(`click`,function(){return t.copyFixture()}),X(10,`Copy test fixture`),G(),W(11,`span`,2),X(12),G()()),e&2&&(I(3),Z(t.submit()||`Loading…`),I(4),Z(t.payload()||`Loading…`),I(5),Z(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { + }`]})};function sk(e,t){e&1&&(W(0,`p`,0),X(1,`Checking…`),G())}function ck(e,t){e&1&&(W(0,`p`,0),X(1,`No problems found. For generic accessibility, run axe on the page.`),G())}function lk(e,t){if(e&1&&(W(0,`span`,0),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`at `,e.path)}}function uk(e,t){if(e&1&&(W(0,`li`)(1,`span`,2),X(2),G(),W(3,`code`),X(4),G(),R(5,lk,2,1,`span`,0),W(6,`div`),X(7),G(),W(8,`div`,0),X(9),G()()),e&2){let e=t.$implicit;I(),L(`data-tone`,e.severity===`info`?``:e.severity===`error`?`bad`:`warn`),I(),Z(e.severity),I(2),Z(e.rule),I(),z(e.path?5:-1),I(2),Z(e.message),I(2),Q(`Fix: `,e.fix)}}function dk(e,t){if(e&1&&(W(0,`ul`,1),B(1,uk,10,6,`li`,null,$h),G()),e&2){let e=Y();I(),V(e.findings())}}var fk=class e{formId=Z_.required();version=Z_(0);rpc=Z_(null);submit=F(``);payload=F(``);message=F(``);constructor(){tc(()=>{let e=this.formId();this.version();let t=this.rpc();U_(async()=>{let[n,r]=await Promise.all([tk(t,`forms-explain`,{kind:`submit`,form:e}),tk(t,`forms-explain`,{kind:`payload`,form:e})]);this.formId()===e&&(this.submit.set(ik(n)),this.payload.set(ik(r)))})})}async copyFixture(){let e=(await tk(this.rpc(),`forms-explain`,{kind:`fixture`,form:this.formId()})??``).match(/```ts\n([\s\S]*?)```/)?.[1];if(!e){this.message.set(`No test fixture is available for this form.`);return}try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-forms-submit`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:13,vars:3,consts:[[1,`explain`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`]],template:function(e,t){e&1&&(W(0,`h3`),X(1,`Submit`),G(),W(2,`pre`,0),X(3),G(),W(4,`h3`),X(5,`Payload`),G(),W(6,`pre`,0),X(7),G(),W(8,`div`)(9,`button`,1),J(`click`,function(){return t.copyFixture()}),X(10,`Copy test fixture`),G(),W(11,`span`,2),X(12),G()()),e&2&&(I(3),Z(t.submit()||`Loading…`),I(4),Z(t.payload()||`Loading…`),I(5),Z(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; } .small[_ngcontent-%COMP%] { @@ -1919,7 +1919,7 @@ } .status[_ngcontent-%COMP%] { margin-left: 8px; - }`]})},WO=class e{formId=k_.required();version=k_(0);rpc=k_(null);findings=F(null);constructor(){$s(()=>{let e=this.formId();this.version();let t=this.rpc();x_(async()=>{let n=await MO(t,`forms-lint`,{form:e});this.formId()===e&&this.findings.set(n??[])})})}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-forms-lint`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:3,vars:1,consts:[[1,`muted`],[1,`findings`],[1,`tag`]],template:function(e,t){e&1&&R(0,RO,2,0,`p`,0)(1,zO,2,0,`p`,0)(2,HO,3,0,`ul`,1),e&2&&z(t.findings()===null?0:t.findings().length?2:1)},styles:[`.muted[_ngcontent-%COMP%] { + }`]})},pk=class e{formId=Z_.required();version=Z_(0);rpc=Z_(null);findings=F(null);constructor(){tc(()=>{let e=this.formId();this.version();let t=this.rpc();U_(async()=>{let n=await tk(t,`forms-lint`,{form:e});this.formId()===e&&this.findings.set(n??[])})})}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-forms-lint`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:3,vars:1,consts:[[1,`muted`],[1,`findings`],[1,`tag`]],template:function(e,t){e&1&&R(0,sk,2,0,`p`,0)(1,ck,2,0,`p`,0)(2,dk,3,0,`ul`,1),e&2&&z(t.findings()===null?0:t.findings().length?2:1)},styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; } .small[_ngcontent-%COMP%] { @@ -1998,7 +1998,7 @@ } code[_ngcontent-%COMP%] { color: #c4b5fd; - }`]})},GO=()=>[],KO=(e,t)=>t.formId+`#`+t.seq;function qO(e,t){if(e&1){let e=K();W(0,`label`)(1,`input`,6),J(`change`,function(){let t=N(e).$implicit;return P(Y().filter.set(t))}),G(),X(2),G()}if(e&2){let e=t.$implicit,n=Y();I(),q(`value`,e)(`checked`,e===n.filter()),I(),Q(` `,e,` `)}}function JO(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;L(`data-tone`,e.outcome===`ran`?``:`bad`),I(),Z(e.outcome)}}function YO(e,t){if(e&1&&(W(0,`span`,5),X(1),G(),X(2,` → `)),e&2){let e=Y().$implicit;I(),Z(e.prev)}}function XO(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`×`,e.count)}}function ZO(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.origin)}}function QO(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;L(`data-tone`,e.ms>1e3?`warn`:``),I(),Q(`pending `,e.ms,`ms`)}}function $O(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;L(`data-tone`,e.renders>20?`warn`:``),I(),n_(``,e.renders,` renders: `,(e.rendered??a_(3,GO)).join(`, `))}}function ek(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`from `,e.caller)}}function tk(e,t){if(e&1&&(W(0,`li`)(1,`time`),X(2),G(),W(3,`code`),X(4),G(),W(5,`span`,7),X(6),G(),R(7,JO,2,2,`span`,8),W(8,`span`,9),R(9,YO,3,1),X(10),G(),R(11,XO,2,1,`span`,8),R(12,ZO,2,1,`span`,8),R(13,QO,2,2,`span`,8),R(14,$O,2,4,`span`,8),R(15,ek,2,1,`span`,10),G()),e&2){let e=t.$implicit,n=Y(2);L(`data-type`,e.type),I(2),Z(n.time(e.timestamp)),I(2),Z(e.path||`(form)`),I(2),Z(e.type),I(),z(e.outcome?7:-1),I(2),z(e.prev===void 0?-1:9),I(),Q(` `,e.detail,` `),I(),z(e.count&&e.count>1?11:-1),I(),z(e.origin?12:-1),I(),z(e.ms===void 0?-1:13),I(),z(e.renders?14:-1),I(),z(e.caller?15:-1)}}function nk(e,t){if(e&1&&(W(0,`ol`,4),B(1,tk,16,12,`li`,null,KO),G()),e&2){let e=Y();I(),V(e.shown())}}function rk(e,t){e&1&&(W(0,`p`,5),X(1,`No changes yet. Type into the form to see them here.`),G())}var ik=[`all`,`user`,`code`,`devtools`],ak=class e{events=k_.required();recording=k_(!1);record=E_();origins=ik;filter=F(`all`);shown=$(()=>{let e=this.filter();return this.events().filter(t=>e===`all`||t.origin===e).slice(-100).reverse()});time(e){return new Date(e).toLocaleTimeString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-forms-timeline`]],inputs:{events:[1,`events`],recording:[1,`recording`]},outputs:{record:`record`},decls:10,vars:2,consts:[[1,`record`],[`type`,`checkbox`,3,`change`,`checked`],[1,`chips`],[1,`sr-only`],[1,`events`],[1,`muted`],[`type`,`radio`,`name`,`timeline-origin`,3,`change`,`value`,`checked`],[1,`event-type`],[1,`tag`],[1,`detail`],[1,`caller`]],template:function(e,t){e&1&&(W(0,`label`,0)(1,`input`,1),J(`change`,function(){return t.record.emit(!t.recording())}),G(),X(2,` Record calling code, validator changes and renders per keystroke `),G(),W(3,`fieldset`,2)(4,`legend`,3),X(5,`Show changes from`),G(),B(6,qO,3,3,`label`,null,Mh),G(),R(8,nk,3,0,`ol`,4)(9,rk,2,0,`p`,5)),e&2&&(I(),q(`checked`,t.recording()),I(5),V(t.origins),I(2),z(t.shown().length?8:9))},styles:[`.muted[_ngcontent-%COMP%] { + }`]})},mk=()=>[],hk=(e,t)=>t.formId+`#`+t.seq;function gk(e,t){if(e&1){let e=K();W(0,`label`)(1,`input`,6),J(`change`,function(){let t=N(e).$implicit;return P(Y().filter.set(t))}),G(),X(2),G()}if(e&2){let e=t.$implicit,n=Y();I(),q(`value`,e)(`checked`,e===n.filter()),I(),Q(` `,e,` `)}}function _k(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;L(`data-tone`,e.outcome===`ran`?``:`bad`),I(),Z(e.outcome)}}function vk(e,t){if(e&1&&(W(0,`span`,5),X(1),G(),X(2,` → `)),e&2){let e=Y().$implicit;I(),Z(e.prev)}}function yk(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`×`,e.count)}}function bk(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.origin)}}function xk(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;L(`data-tone`,e.ms>1e3?`warn`:``),I(),Q(`pending `,e.ms,`ms`)}}function Sk(e,t){if(e&1&&(W(0,`span`,8),X(1),G()),e&2){let e=Y().$implicit;L(`data-tone`,e.renders>20?`warn`:``),I(),w_(``,e.renders,` renders: `,(e.rendered??D_(3,mk)).join(`, `))}}function Ck(e,t){if(e&1&&(W(0,`span`,10),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`from `,e.caller)}}function wk(e,t){if(e&1&&(W(0,`li`)(1,`time`),X(2),G(),W(3,`code`),X(4),G(),W(5,`span`,7),X(6),G(),R(7,_k,2,2,`span`,8),W(8,`span`,9),R(9,vk,3,1),X(10),G(),R(11,yk,2,1,`span`,8),R(12,bk,2,1,`span`,8),R(13,xk,2,2,`span`,8),R(14,Sk,2,4,`span`,8),R(15,Ck,2,1,`span`,10),G()),e&2){let e=t.$implicit,n=Y(2);L(`data-type`,e.type),I(2),Z(n.time(e.timestamp)),I(2),Z(e.path||`(form)`),I(2),Z(e.type),I(),z(e.outcome?7:-1),I(2),z(e.prev===void 0?-1:9),I(),Q(` `,e.detail,` `),I(),z(e.count&&e.count>1?11:-1),I(),z(e.origin?12:-1),I(),z(e.ms===void 0?-1:13),I(),z(e.renders?14:-1),I(),z(e.caller?15:-1)}}function Tk(e,t){if(e&1&&(W(0,`ol`,4),B(1,wk,16,12,`li`,null,hk),G()),e&2){let e=Y();I(),V(e.shown())}}function Ek(e,t){e&1&&(W(0,`p`,5),X(1,`No changes yet. Type into the form to see them here.`),G())}var Dk=[`all`,`user`,`code`,`devtools`],Ok=class e{events=Z_.required();recording=Z_(!1);record=J_();origins=Dk;filter=F(`all`);shown=$(()=>{let e=this.filter();return this.events().filter(t=>e===`all`||t.origin===e).slice(-100).reverse()});time(e){return new Date(e).toLocaleTimeString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-forms-timeline`]],inputs:{events:[1,`events`],recording:[1,`recording`]},outputs:{record:`record`},decls:10,vars:2,consts:[[1,`record`],[`type`,`checkbox`,3,`change`,`checked`],[1,`chips`],[1,`sr-only`],[1,`events`],[1,`muted`],[`type`,`radio`,`name`,`timeline-origin`,3,`change`,`value`,`checked`],[1,`event-type`],[1,`tag`],[1,`detail`],[1,`caller`]],template:function(e,t){e&1&&(W(0,`label`,0)(1,`input`,1),J(`change`,function(){return t.record.emit(!t.recording())}),G(),X(2,` Record calling code, validator changes and renders per keystroke `),G(),W(3,`fieldset`,2)(4,`legend`,3),X(5,`Show changes from`),G(),B(6,gk,3,3,`label`,null,eg),G(),R(8,Tk,3,0,`ol`,4)(9,Ek,2,0,`p`,5)),e&2&&(I(),q(`checked`,t.recording()),I(5),V(t.origins),I(2),z(t.shown().length?8:9))},styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; } .small[_ngcontent-%COMP%] { @@ -2126,7 +2126,7 @@ font-family: ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; - }`]})},ok=()=>[],sk=(e,t)=>t.id,ck=(e,t)=>t.node.path;function lk(e,t){e&1&&(H(0,`p`,0),X(1,`Connecting…`),U())}function uk(e,t){e&1&&(H(0,`p`,0),X(1,`Could not load forms from the devtools server. Reload to try again.`),U())}function dk(e,t){e&1&&(H(0,`p`,0),X(1,`Loading forms…`),U())}function fk(e,t){e&1&&(H(0,`div`,0)(1,`p`),X(2,`No forms on the page yet.`),U(),H(3,`p`,2),X(4,` Open a page that renders a form. Signal Forms, reactive and template-driven forms all show up here, in development builds. `),U()())}function pk(e,t){e&1&&(H(0,`span`,10),X(1),H(2,`span`,9),X(3,` errors`),U()()),e&2&&(I(),Z(t))}function mk(e,t){if(e&1){let e=K();H(0,`li`)(1,`button`,5),cg(`click`,function(){let t=N(e).$implicit;return P(Y(2).selectForm(t.id))}),Wh(2,`span`,6),H(3,`span`,7),X(4),U(),H(5,`span`,8),X(6),H(7,`span`,9),X(8),U()(),R(9,pk,4,1,`span`,10),U()()}if(e&2){let e,n=t.$implicit,r=Y(2);I(),jg(`active`,n.id===r.selected()?.id),L(`aria-current`,n.id===r.selected()?.id?`true`:null),I(),L(`data-status`,n.root.status),I(2),Z(n.label),I(2),n_(``,r.kindLabel(n.kind),` · `,n.id,` `),I(2),Q(`, `,n.root.status),I(),z((e=r.counts().get(n.id)?.errors)?9:-1,e)}}function hk(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y();I(),Z(e.submitted?`submitted`:`not submitted`)}}function gk(e,t){e&1&&(H(0,`span`),X(1,`submitting`),U())}function _k(e,t){if(e&1){let e=K();H(0,`button`,14),cg(`click`,function(){return N(e),P(Y(3).confirmAct(`restore`))}),X(1),U()}if(e&2){let e=Y(3);I(),Q(` `,e.armed()===`restore`?`Confirm restore`:`Restore `+e.snapshot(),` `)}}function vk(e,t){if(e&1){let e=K();H(0,`button`,22),cg(`click`,function(){let t=N(e).$implicit;return P(Y(3).tab_.set(t.id))}),X(1),U()}if(e&2){let e=t.$implicit,n=Y(3);Vh(`id`,`forms-tab-`+e.id),L(`aria-selected`,e.id===n.tab_())(`aria-controls`,`forms-panel-`+e.id)(`tabindex`,e.id===n.tab_()?0:-1),I(),Q(` `,e.label,` `)}}function yk(e,t){if(e&1){let e=K();H(0,`label`)(1,`input`,29),cg(`change`,function(){let t=N(e).$implicit;return P(Y(4).toggleChip(t.id))}),U(),X(2),U()}if(e&2){let e=t.$implicit,n=Y(4);I(),Vh(`checked`,n.active().has(e.id)),I(),Q(` `,e.label,` `)}}function bk(e,t){if(e&1&&(H(0,`div`,2),X(1,` typed `),H(2,`code`),X(3),u_(4,`json`),U(),X(5,`, not in the model yet `),U()),e&2){let e=Y(2).$implicit;I(3),Z(f_(4,1,e.node.uncommitted))}}function xk(e,t){if(e&1&&(H(0,`div`,2),X(1,` resets to `),H(2,`code`),X(3),u_(4,`json`),U()()),e&2){let e=Y(2).$implicit;I(3),Z(f_(4,1,e.node.defaultValue))}}function Sk(e,t){if(e&1&&(H(0,`code`),X(1),u_(2,`json`),U(),R(3,bk,6,3,`div`,2),R(4,xk,5,3,`div`,2)),e&2){let e=Y().$implicit;I(),Z(f_(2,3,e.node.value)),I(2),z(e.node.uncommitted===void 0?-1:3),I(),z(e.node.defaultValue===void 0?-1:4)}}function Ck(e,t){e&1&&(H(0,`span`,2),X(1,`not created yet`),U())}function wk(e,t){if(e&1&&(H(0,`span`,12),X(1),U()),e&2){let e=Y().$implicit;L(`data-status`,e.node.status),I(),Z(e.node.status)}}function Tk(e,t){e&1&&(H(0,`span`),X(1,`touched`),U())}function Ek(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Z(e.node.changed===!1?`dirty, unchanged`:`dirty`)}}function Dk(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`not validated (`,e.node.skipped,`)`)}}function Ok(e,t){if(e&1&&(H(0,`span`,36),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`stale: `,e.node.stale.join(`, `))}}function kk(e,t){e&1&&(H(0,`span`,36),X(1,`view out of sync`),U())}function Ak(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`redacted (`,e.node.redacted,`)`)}}function jk(e,t){e&1&&(H(0,`span`),X(1,`required`),U())}function Mk(e,t){e&1&&(H(0,`span`),X(1,`readonly`),U())}function Nk(e,t){e&1&&(H(0,`span`),X(1,`hidden`),U())}function Pk(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`updates on `,e.node.updateOn)}}function Fk(e,t){e&1&&(H(0,`span`),X(1,`debouncing`),U())}function Ik(e,t){e&1&&(H(0,`span`),X(1,`validators`),U())}function Lk(e,t){e&1&&(H(0,`span`),X(1,`async validator`),U())}function Rk(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=t.$implicit;I(),Z(e)}}function zk(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Z(e.node.accessor)}}function Bk(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=t.$implicit;I(),Q(`disabled: `,e)}}function Vk(e,t){if(e&1&&(H(0,`span`,40),X(1),U()),e&2){let e=Y().$implicit,t=Y(5);I(),Z(t.sourceText(e))}}function Hk(e,t){if(e&1&&(H(0,`div`),X(1),H(2,`code`,39),X(3),U(),R(4,Vk,2,1,`span`,40),U()),e&2){let e=t.$implicit,n=Y().$implicit,r=Y(4);I(),Q(` `,r.errorText(n.node,e),` `),I(2),Z(e.kind),I(),z(e.source?4:-1)}}function Uk(e,t){e&1&&(H(0,`div`,38),X(1,`not shown to the user`),U())}function Wk(e,t){if(e&1&&(H(0,`tr`)(1,`td`,41),X(2),U()()),e&2){let e=Y().$implicit;I(),Ag(`padding-left`,24+e.depth*16,`px`),I(),n_(` `,e.node.truncated,` more fields under `,e.node.path||`the form`,` not shown `)}}function Gk(e,t){if(e&1){let e=K();H(0,`tr`,30),cg(`mouseenter`,function(){let t=N(e).$implicit,n=Y(2);return P(Y(2).highlight(n.id,t.node.path))})(`mouseleave`,function(){return N(e),P(Y(4).highlight(null,``))}),H(1,`th`,31)(2,`button`,32),cg(`focus`,function(){let t=N(e).$implicit,n=Y(2);return P(Y(2).highlight(n.id,t.node.path))})(`blur`,function(){return N(e),P(Y(4).highlight(null,``))})(`click`,function(){let t=N(e).$implicit;return P(Y(4).fieldPath.set(t.node.path))}),X(3),U(),H(4,`span`,33),X(5),U()(),H(6,`td`,34),R(7,Sk,5,5),U(),H(8,`td`),R(9,Ck,2,0,`span`,2)(10,wk,2,2,`span`,12),U(),H(11,`td`,35),R(12,Tk,2,0,`span`),R(13,Ek,2,1,`span`),R(14,Dk,2,1,`span`),R(15,Ok,2,1,`span`,36),R(16,kk,2,0,`span`,36),R(17,Ak,2,1,`span`),R(18,jk,2,0,`span`),R(19,Mk,2,0,`span`),R(20,Nk,2,0,`span`),R(21,Pk,2,1,`span`),R(22,Fk,2,0,`span`),R(23,Ik,2,0,`span`),R(24,Lk,2,0,`span`),B(25,Rk,2,1,`span`,null,Mh),R(27,zk,2,1,`span`),B(28,Bk,2,1,`span`,null,jh),U(),H(30,`td`,37),B(31,Hk,5,3,`div`,null,jh),R(33,Uk,2,0,`div`,38),U()(),R(34,Wk,3,4,`tr`)}if(e&2){let e=t.$implicit,n=Y(4);jg(`invalid`,e.node.errors.length),I(),Ag(`padding-left`,8+e.depth*16,`px`),I(),L(`aria-label`,`Highlight `+(e.node.path||`the form`)+` on the page`)(`aria-pressed`,e.node.path===n.fieldPath()),I(),Q(` `,e.node.key||`(form)`,` `),I(2),Z(e.node.type),I(2),z(e.node.type===`control`?7:-1),I(2),z(e.node.materialized===!1?9:10),I(3),z(e.node.touched?12:-1),I(),z(e.node.dirty?13:-1),I(),z(e.node.skipped?14:-1),I(),z(e.node.stale?.length?15:-1),I(),z(e.node.dom?.drift===void 0?-1:16),I(),z(e.node.redacted?17:-1),I(),z(e.node.required?18:-1),I(),z(e.node.readonly?19:-1),I(),z(e.node.hidden?20:-1),I(),z(e.node.updateOn?21:-1),I(),z(e.node.debouncing?22:-1),I(),z(e.node.validators?.sync?23:-1),I(),z(e.node.validators?.async?24:-1),I(),V(n.constraintList(e.node)),I(2),z(e.node.accessor?27:-1),I(),V(e.node.disabledReasons??a_(26,ok)),I(3),V(e.node.errors),I(2),z(e.node.errors.length&&e.node.dom?.errorShown===!1?33:-1),I(),z(e.node.truncated?34:-1)}}function Kk(e,t){e&1&&X(0),e&2&&Q(` No field path matches "`,Y(5).filter(),`". `)}function qk(e,t){e&1&&X(0,` No field matches the selected filters. `)}function Jk(e,t){if(e&1&&(H(0,`tr`)(1,`td`,41),R(2,Kk,1,1)(3,qk,1,0),U()()),e&2){let e=Y(4);I(2),z(e.filter()?2:3)}}function Yk(e,t){if(e&1&&Wh(0,`app-forms-field-detail`,28),e&2){let e=Y(2),n=Y(2);Vh(`form`,e)(`node`,t)(`version`,n.version())(`rpc`,n.rpc())}}function Xk(e,t){if(e&1){let e=K();H(0,`fieldset`,23)(1,`legend`,9),X(2,`Show only fields that are`),U(),B(3,yk,3,2,`label`,null,sk),U(),H(5,`input`,24),cg(`input`,function(t){return N(e),P(Y(3).onFilter(t))}),U(),H(6,`div`,25)(7,`table`,26)(8,`thead`)(9,`tr`)(10,`th`,27),X(11,`Field`),U(),H(12,`th`,27),X(13,`Value`),U(),H(14,`th`,27),X(15,`Status`),U(),H(16,`th`,27),X(17,`State`),U(),H(18,`th`,27),X(19,`Errors`),U()()(),H(20,`tbody`),B(21,Gk,35,27,null,null,ck,!1,Jk,4,1,`tr`),U()()(),R(24,Yk,1,4,`app-forms-field-detail`,28)}if(e&2){let e,t=Y(3);I(3),V(t.chips),I(2),Vh(`value`,t.filter()),I(16),V(t.rows()),I(3),z((e=t.selectedNode())?24:-1,e)}}function Zk(e,t){if(e&1){let e=K();H(0,`app-forms-timeline`,42),cg(`record`,function(t){return N(e),P(Y(3).setRecording(t))}),U()}if(e&2){let e=Y(3);Vh(`events`,e.selectedEvents())(`recording`,e.recording())}}function Qk(e,t){if(e&1&&Wh(0,`app-forms-submit`,21),e&2){let e=Y(),t=Y(2);Vh(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function $k(e,t){if(e&1&&Wh(0,`app-forms-lint`,21),e&2){let e=Y(),t=Y(2);Vh(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function eA(e,t){if(e&1){let e=K();H(0,`section`,4)(1,`div`,11)(2,`span`,12),X(3),U(),H(4,`span`),X(5),U(),H(6,`span`),X(7),U(),R(8,hk,2,1,`span`),R(9,gk,2,0,`span`),H(10,`span`,2),X(11),U()(),H(12,`div`,13)(13,`button`,14),cg(`click`,function(){return N(e),P(Y(2).act(`touch-all`))}),X(14,`Touch all`),U(),H(15,`button`,14),cg(`click`,function(){return N(e),P(Y(2).act(`revalidate`))}),X(16,`Revalidate`),U(),H(17,`button`,14),cg(`click`,function(){return N(e),P(Y(2).act(`focus-first-invalid`))}),X(18,` Focus first invalid `),U(),H(19,`button`,14),cg(`click`,function(){return N(e),P(Y(2).pick())}),X(20,`Pick field on page`),U(),H(21,`button`,14),cg(`click`,function(){return N(e),P(Y(2).act(`snapshot`))}),X(22,`Snapshot`),U(),R(23,_k,2,1,`button`,15),H(24,`button`,14),cg(`click`,function(){return N(e),P(Y(2).confirmAct(`reset`))}),X(25),U(),H(26,`button`,14),cg(`click`,function(){return N(e),P(Y(2).confirmAct(`submit`))}),X(27),U()(),H(28,`p`,16),X(29),U(),H(30,`div`,17),cg(`keydown`,function(t){return N(e),P(Y(2).onKey(t))}),B(31,vk,2,5,`button`,18,sk),U(),H(33,`div`,19),R(34,Xk,25,3)(35,Zk,1,2,`app-forms-timeline`,20)(36,Qk,1,3,`app-forms-submit`,21)(37,$k,1,3,`app-forms-lint`,21),U()()}if(e&2){let e,n=t,r=Y(2);L(`aria-label`,n.label),I(2),L(`data-status`,n.root.status),I(),Z(n.root.status),I(2),Z(n.root.dirty?`dirty`:`pristine`),I(2),Z(n.root.touched?`touched`:`untouched`),I(),z(n.submitted===void 0?-1:8),I(),z(n.root.submitting?9:-1),I(2),n_(``,r.counts().get(n.id)?.fields,` fields, `,r.counts().get(n.id)?.errors,` errors`),I(12),z(r.snapshot()?23:-1),I(2),Q(` `,r.armed()===`reset`?`Confirm reset`:`Reset`,` `),I(2),Q(` `,r.armed()===`submit`?`Confirm submit`:`Submit`,` `),I(2),Z(r.message()),I(2),V(r.tabs),I(2),Vh(`id`,`forms-panel-`+r.tab_()),L(`aria-labelledby`,`forms-tab-`+r.tab_()),I(),z((e=r.tab_())===`fields`?34:e===`timeline`?35:e===`submit`?36:e===`lint`?37:-1)}}function tA(e,t){if(e&1&&(H(0,`div`,1)(1,`ul`,3),B(2,mk,10,9,`li`,null,sk),U(),R(4,eA,38,16,`section`,4),U()),e&2){let e,t=Y();I(2),V(t.forms()),I(2),z((e=t.selected())?4:-1,e)}}var nA=[{id:`fields`,label:`Fields`},{id:`timeline`,label:`Timeline`},{id:`submit`,label:`Submit`},{id:`lint`,label:`Lint`}],rA=[{id:`invalid`,label:`Invalid`},{id:`dirty`,label:`Dirty`},{id:`touched`,label:`Touched`},{id:`disabled`,label:`Disabled`},{id:`hidden-error`,label:`Error not shown`}];function iA(e,t){switch(t){case`invalid`:return e.errors.length>0;case`dirty`:return e.dirty&&e.type===`control`;case`touched`:return e.touched&&e.type===`control`;case`disabled`:return e.status===`DISABLED`;case`hidden-error`:return e.dom?.errorShown===!1}}function aA(e){return e.errors.length+(e.children??[]).reduce((e,t)=>e+aA(t),0)}function oA(e){return 1+(e.children??[]).reduce((e,t)=>e+oA(t),0)}var sA=class e{rpc=k_(null);focus=k_(null);focusHandled=E_();forms=F([]);events=F([]);loading=F(!0);failed=F(!1);selectedId=F(null);instrumented=F([]);recording=$(()=>{let e=this.selected()?.id??``;return this.instrumented().some(t=>e.endsWith(`@${t}`))});filter=F(``);tabs=nA;chips=rA;tab_=F(`fields`);active=F(new Set);fieldPath=F(null);version=F(0);message=F(``);armed=F(null);snapshot=F(null);unsubscribe=null;destroyRef=A(fs);counts=$(()=>new Map(this.forms().map(e=>[e.id,{fields:oA(e.root),errors:aA(e.root)}])));selected=$(()=>{let e=this.forms();return e.find(e=>e.id===this.selectedId())??e[0]??null});rows=$(()=>{let e=this.selected();if(!e)return[];let t=this.filter().toLowerCase(),n=Array.from(this.active()),r=[],i=(e,a)=>{let o=r.length,s=(!t||e.path.toLowerCase().includes(t))&&n.every(t=>iA(e,t));for(let t of e.children??[])s=i(t,a+1)||s;return s&&r.splice(o,0,{node:e,depth:a}),s};return i(e.root,0),r});selectedNode=$(()=>{let e=this.fieldPath(),t=this.selected();if(e===null||!t)return null;let n=t=>t.path===e?t:(t.children??[]).map(n).find(Boolean)??null;return n(t.root)});selectedEvents=$(()=>{let e=this.selected()?.id;return this.events().filter(t=>t.formId===e).slice(-200)});constructor(){$s(()=>{let e=this.rpc();e&&this.load(e)}),$s(()=>{let e=this.focus();e&&x_(()=>{this.selectForm(e.id),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null,``)})}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`forms`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.forms.set(t?.forms??[]),this.events.set(t?.events??[]),this.instrumented.set(t?.instrumented??[]),this.version.update(e=>e+1)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}async pick(){let e=this.selected();if(!e)return;this.message.set(`Click a field in the app (Esc cancels).`);let t=await NO(this.rpc(),{action:`pick`,formId:e.id}),n=t;if(!t.ok||!n.formId){this.message.set(PO(t));return}this.selectForm(n.formId),this.tab_.set(`fields`),this.fieldPath.set(n.path??``),this.message.set(`Picked ${n.path||`(form)`}.`)}async setRecording(e){let t=this.selected();if(!t)return;let n=await NO(this.rpc(),{action:`instrument`,formId:t.id,value:e});this.message.set(PO(n))}selectForm(e){this.selectedId.set(e),this.filter.set(``),this.fieldPath.set(null),this.snapshot.set(null),this.armed.set(null)}toggleChip(e){this.active.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async act(e,t={}){let n=this.selected();if(!n)return;this.armed.set(null);let r=await NO(this.rpc(),{action:e,formId:n.id,...t});r.snapshot&&this.snapshot.set(r.snapshot),this.message.set(PO(r))}confirmAct(e){if(this.armed()!==e){this.armed.set(e),this.message.set(`Press "Confirm ${e}" to ${e} the form in the app.`);return}this.act(e,{confirm:!0,snapshot:this.snapshot()??void 0})}onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.tab_()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.tab_.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#forms-tab-${t[r]}`)?.focus())}sourceText(e){let t=jO[e.source??``]??e.source??``;return e.from===void 0?t:`${t} on ${e.from||`the form`}`}onFilter(e){this.filter.set(e.target.value)}highlight(e,t){let n=this.rpc();n&&n.scope(`ng-devtools`).rpc.callEvent(`request-form-highlight`,e?{formId:e,path:t}:null)}kindLabel(e){return AO[e]}constraintList(e){return Object.entries(e.constraints??{}).map(([e,t])=>`${e} ${t}`)}errorText(e,t){return/^[a-z]/.test(t.message)?`${e.key||`The form`} ${t.message}`:t.message}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-forms-inspector`]],inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:5,vars:1,consts:[[1,`empty`],[1,`layout`],[1,`muted`],[`aria-label`,`Forms on the page`,1,`form-list`],[1,`detail`],[`type`,`button`,1,`form-item`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`label`],[1,`kind`],[1,`sr-only`],[1,`count`],[1,`summary`],[1,`badge`],[`role`,`group`,`aria-label`,`Form actions`,1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`],[`role`,`status`,1,`status`],[`role`,`tablist`,`aria-label`,`Form views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`events`,`recording`],[3,`formId`,`version`,`rpc`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`chips`],[`type`,`search`,`placeholder`,`Filter fields by path`,`aria-label`,`Filter fields by path`,1,`filter`,3,`input`,`value`],[`role`,`region`,`aria-label`,`Fields`,`tabindex`,`0`,1,`table-scroll`],[1,`fields`],[`scope`,`col`],[3,`form`,`node`,`version`,`rpc`],[`type`,`checkbox`,3,`change`,`checked`],[3,`mouseenter`,`mouseleave`],[`scope`,`row`],[`type`,`button`,1,`field`,3,`focus`,`blur`,`click`],[1,`type`],[1,`value`],[1,`flags`],[1,`warn`],[1,`errors`],[1,`unseen`],[1,`kind-tag`],[1,`source`],[`colspan`,`5`,1,`muted`],[3,`record`,`events`,`recording`]],template:function(e,t){e&1&&R(0,lk,2,0,`p`,0)(1,uk,2,0,`p`,0)(2,dk,2,0,`p`,0)(3,fk,5,0,`div`,0)(4,tA,5,1,`div`,1),e&2&&z(t.rpc()?t.failed()?1:t.loading()?2:t.forms().length?4:3:0)},dependencies:[LO,ak,UO,WO,Wv],styles:[`.muted[_ngcontent-%COMP%] { + }`]})},kk=()=>[],Ak=(e,t)=>t.id,jk=(e,t)=>t.node.path;function Mk(e,t){e&1&&(H(0,`p`,0),X(1,`Connecting…`),U())}function Nk(e,t){e&1&&(H(0,`p`,0),X(1,`Could not load forms from the devtools server. Reload to try again.`),U())}function Pk(e,t){e&1&&(H(0,`p`,0),X(1,`Loading forms…`),U())}function Fk(e,t){e&1&&(H(0,`div`,0)(1,`p`),X(2,`No forms on the page yet.`),U(),H(3,`p`,2),X(4,` Open a page that renders a form. Signal Forms, reactive and template-driven forms all show up here, in development builds. `),U()())}function Ik(e,t){e&1&&(H(0,`span`,10),X(1),H(2,`span`,9),X(3,` errors`),U()()),e&2&&(I(),Z(t))}function Lk(e,t){if(e&1){let e=K();H(0,`li`)(1,`button`,5),kg(`click`,function(){let t=N(e).$implicit;return P(Y(2).selectForm(t.id))}),fg(2,`span`,6),H(3,`span`,7),X(4),U(),H(5,`span`,8),X(6),H(7,`span`,9),X(8),U()(),R(9,Ik,4,1,`span`,10),U()()}if(e&2){let e,n=t.$implicit,r=Y(2);I(),$g(`active`,n.id===r.selected()?.id),L(`aria-current`,n.id===r.selected()?.id?`true`:null),I(),L(`data-status`,n.root.status),I(2),Z(n.label),I(2),w_(``,r.kindLabel(n.kind),` · `,n.id,` `),I(2),Q(`, `,n.root.status),I(),z((e=r.counts().get(n.id)?.errors)?9:-1,e)}}function Rk(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y();I(),Z(e.submitted?`submitted`:`not submitted`)}}function zk(e,t){e&1&&(H(0,`span`),X(1,`submitting`),U())}function Bk(e,t){if(e&1){let e=K();H(0,`button`,14),kg(`click`,function(){return N(e),P(Y(3).confirmAct(`restore`))}),X(1),U()}if(e&2){let e=Y(3);I(),Q(` `,e.armed()===`restore`?`Confirm restore`:`Restore `+e.snapshot(),` `)}}function Vk(e,t){if(e&1){let e=K();H(0,`button`,22),kg(`click`,function(){let t=N(e).$implicit;return P(Y(3).tab_.set(t.id))}),X(1),U()}if(e&2){let e=t.$implicit,n=Y(3);lg(`id`,`forms-tab-`+e.id),L(`aria-selected`,e.id===n.tab_())(`aria-controls`,`forms-panel-`+e.id)(`tabindex`,e.id===n.tab_()?0:-1),I(),Q(` `,e.label,` `)}}function Hk(e,t){if(e&1){let e=K();H(0,`label`)(1,`input`,29),kg(`change`,function(){let t=N(e).$implicit;return P(Y(4).toggleChip(t.id))}),U(),X(2),U()}if(e&2){let e=t.$implicit,n=Y(4);I(),lg(`checked`,n.active().has(e.id)),I(),Q(` `,e.label,` `)}}function Uk(e,t){if(e&1&&(H(0,`div`,2),X(1,` typed `),H(2,`code`),X(3),M_(4,`json`),U(),X(5,`, not in the model yet `),U()),e&2){let e=Y(2).$implicit;I(3),Z(P_(4,1,e.node.uncommitted))}}function Wk(e,t){if(e&1&&(H(0,`div`,2),X(1,` resets to `),H(2,`code`),X(3),M_(4,`json`),U()()),e&2){let e=Y(2).$implicit;I(3),Z(P_(4,1,e.node.defaultValue))}}function Gk(e,t){if(e&1&&(H(0,`code`),X(1),M_(2,`json`),U(),R(3,Uk,6,3,`div`,2),R(4,Wk,5,3,`div`,2)),e&2){let e=Y().$implicit;I(),Z(P_(2,3,e.node.value)),I(2),z(e.node.uncommitted===void 0?-1:3),I(),z(e.node.defaultValue===void 0?-1:4)}}function Kk(e,t){e&1&&(H(0,`span`,2),X(1,`not created yet`),U())}function qk(e,t){if(e&1&&(H(0,`span`,12),X(1),U()),e&2){let e=Y().$implicit;L(`data-status`,e.node.status),I(),Z(e.node.status)}}function Jk(e,t){e&1&&(H(0,`span`),X(1,`touched`),U())}function Yk(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Z(e.node.changed===!1?`dirty, unchanged`:`dirty`)}}function Xk(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`not validated (`,e.node.skipped,`)`)}}function Zk(e,t){if(e&1&&(H(0,`span`,36),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`stale: `,e.node.stale.join(`, `))}}function Qk(e,t){e&1&&(H(0,`span`,36),X(1,`view out of sync`),U())}function $k(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`redacted (`,e.node.redacted,`)`)}}function eA(e,t){e&1&&(H(0,`span`),X(1,`required`),U())}function tA(e,t){e&1&&(H(0,`span`),X(1,`readonly`),U())}function nA(e,t){e&1&&(H(0,`span`),X(1,`hidden`),U())}function rA(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Q(`updates on `,e.node.updateOn)}}function iA(e,t){e&1&&(H(0,`span`),X(1,`debouncing`),U())}function aA(e,t){e&1&&(H(0,`span`),X(1,`validators`),U())}function oA(e,t){e&1&&(H(0,`span`),X(1,`async validator`),U())}function sA(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=t.$implicit;I(),Z(e)}}function cA(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=Y().$implicit;I(),Z(e.node.accessor)}}function lA(e,t){if(e&1&&(H(0,`span`),X(1),U()),e&2){let e=t.$implicit;I(),Q(`disabled: `,e)}}function uA(e,t){if(e&1&&(H(0,`span`,40),X(1),U()),e&2){let e=Y().$implicit,t=Y(5);I(),Z(t.sourceText(e))}}function dA(e,t){if(e&1&&(H(0,`div`),X(1),H(2,`code`,39),X(3),U(),R(4,uA,2,1,`span`,40),U()),e&2){let e=t.$implicit,n=Y().$implicit,r=Y(4);I(),Q(` `,r.errorText(n.node,e),` `),I(2),Z(e.kind),I(),z(e.source?4:-1)}}function fA(e,t){e&1&&(H(0,`div`,38),X(1,`not shown to the user`),U())}function pA(e,t){if(e&1&&(H(0,`tr`)(1,`td`,41),X(2),U()()),e&2){let e=Y().$implicit;I(),Qg(`padding-left`,24+e.depth*16,`px`),I(),w_(` `,e.node.truncated,` more fields under `,e.node.path||`the form`,` not shown `)}}function mA(e,t){if(e&1){let e=K();H(0,`tr`,30),kg(`mouseenter`,function(){let t=N(e).$implicit,n=Y(2);return P(Y(2).highlight(n.id,t.node.path))})(`mouseleave`,function(){return N(e),P(Y(4).highlight(null,``))}),H(1,`th`,31)(2,`button`,32),kg(`focus`,function(){let t=N(e).$implicit,n=Y(2);return P(Y(2).highlight(n.id,t.node.path))})(`blur`,function(){return N(e),P(Y(4).highlight(null,``))})(`click`,function(){let t=N(e).$implicit;return P(Y(4).fieldPath.set(t.node.path))}),X(3),U(),H(4,`span`,33),X(5),U()(),H(6,`td`,34),R(7,Gk,5,5),U(),H(8,`td`),R(9,Kk,2,0,`span`,2)(10,qk,2,2,`span`,12),U(),H(11,`td`,35),R(12,Jk,2,0,`span`),R(13,Yk,2,1,`span`),R(14,Xk,2,1,`span`),R(15,Zk,2,1,`span`,36),R(16,Qk,2,0,`span`,36),R(17,$k,2,1,`span`),R(18,eA,2,0,`span`),R(19,tA,2,0,`span`),R(20,nA,2,0,`span`),R(21,rA,2,1,`span`),R(22,iA,2,0,`span`),R(23,aA,2,0,`span`),R(24,oA,2,0,`span`),B(25,sA,2,1,`span`,null,eg),R(27,cA,2,1,`span`),B(28,lA,2,1,`span`,null,$h),U(),H(30,`td`,37),B(31,dA,5,3,`div`,null,$h),R(33,fA,2,0,`div`,38),U()(),R(34,pA,3,4,`tr`)}if(e&2){let e=t.$implicit,n=Y(4);$g(`invalid`,e.node.errors.length),I(),Qg(`padding-left`,8+e.depth*16,`px`),I(),L(`aria-label`,`Highlight `+(e.node.path||`the form`)+` on the page`)(`aria-pressed`,e.node.path===n.fieldPath()),I(),Q(` `,e.node.key||`(form)`,` `),I(2),Z(e.node.type),I(2),z(e.node.type===`control`?7:-1),I(2),z(e.node.materialized===!1?9:10),I(3),z(e.node.touched?12:-1),I(),z(e.node.dirty?13:-1),I(),z(e.node.skipped?14:-1),I(),z(e.node.stale?.length?15:-1),I(),z(e.node.dom?.drift===void 0?-1:16),I(),z(e.node.redacted?17:-1),I(),z(e.node.required?18:-1),I(),z(e.node.readonly?19:-1),I(),z(e.node.hidden?20:-1),I(),z(e.node.updateOn?21:-1),I(),z(e.node.debouncing?22:-1),I(),z(e.node.validators?.sync?23:-1),I(),z(e.node.validators?.async?24:-1),I(),V(n.constraintList(e.node)),I(2),z(e.node.accessor?27:-1),I(),V(e.node.disabledReasons??D_(26,kk)),I(3),V(e.node.errors),I(2),z(e.node.errors.length&&e.node.dom?.errorShown===!1?33:-1),I(),z(e.node.truncated?34:-1)}}function hA(e,t){e&1&&X(0),e&2&&Q(` No field path matches "`,Y(5).filter(),`". `)}function gA(e,t){e&1&&X(0,` No field matches the selected filters. `)}function _A(e,t){if(e&1&&(H(0,`tr`)(1,`td`,41),R(2,hA,1,1)(3,gA,1,0),U()()),e&2){let e=Y(4);I(2),z(e.filter()?2:3)}}function vA(e,t){if(e&1&&fg(0,`app-forms-field-detail`,28),e&2){let e=Y(2),n=Y(2);lg(`form`,e)(`node`,t)(`version`,n.version())(`rpc`,n.rpc())}}function yA(e,t){if(e&1){let e=K();H(0,`fieldset`,23)(1,`legend`,9),X(2,`Show only fields that are`),U(),B(3,Hk,3,2,`label`,null,Ak),U(),H(5,`input`,24),kg(`input`,function(t){return N(e),P(Y(3).onFilter(t))}),U(),H(6,`div`,25)(7,`table`,26)(8,`thead`)(9,`tr`)(10,`th`,27),X(11,`Field`),U(),H(12,`th`,27),X(13,`Value`),U(),H(14,`th`,27),X(15,`Status`),U(),H(16,`th`,27),X(17,`State`),U(),H(18,`th`,27),X(19,`Errors`),U()()(),H(20,`tbody`),B(21,mA,35,27,null,null,jk,!1,_A,4,1,`tr`),U()()(),R(24,vA,1,4,`app-forms-field-detail`,28)}if(e&2){let e,t=Y(3);I(3),V(t.chips),I(2),lg(`value`,t.filter()),I(16),V(t.rows()),I(3),z((e=t.selectedNode())?24:-1,e)}}function bA(e,t){if(e&1){let e=K();H(0,`app-forms-timeline`,42),kg(`record`,function(t){return N(e),P(Y(3).setRecording(t))}),U()}if(e&2){let e=Y(3);lg(`events`,e.selectedEvents())(`recording`,e.recording())}}function xA(e,t){if(e&1&&fg(0,`app-forms-submit`,21),e&2){let e=Y(),t=Y(2);lg(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function SA(e,t){if(e&1&&fg(0,`app-forms-lint`,21),e&2){let e=Y(),t=Y(2);lg(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function CA(e,t){if(e&1){let e=K();H(0,`section`,4)(1,`div`,11)(2,`span`,12),X(3),U(),H(4,`span`),X(5),U(),H(6,`span`),X(7),U(),R(8,Rk,2,1,`span`),R(9,zk,2,0,`span`),H(10,`span`,2),X(11),U()(),H(12,`div`,13)(13,`button`,14),kg(`click`,function(){return N(e),P(Y(2).act(`touch-all`))}),X(14,`Touch all`),U(),H(15,`button`,14),kg(`click`,function(){return N(e),P(Y(2).act(`revalidate`))}),X(16,`Revalidate`),U(),H(17,`button`,14),kg(`click`,function(){return N(e),P(Y(2).act(`focus-first-invalid`))}),X(18,` Focus first invalid `),U(),H(19,`button`,14),kg(`click`,function(){return N(e),P(Y(2).pick())}),X(20,`Pick field on page`),U(),H(21,`button`,14),kg(`click`,function(){return N(e),P(Y(2).act(`snapshot`))}),X(22,`Snapshot`),U(),R(23,Bk,2,1,`button`,15),H(24,`button`,14),kg(`click`,function(){return N(e),P(Y(2).confirmAct(`reset`))}),X(25),U(),H(26,`button`,14),kg(`click`,function(){return N(e),P(Y(2).confirmAct(`submit`))}),X(27),U()(),H(28,`p`,16),X(29),U(),H(30,`div`,17),kg(`keydown`,function(t){return N(e),P(Y(2).onKey(t))}),B(31,Vk,2,5,`button`,18,Ak),U(),H(33,`div`,19),R(34,yA,25,3)(35,bA,1,2,`app-forms-timeline`,20)(36,xA,1,3,`app-forms-submit`,21)(37,SA,1,3,`app-forms-lint`,21),U()()}if(e&2){let e,n=t,r=Y(2);L(`aria-label`,n.label),I(2),L(`data-status`,n.root.status),I(),Z(n.root.status),I(2),Z(n.root.dirty?`dirty`:`pristine`),I(2),Z(n.root.touched?`touched`:`untouched`),I(),z(n.submitted===void 0?-1:8),I(),z(n.root.submitting?9:-1),I(2),w_(``,r.counts().get(n.id)?.fields,` fields, `,r.counts().get(n.id)?.errors,` errors`),I(12),z(r.snapshot()?23:-1),I(2),Q(` `,r.armed()===`reset`?`Confirm reset`:`Reset`,` `),I(2),Q(` `,r.armed()===`submit`?`Confirm submit`:`Submit`,` `),I(2),Z(r.message()),I(2),V(r.tabs),I(2),lg(`id`,`forms-panel-`+r.tab_()),L(`aria-labelledby`,`forms-tab-`+r.tab_()),I(),z((e=r.tab_())===`fields`?34:e===`timeline`?35:e===`submit`?36:e===`lint`?37:-1)}}function wA(e,t){if(e&1&&(H(0,`div`,1)(1,`ul`,3),B(2,Lk,10,9,`li`,null,Ak),U(),R(4,CA,38,16,`section`,4),U()),e&2){let e,t=Y();I(2),V(t.forms()),I(2),z((e=t.selected())?4:-1,e)}}var TA=[{id:`fields`,label:`Fields`},{id:`timeline`,label:`Timeline`},{id:`submit`,label:`Submit`},{id:`lint`,label:`Lint`}],EA=[{id:`invalid`,label:`Invalid`},{id:`dirty`,label:`Dirty`},{id:`touched`,label:`Touched`},{id:`disabled`,label:`Disabled`},{id:`hidden-error`,label:`Error not shown`}];function DA(e,t){switch(t){case`invalid`:return e.errors.length>0;case`dirty`:return e.dirty&&e.type===`control`;case`touched`:return e.touched&&e.type===`control`;case`disabled`:return e.status===`DISABLED`;case`hidden-error`:return e.dom?.errorShown===!1}}function OA(e){return e.errors.length+(e.children??[]).reduce((e,t)=>e+OA(t),0)}function kA(e){return 1+(e.children??[]).reduce((e,t)=>e+kA(t),0)}var AA=class e{rpc=Z_(null);focus=Z_(null);focusHandled=J_();forms=F([]);events=F([]);loading=F(!0);failed=F(!1);selectedId=F(null);instrumented=F([]);recording=$(()=>{let e=this.selected()?.id??``;return this.instrumented().some(t=>e.endsWith(`@${t}`))});filter=F(``);tabs=TA;chips=EA;tab_=F(`fields`);active=F(new Set);fieldPath=F(null);version=F(0);message=F(``);armed=F(null);snapshot=F(null);unsubscribe=null;destroyRef=A(ms);counts=$(()=>new Map(this.forms().map(e=>[e.id,{fields:kA(e.root),errors:OA(e.root)}])));selected=$(()=>{let e=this.forms();return e.find(e=>e.id===this.selectedId())??e[0]??null});rows=$(()=>{let e=this.selected();if(!e)return[];let t=this.filter().toLowerCase(),n=Array.from(this.active()),r=[],i=(e,a)=>{let o=r.length,s=(!t||e.path.toLowerCase().includes(t))&&n.every(t=>DA(e,t));for(let t of e.children??[])s=i(t,a+1)||s;return s&&r.splice(o,0,{node:e,depth:a}),s};return i(e.root,0),r});selectedNode=$(()=>{let e=this.fieldPath(),t=this.selected();if(e===null||!t)return null;let n=t=>t.path===e?t:(t.children??[]).map(n).find(Boolean)??null;return n(t.root)});selectedEvents=$(()=>{let e=this.selected()?.id;return this.events().filter(t=>t.formId===e).slice(-200)});constructor(){tc(()=>{let e=this.rpc();e&&this.load(e)}),tc(()=>{let e=this.focus();e&&U_(()=>{this.selectForm(e.id),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null,``)})}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`forms`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.forms.set(t?.forms??[]),this.events.set(t?.events??[]),this.instrumented.set(t?.instrumented??[]),this.version.update(e=>e+1)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}async pick(){let e=this.selected();if(!e)return;this.message.set(`Click a field in the app (Esc cancels).`);let t=await nk(this.rpc(),{action:`pick`,formId:e.id}),n=t;if(!t.ok||!n.formId){this.message.set(rk(t));return}this.selectForm(n.formId),this.tab_.set(`fields`),this.fieldPath.set(n.path??``),this.message.set(`Picked ${n.path||`(form)`}.`)}async setRecording(e){let t=this.selected();if(!t)return;let n=await nk(this.rpc(),{action:`instrument`,formId:t.id,value:e});this.message.set(rk(n))}selectForm(e){this.selectedId.set(e),this.filter.set(``),this.fieldPath.set(null),this.snapshot.set(null),this.armed.set(null)}toggleChip(e){this.active.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async act(e,t={}){let n=this.selected();if(!n)return;this.armed.set(null);let r=await nk(this.rpc(),{action:e,formId:n.id,...t});r.snapshot&&this.snapshot.set(r.snapshot),this.message.set(rk(r))}confirmAct(e){if(this.armed()!==e){this.armed.set(e),this.message.set(`Press "Confirm ${e}" to ${e} the form in the app.`);return}this.act(e,{confirm:!0,snapshot:this.snapshot()??void 0})}onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.tab_()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.tab_.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#forms-tab-${t[r]}`)?.focus())}sourceText(e){let t=ek[e.source??``]??e.source??``;return e.from===void 0?t:`${t} on ${e.from||`the form`}`}onFilter(e){this.filter.set(e.target.value)}highlight(e,t){let n=this.rpc();n&&n.scope(`ng-devtools`).rpc.callEvent(`request-form-highlight`,e?{formId:e,path:t}:null)}kindLabel(e){return $O[e]}constraintList(e){return Object.entries(e.constraints??{}).map(([e,t])=>`${e} ${t}`)}errorText(e,t){return/^[a-z]/.test(t.message)?`${e.key||`The form`} ${t.message}`:t.message}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-forms-inspector`]],inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:5,vars:1,consts:[[1,`empty`],[1,`layout`],[1,`muted`],[`aria-label`,`Forms on the page`,1,`form-list`],[1,`detail`],[`type`,`button`,1,`form-item`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`label`],[1,`kind`],[1,`sr-only`],[1,`count`],[1,`summary`],[1,`badge`],[`role`,`group`,`aria-label`,`Form actions`,1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`],[`role`,`status`,1,`status`],[`role`,`tablist`,`aria-label`,`Form views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`events`,`recording`],[3,`formId`,`version`,`rpc`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`chips`],[`type`,`search`,`placeholder`,`Filter fields by path`,`aria-label`,`Filter fields by path`,1,`filter`,3,`input`,`value`],[`role`,`region`,`aria-label`,`Fields`,`tabindex`,`0`,1,`table-scroll`],[1,`fields`],[`scope`,`col`],[3,`form`,`node`,`version`,`rpc`],[`type`,`checkbox`,3,`change`,`checked`],[3,`mouseenter`,`mouseleave`],[`scope`,`row`],[`type`,`button`,1,`field`,3,`focus`,`blur`,`click`],[1,`type`],[1,`value`],[1,`flags`],[1,`warn`],[1,`errors`],[1,`unseen`],[1,`kind-tag`],[1,`source`],[`colspan`,`5`,1,`muted`],[3,`record`,`events`,`recording`]],template:function(e,t){e&1&&R(0,Mk,2,0,`p`,0)(1,Nk,2,0,`p`,0)(2,Pk,2,0,`p`,0)(3,Fk,5,0,`div`,0)(4,wA,5,1,`div`,1),e&2&&z(t.rpc()?t.failed()?1:t.loading()?2:t.forms().length?4:3:0)},dependencies:[ok,Ok,fk,pk,py],styles:[`.muted[_ngcontent-%COMP%] { color: #a1a1aa; } .small[_ngcontent-%COMP%] { @@ -2450,7 +2450,257 @@ padding: 32px; text-align: center; color: #d4d4d8; - }`]})},cA=()=>[],lA=()=>[`/`],uA=(e,t)=>t.id,dA=(e,t)=>t.route.id,fA=(e,t)=>t[0],pA=(e,t)=>t.file+t.method,mA=(e,t)=>t.mode,hA=(e,t)=>t.path,gA=(e,t)=>t.file,_A=(e,t)=>t.rule;function vA(e,t){e&1&&(W(0,`p`,0),X(1,`Reading the project…`),G())}function yA(e,t){e&1&&(W(0,`div`,1)(1,`p`),X(2,`This app is not an Analog app.`),G(),W(3,`p`,2),X(4,` Add `),W(5,`code`),X(6,`ngDevtools()`),G(),X(7,` from `),W(8,`code`),X(9,`@santoshyadavdev/ng-devtools/vite`),G(),X(10,` next to `),W(11,`code`),X(12,`analog()`),G(),X(13,` in vite.config.ts and run the Analog dev server. `),G()())}function bA(e,t){e&1&&(W(0,`div`,7)(1,`span`,5),X(2,`Open in the browser`),G(),W(3,`span`,11),X(4),G()()),e&2&&(I(4),Z(t.url))}function xA(e,t){if(e&1){let e=K();W(0,`button`,12),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).view.set(t.id))}),X(1),W(2,`span`,13),X(3),G()()}if(e&2){let e=t.$implicit,n=Y(2);q(`id`,`analog-tab-`+e.id),L(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),I(),Q(` `,e.label,` `),I(),L(`data-tone`,e.tone),I(),Z(e.count)}}function SA(e,t){if(e&1&&(W(0,`li`)(1,`span`,27),X(2),G(),W(3,`span`,28),X(4),G()()),e&2){let e=t.$implicit,n=Y(5);I(2),Z(n.short(e.file)??e.fullPath),I(),L(`data-kind`,e.kind),I(),Z(e.kind)}}function CA(e,t){if(e&1&&(W(0,`span`,29),X(1),G()),e&2){let e=t.$implicit;I(),n_(``,e[0],` = `,e[1])}}function wA(e,t){if(e&1&&(W(0,`div`,26),B(1,CA,2,2,`span`,29,fA),G()),e&2){let e=Y(2),t=Y(3);I(),V(t.paramList(e.params))}}function TA(e,t){if(e&1&&(W(0,`strong`),X(1),G(),X(2,` renders `),W(3,`ol`,25),B(4,SA,5,3,`li`,null,uA),G(),R(6,wA,3,0,`div`,26)),e&2){let e=Y(),t=Y(3);I(),Z(t.testUrl()),I(3),V(e.chain),I(2),z(t.paramList(e.params).length?6:-1)}}function EA(e,t){if(e&1&&(W(0,`li`)(1,`span`,27),X(2),G(),W(3,`span`,2),X(4),G()()),e&2){let e=t.$implicit,n=Y(6);I(2),Z(n.short(e.file)??e.path),I(2),Z(e.reason)}}function DA(e,t){if(e&1&&(W(0,`ul`,30),B(1,EA,5,2,`li`,null,jh),G()),e&2){let e=Y(2);I(),V(e.rejected.slice(0,5))}}function OA(e,t){if(e&1&&(W(0,`strong`),X(1),G(),X(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),R(3,DA,3,0,`ul`,30)),e&2){let e=Y(),t=Y(3);I(),Z(t.testUrl()),I(2),z(e.rejected.length?3:-1)}}function kA(e,t){if(e&1&&(W(0,`div`,21),R(1,TA,7,2)(2,OA,4,2),G()),e&2){let e=t;L(`data-tone`,e.matched?`good`:`bad`),I(),z(e.matched?1:2)}}function AA(e,t){e&1&&(W(0,`span`,32),X(1,`└`),G())}function jA(e,t){e&1&&(W(0,`span`,34),X(1,`open`),G())}function MA(e,t){if(e&1&&(W(0,`span`,35)(1,`span`,38),X(2),G(),X(3),G()),e&2){let e=Y().$implicit,t=Y(3);I(2),Z(t.dir(e.route.file)),I(),Z(t.base(e.route.file))}}function NA(e,t){e&1&&(W(0,`span`,2),X(1,`folder only`),G())}function PA(e,t){if(e&1&&(W(0,`span`,36),X(1),G()),e&2){let e=t.$implicit;I(),Q(``,e,`()`)}}function FA(e,t){if(e&1&&(W(0,`span`,37),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`"`,e.route.title,`"`)}}function IA(e,t){if(e&1&&(W(0,`span`,29),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e)}}function LA(e,t){if(e&1&&R(0,IA,2,1,`span`,29),e&2){let e=t.$implicit;z(e===`title`?-1:0)}}function RA(e,t){if(e&1&&(W(0,`tr`)(1,`td`)(2,`div`,31),R(3,AA,2,0,`span`,32),W(4,`span`,33),X(5),G(),W(6,`span`,28),X(7),G(),R(8,jA,2,0,`span`,34),G()(),W(9,`td`),R(10,MA,4,2,`span`,35)(11,NA,2,0,`span`,2),G(),W(12,`td`),B(13,PA,2,1,`span`,36,Mh),G(),W(15,`td`),R(16,FA,2,1,`span`,37),B(17,LA,1,1,null,null,Mh),G()()),e&2){let e=t.$implicit,n=Y(3);jg(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),I(2),Ag(`padding-left`,e.depth*18,`px`),I(),z(e.depth?3:-1),I(2),Z(e.route.fullPath),I(),L(`data-kind`,e.route.kind),I(),Z(n.kindText(e.route)),I(),z(n.isOpen(e.route)?8:-1),I(2),z(e.route.file?10:11),I(3),V(n.serverExports(e.route)),I(3),z(e.route.title?16:-1),I(),V(e.route.routeMeta??a_(13,cA))}}function zA(e,t){e&1&&(W(0,`tr`)(1,`td`,39),X(2,`No route matches the filter.`),G()())}function BA(e,t){if(e&1){let e=K();W(0,`div`,14)(1,`form`,15),J(`submit`,function(t){N(e);let n=Y(2);return t.preventDefault(),P(n.explain())}),W(2,`label`,16),X(3,`Test a URL`),G(),W(4,`input`,17),J(`input`,function(t){return N(e),P(Y(2).testUrl.set(t.target.value))}),G(),W(5,`button`,18),X(6,`Explain`),G()(),W(7,`label`,19),X(8,`Filter routes`),G(),W(9,`input`,20),J(`input`,function(t){return N(e),P(Y(2).filter.set(t.target.value))}),G()(),R(10,kA,3,2,`div`,21),W(11,`div`,22)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,23),X(16,`Route`),G(),W(17,`th`,23),X(18,`File`),G(),W(19,`th`,23),X(20,`Data`),G(),W(21,`th`,23),X(22,`Route meta`),G()()(),W(23,`tbody`),B(24,RA,19,14,`tr`,24,dA,!1,zA,3,0,`tr`),G()()()}if(e&2){let e,t=Y(2);I(4),q(`value`,t.testUrl()),I(5),q(`value`,t.filter()),I(),z((e=t.match())?10:-1,e),I(14),V(t.routeRows())}}function VA(e,t){if(e&1&&(W(0,`span`,27),X(1),G(),X(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;I(),Z(e),I(),Q(``,n===r-1?``:`, `,` `)}}function HA(e,t){if(e&1&&(W(0,`div`,40)(1,`strong`),X(2,`load() ran twice`),G(),X(3,` for `),B(4,VA,3,2,null,null,Mh),X(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),G()),e&2){let e=Y(3);I(4),V(e.duplicates())}}function UA(e,t){if(e&1){let e=K();W(0,`label`)(1,`input`,54),J(`change`,function(){let t=N(e).$implicit;return P(Y(3).kind.set(t))}),G(),X(2),W(3,`span`,2),X(4),G()()}if(e&2){let e=t.$implicit,n=Y(3);jg(`on`,n.kind()===e),I(),q(`checked`,n.kind()===e),I(),Q(` `,n.kindLabel(e),` `),I(2),Z(n.kindCount(e))}}function WA(e,t){if(e&1&&(W(0,`span`,28),X(1),G()),e&2){let e=Y().$implicit;L(`data-mode`,e.render===`ssr`?`ssr`:`client`),I(),Z(e.render===`ssr`?`server rendered`:`client only`)}}function GA(e,t){if(e&1&&(W(0,`details`)(1,`summary`),X(2,`Response`),G(),W(3,`pre`,61),X(4),G()()),e&2){let e=Y().$implicit,t=Y(4);I(4),Z(t.pretty(e.preview))}}function KA(e,t){if(e&1&&(W(0,`tr`)(1,`td`,56),X(2),G(),W(3,`td`)(4,`span`,28),X(5),G()(),W(6,`td`,57)(7,`span`,58),X(8),G(),W(9,`span`,27),X(10),G(),R(11,WA,2,2,`span`,28),R(12,GA,5,1,`details`),G(),W(13,`td`)(14,`span`,59),X(15),G()(),W(16,`td`,60),X(17),G(),W(18,`td`,2),X(19),G()()),e&2){let e=t.$implicit,n=Y(4);I(2),Z(n.time(e.at)),I(2),L(`data-call`,e.kind),I(),Z(n.kindLabel(e.kind)),I(2),L(`data-method`,e.method),I(),Z(e.method),I(2),Z(e.url),I(),z(e.render?11:-1),I(),z(e.preview?12:-1),I(2),L(`data-status`,n.statusClass(e.status)),I(),Z(e.status),I(2),Q(``,e.ms,` ms`),I(2),Z(e.from)}}function qA(e,t){if(e&1&&(W(0,`div`,44)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,23),X(5,`Time`),G(),W(6,`th`,23),X(7,`Kind`),G(),W(8,`th`,23),X(9,`Request`),G(),W(10,`th`,23),X(11,`Status`),G(),W(12,`th`,55),X(13,`Time`),G(),W(14,`th`,23),X(15,`From`),G()()(),W(16,`tbody`),B(17,KA,20,12,`tr`,null,uA),G()()()),e&2){let e=Y(3);I(17),V(e.calls())}}function JA(e,t){e&1&&(W(0,`p`,2),X(1,` No calls yet. Navigate in the app to see page renders, load() fetches and API calls. `),G())}function YA(e,t){if(e&1){let e=K();W(0,`tr`)(1,`td`)(2,`span`,58),X(3),G()(),W(4,`td`,27),X(5),G(),W(6,`td`)(7,`span`,35)(8,`span`,38),X(9),G(),X(10),G()(),W(11,`td`)(12,`button`,62),J(`click`,function(){let t=N(e).$implicit;return P(Y(3).tryApi(t))}),X(13,` Try `),G()()()}if(e&2){let e=t.$implicit,n=Y(3);I(2),L(`data-method`,e.method),I(),Z(e.method),I(2),Z(e.path),I(4),Z(n.dir(e.file)),I(),Z(n.base(e.file)),I(2),L(`aria-label`,`Try `+e.method+` `+e.path)}}function XA(e,t){if(e&1&&(W(0,`option`,50),X(1),G()),e&2){let e=t.$implicit;q(`value`,e),I(),Z(e)}}function ZA(e,t){if(e&1){let e=K();W(0,`label`,63),X(1,`JSON body`),G(),W(2,`textarea`,64),J(`input`,function(t){return N(e),P(Y(3).apiBody.set(t.target.value))}),G(),W(3,`label`,65)(4,`input`,66),J(`change`,function(){N(e);let t=Y(3);return P(t.confirmSend.set(!t.confirmSend()))}),G(),X(5,` This request can change data on the dev server`),G()}if(e&2){let e=Y(3);I(2),q(`value`,e.apiBody()),I(2),q(`checked`,e.confirmSend())}}function QA(e,t){if(e&1&&(W(0,`span`,67),X(1,`Refused`),G(),W(2,`span`),X(3),G()),e&2){let e=Y();I(3),Z(e.error)}}function $A(e,t){if(e&1&&(W(0,`div`,47)(1,`span`,59),X(2),G(),W(3,`span`,2),X(4),G()(),W(5,`pre`,61),X(6),G()),e&2){let e=Y(),t=Y(3);I(),L(`data-status`,t.statusClass(e.status??0)),I(),Z(e.status),I(2),n_(``,e.ms,` ms · `,e.type||`no content type`),I(2),Z(t.pretty(e.body??``))}}function ej(e,t){e&1&&(W(0,`div`,53),R(1,QA,4,1)(2,$A,7,5),G()),e&2&&(I(),z(t.error?1:2))}function tj(e,t){if(e&1){let e=K();R(0,HA,7,0,`div`,40),W(1,`fieldset`,41)(2,`legend`,42),X(3,`Show calls of kind`),G(),B(4,UA,5,5,`label`,43,Mh),G(),R(6,qA,19,0,`div`,44)(7,JA,2,0,`p`,2),W(8,`h3`),X(9,`API routes`),G(),W(10,`div`,45)(11,`table`)(12,`thead`)(13,`tr`)(14,`th`,23),X(15,`Method`),G(),W(16,`th`,23),X(17,`Path`),G(),W(18,`th`,23),X(19,`File`),G(),W(20,`th`,23)(21,`span`,42),X(22,`Actions`),G()()()(),W(23,`tbody`),B(24,YA,14,6,`tr`,null,pA),G()()(),W(26,`form`,46),J(`submit`,function(t){N(e);let n=Y(2);return t.preventDefault(),P(n.send())}),W(27,`h3`),X(28,`Request playground`),G(),W(29,`div`,47)(30,`label`,48),X(31,`Method`),G(),W(32,`select`,49),J(`change`,function(t){return N(e),P(Y(2).method.set(t.target.value))}),B(33,XA,2,2,`option`,50,Mh),G(),W(35,`label`,51),X(36,`Path`),G(),W(37,`input`,52),J(`input`,function(t){return N(e),P(Y(2).apiPath.set(t.target.value))}),G(),W(38,`button`,18),X(39,`Send`),G()(),R(40,ZA,6,2),R(41,ej,3,1,`div`,53),G()}if(e&2){let e,t=Y(2);z(t.duplicates().length?0:-1),I(4),V(t.kinds),I(2),z(t.calls().length?6:7),I(18),V(t.project().api),I(8),q(`value`,t.method()),I(),V(t.methods),I(4),q(`value`,t.apiPath()),I(3),z(t.method()===`GET`?-1:40),I(),z((e=t.response())?41:-1,e)}}function nj(e,t){if(e&1&&(W(0,`span`,28),X(1),G()),e&2){let e=t.$implicit;L(`data-mode`,e.mode),I(),n_(``,e.label,` · `,e.count)}}function rj(e,t){e&1&&(W(0,`span`,71),X(1,`differs from config`),G())}function ij(e,t){if(e&1&&(W(0,`span`,59),X(1),G(),W(2,`span`,70),X(3),G(),R(4,rj,2,0,`span`,71)),e&2){let e=t,n=Y().$implicit,r=Y(3);L(`data-status`,r.statusClass(e.status)),I(),Z(e.status),I(2),n_(``,e.render===`client`?`client only`:`server rendered`,` · `,e.ms,` ms`),I(),z(r.mismatch(n)?4:-1)}}function aj(e,t){e&1&&(W(0,`span`,70),X(1,`not requested yet`),G())}function oj(e,t){if(e&1&&(W(0,`span`,35)(1,`span`,38),X(2),G(),X(3),G()),e&2){let e=Y().$implicit,t=Y(3);I(2),Z(t.dir(e.file)),I(),Z(t.base(e.file))}}function sj(e,t){if(e&1&&(W(0,`tr`)(1,`td`,33),X(2),G(),W(3,`td`)(4,`span`,28),X(5),G(),W(6,`span`,70),X(7),G()(),W(8,`td`),R(9,ij,5,5)(10,aj,2,0,`span`,70),G(),W(11,`td`),R(12,oj,4,2,`span`,35),G()()),e&2){let e,n=t.$implicit,r=Y(3);I(2),Z(n.path),I(2),L(`data-mode`,n.mode),I(),Z(r.modeLabel(n.mode)),I(2),Z(n.reason),I(2),z((e=n.last)?9:10,e),I(3),z(n.file?12:-1)}}function cj(e,t){e&1&&(W(0,`p`,2),X(1,` prerender.routes is a function, so the list is known only at build time. `),G())}function lj(e,t){if(e&1&&(W(0,`span`,29),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function uj(e,t){e&1&&(W(0,`span`,70),X(1,`default, nothing configured`),G())}function dj(e,t){if(e&1&&(W(0,`span`,73),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function fj(e,t){if(e&1&&(W(0,`dt`),X(1,`Static, not listed`),G(),W(2,`dd`),B(3,dj,2,1,`span`,73,Mh),G()),e&2){let e=Y(2);I(3),V(e.staticMissing)}}function pj(e,t){if(e&1&&(W(0,`span`,29),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function mj(e,t){if(e&1&&(W(0,`dt`),X(1,`Need explicit entries`),G(),W(2,`dd`),B(3,pj,2,1,`span`,29,Mh),G()),e&2){let e=Y(2);I(3),V(e.dynamic)}}function hj(e,t){if(e&1&&(W(0,`span`,74),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function gj(e,t){if(e&1&&(X(0,` · missing `),B(1,hj,2,1,`span`,74,Mh)),e&2){let e=Y(3);I(),V(e.notBuilt)}}function _j(e,t){if(e&1&&(X(0),R(1,gj,3,0)),e&2){let e=Y(2);Q(` `,e.built.length,` page(s) in dist/analog/public `),I(),z(e.notBuilt.length?1:-1)}}function vj(e,t){e&1&&(W(0,`span`,70),X(1,`no build yet`),G())}function yj(e,t){if(e&1&&(W(0,`dl`,72)(1,`dt`),X(2,`Listed`),G(),W(3,`dd`),B(4,lj,2,1,`span`,29,Mh),R(6,uj,2,0,`span`,70),G(),R(7,fj,5,0),R(8,mj,5,0),W(9,`dt`),X(10,`Build output`),G(),W(11,`dd`),R(12,_j,2,2)(13,vj,2,0,`span`,70),G()()),e&2){let e=Y();I(4),V(e.listed??a_(4,lA)),I(2),z(e.listed?-1:6),I(),z(e.staticMissing.length?7:-1),I(),z(e.dynamic.length?8:-1),I(4),z(e.built.length?12:13)}}function bj(e,t){e&1&&(W(0,`div`,69)(1,`h3`),X(2,`Prerender plan`),G(),R(3,cj,2,0,`p`,2)(4,yj,14,5,`dl`,72),G()),e&2&&(I(3),z(t.dynamicConfig?3:4))}function xj(e,t){if(e&1&&(W(0,`div`,26),B(1,nj,2,3,`span`,28,mA),G(),W(3,`div`,68)(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,23),X(8,`Route`),G(),W(9,`th`,23),X(10,`Configured`),G(),W(11,`th`,23),X(12,`Last request`),G(),W(13,`th`,23),X(14,`File`),G()()(),W(15,`tbody`),B(16,sj,13,6,`tr`,null,hA),G()()(),R(18,bj,5,1,`div`,69)),e&2){let e,t=Y(2);I(),V(t.modeCounts()),I(15),V(t.renderRows()),I(2),z((e=t.plan())?18:-1,e)}}function Sj(e,t){if(e&1&&(W(0,`div`)(1,`span`,76),X(2),G()()),e&2){let e=Y().$implicit;I(2),Z(e.error)}}function Cj(e,t){if(e&1&&(W(0,`div`)(1,`span`,71),X(2),G()()),e&2){let e=Y(5);I(2),Q(`takes over `,e.base(t))}}function wj(e,t){if(e&1&&(W(0,`tr`)(1,`td`)(2,`strong`),X(3),G(),R(4,Sj,3,1,`div`),R(5,Cj,3,1,`div`),G(),W(6,`td`,33),X(7),G(),W(8,`td`,27),X(9),G(),W(10,`td`,56),X(11),G(),W(12,`td`)(13,`span`,35)(14,`span`,38),X(15),G(),X(16),G()()()),e&2){let e,n=t.$implicit,r=Y(4);I(3),Z(n.attributes.title||`(no title)`),I(),z(n.error?4:-1),I(),z((e=r.shadowed(n.file))?5:-1,e),I(2),Z(r.contentUrl(n.file)??``),I(2),Z(n.slug),I(2),Z(n.attributes.date||``),I(4),Z(r.dir(n.file)),I(),Z(r.base(n.file))}}function Tj(e,t){if(e&1&&(W(0,`div`,75)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,23),X(5,`Title`),G(),W(6,`th`,23),X(7,`URL`),G(),W(8,`th`,23),X(9,`Slug`),G(),W(10,`th`,23),X(11,`Date`),G(),W(12,`th`,23),X(13,`File`),G()()(),W(14,`tbody`),B(15,wj,17,8,`tr`,null,gA),G()()()),e&2){let e=Y(3);I(15),V(e.project().content)}}function Ej(e,t){e&1&&(W(0,`p`,2),X(1,`No markdown files under src/content.`),G())}function Dj(e,t){e&1&&R(0,Tj,17,0,`div`,75)(1,Ej,2,0,`p`,2),e&2&&z(+!Y(2).project().content.length)}function Oj(e,t){if(e&1&&(W(0,`span`,13),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.items.length)}}function kj(e,t){if(e&1&&(W(0,`span`,35)(1,`span`,38),X(2),G(),X(3),G()),e&2){let e=Y().$implicit,t=Y(5);I(2),Z(t.dir(e.file)),I(),Z(t.base(e.file))}}function Aj(e,t){if(e&1&&(W(0,`span`,33),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.path)}}function jj(e,t){if(e&1&&(W(0,`li`),R(1,kj,4,2,`span`,35),R(2,Aj,2,1,`span`,33),G()),e&2){let e=t.$implicit;I(),z(e.file?1:-1),I(),z(e.path&&e.path!==e.file?2:-1)}}function Mj(e,t){if(e&1&&(W(0,`li`)(1,`div`,79)(2,`span`,28),X(3),G(),W(4,`strong`,80),X(5),G(),R(6,Oj,2,1,`span`,13),G(),W(7,`p`),X(8),G(),W(9,`ul`,81),B(10,jj,3,2,`li`,null,jh),G(),W(12,`div`,82)(13,`strong`),X(14,`How to fix`),G(),X(15),G(),W(16,`span`,83),X(17),G()()),e&2){let e=t.$implicit,n=Y(4);L(`data-tone`,n.tone(e.severity)),I(2),L(`data-tone`,n.tone(e.severity)),I(),Z(e.severity),I(2),Z(e.title),I(),z(e.items.length>1?6:-1),I(2),Z(e.summary),I(2),V(e.items),I(5),Q(` `,e.fix),I(2),Z(e.rule)}}function Nj(e,t){if(e&1&&(W(0,`p`,2),X(1),G(),W(2,`ul`,78),B(3,Mj,18,8,`li`,null,_A),G()),e&2){let e=Y(3);I(),n_(` `,e.findings().length,` issue(s) in `,e.lintCards().length,` group(s). Each card says what is wrong, where, and how to fix it. `),I(2),V(e.lintCards())}}function Pj(e,t){e&1&&(W(0,`div`,77),X(1,`No Analog problems found.`),G())}function Fj(e,t){e&1&&R(0,Nj,5,2)(1,Pj,2,0,`div`,77),e&2&&z(+!Y(2).findings().length)}function Ij(e,t){if(e&1){let e=K();W(0,`section`,3)(1,`div`,4)(2,`span`,5),X(3,`Analog`),G(),W(4,`span`,6),X(5),G()(),W(6,`div`,4)(7,`span`,5),X(8,`Pages`),G(),W(9,`span`,6),X(10),G()(),W(11,`div`,4)(12,`span`,5),X(13,`API routes`),G(),W(14,`span`,6),X(15),G()(),W(16,`div`,4)(17,`span`,5),X(18,`Server calls`),G(),W(19,`span`,6),X(20),G()(),W(21,`div`,4)(22,`span`,5),X(23,`Issues`),G(),W(24,`span`,6),X(25),G()(),R(26,bA,5,1,`div`,7),G(),W(27,`div`,8),J(`keydown`,function(t){return N(e),P(Y().onKey(t))}),B(28,xA,4,7,`button`,9,uA),G(),W(30,`div`,10),R(31,BA,27,4)(32,tj,42,6)(33,xj,19,1)(34,Dj,2,1)(35,Fj,2,1),G()}if(e&2){let e,t,n=Y();I(5),Z(n.project().version),I(5),Z(n.pageCount()),I(5),Z(n.project().api.length),I(5),Z(n.allCalls().length),I(),L(`data-tone`,n.findings().length?`warn`:`good`),I(4),Z(n.findings().length),I(),z((e=n.page())?26:-1,e),I(2),V(n.views()),I(2),q(`id`,`analog-panel-`+n.view()),L(`aria-labelledby`,`analog-tab-`+n.view()),I(),z((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`lint`?35:-1)}}var Lj={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports nothing Analog calls.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},Rj={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`},zj={all:`All`,page:`Pages`,load:`load()`,fn:`Server fn`,api:`API`};function Bj(e,t,n){return e?e.scope(`ng-devtools`).rpc.call(t,...n===void 0?[]:[n]).then(e=>e,()=>null):Promise.resolve(null)}function Vj(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),Vj(r.children,t+1,n);return n}var Hj=class e{rpc=k_(null);kinds=[`all`,`page`,`load`,`fn`,`api`];methods=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];view=F(`routes`);project=F(null);state=F({});findings=F([]);renderRows=F([]);plan=F(null);filter=F(``);testUrl=F(``);match=F(null);kind=F(`all`);method=F(`GET`);apiPath=F(``);apiBody=F(``);confirmSend=F(!1);response=F(null);unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=A(fs);page=$(()=>this.state().pages?.[0]??null);openFiles=$(()=>new Set((this.page()?.chain??[]).map(e=>e.file)));allCalls=$(()=>this.state().calls??[]);calls=$(()=>{let e=this.kind();return this.allCalls().filter(t=>e===`all`||t.kind===e).slice(-150).reverse()});allRoutes=$(()=>Vj(this.project()?.routes??[]));pageCount=$(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=$(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});duplicates=$(()=>{let e=new Map,t=new Set;for(let n of this.allCalls()){if(n.kind!==`load`)continue;let r=n.url.replace(/^.*\/_analog\/pages/,``).replace(/\/index$/,``)||`/`;n.from===`ssr`?e.set(r,n.at):n.from===`browser`&&(e.get(r)??-1/0)>n.at-15e3&&t.add(r)}return Array.from(t)});modeCounts=$(()=>[`ssr`,`ssg`,`client`].map(e=>({mode:e,label:Rj[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=$(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=Lj[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}n.items.push({file:e.file,path:e.path})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});views=$(()=>{let e=this.findings().length;return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.allCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`lint`,label:`Lint`,count:e,tone:e?`warn`:``}]});constructor(){$s(()=>{let e=this.rpc();e&&x_(()=>void this.load(e))}),$s(()=>{let e=this.view();this.state(),x_(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){this.project.set(await Bj(e,`analog-project`));try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`analog`),n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}await this.refresh(this.view())}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([Bj(t,`analog-lint`),Bj(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`)){let e=await Bj(t,`analog-project`);e&&n===this.refreshRun&&this.project.set(e)}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return zj[e]}kindCount(e){return e===`all`?this.allCalls().length:this.allCalls().filter(t=>t.kind===e).length}modeLabel(e){return Rj[e]}mismatch(e){return e.last?.render?e.mode===`client`?e.last.render!==`client`:e.last.render===`client`:!1}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.message.match(/(\/\S+\.page\.ts)/)?.[1]}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time(e){return new Date(e).toLocaleTimeString()}tryApi(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.apiPath.set(e.path.replace(/:(\w+)/g,`1`).replace(`**`,`x`)),this.response.set(null),queueMicrotask(()=>document.getElementById(`api-path`)?.focus())}async explain(){let e=this.testUrl().trim();e&&this.match.set(await Bj(this.rpc(),`analog-explain-url`,e))}async send(){let e=this.apiPath().trim();if(!e)return;let t;if(this.method()!==`GET`&&this.apiBody().trim())try{t=JSON.parse(this.apiBody())}catch{this.response.set({error:`The body is not valid JSON.`});return}let n=await Bj(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t,confirm:this.confirmSend()});this.response.set(n??{error:`No answer from the devtools server.`})}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:3,vars:1,consts:[[1,`muted`,`pad`],[1,`empty`],[1,`muted`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[1,`value`,`mono`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`btn`],[`for`,`route-filter`,1,`sr-only`],[`id`,`route-filter`,`type`,`search`,`placeholder`,`Filter by path or file`,1,`field`,3,`input`,`value`],[`role`,`status`,1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[3,`open`,`dim`],[1,`chain`],[1,`chips`],[1,`mono`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`dir`],[`colspan`,`4`,1,`muted`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[1,`segmented`],[1,`sr-only`],[3,`on`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`,`playground`,3,`submit`],[1,`row`],[`for`,`api-method`,1,`sr-only`],[`id`,`api-method`,1,`field`,3,`change`,`value`],[3,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`role`,`status`,1,`response`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`status`],[1,`num`,`nowrap`],[1,`code`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[`for`,`api-body`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`data-status`,`bad`,1,`status`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[`data-tone`,`warn`,1,`pill`],[1,`facts`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[`data-tone`,`bad`,1,`pill`],[`data-tone`,`good`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`]],template:function(e,t){e&1&&R(0,vA,2,0,`p`,0)(1,yA,14,0,`div`,1)(2,Ij,36,10),e&2&&z(t.project()===null?0:t.project().analog?2:1)},styles:[`[_nghost-%COMP%] { + }`]})},jA=(e,t)=>t.file+t.name,MA=(e,t)=>t.file+`:`+t.line,NA=(e,t)=>t.name;function PA(e,t){e&1&&(W(0,`p`,5),X(1,` Recording live call counts, instance counts and last input/output. This patches pipe prototypes in the inspected page, so turn it off when you're done. `),G())}function FA(e,t){e&1&&(W(0,`p`,6),X(1,`Scanning pipes…`),G())}function IA(e,t){e&1&&(W(0,`p`,6),X(1,`No pipes found.`),G())}function LA(e,t){e&1&&(W(0,`span`,19),X(1,`module`),G())}function RA(e,t){e&1&&(W(0,`span`,20),X(1,`built-in`),G())}function zA(e,t){if(e&1&&(W(0,`span`,22),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`+`,(e.usageCount??1)-1,` more`)}}function BA(e,t){if(e&1&&(W(0,`dt`),X(1,`File`),G(),W(2,`dd`),X(3),G()),e&2){let e=Y(2).$implicit;I(3),w_(``,e.file,`:`,e.line)}}function VA(e,t){if(e&1&&(W(0,`li`),X(1),G()),e&2){let e=t.$implicit;I(),w_(``,e.file,`:`,e.line)}}function HA(e,t){if(e&1&&(W(0,`dt`),X(1),G(),W(2,`dd`)(3,`ul`,26),B(4,VA,2,2,`li`,null,MA),G()()),e&2){let e=Y(2).$implicit;I(),Q(`Used in (`,e.usageCount,`)`),I(3),V(e.usages)}}function UA(e,t){e&1&&(W(0,`p`,28)(1,`span`,29),X(2,`experimental`),G(),X(3,` Fed an argument that changed contents without changing reference — this pure pipe may be showing a stale value. `),G())}function WA(e,t){if(e&1&&(W(0,`li`),X(1),G()),e&2){let e=t.$implicit;I(),w_(``,e.name,` (`,e.count,`)`)}}function GA(e,t){if(e&1&&(W(0,`li`,30),X(1),G()),e&2){let e=t.$implicit,n=Y(7);I(),T_(` `,n.describe(e.lastArgs),` → `,n.describe(e.lastResult),` (`,e.callCount,`) `)}}function KA(e,t){if(e&1&&(W(0,`dt`),X(1,`Per instance`),G(),W(2,`dd`)(3,`ul`,26),B(4,GA,2,3,`li`,30,$h),G()()),e&2){let e=Y();I(4),V(e.instances)}}function qA(e,t){if(e&1&&(W(0,`dt`),X(1,`Last caller`),G(),W(2,`dd`,30),X(3),G()),e&2){let e=Y();I(3),Z(e.lastCaller)}}function JA(e,t){if(e&1&&(W(0,`dt`),X(1,`Calls`),G(),W(2,`dd`),X(3),G(),W(4,`dt`),X(5,`Last input`),G(),W(6,`dd`,30),X(7),G(),W(8,`dt`),X(9,`Last output`),G(),W(10,`dd`,30),X(11),G(),R(12,KA,6,0),R(13,qA,4,1)),e&2){let e=t,n=Y(5);I(3),Z(e.callCount),I(4),Z(n.describe(e.lastArgs)),I(4),Z(n.describe(e.lastResult)),I(),z(e.instances?.length?12:-1),I(),z(e.lastCaller?13:-1)}}function YA(e,t){e&1&&(W(0,`dt`),X(1,`Calls`),G(),W(2,`dd`,6),X(3,`None recorded yet.`),G())}function XA(e,t){if(e&1&&(W(0,`div`,24)(1,`div`,27),X(2,`Live`),G(),R(3,UA,4,0,`p`,28),W(4,`dl`)(5,`dt`),X(6,`Instances`),G(),W(7,`dd`),X(8),G(),W(9,`dt`),X(10,`Used by`),G(),W(11,`dd`)(12,`ul`,26),B(13,WA,2,2,`li`,null,NA),G()(),R(15,JA,14,5)(16,YA,4,0),G()()),e&2){let e,n=t,r=Y(4);I(3),z(n.stale?3:-1),I(5),Z(n.instanceCount),I(5),V(n.components),I(2),z((e=n.call)?15:r.instrumenting()?16:-1,e)}}function ZA(e,t){e&1&&(W(0,`p`,25),X(1,`Not seen on the page yet.`),G())}function QA(e,t){if(e&1&&(W(0,`div`,23)(1,`dl`)(2,`dt`),X(3,`Class`),G(),W(4,`dd`),X(5),G(),W(6,`dt`),X(7,`Source`),G(),W(8,`dd`),X(9),G(),R(10,BA,4,2),W(11,`dt`),X(12,`Standalone`),G(),W(13,`dd`),X(14),G(),W(15,`dt`),X(16,`Pure`),G(),W(17,`dd`),X(18),G(),R(19,HA,6,1),G(),R(20,XA,17,3,`div`,24)(21,ZA,2,0,`p`,25),G()),e&2){let e,t=Y().$implicit,n=Y(2);I(5),Z(t.className),I(4),Z(t.builtin?`@angular/common`:`This project`),I(),z(t.builtin?-1:10),I(4),Z(t.isStandalone?`Yes`:`No`),I(4),Z(t.isPure?`Yes`:`No`),I(),z(t.builtin&&t.usages?.length?19:-1),I(),z((e=n.liveFor(t.name))?20:n.instrumenting()?21:-1,e)}}function $A(e,t){if(e&1){let e=K();W(0,`li`,14)(1,`button`,15),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).select(t))}),W(2,`div`,16)(3,`span`,17),X(4),G(),W(5,`span`,18),X(6),G(),R(7,LA,2,0,`span`,19),R(8,RA,2,0,`span`,20),G(),W(9,`div`,21),X(10),R(11,zA,2,1,`span`,22),G()(),R(12,QA,22,7,`div`,23),G()}if(e&2){let e=t.$implicit,n=Y(2);$g(`expanded`,n.isSelected(e)),I(),L(`aria-expanded`,n.isSelected(e)),I(2),$g(`impure`,!e.isPure),I(),Z(e.isPure?`pure`:`impure`),I(2),Z(e.name),I(),z(e.isStandalone?-1:7),I(),z(e.builtin?8:-1),I(2),w_(` `,e.file,`:`,e.line,` `),I(),z(e.builtin&&(e.usageCount??0)>1?11:-1),I(),z(n.isSelected(e)?12:-1)}}function ej(e,t){if(e&1&&(W(0,`ul`,7),B(1,$A,13,13,`li`,13,jA),G()),e&2){let e=Y();I(),V(e.filtered())}}function tj(e,t){e&1&&(W(0,`span`,19),X(1,`no source`),G())}function nj(e,t){e&1&&(W(0,`span`,29),X(1,`duplicate subscription`),G())}function rj(e,t){if(e&1&&(W(0,`li`,32)(1,`div`,33)(2,`span`,34),X(3),G(),R(4,tj,2,0,`span`,19),R(5,nj,2,0,`span`,29),G(),W(6,`div`,35),X(7),G()()),e&2){let e=t.$implicit;I(3),Z(e.component),I(),z(e.hasSource?-1:4),I(),z(e.duplicate?5:-1),I(2),Z(e.latestValue??`(none yet)`)}}function ij(e,t){if(e&1&&(W(0,`div`,8)(1,`h3`,10),X(2),G(),W(3,`ul`,31),B(4,rj,8,4,`li`,32,$h),G()()),e&2){let e=Y();I(2),Q(`Async pipes (`,e.async().length,`)`),I(2),V(e.async())}}function aj(e,t){e&1&&(W(0,`p`,11),X(1,`Couldn't run the lint check. Try Refresh.`),G())}function oj(e,t){e&1&&(W(0,`p`,6),X(1,`Checking…`),G())}function sj(e,t){e&1&&(W(0,`p`,6),X(1,`No problems found.`),G())}function cj(e,t){if(e&1&&(W(0,`li`,36)(1,`span`,37),X(2),G(),W(3,`code`,38),X(4),G(),W(5,`span`,39),X(6),G(),W(7,`div`,40),X(8),G(),W(9,`div`,41),X(10),G()()),e&2){let e=t.$implicit;I(),L(`data-tone`,e.severity===`info`?``:e.severity===`error`?`bad`:`warn`),I(),Z(e.severity),I(2),Z(e.rule),I(2),T_(`on `,e.pipe,` at `,e.file,`:`,e.line),I(2),Z(e.message),I(2),Q(`Fix: `,e.fix)}}function lj(e,t){if(e&1&&(W(0,`ul`,12),B(1,cj,11,8,`li`,36,$h),G()),e&2){let e=Y();I(),V(e.lint())}}var uj=class e{destroyRef=A(ms);rpc=Z_(null);pipes=F([]);filter=F(``);loading=F(!1);selected=F(null);filtered=F([]);live=F([]);async=F([]);lint=F(null);lintFailed=F(!1);instrumentedPages=F([]);instrumenting=F(!1);unsubscribe;constructor(){tc(()=>{let e=this.filter().toLowerCase(),t=this.pipes();this.filtered.set(e?t.filter(t=>t.name.toLowerCase().includes(e)||t.className.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t)}),tc(()=>{let e=this.rpc();e&&(this.refresh(),this.loadLive(e))}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async refresh(){let e=this.rpc();if(e){this.loading.set(!0);try{let t=await e.scope(`ng-devtools`).rpc.call(`get-pipes`);this.pipes.set(t);let n=this.selected();if(n){let e=t.find(e=>e.name===n.name&&e.file===n.file);this.selected.set(e??null)}}catch{}finally{this.loading.set(!1)}this.loadLint(e)}}async loadLint(e){this.lintFailed.set(!1);try{let t=await e.scope(`ng-devtools`).rpc.call(`pipe-lint`);this.lint.set(t)}catch{this.lintFailed.set(!0)}}async loadLive(e){try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.live.set(t?.pipes??[]),this.async.set(t?.async??[]);let n=t?.instrumented??[];this.instrumentedPages.set(n),this.instrumenting.set(n.length>0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}async toggleInstrument(){let e=this.rpc();if(!e)return;let t=!this.instrumenting();this.instrumenting.set(t);try{await e.scope(`ng-devtools`).rpc.call(`request-instrument-pipes`,t)}catch{this.instrumenting.set(!t)}}liveFor(e){return this.live().find(t=>t.name===e)}describe(e){if(Array.isArray(e))return e.map(e=>this.describe(e)).join(`, `);if(typeof e==`string`)return e.length>80?`${e.slice(0,80)}…`:e;try{let t=JSON.stringify(e);return t&&t.length>120?`${t.slice(0,120)}…`:t??String(e)}catch{return String(e)}}isSelected(e){let t=this.selected();return t!==null&&t.name===e.name&&t.file===e.file}select(e){this.selected.set(this.isSelected(e)?null:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-pipes-inspector`]],inputs:{rpc:[1,`rpc`]},decls:19,vars:9,consts:[[`filterInput`,``],[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter pipes…`,3,`input`,`value`],[3,`click`],[1,`instrument`,3,`click`],[1,`muted`,`instrument-hint`],[1,`muted`],[`role`,`list`,1,`pipe-list`],[1,`async-panel`],[1,`lint-panel`],[1,`async-heading`],[`role`,`alert`,1,`muted`],[`role`,`list`,1,`findings`],[1,`pipe-item`,3,`expanded`],[1,`pipe-item`],[1,`pipe-toggle`,3,`click`],[1,`name-row`],[1,`badge`],[1,`name`],[1,`badge`,`module`],[1,`badge`,`builtin`],[1,`file`],[1,`usage-count`],[1,`inline-detail`],[1,`live-section`],[1,`muted`,`live-hint`],[1,`usage-list`],[1,`live-heading`],[1,`stale-warning`],[1,`badge`,`impure`],[1,`mono`],[`role`,`list`,1,`async-list`],[1,`async-item`],[1,`async-row`],[1,`component`],[1,`mono`,`async-value`],[1,`finding`],[1,`tag`],[1,`finding-rule`],[1,`finding-meta`,`muted`],[1,`finding-message`],[1,`finding-fix`,`muted`]],template:function(e,t){if(e&1){let e=K();W(0,`div`,1)(1,`input`,2,0),J(`input`,function(){N(e);let n=jg(2);return P(t.filter.set(n.value))}),G(),W(3,`button`,3),J(`click`,function(){return t.refresh()}),X(4,`Refresh`),G(),W(5,`button`,4),J(`click`,function(){return t.toggleInstrument()}),X(6),G()(),R(7,PA,2,0,`p`,5),R(8,FA,2,0,`p`,6)(9,IA,2,0,`p`,6)(10,ej,3,0,`ul`,7),R(11,ij,6,1,`div`,8),W(12,`div`,9)(13,`h3`,10),X(14,`Lint`),G(),R(15,aj,2,0,`p`,11)(16,oj,2,0,`p`,6)(17,sj,2,0,`p`,6)(18,lj,3,0,`ul`,12),G()}e&2&&(I(),q(`value`,t.filter()),I(4),$g(`on`,t.instrumenting()),L(`aria-pressed`,t.instrumenting()),I(),Q(` `,t.instrumenting()?`Stop instrumenting`:`Instrument`,` `),I(),z(t.instrumenting()?7:-1),I(),z(t.loading()?8:t.filtered().length===0?9:10),I(3),z(t.async().length>0?11:-1),I(4),z(t.lintFailed()?15:t.lint()===null?16:t.lint().length?18:17))},styles:[`.toolbar[_ngcontent-%COMP%] { + display: flex; + gap: 8px; + margin-bottom: 16px; + } + input[_ngcontent-%COMP%] { + flex: 1; + padding: 8px 12px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 6px; + color: #e4e4e7; + font-size: 14px; + outline: none; + } + input[_ngcontent-%COMP%]:focus { + border-color: var(--%NS%accent); + } + button[_ngcontent-%COMP%] { + padding: 8px 16px; + background: #3f3f46; + border: none; + border-radius: 6px; + color: #e4e4e7; + cursor: pointer; + font-size: 13px; + } + button[_ngcontent-%COMP%]:hover { + background: #52525b; + } + button.instrument.on[_ngcontent-%COMP%] { + background: #7c2d12; + color: #fdba74; + } + .muted[_ngcontent-%COMP%] { + color: #71717a; + font-size: 14px; + } + .instrument-hint[_ngcontent-%COMP%] { + margin: -8px 0 16px; + } + .live-section[_ngcontent-%COMP%] { + padding: 12px 16px 4px; + border-top: 1px solid #27272a; + } + .live-heading[_ngcontent-%COMP%] { + font-size: 11px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + color: #71717a; + margin-bottom: 8px; + } + .live-hint[_ngcontent-%COMP%] { + padding: 0 16px 12px; + margin: 0; + } + .stale-warning[_ngcontent-%COMP%] { + display: flex; + align-items: baseline; + gap: 8px; + font-size: 12px; + color: #fdba74; + background: #431407; + border-radius: 6px; + padding: 8px 10px; + margin: 0 0 12px; + } + .mono[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 12px; + word-break: break-all; + } + .pipe-list[_ngcontent-%COMP%] { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + gap: 8px; + } + .pipe-item[_ngcontent-%COMP%] { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 0; + transition: border-color 0.15s; + } + .pipe-item[_ngcontent-%COMP%]:has(.pipe-toggle:hover) { + border-color: var(--%NS%accent); + } + .pipe-item.expanded[_ngcontent-%COMP%] { + border-color: var(--%NS%accent); + } + .pipe-toggle[_ngcontent-%COMP%] { + display: block; + width: 100%; + padding: 12px 16px; + background: none; + border: none; + color: inherit; + text-align: left; + cursor: pointer; + font: inherit; + } + .name-row[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 8px; + } + .name[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 15px; + color: var(--%NS%accent); + font-weight: 600; + } + .badge[_ngcontent-%COMP%] { + font-size: 11px; + padding: 2px 8px; + border-radius: 4px; + background: #14532d; + color: #4ade80; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + } + .badge.impure[_ngcontent-%COMP%] { + background: #7c2d12; + color: #fdba74; + } + .badge.module[_ngcontent-%COMP%] { + background: #3f3f46; + color: #a1a1aa; + } + .badge.builtin[_ngcontent-%COMP%] { + background: #1e3a8a; + color: #93c5fd; + } + .file[_ngcontent-%COMP%] { + font-size: 12px; + color: #71717a; + margin-top: 2px; + } + .usage-count[_ngcontent-%COMP%] { + margin-left: 6px; + color: #52525b; + } + .usage-list[_ngcontent-%COMP%] { + list-style: none; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + gap: 2px; + } + .inline-detail[_ngcontent-%COMP%] { + padding: 0 16px 12px; + border-top: 1px solid #27272a; + margin-top: 0; + padding-top: 12px; + } + dl[_ngcontent-%COMP%] { + display: grid; + grid-template-columns: auto 1fr; + gap: 4px 12px; + font-size: 13px; + } + dt[_ngcontent-%COMP%] { + color: #71717a; + } + dd[_ngcontent-%COMP%] { + color: #e4e4e7; + } + .async-panel[_ngcontent-%COMP%] { + margin-top: 20px; + } + .async-heading[_ngcontent-%COMP%] { + font-size: 13px; + font-weight: 600; + color: #a1a1aa; + margin: 0 0 8px; + } + .async-list[_ngcontent-%COMP%] { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + gap: 8px; + } + .async-item[_ngcontent-%COMP%] { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 10px 16px; + } + .async-row[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 8px; + } + .component[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 13px; + color: var(--%NS%accent); + } + .async-value[_ngcontent-%COMP%] { + margin-top: 4px; + color: #a1a1aa; + } + .lint-panel[_ngcontent-%COMP%] { + margin-top: 20px; + } + .findings[_ngcontent-%COMP%] { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + gap: 8px; + font-size: 13px; + } + .finding[_ngcontent-%COMP%] { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 10px 16px; + } + .finding-rule[_ngcontent-%COMP%] { + color: #c4b5fd; + } + .finding-meta[_ngcontent-%COMP%], + .finding-message[_ngcontent-%COMP%], + .finding-fix[_ngcontent-%COMP%] { + display: block; + margin-top: 0.5rem; + } + .tag[_ngcontent-%COMP%] { + display: inline-block; + margin: 0 4px 2px 0; + padding: 0 5px; + border: 1px solid #3f3f46; + border-radius: 4px; + color: #d4d4d8; + font-size: 11px; + } + .tag[data-tone='warn'][_ngcontent-%COMP%] { + border-color: #a16207; + color: #fef08a; + } + .tag[data-tone='bad'][_ngcontent-%COMP%] { + border-color: #b91c1c; + color: #fca5a5; + }`]})},dj=()=>[],fj=()=>[`/`],pj=(e,t)=>t.id,mj=(e,t)=>t.route.id,hj=(e,t)=>t[0],gj=(e,t)=>t.file+t.method,_j=(e,t)=>t.mode,vj=(e,t)=>t.path,yj=(e,t)=>t.file,bj=(e,t)=>t.rule;function xj(e,t){e&1&&(W(0,`p`,0),X(1,`Reading the project…`),G())}function Sj(e,t){e&1&&(W(0,`div`,1)(1,`p`),X(2,`This app is not an Analog app.`),G(),W(3,`p`,2),X(4,` Add `),W(5,`code`),X(6,`ngDevtools()`),G(),X(7,` from `),W(8,`code`),X(9,`@santoshyadavdev/ng-devtools/vite`),G(),X(10,` next to `),W(11,`code`),X(12,`analog()`),G(),X(13,` in vite.config.ts and run the Analog dev server. `),G()())}function Cj(e,t){e&1&&(W(0,`div`,7)(1,`span`,5),X(2,`Open in the browser`),G(),W(3,`span`,11),X(4),G()()),e&2&&(I(4),Z(t.url))}function wj(e,t){if(e&1){let e=K();W(0,`button`,12),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).view.set(t.id))}),X(1),W(2,`span`,13),X(3),G()()}if(e&2){let e=t.$implicit,n=Y(2);q(`id`,`analog-tab-`+e.id),L(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),I(),Q(` `,e.label,` `),I(),L(`data-tone`,e.tone),I(),Z(e.count)}}function Tj(e,t){if(e&1&&(W(0,`li`)(1,`span`,27),X(2),G(),W(3,`span`,28),X(4),G()()),e&2){let e=t.$implicit,n=Y(5);I(2),Z(n.short(e.file)??e.fullPath),I(),L(`data-kind`,e.kind),I(),Z(e.kind)}}function Ej(e,t){if(e&1&&(W(0,`span`,29),X(1),G()),e&2){let e=t.$implicit;I(),w_(``,e[0],` = `,e[1])}}function Dj(e,t){if(e&1&&(W(0,`div`,26),B(1,Ej,2,2,`span`,29,hj),G()),e&2){let e=Y(2),t=Y(3);I(),V(t.paramList(e.params))}}function Oj(e,t){if(e&1&&(W(0,`strong`),X(1),G(),X(2,` renders `),W(3,`ol`,25),B(4,Tj,5,3,`li`,null,pj),G(),R(6,Dj,3,0,`div`,26)),e&2){let e=Y(),t=Y(3);I(),Z(t.testUrl()),I(3),V(e.chain),I(2),z(t.paramList(e.params).length?6:-1)}}function kj(e,t){if(e&1&&(W(0,`li`)(1,`span`,27),X(2),G(),W(3,`span`,2),X(4),G()()),e&2){let e=t.$implicit,n=Y(6);I(2),Z(n.short(e.file)??e.path),I(2),Z(e.reason)}}function Aj(e,t){if(e&1&&(W(0,`ul`,30),B(1,kj,5,2,`li`,null,$h),G()),e&2){let e=Y(2);I(),V(e.rejected.slice(0,5))}}function jj(e,t){if(e&1&&(W(0,`strong`),X(1),G(),X(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),R(3,Aj,3,0,`ul`,30)),e&2){let e=Y(),t=Y(3);I(),Z(t.testUrl()),I(2),z(e.rejected.length?3:-1)}}function Mj(e,t){if(e&1&&(W(0,`div`,21),R(1,Oj,7,2)(2,jj,4,2),G()),e&2){let e=t;L(`data-tone`,e.matched?`good`:`bad`),I(),z(e.matched?1:2)}}function Nj(e,t){e&1&&(W(0,`span`,32),X(1,`└`),G())}function Pj(e,t){e&1&&(W(0,`span`,34),X(1,`open`),G())}function Fj(e,t){if(e&1&&(W(0,`span`,35)(1,`span`,38),X(2),G(),X(3),G()),e&2){let e=Y().$implicit,t=Y(3);I(2),Z(t.dir(e.route.file)),I(),Z(t.base(e.route.file))}}function Ij(e,t){e&1&&(W(0,`span`,2),X(1,`folder only`),G())}function Lj(e,t){if(e&1&&(W(0,`span`,36),X(1),G()),e&2){let e=t.$implicit;I(),Q(``,e,`()`)}}function Rj(e,t){if(e&1&&(W(0,`span`,37),X(1),G()),e&2){let e=Y().$implicit;I(),Q(`"`,e.route.title,`"`)}}function zj(e,t){if(e&1&&(W(0,`span`,29),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e)}}function Bj(e,t){if(e&1&&R(0,zj,2,1,`span`,29),e&2){let e=t.$implicit;z(e===`title`?-1:0)}}function Vj(e,t){if(e&1&&(W(0,`tr`)(1,`td`)(2,`div`,31),R(3,Nj,2,0,`span`,32),W(4,`span`,33),X(5),G(),W(6,`span`,28),X(7),G(),R(8,Pj,2,0,`span`,34),G()(),W(9,`td`),R(10,Fj,4,2,`span`,35)(11,Ij,2,0,`span`,2),G(),W(12,`td`),B(13,Lj,2,1,`span`,36,eg),G(),W(15,`td`),R(16,Rj,2,1,`span`,37),B(17,Bj,1,1,null,null,eg),G()()),e&2){let e=t.$implicit,n=Y(3);$g(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),I(2),Qg(`padding-left`,e.depth*18,`px`),I(),z(e.depth?3:-1),I(2),Z(e.route.fullPath),I(),L(`data-kind`,e.route.kind),I(),Z(n.kindText(e.route)),I(),z(n.isOpen(e.route)?8:-1),I(2),z(e.route.file?10:11),I(3),V(n.serverExports(e.route)),I(3),z(e.route.title?16:-1),I(),V(e.route.routeMeta??D_(13,dj))}}function Hj(e,t){e&1&&(W(0,`tr`)(1,`td`,39),X(2,`No route matches the filter.`),G()())}function Uj(e,t){if(e&1){let e=K();W(0,`div`,14)(1,`form`,15),J(`submit`,function(t){N(e);let n=Y(2);return t.preventDefault(),P(n.explain())}),W(2,`label`,16),X(3,`Test a URL`),G(),W(4,`input`,17),J(`input`,function(t){return N(e),P(Y(2).testUrl.set(t.target.value))}),G(),W(5,`button`,18),X(6,`Explain`),G()(),W(7,`label`,19),X(8,`Filter routes`),G(),W(9,`input`,20),J(`input`,function(t){return N(e),P(Y(2).filter.set(t.target.value))}),G()(),R(10,Mj,3,2,`div`,21),W(11,`div`,22)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,23),X(16,`Route`),G(),W(17,`th`,23),X(18,`File`),G(),W(19,`th`,23),X(20,`Data`),G(),W(21,`th`,23),X(22,`Route meta`),G()()(),W(23,`tbody`),B(24,Vj,19,14,`tr`,24,mj,!1,Hj,3,0,`tr`),G()()()}if(e&2){let e,t=Y(2);I(4),q(`value`,t.testUrl()),I(5),q(`value`,t.filter()),I(),z((e=t.match())?10:-1,e),I(14),V(t.routeRows())}}function Wj(e,t){if(e&1&&(W(0,`span`,27),X(1),G(),X(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;I(),Z(e),I(),Q(``,n===r-1?``:`, `,` `)}}function Gj(e,t){if(e&1&&(W(0,`div`,40)(1,`strong`),X(2,`load() ran twice`),G(),X(3,` for `),B(4,Wj,3,2,null,null,eg),X(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),G()),e&2){let e=Y(3);I(4),V(e.duplicates())}}function Kj(e,t){if(e&1){let e=K();W(0,`label`)(1,`input`,54),J(`change`,function(){let t=N(e).$implicit;return P(Y(3).kind.set(t))}),G(),X(2),W(3,`span`,2),X(4),G()()}if(e&2){let e=t.$implicit,n=Y(3);$g(`on`,n.kind()===e),I(),q(`checked`,n.kind()===e),I(),Q(` `,n.kindLabel(e),` `),I(2),Z(n.kindCount(e))}}function qj(e,t){if(e&1&&(W(0,`span`,28),X(1),G()),e&2){let e=Y().$implicit;L(`data-mode`,e.render===`ssr`?`ssr`:`client`),I(),Z(e.render===`ssr`?`server rendered`:`client only`)}}function Jj(e,t){if(e&1&&(W(0,`details`)(1,`summary`),X(2,`Response`),G(),W(3,`pre`,61),X(4),G()()),e&2){let e=Y().$implicit,t=Y(4);I(4),Z(t.pretty(e.preview))}}function Yj(e,t){if(e&1&&(W(0,`tr`)(1,`td`,56),X(2),G(),W(3,`td`)(4,`span`,28),X(5),G()(),W(6,`td`,57)(7,`span`,58),X(8),G(),W(9,`span`,27),X(10),G(),R(11,qj,2,2,`span`,28),R(12,Jj,5,1,`details`),G(),W(13,`td`)(14,`span`,59),X(15),G()(),W(16,`td`,60),X(17),G(),W(18,`td`,2),X(19),G()()),e&2){let e=t.$implicit,n=Y(4);I(2),Z(n.time(e.at)),I(2),L(`data-call`,e.kind),I(),Z(n.kindLabel(e.kind)),I(2),L(`data-method`,e.method),I(),Z(e.method),I(2),Z(e.url),I(),z(e.render?11:-1),I(),z(e.preview?12:-1),I(2),L(`data-status`,n.statusClass(e.status)),I(),Z(e.status),I(2),Q(``,e.ms,` ms`),I(2),Z(e.from)}}function Xj(e,t){if(e&1&&(W(0,`div`,44)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,23),X(5,`Time`),G(),W(6,`th`,23),X(7,`Kind`),G(),W(8,`th`,23),X(9,`Request`),G(),W(10,`th`,23),X(11,`Status`),G(),W(12,`th`,55),X(13,`Time`),G(),W(14,`th`,23),X(15,`From`),G()()(),W(16,`tbody`),B(17,Yj,20,12,`tr`,null,pj),G()()()),e&2){let e=Y(3);I(17),V(e.calls())}}function Zj(e,t){e&1&&(W(0,`p`,2),X(1,` No calls yet. Navigate in the app to see page renders, load() fetches and API calls. `),G())}function Qj(e,t){if(e&1){let e=K();W(0,`tr`)(1,`td`)(2,`span`,58),X(3),G()(),W(4,`td`,27),X(5),G(),W(6,`td`)(7,`span`,35)(8,`span`,38),X(9),G(),X(10),G()(),W(11,`td`)(12,`button`,62),J(`click`,function(){let t=N(e).$implicit;return P(Y(3).tryApi(t))}),X(13,` Try `),G()()()}if(e&2){let e=t.$implicit,n=Y(3);I(2),L(`data-method`,e.method),I(),Z(e.method),I(2),Z(e.path),I(4),Z(n.dir(e.file)),I(),Z(n.base(e.file)),I(2),L(`aria-label`,`Try `+e.method+` `+e.path)}}function $j(e,t){if(e&1&&(W(0,`option`,50),X(1),G()),e&2){let e=t.$implicit;q(`value`,e),I(),Z(e)}}function eM(e,t){if(e&1){let e=K();W(0,`label`,63),X(1,`JSON body`),G(),W(2,`textarea`,64),J(`input`,function(t){return N(e),P(Y(3).apiBody.set(t.target.value))}),G(),W(3,`label`,65)(4,`input`,66),J(`change`,function(){N(e);let t=Y(3);return P(t.confirmSend.set(!t.confirmSend()))}),G(),X(5,` This request can change data on the dev server`),G()}if(e&2){let e=Y(3);I(2),q(`value`,e.apiBody()),I(2),q(`checked`,e.confirmSend())}}function tM(e,t){if(e&1&&(W(0,`span`,67),X(1,`Refused`),G(),W(2,`span`),X(3),G()),e&2){let e=Y();I(3),Z(e.error)}}function nM(e,t){if(e&1&&(W(0,`div`,47)(1,`span`,59),X(2),G(),W(3,`span`,2),X(4),G()(),W(5,`pre`,61),X(6),G()),e&2){let e=Y(),t=Y(3);I(),L(`data-status`,t.statusClass(e.status??0)),I(),Z(e.status),I(2),w_(``,e.ms,` ms · `,e.type||`no content type`),I(2),Z(t.pretty(e.body??``))}}function rM(e,t){e&1&&(W(0,`div`,53),R(1,tM,4,1)(2,nM,7,5),G()),e&2&&(I(),z(t.error?1:2))}function iM(e,t){if(e&1){let e=K();R(0,Gj,7,0,`div`,40),W(1,`fieldset`,41)(2,`legend`,42),X(3,`Show calls of kind`),G(),B(4,Kj,5,5,`label`,43,eg),G(),R(6,Xj,19,0,`div`,44)(7,Zj,2,0,`p`,2),W(8,`h3`),X(9,`API routes`),G(),W(10,`div`,45)(11,`table`)(12,`thead`)(13,`tr`)(14,`th`,23),X(15,`Method`),G(),W(16,`th`,23),X(17,`Path`),G(),W(18,`th`,23),X(19,`File`),G(),W(20,`th`,23)(21,`span`,42),X(22,`Actions`),G()()()(),W(23,`tbody`),B(24,Qj,14,6,`tr`,null,gj),G()()(),W(26,`form`,46),J(`submit`,function(t){N(e);let n=Y(2);return t.preventDefault(),P(n.send())}),W(27,`h3`),X(28,`Request playground`),G(),W(29,`div`,47)(30,`label`,48),X(31,`Method`),G(),W(32,`select`,49),J(`change`,function(t){return N(e),P(Y(2).method.set(t.target.value))}),B(33,$j,2,2,`option`,50,eg),G(),W(35,`label`,51),X(36,`Path`),G(),W(37,`input`,52),J(`input`,function(t){return N(e),P(Y(2).apiPath.set(t.target.value))}),G(),W(38,`button`,18),X(39,`Send`),G()(),R(40,eM,6,2),R(41,rM,3,1,`div`,53),G()}if(e&2){let e,t=Y(2);z(t.duplicates().length?0:-1),I(4),V(t.kinds),I(2),z(t.calls().length?6:7),I(18),V(t.project().api),I(8),q(`value`,t.method()),I(),V(t.methods),I(4),q(`value`,t.apiPath()),I(3),z(t.method()===`GET`?-1:40),I(),z((e=t.response())?41:-1,e)}}function aM(e,t){if(e&1&&(W(0,`span`,28),X(1),G()),e&2){let e=t.$implicit;L(`data-mode`,e.mode),I(),w_(``,e.label,` · `,e.count)}}function oM(e,t){e&1&&(W(0,`span`,71),X(1,`differs from config`),G())}function sM(e,t){if(e&1&&(W(0,`span`,59),X(1),G(),W(2,`span`,70),X(3),G(),R(4,oM,2,0,`span`,71)),e&2){let e=t,n=Y().$implicit,r=Y(3);L(`data-status`,r.statusClass(e.status)),I(),Z(e.status),I(2),w_(``,e.render===`client`?`client only`:`server rendered`,` · `,e.ms,` ms`),I(),z(r.mismatch(n)?4:-1)}}function cM(e,t){e&1&&(W(0,`span`,70),X(1,`not requested yet`),G())}function lM(e,t){if(e&1&&(W(0,`span`,35)(1,`span`,38),X(2),G(),X(3),G()),e&2){let e=Y().$implicit,t=Y(3);I(2),Z(t.dir(e.file)),I(),Z(t.base(e.file))}}function uM(e,t){if(e&1&&(W(0,`tr`)(1,`td`,33),X(2),G(),W(3,`td`)(4,`span`,28),X(5),G(),W(6,`span`,70),X(7),G()(),W(8,`td`),R(9,sM,5,5)(10,cM,2,0,`span`,70),G(),W(11,`td`),R(12,lM,4,2,`span`,35),G()()),e&2){let e,n=t.$implicit,r=Y(3);I(2),Z(n.path),I(2),L(`data-mode`,n.mode),I(),Z(r.modeLabel(n.mode)),I(2),Z(n.reason),I(2),z((e=n.last)?9:10,e),I(3),z(n.file?12:-1)}}function dM(e,t){e&1&&(W(0,`p`,2),X(1,` prerender.routes is a function, so the list is known only at build time. `),G())}function fM(e,t){if(e&1&&(W(0,`span`,29),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function pM(e,t){e&1&&(W(0,`span`,70),X(1,`default, nothing configured`),G())}function mM(e,t){if(e&1&&(W(0,`span`,73),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function hM(e,t){if(e&1&&(W(0,`dt`),X(1,`Static, not listed`),G(),W(2,`dd`),B(3,mM,2,1,`span`,73,eg),G()),e&2){let e=Y(2);I(3),V(e.staticMissing)}}function gM(e,t){if(e&1&&(W(0,`span`,29),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function _M(e,t){if(e&1&&(W(0,`dt`),X(1,`Need explicit entries`),G(),W(2,`dd`),B(3,gM,2,1,`span`,29,eg),G()),e&2){let e=Y(2);I(3),V(e.dynamic)}}function vM(e,t){if(e&1&&(W(0,`span`,74),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function yM(e,t){if(e&1&&(X(0,` · missing `),B(1,vM,2,1,`span`,74,eg)),e&2){let e=Y(3);I(),V(e.notBuilt)}}function bM(e,t){if(e&1&&(X(0),R(1,yM,3,0)),e&2){let e=Y(2);Q(` `,e.built.length,` page(s) in dist/analog/public `),I(),z(e.notBuilt.length?1:-1)}}function xM(e,t){e&1&&(W(0,`span`,70),X(1,`no build yet`),G())}function SM(e,t){if(e&1&&(W(0,`dl`,72)(1,`dt`),X(2,`Listed`),G(),W(3,`dd`),B(4,fM,2,1,`span`,29,eg),R(6,pM,2,0,`span`,70),G(),R(7,hM,5,0),R(8,_M,5,0),W(9,`dt`),X(10,`Build output`),G(),W(11,`dd`),R(12,bM,2,2)(13,xM,2,0,`span`,70),G()()),e&2){let e=Y();I(4),V(e.listed??D_(4,fj)),I(2),z(e.listed?-1:6),I(),z(e.staticMissing.length?7:-1),I(),z(e.dynamic.length?8:-1),I(4),z(e.built.length?12:13)}}function CM(e,t){e&1&&(W(0,`div`,69)(1,`h3`),X(2,`Prerender plan`),G(),R(3,dM,2,0,`p`,2)(4,SM,14,5,`dl`,72),G()),e&2&&(I(3),z(t.dynamicConfig?3:4))}function wM(e,t){if(e&1&&(W(0,`div`,26),B(1,aM,2,3,`span`,28,_j),G(),W(3,`div`,68)(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,23),X(8,`Route`),G(),W(9,`th`,23),X(10,`Configured`),G(),W(11,`th`,23),X(12,`Last request`),G(),W(13,`th`,23),X(14,`File`),G()()(),W(15,`tbody`),B(16,uM,13,6,`tr`,null,vj),G()()(),R(18,CM,5,1,`div`,69)),e&2){let e,t=Y(2);I(),V(t.modeCounts()),I(15),V(t.renderRows()),I(2),z((e=t.plan())?18:-1,e)}}function TM(e,t){if(e&1&&(W(0,`div`)(1,`span`,76),X(2),G()()),e&2){let e=Y().$implicit;I(2),Z(e.error)}}function EM(e,t){if(e&1&&(W(0,`div`)(1,`span`,71),X(2),G()()),e&2){let e=Y(5);I(2),Q(`takes over `,e.base(t))}}function DM(e,t){if(e&1&&(W(0,`tr`)(1,`td`)(2,`strong`),X(3),G(),R(4,TM,3,1,`div`),R(5,EM,3,1,`div`),G(),W(6,`td`,33),X(7),G(),W(8,`td`,27),X(9),G(),W(10,`td`,56),X(11),G(),W(12,`td`)(13,`span`,35)(14,`span`,38),X(15),G(),X(16),G()()()),e&2){let e,n=t.$implicit,r=Y(4);I(3),Z(n.attributes.title||`(no title)`),I(),z(n.error?4:-1),I(),z((e=r.shadowed(n.file))?5:-1,e),I(2),Z(r.contentUrl(n.file)??``),I(2),Z(n.slug),I(2),Z(n.attributes.date||``),I(4),Z(r.dir(n.file)),I(),Z(r.base(n.file))}}function OM(e,t){if(e&1&&(W(0,`div`,75)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,23),X(5,`Title`),G(),W(6,`th`,23),X(7,`URL`),G(),W(8,`th`,23),X(9,`Slug`),G(),W(10,`th`,23),X(11,`Date`),G(),W(12,`th`,23),X(13,`File`),G()()(),W(14,`tbody`),B(15,DM,17,8,`tr`,null,yj),G()()()),e&2){let e=Y(3);I(15),V(e.project().content)}}function kM(e,t){e&1&&(W(0,`p`,2),X(1,`No markdown files under src/content.`),G())}function AM(e,t){e&1&&R(0,OM,17,0,`div`,75)(1,kM,2,0,`p`,2),e&2&&z(+!Y(2).project().content.length)}function jM(e,t){if(e&1&&(W(0,`span`,13),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.items.length)}}function MM(e,t){if(e&1&&(W(0,`span`,35)(1,`span`,38),X(2),G(),X(3),G()),e&2){let e=Y().$implicit,t=Y(5);I(2),Z(t.dir(e.file)),I(),Z(t.base(e.file))}}function NM(e,t){if(e&1&&(W(0,`span`,33),X(1),G()),e&2){let e=Y().$implicit;I(),Z(e.path)}}function PM(e,t){if(e&1&&(W(0,`li`),R(1,MM,4,2,`span`,35),R(2,NM,2,1,`span`,33),G()),e&2){let e=t.$implicit;I(),z(e.file?1:-1),I(),z(e.path&&e.path!==e.file?2:-1)}}function FM(e,t){if(e&1&&(W(0,`li`)(1,`div`,79)(2,`span`,28),X(3),G(),W(4,`strong`,80),X(5),G(),R(6,jM,2,1,`span`,13),G(),W(7,`p`),X(8),G(),W(9,`ul`,81),B(10,PM,3,2,`li`,null,$h),G(),W(12,`div`,82)(13,`strong`),X(14,`How to fix`),G(),X(15),G(),W(16,`span`,83),X(17),G()()),e&2){let e=t.$implicit,n=Y(4);L(`data-tone`,n.tone(e.severity)),I(2),L(`data-tone`,n.tone(e.severity)),I(),Z(e.severity),I(2),Z(e.title),I(),z(e.items.length>1?6:-1),I(2),Z(e.summary),I(2),V(e.items),I(5),Q(` `,e.fix),I(2),Z(e.rule)}}function IM(e,t){if(e&1&&(W(0,`p`,2),X(1),G(),W(2,`ul`,78),B(3,FM,18,8,`li`,null,bj),G()),e&2){let e=Y(3);I(),w_(` `,e.findings().length,` issue(s) in `,e.lintCards().length,` group(s). Each card says what is wrong, where, and how to fix it. `),I(2),V(e.lintCards())}}function LM(e,t){e&1&&(W(0,`div`,77),X(1,`No Analog problems found.`),G())}function RM(e,t){e&1&&R(0,IM,5,2)(1,LM,2,0,`div`,77),e&2&&z(+!Y(2).findings().length)}function zM(e,t){if(e&1){let e=K();W(0,`section`,3)(1,`div`,4)(2,`span`,5),X(3,`Analog`),G(),W(4,`span`,6),X(5),G()(),W(6,`div`,4)(7,`span`,5),X(8,`Pages`),G(),W(9,`span`,6),X(10),G()(),W(11,`div`,4)(12,`span`,5),X(13,`API routes`),G(),W(14,`span`,6),X(15),G()(),W(16,`div`,4)(17,`span`,5),X(18,`Server calls`),G(),W(19,`span`,6),X(20),G()(),W(21,`div`,4)(22,`span`,5),X(23,`Issues`),G(),W(24,`span`,6),X(25),G()(),R(26,Cj,5,1,`div`,7),G(),W(27,`div`,8),J(`keydown`,function(t){return N(e),P(Y().onKey(t))}),B(28,wj,4,7,`button`,9,pj),G(),W(30,`div`,10),R(31,Uj,27,4)(32,iM,42,6)(33,wM,19,1)(34,AM,2,1)(35,RM,2,1),G()}if(e&2){let e,t,n=Y();I(5),Z(n.project().version),I(5),Z(n.pageCount()),I(5),Z(n.project().api.length),I(5),Z(n.allCalls().length),I(),L(`data-tone`,n.findings().length?`warn`:`good`),I(4),Z(n.findings().length),I(),z((e=n.page())?26:-1,e),I(2),V(n.views()),I(2),q(`id`,`analog-panel-`+n.view()),L(`aria-labelledby`,`analog-tab-`+n.view()),I(),z((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`lint`?35:-1)}}var BM={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports nothing Analog calls.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},VM={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`},HM={all:`All`,page:`Pages`,load:`load()`,fn:`Server fn`,api:`API`};function UM(e,t,n){return e?e.scope(`ng-devtools`).rpc.call(t,...n===void 0?[]:[n]).then(e=>e,()=>null):Promise.resolve(null)}function WM(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),WM(r.children,t+1,n);return n}var GM=class e{rpc=Z_(null);kinds=[`all`,`page`,`load`,`fn`,`api`];methods=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];view=F(`routes`);project=F(null);state=F({});findings=F([]);renderRows=F([]);plan=F(null);filter=F(``);testUrl=F(``);match=F(null);kind=F(`all`);method=F(`GET`);apiPath=F(``);apiBody=F(``);confirmSend=F(!1);response=F(null);unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=A(ms);page=$(()=>this.state().pages?.[0]??null);openFiles=$(()=>new Set((this.page()?.chain??[]).map(e=>e.file)));allCalls=$(()=>this.state().calls??[]);calls=$(()=>{let e=this.kind();return this.allCalls().filter(t=>e===`all`||t.kind===e).slice(-150).reverse()});allRoutes=$(()=>WM(this.project()?.routes??[]));pageCount=$(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=$(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});duplicates=$(()=>{let e=new Map,t=new Set;for(let n of this.allCalls()){if(n.kind!==`load`)continue;let r=n.url.replace(/^.*\/_analog\/pages/,``).replace(/\/index$/,``)||`/`;n.from===`ssr`?e.set(r,n.at):n.from===`browser`&&(e.get(r)??-1/0)>n.at-15e3&&t.add(r)}return Array.from(t)});modeCounts=$(()=>[`ssr`,`ssg`,`client`].map(e=>({mode:e,label:VM[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=$(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=BM[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}n.items.push({file:e.file,path:e.path})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});views=$(()=>{let e=this.findings().length;return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.allCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`lint`,label:`Lint`,count:e,tone:e?`warn`:``}]});constructor(){tc(()=>{let e=this.rpc();e&&U_(()=>void this.load(e))}),tc(()=>{let e=this.view();this.state(),U_(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){this.project.set(await UM(e,`analog-project`));try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`analog`),n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}await this.refresh(this.view())}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([UM(t,`analog-lint`),UM(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`)){let e=await UM(t,`analog-project`);e&&n===this.refreshRun&&this.project.set(e)}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return HM[e]}kindCount(e){return e===`all`?this.allCalls().length:this.allCalls().filter(t=>t.kind===e).length}modeLabel(e){return VM[e]}mismatch(e){return e.last?.render?e.mode===`client`?e.last.render!==`client`:e.last.render===`client`:!1}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.message.match(/(\/\S+\.page\.ts)/)?.[1]}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time(e){return new Date(e).toLocaleTimeString()}tryApi(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.apiPath.set(e.path.replace(/:(\w+)/g,`1`).replace(`**`,`x`)),this.response.set(null),queueMicrotask(()=>document.getElementById(`api-path`)?.focus())}async explain(){let e=this.testUrl().trim();e&&this.match.set(await UM(this.rpc(),`analog-explain-url`,e))}async send(){let e=this.apiPath().trim();if(!e)return;let t;if(this.method()!==`GET`&&this.apiBody().trim())try{t=JSON.parse(this.apiBody())}catch{this.response.set({error:`The body is not valid JSON.`});return}let n=await UM(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t,confirm:this.confirmSend()});this.response.set(n??{error:`No answer from the devtools server.`})}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:3,vars:1,consts:[[1,`muted`,`pad`],[1,`empty`],[1,`muted`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[1,`value`,`mono`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`btn`],[`for`,`route-filter`,1,`sr-only`],[`id`,`route-filter`,`type`,`search`,`placeholder`,`Filter by path or file`,1,`field`,3,`input`,`value`],[`role`,`status`,1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[3,`open`,`dim`],[1,`chain`],[1,`chips`],[1,`mono`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`dir`],[`colspan`,`4`,1,`muted`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[1,`segmented`],[1,`sr-only`],[3,`on`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`,`playground`,3,`submit`],[1,`row`],[`for`,`api-method`,1,`sr-only`],[`id`,`api-method`,1,`field`,3,`change`,`value`],[3,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`role`,`status`,1,`response`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`status`],[1,`num`,`nowrap`],[1,`code`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[`for`,`api-body`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`data-status`,`bad`,1,`status`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[`data-tone`,`warn`,1,`pill`],[1,`facts`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[`data-tone`,`bad`,1,`pill`],[`data-tone`,`good`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`]],template:function(e,t){e&1&&R(0,xj,2,0,`p`,0)(1,Sj,14,0,`div`,1)(2,zM,36,10),e&2&&z(t.project()===null?0:t.project().analog?2:1)},styles:[`[_nghost-%COMP%] { --%NS%good: #4ade80; --%NS%warn: #facc15; --%NS%bad: #f87171; @@ -3006,7 +3256,7 @@ overflow: hidden; clip-path: inset(50%); white-space: nowrap; - }`]})},Uj=(e,t)=>t.pageId,Wj=(e,t)=>t.id,Gj=(e,t)=>t.side+t.id,Kj=(e,t)=>t.key;function qj(e,t){e&1&&(W(0,`p`,0),X(1,`Loading…`),G())}function Jj(e,t){e&1&&(W(0,`p`,1),X(1,`Could not reach the devtools server.`),G())}function Yj(e,t){if(e&1&&(W(0,`option`,4),X(1),G()),e&2){let e=t.$implicit;q(`value`,e.pageId),I(),Z(e.title||e.url)}}function Xj(e,t){e&1&&(W(0,`option`,5),X(1,`No connected page`),G())}function Zj(e,t){e&1&&(W(0,`span`,33),X(1,`transfer cache`),G())}function Qj(e,t){e&1&&(W(0,`span`,37),X(1,`faulted`),G())}function $j(e,t){if(e&1){let e=K();W(0,`tr`,32),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).selectedCallId.set(t.id))}),W(1,`td`)(2,`span`,33),X(3),G()(),W(4,`td`),X(5),G(),W(6,`td`,34)(7,`button`,35),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).selectedCallId.set(t.id))}),X(8),G()(),W(9,`td`),X(10),G(),W(11,`td`),X(12),G(),W(13,`td`,36),R(14,Zj,2,0,`span`,33),R(15,Qj,2,0,`span`,37),G()()}if(e&2){let e=t.$implicit;jg(`selected`,Y(2).selectedCall()?.id===e.id),I(2),jg(`server`,e.side===`server`),I(),Z(e.side===`server`?`SSR`:`Client`),I(2),Z(e.method),I(3),Q(` `,e.url,` `),I(),jg(`bad`,e.status===0||e.status>=400),I(),Q(` `,e.status||`ERR`,` `),I(2),Q(``,e.durationMs,` ms`),I(2),z(e.cacheHit?14:-1),I(),z(e.faulted?15:-1)}}function eM(e,t){if(e&1&&(W(0,`div`,11)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,30),X(5,`Side`),G(),W(6,`th`,30),X(7,`Method`),G(),W(8,`th`,30),X(9,`URL`),G(),W(10,`th`,30),X(11,`Status`),G(),W(12,`th`,30),X(13,`Time`),G(),W(14,`th`,30),X(15,`Notes`),G()()(),W(16,`tbody`),B(17,$j,16,13,`tr`,31,Gj),G()()()),e&2){let e=Y();I(17),V(e.timeline())}}function tM(e,t){e&1&&(W(0,`p`,0),X(1,` No requests yet. Add `),W(2,`code`),X(3,`withNgDevtools()`),G(),X(4,` to `),W(5,`code`),X(6,`provideHttpClient`),G(),X(7,`. `),G())}function nM(e,t){if(e&1&&(W(0,`h4`),X(1,`Response preview`),G(),W(2,`pre`),X(3),G()),e&2){let e=t;I(3),Z(e.error??e.preview??`(no body)`)}}function rM(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · `,e.delayMs,` ms `)}}function iM(e,t){e&1&&X(0,` · mock body `)}function aM(e,t){if(e&1){let e=K();W(0,`li`)(1,`label`,38)(2,`input`,39),J(`change`,function(){let t=N(e).$implicit;return P(Y().toggleRule(t.id))}),G(),W(3,`code`),X(4),G()(),W(5,`span`,40),X(6),R(7,rM,1,1),R(8,iM,1,0),G(),W(9,`button`,35),J(`click`,function(){let t=N(e).$implicit;return P(Y().removeRule(t.id))}),X(10,` Remove `),G()()}if(e&2){let e=t.$implicit;I(2),q(`checked`,e.enabled),L(`aria-label`,`Enable rule for `+e.pattern),I(2),n_(``,e.method||`ANY`,` `,e.pattern),I(2),n_(` `,e.target,` · `,e.status??200,` `),I(),z(e.delayMs?7:-1),I(),z(e.body?8:-1),I(),L(`aria-label`,`Remove rule for `+e.pattern)}}function oM(e,t){e&1&&(W(0,`li`,0),X(1,`No rules. SSR rules apply on the next page load.`),G())}function sM(e,t){if(e&1&&(W(0,`li`)(1,`code`),X(2),G()()),e&2){let e=t.$implicit;I(2),Z(e)}}function cM(e,t){if(e&1&&(W(0,`h4`),X(1,`ngSkipHydration hosts`),G(),W(2,`ul`,42),B(3,sM,3,1,`li`,null,jh),G()),e&2){let e=Y();I(3),V(e.skipHydrationHosts)}}function lM(e,t){if(e&1&&(W(0,`pre`,41),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function uM(e,t){e&1&&(W(0,`p`,40),X(1,`No hydration warnings.`),G())}function dM(e,t){if(e&1&&(W(0,`dl`)(1,`dt`),X(2,`Enabled`),G(),W(3,`dd`),X(4),G(),W(5,`dt`),X(6,`Hydrated components`),G(),W(7,`dd`),X(8),G(),W(9,`dt`),X(10,`Hydrated nodes`),G(),W(11,`dd`),X(12),G(),W(13,`dt`),X(14,`Skipped components`),G(),W(15,`dd`),X(16),G(),W(17,`dt`),X(18,`Incremental defer blocks`),G(),W(19,`dd`),X(20),G()(),R(21,cM,5,0),W(22,`h4`),X(23),G(),B(24,lM,2,1,`pre`,41,jh,!1,uM,2,0,`p`,40)),e&2){let e=t;I(4),Z(e.enabled?`yes`:`no (client render only)`),I(4),Z(e.hydratedComponents??`n/a`),I(4),Z(e.hydratedNodes??`n/a`),I(4),Z(e.componentsSkippedHydration??`n/a`),I(4),Z(e.deferBlocksWithIncrementalHydration??`n/a`),I(),z(e.skipHydrationHosts.length?21:-1),I(2),Q(`Warnings (`,e.warnings.length,`)`),I(),V(e.warnings)}}function fM(e,t){e&1&&(W(0,`p`,0),X(1,`No hydration data for this page.`),G())}function pM(e,t){e&1&&(W(0,`p`,0),X(1,`No TransferState script: this page was not server rendered.`),G())}function mM(e,t){if(e&1&&(W(0,`p`,43),X(1),G()),e&2){let e=Y(2);I(),Z(e.error)}}function hM(e,t){if(e&1&&(W(0,`span`,44),X(1),G(),X(2)),e&2){let e=t,n=Y().$implicit;I(),Q(`HTTP `,e.status),I(),Q(` `,e.url??n.key,` `)}}function gM(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` `,e.key,` `)}}function _M(e,t){if(e&1&&(W(0,`details`)(1,`summary`),R(2,hM,3,2)(3,gM,1,1),W(4,`span`,40),X(5),G()(),W(6,`pre`),X(7),u_(8,`json`),G()()),e&2){let e,n=t.$implicit;I(2),z((e=n.http)?2:3,e),I(3),Q(``,n.size,` B`),I(2),Z(f_(8,3,n.value))}}function vM(e,t){if(e&1&&(W(0,`p`,40),X(1),G(),R(2,mM,2,1,`p`,43),B(3,_M,9,5,`details`,null,Kj)),e&2){let e=Y();I(),r_(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),I(),z(e.error?2:-1),I(),V(e.entries)}}function yM(e,t){e&1&&R(0,pM,2,0,`p`,0)(1,vM,5,4),e&2&&z(+!!t.found)}function bM(e,t){e&1&&(W(0,`p`,0),X(1,`Open a page of the app to see its payload.`),G())}var xM={pattern:`/api/products`,method:``,target:`both`,status:`500`,delayMs:``,body:``};function SM(e,t,n){return e?e.scope(`ng-devtools`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}var CM=class e{rpc=k_(null);loading=F(!1);failed=F(!1);serverCalls=F([]);pages=F([]);rules=F([]);selectedPageId=F(null);selectedCallId=F(null);draft=F({...xM});message=F(``);unsubscribe=null;destroyRef=A(fs);selected=$(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e[0]??null});timeline=$(()=>[...this.serverCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));selectedCall=$(()=>this.timeline().find(e=>e.id===this.selectedCallId())??null);bodyError=$(()=>{let e=this.draft().body.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){$s(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`http`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}selectPage(e){this.selectedPageId.set(e.target.value||null),this.selectedCallId.set(null)}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}addRule(e){e.preventDefault();let t=this.draft();if(!t.pattern.trim()||this.bodyError())return;let n=Number(t.status),r=Number(t.delayMs),i={id:`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,pattern:t.pattern.trim(),enabled:!0,target:t.target,...t.method?{method:t.method}:{},...t.status&&Number.isFinite(n)?{status:n}:{},...t.delayMs&&Number.isFinite(r)?{delayMs:r}:{},...t.body.trim()?{body:t.body.trim()}:{}};this.saveRules([...this.rules(),i],`Rule added.`)}toggleRule(e){this.saveRules(this.rules().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Rule updated.`)}removeRule(e){this.saveRules(this.rules().filter(t=>t.id!==e),`Rule removed.`)}async clearCalls(){try{await SM(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}async saveRules(e,t){try{await SM(this.rpc(),`set-http-rules`,e),this.rules.set(e),this.message.set(`${t} Reload the page to apply SSR rules.`)}catch{this.message.set(`Could not save the rules.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-network-inspector`]],inputs:{rpc:[1,`rpc`]},decls:80,vars:19,consts:[[1,`muted`],[`role`,`alert`,1,`muted`],[1,`toolbar`],[3,`change`,`value`],[3,`value`],[`value`,``],[`type`,`button`,3,`click`],[`role`,`status`,1,`message`],[1,`grid`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[1,`table-wrap`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[1,`rule-form`,3,`submit`],[`required`,``,`placeholder`,`/api/products`,3,`input`,`value`],[1,`row`],[`value`,`both`],[`value`,`server`],[`value`,`client`],[`type`,`number`,`min`,`100`,`max`,`599`,3,`input`,`value`],[`type`,`number`,`min`,`0`,`max`,`10000`,3,`input`,`value`],[`rows`,`3`,`aria-describedby`,`body-error`,3,`input`,`value`],[`id`,`body-error`,1,`bad`,`small`],[`type`,`submit`,3,`disabled`],[1,`rules`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[`scope`,`col`],[3,`selected`],[3,`click`],[1,`tag`],[1,`url`],[`type`,`button`,1,`link`,3,`click`],[1,`notes`],[1,`tag`,`fault`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`],[1,`muted`,`small`],[1,`warn`],[1,`plain`],[`role`,`alert`,1,`bad`],[1,`tag`,`server`]],template:function(e,t){if(e&1&&(R(0,qj,2,0,`p`,0)(1,Jj,2,0,`p`,1),W(2,`div`,2)(3,`label`),X(4,` Page `),W(5,`select`,3),J(`change`,function(e){return t.selectPage(e)}),B(6,Yj,2,2,`option`,4,Uj,!1,Xj,2,0,`option`,5),G()(),W(9,`button`,6),J(`click`,function(){return t.clearCalls()}),X(10,`Clear timeline`),G(),W(11,`p`,7),X(12),G()(),W(13,`div`,8)(14,`section`,9)(15,`h3`,10),X(16),G(),R(17,eM,19,0,`div`,11)(18,tM,8,0,`p`,0),R(19,nM,4,1),G(),W(20,`section`,12)(21,`h3`,13),X(22,`Fault injection`),G(),W(23,`form`,14),J(`submit`,function(e){return t.addRule(e)}),W(24,`label`),X(25,` URL pattern (substring or * glob) `),W(26,`input`,15),J(`input`,function(e){return t.patch(`pattern`,e)}),G()(),W(27,`div`,16)(28,`label`),X(29,` Method `),W(30,`select`,3),J(`change`,function(e){return t.patch(`method`,e)}),W(31,`option`,5),X(32,`Any`),G(),W(33,`option`),X(34,`GET`),G(),W(35,`option`),X(36,`POST`),G(),W(37,`option`),X(38,`PUT`),G(),W(39,`option`),X(40,`PATCH`),G(),W(41,`option`),X(42,`DELETE`),G()()(),W(43,`label`),X(44,` Apply on `),W(45,`select`,3),J(`change`,function(e){return t.patch(`target`,e)}),W(46,`option`,17),X(47,`SSR + client`),G(),W(48,`option`,18),X(49,`SSR only`),G(),W(50,`option`,19),X(51,`Client only`),G()()()(),W(52,`div`,16)(53,`label`),X(54,` Status `),W(55,`input`,20),J(`input`,function(e){return t.patch(`status`,e)}),G()(),W(56,`label`),X(57,` Delay (ms) `),W(58,`input`,21),J(`input`,function(e){return t.patch(`delayMs`,e)}),G()()(),W(59,`label`),X(60,` Mock JSON body (optional) `),W(61,`textarea`,22),J(`input`,function(e){return t.patch(`body`,e)}),G()(),W(62,`p`,23),X(63),G(),W(64,`button`,24),X(65,` Add rule `),G()(),W(66,`ul`,25),B(67,aM,11,9,`li`,null,Wj,!1,oM,2,0,`li`,0),G()(),W(70,`section`,26)(71,`h3`,27),X(72,`Hydration`),G(),R(73,dM,27,8)(74,fM,2,0,`p`,0),G(),W(75,`section`,28)(76,`h3`,29),X(77,`TransferState payload`),G(),R(78,yM,2,1)(79,bM,2,0,`p`,0),G()()),e&2){let e,n,r;z(t.loading()?0:t.failed()?1:-1),I(5),q(`value`,t.selected()?.pageId??``),I(),V(t.pages()),I(6),Z(t.message()),I(4),Q(`HTTP timeline (`,t.timeline().length,`)`),I(),z(t.timeline().length?17:18),I(2),z((e=t.selectedCall())?19:-1,e),I(7),q(`value`,t.draft().pattern),I(4),q(`value`,t.draft().method),I(15),q(`value`,t.draft().target),I(10),q(`value`,t.draft().status),I(3),q(`value`,t.draft().delayMs),I(3),q(`value`,t.draft().body),L(`aria-invalid`,t.bodyError()?`true`:null),I(2),Z(t.bodyError()),I(),q(`disabled`,!t.draft().pattern.trim()||!!t.bodyError()),I(3),V(t.rules()),I(6),z((n=t.selected()?.hydration)?73:74,n),I(5),z((r=t.selected()?.payload)?78:79,r)}},dependencies:[Wv],styles:[`[_nghost-%COMP%] { + }`]})},KM=(e,t)=>t.pageId,qM=(e,t)=>t.id,JM=(e,t)=>t.side+t.id,YM=(e,t)=>t.key;function XM(e,t){e&1&&(W(0,`p`,0),X(1,`Loading…`),G())}function ZM(e,t){e&1&&(W(0,`p`,1),X(1,`Could not reach the devtools server.`),G())}function QM(e,t){if(e&1&&(W(0,`option`,4),X(1),G()),e&2){let e=t.$implicit;q(`value`,e.pageId),I(),Z(e.title||e.url)}}function $M(e,t){e&1&&(W(0,`option`,5),X(1,`No connected page`),G())}function eN(e,t){e&1&&(W(0,`span`,33),X(1,`transfer cache`),G())}function tN(e,t){e&1&&(W(0,`span`,37),X(1,`faulted`),G())}function nN(e,t){if(e&1){let e=K();W(0,`tr`,32),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).selectedCallId.set(t.id))}),W(1,`td`)(2,`span`,33),X(3),G()(),W(4,`td`),X(5),G(),W(6,`td`,34)(7,`button`,35),J(`click`,function(){let t=N(e).$implicit;return P(Y(2).selectedCallId.set(t.id))}),X(8),G()(),W(9,`td`),X(10),G(),W(11,`td`),X(12),G(),W(13,`td`,36),R(14,eN,2,0,`span`,33),R(15,tN,2,0,`span`,37),G()()}if(e&2){let e=t.$implicit;$g(`selected`,Y(2).selectedCall()?.id===e.id),I(2),$g(`server`,e.side===`server`),I(),Z(e.side===`server`?`SSR`:`Client`),I(2),Z(e.method),I(3),Q(` `,e.url,` `),I(),$g(`bad`,e.status===0||e.status>=400),I(),Q(` `,e.status||`ERR`,` `),I(2),Q(``,e.durationMs,` ms`),I(2),z(e.cacheHit?14:-1),I(),z(e.faulted?15:-1)}}function rN(e,t){if(e&1&&(W(0,`div`,11)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,30),X(5,`Side`),G(),W(6,`th`,30),X(7,`Method`),G(),W(8,`th`,30),X(9,`URL`),G(),W(10,`th`,30),X(11,`Status`),G(),W(12,`th`,30),X(13,`Time`),G(),W(14,`th`,30),X(15,`Notes`),G()()(),W(16,`tbody`),B(17,nN,16,13,`tr`,31,JM),G()()()),e&2){let e=Y();I(17),V(e.timeline())}}function iN(e,t){e&1&&(W(0,`p`,0),X(1,` No requests yet. Add `),W(2,`code`),X(3,`withNgDevtools()`),G(),X(4,` to `),W(5,`code`),X(6,`provideHttpClient`),G(),X(7,`. `),G())}function aN(e,t){if(e&1&&(W(0,`h4`),X(1,`Response preview`),G(),W(2,`pre`),X(3),G()),e&2){let e=t;I(3),Z(e.error??e.preview??`(no body)`)}}function oN(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · `,e.delayMs,` ms `)}}function sN(e,t){e&1&&X(0,` · mock body `)}function cN(e,t){if(e&1){let e=K();W(0,`li`)(1,`label`,38)(2,`input`,39),J(`change`,function(){let t=N(e).$implicit;return P(Y().toggleRule(t.id))}),G(),W(3,`code`),X(4),G()(),W(5,`span`,40),X(6),R(7,oN,1,1),R(8,sN,1,0),G(),W(9,`button`,35),J(`click`,function(){let t=N(e).$implicit;return P(Y().removeRule(t.id))}),X(10,` Remove `),G()()}if(e&2){let e=t.$implicit;I(2),q(`checked`,e.enabled),L(`aria-label`,`Enable rule for `+e.pattern),I(2),w_(``,e.method||`ANY`,` `,e.pattern),I(2),w_(` `,e.target,` · `,e.status??200,` `),I(),z(e.delayMs?7:-1),I(),z(e.body?8:-1),I(),L(`aria-label`,`Remove rule for `+e.pattern)}}function lN(e,t){e&1&&(W(0,`li`,0),X(1,`No rules. SSR rules apply on the next page load.`),G())}function uN(e,t){if(e&1&&(W(0,`li`)(1,`code`),X(2),G()()),e&2){let e=t.$implicit;I(2),Z(e)}}function dN(e,t){if(e&1&&(W(0,`h4`),X(1,`ngSkipHydration hosts`),G(),W(2,`ul`,42),B(3,uN,3,1,`li`,null,$h),G()),e&2){let e=Y();I(3),V(e.skipHydrationHosts)}}function fN(e,t){if(e&1&&(W(0,`pre`,41),X(1),G()),e&2){let e=t.$implicit;I(),Z(e)}}function pN(e,t){e&1&&(W(0,`p`,40),X(1,`No hydration warnings.`),G())}function mN(e,t){if(e&1&&(W(0,`dl`)(1,`dt`),X(2,`Enabled`),G(),W(3,`dd`),X(4),G(),W(5,`dt`),X(6,`Hydrated components`),G(),W(7,`dd`),X(8),G(),W(9,`dt`),X(10,`Hydrated nodes`),G(),W(11,`dd`),X(12),G(),W(13,`dt`),X(14,`Skipped components`),G(),W(15,`dd`),X(16),G(),W(17,`dt`),X(18,`Incremental defer blocks`),G(),W(19,`dd`),X(20),G()(),R(21,dN,5,0),W(22,`h4`),X(23),G(),B(24,fN,2,1,`pre`,41,$h,!1,pN,2,0,`p`,40)),e&2){let e=t;I(4),Z(e.enabled?`yes`:`no (client render only)`),I(4),Z(e.hydratedComponents??`n/a`),I(4),Z(e.hydratedNodes??`n/a`),I(4),Z(e.componentsSkippedHydration??`n/a`),I(4),Z(e.deferBlocksWithIncrementalHydration??`n/a`),I(),z(e.skipHydrationHosts.length?21:-1),I(2),Q(`Warnings (`,e.warnings.length,`)`),I(),V(e.warnings)}}function hN(e,t){e&1&&(W(0,`p`,0),X(1,`No hydration data for this page.`),G())}function gN(e,t){e&1&&(W(0,`p`,0),X(1,`No TransferState script: this page was not server rendered.`),G())}function _N(e,t){if(e&1&&(W(0,`p`,43),X(1),G()),e&2){let e=Y(2);I(),Z(e.error)}}function vN(e,t){if(e&1&&(W(0,`span`,44),X(1),G(),X(2)),e&2){let e=t,n=Y().$implicit;I(),Q(`HTTP `,e.status),I(),Q(` `,e.url??n.key,` `)}}function yN(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` `,e.key,` `)}}function bN(e,t){if(e&1&&(W(0,`details`)(1,`summary`),R(2,vN,3,2)(3,yN,1,1),W(4,`span`,40),X(5),G()(),W(6,`pre`),X(7),M_(8,`json`),G()()),e&2){let e,n=t.$implicit;I(2),z((e=n.http)?2:3,e),I(3),Q(``,n.size,` B`),I(2),Z(P_(8,3,n.value))}}function xN(e,t){if(e&1&&(W(0,`p`,40),X(1),G(),R(2,_N,2,1,`p`,43),B(3,bN,9,5,`details`,null,YM)),e&2){let e=Y();I(),T_(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),I(),z(e.error?2:-1),I(),V(e.entries)}}function SN(e,t){e&1&&R(0,gN,2,0,`p`,0)(1,xN,5,4),e&2&&z(+!!t.found)}function CN(e,t){e&1&&(W(0,`p`,0),X(1,`Open a page of the app to see its payload.`),G())}var wN={pattern:`/api/products`,method:``,target:`both`,status:`500`,delayMs:``,body:``};function TN(e,t,n){return e?e.scope(`ng-devtools`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}var EN=class e{rpc=Z_(null);loading=F(!1);failed=F(!1);serverCalls=F([]);pages=F([]);rules=F([]);selectedPageId=F(null);selectedCallId=F(null);draft=F({...wN});message=F(``);unsubscribe=null;destroyRef=A(ms);selected=$(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e[0]??null});timeline=$(()=>[...this.serverCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));selectedCall=$(()=>this.timeline().find(e=>e.id===this.selectedCallId())??null);bodyError=$(()=>{let e=this.draft().body.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){tc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`ng-devtools`).rpc.sharedState(`http`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}selectPage(e){this.selectedPageId.set(e.target.value||null),this.selectedCallId.set(null)}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}addRule(e){e.preventDefault();let t=this.draft();if(!t.pattern.trim()||this.bodyError())return;let n=Number(t.status),r=Number(t.delayMs),i={id:`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,pattern:t.pattern.trim(),enabled:!0,target:t.target,...t.method?{method:t.method}:{},...t.status&&Number.isFinite(n)?{status:n}:{},...t.delayMs&&Number.isFinite(r)?{delayMs:r}:{},...t.body.trim()?{body:t.body.trim()}:{}};this.saveRules([...this.rules(),i],`Rule added.`)}toggleRule(e){this.saveRules(this.rules().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Rule updated.`)}removeRule(e){this.saveRules(this.rules().filter(t=>t.id!==e),`Rule removed.`)}async clearCalls(){try{await TN(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}async saveRules(e,t){try{await TN(this.rpc(),`set-http-rules`,e),this.rules.set(e),this.message.set(`${t} Reload the page to apply SSR rules.`)}catch{this.message.set(`Could not save the rules.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-network-inspector`]],inputs:{rpc:[1,`rpc`]},decls:80,vars:19,consts:[[1,`muted`],[`role`,`alert`,1,`muted`],[1,`toolbar`],[3,`change`,`value`],[3,`value`],[`value`,``],[`type`,`button`,3,`click`],[`role`,`status`,1,`message`],[1,`grid`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[1,`table-wrap`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[1,`rule-form`,3,`submit`],[`required`,``,`placeholder`,`/api/products`,3,`input`,`value`],[1,`row`],[`value`,`both`],[`value`,`server`],[`value`,`client`],[`type`,`number`,`min`,`100`,`max`,`599`,3,`input`,`value`],[`type`,`number`,`min`,`0`,`max`,`10000`,3,`input`,`value`],[`rows`,`3`,`aria-describedby`,`body-error`,3,`input`,`value`],[`id`,`body-error`,1,`bad`,`small`],[`type`,`submit`,3,`disabled`],[1,`rules`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[`scope`,`col`],[3,`selected`],[3,`click`],[1,`tag`],[1,`url`],[`type`,`button`,1,`link`,3,`click`],[1,`notes`],[1,`tag`,`fault`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`],[1,`muted`,`small`],[1,`warn`],[1,`plain`],[`role`,`alert`,1,`bad`],[1,`tag`,`server`]],template:function(e,t){if(e&1&&(R(0,XM,2,0,`p`,0)(1,ZM,2,0,`p`,1),W(2,`div`,2)(3,`label`),X(4,` Page `),W(5,`select`,3),J(`change`,function(e){return t.selectPage(e)}),B(6,QM,2,2,`option`,4,KM,!1,$M,2,0,`option`,5),G()(),W(9,`button`,6),J(`click`,function(){return t.clearCalls()}),X(10,`Clear timeline`),G(),W(11,`p`,7),X(12),G()(),W(13,`div`,8)(14,`section`,9)(15,`h3`,10),X(16),G(),R(17,rN,19,0,`div`,11)(18,iN,8,0,`p`,0),R(19,aN,4,1),G(),W(20,`section`,12)(21,`h3`,13),X(22,`Fault injection`),G(),W(23,`form`,14),J(`submit`,function(e){return t.addRule(e)}),W(24,`label`),X(25,` URL pattern (substring or * glob) `),W(26,`input`,15),J(`input`,function(e){return t.patch(`pattern`,e)}),G()(),W(27,`div`,16)(28,`label`),X(29,` Method `),W(30,`select`,3),J(`change`,function(e){return t.patch(`method`,e)}),W(31,`option`,5),X(32,`Any`),G(),W(33,`option`),X(34,`GET`),G(),W(35,`option`),X(36,`POST`),G(),W(37,`option`),X(38,`PUT`),G(),W(39,`option`),X(40,`PATCH`),G(),W(41,`option`),X(42,`DELETE`),G()()(),W(43,`label`),X(44,` Apply on `),W(45,`select`,3),J(`change`,function(e){return t.patch(`target`,e)}),W(46,`option`,17),X(47,`SSR + client`),G(),W(48,`option`,18),X(49,`SSR only`),G(),W(50,`option`,19),X(51,`Client only`),G()()()(),W(52,`div`,16)(53,`label`),X(54,` Status `),W(55,`input`,20),J(`input`,function(e){return t.patch(`status`,e)}),G()(),W(56,`label`),X(57,` Delay (ms) `),W(58,`input`,21),J(`input`,function(e){return t.patch(`delayMs`,e)}),G()()(),W(59,`label`),X(60,` Mock JSON body (optional) `),W(61,`textarea`,22),J(`input`,function(e){return t.patch(`body`,e)}),G()(),W(62,`p`,23),X(63),G(),W(64,`button`,24),X(65,` Add rule `),G()(),W(66,`ul`,25),B(67,cN,11,9,`li`,null,qM,!1,lN,2,0,`li`,0),G()(),W(70,`section`,26)(71,`h3`,27),X(72,`Hydration`),G(),R(73,mN,27,8)(74,hN,2,0,`p`,0),G(),W(75,`section`,28)(76,`h3`,29),X(77,`TransferState payload`),G(),R(78,SN,2,1)(79,CN,2,0,`p`,0),G()()),e&2){let e,n,r;z(t.loading()?0:t.failed()?1:-1),I(5),q(`value`,t.selected()?.pageId??``),I(),V(t.pages()),I(6),Z(t.message()),I(4),Q(`HTTP timeline (`,t.timeline().length,`)`),I(),z(t.timeline().length?17:18),I(2),z((e=t.selectedCall())?19:-1,e),I(7),q(`value`,t.draft().pattern),I(4),q(`value`,t.draft().method),I(15),q(`value`,t.draft().target),I(10),q(`value`,t.draft().status),I(3),q(`value`,t.draft().delayMs),I(3),q(`value`,t.draft().body),L(`aria-invalid`,t.bodyError()?`true`:null),I(2),Z(t.bodyError()),I(),q(`disabled`,!t.draft().pattern.trim()||!!t.bodyError()),I(3),V(t.rules()),I(6),z((n=t.selected()?.hydration)?73:74,n),I(5),z((r=t.selected()?.payload)?78:79,r)}},dependencies:[py],styles:[`[_nghost-%COMP%] { display: block; color: #e4e4e7; font-size: 13px; @@ -3216,7 +3466,7 @@ summary[_ngcontent-%COMP%] { cursor: pointer; word-break: break-all; - }`]})},wM=(e,t)=>t.id;function TM(e,t){if(e&1){let e=K();H(0,`button`,14),cg(`click`,function(){let t=N(e).$implicit;return P(Y().switchTab(t.id))}),X(1),U()}if(e&2){let e=t.$implicit;jg(`active`,Y().tab()===e.id),I(),Z(e.label)}}function EM(e,t){if(e&1){let e=K();H(0,`app-dashboard`,15),cg(`navigate`,function(t){return N(e),P(Y().switchTab(t))}),U()}e&2&&Vh(`rpc`,Y().rpc())}function DM(e,t){if(e&1){let e=K();H(0,`app-component-tree`,16),cg(`showForm`,function(t){return N(e),P(Y().showForm(t))}),U()}e&2&&Vh(`rpc`,Y().rpc())}function OM(e,t){e&1&&Wh(0,`app-route-inspector`,12),e&2&&Vh(`rpc`,Y().rpc())}function kM(e,t){e&1&&Wh(0,`app-signal-inspector`,12),e&2&&Vh(`rpc`,Y().rpc())}function AM(e,t){e&1&&Wh(0,`app-di-inspector`,12),e&2&&Vh(`rpc`,Y().rpc())}function jM(e,t){e&1&&Wh(0,`app-store-inspector`,12),e&2&&Vh(`rpc`,Y().rpc())}function MM(e,t){e&1&&Wh(0,`app-network-inspector`,12),e&2&&Vh(`rpc`,Y().rpc())}function NM(e,t){if(e&1){let e=K();H(0,`app-forms-inspector`,17),cg(`focusHandled`,function(){return N(e),P(Y().formFocus.set(null))}),U()}if(e&2){let e=Y();Vh(`rpc`,e.rpc())(`focus`,e.formFocus())}}function PM(e,t){e&1&&Wh(0,`app-analog-inspector`,12),e&2&&Vh(`rpc`,Y().rpc())}var FM=class e{analog=F(!1);allTabs=[{id:`dashboard`,label:`Dashboard`},{id:`analog`,label:`Analog`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`},{id:`forms`,label:`Forms`},{id:`network`,label:`SSR & HTTP`}];tabs=$(()=>this.allTabs.filter(e=>e.id!==`analog`||this.analog()));tab=F(`dashboard`);rpc=F(null);connected=F(!1);ngOnInit(){let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.allTabs.some(t=>t.id===e)&&this.tab.set(e);let t=LM();mw(t?{baseURL:t}:{}).then(e=>{this.rpc.set(e),this.connected.set(!0),e.scope(`ng-devtools`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),!t&&this.tab()===`analog`&&this.tab.set(`dashboard`)},()=>{this.tab()===`analog`&&this.tab.set(`dashboard`)}),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)})})}ngOnDestroy(){}formFocus=F(null);showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}switchTab(e){this.tab.set(e),history.replaceState(history.state,``,`#tab=${e}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=nm({type:e,selectors:[[`app-root`]],decls:29,vars:4,consts:[[1,`brand`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`fill`,`url(#ng-logo)`,`aria-hidden`,`true`],[`id`,`ng-logo`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[3,`active`],[1,`status`],[3,`rpc`],[3,`rpc`,`focus`],[3,`click`],[3,`navigate`,`rpc`],[3,`showForm`,`rpc`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(H(0,`header`)(1,`h1`,0),ts(),H(2,`svg`,1)(3,`defs`)(4,`linearGradient`,2),Wh(5,`stop`,3)(6,`stop`,4)(7,`stop`,5)(8,`stop`,6)(9,`stop`,7)(10,`stop`,8),U()(),Wh(11,`path`,9),U(),ns(),H(12,`span`),X(13,`Angular DevTools`),U()(),H(14,`nav`),B(15,TM,2,3,`button`,10,wM),U(),H(17,`span`,11),X(18),U()(),H(19,`main`),R(20,EM,1,1,`app-dashboard`,12)(21,DM,1,1,`app-component-tree`,12)(22,OM,1,1,`app-route-inspector`,12)(23,kM,1,1,`app-signal-inspector`,12)(24,AM,1,1,`app-di-inspector`,12)(25,jM,1,1,`app-store-inspector`,12)(26,MM,1,1,`app-network-inspector`,12)(27,NM,1,2,`app-forms-inspector`,13)(28,PM,1,1,`app-analog-inspector`,12),U()),e&2){let e;I(15),V(t.tabs()),I(2),jg(`connected`,t.connected()),I(),Q(` `,t.connected()?`Connected`:`Connecting…`,` `),I(2),z((e=t.tab())===`dashboard`?20:e===`components`?21:e===`routes`?22:e===`signals`?23:e===`injectors`?24:e===`store`?25:e===`network`?26:e===`forms`?27:e===`analog`?28:-1)}},dependencies:[gw,Lw,pD,VD,uO,kO,sA,Hj,CM],styles:[`[_nghost-%COMP%] { + }`]})},DN=(e,t)=>t.id;function ON(e,t){if(e&1){let e=K();H(0,`button`,14),kg(`click`,function(){let t=N(e).$implicit;return P(Y().switchTab(t.id))}),X(1),U()}if(e&2){let e=t.$implicit;$g(`active`,Y().tab()===e.id),I(),Z(e.label)}}function kN(e,t){if(e&1){let e=K();H(0,`app-dashboard`,15),kg(`navigate`,function(t){return N(e),P(Y().switchTab(t))}),U()}e&2&&lg(`rpc`,Y().rpc())}function AN(e,t){if(e&1){let e=K();H(0,`app-component-tree`,16),kg(`showForm`,function(t){return N(e),P(Y().showForm(t))}),U()}e&2&&lg(`rpc`,Y().rpc())}function jN(e,t){e&1&&fg(0,`app-route-inspector`,12),e&2&&lg(`rpc`,Y().rpc())}function MN(e,t){e&1&&fg(0,`app-signal-inspector`,12),e&2&&lg(`rpc`,Y().rpc())}function NN(e,t){e&1&&fg(0,`app-di-inspector`,12),e&2&&lg(`rpc`,Y().rpc())}function PN(e,t){e&1&&fg(0,`app-store-inspector`,12),e&2&&lg(`rpc`,Y().rpc())}function FN(e,t){e&1&&fg(0,`app-network-inspector`,12),e&2&&lg(`rpc`,Y().rpc())}function IN(e,t){if(e&1){let e=K();H(0,`app-forms-inspector`,17),kg(`focusHandled`,function(){return N(e),P(Y().formFocus.set(null))}),U()}if(e&2){let e=Y();lg(`rpc`,e.rpc())(`focus`,e.formFocus())}}function LN(e,t){e&1&&fg(0,`app-pipes-inspector`,12),e&2&&lg(`rpc`,Y().rpc())}function RN(e,t){e&1&&fg(0,`app-analog-inspector`,12),e&2&&lg(`rpc`,Y().rpc())}var zN=class e{analog=F(!1);allTabs=[{id:`dashboard`,label:`Dashboard`},{id:`analog`,label:`Analog`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`},{id:`forms`,label:`Forms`},{id:`pipes`,label:`Pipes`},{id:`network`,label:`SSR & HTTP`}];tabs=$(()=>this.allTabs.filter(e=>e.id!==`analog`||this.analog()));tab=F(`dashboard`);rpc=F(null);connected=F(!1);ngOnInit(){let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.allTabs.some(t=>t.id===e)&&this.tab.set(e);let t=VN();Lw(t?{baseURL:t}:{}).then(e=>{this.rpc.set(e),this.connected.set(!0),e.scope(`ng-devtools`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),!t&&this.tab()===`analog`&&this.tab.set(`dashboard`)},()=>{this.tab()===`analog`&&this.tab.set(`dashboard`)}),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)})})}ngOnDestroy(){}formFocus=F(null);showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}switchTab(e){this.tab.set(e),history.replaceState(history.state,``,`#tab=${e}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=xm({type:e,selectors:[[`app-root`]],decls:30,vars:4,consts:[[1,`brand`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`fill`,`url(#ng-logo)`,`aria-hidden`,`true`],[`id`,`ng-logo`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[3,`active`],[1,`status`],[3,`rpc`],[3,`rpc`,`focus`],[3,`click`],[3,`navigate`,`rpc`],[3,`showForm`,`rpc`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(H(0,`header`)(1,`h1`,0),rs(),H(2,`svg`,1)(3,`defs`)(4,`linearGradient`,2),fg(5,`stop`,3)(6,`stop`,4)(7,`stop`,5)(8,`stop`,6)(9,`stop`,7)(10,`stop`,8),U()(),fg(11,`path`,9),U(),is(),H(12,`span`),X(13,`Angular DevTools`),U()(),H(14,`nav`),B(15,ON,2,3,`button`,10,DN),U(),H(17,`span`,11),X(18),U()(),H(19,`main`),R(20,kN,1,1,`app-dashboard`,12)(21,AN,1,1,`app-component-tree`,12)(22,jN,1,1,`app-route-inspector`,12)(23,MN,1,1,`app-signal-inspector`,12)(24,NN,1,1,`app-di-inspector`,12)(25,PN,1,1,`app-store-inspector`,12)(26,FN,1,1,`app-network-inspector`,12)(27,IN,1,2,`app-forms-inspector`,13)(28,LN,1,1,`app-pipes-inspector`,12)(29,RN,1,1,`app-analog-inspector`,12),U()),e&2){let e;I(15),V(t.tabs()),I(2),$g(`connected`,t.connected()),I(),Q(` `,t.connected()?`Connected`:`Connecting…`,` `),I(2),z((e=t.tab())===`dashboard`?20:e===`components`?21:e===`routes`?22:e===`signals`?23:e===`injectors`?24:e===`store`?25:e===`network`?26:e===`forms`?27:e===`pipes`?28:e===`analog`?29:-1)}},dependencies:[zw,oT,ID,uO,NO,QO,AA,uj,GM,EN],styles:[`[_nghost-%COMP%] { display: flex; flex-direction: column; height: 100vh; @@ -3290,4 +3540,4 @@ flex: 1; overflow: auto; padding: 16px; - }`]})};function IM(e){try{return new URL(e,location.href).origin===location.origin}catch{return!1}}function LM(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e&&IM(e))return e;if(!location.pathname.includes(`__ng-devtools`))return`/__ng-devtools/`}Oy(FM).catch(console.error);export{jb as t}; \ No newline at end of file + }`]})};function BN(e){try{return new URL(e,location.href).origin===location.origin}catch{return!1}}function VN(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e&&BN(e))return e;if(!location.pathname.includes(`__ng-devtools`))return`/__ng-devtools/`}Zy(zN).catch(console.error);export{ex as t}; \ No newline at end of file diff --git a/extension/ui/index.html b/extension/ui/index.html index 81c2952..4573752 100644 --- a/extension/ui/index.html +++ b/extension/ui/index.html @@ -5,7 +5,7 @@ Angular DevTools - + diff --git a/packages/ng-devtools/src/__tests__/pipes-collector.test.ts b/packages/ng-devtools/src/__tests__/pipes-collector.test.ts new file mode 100644 index 0000000..6f17593 --- /dev/null +++ b/packages/ng-devtools/src/__tests__/pipes-collector.test.ts @@ -0,0 +1,265 @@ +// @vitest-environment jsdom +import '@angular/compiler'; +import { + ChangeDetectorRef, + Component, + Pipe, + inject, + signal, + type PipeTransform, +} from '@angular/core'; +import { TestBed } from '@angular/core/testing'; +import { AsyncPipe, CurrencyPipe } from '@angular/common'; +import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing'; +import { BehaviorSubject } from 'rxjs'; +import { afterEach, describe, expect, it } from 'vitest'; +import { attachPipes } from '../pipes-collector.ts'; +import type { PipePageReport } from '../rpc/pipes-tools.ts'; + +try { + TestBed.initTestEnvironment(BrowserTestingModule, platformBrowserTesting()); +} catch { + // already initialized in this worker +} + +const stops: (() => void)[] = []; +afterEach(() => { + stops.splice(0).forEach((stop) => stop()); + TestBed.resetTestingModule(); + document.body.innerHTML = ''; +}); + +async function mount(type: new () => T) { + const fixture = TestBed.createComponent(type); + document.body.appendChild(fixture.nativeElement); + fixture.detectChanges(); + await fixture.whenStable(); + return fixture; +} + +function ng(): any { + return (globalThis as any).ng; +} + +class Receipt { + a = signal(1); + b = signal(2); +} +Component({ + selector: 'app-receipt', + imports: [CurrencyPipe], + template: `

{{ a() | currency }}

{{ b() | currency }}

`, +})(Receipt); + +// Pure by default (no `pure: false`), takes the array itself — not a +// derived primitive — so an in-place mutation is invisible by reference. +class JoinPipe implements PipeTransform { + transform(value: string[]): string { + return value.join(','); + } +} +Pipe({ name: 'join' })(JoinPipe); + +function harness(pageId = 'pg') { + const calls: { name: string; args: unknown[] }[] = []; + const handlers = new Map unknown>(); + const my = { + rpc: { + call: async (name: string, ...args: unknown[]) => { + calls.push({ name, args }); + }, + register: (def: { name: string; handler: (...args: any[]) => unknown }) => { + handlers.set(def.name, def.handler); + }, + }, + }; + const collector = attachPipes(my, pageId, ng); + stops.push(collector.stop); + const reports = () => + calls.filter((c) => c.name === 'push-pipes').map((c) => c.args[0] as PipePageReport); + return { calls, handlers, collector, reports }; +} + +describe('pipes collector', () => { + it('reports instance count and owning component for each pipe, without instrumenting', async () => { + await mount(Receipt); + const h = harness(); + h.collector.push(); + await Promise.resolve(); + const report = h.reports().at(-1)!; + expect(report.instrumented).toBe(false); + const currency = report.pipes.find((p) => p.name === 'currency')!; + expect(currency).toMatchObject({ className: 'CurrencyPipe', isPure: true, instanceCount: 2 }); + expect(currency.components).toEqual([{ name: 'Receipt', count: 2 }]); + expect(currency.call).toBeUndefined(); + }); + + it('tracks call count, last input/output and caller once instrumented', async () => { + const fixture = await mount(Receipt); + const h = harness(); + h.handlers.get('instrument-pipes')!(true); + // The pure pipe already ran once before instrumenting; force a fresh + // recompute so the (now-patched) transform actually runs again. + fixture.componentInstance.a.set(5); + fixture.detectChanges(); + await fixture.whenStable(); + h.collector.push(); + await Promise.resolve(); + + const report = h.reports().at(-1)!; + expect(report.instrumented).toBe(true); + const currency = report.pipes.find((p) => p.name === 'currency')!; + expect(currency.call?.callCount).toBeGreaterThan(0); + expect(currency.call?.lastResult).toBe('$5.00'); + }); + + it('stops instrumenting and the next report reflects it', async () => { + await mount(Receipt); + const h = harness(); + h.handlers.get('instrument-pipes')!(true); + h.handlers.get('instrument-pipes')!(false); + await Promise.resolve(); + const report = h.reports().at(-1)!; + expect(report.instrumented).toBe(false); + }); + + it('reports the latest async value and flags a duplicate subscription', async () => { + class Feed { + shared$ = new BehaviorSubject('one'); + solo$ = new BehaviorSubject('solo'); + } + Component({ + selector: 'app-feed', + imports: [AsyncPipe], + template: `

{{ shared$ | async }}

{{ shared$ | async }}

{{ solo$ | async }}

`, + })(Feed); + + await mount(Feed); + const h = harness(); + h.collector.push(); + await Promise.resolve(); + + const report = h.reports().at(-1)!; + const asyncUsages = report.async ?? []; + expect(asyncUsages).toHaveLength(3); + expect(asyncUsages.filter((a) => a.duplicate)).toHaveLength(2); + expect(asyncUsages.filter((a) => !a.duplicate)).toHaveLength(1); + for (const usage of asyncUsages) { + expect(usage.hasSource).toBe(true); + expect(usage.component).toBe('Feed'); + } + expect(asyncUsages.some((a) => a.latestValue === 'one')).toBe(true); + expect(asyncUsages.some((a) => a.latestValue === 'solo')).toBe(true); + }); + + it('flags a pure pipe fed a mutated-in-place argument (experimental stale check)', async () => { + class ListView { + items = signal(['a', 'b']); + cdr = inject(ChangeDetectorRef); + } + Component({ + selector: 'app-list', + // Bound directly to the array reference (not a derived primitive), so + // a mutation in place is genuinely invisible to Angular's `Object.is` + // memoization check. + imports: [JoinPipe], + template: `

{{ items() | join }}

`, + })(ListView); + + const fixture = await mount(ListView); + const h = harness(); + h.handlers.get('instrument-pipes')!(true); + h.collector.push(); + await Promise.resolve(); + expect( + h + .reports() + .at(-1)! + .pipes.find((p) => p.name === 'join')?.stale, + ).toBeUndefined(); + + fixture.componentInstance.items().push('c'); // same array reference, mutated in place + fixture.componentInstance.cdr.markForCheck(); // force a recheck without changing any binding + fixture.detectChanges(); + await fixture.whenStable(); + h.collector.push(); + await Promise.resolve(); + + const stale = h + .reports() + .at(-1)! + .pipes.find((p) => p.name === 'join')?.stale; + expect(stale).toBeDefined(); + expect(stale?.detectedAt).toBeGreaterThan(0); + }); + + it('does not flag a normal, immutable update as stale', async () => { + class ListView { + items = signal(['a', 'b']); + } + Component({ + selector: 'app-list2', + imports: [JoinPipe], + template: `

{{ items() | join }}

`, + })(ListView); + + const fixture = await mount(ListView); + const h = harness(); + h.handlers.get('instrument-pipes')!(true); + h.collector.push(); + await Promise.resolve(); + + fixture.componentInstance.items.set([...fixture.componentInstance.items(), 'c']); + fixture.detectChanges(); + await fixture.whenStable(); + h.collector.push(); + await Promise.resolve(); + + expect( + h + .reports() + .at(-1)! + .pipes.find((p) => p.name === 'join')?.stale, + ).toBeUndefined(); + }); + + it('does not run the stale check while not instrumented', async () => { + class ListView { + items = signal(['a', 'b']); + cdr = inject(ChangeDetectorRef); + } + Component({ + selector: 'app-list3', + imports: [JoinPipe], + template: `

{{ items() | join }}

`, + })(ListView); + + const fixture = await mount(ListView); + const h = harness(); + h.collector.push(); + await Promise.resolve(); + + fixture.componentInstance.items().push('c'); + fixture.componentInstance.cdr.markForCheck(); + fixture.detectChanges(); + await fixture.whenStable(); + h.collector.push(); + await Promise.resolve(); + + expect( + h + .reports() + .at(-1)! + .pipes.find((p) => p.name === 'join')?.stale, + ).toBeUndefined(); + }); + + it('does nothing harmful when Angular has no debug API on the page', async () => { + const my = { + rpc: { call: async () => {}, register: () => {} }, + }; + const collector = attachPipes(my, 'pg', () => undefined); + stops.push(collector.stop); + expect(() => collector.push()).not.toThrow(); + }); +}); diff --git a/packages/ng-devtools/src/__tests__/pipes-pages.test.ts b/packages/ng-devtools/src/__tests__/pipes-pages.test.ts new file mode 100644 index 0000000..d1fd928 --- /dev/null +++ b/packages/ng-devtools/src/__tests__/pipes-pages.test.ts @@ -0,0 +1,83 @@ +import { createHostContext } from 'devframe/node'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import ngDevtools from '../devframe.ts'; +import type { PipePageReport } from '../rpc/pipes-tools.ts'; + +async function boot() { + const host = { + mountStatic: () => {}, + resolveOrigin: () => 'http://localhost', + getStorageDir: () => '', + }; + const ctx = await createHostContext({ cwd: process.cwd(), mode: 'dev', host: host as never }); + await ngDevtools.setup(ctx as never); + const invoke = (name: string, ...args: unknown[]) => + ctx.rpc.invokeLocal(`ng-devtools:${name}` as never, ...(args as never)); + const explain = async () => + ( + (await ctx.agent.invoke('ng-devtools:explain-pipe', { name: 'async' })) as { + markdown: string; + } + ).markdown; + return { ctx, invoke, explain }; +} + +function page(pageId: string): PipePageReport { + return { + pageId, + pipes: [ + { + name: 'async', + className: 'AsyncPipe', + isPure: false, + instanceCount: 3, + components: [{ name: 'ExamplePage', count: 3 }], + }, + ], + async: [1, 2, 3].map(() => ({ component: 'ExamplePage', hasSource: true, duplicate: false })), + instrumented: false, + }; +} + +describe('pipe pages across tabs', () => { + afterEach(() => vi.useRealTimers()); + + it('drops a closed tab so reopening does not stack its instances', async () => { + vi.useFakeTimers(); + const { invoke, explain } = await boot(); + + await invoke('push-pipes', page('tab-1')); + expect(await explain()).toContain('3 instance(s)'); + + // tab-1 closes without a `forget`; a new tab opens 20s later. + await vi.advanceTimersByTimeAsync(20_000); + await invoke('push-pipes', page('tab-2')); + expect(await explain()).toContain('3 instance(s)'); + }); +}); + +describe('pipe pages and their connections', () => { + it('drops a page the moment its connection closes', async () => { + const { ctx, invoke, explain } = await boot(); + const host = ctx.rpc as unknown as { + getCurrentRpcSession: () => unknown; + _emitSessionDisconnected: (meta: { id: number }) => void; + }; + + host.getCurrentRpcSession = () => ({ meta: { id: 1 } }); + await invoke('push-pipes', page('tab-1')); + host.getCurrentRpcSession = () => ({ meta: { id: 2 } }); + await invoke('push-pipes', page('tab-2')); + expect(await explain()).toContain('6 instance(s)'); + + host._emitSessionDisconnected({ id: 1 }); + expect(await explain()).toContain('3 instance(s)'); + + // A reconnect re-binds the page to its new connection, so the old + // connection closing afterwards must not drop it. + host.getCurrentRpcSession = () => ({ meta: { id: 3 } }); + await invoke('push-pipes', page('tab-2')); + host._emitSessionDisconnected({ id: 2 }); + expect(await explain()).toContain('3 instance(s)'); + }); +}); diff --git a/packages/ng-devtools/src/__tests__/pipes-runtime.test.ts b/packages/ng-devtools/src/__tests__/pipes-runtime.test.ts new file mode 100644 index 0000000..b244acd --- /dev/null +++ b/packages/ng-devtools/src/__tests__/pipes-runtime.test.ts @@ -0,0 +1,141 @@ +// @vitest-environment jsdom +import '@angular/compiler'; +import { Component, signal } from '@angular/core'; +import { TestBed } from '@angular/core/testing'; +import { CurrencyPipe, UpperCasePipe } from '@angular/common'; +import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing'; +import { afterEach, describe, expect, it } from 'vitest'; +import { + findPipeUsages, + instrumentPipes, + pipeSlotsIn, + readBoundArg, + staleCheckFor, +} from '../pipes-runtime.ts'; + +try { + TestBed.initTestEnvironment(BrowserTestingModule, platformBrowserTesting()); +} catch { + // already initialized in this worker +} + +afterEach(() => { + TestBed.resetTestingModule(); + document.body.innerHTML = ''; +}); + +async function mount(type: new () => T) { + const fixture = TestBed.createComponent(type); + document.body.appendChild(fixture.nativeElement); + fixture.detectChanges(); + await fixture.whenStable(); + return fixture; +} + +function ng(): any { + return (globalThis as any).ng; +} + +class Price { + amount = 9.5; + name = 'widget'; +} +Component({ + selector: 'app-price', + imports: [CurrencyPipe, UpperCasePipe], + template: `

{{ amount | currency }}

{{ name | uppercase }}

`, +})(Price); + +describe('pipe runtime discovery (real Angular render)', () => { + it('finds the live CurrencyPipe and UpperCasePipe instances used in a rendered template', async () => { + const fixture = await mount(Price); + const usages = findPipeUsages(ng(), document.querySelectorAll('*')); + const names = usages.map((u) => u.name).sort(); + expect(names).toEqual(['currency', 'uppercase']); + + const currency = usages.find((u) => u.name === 'currency')!; + expect(currency.className).toBe('CurrencyPipe'); + expect(currency.isPure).toBe(true); + expect(typeof currency.instance.transform).toBe('function'); + expect(currency.component).toBe(fixture.componentInstance); + }); + + it('reads pipe defs and live instances straight off tView.data/lView at the same index', async () => { + await mount(Price); + const usages = findPipeUsages(ng(), document.querySelectorAll('*')); + const { lView } = usages[0]; + const slots = pipeSlotsIn(lView); + expect(slots.map((s) => s.name).sort()).toEqual(['currency', 'uppercase']); + for (const slot of slots) { + expect(slot.lView[slot.index]).toBe(slot.instance); + } + }); + + it('does not find pipes in an element tree with no Angular views', () => { + document.body.innerHTML = '
plain html
'; + const usages = findPipeUsages(ng(), document.querySelectorAll('*')); + expect(usages).toEqual([]); + }); + + it('patches a pipe prototype once and observes real transform calls', async () => { + await mount(Price); + const usages = findPipeUsages(ng(), document.querySelectorAll('*')); + const currencySlot = usages.find((u) => u.name === 'currency')!; + const calls: unknown[] = []; + const instrumentation = instrumentPipes((call) => calls.push(call)); + instrumentation.addPipe(currencySlot); + instrumentation.addPipe(currencySlot); // idempotent: second add must not double-wrap + + const result = currencySlot.instance.transform(3); + expect(typeof result).toBe('string'); + expect(calls).toHaveLength(1); + expect(calls[0]).toMatchObject({ name: 'currency', args: [3], result }); + + instrumentation.stop(); + currencySlot.instance.transform(4); + expect(calls).toHaveLength(1); // no longer wrapped after stop() + }); +}); + +class Cart { + items = signal(['a', 'b']); +} +Component({ + selector: 'app-cart', + imports: [UpperCasePipe], + // json isn't imported here; slice the array to a single-string binding so + // a pure pipe (uppercase) receives the array itself via a wrapper, letting + // us mutate its contents in place without changing the array's reference. + template: `

{{ items().join(',') | uppercase }}

`, +})(Cart); + +describe('stale pure-pipe check (experimental, real Angular render)', () => { + it('recovers a real binding slot and reads the last argument Angular compared', async () => { + const fixture = await mount(Cart); + const usages = findPipeUsages(ng(), document.querySelectorAll('*')); + const upper = usages.find((u) => u.name === 'uppercase')!; + const check = staleCheckFor(upper); + expect(check).not.toBeNull(); + expect(readBoundArg(upper, check!)).toBe('a,b'); + + fixture.componentInstance.items.set(['c', 'd']); + fixture.detectChanges(); + await fixture.whenStable(); + expect(readBoundArg(upper, check!)).toBe('c,d'); + }); + + it('returns null gracefully when the template source does not match the expected shape', () => { + const fakeSlot = { + name: 'uppercase', + isPure: true, + instance: {}, + lView: [null, { template: () => {}, bindingStartIndex: 10 }] as any, + }; + expect(staleCheckFor(fakeSlot)).toBeNull(); + }); + + it('returns null gracefully when the view has no usable tView', () => { + const fakeSlot = { name: 'uppercase', isPure: true, instance: {}, lView: [] as any }; + expect(staleCheckFor(fakeSlot)).toBeNull(); + }); +}); diff --git a/packages/ng-devtools/src/devframe.ts b/packages/ng-devtools/src/devframe.ts index c11a714..4265d92 100644 --- a/packages/ng-devtools/src/devframe.ts +++ b/packages/ng-devtools/src/devframe.ts @@ -2,6 +2,10 @@ import type { RemoteAssets } from 'devframe'; import { defineDevframe } from 'devframe'; import { getRoutes } from './rpc/get-routes.ts'; import { getComponents } from './rpc/get-components.ts'; +import { getPipes } from './rpc/get-pipes.ts'; +import { lintPipes, lintPipesText } from './rpc/pipe-lint.ts'; +import { explainPipeText } from './rpc/pipe-explain.ts'; +import { trackPageSessions } from './rpc/page-sessions.ts'; import { getBuildMeta } from './rpc/build-meta.ts'; import { getSignals } from './rpc/get-signals.ts'; import { getProviders } from './rpc/get-providers.ts'; @@ -36,6 +40,14 @@ import { type WaitUntil, } from './rpc/forms-explain.ts'; import { findFormSource, sourceText } from './rpc/forms-source.ts'; +import { + currentPipes, + expirePipePages, + isPipePageReport, + mergePipePageReport, + type PipePageReport, + type PipesState, +} from './rpc/pipes-tools.ts'; import { currentRouter, expireRouterPages, @@ -98,6 +110,7 @@ const ngDevtools = defineDevframe({ my.rpc.register(getRoutes); my.rpc.register(getComponents); + my.rpc.register(getPipes); my.rpc.register(getSignals); my.rpc.register(getProviders); my.rpc.register(getNgrxStore); @@ -166,6 +179,70 @@ const ngDevtools = defineDevframe({ }, }); + const pipePages = new Map(); + const pipesState = await my.rpc.sharedState('pipe-usage', { + initialValue: { pipes: [], async: [], reportedAt: 0, instrumented: [] } as PipesState, + }); + + const applyPipes = (next: PipesState) => + pipesState.mutate((draft) => { + draft.pipes = next.pipes; + draft.async = next.async; + draft.reportedAt = next.reportedAt; + draft.instrumented = next.instrumented; + }); + + // A closed tab drops its connection at once, so its entries go with it + // instead of lingering until they expire. + const pipeSessions = trackPageSessions(ctx.rpc, (pageIds) => { + let removed = false; + for (const pageId of pageIds) removed = pipePages.delete(pageId) || removed; + if (removed) applyPipes(currentPipes(pipePages)); + }); + + my.rpc.register({ + name: 'push-pipes', + type: 'action', + jsonSerializable: true, + handler: (report: unknown) => { + if (!isPipePageReport(report)) return; + pipeSessions.bind(report.pageId); + applyPipes(mergePipePageReport(pipePages, report)); + }, + }); + + my.rpc.register({ + name: 'forget-pipes-page', + type: 'action', + jsonSerializable: true, + handler: (pageId: string) => { + if (typeof pageId === 'string') pipeSessions.unbind(pageId); + if (typeof pageId === 'string' && pipePages.delete(pageId)) { + applyPipes(currentPipes(pipePages)); + } + }, + }); + + my.rpc.register({ + name: 'request-instrument-pipes', + type: 'action', + jsonSerializable: true, + handler: (on: unknown) => { + void my.rpc.broadcast({ + method: 'instrument-pipes', + args: [on !== false], + optional: true, + }); + }, + }); + + my.rpc.register({ + name: 'pipe-lint', + type: 'query', + jsonSerializable: true, + handler: () => lintPipes(ctx.cwd), + }); + const routerPages = new Map(); const routerState = await my.rpc.sharedState('router', { initialValue: { pages: [] } as RouterState, @@ -406,6 +483,8 @@ const ngDevtools = defineDevframe({ if (next) applyForms(next); const nextRouter = expireRouterPages(routerPages); if (nextRouter) applyRouter(nextRouter); + const nextPipes = expirePipePages(pipePages); + if (nextPipes) applyPipes(nextPipes); }, 5000); expiry.unref?.(); @@ -1202,6 +1281,33 @@ const ngDevtools = defineDevframe({ }, }); + ctx.agent.registerTool({ + id: 'ng-devtools:lint-pipes', + description: + 'Deterministic checks on pipes found in source: an impure pipe used inside an @for block (runs every check, potentially once per row), `| json` left in a template (a debugging aid), and a pure pipe whose transform() reads a signal directly (its memoization only tracks its own arguments, not signals it reads).', + safety: 'read', + inputSchema: { type: 'object', properties: {} }, + handler: async () => ({ markdown: lintPipesText(ctx.cwd) }), + }); + + ctx.agent.registerTool({ + id: 'ng-devtools:explain-pipe', + description: + 'Explain one pipe by name: where it is declared or used, whether it is pure, live instance/call counts and last input/output when instrumentation is on, an experimental stale-value warning, and any lint findings. Use this to answer "why is this pipe slow or stale?"', + safety: 'read', + inputSchema: { + type: 'object', + properties: { + name: { type: 'string', description: 'The pipe name as used after `|` in a template.' }, + }, + required: ['name'], + }, + handler: async (args: { name?: string }) => { + if (!args?.name) return { markdown: 'Pass a pipe `name`.' }; + return { markdown: explainPipeText(args.name, ctx.cwd, pipesState.value() as PipesState) }; + }, + }); + ctx.agent.registerTool({ id: 'ng-devtools:explain-custom-control', description: diff --git a/packages/ng-devtools/src/overlay.ts b/packages/ng-devtools/src/overlay.ts index 38d728e..cd0b8d7 100644 --- a/packages/ng-devtools/src/overlay.ts +++ b/packages/ng-devtools/src/overlay.ts @@ -1,6 +1,7 @@ import { connectDevframe } from 'devframe/client'; import { attachAnalog } from './analog-runtime.ts'; import { attachForms } from './forms-collector.ts'; +import { attachPipes } from './pipes-collector.ts'; import { attachHttp } from './http-overlay.ts'; import { findRouters, @@ -114,6 +115,8 @@ export async function initOverlay(options: { baseURL?: string | string[] } = {}) const stopAnalog = attachAnalog(my, pageId, getNg); const forms = attachForms(my, pageId, getNg, { show: showHighlight, clear: clearHighlight }); const pushForms = forms.push; + const pipes = attachPipes(my, pageId, getNg); + const pushPipes = pipes.push; const http = attachHttp(my, pageId); const pushHttp = () => void http.push().catch(() => {}); @@ -211,6 +214,7 @@ export async function initOverlay(options: { baseURL?: string | string[] } = {}) pushInjectorTree(); pushNgrxState(); pushForms(); + pushPipes(); pushRouter(); pushHttp(); @@ -220,6 +224,7 @@ export async function initOverlay(options: { baseURL?: string | string[] } = {}) pushInjectorTree(); pushNgrxState(); pushForms(); + pushPipes(); pushRouter(); pushHttp(); }, 3000); @@ -271,12 +276,17 @@ export async function initOverlay(options: { baseURL?: string | string[] } = {}) }); const leave = () => { + pipes.pause(); void my.rpc.call('forget-forms-page', pageId).catch(() => {}); void my.rpc.call('forget-router-page', pageId).catch(() => {}); + void my.rpc.call('forget-pipes-page', pageId).catch(() => {}); http.leave(); }; addEventListener('pagehide', leave); - const resendConfig = () => (sentGeneration = -1); + const resendConfig = () => { + sentGeneration = -1; + pipes.resume(); + }; addEventListener('pageshow', resendConfig); return () => { @@ -284,6 +294,8 @@ export async function initOverlay(options: { baseURL?: string | string[] } = {}) restoreSignalHook(); removeEventListener('pagehide', leave); forms.stop(); + pipes.stop(); + void my.rpc.call('forget-pipes-page', pageId).catch(() => {}); stopAnalog(); removeEventListener('pageshow', resendConfig); for (const cleanup of routerCleanup) cleanup(); diff --git a/packages/ng-devtools/src/pipes-collector.ts b/packages/ng-devtools/src/pipes-collector.ts new file mode 100644 index 0000000..917d2ee --- /dev/null +++ b/packages/ng-devtools/src/pipes-collector.ts @@ -0,0 +1,337 @@ +import { + findPipeUsages, + instrumentPipes, + readBoundArg, + staleCheckFor, + type NgDebugApi, + type PipeCall, + type PipeInstrumentation, + type PipeUsage, + type StaleCheck, +} from './pipes-runtime.ts'; +import type { + AsyncUsageInfo, + PipeComponentUsage, + PipeInstanceCall, + PipePageReport, + PipeUsageInfo, +} from './rpc/pipes-tools.ts'; + +type AnyRecord = Record; + +interface Rpc { + rpc: { + call(name: string, ...args: unknown[]): Promise; + register(definition: { + name: string; + type: 'event' | 'action' | 'query'; + jsonSerializable: boolean; + handler: (...args: any[]) => unknown; + }): void; + }; +} + +const HEARTBEAT_MS = 5000; + +function read(fn: () => T, fallback: T): T { + try { + return fn(); + } catch { + return fallback; + } +} + +function componentName(component: unknown): string { + return read(() => (component as { constructor?: Function })?.constructor?.name, undefined) || '?'; +} + +const MAX_DESCRIBE_CHARS = 200; + +function describeValue(value: unknown): string { + if (value === undefined) return 'undefined'; + if (typeof value === 'string') { + return value.length > MAX_DESCRIBE_CHARS ? `${value.slice(0, MAX_DESCRIBE_CHARS)}…` : value; + } + try { + const json = JSON.stringify(value); + if (json === undefined) return String(value); + return json.length > MAX_DESCRIBE_CHARS ? `${json.slice(0, MAX_DESCRIBE_CHARS)}…` : json; + } catch { + return String(value); + } +} + +/** `AsyncPipe` keeps its subscribed source and latest value on plain (not + * ECMAScript-private) fields — `_obj`/`_latestValue` — so this reads them + * passively; no patching needed, unlike other pipes' call tracking. */ +function asyncReportFor(usages: PipeUsage[]): AsyncUsageInfo[] { + const asyncUsages = usages.filter((u) => u.name === 'async'); + const bySource = new Map(); + for (const usage of asyncUsages) { + const source = read(() => (usage.instance as { _obj?: unknown })._obj, undefined); + if (source === undefined || source === null) continue; + bySource.set(source, (bySource.get(source) ?? 0) + 1); + } + return asyncUsages.map((usage) => { + const source = read(() => (usage.instance as { _obj?: unknown })._obj, undefined); + const latestValue = read( + () => (usage.instance as { _latestValue?: unknown })._latestValue, + undefined, + ); + return { + component: componentName(usage.component), + hasSource: source !== undefined && source !== null, + latestValue: latestValue === undefined ? undefined : describeValue(latestValue), + duplicate: source !== undefined && source !== null && (bySource.get(source) ?? 0) > 1, + }; + }); +} + +interface InstanceStats { + callCount: number; + /** Raw, not yet described: serializing is deferred to `reportFor` (at most + * every few seconds) so the per-call hot path stays a couple of stores. */ + lastArgs: unknown[]; + lastResult: unknown; + lastCaller?: string; + lastAt: number; +} + +const MAX_HASH_DEPTH = 2; +const MAX_HASH_ITEMS = 50; + +/** A cheap, size-capped structural fingerprint — not a real hash, just + * "different enough to notice" for detecting in-place mutation of an + * argument whose reference stayed the same. Never throws. */ +function shapeHash(value: unknown, depth = 0): string { + if (value === null) return 'null'; + if (typeof value !== 'object') return `${typeof value}:${String(value)}`; + if (depth >= MAX_HASH_DEPTH) return '…'; + return read(() => { + if (Array.isArray(value)) { + const items = value.slice(0, MAX_HASH_ITEMS).map((v) => shapeHash(v, depth + 1)); + return `[${items.join(',')}${value.length > MAX_HASH_ITEMS ? ',…' : ''}]`; + } + const keys = Object.keys(value as object).slice(0, MAX_HASH_ITEMS); + const entries = keys.map((k) => `${k}:${shapeHash((value as AnyRecord)[k], depth + 1)}`); + return `{${entries.join(',')}}`; + }, '?'); +} + +const MAX_INSTANCE_CALLS = 5; + +function describeCall(s: InstanceStats) { + return { + lastArgs: s.lastArgs.map(describeValue), + lastResult: describeValue(s.lastResult), + lastCaller: s.lastCaller, + }; +} + +interface StaleSnapshot { + ref: unknown; + hash: string; +} + +/** EXPERIMENTAL: per-pipe-instance state for the stale-pure-pipe check. + * `checks` caches the recovered binding slot (or the fact that recovery + * failed) so the regex scan only ever runs once per instance. */ +class StaleTracker { + private readonly checks = new WeakMap(); + private readonly snapshots = new WeakMap(); + + /** Returns true the moment a pure pipe's bound argument is found unchanged + * by reference but different in shape from last time — i.e. Angular's own + * memoization is about to (or already did) skip a re-render that a mutated + * argument arguably deserved. */ + isStale(usage: PipeUsage): boolean { + if (!usage.isPure) return false; + let check = this.checks.get(usage.instance); + if (check === undefined) { + check = staleCheckFor(usage); + this.checks.set(usage.instance, check); + } + if (!check) return false; + const current = read(() => readBoundArg(usage, check!), undefined); + const isObj = current !== null && typeof current === 'object'; + const prev = this.snapshots.get(usage.instance); + const hash = isObj ? shapeHash(current) : ''; + this.snapshots.set(usage.instance, { ref: current, hash }); + if (!prev) return false; + if (!Object.is(prev.ref, current)) return false; + return isObj && hash !== prev.hash; + } +} + +export interface PipesCollector { + push(): void; + /** Stops pushing reports, e.g. on `pagehide`, so an in-flight or timed push + * can't re-register a page the server was just told to forget. */ + pause(): void; + /** Resumes after `pause` (a page restored from the back/forward cache). */ + resume(): void; + stop(): void; +} + +/** Live pipe usage: discovery (always on, cheap) plus, once instrumented, + * per-call tracking via prototype patching. Mirrors `attachForms`'s shape. */ +export function attachPipes( + my: Rpc, + pageId: string, + getNg: () => NgDebugApi | undefined, +): PipesCollector { + let instrumented = false; + let instrumentation: PipeInstrumentation | null = null; + const stats = new WeakMap(); + const staleTracker = new StaleTracker(); + const ownerNames = new Set(); + let lastPayload = ''; + let lastPushAt = 0; + let paused = false; + + function onPipeCall(call: PipeCall) { + const prev = stats.get(call.instance); + stats.set(call.instance, { + callCount: (prev?.callCount ?? 0) + 1, + lastArgs: call.args, + lastResult: call.result, + lastCaller: call.caller, + lastAt: Date.now(), + }); + } + + function reportFor(usages: PipeUsage[]): PipeUsageInfo[] { + const byName = new Map(); + for (const usage of usages) { + const group = byName.get(usage.name); + if (group) group.push(usage); + else byName.set(usage.name, [usage]); + } + const out: PipeUsageInfo[] = []; + for (const [name, group] of byName) { + const componentCounts = new Map(); + for (const usage of group) { + const label = componentName(usage.component); + componentCounts.set(label, (componentCounts.get(label) ?? 0) + 1); + } + const components: PipeComponentUsage[] = Array.from(componentCounts, ([label, count]) => ({ + name: label, + count, + })); + + let callCount = 0; + const called: { usage: PipeUsage; stats: InstanceStats }[] = []; + let stale = false; + for (const usage of group) { + const s = stats.get(usage.instance); + if (s) { + callCount += s.callCount; + called.push({ usage, stats: s }); + } + // Only while instrumented: the check has a real (capped) cost, and + // establishing a baseline while not watching would just be noise. + if (instrumented && staleTracker.isStale(usage)) stale = true; + } + + called.sort((a, b) => b.stats.lastAt - a.stats.lastAt); + const latest = called[0]?.stats; + // Usages of one pipe can see different values (e.g. `x | p` and + // `x | other | p`), so a single "last" would misrepresent them. + const instances: PipeInstanceCall[] | undefined = + called.length > 1 + ? called.slice(0, MAX_INSTANCE_CALLS).map(({ usage, stats: s }) => ({ + component: componentName(usage.component), + callCount: s.callCount, + ...describeCall(s), + })) + : undefined; + + out.push({ + name, + className: group[0].className, + isPure: group[0].isPure, + instanceCount: group.length, + components, + call: + callCount > 0 && latest + ? { + callCount, + ...describeCall(latest), + instances, + } + : undefined, + stale: stale ? { detectedAt: Date.now() } : undefined, + }); + } + return out; + } + + async function pushPipes() { + if (paused) return; + try { + const ng = getNg(); + if (!ng?.getComponent) return; + const usages = findPipeUsages(ng, document.querySelectorAll('*')); + for (const usage of usages) ownerNames.add(componentName(usage.component)); + if (instrumentation) { + for (const usage of usages) instrumentation.addPipe(usage); + } + const report: PipePageReport = { + pageId, + pipes: reportFor(usages), + async: asyncReportFor(usages), + instrumented, + }; + const payload = JSON.stringify(report); + const now = Date.now(); + if (payload === lastPayload && now - lastPushAt < HEARTBEAT_MS) return; + lastPayload = payload; + lastPushAt = now; + if (paused) return; + await my.rpc.call('push-pipes', report); + } catch { + return; + } + } + + function setInstrumented(on: boolean): { ok: true; message: string } { + if (on && !instrumentation) { + instrumentation = instrumentPipes(onPipeCall, ownerNames); + instrumented = true; + void pushPipes(); + return { ok: true, message: 'Recording pipe calls, inputs/outputs and callers.' }; + } + if (!on && instrumentation) { + instrumentation.stop(); + instrumentation = null; + instrumented = false; + void pushPipes(); + } + return { ok: true, message: on ? 'Already recording.' : 'Stopped recording.' }; + } + + my.rpc.register({ + name: 'instrument-pipes', + type: 'event', + jsonSerializable: true, + handler: (on: boolean) => setInstrumented(on !== false), + }); + + return { + push: () => void pushPipes(), + pause() { + paused = true; + }, + resume() { + paused = false; + lastPayload = ''; + void pushPipes(); + }, + stop() { + paused = true; + instrumentation?.stop(); + instrumentation = null; + instrumented = false; + }, + }; +} diff --git a/packages/ng-devtools/src/pipes-runtime.ts b/packages/ng-devtools/src/pipes-runtime.ts new file mode 100644 index 0000000..4c6d255 --- /dev/null +++ b/packages/ng-devtools/src/pipes-runtime.ts @@ -0,0 +1,269 @@ +import { callerFrom } from './forms-instrument.ts'; + +type AnyRecord = Record; + +export interface NgDebugApi { + getComponent(el: Element): unknown; + getOwningComponent?(el: Element): unknown; + getDirectives?(el: Element): unknown[]; +} + +function read(fn: () => T, fallback: T): T { + try { + return fn(); + } catch { + return fallback; + } +} + +interface PipeDefShape { + name: string; + type: new (...args: unknown[]) => unknown; + pure: boolean; +} + +/** A pipe's compiled definition, duck-typed: `PipeDef` shares `tView.data` + * with `DirectiveDef`/`ComponentDef`, which have no `pure` flag. */ +function isPipeDef(value: unknown): value is PipeDefShape { + if (!value || typeof value !== 'object') return false; + const def: Partial = value; + return ( + typeof def.name === 'string' && typeof def.pure === 'boolean' && typeof def.type === 'function' + ); +} + +/** The LView an element belongs to, via the same `__ngContext__` monkey-patch + * Angular's own `getComponent`/`getOwningComponent` read internally. Only + * resolves once something (Angular itself, or us calling `ng.getComponent` + * first) has "upgraded" `__ngContext__` from a bare numeric id to a real + * `LContext` — a bare number can't be resolved from outside `@angular/core`. */ +function lViewOf(el: Element): AnyRecord[] | null { + const ctx = (el as AnyRecord)['__ngContext__']; + if (!ctx || typeof ctx !== 'object') return null; + const lView = read(() => ctx.lView, null); + return Array.isArray(lView) ? lView : null; +} + +export interface PipeSlot { + name: string; + className: string; + isPure: boolean; + instance: AnyRecord; + /** Index into both `tView.data` and this `lView`. */ + index: number; + lView: AnyRecord[]; +} + +/** Every pipe instance created in `lView`'s view, read straight off + * `tView.data`/`lView` (see `ɵɵpipe` in `@angular/core`: it stores the + * `PipeDef` and the live instance at the same index in each). Read-only; + * never mutates the view. */ +export function pipeSlotsIn(lView: AnyRecord[]): PipeSlot[] { + const tView = read(() => lView[1], null) as { data?: unknown[] } | null; + const data = tView?.data; + if (!Array.isArray(data)) return []; + const slots: PipeSlot[] = []; + for (let i = 0; i < data.length; i++) { + const def = data[i]; + if (!isPipeDef(def)) continue; + const instance = lView[i]; + if (!instance || typeof instance !== 'object') continue; + slots.push({ + name: def.name, + className: def.type.name || 'Pipe', + isPure: def.pure, + instance, + index: i, + lView, + }); + } + return slots; +} + +export interface PipeUsage { + name: string; + className: string; + isPure: boolean; + instance: AnyRecord; + lView: AnyRecord[]; + /** The nearest component instance, for attributing the usage in the UI. */ + component: unknown; +} + +/** Walks `elements`, finds every distinct view reachable from them, and + * returns every pipe instance in use. Calling `ng.getOwningComponent`/ + * `ng.getComponent` is what upgrades `__ngContext__` so `lViewOf` can read + * it — this mirrors `forms.ts`'s `findForms` DOM walk. */ +export function findPipeUsages(ng: NgDebugApi, elements: Iterable): PipeUsage[] { + const seenLViews = new Set(); + const usages: PipeUsage[] = []; + for (const el of elements) { + const component = + read(() => ng.getComponent(el), null) ?? + read(() => ng.getOwningComponent?.(el) ?? null, null); + if (component === null || component === undefined) continue; + const lView = lViewOf(el); + if (!lView || seenLViews.has(lView)) continue; + seenLViews.add(lView); + for (const slot of pipeSlotsIn(lView)) { + usages.push({ + name: slot.name, + className: slot.className, + isPure: slot.isPure, + instance: slot.instance, + lView, + component, + }); + } + } + return usages; +} + +export interface PipeCall { + name: string; + /** The instance that actually ran: several usages of the same pipe class + * share one patched prototype, so this is how a caller tells them apart. */ + instance: AnyRecord; + args: unknown[]; + result: unknown; + caller?: string; +} + +/** What `addPipe` needs: both `PipeSlot` and `PipeUsage` satisfy this. */ +export interface PipeInstance { + name: string; + instance: AnyRecord; +} + +export interface PipeInstrumentation { + /** Patches `slot`'s prototype once; a no-op if already patched. */ + addPipe(slot: PipeInstance): void; + stop(): void; +} + +const WRAPPED = Symbol('ng-devtools-pipe-wrapped'); + +/** Patches each distinct pipe class's `transform` once, the same technique + * `forms-instrument.ts`'s `instrumentForms` uses for `FormControl` methods: + * since `pipeInstance.transform` is a live lookup at the `ɵɵpipeBind*` call + * site, our wrapper is invoked whenever Angular actually calls it (i.e. for + * an impure pipe every check, for a pure one only when memoization decided + * the argument changed). */ +export function instrumentPipes( + onCall: (call: PipeCall) => void, + preferred: ReadonlySet = new Set(), +): PipeInstrumentation { + const seenProtos = new WeakSet(); + const restores: (() => void)[] = []; + // A pipe instance is created by one template call site, so its caller + // never changes: resolving it once per instance keeps the (costly) stack + // capture off the hot path of every later `transform` call. + const callers = new WeakMap(); + + const callerOf = (instance: AnyRecord): string | undefined => { + if (callers.has(instance)) return callers.get(instance); + // Drop the "Error" header and this wrapper's own frame. + const stack = new Error().stack?.split('\n'); + const caller = stack ? callerFrom(['', ...stack.slice(3)].join('\n'), preferred) : undefined; + callers.set(instance, caller); + return caller; + }; + + return { + addPipe(slot) { + const proto = Object.getPrototypeOf(slot.instance); + if (!proto || seenProtos.has(proto)) return; + seenProtos.add(proto); + const original = proto.transform; + if (typeof original !== 'function' || (original as any)[WRAPPED]) return; + const wrapper = function (this: AnyRecord, ...args: unknown[]) { + const result = original.apply(this, args); + try { + onCall({ + name: slot.name, + instance: this, + args, + result, + caller: callerOf(this), + }); + } catch { + // never break the app + } + return result; + }; + Object.defineProperty(wrapper, WRAPPED, { value: true }); + try { + proto.transform = wrapper; + } catch { + return; + } + restores.push(() => { + if (proto.transform === wrapper) proto.transform = original; + }); + }, + stop() { + for (const restore of restores.splice(0).reverse()) restore(); + }, + }; +} + +/** What the stale-pipe check needs: satisfied by both `PipeSlot` and + * `PipeUsage`. */ +export interface PipeBinding { + name: string; + isPure: boolean; + instance: AnyRecord; + lView: AnyRecord[]; +} + +export interface StaleCheck { + bindingRoot: number; + slotOffset: number; +} + +/** + * EXPERIMENTAL. A pure pipe's `transform` is only ever called when Angular's + * own memoization sees the bound argument's *reference* change — so patching + * `transform` (as `instrumentPipes` does) can never observe a same-reference, + * mutated-in-place argument. Catching that needs the raw LView slot Angular + * itself compares against, which sits at `tView.bindingStartIndex + + * slotOffset` — and `slotOffset` is a compile-time constant with no runtime + * lookup, baked directly into the compiled template's `ɵɵpipeBind*` call. + * + * This recovers it by regex-scanning `tView.template.toString()` (available + * in dev/unminified builds) for the pipe's own `ɵɵpipe(index, name)` call to + * get its raw index, then for a call passing that same index as its first + * argument to get the binding's `slotOffset`. The pipe-creation call is + * matched by shape (`ident(N, 'name')`), but the binding call must be a + * `pipeBind` instruction so an unrelated call sharing the same first numeric + * argument can't supply the offset. It tolerates both AOT names + * (`ɵɵpipeBind1`) and JIT names (`jit___pipeBind1_8`). Returns `null` + * whenever anything doesn't match; never throws. + */ +export function staleCheckFor(slot: PipeBinding): StaleCheck | null { + return read(() => { + const tView = slot.lView[1] as { template?: Function; bindingStartIndex?: number } | null; + const templateFn = tView?.template; + const bindingRoot = tView?.bindingStartIndex; + if (typeof templateFn !== 'function' || typeof bindingRoot !== 'number') return null; + const src = templateFn.toString(); + const escapedName = slot.name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + const create = new RegExp(`\\w+\\(\\s*(\\d+)\\s*,\\s*['"\`]${escapedName}['"\`]\\s*\\)`).exec( + src, + ); + if (!create) return null; + const bind = new RegExp( + `[\\w$\\u0275]*pipeBind\\w*\\(\\s*${create[1]}\\s*,\\s*(\\d+)\\s*[,)]`, + ).exec(src); + if (!bind) return null; + const slotOffset = Number(bind[1]); + return Number.isFinite(slotOffset) ? { bindingRoot, slotOffset } : null; + }, null); +} + +/** The raw argument value Angular last compared this binding against — + * `undefined` if the slot isn't there (a stale/invalid `check`, or a view + * shape this Angular version doesn't lay out the way `staleCheckFor` expects). */ +export function readBoundArg(slot: PipeBinding, check: StaleCheck): unknown { + return read(() => slot.lView[check.bindingRoot + check.slotOffset], undefined); +} diff --git a/packages/ng-devtools/src/rpc/__tests__/get-pipes.test.ts b/packages/ng-devtools/src/rpc/__tests__/get-pipes.test.ts new file mode 100644 index 0000000..85d07c2 --- /dev/null +++ b/packages/ng-devtools/src/rpc/__tests__/get-pipes.test.ts @@ -0,0 +1,357 @@ +import { mkdirSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { fixtureDir } from './fixture-dir.ts'; +import { scan } from './scan.ts'; +import { describe, expect, it } from 'vitest'; +import { getPipes } from '../get-pipes.ts'; + +async function pipesFor(source: string) { + const dir = fixtureDir('ng-devtools-pipes-'); + mkdirSync(join(dir, 'src')); + writeFileSync(join(dir, 'src', 'app.ts'), source); + return scan(getPipes, dir); +} + +describe('get-pipes', () => { + it('reports a pure, standalone pipe by default', async () => { + const [pipe] = await pipesFor(` + @Pipe({ name: 'appTruncate' }) + export class TruncatePipe implements PipeTransform { + transform(value: string) { return value; } + } + `); + expect(pipe).toEqual( + expect.objectContaining({ + name: 'appTruncate', + className: 'TruncatePipe', + isPure: true, + isStandalone: true, + }), + ); + }); + + it('reads an impure pipe', async () => { + const [pipe] = await pipesFor(` + @Pipe({ name: 'appTimeAgo', pure: false }) + export class TimeAgoPipe implements PipeTransform { + transform(value: number) { return value; } + } + `); + expect(pipe.isPure).toBe(false); + }); + + it('reads a non-standalone pipe', async () => { + const [pipe] = await pipesFor(` + @Pipe({ name: 'legacyFormat', standalone: false }) + export class LegacyFormatPipe implements PipeTransform { + transform(value: string) { return value; } + } + `); + expect(pipe.isStandalone).toBe(false); + }); + + it('reads a non-standalone pipe declared and exported by its NgModule', async () => { + const pipes = await pipesFor(` + @Pipe({ name: 'appLegacyFormat', standalone: false }) + export class LegacyFormatPipe implements PipeTransform { + transform(value: string) { return value; } + } + + @NgModule({ + declarations: [LegacyFormatPipe], + exports: [LegacyFormatPipe], + }) + export class LegacyFormatModule {} + `); + // The NgModule itself carries no @Pipe decorator, so only the pipe is + // reported: a class merely declaring or exporting one is not one. + expect(pipes.map((p) => [p.name, p.className, p.isStandalone])).toEqual([ + ['appLegacyFormat', 'LegacyFormatPipe', false], + ]); + }); + + it('reads a non-standalone pipe whatever order it and its NgModule come in', async () => { + const pipes = await pipesFor(` + @NgModule({ + declarations: [LegacyFormatPipe], + exports: [LegacyFormatPipe], + }) + export class LegacyFormatModule {} + + @Pipe({ name: 'appLegacyFormat', standalone: false }) + export class LegacyFormatPipe implements PipeTransform { + transform(value: string) { return value; } + } + `); + expect(pipes.map((p) => p.name)).toEqual(['appLegacyFormat']); + }); + + it('reports every pipe in a file', async () => { + const pipes = await pipesFor(` + @Pipe({ name: 'appTruncate' }) + export class TruncatePipe implements PipeTransform { + transform(value: string) { return value; } + } + + @Pipe({ name: 'appTimeAgo', pure: false }) + export class TimeAgoPipe implements PipeTransform { + transform(value: number) { return value; } + } + `); + expect(pipes.map((p) => p.name)).toEqual(['appTruncate', 'appTimeAgo']); + }); + + it('does not report a component or directive as a pipe', async () => { + const pipes = await pipesFor(` + @Component({ selector: 'app-card', template: '' }) + export class Card {} + + @Directive({ selector: '[appHighlight]' }) + export class Highlight {} + `); + expect(pipes).toEqual([]); + }); + + it('ignores a pipe that is commented out', async () => { + const pipes = await pipesFor(` + // @Pipe({ name: 'appOld' }) + // export class OldPipe {} + + @Pipe({ name: 'appNew' }) + export class NewPipe implements PipeTransform { + transform(value: string) { return value; } + } + `); + expect(pipes.map((p) => p.name)).toEqual(['appNew']); + }); + + it('ignores a decorator quoted inside a template', async () => { + const pipes = await pipesFor( + '@Component({\n' + + " selector: 'app-docs',\n" + + " template: `
@Pipe({ name: 'fake' })
`,\n" + + '})\n' + + 'export class Docs {}\n' + + '\n' + + "@Pipe({ name: 'appReal' })\n" + + 'export class RealPipe implements PipeTransform {\n' + + ' transform(value: string) { return value; }\n' + + '}\n', + ); + expect(pipes.map((p) => p.name)).toEqual(['appReal']); + }); + + it('reports the file and line of the pipe class', async () => { + const [pipe] = await pipesFor( + [ + '/**', + ' * Formats things.', + ' */', + "@Pipe({ name: 'appFormat' })", + 'export class FormatPipe {', + '}', + ].join('\n'), + ); + expect(pipe.file).toBe('src/app.ts'); + expect(pipe.line).toBe(5); + }); + + describe('built-in pipes', () => { + it('finds a built-in pipe used in an inline template', async () => { + const pipes = await pipesFor(` + @Component({ + selector: 'app-price', + imports: [CurrencyPipe], + template: '

{{ price | currency }}

', + }) + export class Price {} + `); + expect(pipes).toEqual([ + expect.objectContaining({ + name: 'currency', + className: 'CurrencyPipe', + isStandalone: true, + isPure: true, + builtin: true, + usageCount: 1, + }), + ]); + }); + + it('marks AsyncPipe as impure', async () => { + const [pipe] = await pipesFor(` + @Component({ + selector: 'app-latest', + template: '

{{ value$ | async }}

', + }) + export class Latest {} + `); + expect(pipe).toEqual(expect.objectContaining({ name: 'async', isPure: false })); + }); + + it('reports the file and line of each usage', async () => { + const dir = fixtureDir('ng-devtools-pipes-'); + mkdirSync(join(dir, 'src')); + writeFileSync( + join(dir, 'src', 'app.ts'), + [ + '@Component({', + " selector: 'app-price',", + ' template: `', + '

{{ price | currency }}

', + ' `,', + '})', + 'export class Price {}', + ].join('\n'), + ); + const [pipe] = await scan(getPipes, dir); + expect(pipe.file).toBe('src/app.ts'); + expect(pipe.line).toBe(4); + }); + + it('reads a template from templateUrl, relative to the component file', async () => { + const dir = fixtureDir('ng-devtools-pipes-'); + mkdirSync(join(dir, 'src')); + writeFileSync( + join(dir, 'src', 'price.ts'), + [ + '@Component({', + " selector: 'app-price',", + " templateUrl: './price.html',", + '})', + 'export class Price {}', + ].join('\n'), + ); + writeFileSync(join(dir, 'src', 'price.html'), '

{{ price | currency }}

\n'); + const [pipe] = await scan(getPipes, dir); + expect(pipe.name).toBe('currency'); + expect(pipe.file).toBe('src/price.html'); + expect(pipe.line).toBe(1); + }); + + it('counts every usage across files', async () => { + const pipes = await pipesFor(` + @Component({ + selector: 'app-a', + template: '

{{ a | date }} {{ b | date:"short" }}

', + }) + export class A {} + + @Component({ + selector: 'app-b', + template: '

{{ c | date }}

', + }) + export class B {} + `); + const date = pipes.find((p) => p.name === 'date'); + expect(date?.usageCount).toBe(3); + expect(date?.usages).toHaveLength(3); + }); + + it('does not mistake logical OR for a pipe', async () => { + const pipes = await pipesFor(` + @Component({ + selector: 'app-flag', + template: '

{{ isLoading || json }}

', + }) + export class Flag {} + `); + expect(pipes).toEqual([]); + }); + + it('does not report a custom pipe as built-in', async () => { + const pipes = await pipesFor(` + @Pipe({ name: 'appTruncate' }) + export class TruncatePipe implements PipeTransform { + transform(value: string) { return value; } + } + + @Component({ + selector: 'app-card', + imports: [TruncatePipe], + template: '

{{ text | appTruncate }}

', + }) + export class Card {} + `); + expect(pipes.map((p) => p.name)).toEqual(['appTruncate']); + }); + + it('finds a built-in pipe used inside a bound attribute', async () => { + const pipes = await pipesFor(` + @Component({ + selector: 'app-thing', + template: '
', + }) + export class Thing {} + `); + expect(pipes.map((p) => p.name)).toEqual(['uppercase']); + }); + + it('ignores prose that reads like a pipe expression, in an inline template', async () => { + const pipes = await pipesFor(` + @Component({ + selector: 'app-docs', + template: \` +

Use the | json pipe for debugging.

+

{{ value | uppercase }}

+ \`, + }) + export class Docs {} + `); + expect(pipes.map((p) => p.name)).toEqual(['uppercase']); + }); + + it('ignores prose that reads like a pipe expression, in an external template', async () => { + const dir = fixtureDir('ng-devtools-pipes-'); + mkdirSync(join(dir, 'src')); + writeFileSync( + join(dir, 'src', 'docs.ts'), + [ + '@Component({', + " selector: 'app-docs',", + " templateUrl: './docs.html',", + '})', + 'export class Docs {}', + ].join('\n'), + ); + writeFileSync( + join(dir, 'src', 'docs.html'), + '

Use the | json pipe for debugging.

\n

{{ value | uppercase }}

\n', + ); + const pipes = await scan(getPipes, dir); + expect(pipes.map((p) => p.name)).toEqual(['uppercase']); + }); + + it('ignores a pipe-shaped attribute name followed by a literal quote', async () => { + // `title` here is a plain (unbound) attribute, not an expression, even + // though its value contains a `|`. + const pipes = await pipesFor(` + @Component({ + selector: 'app-thing', + template: '
', + }) + export class Thing {} + `); + expect(pipes).toEqual([]); + }); + + it('refuses a templateUrl that resolves outside the workspace', async () => { + const dir = fixtureDir('ng-devtools-pipes-'); + mkdirSync(join(dir, 'src')); + const outside = fixtureDir('ng-devtools-pipes-outside-'); + writeFileSync(join(outside, 'secret.html'), '

{{ value | currency }}

\n'); + writeFileSync( + join(dir, 'src', 'app.ts'), + [ + '@Component({', + " selector: 'app-thing',", + ` templateUrl: '${join(outside, 'secret.html').replace(/\\/g, '\\\\')}',`, + '})', + 'export class Thing {}', + ].join('\n'), + ); + const pipes = await scan(getPipes, dir); + expect(pipes).toEqual([]); + }); + }); +}); diff --git a/packages/ng-devtools/src/rpc/__tests__/pipe-lint.test.ts b/packages/ng-devtools/src/rpc/__tests__/pipe-lint.test.ts new file mode 100644 index 0000000..936209c --- /dev/null +++ b/packages/ng-devtools/src/rpc/__tests__/pipe-lint.test.ts @@ -0,0 +1,164 @@ +import { mkdirSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { fixtureDir } from './fixture-dir.ts'; +import { describe, expect, it } from 'vitest'; +import { lintPipes } from '../pipe-lint.ts'; + +function lintFor(source: string) { + const dir = fixtureDir('ng-devtools-pipe-lint-'); + mkdirSync(join(dir, 'src')); + writeFileSync(join(dir, 'src', 'app.ts'), source); + return lintPipes(dir); +} + +describe('lintPipes', () => { + describe('impure-pipe-in-for', () => { + it('flags a built-in impure pipe used inside @for', () => { + const findings = lintFor(` + @Component({ + selector: 'app-list', + imports: [SlicePipe], + template: \` + @for (item of items; track item.id) { +

{{ item.tail | slice:1 }}

+ } + \`, + }) + export class ListView {} + `); + const finding = findings.find((f) => f.rule === 'impure-pipe-in-for'); + expect(finding).toMatchObject({ pipe: 'slice', severity: 'warning' }); + }); + + it('flags a custom impure pipe used inside @for', () => { + const findings = lintFor(` + @Pipe({ name: 'appLive', pure: false }) + export class LivePipe implements PipeTransform { + transform(value: number) { return value; } + } + + @Component({ + selector: 'app-list', + imports: [LivePipe], + template: \` + @for (item of items; track item.id) { +

{{ item.value | appLive }}

+ } + \`, + }) + export class ListView {} + `); + const finding = findings.find((f) => f.rule === 'impure-pipe-in-for'); + expect(finding).toMatchObject({ pipe: 'appLive', severity: 'warning' }); + }); + + it('does not flag a pure pipe inside @for', () => { + const findings = lintFor(` + @Component({ + selector: 'app-list', + imports: [CurrencyPipe], + template: \` + @for (item of items; track item.id) { +

{{ item.price | currency }}

+ } + \`, + }) + export class ListView {} + `); + expect(findings.filter((f) => f.rule === 'impure-pipe-in-for')).toEqual([]); + }); + + it('does not flag an impure pipe used outside @for', () => { + const findings = lintFor(` + @Component({ + selector: 'app-list', + imports: [SlicePipe], + template: '

{{ items | slice:1 }}

', + }) + export class ListView {} + `); + expect(findings.filter((f) => f.rule === 'impure-pipe-in-for')).toEqual([]); + }); + }); + + describe('json-pipe-in-template', () => { + it('flags | json usage', () => { + const findings = lintFor(` + @Component({ + selector: 'app-debug', + imports: [JsonPipe], + template: '
{{ data | json }}
', + }) + export class Debug {} + `); + const finding = findings.find((f) => f.rule === 'json-pipe-in-template'); + expect(finding).toMatchObject({ pipe: 'json', severity: 'info' }); + }); + + it('does not flag a template with no json usage', () => { + const findings = lintFor(` + @Component({ + selector: 'app-debug', + imports: [UpperCasePipe], + template: '

{{ name | uppercase }}

', + }) + export class Debug {} + `); + expect(findings.filter((f) => f.rule === 'json-pipe-in-template')).toEqual([]); + }); + }); + + describe('signal-read-in-pure-pipe', () => { + it('flags a pure pipe reading a signal field in transform()', () => { + const findings = lintFor(` + @Pipe({ name: 'appScaled' }) + export class ScaledPipe implements PipeTransform { + factor = signal(2); + transform(value: number) { + return value * this.factor(); + } + } + `); + const finding = findings.find((f) => f.rule === 'signal-read-in-pure-pipe'); + expect(finding).toMatchObject({ pipe: 'appScaled' }); + }); + + it('does not flag an impure pipe reading a signal field', () => { + const findings = lintFor(` + @Pipe({ name: 'appScaled', pure: false }) + export class ScaledPipe implements PipeTransform { + factor = signal(2); + transform(value: number) { + return value * this.factor(); + } + } + `); + expect(findings.filter((f) => f.rule === 'signal-read-in-pure-pipe')).toEqual([]); + }); + + it('does not flag a pure pipe that never reads a signal field', () => { + const findings = lintFor(` + @Pipe({ name: 'appPlain' }) + export class PlainPipe implements PipeTransform { + transform(value: number) { + return value * 2; + } + } + `); + expect(findings.filter((f) => f.rule === 'signal-read-in-pure-pipe')).toEqual([]); + }); + + it('does not flag a pure pipe with a signal field it never reads in transform()', () => { + const findings = lintFor(` + @Pipe({ name: 'appUnused' }) + export class UnusedPipe implements PipeTransform { + unused = signal(2); + transform(value: number) { + return value; + } + } + `); + expect(findings.filter((f) => f.rule === 'signal-read-in-pure-pipe')).toEqual([]); + }); + }); +}); diff --git a/packages/ng-devtools/src/rpc/get-components.ts b/packages/ng-devtools/src/rpc/get-components.ts index 22b223a..aa625a5 100644 --- a/packages/ng-devtools/src/rpc/get-components.ts +++ b/packages/ng-devtools/src/rpc/get-components.ts @@ -1,7 +1,7 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; import { describable } from './agent-schema.ts'; -import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; +import { lstatSync, readFileSync, readdirSync } from 'node:fs'; import { join, relative } from 'node:path'; import { ANNOTATION, diff --git a/packages/ng-devtools/src/rpc/get-ngrx-store.ts b/packages/ng-devtools/src/rpc/get-ngrx-store.ts index 2b0af2e..802a9de 100644 --- a/packages/ng-devtools/src/rpc/get-ngrx-store.ts +++ b/packages/ng-devtools/src/rpc/get-ngrx-store.ts @@ -1,7 +1,7 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; import { describable } from './agent-schema.ts'; -import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; +import { lstatSync, readFileSync, readdirSync } from 'node:fs'; import { join, relative } from 'node:path'; import { IGNORED_DIRS, diff --git a/packages/ng-devtools/src/rpc/get-pipes.ts b/packages/ng-devtools/src/rpc/get-pipes.ts new file mode 100644 index 0000000..27c5b77 --- /dev/null +++ b/packages/ng-devtools/src/rpc/get-pipes.ts @@ -0,0 +1,372 @@ +import { defineRpcFunction } from 'devframe'; +import * as v from 'valibot'; +import { describable } from './agent-schema.ts'; +import { lstatSync, readFileSync, readdirSync } from 'node:fs'; +import { dirname, isAbsolute, join, relative, resolve } from 'node:path'; +import { + IGNORED_DIRS, + classScopes, + escapes, + lineCounter, + maskStrings, + matchDelimiter, + realPath, + skipString, + sourceRoots, + stripComments, +} from './source-scan.ts'; + +const UsageSiteSchema = v.object({ + file: v.string(), + line: v.number(), +}); + +const PipeSchema = v.object({ + name: v.string(), + className: v.string(), + file: v.string(), + line: v.number(), + isStandalone: v.boolean(), + isPure: v.boolean(), + /** Ships with Angular, so there is no declaration to point at: `file`/`line` + * name its first usage site instead. */ + builtin: v.optional(v.boolean()), + usageCount: v.optional(v.number()), + usages: v.optional(v.array(UsageSiteSchema)), +}); + +export const getPipes = defineRpcFunction({ + name: 'get-pipes', + type: 'query', + jsonSerializable: true, + args: [], + returns: describable(v.array(PipeSchema)), + agent: { + description: + 'Discover Angular pipes: custom pipes declared with @Pipe by scanning source files, and built-in pipes from @angular/common (DatePipe, CurrencyPipe, AsyncPipe, etc.) found in use in templates. Returns each pipe name, its class, purity and standalone status, and where it is declared or used. Call this to understand what data-transformation logic is available to templates.', + title: 'List Angular pipes', + }, + setup: (ctx) => ({ + handler: async () => scanPipes(ctx.cwd), + }), +}); + +interface UsageSite { + file: string; + line: number; +} + +export interface PipeInfo { + name: string; + className: string; + file: string; + line: number; + isStandalone: boolean; + /** A pipe is pure unless its decorator says otherwise. */ + isPure: boolean; + builtin: boolean; + usageCount?: number; + usages?: UsageSite[]; +} + +/** Name (as used after `|` in a template) to class and purity, for every pipe + * `@angular/common` exports. */ +export const BUILTIN_PIPES = new Map([ + ['async', { className: 'AsyncPipe', isPure: false }], + ['currency', { className: 'CurrencyPipe', isPure: true }], + ['date', { className: 'DatePipe', isPure: true }], + ['number', { className: 'DecimalPipe', isPure: true }], + ['i18nPlural', { className: 'I18nPluralPipe', isPure: true }], + ['i18nSelect', { className: 'I18nSelectPipe', isPure: true }], + ['json', { className: 'JsonPipe', isPure: false }], + ['keyvalue', { className: 'KeyValuePipe', isPure: false }], + ['lowercase', { className: 'LowerCasePipe', isPure: true }], + ['percent', { className: 'PercentPipe', isPure: true }], + ['slice', { className: 'SlicePipe', isPure: false }], + ['titlecase', { className: 'TitleCasePipe', isPure: true }], + ['uppercase', { className: 'UpperCasePipe', isPure: true }], +]); + +/** `| name`, unless it is one side of `||`: the lookbehind/lookahead keep + * `a || date` from being read as a use of the `date` pipe. */ +export const PIPE_USE = /(?(); + for (const root of sourceRoots(cwd)) walk(root, cwd, pipes, builtinUsages); + for (const [name, usages] of builtinUsages) { + const meta = BUILTIN_PIPES.get(name); + if (!meta) continue; + pipes.push({ + name, + className: meta.className, + file: usages[0].file, + line: usages[0].line, + isStandalone: true, + isPure: meta.isPure, + builtin: true, + usageCount: usages.length, + usages, + }); + } + return pipes; +} + +function walk(dir: string, cwd: string, out: PipeInfo[], builtinUsages: Map) { + let entries: string[]; + try { + entries = readdirSync(dir); + } catch { + return; + } + + for (const entry of entries) { + const full = join(dir, entry); + try { + const stats = lstatSync(full); + // Not followed: a link can point anywhere, including outside the workspace. + if (stats.isSymbolicLink()) continue; + if (stats.isDirectory()) { + if (!IGNORED_DIRS.has(entry.toLowerCase())) walk(full, cwd, out, builtinUsages); + continue; + } + } catch { + continue; + } + + if (!entry.endsWith('.ts') || entry.endsWith('.spec.ts')) continue; + + try { + const content = readFileSync(full, 'utf-8'); + const relPath = relative(cwd, full); + out.push(...pipesIn(content, relPath)); + collectBuiltinUsages(content, relPath, full, cwd, builtinUsages); + } catch { + // skip + } + } +} + +function pipesIn(content: string, relPath: string): PipeInfo[] { + const source = stripComments(content); + // A decorator quoted inside a template is not code. + const code = maskStrings(source); + const lineAt = lineCounter(code); + + const pipes: PipeInfo[] = []; + for (const scope of classScopes(code, source)) { + if (scope.kind !== 'pipe' || !scope.pipeName || !scope.className) continue; + pipes.push({ + name: scope.pipeName, + className: scope.className, + file: relPath, + line: lineAt(scope.start), + isStandalone: !/\bstandalone\s*:\s*false\b/.test(scope.decoratorArgs ?? ''), + isPure: !/\bpure\s*:\s*false\b/.test(scope.decoratorArgs ?? ''), + builtin: false, + }); + } + return pipes; +} + +const TEMPLATE_KEY = /\btemplate\s*:\s*/; +const TEMPLATE_URL_KEY = /\btemplateUrl\s*:\s*/; + +export interface TemplateSource { + text: string; + file: string; + lineAt: (index: number) => number; + /** `text`'s own offset 0 relative to `file`'s full source, for combining + * with an index into `text` before calling `lineAt`. */ + baseOffset: number; +} + +/** + * Finds every `@Component(...)` in `content` and its template — inline, or + * read from `templateUrl` relative to `fullPath` — for any scanner that needs + * the template's text alongside a way to turn an offset into it back into a + * line number. Shared by the built-in-pipe usage scan and the pipe linter. + */ +export function templatesIn( + content: string, + relPath: string, + fullPath: string, + cwd: string, +): TemplateSource[] { + const source = stripComments(content); + const code = maskStrings(source); + const lineAt = lineCounter(code); + const out: TemplateSource[] = []; + + const decorator = /@Component\s*\(/g; + let match: RegExpExecArray | null; + while ((match = decorator.exec(code)) !== null) { + const open = match.index + match[0].length - 1; + const close = matchDelimiter(code, open, '(', ')'); + const args = code.slice(open, close); + + const inline = valueOf(args, source, open, TEMPLATE_KEY); + if (inline) { + out.push({ text: inline.value, file: relPath, lineAt, baseOffset: inline.offset }); + } else { + const url = valueOf(args, source, open, TEMPLATE_URL_KEY); + const external = url && templateFromUrl(url.value, fullPath, cwd); + if (external) out.push(external); + } + decorator.lastIndex = close; + } + return out; +} + +/** + * Finds every `@Component(...)` in `content` and scans its template — inline, + * or read from `templateUrl` relative to `fullPath` — for uses of a built-in + * pipe, recording each one into `out`. + */ +function collectBuiltinUsages( + content: string, + relPath: string, + fullPath: string, + cwd: string, + out: Map, +) { + for (const template of templatesIn(content, relPath, fullPath, cwd)) { + recordUsages(template.text, template.file, template.lineAt, template.baseOffset, out); + } +} + +/** Reads the string value that follows `keyPattern` in `args` (a decorator's + * masked argument list), starting at `offset` within `source`/the full file's + * masked code. `args` and `source`/`code` share offsets up to `offset`. */ +function valueOf( + args: string, + source: string, + offset: number, + keyPattern: RegExp, +): { value: string; offset: number } | null { + const key = keyPattern.exec(args); + if (!key) return null; + let local = key.index + key[0].length; + while (/\s/.test(args[local] ?? '')) local++; + const abs = offset + local; + const quote = source[abs]; + if (quote !== '"' && quote !== "'" && quote !== '`') return null; + const end = skipString(source, abs); + if (end === abs) return null; + return { value: source.slice(abs + 1, end), offset: abs + 1 }; +} + +/** + * Resolves `url` relative to `fullPath` and reads it — but only once its real + * (symlinks-followed) location is confirmed to still be inside the workspace. + * A `templateUrl` that resolves outside it (through a symlink, `../../`, or + * otherwise) is refused rather than read, the same containment rule + * `sourceRoots` applies to every scanned directory. + */ +function templateFromUrl(url: string, fullPath: string, cwd: string): TemplateSource | null { + try { + const templatePath = resolve(dirname(fullPath), url); + const root = realPath(cwd); + const real = realPath(templatePath); + const inside = relative(root, real); + if (escapes(inside) || isAbsolute(inside)) return null; + const text = readFileSync(real, 'utf-8'); + // `inside` is already relative(root, real): both real, so it matches + // `cwd`-relative paths reported elsewhere without a second `relative()` + // call that would mix a real path with an unresolved `cwd` and produce a + // long, wrong `../../` chain wherever `cwd` sits behind a symlink itself + // (e.g. macOS's /var -> /private/var). + return { text, file: inside, lineAt: lineCounter(text), baseOffset: 0 }; + } catch { + // templateUrl does not resolve to a readable file + return null; + } +} + +function recordUsages( + templateText: string, + file: string, + lineAt: (index: number) => number, + baseOffset: number, + out: Map, +) { + for (const { name, index } of pipeUsesIn(templateText)) { + if (!BUILTIN_PIPES.has(name)) continue; + const usages = out.get(name) ?? []; + usages.push({ file, line: lineAt(baseOffset + index) }); + out.set(name, usages); + } +} + +/** + * Byte spans of every real Angular expression in a template: `{{ }}` + * interpolations, bound attribute/event/structural-directive values + * (`[x]="…"`, `(x)="…"`, `*x="…"`), and `@if`/`@for`/`@switch`/`@case` + * conditions. Plain markup and text nodes — where `| word` is prose, not a + * pipe — fall outside every span. + */ +function expressionRegionsIn(text: string): { start: number; end: number }[] { + const regions: { start: number; end: number }[] = []; + + const interpolation = /\{\{/g; + let m: RegExpExecArray | null; + while ((m = interpolation.exec(text)) !== null) { + const start = m.index + 2; + let depth = 1; + let i = start; + for (; i < text.length; i++) { + const ch = text[i]; + if (ch === '"' || ch === "'" || ch === '`') { + i = skipString(text, i); + continue; + } + if (ch === '{') depth++; + else if (ch === '}' && --depth === 0) break; + } + const end = Math.min(i, text.length); + regions.push({ start, end }); + interpolation.lastIndex = end + 1; + } + + // [prop]="…", [(prop)]="…", (event)="…", *directive="…" + const boundAttr = /(?:\[\(?[\w.$-]+\)?\]|\([\w.$-]+\)|\*[\w.$-]+)\s*=\s*(["'])/g; + while ((m = boundAttr.exec(text)) !== null) { + const quote = m[1]; + const start = m.index + m[0].length; + const end = text.indexOf(quote, start); + if (end === -1) continue; + regions.push({ start, end }); + boundAttr.lastIndex = end + 1; + } + + const control = /@(?:if|for|switch|case)\s*\(/g; + while ((m = control.exec(text)) !== null) { + const open = m.index + m[0].length - 1; + const close = matchDelimiter(text, open, '(', ')'); + regions.push({ start: open + 1, end: close }); + control.lastIndex = close + 1; + } + + return regions; +} + +/** + * Every `| name` pipe use found inside `text`'s real Angular expressions, + * each with its absolute offset into `text`. A `| word` sitting in plain + * markup or a text node — `| json` in a docs paragraph, say — + * is outside every expression region and so is never reported. + */ +export function pipeUsesIn(text: string): { name: string; index: number }[] { + const uses: { name: string; index: number }[] = []; + for (const region of expressionRegionsIn(text)) { + const slice = text.slice(region.start, region.end); + PIPE_USE.lastIndex = 0; + let match: RegExpExecArray | null; + while ((match = PIPE_USE.exec(slice)) !== null) { + const name = match[1]; + uses.push({ name, index: region.start + match.index + match[0].length - name.length }); + } + } + return uses; +} diff --git a/packages/ng-devtools/src/rpc/get-providers.ts b/packages/ng-devtools/src/rpc/get-providers.ts index 6a2a184..9a024dc 100644 --- a/packages/ng-devtools/src/rpc/get-providers.ts +++ b/packages/ng-devtools/src/rpc/get-providers.ts @@ -10,7 +10,7 @@ import { } from './source-scan.ts'; import * as v from 'valibot'; import { describable } from './agent-schema.ts'; -import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; +import { lstatSync, readFileSync, readdirSync } from 'node:fs'; import { join, relative } from 'node:path'; const ProviderEntrySchema = v.object({ diff --git a/packages/ng-devtools/src/rpc/get-routes.ts b/packages/ng-devtools/src/rpc/get-routes.ts index c7ef6a6..39870e4 100644 --- a/packages/ng-devtools/src/rpc/get-routes.ts +++ b/packages/ng-devtools/src/rpc/get-routes.ts @@ -1,8 +1,8 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; import { describable } from './agent-schema.ts'; +import { lstatSync, readFileSync, readdirSync } from 'node:fs'; import { analogVersion, buildRoutes, flattenRoutes } from './analog-scan.ts'; -import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; import { join, relative } from 'node:path'; import { IGNORED_DIRS, diff --git a/packages/ng-devtools/src/rpc/get-signals.ts b/packages/ng-devtools/src/rpc/get-signals.ts index 686c08d..7b595d6 100644 --- a/packages/ng-devtools/src/rpc/get-signals.ts +++ b/packages/ng-devtools/src/rpc/get-signals.ts @@ -1,7 +1,7 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; import { describable } from './agent-schema.ts'; -import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; +import { lstatSync, readFileSync, readdirSync } from 'node:fs'; import { join, relative } from 'node:path'; import { ANNOTATION, diff --git a/packages/ng-devtools/src/rpc/page-sessions.ts b/packages/ng-devtools/src/rpc/page-sessions.ts new file mode 100644 index 0000000..090c9d0 --- /dev/null +++ b/packages/ng-devtools/src/rpc/page-sessions.ts @@ -0,0 +1,56 @@ +interface SessionMeta { + id?: number; +} + +/** The slice of devframe's RPC host used here. `_emitSessionDisconnected` is + * `@internal` there, but every transport (SSE and WebSocket) calls it the + * moment a client's connection drops, which is the only signal that fires + * when a tab is closed — a `pagehide` message often never makes it out. */ +interface SessionHost { + getCurrentRpcSession?: () => { meta?: SessionMeta } | undefined; + _emitSessionDisconnected?: (meta: SessionMeta) => void; +} + +export interface PageSessions { + /** Remembers which connection the page in the current RPC call came from. */ + bind(pageId: string): void; + unbind(pageId: string): void; +} + +/** Calls `onGone` with every page whose connection just closed. If the host + * doesn't expose the hook, this is a no-op and expiry stays the fallback. */ +export function trackPageSessions( + host: unknown, + onGone: (pageIds: string[]) => void, +): PageSessions { + const h = host as SessionHost; + const sessionOf = new Map(); + + const original = h._emitSessionDisconnected; + if (typeof original === 'function') { + h._emitSessionDisconnected = (meta) => { + original.call(h, meta); + try { + const gone = [...sessionOf].filter(([, id]) => id === meta?.id).map(([pageId]) => pageId); + for (const pageId of gone) sessionOf.delete(pageId); + if (gone.length) onGone(gone); + } catch { + // never break the transport's own disconnect handling + } + }; + } + + return { + bind(pageId) { + try { + const id = h.getCurrentRpcSession?.()?.meta?.id; + if (typeof id === 'number') sessionOf.set(pageId, id); + } catch { + // called outside an RPC request (e.g. in-process): expiry covers it + } + }, + unbind(pageId) { + sessionOf.delete(pageId); + }, + }; +} diff --git a/packages/ng-devtools/src/rpc/pipe-explain.ts b/packages/ng-devtools/src/rpc/pipe-explain.ts new file mode 100644 index 0000000..93ffe2f --- /dev/null +++ b/packages/ng-devtools/src/rpc/pipe-explain.ts @@ -0,0 +1,95 @@ +import { scanPipes } from './get-pipes.ts'; +import { lintPipes, type PipeLintFinding } from './pipe-lint.ts'; +import type { PipesState, PipeUsageInfo } from './pipes-tools.ts'; + +function code(text: string): string { + return `\`${text.replace(/`/g, "'").replace(/\s+/g, ' ')}\``; +} + +const MAX_VALUE_CHARS = 200; + +/** Size-capped JSON, so object/array structure survives (unlike `String`, + * which collapses to `[object Object]`) without an unbounded blob. */ +function capJson(value: unknown): string { + if (value === undefined) return 'undefined'; + let json: string | undefined; + try { + json = JSON.stringify(value); + } catch { + json = undefined; + } + const text = json ?? String(value); + return text.length > MAX_VALUE_CHARS ? `${text.slice(0, MAX_VALUE_CHARS)}…` : text; +} + +/** Formats everything known about one pipe — static declaration/usage, live + * call counts and last input/output (if instrumented), and any lint findings + * — as markdown for an agent asking "why is this pipe slow or stale?" */ +export function explainPipeText(name: string, cwd: string, live: PipesState): string { + const declared = scanPipes(cwd).filter((p) => p.name === name); + const runtime = live.pipes.find((p) => p.name === name); + const findings = lintPipes(cwd).filter((f) => f.pipe === name); + + if (!declared.length && !runtime) { + return `No pipe named ${code(name)} was found in source or on the running page.`; + } + + const lines: string[] = []; + for (const d of declared) { + lines.push( + `${code(d.className)}${d.builtin ? ' (built-in, @angular/common)' : ''} — ${d.isPure ? 'pure' : 'impure'}, ${d.isStandalone ? 'standalone' : 'declared via NgModule'}, at ${code(`${d.file}:${d.line}`)}.`, + ); + } + if (!declared.length) lines.push(`Not found by source scan (only seen live).`); + + lines.push('', runtimeText(runtime, live.instrumented.length > 0)); + + if (findings.length) { + lines.push('', '**Lint findings:**'); + lines.push(...findings.map((f) => lintLine(f))); + } + + return lines.join('\n'); +} + +function runtimeText(runtime: PipeUsageInfo | undefined, instrumented: boolean): string { + if (!runtime) { + return instrumented + ? '**Live:** not seen on the currently connected page.' + : '**Live:** unknown — instrumentation is off. Turn on "Instrument" in the Pipes panel for call counts, last input/output and stale-argument detection.'; + } + const components = runtime.components.map((c) => `${c.name} (${c.count})`).join(', '); + const parts = [ + `**Live:** ${runtime.instanceCount} instance(s), used by ${components || 'unknown'}.`, + ]; + if (runtime.call) { + parts.push( + `Called ${runtime.call.callCount} time(s). Last input: ${code(capJson(runtime.call.lastArgs))}. Last output: ${code(capJson(runtime.call.lastResult))}.${ + runtime.call.lastCaller ? ` Last caller: ${code(runtime.call.lastCaller)}.` : '' + }`, + ); + const instances = runtime.call.instances; + if (instances?.length) { + parts.push( + `Per instance: ${instances + .map( + (i) => + `${i.component} ×${i.callCount} ${code(capJson(i.lastArgs))} → ${code(capJson(i.lastResult))}`, + ) + .join('; ')}.`, + ); + } + } else if (instrumented) { + parts.push('No calls recorded yet.'); + } + if (runtime.stale) { + parts.push( + '**Experimental:** this pure pipe was fed an argument that changed contents without changing reference — it may be showing a stale value.', + ); + } + return parts.join(' '); +} + +function lintLine(f: PipeLintFinding): string { + return `- **${f.severity}** ${f.rule} at ${code(`${f.file}:${f.line}`)}: ${f.message} Fix: ${f.fix}`; +} diff --git a/packages/ng-devtools/src/rpc/pipe-lint.ts b/packages/ng-devtools/src/rpc/pipe-lint.ts new file mode 100644 index 0000000..59e23ca --- /dev/null +++ b/packages/ng-devtools/src/rpc/pipe-lint.ts @@ -0,0 +1,209 @@ +import { lstatSync, readFileSync, readdirSync } from 'node:fs'; +import { join, relative } from 'node:path'; +import { BUILTIN_PIPES, pipeUsesIn, templatesIn, type TemplateSource } from './get-pipes.ts'; +import { + IGNORED_DIRS, + classScopes, + lineCounter, + maskStrings, + matchDelimiter, + sourceRoots, + stripComments, +} from './source-scan.ts'; + +export type LintSeverity = 'error' | 'warning' | 'info'; + +export interface PipeLintFinding { + rule: string; + severity: LintSeverity; + pipe: string; + file: string; + line: number; + message: string; + fix: string; +} + +/** Declared (custom) pipe purity, keyed by template name — used to tell an + * impure custom pipe from a pure one inside a `@for` block. Built-ins come + * from `BUILTIN_PIPES` directly. */ +type PurityMap = Map; + +export function lintPipesText(cwd: string): string { + const findings = lintPipes(cwd); + if (!findings.length) return 'No pipe problems found by the lint rules.'; + const order = { error: 0, warning: 1, info: 2 }; + const lines = findings + .sort((a, b) => order[a.severity] - order[b.severity]) + .map( + (f) => + `- **${f.severity}** ${f.rule} on \`${f.pipe}\` at \`${f.file}:${f.line}\`: ${f.message} Fix: ${f.fix}`, + ); + return lines.join('\n'); +} + +export function lintPipes(cwd: string): PipeLintFinding[] { + const files: { content: string; relPath: string; fullPath: string }[] = []; + for (const root of sourceRoots(cwd)) walk(root, cwd, files); + + const purity: PurityMap = new Map(); + for (const [name, meta] of BUILTIN_PIPES) purity.set(name, meta.isPure); + for (const { content } of files) { + for (const scope of classScopes(maskStrings(stripComments(content)), stripComments(content))) { + if (scope.kind === 'pipe' && scope.pipeName) { + purity.set(scope.pipeName, !/\bpure\s*:\s*false\b/.test(scope.decoratorArgs ?? '')); + } + } + } + + const findings: PipeLintFinding[] = []; + for (const { content, relPath, fullPath } of files) { + for (const template of templatesIn(content, relPath, fullPath, cwd)) { + findings.push(...impurePipeInForFindings(template, purity)); + findings.push(...jsonPipeFindings(template)); + } + findings.push(...signalInPurePipeFindings(content, relPath)); + } + return findings; +} + +function walk( + dir: string, + cwd: string, + out: { content: string; relPath: string; fullPath: string }[], +) { + let entries: string[]; + try { + entries = readdirSync(dir); + } catch { + return; + } + for (const entry of entries) { + const full = join(dir, entry); + try { + const stats = lstatSync(full); + if (stats.isSymbolicLink()) continue; + if (stats.isDirectory()) { + if (!IGNORED_DIRS.has(entry.toLowerCase())) walk(full, cwd, out); + continue; + } + } catch { + continue; + } + if (!entry.endsWith('.ts') || entry.endsWith('.spec.ts')) continue; + try { + out.push({ + content: readFileSync(full, 'utf-8'), + relPath: relative(cwd, full), + fullPath: full, + }); + } catch { + // skip + } + } +} + +/** Byte spans of every `@for (...) { ... }` block's body in `text`. */ +function forBlocks(text: string): { start: number; end: number }[] { + const blocks: { start: number; end: number }[] = []; + const re = /@for\s*\(/g; + let match: RegExpExecArray | null; + while ((match = re.exec(text)) !== null) { + const openParen = match.index + match[0].length - 1; + const closeParen = matchDelimiter(text, openParen, '(', ')'); + if (closeParen >= text.length) break; + const openBrace = text.indexOf('{', closeParen); + if (openBrace === -1) break; + const closeBrace = matchDelimiter(text, openBrace, '{', '}'); + blocks.push({ start: openBrace, end: closeBrace }); + re.lastIndex = openBrace + 1; + } + return blocks; +} + +function impurePipeInForFindings(template: TemplateSource, purity: PurityMap): PipeLintFinding[] { + const findings: PipeLintFinding[] = []; + for (const block of forBlocks(template.text)) { + const body = template.text.slice(block.start, block.end); + for (const { name, index } of pipeUsesIn(body)) { + const isPure = purity.get(name); + if (isPure === undefined || isPure) continue; + findings.push({ + rule: 'impure-pipe-in-for', + severity: 'warning', + pipe: name, + file: template.file, + line: template.lineAt(template.baseOffset + block.start + index), + message: `Impure pipe ${JSON.stringify(name)} runs on every change-detection pass, inside an @for block — potentially once per row, every check.`, + fix: 'Precompute the value on the item before the loop, use a pure pipe, or memoize the transform yourself.', + }); + } + } + return findings; +} + +function jsonPipeFindings(template: TemplateSource): PipeLintFinding[] { + const findings: PipeLintFinding[] = []; + for (const { name, index } of pipeUsesIn(template.text)) { + if (name !== 'json') continue; + findings.push({ + rule: 'json-pipe-in-template', + severity: 'info', + pipe: 'json', + file: template.file, + line: template.lineAt(template.baseOffset + index), + message: + '`| json` is a debugging aid (JsonPipe), not something users are usually meant to see.', + fix: 'Remove it before shipping, or gate it behind a dev-only flag.', + }); + } + return findings; +} + +const SIGNAL_FIELD = + /(?(); + SIGNAL_FIELD.lastIndex = 0; + let fieldMatch: RegExpExecArray | null; + while ((fieldMatch = SIGNAL_FIELD.exec(classBody)) !== null) signalFields.add(fieldMatch[1]); + if (!signalFields.size) continue; + + const transformStart = TRANSFORM_METHOD.exec(classBody); + if (!transformStart) continue; + const bodyOpen = scope.start + transformStart.index + transformStart[0].length - 1; + const bodyClose = matchDelimiter(code, bodyOpen, '{', '}'); + const transformBody = code.slice(bodyOpen, bodyClose); + + const readPattern = /\bthis\.(#?[$\w]+)\s*\(\s*\)/g; + let readMatch: RegExpExecArray | null; + const flagged = new Set(); + while ((readMatch = readPattern.exec(transformBody)) !== null) { + const field = readMatch[1]; + if (!signalFields.has(field) || flagged.has(field)) continue; + flagged.add(field); + findings.push({ + rule: 'signal-read-in-pure-pipe', + severity: 'warning', + pipe: scope.pipeName, + file: relPath, + line: lineAt(bodyOpen + readMatch.index), + message: `transform() reads this.${field}(), a signal — but a pure pipe only recomputes when its own arguments change, not when a signal it reads changes.`, + fix: "Pass the signal's value as a transform argument instead, or mark the pipe `pure: false`.", + }); + } + } + return findings; +} diff --git a/packages/ng-devtools/src/rpc/pipes-tools.ts b/packages/ng-devtools/src/rpc/pipes-tools.ts new file mode 100644 index 0000000..9140cf7 --- /dev/null +++ b/packages/ng-devtools/src/rpc/pipes-tools.ts @@ -0,0 +1,203 @@ +// Pages heartbeat every few seconds, so a closed tab whose `forget` message +// never arrived drops out of the panel (and its `| async` entries with it) fast. +const PAGE_EXPIRES_MS = 15_000; +const MAX_MERGED_INSTANCES = 10; + +function isRecord(value: unknown): value is object { + return !!value && typeof value === 'object'; +} + +export interface PipeComponentUsage { + /** Owning component's class name, best-effort (falls back to "?"). */ + name: string; + count: number; +} + +/** One pipe instance's most recent call, for when several usages of the same + * pipe see different values. */ +export interface PipeInstanceCall { + component: string; + callCount: number; + lastArgs?: unknown[]; + lastResult?: unknown; + lastCaller?: string; +} + +export interface PipeCallInfo { + callCount: number; + /** Most recent call per instance (capped), present when more than one instance has been called. */ + instances?: PipeInstanceCall[]; + lastArgs?: unknown[]; + lastResult?: unknown; + lastCaller?: string; +} + +export interface StaleFinding { + detectedAt: number; +} + +export interface PipeUsageInfo { + name: string; + className: string; + isPure: boolean; + instanceCount: number; + components: PipeComponentUsage[]; + /** Present only once instrumentation is on and at least one real call happened. */ + call?: PipeCallInfo; + /** Present only once a stale-pure-pipe finding has fired for this pipe. Experimental. */ + stale?: StaleFinding; +} + +export interface AsyncUsageInfo { + /** Owning component's class name, best-effort. */ + component: string; + hasSource: boolean; + /** Best-effort, size-capped description of the latest emitted value. */ + latestValue?: string; + /** Another `| async` usage on the page is subscribed to the same source. */ + duplicate: boolean; +} + +export interface PipesState { + pipes: PipeUsageInfo[]; + async: AsyncUsageInfo[]; + reportedAt: number; + /** Page ids that currently have instrumentation switched on. */ + instrumented: string[]; +} + +export interface PipePageReport { + pageId: string; + pipes: PipeUsageInfo[]; + async?: AsyncUsageInfo[]; + instrumented?: boolean; +} + +function isPipeComponentUsage(value: unknown): value is PipeComponentUsage { + if (!isRecord(value)) return false; + const usage: Partial = value; + return typeof usage.name === 'string' && typeof usage.count === 'number'; +} + +function isPipeUsageInfo(value: unknown): value is PipeUsageInfo { + if (!isRecord(value)) return false; + const info: Partial = value; + return ( + typeof info.name === 'string' && + typeof info.className === 'string' && + typeof info.isPure === 'boolean' && + typeof info.instanceCount === 'number' && + Array.isArray(info.components) && + info.components.every(isPipeComponentUsage) + ); +} + +function isAsyncUsageInfo(value: unknown): value is AsyncUsageInfo { + if (!isRecord(value)) return false; + const usage: Partial = value; + return ( + typeof usage.component === 'string' && + typeof usage.hasSource === 'boolean' && + typeof usage.duplicate === 'boolean' && + (usage.latestValue === undefined || typeof usage.latestValue === 'string') + ); +} + +export function isPipePageReport(value: unknown): value is PipePageReport { + if (!isRecord(value)) return false; + const report: Partial = value; + return ( + typeof report.pageId === 'string' && + Array.isArray(report.pipes) && + report.pipes.every(isPipeUsageInfo) && + (report.async === undefined || + (Array.isArray(report.async) && report.async.every(isAsyncUsageInfo))) && + (report.instrumented === undefined || typeof report.instrumented === 'boolean') + ); +} + +type Pages = Map; + +/** Same-named pipes reported by several pages collapse into one record so + * consumers looking a pipe up by name see every page's data, not just the + * first page's. */ +function aggregatePipes(all: (PipePageReport & { reportedAt: number })[]): PipeUsageInfo[] { + const byName = new Map(); + const callAt = new Map(); + for (const page of all) { + for (const pipe of page.pipes) { + const existing = byName.get(pipe.name); + if (!existing) { + byName.set(pipe.name, { + ...pipe, + components: pipe.components.map((c) => ({ ...c })), + call: pipe.call && { ...pipe.call }, + }); + if (pipe.call) callAt.set(pipe.name, page.reportedAt); + continue; + } + existing.instanceCount += pipe.instanceCount; + for (const component of pipe.components) { + const match = existing.components.find((c) => c.name === component.name); + if (match) match.count += component.count; + else existing.components.push({ ...component }); + } + if (pipe.call) { + if (!existing.call) { + existing.call = { ...pipe.call }; + callAt.set(pipe.name, page.reportedAt); + } else { + const newer = page.reportedAt >= (callAt.get(pipe.name) ?? 0); + existing.call = { + ...(newer ? pipe.call : existing.call), + callCount: existing.call.callCount + pipe.call.callCount, + instances: [...(existing.call.instances ?? []), ...(pipe.call.instances ?? [])].slice( + 0, + MAX_MERGED_INSTANCES, + ), + }; + if (newer) callAt.set(pipe.name, page.reportedAt); + } + } + if (pipe.stale && (!existing.stale || pipe.stale.detectedAt > existing.stale.detectedAt)) { + existing.stale = pipe.stale; + } + } + } + return Array.from(byName.values()); +} + +function stateOf(pages: Pages): PipesState { + const all = Array.from(pages.values()); + return { + pipes: aggregatePipes(all), + async: all.flatMap((page) => page.async ?? []), + reportedAt: all.length ? Math.min(...all.map((page) => page.reportedAt)) : 0, + instrumented: all.filter((page) => page.instrumented).map((page) => page.pageId), + }; +} + +export function currentPipes(pages: Pages): PipesState { + return stateOf(pages); +} + +export function expirePipePages(pages: Pages, now = Date.now()): PipesState | null { + let expired = false; + for (const [id, page] of pages) { + if (now - page.reportedAt > PAGE_EXPIRES_MS) { + pages.delete(id); + expired = true; + } + } + return expired ? stateOf(pages) : null; +} + +export function mergePipePageReport( + pages: Pages, + report: PipePageReport, + now = Date.now(), +): PipesState { + pages.set(report.pageId, { ...report, reportedAt: now }); + expirePipePages(pages, now); + return stateOf(pages); +} diff --git a/packages/ng-devtools/src/rpc/source-scan.ts b/packages/ng-devtools/src/rpc/source-scan.ts index e6972ec..f6a8c01 100644 --- a/packages/ng-devtools/src/rpc/source-scan.ts +++ b/packages/ng-devtools/src/rpc/source-scan.ts @@ -197,21 +197,25 @@ export interface ClassScope { start: number; end: number; component?: string; - /** Which of the two decorators it carries, when it carries one. */ - kind?: 'component' | 'directive'; + /** The `name` a `@Pipe` decorator gives it, when it carries one. */ + pipeName?: string; + /** The class's own name, whatever decorator it carries. */ + className?: string; + /** Which decorator it carries, when it carries one. */ + kind?: 'component' | 'directive' | 'pipe'; /** That decorator's argument list, parentheses included. */ decoratorArgs?: string; } -const DECORATOR = /@(Component|Directive)\s*\(/g; +const DECORATOR = /@(Component|Directive|Pipe)\s*\(/g; /** * The span of every class in the file, each with the selector of the - * `@Component` or `@Directive` decorating it. + * `@Component`/`@Directive`, or the name of the `@Pipe`, decorating it. */ export function classScopes(code: string, source: string): ClassScope[] { const scopes: ClassScope[] = []; - const declaration = /\bclass\s+\w+/g; + const declaration = /\bclass\s+(\w+)/g; let previousEnd = 0; let match: RegExpExecArray | null; // `code` has string contents masked out, so a class written inside a @@ -223,6 +227,7 @@ export function classScopes(code: string, source: string): ClassScope[] { scopes.push({ start: match.index, end, + className: match[1], ...decoratorOf(code.slice(previousEnd, match.index), source.slice(previousEnd, match.index)), }); previousEnd = end; @@ -256,30 +261,35 @@ function classBodyStart(code: string, from: number): number { * the unmasked copy, where it survives. */ /** - * The `@Component` or `@Directive` that precedes a class, read once. Matching - * the decorator name with a word boundary keeps `@ComponentMeta()` from being - * taken for `@Component`, and returning its arguments here means no caller has - * to look the decorator up a second time and disagree about which one it is. + * The `@Component`, `@Directive` or `@Pipe` that precedes a class, read once. + * Matching the decorator name with a word boundary keeps `@ComponentMeta()` + * from being taken for `@Component`, and returning its arguments here means no + * caller has to look the decorator up a second time and disagree about which + * one it is. */ function decoratorOf( code: string, source: string, -): Pick { +): Pick { let open = -1; - let kind: 'component' | 'directive' | undefined; + let kind: 'component' | 'directive' | 'pipe' | undefined; for (const match of code.matchAll(DECORATOR)) { open = match.index + match[0].length - 1; - kind = match[1] === 'Directive' ? 'directive' : 'component'; + kind = match[1] === 'Directive' ? 'directive' : match[1] === 'Pipe' ? 'pipe' : 'component'; } if (open === -1) return {}; const close = matchDelimiter(code, open, '(', ')'); const args = code.slice(open, close); const decoratorArgs = code.slice(open, close + 1); - const key = /\bselector\s*:\s*['"`]/.exec(args); + // A pipe is named by `name`, a component or directive by `selector`. + const key = (kind === 'pipe' ? /\bname\s*:\s*['"`]/ : /\bselector\s*:\s*['"`]/).exec(args); if (!key) return { kind, decoratorArgs }; const quote = open + key.index + key[0].length - 1; - return { component: source.slice(quote + 1, skipString(source, quote)), kind, decoratorArgs }; + const value = source.slice(quote + 1, skipString(source, quote)); + return kind === 'pipe' + ? { pipeName: value, kind, decoratorArgs } + : { component: value, kind, decoratorArgs }; } /** Index of the delimiter that closes the one at `open`. */ @@ -418,12 +428,12 @@ function parseJsonc(source: string): string { * Whether a relative path leaves its base. A plain `startsWith('..')` also * matches a child named `..foo`, which does not. */ -function escapes(rel: string): boolean { +export function escapes(rel: string): boolean { return rel === '..' || rel.startsWith('..' + sep); } /** The path with symlinks resolved, or the path itself when it does not exist. */ -function realPath(path: string): string { +export function realPath(path: string): string { try { return realpathSync(path); } catch { diff --git a/src/app/examples/examples-overview.ts b/src/app/examples/examples-overview.ts index 6c9697f..cba6066 100644 --- a/src/app/examples/examples-overview.ts +++ b/src/app/examples/examples-overview.ts @@ -141,6 +141,13 @@ export class ExamplesOverview { title: 'Every kind of form', blurb: 'Signal Forms, reactive and template-driven forms with failing validators.', }, + { + path: 'pipes', + tab: 'Pipes', + title: 'Pure, impure and module', + blurb: + 'A pure formatting pipe, an impure one that recomputes every tick, and a standalone: false one declared through an NgModule.', + }, { path: 'http', tab: 'SSR & HTTP', diff --git a/src/app/examples/examples.routes.ts b/src/app/examples/examples.routes.ts index e1f0125..170e107 100644 --- a/src/app/examples/examples.routes.ts +++ b/src/app/examples/examples.routes.ts @@ -22,6 +22,11 @@ export const examplesRoutes: Routes = [ loadComponent: () => import('./components-example').then((m) => m.ComponentsExample), data: { title: 'Components', inspector: 'components' }, }, + { + path: 'pipes', + loadComponent: () => import('./pipes-example').then((m) => m.PipesExample), + data: { title: 'Pipes', inspector: 'pipes' }, + }, { path: 'di', loadComponent: () => import('./di-example').then((m) => m.DiExample), diff --git a/src/app/examples/examples.ts b/src/app/examples/examples.ts index 1404772..d3a5900 100644 --- a/src/app/examples/examples.ts +++ b/src/app/examples/examples.ts @@ -29,6 +29,7 @@ import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; Injectors Routes Forms + Pipes SSR & HTTP diff --git a/src/app/examples/pipes-example.ts b/src/app/examples/pipes-example.ts new file mode 100644 index 0000000..09d2c74 --- /dev/null +++ b/src/app/examples/pipes-example.ts @@ -0,0 +1,218 @@ +import { AsyncPipe, isPlatformBrowser, JsonPipe } from '@angular/common'; +import { Component, effect, inject, PLATFORM_ID, signal } from '@angular/core'; +import { BehaviorSubject, interval, map, of } from 'rxjs'; +import { ExamplePage } from './example-page'; +import { LegacyFormatModule } from './pipes/legacy-format.module'; +import { ScaledPipe } from './pipes/scaled.pipe'; +import { TimeAgoPipe } from './pipes/time-ago.pipe'; +import { TruncatePipe } from './pipes/truncate.pipe'; + +@Component({ + selector: 'app-pipes-example', + imports: [ + ExamplePage, + TruncatePipe, + TimeAgoPipe, + LegacyFormatModule, + JsonPipe, + ScaledPipe, + AsyncPipe, + ], + template: ` + + + appTruncate is a pure pipe: it only recomputes when its own arguments change. + appTimeAgo is declared pure: false, so it recomputes on every + change detection run and can drift on its own, without a new value to react to. + appLegacyFormat is declared standalone: false, so it can only be + used here because LegacyFormatModule declares and exports it and is imported + above instead of the pipe class itself. The section below deliberately breaks a few rules + the Pipes panel's Lint tab checks for — open it to see the findings. + + + Edit the message, then watch "posted" advance by itself as the clock ticks. + + + + +
+
truncated (pure)
+
{{ message() | appTruncate: 24 }}
+
posted (impure)
+
{{ postedAt() | appTimeAgo }}
+
ticks
+
{{ tick() }} (forces the recompute above)
+
legacy (module)
+
{{ message() | appLegacyFormat | appTruncate: 24 }}
+
+ + + +

Lint examples

+

+ Each readout below trips one of the Pipes panel's lint rules on purpose. +

+ +
    + @for (post of posts(); track post.id) { +
  • + {{ post.text }} — + {{ post.at | appTimeAgo }} +
  • + } +
+

+ impure-pipe-in-for: appTimeAgo is impure and runs on every change-detection + pass for every row above, not just when a row's own timestamp changes. +

+ +
+
message (debug)
+
{{ message() | json }}
+
+

+ json-pipe-in-template: the json pipe above is a debugging aid, not something + meant to ship. +

+ +
+
5 × factor
+
{{ 5 | appScaled }}
+
+

+ signal-read-in-pure-pipe: appScaled is pure but reads a + factor signal directly in transform(). Its memoization only tracks + the 5 above, so a change to factor alone would never cause a + recompute. +

+ +

Async pipe

+

+ clock$ is bound with | async twice below, so the Pipes panel's + Async tab should show its latest value and flag a duplicate subscription. + status$ is bound once, for contrast — no warning there. +

+ +
+
clock (a)
+
{{ clock$ | async }}
+
clock (b)
+
{{ clock$ | async }}
+
status
+
{{ status$ | async }}
+
+
+ `, + styles: ` + .message { + padding: 8px 10px; + border: 1px solid var(--line-strong); + border-radius: 6px; + background: var(--surface); + color: var(--ink); + font: inherit; + resize: vertical; + } + .readouts { + display: grid; + grid-template-columns: minmax(0, max-content) minmax(0, 1fr); + gap: 4px 16px; + margin: 0; + } + dt { + color: var(--muted); + } + dd { + margin: 0; + font-variant-numeric: tabular-nums; + } + .hint-text { + color: var(--muted); + font-size: 13px; + font-variant-numeric: normal; + } + .lint-heading { + margin: 8px 0 0; + font-size: 15px; + } + .rule-name { + margin: 0 0 4px; + } + .posts { + list-style: none; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + gap: 4px; + } + .mono { + font-family: monospace; + font-size: 12px; + } + button { + justify-self: start; + padding: 6px 12px; + border: 1px solid var(--line-strong); + border-radius: 6px; + background: var(--surface); + cursor: pointer; + } + :focus-visible { + outline: 2px solid var(--brand); + outline-offset: 2px; + } + `, +}) +export class PipesExample { + private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID)); + + protected readonly message = signal( + 'Angular DevTools now inspects pipes, not just components and signals.', + ); + protected readonly postedAt = signal(Date.now()); + + /** Read in the template so a change detection run happens every second, + * without touching `postedAt` itself: that run is what gives the impure + * pipe above a reason to recompute. */ + protected readonly tick = signal(0); + + protected readonly posts = signal([ + { id: 1, text: 'Shipped the pipes inspector.', at: Date.now() - 30_000 }, + { id: 2, text: 'Added live call counts.', at: Date.now() - 120_000 }, + { id: 3, text: 'Wrote the lint rules.', at: Date.now() - 600_000 }, + ]); + + /** Bound twice below with `| async`, on purpose: each binding subscribes + * separately, so the Async tab should flag the second one as a duplicate + * subscription to the same source. No interval during SSR, matching + * `tick` above — there's no browser to clear it on navigation away. */ + protected readonly clock$ = this.isBrowser + ? interval(1000).pipe(map((n) => `tick ${n}`)) + : of('(ticking disabled during SSR)'); + + /** Bound once, for contrast with `clock$` above. */ + protected readonly status$ = new BehaviorSubject('online'); + + /** Held in a field so the Signals tab lists it and so it can be destroyed + * with the component. */ + private readonly _ticking = effect((onCleanup) => { + if (!this.isBrowser) return; + const id = setInterval(() => this.tick.update((value) => value + 1), 1000); + onCleanup(() => clearInterval(id)); + }); + + protected setMessage(event: Event) { + this.message.set((event.target as HTMLTextAreaElement).value); + } + + protected repost() { + this.postedAt.set(Date.now()); + } +} diff --git a/src/app/examples/pipes/legacy-format.module.ts b/src/app/examples/pipes/legacy-format.module.ts new file mode 100644 index 0000000..05e6f27 --- /dev/null +++ b/src/app/examples/pipes/legacy-format.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { LegacyFormatPipe } from './legacy-format.pipe'; + +/** The only way to make a `standalone: false` pipe usable elsewhere: declare + * it here and export it, then import this module rather than the pipe class. */ +@NgModule({ + declarations: [LegacyFormatPipe], + exports: [LegacyFormatPipe], +}) +export class LegacyFormatModule {} diff --git a/src/app/examples/pipes/legacy-format.pipe.ts b/src/app/examples/pipes/legacy-format.pipe.ts new file mode 100644 index 0000000..aa3808b --- /dev/null +++ b/src/app/examples/pipes/legacy-format.pipe.ts @@ -0,0 +1,12 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +/** Declared `standalone: false`: Angular requires a pipe like this to be + * declared and exported by an `NgModule` (see `legacy-format.module.ts`), + * then that module imported wherever the pipe is used. Listing the pipe + * class itself in a standalone component's `imports` is not enough. */ +@Pipe({ name: 'appLegacyFormat', standalone: false }) +export class LegacyFormatPipe implements PipeTransform { + transform(value: string): string { + return value.toUpperCase(); + } +} diff --git a/src/app/examples/pipes/scaled.pipe.ts b/src/app/examples/pipes/scaled.pipe.ts new file mode 100644 index 0000000..0999a1a --- /dev/null +++ b/src/app/examples/pipes/scaled.pipe.ts @@ -0,0 +1,13 @@ +import { Pipe, PipeTransform, signal } from '@angular/core'; + +/** Pure, but reads a signal directly in transform() instead of taking it as + * an argument: a memoization hazard, since a pure pipe only recomputes when + * its own arguments change, not when a signal it reads changes. Flagged by + * the "signal read in pure pipe" lint rule. */ +@Pipe({ name: 'appScaled' }) +export class ScaledPipe implements PipeTransform { + factor = signal(2); + transform(value: number): number { + return value * this.factor(); + } +} diff --git a/src/app/examples/pipes/time-ago.pipe.ts b/src/app/examples/pipes/time-ago.pipe.ts new file mode 100644 index 0000000..f2d81da --- /dev/null +++ b/src/app/examples/pipes/time-ago.pipe.ts @@ -0,0 +1,15 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +/** Impure: the same timestamp reads differently as the clock advances, so it + * must be declared `pure: false` to recompute on every change detection run. */ +@Pipe({ name: 'appTimeAgo', pure: false }) +export class TimeAgoPipe implements PipeTransform { + transform(value: number): string { + const seconds = Math.max(0, Math.round((Date.now() - value) / 1000)); + if (seconds < 5) return 'just now'; + if (seconds < 60) return `${seconds}s ago`; + const minutes = Math.round(seconds / 60); + if (minutes < 60) return `${minutes}m ago`; + return `${Math.round(minutes / 60)}h ago`; + } +} diff --git a/src/app/examples/pipes/truncate.pipe.ts b/src/app/examples/pipes/truncate.pipe.ts new file mode 100644 index 0000000..a4c2186 --- /dev/null +++ b/src/app/examples/pipes/truncate.pipe.ts @@ -0,0 +1,18 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +/** Pure: the same text and limit always produce the same string. */ +@Pipe({ name: 'appTruncate' }) +export class TruncatePipe implements PipeTransform { + transform(value: string, limit = 40): string { + if (limit <= 0) return ''; + // A string's code point count never exceeds its UTF-16 length, so this skips the array copy. + if (value.length <= limit) return value; + const codePoints = Array.from(value); + return codePoints.length > limit + ? `${codePoints + .slice(0, limit - 1) + .join('') + .trimEnd()}…` + : value; + } +}