From 4ea5407587d987a891e5962354ae699cb80de42a Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 16:38:38 +0000 Subject: [PATCH 01/14] feat(store): add Store DevTools history tools, ngrx.trace and action stats Close the open NgRx store items of #368 on the package side. - Store DevTools toggle, jump, commit, reset and pause run as a new `devtools` page request and the `ngrx-store-devtools` agent tool, gated by actions.ngrx. The classic report says when recording is paused and which logged actions are skipped. Lock and sweep are left out. - The opt-in `ngrx.trace` option (off by default) records the redacted app frames of each dispatch, method call, patchState and event. - The collector counts every action, method and event since load, with durations, the peak per second and a flag for an effect that dispatches the same action 20 times within a second. The server keeps the last counts until the page sends new ones. - A signal store that uses withDevtools() is no longer patched: the collector only watches it through watchState, or compares its state on each collect when watchState is not registered. - The `ngrx-explain-change` agent tool answers which log entries wrote a state path, with the action or method, its arguments, origin, causing event and call site. Refs #368 --- .../__tests__/action-tool-refusals.test.ts | 5 + .../devtools/src/__tests__/config.test.ts | 19 +- .../fixtures/agent-metadata-derived.json | 9 +- .../src/__tests__/ngrx-store-devtools.test.ts | 131 +++++++ .../src/__tests__/ngrx-trace-stats.test.ts | 282 +++++++++++++++ packages/devtools/src/config.ts | 35 +- packages/devtools/src/devframe.ts | 8 + packages/devtools/src/ngrx-collector.ts | 341 +++++++++++++++++- packages/devtools/src/ngrx-overlay.ts | 9 + packages/devtools/src/ngrx-shared.ts | 100 ++++- .../devtools/src/overlay-angular-native.ts | 1 + packages/devtools/src/overlay-nativescript.ts | 1 + packages/devtools/src/overlay.ts | 4 +- .../rpc/__tests__/ngrx-devtools-tools.test.ts | 120 ++++++ .../devtools/src/rpc/ngrx-devtools-tools.ts | 291 +++++++++++++++ packages/devtools/src/rpc/ngrx-live-tools.ts | 3 +- packages/devtools/src/rpc/ngrx-tools.ts | 25 ++ 17 files changed, 1359 insertions(+), 25 deletions(-) create mode 100644 packages/devtools/src/__tests__/ngrx-store-devtools.test.ts create mode 100644 packages/devtools/src/__tests__/ngrx-trace-stats.test.ts create mode 100644 packages/devtools/src/rpc/__tests__/ngrx-devtools-tools.test.ts create mode 100644 packages/devtools/src/rpc/ngrx-devtools-tools.ts diff --git a/packages/devtools/src/__tests__/action-tool-refusals.test.ts b/packages/devtools/src/__tests__/action-tool-refusals.test.ts index a7452e12..1972bcd5 100644 --- a/packages/devtools/src/__tests__/action-tool-refusals.test.ts +++ b/packages/devtools/src/__tests__/action-tool-refusals.test.ts @@ -59,6 +59,11 @@ const NOTHING_DONE: Record[]> = { 'watch-signal': [{ node: 'count' }, { node: 'count', page: 'gone' }], 'ngrx-dispatch': [{ type: '[Cart] Add' }, { type: '[Cart] Add', page: 'gone' }], 'ngrx-restore': [{ seq: 1 }, { latest: true }, { seq: 1, page: 'gone' }], + 'ngrx-store-devtools': [ + { op: 'commit' }, + { op: 'toggle', seq: 1 }, + { op: 'commit', page: 'gone' }, + ], 'tanstack-run-query': [ { action: 'refetch', id: 'q1' }, { action: 'refetch', id: 'q1', page: 'gone' }, diff --git a/packages/devtools/src/__tests__/config.test.ts b/packages/devtools/src/__tests__/config.test.ts index 7f116a16..be2725fb 100644 --- a/packages/devtools/src/__tests__/config.test.ts +++ b/packages/devtools/src/__tests__/config.test.ts @@ -61,6 +61,15 @@ async function boot(config?: PangularConfig) { } describe('resolvePangularConfig', () => { + it('keeps ngrx.trace off unless it is true, and reports a wrong value', () => { + expect(resolvePangularConfig().ngrx).toEqual({ trace: false }); + expect(resolvePangularConfig({ ngrx: { trace: true } }).ngrx).toEqual({ trace: true }); + expect(resolvePangularConfig({ ngrx: { trace: 'yes' } }).ngrx).toEqual({ trace: false }); + expect(pangularConfigProblems({ ngrx: { trace: 'yes' } })).toHaveLength(1); + expect(pangularConfigProblems({ ngrx: { trace: true } })).toEqual([]); + expect(pickPangularConfig({ ngrx: { trace: true } }).config.ngrx).toEqual({ trace: true }); + }); + it('turns everything on by default', () => { const config = resolvePangularConfig(); expect(Object.values(config.inspectors).every(Boolean)).toBe(true); @@ -312,6 +321,7 @@ describe('agent tool and RPC registration', () => { 'remove-http-rule', 'remove-ssr-override', 'ngrx-restore', + 'ngrx-store-devtools', 'set-component-property', 'set-http-rule', 'set-signal', @@ -436,6 +446,7 @@ describe('agent tool and RPC registration', () => { 'remove-http-rule', 'remove-ssr-override', 'ngrx-restore', + 'ngrx-store-devtools', 'set-component-property', 'set-http-rule', 'set-signal', @@ -456,8 +467,14 @@ describe('agent tool and RPC registration', () => { const ngrx = await boot({ actions: { ngrx: false } }); expect(ngrx.actionTools).not.toContain('ngrx-dispatch'); expect(ngrx.actionTools).not.toContain('ngrx-restore'); + expect(ngrx.actionTools).not.toContain('ngrx-store-devtools'); expect(ngrx.tools).toEqual( - expect.arrayContaining(['ngrx-inspect-entry', 'ngrx-export-session', 'ngrx-generate-test']), + expect.arrayContaining([ + 'ngrx-inspect-entry', + 'ngrx-export-session', + 'ngrx-generate-test', + 'ngrx-explain-change', + ]), ); expect(ngrx.tools).toContain('ngrx-scan'); const http = await boot({ actions: { http: false } }); diff --git a/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json b/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json index 1b7f3b6f..5c2d46c0 100644 --- a/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json +++ b/packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json @@ -47,6 +47,7 @@ "list-ssr-requests": "http", "navigate": "router", "ngrx-dispatch": "ngrx", + "ngrx-explain-change": "ngrx", "ngrx-export-session": "ngrx", "ngrx-generate-test": "ngrx", "ngrx-history": "ngrx", @@ -56,6 +57,7 @@ "ngrx-restore": "ngrx", "ngrx-scan": "ngrx", "ngrx-store": "ngrx", + "ngrx-store-devtools": "ngrx", "probe-route": "router", "read-provider-value": "injectors", "record-change-detection": "components", @@ -92,7 +94,7 @@ "ACTION_TOOLS": { "forms": ["fill-form", "run-form-action"], "router": ["clear-recordings", "navigate", "probe-route"], - "ngrx": ["ngrx-dispatch", "ngrx-restore"], + "ngrx": ["ngrx-dispatch", "ngrx-restore", "ngrx-store-devtools"], "http": [ "clear-recordings", "remove-http-rule", @@ -114,6 +116,7 @@ "navigate": "action", "ngrx-dispatch": "action", "ngrx-restore": "action", + "ngrx-store-devtools": "action", "probe-route": "action", "record-change-detection": "action", "record-guards": "action", @@ -182,11 +185,13 @@ "list-ssr-requests", "navigate", "ngrx-dispatch", + "ngrx-explain-change", "ngrx-export-session", "ngrx-history", "ngrx-inspect-store", "ngrx-restore", "ngrx-store", + "ngrx-store-devtools", "open-in-panel", "probe-route", "read-provider-value", @@ -275,6 +280,7 @@ "list-ssr-requests": ["http"], "navigate": ["router"], "ngrx-dispatch": ["ngrx"], + "ngrx-explain-change": ["ngrx"], "ngrx-export-session": ["ngrx"], "ngrx-generate-test": ["ngrx"], "ngrx-history": ["ngrx"], @@ -284,6 +290,7 @@ "ngrx-restore": ["ngrx"], "ngrx-scan": ["ngrx"], "ngrx-store": ["ngrx"], + "ngrx-store-devtools": ["ngrx"], "open-in-panel": null, "plugin:cart:totals": ["plugins"], "probe-route": ["router"], diff --git a/packages/devtools/src/__tests__/ngrx-store-devtools.test.ts b/packages/devtools/src/__tests__/ngrx-store-devtools.test.ts new file mode 100644 index 00000000..99dce9c6 --- /dev/null +++ b/packages/devtools/src/__tests__/ngrx-store-devtools.test.ts @@ -0,0 +1,131 @@ +// @vitest-environment jsdom +import { describe, expect, it } from 'vitest'; +import { createNgrxCollector } from '../ngrx-collector.ts'; +import { devtoolsProblem } from '../ngrx-shared.ts'; +import { angularAtLeast } from './angular-version.ts'; + +/** @ngrx 22 loads on Angular 19.0 and later. */ +const realNgrx = angularAtLeast('19.0'); + +let testBedReady = false; + +async function realStore(devtools = true) { + await import('@angular/compiler'); + const { TestBed } = await import('@angular/core/testing'); + if (!testBedReady) { + const { initAngularTestBed } = await import('./angular-version.ts'); + initAngularTestBed(); + testBedReady = true; + } + TestBed.resetTestingModule(); + const { EnvironmentInjector } = await import('@angular/core'); + const { Store, createAction, createReducer, on, props, provideStore } = + await import('@ngrx/store'); + const { provideStoreDevtools } = await import('@ngrx/store-devtools'); + const add = createAction('[Cart] Add', props<{ item: string }>()); + const cart = createReducer( + { items: [] as string[] }, + on(add, (state, { item }) => ({ items: [...state.items, item] })), + ); + TestBed.configureTestingModule({ + providers: [provideStore({ cart }), ...(devtools ? [provideStoreDevtools({})] : [])], + }); + const env = TestBed.inject(EnvironmentInjector) as unknown as { + get(token: unknown, fallback?: unknown): unknown; + }; + document.body.innerHTML = ''; + const root = document.querySelector('app-root')!; + const node = { get: (token: unknown, fallback?: unknown) => env.get(token, fallback) }; + const ng = { + getInjector: () => node, + getComponent: (el: Element) => (el === root ? {} : null), + ɵgetInjectorResolutionPath: () => [node, env], + ɵgetInjectorProviders: () => [], + }; + const collector = createNgrxCollector( + () => ng as never, + () => {}, + ); + collector.collect(); + const store = TestBed.inject(Store); + const items = () => + (collector.collect().classic!.state as { cart: { items: string[] } }).cart.items; + return { store, collector, add, items }; +} + +describe('devtoolsProblem', () => { + it('checks the operation and its fields', () => { + expect(devtoolsProblem({ op: 'commit' })).toBeNull(); + expect(devtoolsProblem({ op: 'nope' as never })).toMatch(/one of/); + expect(devtoolsProblem({ op: 'toggle' })).toMatch(/seq/); + expect(devtoolsProblem({ op: 'jump' })).toMatch(/either/); + expect(devtoolsProblem({ op: 'jump', seq: 1, index: 0 })).toMatch(/either/); + expect(devtoolsProblem({ op: 'jump', index: -1 })).toMatch(/whole/); + expect(devtoolsProblem({ op: 'pause', paused: 'yes' as never })).toMatch(/true or false/); + }); +}); + +describe.runIf(realNgrx)('Store DevTools history operations', () => { + it('needs provideStoreDevtools()', async () => { + const { collector } = await realStore(false); + expect(collector.run({ type: 'devtools', op: 'commit' }).error).toMatch(/provideStoreDevtools/); + }); + + it('skips and includes an action again', async () => { + const { store, collector, add, items } = await realStore(); + store.dispatch(add({ item: 'rome' })); + store.dispatch(add({ item: 'oslo' })); + const skip = collector.run({ type: 'devtools', op: 'toggle', seq: 1 }); + expect(skip).toMatchObject({ ok: true }); + expect(skip.message).toMatch(/Skipped action #1/); + expect(items()).toEqual(['oslo']); + expect(collector.collect().classic!.skipped).toEqual([1]); + expect(collector.logSince(0).at(-1)!.type).toBe('Store DevTools: skip #1'); + const include = collector.run({ type: 'devtools', op: 'toggle', seq: 1 }); + expect(include.message).toMatch(/Included/); + expect(items()).toEqual(['rome', 'oslo']); + expect(collector.collect().classic!.skipped).toBeUndefined(); + // Only the app's own actions count in the stats. + expect(collector.stats().stats.map((s) => s.type)).toEqual(['[Cart] Add']); + }); + + it('jumps to a Store DevTools state by index and by log entry', async () => { + const { store, collector, add, items } = await realStore(); + store.dispatch(add({ item: 'rome' })); + store.dispatch(add({ item: 'oslo' })); + expect(collector.run({ type: 'devtools', op: 'jump', index: 0 })).toMatchObject({ + ok: true, + paused: true, + }); + expect(items()).toEqual([]); + expect(collector.run({ type: 'devtools', op: 'jump', seq: 1 }).ok).toBe(true); + expect(items()).toEqual(['rome']); + expect(collector.run({ type: 'devtools', op: 'jump', index: 9 }).error).toMatch(/holds 3/); + }); + + it('commits and resets, and the earlier entries can no longer be restored', async () => { + const { store, collector, add, items } = await realStore(); + store.dispatch(add({ item: 'rome' })); + expect(collector.run({ type: 'devtools', op: 'commit' }).ok).toBe(true); + expect(items()).toEqual(['rome']); + expect(collector.logSince(0)[0]).toMatchObject({ restorable: false, unrestorable: 'dropped' }); + store.dispatch(add({ item: 'oslo' })); + expect(collector.run({ type: 'devtools', op: 'reset' }).ok).toBe(true); + expect(items()).toEqual([]); + const restore = collector.run({ type: 'restore', seq: 3 }); + expect(restore.error).toMatch(/no longer holds/); + }); + + it('pauses and resumes recording', async () => { + const { store, collector, add } = await realStore(); + const paused = collector.run({ type: 'devtools', op: 'pause' }); + expect(paused.message).toMatch(/Recording paused/); + expect(collector.collect().classic!.recordingPaused).toBe(true); + store.dispatch(add({ item: 'rome' })); + expect(collector.logSince(0).at(-1)).toMatchObject({ type: '[Cart] Add', restorable: false }); + expect(collector.run({ type: 'devtools', op: 'pause', paused: false }).message).toMatch( + /Recording again/, + ); + expect(collector.collect().classic!.recordingPaused).toBeUndefined(); + }); +}); diff --git a/packages/devtools/src/__tests__/ngrx-trace-stats.test.ts b/packages/devtools/src/__tests__/ngrx-trace-stats.test.ts new file mode 100644 index 00000000..2170864a --- /dev/null +++ b/packages/devtools/src/__tests__/ngrx-trace-stats.test.ts @@ -0,0 +1,282 @@ +// @vitest-environment jsdom +import { describe, expect, it, vi } from 'vitest'; +import { domTree } from '../host-tree.ts'; +import { createNgrxCollector, usesWithDevtools } from '../ngrx-collector.ts'; +import { registerNgrxSignals } from '../ngrx-register.ts'; +import { NGRX_LOOP_BURST } from '../ngrx-shared.ts'; +import { mergeNgrxReport, type NgrxPages } from '../rpc/ngrx-tools.ts'; + +const SIGNAL = Symbol('SIGNAL'); +const STATE_SOURCE = Symbol('STATE_SOURCE'); + +function writable(initial: T) { + const node = { value: initial }; + const getter = (() => node.value) as (() => T) & { + set(v: T): void; + update(fn: (v: T) => T): void; + }; + (getter as any)[SIGNAL] = node; + getter.set = (v: T) => { + node.value = v; + }; + getter.update = (fn: (v: T) => T) => { + node.value = fn(node.value); + }; + return getter; +} + +function patchState(store: any, patch: Record) { + for (const [key, value] of Object.entries(patch)) store[STATE_SOURCE][key].set(value); +} + +class TodoStore { + [STATE_SOURCE] = { filter: writable('all'), token: writable('') }; + setFilter = (filter: string) => patchState(this, { filter }); +} + +/** What `withDevtools()` from ngrx-toolkit adds to a store. */ +class ToolkitStore extends TodoStore { + ___uniqueDevtoolsId = 'todos'; + ___renameDevtoolsName = () => {}; +} + +function pageWith(store: object, options: { trace?: boolean } = {}) { + document.body.innerHTML = ''; + const root = document.querySelector('app-root')!; + const rootEnv = { + scopes: new Set(['root']), + records: new Map([[store.constructor, { value: store }]]), + get: () => null, + }; + const node = { get: () => null }; + const ng = { + getInjector: () => node, + getComponent: (el: Element) => (el === root ? {} : null), + ɵgetInjectorResolutionPath: () => [node, rootEnv], + ɵgetInjectorProviders: () => [], + }; + const collector = createNgrxCollector(() => ng as any, vi.fn(), domTree(), 200, options); + collector.collect(); + return collector; +} + +function fakeClassic(options: { trace?: boolean } = {}) { + document.body.innerHTML = ''; + const root = document.querySelector('app-root')!; + let state = { n: 0 }; + const listeners: ((a: unknown) => void)[] = []; + class _Store { + source = { getValue: () => state }; + dispatch(action: { type: string }) { + this.run(action); + } + next(action: { type: string }) { + this.run(action); + } + run(action: { type: string }) { + state = { n: state.n + 1 }; + for (const l of listeners) l(action); + } + select() {} + } + class ScannedActionsSubject { + subscribe(fn: (a: unknown) => void) { + listeners.push(fn); + return { unsubscribe: () => {} }; + } + } + const store = new _Store(); + const values = new Map([ + [_Store, store], + [ScannedActionsSubject, new ScannedActionsSubject()], + ]); + const rootEnv = { + scopes: new Set(['root']), + records: new Map([...values.keys()].map((k) => [k, { value: undefined }])), + }; + const node = { get: (token: unknown) => values.get(token) ?? null }; + const ng = { + getInjector: () => node, + getComponent: (el: Element) => (el === root ? {} : null), + ɵgetInjectorResolutionPath: () => [node, rootEnv], + ɵgetInjectorProviders: () => [], + }; + const collector = createNgrxCollector( + () => ng as any, + () => {}, + domTree(), + 200, + options, + ); + collector.collect(); + return { store, collector }; +} + +describe('ngrx.trace', () => { + it('records no call site while tracing is off', () => { + const store = new TodoStore(); + const collector = pageWith(store); + store.setFilter('done'); + expect(collector.logSince(0)[0].trace).toBeUndefined(); + }); + + it('records the app frames of a method call and of a dispatch', () => { + const store = new TodoStore(); + const collector = pageWith(store, { trace: true }); + function fromTheTest() { + store.setFilter('done'); + } + fromTheTest(); + const [entry] = collector.logSince(0); + expect(entry.trace?.length).toBeGreaterThan(0); + expect(entry.trace!.join('\n')).toContain('ngrx-trace-stats.test.ts'); + expect(entry.trace!.join('\n')).not.toMatch(/ngrx-collector\.ts|https?:\/\//); + + const classic = fakeClassic({ trace: true }); + function dispatchFromTest() { + classic.store.dispatch({ type: 'inc' }); + } + dispatchFromTest(); + const [action] = classic.collector.logSince(0); + expect(action.trace!.join('\n')).toContain('dispatchFromTest'); + }); + + it('masks a token in a frame', () => { + const store = new TodoStore(); + const collector = pageWith(store, { trace: true }); + const jwt = + 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U'; + const named = { [jwt]: () => store.setFilter('x') }; + named[jwt](); + const frames = collector.logSince(0)[0].trace!.join('\n'); + expect(frames).toContain('[redacted]'); + expect(frames).not.toContain(jwt); + }); +}); + +describe('ngrx action stats', () => { + it('counts entries per type since load and flags an effect that dispatches in a burst', () => { + const { store, collector } = fakeClassic(); + store.dispatch({ type: 'load' }); + for (let i = 0; i < NGRX_LOOP_BURST; i++) store.next({ type: 'poll' }); + const { stats, version } = collector.stats(); + const poll = stats.find((s) => s.type === 'poll')!; + expect(poll).toMatchObject({ source: 'store', storeId: 'store', count: NGRX_LOOP_BURST }); + expect(poll.effects).toBe(NGRX_LOOP_BURST); + expect(poll.burst).toBe(NGRX_LOOP_BURST); + expect(poll.loop).toBe(true); + const load = stats.find((s) => s.type === 'load')!; + expect(load.count).toBe(1); + expect(load.loop).toBeUndefined(); + // Most frequent first. + expect(stats[0].type).toBe('poll'); + store.dispatch({ type: 'load' }); + expect(collector.stats().version).toBeGreaterThan(version); + }); + + it('averages method durations and leaves restores out', () => { + const store = new TodoStore(); + const collector = pageWith(store); + store.setFilter('a'); + store.setFilter('b'); + collector.run({ type: 'restore', seq: 1 }); + const { stats } = collector.stats(); + expect(stats.map((s) => s.type)).toEqual(['setFilter']); + expect(stats[0]).toMatchObject({ count: 2, timed: 2 }); + expect(typeof stats[0].avgMs).toBe('number'); + }); + + it('keeps the last stats on the server until the page sends new ones', () => { + const pages: NgrxPages = new Map(); + const base = { + pageId: 'p1', + session: 's', + url: '/', + title: '', + stores: [], + classic: null, + log: [], + }; + const stat = { + source: 'store', + storeId: 'store', + type: 'a', + count: 2, + lastAt: 1, + burst: 1, + } as const; + mergeNgrxReport(pages, { ...base, stats: [stat, { bad: true } as never] }, []); + expect(pages.get('p1')!.stats).toEqual([stat]); + mergeNgrxReport(pages, base, []); + expect(pages.get('p1')!.stats).toEqual([stat]); + }); +}); + +describe('withDevtools() stores', () => { + it('detects the members withDevtools() adds', () => { + expect(usesWithDevtools(new ToolkitStore())).toBe(true); + expect(usesWithDevtools(new TodoStore())).toBe(false); + }); + + it('leaves the store unpatched and logs changes from a compare on collect', () => { + const store = new ToolkitStore(); + const method = store.setFilter; + const set = store[STATE_SOURCE].filter.set; + const collector = pageWith(store); + expect(store.setFilter).toBe(method); + expect(store[STATE_SOURCE].filter.set).toBe(set); + const [info] = collector.collect().stores; + expect(info.watchOnly).toBe(true); + expect(info.methods).toEqual([{ name: 'setFilter', calls: 0 }]); + store.setFilter('done'); + expect(collector.logSince(0)).toEqual([]); + collector.collect(false); + const log = collector.logSince(0); + expect(log).toHaveLength(1); + expect(log[0]).toMatchObject({ type: 'patchState', diff: [{ path: 'filter', after: 'done' }] }); + collector.collect(false); + expect(collector.logSince(0)).toHaveLength(1); + }); + + it('records each write through watchState when the app registers it', () => { + const watchers: (() => void)[] = []; + registerNgrxSignals({ + watchState: ((_store: object, fn: () => void) => { + watchers.push(fn); + fn(); + return { destroy: () => {} }; + }) as never, + }); + try { + document.body.innerHTML = ''; + const store = new ToolkitStore(); + const root = document.querySelector('app-root')!; + const env = { + scopes: new Set(['root']), + records: new Map([[ToolkitStore, { value: store }]]), + get: () => null, + }; + const ng = { + getInjector: () => ({ get: () => null }), + getComponent: (el: Element) => (el === root ? {} : null), + ɵgetInjectorResolutionPath: () => [env], + ɵgetInjectorProviders: () => [], + }; + const collector = createNgrxCollector( + () => ng as any, + () => {}, + ); + collector.collect(); + store.setFilter('a'); + watchers.forEach((fn) => fn()); + store.setFilter('b'); + watchers.forEach((fn) => fn()); + expect(collector.logSince(0).map((e) => e.diff[0]?.after)).toEqual(['a', 'b']); + collector.collect(false); + expect(collector.logSince(0)).toHaveLength(2); + } finally { + registerNgrxSignals({ watchState: (() => undefined) as never }); + (globalThis as Record)['__PANGULAR_NGRX_SIGNALS__'] = undefined; + } + }); +}); diff --git a/packages/devtools/src/config.ts b/packages/devtools/src/config.ts index 277ad62e..569eea6a 100644 --- a/packages/devtools/src/config.ts +++ b/packages/devtools/src/config.ts @@ -234,6 +234,15 @@ export interface PangularConfig { /** Rule status by rule name. `false` turns the rule off; `true` or omitted keeps it on. */ rules?: Record; }; + ngrx?: { + /** + * Record where each NgRx change log entry came from: the app frames of the + * dispatch, method call or `patchState`, with origins and query strings + * removed and secrets masked. Off by default, since taking a stack on every + * write costs time. + */ + trace?: boolean; + }; } /** What a `plugins` entry can turn off; each is on when left out. */ @@ -271,6 +280,7 @@ export interface ResolvedPangularConfig { lint: { rules: Record; }; + ngrx: { trace: boolean }; } /** The switches of one plugin under `config`, whether or not it has a `plugins` entry. */ @@ -657,6 +667,7 @@ export function resolvePangularConfig(config?: unknown): ResolvedPangularConfig popup: { hotkey: popupHotkey(record(input['popup'])['hotkey']) }, plugins: pluginEntries(input['plugins']), lint: { rules: lintRules(input['lint']) }, + ngrx: { trace: flag(record(input['ngrx'])['trace'], false) }, }; } @@ -750,6 +761,7 @@ const CONFIG_KEYS = [ 'popup', 'plugins', 'lint', + 'ngrx', ] as const; /** @@ -886,6 +898,8 @@ export function pangularConfigProblems(config: unknown): string[] { } } } + const ngrx = object('ngrx', input['ngrx'], ['trace']); + boolean('ngrx.trace', ngrx['trace'], 'off'); return problems; } @@ -920,8 +934,12 @@ export function configFromConnection( export function pickPangularConfig( options: T, ): { config: PangularConfig; rest: Omit } { - const { inspectors, agent, actions, redaction, limits, popup, plugins, lint, ...rest } = options; - return { config: { inspectors, agent, actions, redaction, limits, popup, plugins, lint }, rest }; + const { inspectors, agent, actions, redaction, limits, popup, plugins, lint, ngrx, ...rest } = + options; + return { + config: { inspectors, agent, actions, redaction, limits, popup, plugins, lint, ngrx }, + rest, + }; } /** Form actions that work without a `formId`: they act on the page, not on one form. */ @@ -1093,6 +1111,15 @@ export const AGENT_ENTRIES: Readonly> = { actions: ['ngrx'], page: true, }, + // Toggle, jump, commit, reset and pause in the Store DevTools history. + 'ngrx-store-devtools': { + kind: 'tool', + inspectors: ['ngrx'], + safety: 'action', + actions: ['ngrx'], + page: true, + }, + 'ngrx-explain-change': { kind: 'tool', inspectors: ['ngrx'], page: true }, 'redux-inspect-stores': { kind: 'tool', inspectors: ['ngrx'], page: true }, // tanstackQuery @@ -1309,7 +1336,7 @@ export function actionBlockedMessage(action: PangularAction): string { const what = { forms: 'Writing to forms', router: 'Navigating and clearing navigations', - ngrx: 'Restoring NgRx state and dispatching actions', + ngrx: 'Restoring NgRx state, dispatching actions and changing the Store DevTools history', http: 'Changing HTTP mock rules and SSR overrides, and clearing HTTP calls', analog: 'Calling API routes and clearing server calls', components: 'Editing component properties and signals', @@ -1763,7 +1790,7 @@ const INSPECTOR_LABEL: Record = { const ACTION_LABEL: Record = { forms: 'Form writes', router: 'Navigation', - ngrx: 'NgRx restore and dispatch', + ngrx: 'NgRx restore, dispatch and Store DevTools', http: 'HTTP mocking', analog: 'Analog API calls', components: 'Component edits', diff --git a/packages/devtools/src/devframe.ts b/packages/devtools/src/devframe.ts index b42bb213..5dd5adae 100644 --- a/packages/devtools/src/devframe.ts +++ b/packages/devtools/src/devframe.ts @@ -83,6 +83,7 @@ import { storeIdNamed, withUntrustedPreamble, } from './rpc/ngrx-live-tools.ts'; +import { createNgrxDevtoolsTools } from './rpc/ngrx-devtools-tools.ts'; import { dispatchProblem, type NgrxRequest, @@ -4070,6 +4071,13 @@ const pangular = defineDevframe({ }); for (const tool of ngrxHistory.tools) agent.registerTool(tool); + // Store DevTools history operations and the explain-change read (rpc/ngrx-devtools-tools.ts). + for (const tool of createNgrxDevtoolsTools({ + ask: (page, request) => requestNgrxAction(page, request), + pages: () => ngrxPages, + })) { + agent.registerTool(tool); + } const noForms = `No forms have been reported. Live data needs a page: connect through the MCP endpoint of the server that runs the app, with the app open in a browser, on a page that renders a form. The stdio MCP server has no page, so there it always answers this.`; /** diff --git a/packages/devtools/src/ngrx-collector.ts b/packages/devtools/src/ngrx-collector.ts index 6f38517f..4e5130f5 100644 --- a/packages/devtools/src/ngrx-collector.ts +++ b/packages/devtools/src/ngrx-collector.ts @@ -4,13 +4,20 @@ import { isRedactedKey, REDACTED, withRedactionScope } from './forms-privacy.ts' import { documentTree, type HostTree } from './host-tree.ts'; import { className, tokenName } from './injector-tree.ts'; import { + devtoolsProblem, diff, dispatchProblem, + NGRX_BURST_WINDOW_MS, NGRX_DIFF_MORE_CAP, + NGRX_LOOP_BURST, + NGRX_MAX_STATS, + NGRX_TRACE_FRAMES, referenceDiff, serialize, serializeSlice, + type NgrxActionStat, type NgrxClassicStoreInfo, + type NgrxDevtoolsRequest, type NgrxDiffEntry, type NgrxActionOrigin, type NgrxLogEntry, @@ -25,6 +32,7 @@ import { historyRequest, type HistorySource } from './ngrx-history.ts'; import { markSecretWriter, safeArgs, touchesSecret } from './ngrx-args.ts'; import { SliceCache } from './ngrx-slice-cache.ts'; import { ReportMemo, ReportVersion } from './ngrx-report-memo.ts'; +import { appFrames, captureStack } from './signal-stack.ts'; /** * Angular's `untracked` (16.0+), read at runtime: a named import of it fails @@ -111,6 +119,8 @@ interface Tracked { method?: unknown; /** Entries this call logged with arguments, masked after the fact once it writes a secret. */ logged?: NgrxLogEntry[]; + /** With `ngrx.trace`: where the method was called from. */ + trace?: string[]; }[]; /** * Outer method calls that returned a promise not settled yet. A write after @@ -119,6 +129,14 @@ interface Tracked { * masked after the fact, since one of them most likely made it. */ asyncCalls: Set; + /** + * The store uses `withDevtools()`: nothing is wrapped, changes come from + * `watchState()` or, without it, from a compare against `lastSeen` on each collect. + */ + watchOnly: boolean; + lastSeen: Snapshot | null; + /** With `ngrx.trace`: the call site of the first write waiting for the microtask fallback. */ + pendingTrace?: string[]; } interface Classic { @@ -128,6 +146,8 @@ interface Classic { last: unknown; lastRaw: unknown; origins: WeakMap; + /** With `ngrx.trace`: where each action was dispatched from. */ + traces: WeakMap; stop: () => void; } @@ -293,6 +313,34 @@ function syncValue(observable: AnyRecord | null | undefined): unknown { return value; } +/** Options of {@link createNgrxCollector}. */ +export interface NgrxCollectorOptions { + /** `ngrx.trace`: record a redacted call stack per entry. Off by default. */ + trace?: boolean; +} + +/** + * Whether a signal store uses `withDevtools()` from + * `@angular-architects/ngrx-toolkit`, which adds members such as + * `___uniqueDevtoolsId` and `___renameDevtoolsName`. Such a store already + * reports to Redux DevTools through `watchState`, so the collector leaves it + * unpatched. + */ +export function usesWithDevtools(value: object): boolean { + const keys = read(() => Object.keys(value), [] as string[]); + return keys.some((key) => /^_{2,}\w*devtools\w*$/i.test(key)); +} + +/** Entries the collector writes itself (restores, Store DevTools operations), left out of the stats. */ +const INTERNAL_TYPE = /^(Restore #\d+|Back to latest$|Store DevTools: )/; +/** Timestamps kept per stat to measure bursts. */ +const BURST_SAMPLES = NGRX_LOOP_BURST; + +interface StatInfo extends NgrxActionStat { + totalMs: number; + recent: number[]; +} + export interface NgrxCollector { collect(rediscover?: boolean): { stores: NgrxSignalStoreInfo[]; @@ -315,6 +363,8 @@ export interface NgrxCollector { * any other id a signal store's state fields. `null` when the store is gone. */ rawState(storeId: string): { value: unknown } | null; + /** Per-type counts since the page loaded, and a number that goes up when they change. */ + stats(): { stats: NgrxActionStat[]; version: number }; stop(): void; } @@ -323,7 +373,60 @@ export function createNgrxCollector( onChange: () => void, tree: HostTree = documentTree(), maxLog = MAX_LOG, + options: NgrxCollectorOptions = {}, ): NgrxCollector { + /** The app frames of the code running now, when `ngrx.trace` is on. */ + const traceNow = (): string[] | undefined => { + if (!options.trace) return undefined; + const frames = appFrames(captureStack(), NGRX_TRACE_FRAMES); + return frames.length ? frames : undefined; + }; + const withTrace = (trace: string[] | undefined) => (trace ? { trace } : {}); + const statsByKey = new Map(); + let statsVersion = 0; + const count = (entry: NgrxLogEntry) => { + if (INTERNAL_TYPE.test(entry.type)) return; + const key = `${entry.source}\u0000${entry.storeId}\u0000${entry.type}`; + let stat = statsByKey.get(key); + if (stat) statsByKey.delete(key); + else { + stat = { + source: entry.source, + storeId: entry.storeId, + type: entry.type, + count: 0, + lastAt: 0, + burst: 0, + totalMs: 0, + recent: [], + }; + } + // Most recent last, so the oldest key is dropped at the cap. + statsByKey.set(key, stat); + while (statsByKey.size > NGRX_MAX_STATS) statsByKey.delete(statsByKey.keys().next().value!); + stat.count++; + stat.lastAt = entry.timestamp; + if (entry.durationMs !== undefined) { + stat.timed = (stat.timed ?? 0) + 1; + stat.totalMs += entry.durationMs; + stat.maxMs = Math.max(stat.maxMs ?? 0, entry.durationMs); + } + if (entry.origin === 'effect') stat.effects = (stat.effects ?? 0) + 1; + stat.recent.push(entry.timestamp); + if (stat.recent.length > BURST_SAMPLES) stat.recent.shift(); + const inWindow = stat.recent.filter((t) => entry.timestamp - t < NGRX_BURST_WINDOW_MS).length; + stat.burst = Math.max(stat.burst, inWindow); + if (inWindow >= NGRX_LOOP_BURST && entry.origin === 'effect') stat.loop = true; + statsVersion++; + }; + const statsReport = (): NgrxActionStat[] => + [...statsByKey.values()] + .map(({ totalMs, recent: _recent, ...stat }) => ({ + ...stat, + ...(stat.timed ? { avgMs: Math.round(totalMs / stat.timed) } : {}), + })) + .sort((a, b) => b.count - a.count || b.lastAt - a.lastAt); + const ids = new WeakMap(); let nextId = 0; const idFor = (value: object) => { @@ -374,10 +477,13 @@ export function createNgrxCollector( // `pendingBefore` diffing — a mechanism `onWrite` skips for a watched store // (see `t.watched`), so it would never catch a watchState-recorded change. let currentDispatchedEvent: { type: string; payload?: unknown } | undefined; + /** With `ngrx.trace`: where the event flowing through `Dispatcher.dispatch()` was dispatched. */ + let currentEventTrace: string[] | undefined; const append = (entry: Omit, keep: Saved) => { const full = { ...entry, seq: ++seq }; log.push(full); + count(full); saved.set(full.seq, keep); while (log.length > maxLog) saved.delete(log.shift()!.seq); if (lost.some((u) => u.seq < log[0].seq)) lost = lost.filter((u) => u.seq >= log[0].seq); @@ -426,6 +532,7 @@ export function createNgrxCollector( logNoop = false, durationMs?: number, method?: unknown, + trace?: string[], ) => { const after = snapshot(t); const changes = snapshotDiff(before, after, t.stateKeys); @@ -440,6 +547,7 @@ export function createNgrxCollector( // noop entry). Otherwise the next real `watchState` firing would diff // against stale state. if (t.watched) t.lastWatched = after; + if (t.watchOnly) t.lastSeen = after; if (!changes.diff.length) { if (!logNoop) return undefined; const noopAt = Date.now(); @@ -469,6 +577,7 @@ export function createNgrxCollector( restorable: t.writable, ...(causedByEvent ? { causedByEvent } : {}), ...(durationMs !== undefined ? { durationMs } : {}), + ...withTrace(trace), }, { kind: 'signal', tracked: t, before, after }, ); @@ -487,10 +596,13 @@ export function createNgrxCollector( if (t.watched) return; if (t.depth > 0 || t.pendingBefore) return; t.pendingBefore = snapshot(t); + t.pendingTrace = traceNow(); queueMicrotaskOutside(() => { const before = t.pendingBefore; + const trace = t.pendingTrace; t.pendingBefore = null; - if (before) finish(t, 'patchState', undefined, before); + t.pendingTrace = undefined; + if (before) finish(t, 'patchState', undefined, before, false, undefined, undefined, trace); }); }; @@ -502,8 +614,10 @@ export function createNgrxCollector( const flushPending = (t: Tracked) => { const before = t.pendingBefore; if (!before) return; + const trace = t.pendingTrace; t.pendingBefore = null; - finish(t, 'patchState', undefined, before); + t.pendingTrace = undefined; + finish(t, 'patchState', undefined, before, false, undefined, undefined, trace); }; /** @@ -534,6 +648,8 @@ export function createNgrxCollector( maskLogged(call.logged); } if (!call) maskAsyncCallers(t, before, after); + // Inside the watchState callback, so the stack still holds the patchState caller. + const trace = isRestore ? undefined : (call?.trace ?? traceNow()); const logged = append( { source: 'signal-store', @@ -555,6 +671,7 @@ export function createNgrxCollector( restorable: t.writable, ...(causedByEvent ? { causedByEvent } : {}), ...(durationMs !== undefined ? { durationMs } : {}), + ...withTrace(trace), }, { kind: 'signal', tracked: t, before, after }, ); @@ -642,6 +759,7 @@ export function createNgrxCollector( startedAt: now(), fired: 0, method: original, + ...(outer ? withTrace(traceNow()) : {}), }; t.methodStack.push(frame); t.depth++; @@ -662,13 +780,22 @@ export function createNgrxCollector( // Microtask-fallback path: one entry per method call (with throttled noop). let entry: NgrxLogEntry | undefined; if (before && !t.watched) { - entry = finish(t, name, args, before, true, durationMs, original); + entry = finish(t, name, args, before, true, durationMs, original, frame.trace); } // watchState path: watchState already emitted one entry per patchState. // If the method did not patch at all (e.g. `isSaved` just reads state), // append a throttled noop entry so method calls stay visible. if (outer && t.watched && !frame.fired) { - entry = finish(t, name, args, t.lastWatched ?? snapshot(t), true, durationMs, original); + entry = finish( + t, + name, + args, + t.lastWatched ?? snapshot(t), + true, + durationMs, + original, + frame.trace, + ); } if (entry?.args) (frame.logged ??= []).push(entry); if (outer && isThenable(result)) { @@ -736,8 +863,28 @@ export function createNgrxCollector( lastWatched: null, methodStack: [], asyncCalls: new Set(), + watchOnly: typeof value === 'object' && usesWithDevtools(value), + lastSeen: null, }; tracked.set(value, t); + if (t.watchOnly) { + // withDevtools() already watches this store; patching it as well would + // clash with it, so the methods are only listed, not wrapped. + for (const key of Object.keys(value)) { + const member = (value as AnyRecord)[key]; + if (typeof member === 'function' && !isSignal(member) && !/^_{2,}/.test(key)) { + t.methods.set(key, { + calls: 0, + timedCalls: 0, + rx: typeof member?.destroy === 'function', + totalDurationMs: 0, + }); + } + } + t.lastSeen = snapshot(t); + attachWatcher(t); + return t; + } for (const key of stateKeys) wrapSignal(t, source[key]); if (t.kind === 'signal-store') { for (const key of Object.keys(value)) { @@ -836,6 +983,7 @@ export function createNgrxCollector( timestamp: Date.now(), diff: [], restorable: false, + ...withTrace(currentEventTrace), }, { kind: 'event' }, ); @@ -873,12 +1021,15 @@ export function createNgrxCollector( // one event handler dispatching another — restores the outer event // instead of leaving its own behind. const previous = currentDispatchedEvent; + const previousTrace = currentEventTrace; currentDispatchedEvent = info; + currentEventTrace = traceNow(); let result: unknown; try { result = original.apply(this, args); } finally { currentDispatchedEvent = previous; + currentEventTrace = previousTrace; } if (info) { for (const t of tracked.values()) { @@ -939,6 +1090,8 @@ export function createNgrxCollector( } const origin = withAction && action && typeof action === 'object' ? c.origins.get(action) : undefined; + const trace = + withAction && action && typeof action === 'object' ? c.traces.get(action) : undefined; const before = c.lastRaw; c.last = next; c.lastRaw = raw; @@ -959,6 +1112,7 @@ export function createNgrxCollector( ...truncated(overflow.more), restorable: held, ...(c.devtools && !held ? { unrestorable: 'not-recorded' as const } : {}), + ...withTrace(trace), }, { kind: 'classic', action, before, after: raw }, ); @@ -1012,11 +1166,18 @@ export function createNgrxCollector( * or a `dispatch(() => action)` reactive form). Renamed from `wrapDispatch` * so it no longer collides with the events-plugin wrapper of the same name. */ - const wrapClassicDispatch = (store: AnyRecord, origins: WeakMap) => { + const wrapClassicDispatch = ( + store: AnyRecord, + origins: WeakMap, + traces: WeakMap, + ) => { let active = true; let reactive: unknown; const tag = (action: unknown, origin: NgrxActionOrigin) => { - if (active && action && typeof action === 'object') origins.set(action, origin); + if (!active || !action || typeof action !== 'object') return; + origins.set(action, origin); + const trace = traceNow(); + if (trace) traces.set(action, trace); }; const undo: (() => void)[] = []; const replace = (name: 'dispatch' | 'next', wrapper: (original: Method) => Method) => { @@ -1086,9 +1247,10 @@ export function createNgrxCollector( last: serialize(raw), lastRaw: raw, origins: new WeakMap(), + traces: new WeakMap(), stop: () => {}, }; - const undo = wrapClassicDispatch(store, c.origins); + const undo = wrapClassicDispatch(store, c.origins, c.traces); const record = (action: unknown) => { const type = read(() => String((action as AnyRecord)['type'] ?? 'action'), 'action'); logClassic(c, type, action, true); @@ -1304,6 +1466,20 @@ export function createNgrxCollector( return out.length ? out : undefined; }; + /** + * A `withDevtools()` store without `watchState` registered: nothing tells + * the collector about a write, so each collect compares the state fields + * by reference and logs the writes since the last one as one entry. + */ + const compareWatchOnly = (t: Tracked) => { + if (t.watched) return; + const current = snapshot(t); + const before = t.lastSeen; + t.lastSeen = current; + if (!before || t.stateKeys.every((key) => Object.is(before[key], current[key]))) return; + finish(t, 'patchState', undefined, before); + }; + /** * One signal store's report, rebuilt only when a raw value it is made of * changed (`ngrx-report-memo.ts`), so an unchanged store is not serialized. @@ -1366,6 +1542,7 @@ export function createNgrxCollector( methods, references, writable: t.writable, + ...(t.watchOnly ? { watchOnly: true as const } : {}), }; }); }; @@ -1374,15 +1551,39 @@ export function createNgrxCollector( const classicInfo = (c: Classic): NgrxClassicStoreInfo => { const raw = classicState(c.store); const paused = isPaused(c.devtools); - const key = [raw, c.lastRaw, c.last, !!c.devtools, c.scope, paused]; - return classicReports.get(c, key, () => ({ - // `last` already holds `serialize(lastRaw)`, so the state is serialized - // again only when the store emitted a new object since then. - state: Object.is(raw, c.lastRaw) ? c.last : serialize(raw), - devtools: !!c.devtools, - scope: c.scope, - ...(paused ? { paused: true } : {}), - })); + const lifted = c.devtools ? liftedOf(c.devtools) : undefined; + const recording = lifted?.['isPaused'] === true; + const skippedIds = lifted?.['skippedActionIds']; + const key = [raw, c.lastRaw, c.last, !!c.devtools, c.scope, paused, recording, skippedIds]; + return classicReports.get(c, key, () => { + const skipped = skippedSeqs(lifted); + return { + // `last` already holds `serialize(lastRaw)`, so the state is serialized + // again only when the store emitted a new object since then. + state: Object.is(raw, c.lastRaw) ? c.last : serialize(raw), + devtools: !!c.devtools, + scope: c.scope, + ...(paused ? { paused: true } : {}), + ...(recording ? { recordingPaused: true as const } : {}), + ...(skipped.length ? { skipped } : {}), + }; + }); + }; + + /** The log entries whose actions Store DevTools skips. */ + const skippedSeqs = (lifted: AnyRecord | undefined): number[] => { + const ids = lifted?.['skippedActionIds']; + if (!Array.isArray(ids) || !ids.length) return []; + const byId = (lifted?.['actionsById'] ?? {}) as Record; + const actions = new Set(read(() => ids.map((id) => byId[id]?.['action']), [] as unknown[])); + const out: number[] = []; + for (const entry of log) { + const keep = saved.get(entry.seq); + if (keep?.kind === 'classic' && entry.action !== undefined && actions.has(keep.action)) { + out.push(entry.seq); + } + } + return out; }; const report = () => { @@ -1409,6 +1610,7 @@ export function createNgrxCollector( discovered = true; } markDropped(); + for (const t of tracked.values()) if (t.watchOnly) compareWatchOnly(t); return report(); }; @@ -1434,6 +1636,111 @@ export function createNgrxCollector( return { ok: true, message: 'Back on the latest state. New actions change the state again.' }; }; + /** The Store DevTools id of the action logged as `seq`, or the reason there is none. */ + const liftedIdOf = (seq: number): { id: number } | { error: string } => { + const keep = saved.get(seq); + const logged = log.find((e) => e.seq === seq); + if (!keep || !logged) return { error: 'This action is no longer in the page history.' }; + if (keep.kind !== 'classic' || logged.action === undefined) { + return { error: 'Only an @ngrx/store action from the log can be skipped or included.' }; + } + const lifted = liftedOf(classic!.devtools!); + const byId = (lifted?.['actionsById'] ?? {}) as Record; + const id = Object.keys(byId).find((key) => byId[key]?.['action'] === keep.action); + if (id === undefined) return { error: NOT_HELD[logged.unrestorable ?? 'dropped'] }; + return { id: Number(id) }; + }; + + const devtoolsOp = (request: NgrxDevtoolsRequest): NgrxRequestResult => { + const problem = devtoolsProblem(request); + if (problem) return { error: problem }; + const c = classic; + const devtools = c?.devtools; + if (!c || !devtools) { + return { error: 'The Store DevTools history needs provideStoreDevtools() in the app.' }; + } + // An entry for the operation itself, so the log shows where the state jumped. + const logOp = (label: string) => { + const entry = logClassic(c, label, undefined, false); + delete entry.unrestorable; + }; + const call = (name: string, ...args: unknown[]) => { + if (typeof devtools[name] !== 'function') return false; + devtools[name](...args); + return true; + }; + const missing = (name: string) => ({ + error: `This version of Store DevTools has no ${name}().`, + }); + switch (request.op) { + case 'toggle': { + const found = liftedIdOf(request.seq!); + if ('error' in found) return found; + if (!call('toggleAction', found.id)) return missing('toggleAction'); + const skipped = ((liftedOf(devtools)?.['skippedActionIds'] ?? []) as number[]).includes( + found.id, + ); + logOp(`Store DevTools: ${skipped ? 'skip' : 'include'} #${request.seq}`); + return { + ok: true, + message: skipped + ? `Skipped action #${request.seq}: the state is computed again without it.` + : `Included action #${request.seq} again.`, + }; + } + case 'jump': { + if (request.seq !== undefined) return run({ type: 'restore', seq: request.seq }); + const staged = (liftedOf(devtools)?.['stagedActionIds'] ?? []) as number[]; + const index = request.index!; + if (index >= staged.length) { + return { + error: `Store DevTools holds ${staged.length} state${staged.length === 1 ? '' : 's'} (0 to ${staged.length - 1}).`, + }; + } + if (!call('jumpToState', index)) return missing('jumpToState'); + logOp(`Store DevTools: jump to state ${index}`); + const message = + index === 0 + ? 'Jumped to the committed state.' + : `Jumped to Store DevTools state ${index}.`; + const paused = isPaused(devtools); + return { ok: true, paused, message: paused ? `${message} ${PAUSED_NOTE}` : message }; + } + case 'commit': { + if (!call('commit')) return missing('commit'); + logOp('Store DevTools: commit'); + markDropped(); + return { + ok: true, + message: + 'Committed: the current state is the new starting point, and the earlier actions can no longer be restored.', + }; + } + case 'reset': { + if (!call('reset')) return missing('reset'); + logOp('Store DevTools: reset'); + markDropped(); + return { + ok: true, + message: + 'Reset: the store is back on its initial state and the Store DevTools history is empty.', + }; + } + case 'pause': { + const now = liftedOf(devtools)?.['isPaused'] === true; + const paused = request.paused ?? !now; + if (!call('pauseRecording', paused)) return missing('pauseRecording'); + onChange(); + return { + ok: true, + message: paused + ? 'Recording paused: new actions still change the state, but Store DevTools does not record them, so they cannot be restored.' + : 'Recording again: Store DevTools records new actions.', + }; + } + } + }; + const NOT_HELD: Record = { dropped: 'Store DevTools no longer holds this action, so it cannot be restored. It was dropped past maxAge, or the Store DevTools history was committed, reset or imported.', @@ -1505,6 +1812,7 @@ export function createNgrxCollector( return dispatch({ ...(request.payload ?? {}), type: request.action }, request.action); } if (request?.type === 'dispatch-again') return dispatchAgain(request.seq); + if (request?.type === 'devtools') return devtoolsOp(request); if (!request || request.type !== 'restore' || typeof request.seq !== 'number') { return { error: 'Unknown request.' }; } @@ -1599,6 +1907,7 @@ export function createNgrxCollector( last: lostSeq, }), run, + stats: () => ({ stats: statsReport(), version: statsVersion }), rawState: (storeId) => { if (storeId === 'store') return classic ? { value: classicState(classic.store) } : null; for (const t of tracked.values()) { diff --git a/packages/devtools/src/ngrx-overlay.ts b/packages/devtools/src/ngrx-overlay.ts index 59263d18..4c0357af 100644 --- a/packages/devtools/src/ngrx-overlay.ts +++ b/packages/devtools/src/ngrx-overlay.ts @@ -23,6 +23,8 @@ const HEARTBEAT_MS = 5000; export interface NgrxPageOptions { tree?: HostTree; describe?: () => { url: string; title: string }; + /** `ngrx.trace`: record a redacted call stack per entry. */ + trace?: boolean; } export function attachNgrx( @@ -36,6 +38,8 @@ export function attachNgrx( let sentSeq = 0; let sentLost = 0; let sentMasked = 0; + /** The stats version last sent; the server keeps the stats it has until they change. */ + let sentStats = -1; /** The collector's report version last sent, or null when nothing was (or the send failed). */ let sentVersion: number | null = null; let lastPushAt = 0; @@ -58,6 +62,7 @@ export function attachNgrx( () => schedule(), options.tree ?? documentTree(), maxLog, + { trace: options.trace }, ); const push = async (rediscover = true) => { @@ -68,6 +73,7 @@ export function attachNgrx( const log = collector.logSince(sentSeq); const lost = collector.unrestorableSince(sentLost); const masked = collector.argsRedactedSince(sentMasked); + const stats = collector.stats(); if (!stores.length && !classic && !log.length && sentVersion === null) return; const quiet = !log.length && !lost.updates.length && !masked.seqs.length; // The version goes up only when a store's report changed, so an unchanged @@ -89,6 +95,7 @@ export function attachNgrx( since: sentSeq, ...(lost.updates.length ? { unrestorable: lost.updates } : {}), ...(masked.seqs.length ? { argsRedacted: masked.seqs } : {}), + ...(stats.version !== sentStats ? { stats: stats.stats } : {}), }; const answer = (await my.rpc.call('push-ngrx-state', report)) as { seq?: unknown } | undefined; @@ -96,10 +103,12 @@ export function attachNgrx( sentSeq = typeof answer?.seq === 'number' ? answer.seq : collector.lastSeq(); sentLost = lost.last; sentMasked = masked.last; + sentStats = stats.version; // A lower seq means the server lost this page: resend the held log. if (sentSeq < previous) { sentLost = 0; sentMasked = 0; + sentStats = -1; schedule(); } } catch { diff --git a/packages/devtools/src/ngrx-shared.ts b/packages/devtools/src/ngrx-shared.ts index 096e258f..264ace2b 100644 --- a/packages/devtools/src/ngrx-shared.ts +++ b/packages/devtools/src/ngrx-shared.ts @@ -55,13 +55,25 @@ export interface NgrxSignalStoreInfo { }[]; references: string[]; writable: boolean; + /** + * The store uses `withDevtools()` (`@angular-architects/ngrx-toolkit`), so the + * collector leaves it as it is: no wrapped methods or signals, only + * `watchState()` (or a compare on each collect when `watchState` is not + * registered). Method calls are then not counted or named in the log. + */ + watchOnly?: true; } export interface NgrxClassicStoreInfo { state: unknown; devtools: boolean; scope: string; + /** Store DevTools shows a past state (time travel), not the latest. */ paused?: boolean; + /** Store DevTools recording is paused (`pauseRecording`): new actions are not recorded. */ + recordingPaused?: true; + /** Log entries whose actions Store DevTools skips (`toggleAction`), so the state is computed without them. */ + skipped?: number[]; } export interface NgrxDiffEntry { @@ -111,8 +123,45 @@ export interface NgrxLogEntry { * Absent when `diff` is complete. */ diffTruncated?: number; + /** + * With `ngrx.trace` on: the app frames of the call that made this entry + * (the dispatch, the method call or the `patchState`), as + * `name (file:line:column)` with origins and query strings removed and the + * redaction helpers applied. Absent when tracing is off or no app frame was found. + */ + trace?: string[]; +} + +/** App frames kept per entry with `ngrx.trace` on. */ +export const NGRX_TRACE_FRAMES = 8; + +/** + * How often one action type, method or event ran since the page loaded, not + * only within the kept log. `burst` is the most entries seen within any + * {@link NGRX_BURST_WINDOW_MS}; `loop` flags a type an NgRx effect dispatched + * at least {@link NGRX_LOOP_BURST} times within that window. + */ +export interface NgrxActionStat { + source: NgrxLogEntry['source']; + storeId: string; + type: string; + count: number; + /** Entries with a `durationMs` (signal store method calls), and their average and longest. */ + timed?: number; + avgMs?: number; + maxMs?: number; + /** Entries an NgRx effect dispatched (`origin: 'effect'`). */ + effects?: number; + lastAt: number; + burst: number; + loop?: true; } +export const NGRX_BURST_WINDOW_MS = 1000; +export const NGRX_LOOP_BURST = 20; +/** Most action stats a page keeps and reports. */ +export const NGRX_MAX_STATS = 100; + /** The most changes counted past a full `diff`; `diffTruncated` stops there. */ export const NGRX_DIFF_MORE_CAP = 1000; @@ -152,6 +201,8 @@ export interface NgrxPageReport { * after it logged them (a write after an `await`). */ argsRedacted?: number[]; + /** Per-type counts since the page loaded; sent when they changed, kept by the server otherwise. */ + stats?: NgrxActionStat[]; } export interface NgrxPage extends Omit< @@ -174,7 +225,54 @@ export type NgrxRequest = | { type: 'dispatch-again'; seq: number } // Read-only: the State and Diff of one entry, and a session export (`ngrx-history.ts`). | { type: 'entry'; seq: number } - | { type: 'export'; storeId?: string; from?: number; to?: number }; + | { type: 'export'; storeId?: string; from?: number; to?: number } + // Store DevTools history operations (`@ngrx/store-devtools`). + | NgrxDevtoolsRequest; + +/** Store DevTools history operations the panel and the `ngrx-store-devtools` tool run. */ +export const NGRX_DEVTOOLS_OPS = ['toggle', 'jump', 'commit', 'reset', 'pause'] as const; +export type NgrxDevtoolsOp = (typeof NGRX_DEVTOOLS_OPS)[number]; + +/** + * `toggle` skips or includes the action of log entry `seq`; `jump` shows the + * state after log entry `seq`, or Store DevTools state `index` (0 is the + * committed state); `commit` makes the current state the new start and drops + * the history; `reset` goes back to the initial state and drops the history; + * `pause` stops (`paused: true`) or starts recording new actions. + */ +export interface NgrxDevtoolsRequest { + type: 'devtools'; + op: NgrxDevtoolsOp; + seq?: number; + index?: number; + paused?: boolean; +} + +/** Checks a Store DevTools request sent from the panel or an agent. Returns the problem, or null. */ +export function devtoolsProblem( + request: Partial | null | undefined, +): string | null { + const op = request?.op; + if (!(NGRX_DEVTOOLS_OPS as readonly unknown[]).includes(op)) { + return `Pass \`op\`: one of ${NGRX_DEVTOOLS_OPS.map((name) => `\`${name}\``).join(', ')}.`; + } + const whole = (value: unknown) => + typeof value === 'number' && Number.isInteger(value) && value >= 0; + if (op === 'toggle' && !whole(request?.seq)) + return 'Pass `seq`, the log entry of the action to skip or include.'; + if (op === 'jump') { + const bySeq = request?.seq !== undefined; + const byIndex = request?.index !== undefined; + if (bySeq === byIndex) + return 'Pass either `seq` (a log entry) or `index` (a Store DevTools state; 0 is the committed state).'; + if (bySeq && !whole(request?.seq)) return '`seq` must be a log entry number.'; + if (byIndex && !whole(request?.index)) return '`index` must be a whole number from 0.'; + } + if (op === 'pause' && request?.paused !== undefined && typeof request.paused !== 'boolean') { + return '`paused` must be true or false.'; + } + return null; +} export interface NgrxRequestResult { ok?: boolean; diff --git a/packages/devtools/src/overlay-angular-native.ts b/packages/devtools/src/overlay-angular-native.ts index d56cacee..b26fd62d 100644 --- a/packages/devtools/src/overlay-angular-native.ts +++ b/packages/devtools/src/overlay-angular-native.ts @@ -339,6 +339,7 @@ async function startSession( ? attachNgrx(my, pageId, angularDebugApi, config.limits.changeLog, { tree, describe: () => ({ url: '/', title: TITLE }), + trace: config.ngrx.trace, }) : null; diff --git a/packages/devtools/src/overlay-nativescript.ts b/packages/devtools/src/overlay-nativescript.ts index 1eaaf780..c108075e 100644 --- a/packages/devtools/src/overlay-nativescript.ts +++ b/packages/devtools/src/overlay-nativescript.ts @@ -357,6 +357,7 @@ async function startSession( ? attachNgrx(my, pageId, angularDebugApi, config.limits.changeLog, { tree, describe: () => ({ url: '/', title }), + trace: config.ngrx.trace, }) : null; diff --git a/packages/devtools/src/overlay.ts b/packages/devtools/src/overlay.ts index ff069f9e..db61cdde 100644 --- a/packages/devtools/src/overlay.ts +++ b/packages/devtools/src/overlay.ts @@ -566,7 +566,9 @@ async function startOverlay( const cd = on.components ? attachChangeDetection(my, pageId, getNg, limits.cdCycles, tickMs, () => lease.active) : null; - const ngrx = on.ngrx ? attachNgrx(my, pageId, getNg, limits.changeLog) : null; + const ngrx = on.ngrx + ? attachNgrx(my, pageId, getNg, limits.changeLog, { trace: devtoolsConfig.ngrx.trace }) + : null; // NGXS, Elf and MiniRx report through their Redux DevTools integration. if (!on.ngrx) uninstallReduxDevtoolsHook(); const otherStores = on.ngrx ? attachReduxStores(my, pageId, { maxLog: limits.changeLog }) : null; diff --git a/packages/devtools/src/rpc/__tests__/ngrx-devtools-tools.test.ts b/packages/devtools/src/rpc/__tests__/ngrx-devtools-tools.test.ts new file mode 100644 index 00000000..57a1969b --- /dev/null +++ b/packages/devtools/src/rpc/__tests__/ngrx-devtools-tools.test.ts @@ -0,0 +1,120 @@ +import { describe, expect, it, vi } from 'vitest'; +import type { NgrxLogEntry, NgrxRequest } from '../../ngrx-shared.ts'; +import { createNgrxDevtoolsTools, explainChangeText, touchesPath } from '../ngrx-devtools-tools.ts'; +import type { NgrxPageRecord, NgrxPages } from '../ngrx-tools.ts'; + +function entry(seq: number, patch: Partial): NgrxLogEntry { + return { + seq, + source: 'store', + storeId: 'store', + type: `a${seq}`, + timestamp: Date.UTC(2026, 0, 1, 0, 0, seq), + diff: [], + restorable: true, + ...patch, + }; +} + +function pages(log: NgrxLogEntry[], classic = true): NgrxPages { + const page: NgrxPageRecord = { + pageId: 'p1', + session: 's', + url: '/', + title: '', + stores: [], + classic: classic ? { state: {}, devtools: true, scope: 'root' } : null, + log, + reportedAt: 1, + }; + return new Map([['p1', page]]); +} + +describe('touchesPath', () => { + it('matches the path, paths inside it and paths around it', () => { + expect(touchesPath('cart.items', 'cart.items')).toBe(true); + expect(touchesPath('cart.items[0]', 'cart.items')).toBe(true); + expect(touchesPath('cart', 'cart.items')).toBe(true); + expect(touchesPath('(root)', 'cart')).toBe(true); + expect(touchesPath('cart.itemsCount', 'cart.items')).toBe(false); + expect(touchesPath('user', 'cart')).toBe(false); + }); +}); + +describe('explainChangeText', () => { + const log = [ + entry(1, { + type: '[Cart] Add', + action: { type: '[Cart] Add', item: 'rome' }, + origin: 'dispatch', + diff: [{ path: 'cart.items[0]', op: 'add', after: 'rome' }], + trace: ['addToCart (src/app/cart.ts:12:5)'], + }), + entry(2, { + type: '[User] Login', + diff: [{ path: 'user.name', op: 'change', before: null, after: 'ada' }], + }), + entry(3, { + type: '[Cart] Clear', + origin: 'effect', + diff: [{ path: 'cart.items', op: 'change', before: ['rome'], after: [] }], + }), + ]; + + it('lists the entries that wrote a path, newest first, with origin and call site', () => { + const text = explainChangeText(pages(log), undefined, undefined, 'cart.items', undefined); + expect(text).toMatch(/^`cart.items` last changed in #3 \(\[Cart\] Clear\)/); + expect(text.indexOf('#3')).toBeLessThan(text.indexOf('### #1')); + expect(text).toContain('origin: an NgRx effect'); + expect(text).toContain('`addToCart (src/app/cart.ts:12:5)`'); + expect(text).not.toContain('[User] Login'); + expect(text).not.toContain('ngrx: { trace: true }'); + }); + + it('explains one entry and says how to record call sites', () => { + const text = explainChangeText(pages(log), 'p1', undefined, undefined, 2); + expect(text).toContain('action `[User] Login`'); + expect(text).toContain('`user.name` change null → "ada"'); + expect(text).toContain('ngrx: { trace: true }'); + }); + + it('says when nothing wrote the path, and when nothing reports', () => { + expect(explainChangeText(pages(log), undefined, 'store', 'todos', undefined)).toMatch( + /No entry in the kept log of `Store` changed `todos`/, + ); + expect(explainChangeText(new Map(), undefined, undefined, 'x', undefined)).toMatch( + /No NgRx state/, + ); + expect(explainChangeText(pages(log), undefined, undefined, undefined, undefined)).toMatch( + /Pass `path`/, + ); + }); +}); + +describe('ngrx-store-devtools tool', () => { + function tool(ngrx: NgrxPages) { + const ask = vi.fn(async (_page: string | undefined, _request: NgrxRequest) => ({ + ok: true, + message: 'Committed.', + })); + const [devtools] = createNgrxDevtoolsTools({ ask, pages: () => ngrx }); + return { devtools, ask }; + } + + it('sends a checked request to the page', async () => { + const { devtools, ask } = tool(pages([])); + const answer = await devtools.handler({ op: 'toggle', seq: 4, page: 'p1' }); + expect(ask).toHaveBeenCalledWith('p1', { type: 'devtools', op: 'toggle', seq: 4 }); + expect(answer.markdown).toContain('Committed.'); + }); + + it('refuses a bad request or a page without a Store', async () => { + const { devtools, ask } = tool(pages([], false)); + expect((await devtools.handler({ op: 'sweep' })).markdown).toMatch(/one of/); + expect((await devtools.handler({ op: 'commit', page: 'p1' })).markdown).toMatch( + /no @ngrx\/store Store/, + ); + expect((await devtools.handler({ op: 'commit', page: 'nope' })).markdown).toMatch(/nope/); + expect(ask).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/devtools/src/rpc/ngrx-devtools-tools.ts b/packages/devtools/src/rpc/ngrx-devtools-tools.ts new file mode 100644 index 00000000..dc185471 --- /dev/null +++ b/packages/devtools/src/rpc/ngrx-devtools-tools.ts @@ -0,0 +1,291 @@ +import { + moreChangesText, + NGRX_DEVTOOLS_OPS, + devtoolsProblem, + type NgrxDevtoolsRequest, + type NgrxDiffEntry, + type NgrxLogEntry, + type NgrxRequest, + type NgrxRequestResult, +} from '../ngrx-shared.ts'; +import { UNTRUSTED, untrusted } from './forms-tools.ts'; +import type { NgrxPageRecord, NgrxPages } from './ngrx-tools.ts'; +import { storeIdNamed } from './ngrx-live-tools.ts'; +import { pageArgument, unknownPageText } from './pages.ts'; +import { refusal } from './refusal.ts'; +import { rankPages } from './default-page.ts'; + +/** + * The Store DevTools history tool (`ngrx-store-devtools`, an action behind + * `actions.ngrx`) and the read-only `ngrx-explain-change` tool, which answers + * why a state path changed from the change log the server already holds. + */ + +const MAX_TEXT = 15_000; +/** Most entries `ngrx-explain-change` lists for a path. */ +export const EXPLAIN_MAX_ENTRIES = 5; + +interface Deps { + /** Sends a request to a page's NgRx collector (`requestNgrxAction`). */ + ask: (page: string | undefined, request: NgrxRequest) => Promise; + pages: () => NgrxPages; +} + +export const NGRX_STORE_DEVTOOLS_DESCRIPTION = + 'Change the @ngrx/store Store DevTools history (dev only, needs provideStoreDevtools()): `op` toggle skips or includes the action of log entry `seq`; jump shows the state after `seq`, or Store DevTools state `index` (0 is the committed state); commit makes the current state the new start; reset goes back to the initial state; pause stops (`paused: true`) or starts recording. Commit and reset drop the history. Needs `page` when several tabs have a Store, and actions.ngrx.'; + +export const NGRX_EXPLAIN_CHANGE_DESCRIPTION = + 'Why an NgRx state value changed: the newest change log entries that wrote a state `path` (such as `cart.items` or `user.name`), with the action or method and its arguments, its origin, the event that caused it and, with ngrx.trace on, the call site. Or `seq` for one entry. Reads the log the page already reported.'; + +const PAGE = { + type: 'string', + description: 'Page id, when more than one tab reports (see pangular:list-pages).', +} as const; + +export const NGRX_DEVTOOLS_SCHEMAS = { + devtools: { + type: 'object', + properties: { + op: { type: 'string', enum: [...NGRX_DEVTOOLS_OPS], description: 'The operation.' }, + seq: { + type: 'integer', + description: 'toggle and jump: the log entry of an @ngrx/store action.', + }, + index: { + type: 'integer', + description: 'jump: a Store DevTools state instead of seq; 0 is the committed state.', + }, + paused: { + type: 'boolean', + description: 'pause: true stops recording, false starts it again. Toggles without it.', + }, + page: PAGE, + }, + required: ['op'], + }, + explain: { + type: 'object', + properties: { + path: { + type: 'string', + description: + 'A state path as the diff shows it, such as `cart.items`, `items[0].done` or a signal store field like `filter`.', + }, + store: { + type: 'string', + description: + 'Store id or name (`store` is the @ngrx/store Store). Omit to search every store.', + }, + seq: { type: 'integer', description: 'Explain this log entry instead of a path.' }, + page: PAGE, + }, + }, +} as const; + +function code(text: string): string { + return `\`${text.replaceAll('`', "'")}\``; +} + +function json(value: unknown): string { + let text: string; + try { + text = JSON.stringify(value) ?? 'undefined'; + } catch { + text = String(value); + } + return text.length > 400 ? `${text.slice(0, 400)}…` : text; +} + +/** The answer of `ngrx-store-devtools`. The page writes the message, so it sits behind the notice. */ +export function devtoolsResultText(result: NgrxRequestResult): string { + if (result.error) { + const error = result.error.startsWith(UNTRUSTED) + ? result.error.slice(UNTRUSTED.length).trimStart() + : result.error; + return refusal(untrusted(`Not done: ${error}`)); + } + return untrusted( + `${result.message ?? 'Done.'}\n\nRead pangular:ngrx-history for the new entry and pangular:ngrx-inspect-store for the state.`, + ); +} + +/** Whether diff row `row` touches state path `path`: the same path, one inside it, or one around it. */ +export function touchesPath(row: string, path: string): boolean { + if (row === '(root)' || row === path) return true; + const inside = (outer: string, inner: string) => + inner.startsWith(`${outer}.`) || inner.startsWith(`${outer}[`); + return inside(path, row) || inside(row, path); +} + +function diffRow(row: NgrxDiffEntry): string { + const before = 'before' in row ? ` ${json(row.before)}` : ''; + const after = 'after' in row ? ` ${json(row.after)}` : ''; + const arrow = 'before' in row && 'after' in row ? ' →' : ''; + return ` - ${code(row.path)} ${row.op}${before}${arrow}${after}`; +} + +function entryText(entry: NgrxLogEntry, rows: NgrxDiffEntry[], store: string): string { + const what = + entry.source === 'store' + ? `action ${code(entry.type)}` + : entry.source === 'event' + ? `event ${code(entry.eventType ?? entry.type)}` + : entry.type === 'patchState' + ? `a ${code('patchState')} outside a store method` + : `method ${code(entry.type)}`; + const lines = [ + `### #${entry.seq}: ${what} on ${code(store)}, ${new Date(entry.timestamp).toISOString()}`, + ]; + if (entry.origin) { + lines.push( + `- origin: ${ + { + dispatch: 'store.dispatch(action)', + effect: 'an NgRx effect', + reactive: 'store.dispatch(() => action)', + }[entry.origin] + }`, + ); + } + if (entry.causedByEvent) lines.push(`- caused by event ${code(entry.causedByEvent.type)}`); + if (entry.action !== undefined) lines.push(`- action: ${json(entry.action)}`); + if (entry.args?.length) lines.push(`- arguments: ${json(entry.args)}`); + if (entry.durationMs !== undefined) lines.push(`- duration: ${entry.durationMs}ms`); + if (rows.length) { + lines.push('- changed:'); + lines.push(...rows.map(diffRow)); + } else lines.push('- changed nothing'); + if (entry.diffTruncated) lines.push(` - ${moreChangesText(entry.diffTruncated)}`); + if (entry.trace?.length) { + lines.push('- called from:'); + lines.push(...entry.trace.map((frame) => ` - ${code(frame)}`)); + } + return lines.join('\n'); +} + +const NO_TRACE = + 'No call sites recorded. Set `ngrx: { trace: true }` in the devtools config to record where each change came from.'; + +/** + * Why a state path changed, as markdown: the newest log entries on the + * matching page(s) whose diff touches `path`, newest first, each with what + * ran, its arguments, origin, causing event and call site. With `seq`, that + * one entry with its whole diff. + */ +export function explainChangeText( + pages: NgrxPages, + pageId: string | undefined, + storeId: string | undefined, + path: string | undefined, + seq: number | undefined, +): string { + const matching = rankPages(pages.values()).filter((p) => !pageId || p.pageId === pageId); + if (!matching.length) { + if (pageId && pages.size) return unknownPageText(pageId, [...pages.values()], 'NgRx state'); + return 'No NgRx state has been reported yet. Open the app in a browser through the server that runs it; the stdio MCP server has no page.'; + } + const page: NgrxPageRecord = matching[0]; + const labels = new Map([ + ['store', 'Store'], + ['event', 'events'], + ]); + for (const store of page.stores) labels.set(store.id, store.name ?? store.className); + const label = (id: string) => labels.get(id) ?? id; + const where = + matching.length > 1 + ? ` on page ${code(page.pageId)} (the newest; pass \`page\` for another)` + : ''; + if (seq !== undefined) { + const entry = page.log.find((e) => e.seq === seq); + if (!entry) { + return `No log entry #${seq}${where || ` on page ${code(page.pageId)}`}. It may be older than the kept log (limits.changeLog).`; + } + const body = entryText(entry, entry.diff, label(entry.storeId)); + return `${body}${entry.trace?.length ? '' : `\n\n${NO_TRACE}`}`; + } + const want = path?.trim(); + if (!want) + return refusal('Pass `path`, a state path such as `cart.items`, or `seq`, a log entry.'); + const hits: { entry: NgrxLogEntry; rows: NgrxDiffEntry[] }[] = []; + for (let i = page.log.length - 1; i >= 0 && hits.length < EXPLAIN_MAX_ENTRIES; i--) { + const entry = page.log[i]; + if (storeId && entry.storeId !== storeId) continue; + const rows = entry.diff.filter((row) => touchesPath(row.path, want)); + if (rows.length) hits.push({ entry, rows }); + } + if (!hits.length) { + const scope = storeId ? ` of ${code(label(storeId))}` : ''; + return `No entry in the kept log${scope}${where} changed ${code(want)}. The path is written as the diff shows it, from the state root (\`cart.items\`) or a signal store field (\`filter\`). An older change may have left the log (limits.changeLog).`; + } + const newest = hits[0].entry; + const head = `${code(want)} last changed in #${newest.seq} (${newest.type})${where}. The ${ + hits.length === 1 ? 'entry' : `${hits.length} newest entries` + } that wrote it, newest first:`; + const body = hits.map(({ entry, rows }) => entryText(entry, rows, label(entry.storeId))); + const traced = hits.some(({ entry }) => entry.trace?.length); + const text = [head, ...body, ...(traced ? [] : [NO_TRACE])].join('\n\n'); + return text.length > MAX_TEXT ? `${text.slice(0, MAX_TEXT)}\n…` : text; +} + +function whole(value: unknown): number | undefined { + return typeof value === 'number' && Number.isInteger(value) ? value : undefined; +} + +/** `ngrx-store-devtools` and `ngrx-explain-change`, for `agent.registerTool`. */ +export function createNgrxDevtoolsTools(deps: Deps) { + return [ + { + id: 'pangular:ngrx-store-devtools', + title: 'Change the Store DevTools history', + description: NGRX_STORE_DEVTOOLS_DESCRIPTION, + inputSchema: NGRX_DEVTOOLS_SCHEMAS.devtools, + handler: async (args: Record) => { + const page = pageArgument(args); + const pages = deps.pages(); + if (page && !pages.has(page)) { + return { markdown: unknownPageText(page, [...pages.values()], 'NgRx state') }; + } + const request: NgrxDevtoolsRequest = { + type: 'devtools', + op: args?.['op'] as NgrxDevtoolsRequest['op'], + ...(args?.['seq'] !== undefined ? { seq: args['seq'] as number } : {}), + ...(args?.['index'] !== undefined ? { index: args['index'] as number } : {}), + ...(args?.['paused'] !== undefined ? { paused: args['paused'] as boolean } : {}), + }; + const problem = devtoolsProblem(request); + if (problem) return { markdown: refusal(problem) }; + if (page && !pages.get(page)?.classic) { + return { + markdown: refusal( + `Page ${code(page)} has no @ngrx/store Store, so it has no Store DevTools history.`, + ), + }; + } + return { markdown: devtoolsResultText(await deps.ask(page, request)) }; + }, + }, + { + id: 'pangular:ngrx-explain-change', + title: 'Explain an NgRx state change', + description: NGRX_EXPLAIN_CHANGE_DESCRIPTION, + inputSchema: NGRX_DEVTOOLS_SCHEMAS.explain, + handler: async (args: Record) => { + const pages = deps.pages(); + const page = pageArgument(args); + const store = typeof args?.['store'] === 'string' ? args['store'] : undefined; + const path = typeof args?.['path'] === 'string' ? args['path'].slice(0, 500) : undefined; + return { + markdown: untrusted( + explainChangeText( + pages, + page, + storeIdNamed(pages, page, store), + path, + whole(args?.['seq']), + ), + ), + }; + }, + }, + ]; +} diff --git a/packages/devtools/src/rpc/ngrx-live-tools.ts b/packages/devtools/src/rpc/ngrx-live-tools.ts index a83a29b8..a68f07c8 100644 --- a/packages/devtools/src/rpc/ngrx-live-tools.ts +++ b/packages/devtools/src/rpc/ngrx-live-tools.ts @@ -189,7 +189,8 @@ function entryLine(entry: NgrxLogEntry, showPage?: string): string { .join('; ') + (entry.diffTruncated ? `; ${moreChangesText(entry.diffTruncated)}` : '') : 'no state change'; const kind = entry.source === 'store' ? 'action' : 'call'; - return `- #${entry.seq} ${when}${page}: ${kind} ${code(entry.type)}${duration} on ${code(entry.storeId)}${caused}${restorable}: ${diffText}`; + const from = entry.trace?.length ? ` (from ${code(entry.trace[0])})` : ''; + return `- #${entry.seq} ${when}${page}: ${kind} ${code(entry.type)}${duration} on ${code(entry.storeId)}${caused}${from}${restorable}: ${diffText}`; } /** diff --git a/packages/devtools/src/rpc/ngrx-tools.ts b/packages/devtools/src/rpc/ngrx-tools.ts index 2506cd85..2a37faa4 100644 --- a/packages/devtools/src/rpc/ngrx-tools.ts +++ b/packages/devtools/src/rpc/ngrx-tools.ts @@ -1,5 +1,6 @@ import * as v from 'valibot'; import type { + NgrxActionStat, NgrxClassicStoreInfo, NgrxLogEntry, NgrxPage, @@ -68,6 +69,18 @@ const LogEntrySchema = v.looseObject({ restorable: v.boolean(), }); +const StatSchema = v.looseObject({ + source: v.picklist(['signal-store', 'store', 'event']), + storeId: v.string(), + type: v.string(), + count: v.number(), + lastAt: v.number(), + burst: v.number(), +}); + +/** At most this many stats are kept per page, as the collector sends. */ +const MAX_STATS = 100; + const ClassicSchema = v.looseObject({ state: v.unknown(), devtools: v.boolean(), @@ -174,11 +187,23 @@ export function mergeNgrxReport( classic: v.is(ClassicSchema, report.classic) ? (report.classic as NgrxClassicStoreInfo) : null, log, dropped: Math.max(0, (log[0]?.seq ?? 1) - 1), + // The page sends its stats only when they changed; until then the last ones stay. + ...statsOf(report, known ? previous : undefined), reportedAt: now, }); return log.at(-1)?.seq ?? 0; } +function statsOf( + report: NgrxPageReport, + previous: NgrxPageRecord | undefined, +): { stats?: NgrxActionStat[] } { + if (Array.isArray(report.stats)) { + return { stats: validItems(report.stats.slice(0, MAX_STATS), StatSchema) }; + } + return previous?.stats ? { stats: previous.stats } : {}; +} + export function expireNgrxPages( pages: NgrxPages, now = Date.now(), From ceb1d95b470941a9bc704642335f00b0bace8f0a Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 16:39:47 +0000 Subject: [PATCH 02/14] feat(store): add a state tree, Store DevTools controls, call sites and action frequency The NgRx Store page showed the state as one block of text and had no way to use the new Store DevTools operations or the recorded call sites. - The state is a tree: objects and arrays open and close, a search keeps matching keys and values with their parents, each row copies its path, and the paths the newest change wrote are marked. - With Store DevTools, the page pauses and resumes recording, jumps to the committed state, commits and resets (after a confirm), and skips or includes the selected action. Skipped actions are tagged in the log. - An entry recorded with ngrx.trace lists its call sites as source links. - An Action frequency table shows counts, durations and the peak per second since load, and flags a possible effect loop. - A withDevtools() store says that it is only watched. Refs #368 --- .../__tests__/store-devtools-history.test.ts | 206 +++++++++ .../__tests__/store-inspector-focus.test.ts | 2 +- .../__tests__/store-inspector-redux.test.ts | 2 +- app/src/__tests__/store-inspector.test.ts | 5 +- app/src/__tests__/store-state-tree.test.ts | 81 ++++ app/src/pages/store-inspector.ts | 395 +++++++++++++++++- app/src/pages/store-state-tree.ts | 372 +++++++++++++++++ app/src/pages/store-types.ts | 32 ++ 8 files changed, 1081 insertions(+), 14 deletions(-) create mode 100644 app/src/__tests__/store-devtools-history.test.ts create mode 100644 app/src/__tests__/store-state-tree.test.ts create mode 100644 app/src/pages/store-state-tree.ts diff --git a/app/src/__tests__/store-devtools-history.test.ts b/app/src/__tests__/store-devtools-history.test.ts new file mode 100644 index 00000000..fbaa4f25 --- /dev/null +++ b/app/src/__tests__/store-devtools-history.test.ts @@ -0,0 +1,206 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, describe, expect, it } from 'vitest'; +import { StoreInspector } from '../pages/store-inspector'; +import { traceFrame, type NgrxLogEntry, type NgrxPage } from '../pages/store-types'; + +type Call = (name: string, arg?: Record) => Promise; + +function fakeClient(call: Call, page: NgrxPage): DevframeRpcClient { + const rpc = { + call, + callEvent: () => Promise.resolve(), + sharedState: () => Promise.resolve({ value: () => ({ pages: [page] }), on: () => () => {} }), + }; + return { connectionMeta: {}, scope: () => ({ rpc }) } as unknown as DevframeRpcClient; +} + +function entry(seq: number, extra: Partial = {}): NgrxLogEntry { + return { + seq, + source: 'store', + storeId: 'store', + type: '[Cart] Add Item', + action: { type: '[Cart] Add Item', id: seq }, + origin: 'dispatch', + timestamp: 0, + diff: [{ path: 'cart.items[0]', op: 'add', after: seq }], + restorable: true, + ...extra, + }; +} + +async function settle(fixture: ComponentFixture) { + for (let i = 0; i < 3; i++) { + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); + } +} + +const root = (fixture: ComponentFixture) => fixture.nativeElement as HTMLElement; + +function button(fixture: ComponentFixture, name: string) { + return Array.from(root(fixture).querySelectorAll('button')).find( + (b) => (b.textContent ?? '').trim() === name, + ); +} + +async function mount(page: Partial) { + const calls: { name: string; arg?: Record }[] = []; + const fixture = TestBed.createComponent(StoreInspector); + fixture.componentRef.setInput( + 'rpc', + fakeClient( + (name, arg) => { + if (name === 'get-ngrx-store') return Promise.resolve([]); + calls.push({ name, arg }); + return Promise.resolve({ ok: true, message: 'Done on the page.' }); + }, + { + pageId: 'p1', + url: '/', + title: 'App', + stores: [], + classic: { state: { cart: { items: [1, 2] } }, devtools: true, scope: 'root' }, + log: [], + reportedAt: 0, + ...page, + }, + ), + ); + await settle(fixture); + return { fixture, calls }; +} + +const devtoolsCalls = (calls: { name: string; arg?: Record }[]) => + calls.filter((c) => c.name === 'request-ngrx-action').map((c) => c.arg?.['request']); + +afterEach(() => { + document.body.innerHTML = ''; +}); + +describe('Store DevTools history controls', () => { + it('pauses recording, jumps to the committed state and commits', async () => { + const { fixture, calls } = await mount({ log: [entry(1)] }); + button(fixture, 'Pause recording')!.click(); + await settle(fixture); + button(fixture, 'Jump to committed state')!.click(); + await settle(fixture); + button(fixture, 'Commit')!.click(); + await settle(fixture); + expect(devtoolsCalls(calls)).toEqual([ + { type: 'devtools', op: 'pause', paused: true }, + { type: 'devtools', op: 'jump', index: 0 }, + { type: 'devtools', op: 'commit' }, + ]); + expect(root(fixture).querySelector('.message')?.textContent).toContain('Done on the page.'); + }); + + it('asks before a reset, and Cancel goes back to the Reset button', async () => { + const { fixture, calls } = await mount({ log: [entry(1)] }); + button(fixture, 'Reset…')!.click(); + await settle(fixture); + expect(document.activeElement?.textContent?.trim()).toBe('Cancel'); + button(fixture, 'Cancel')!.click(); + await settle(fixture); + expect(document.activeElement?.textContent?.trim()).toBe('Reset…'); + button(fixture, 'Reset…')!.click(); + await settle(fixture); + button(fixture, 'Reset history')!.click(); + await settle(fixture); + expect(devtoolsCalls(calls)).toEqual([{ type: 'devtools', op: 'reset' }]); + }); + + it('shows paused recording and skipped actions, and toggles the selected one', async () => { + const { fixture, calls } = await mount({ + log: [entry(1), entry(2)], + classic: { + state: {}, + devtools: true, + scope: 'root', + recordingPaused: true, + skipped: [1], + }, + }); + const text = root(fixture).textContent ?? ''; + expect(text).toContain('Recording is paused'); + expect(text).toContain('1 skipped action is left out of the state.'); + expect(button(fixture, 'Resume recording')).toBeDefined(); + const items = Array.from(root(fixture).querySelectorAll('.log-item')); + const first = items.find((b) => b.textContent?.includes('#1'))!; + expect(first.textContent).toContain('skipped'); + first.click(); + await settle(fixture); + button(fixture, 'Include this action')!.click(); + await settle(fixture); + expect(devtoolsCalls(calls)).toEqual([{ type: 'devtools', op: 'toggle', seq: 1 }]); + }); +}); + +describe('call sites and action frequency', () => { + it('splits a trace frame into its function, file and line', () => { + expect(traceFrame('addItem (src/app/cart.ts:12:5)')).toEqual({ + name: 'addItem', + file: 'src/app/cart.ts', + line: 12, + }); + expect(traceFrame('src/main.ts:3:1')).toEqual({ name: '', file: 'src/main.ts', line: 3 }); + expect(traceFrame('native')).toEqual({ name: 'native' }); + }); + + it('lists where the selected entry came from', async () => { + const { fixture } = await mount({ + log: [entry(1, { trace: ['addItem (src/app/cart.ts:12:5)', 'onClick (src/app/x.ts:4:2)'] })], + }); + root(fixture).querySelector('.log-item')!.click(); + await settle(fixture); + const frames = Array.from(root(fixture).querySelectorAll('.trace li')).map((li) => + li.textContent?.trim(), + ); + expect(frames).toEqual(['addItem (src/app/cart.ts:12)', 'onClick (src/app/x.ts:4)']); + }); + + it('shows how often each action ran and flags an effect loop', async () => { + const { fixture } = await mount({ + log: [entry(1)], + stats: [ + { + source: 'store', + storeId: 'store', + type: '[Poll] Tick', + count: 40, + effects: 40, + lastAt: 1, + burst: 25, + loop: true, + }, + { + source: 'store', + storeId: 'store', + type: '[Cart] Add Item', + count: 1, + lastAt: 1, + burst: 1, + }, + { source: 'signal-store', storeId: 'ngrx-1', type: 'load', count: 3, lastAt: 1, burst: 1 }, + ], + }); + const rows = Array.from(root(fixture).querySelectorAll('.stats tbody tr')).map((tr) => + Array.from(tr.children).map((c) => c.textContent?.trim()), + ); + expect(rows).toEqual([ + ['[Poll] Tick Possible effect loop', '40', 'n/a', 'n/a', '25'], + ['[Cart] Add Item', '1', 'n/a', 'n/a', '1'], + ]); + expect(root(fixture).textContent).toContain('dispatched 20 or more times within one second'); + }); + + it('marks the paths the newest change wrote in the state tree', async () => { + const { fixture } = await mount({ log: [entry(1)] }); + const changed = Array.from(root(fixture).querySelectorAll('app-state-tree .row.changed')).map( + (row) => row.querySelector('.key')?.textContent, + ); + expect(changed).toEqual(['0']); + expect(root(fixture).querySelector('app-state-tree .row .mark')?.textContent).toBe('changed'); + }); +}); diff --git a/app/src/__tests__/store-inspector-focus.test.ts b/app/src/__tests__/store-inspector-focus.test.ts index ac54ab47..0c15286f 100644 --- a/app/src/__tests__/store-inspector-focus.test.ts +++ b/app/src/__tests__/store-inspector-focus.test.ts @@ -173,7 +173,7 @@ describe('StoreInspector restore focus', () => { it('focuses the state when restoring the newest action does not pause the store', async () => { const host = await restoreNewest({ ok: true, paused: false, message: 'Jumped.' }); expect(host.querySelector('.paused')).toBeNull(); - expect(document.activeElement).toBe(host.querySelector('pre.tree')); + expect(document.activeElement).toBe(host.querySelector('app-state-tree .tree')); }); it('focuses "Back to latest" when the restore pauses the store', async () => { diff --git a/app/src/__tests__/store-inspector-redux.test.ts b/app/src/__tests__/store-inspector-redux.test.ts index 48847a5a..b7ac58e9 100644 --- a/app/src/__tests__/store-inspector-redux.test.ts +++ b/app/src/__tests__/store-inspector-redux.test.ts @@ -90,7 +90,7 @@ describe('other stores in the store inspector', () => { await settle(fixture); const root = fixture.nativeElement as HTMLElement; expect(root.querySelector('.detail-head h3')?.textContent).toBe('NGXS'); - expect(root.querySelector('pre.tree')?.textContent).toContain('booked'); + expect(root.querySelector('app-state-tree .tree')?.textContent).toContain('booked'); expect(text(fixture)).toContain('Action log'); // No Store as global, Restore or Dispatch again for a store the panel only reads. expect(root.querySelector('app-store-global')).toBeNull(); diff --git a/app/src/__tests__/store-inspector.test.ts b/app/src/__tests__/store-inspector.test.ts index 5f0a5dc2..8a8df6fd 100644 --- a/app/src/__tests__/store-inspector.test.ts +++ b/app/src/__tests__/store-inspector.test.ts @@ -231,11 +231,10 @@ describe('StoreInspector copy', () => { it('copies the formatted state shown in the panel', async () => { const { fixture } = await mount([]); - const shown = root(fixture).querySelector('pre.tree')!.textContent; + expect(root(fixture).querySelector('app-state-tree .tree')!.textContent).toContain('items'); copyButton(fixture, 'Copy state')!.click(); await settle(fixture); - expect(copied).toEqual([shown]); - expect(copied[0]).toBe('{\n items: []\n}'); + expect(copied).toEqual(['{\n items: []\n}']); expect(message(fixture)).toBe('Copied.'); }); diff --git a/app/src/__tests__/store-state-tree.test.ts b/app/src/__tests__/store-state-tree.test.ts new file mode 100644 index 00000000..2ba6d814 --- /dev/null +++ b/app/src/__tests__/store-state-tree.test.ts @@ -0,0 +1,81 @@ +import { TestBed } from '@angular/core/testing'; +import { afterEach, describe, expect, it } from 'vitest'; +import { StoreStateTree, childPath, stateRows } from '../pages/store-state-tree'; + +const state = { + cart: { items: [{ id: 1, name: 'rome' }], total: 3 }, + user: { name: 'ada', 'first name': 'Ada' }, + when: { '@type': 'Date', value: '2026-01-01T00:00:00.000Z' }, +}; + +afterEach(() => { + document.body.innerHTML = ''; +}); + +describe('stateRows', () => { + it('writes paths the way the change log does', () => { + expect(childPath('', 'cart')).toBe('cart'); + expect(childPath('cart', 'items')).toBe('cart.items'); + expect(childPath('cart.items', 0)).toBe('cart.items[0]'); + expect(childPath('user', 'first name')).toBe('user["first name"]'); + }); + + it('opens the first level, nodes holding a change, and what the user opened', () => { + const plain = stateRows(state).rows.map((r) => r.path); + expect(plain).toEqual([ + 'cart', + 'cart.items', + 'cart.total', + 'user', + 'user.name', + 'user["first name"]', + 'when', + ]); + const changed = stateRows(state, { changed: ['cart.items[0].name'] }).rows; + expect(changed.map((r) => r.path)).toContain('cart.items[0].name'); + expect(changed.find((r) => r.path === 'cart.items[0].name')!.changed).toBe(true); + expect(changed.find((r) => r.path === 'cart')!.holdsChange).toBe(true); + const closed = stateRows(state, { closed: new Set(['cart']) }).rows.map((r) => r.path); + expect(closed).not.toContain('cart.items'); + // A tagged value is one leaf. + expect(stateRows(state).rows.find((r) => r.path === 'when')).toMatchObject({ node: false }); + }); + + it('narrows to matching keys and values and their parents', () => { + const { rows, matches } = stateRows(state, { query: 'rome' }); + expect(rows.map((r) => r.path)).toEqual([ + 'cart', + 'cart.items', + 'cart.items[0]', + 'cart.items[0].name', + ]); + expect(matches).toBe(1); + expect(stateRows(state, { query: 'nothing here' }).rows).toEqual([]); + }); +}); + +describe('StoreStateTree', () => { + it('opens a node, searches and emits the path to copy', async () => { + const fixture = TestBed.createComponent(StoreStateTree); + fixture.componentRef.setInput('value', state); + const copied: string[] = []; + fixture.componentInstance.copied.subscribe((path) => copied.push(path)); + await fixture.whenStable(); + const el = fixture.nativeElement as HTMLElement; + const items = Array.from(el.querySelectorAll('.toggle')).find((b) => + b.textContent?.includes('items'), + )!; + expect(items.getAttribute('aria-expanded')).toBe('false'); + items.click(); + await fixture.whenStable(); + expect(items.getAttribute('aria-expanded')).toBe('true'); + expect(el.querySelector('[aria-label="Copy path cart.items[0]"]')).not.toBeNull(); + el.querySelector('[aria-label="Copy path cart.total"]')!.click(); + expect(copied).toEqual(['cart.total']); + const search = el.querySelector('input[type="search"]')!; + search.value = 'ada'; + search.dispatchEvent(new Event('input')); + await fixture.whenStable(); + expect(el.querySelector('.count')?.textContent?.trim()).toBe('2 matches'); + }); +}); diff --git a/app/src/pages/store-inspector.ts b/app/src/pages/store-inspector.ts index e9ef1633..b0ee978b 100644 --- a/app/src/pages/store-inspector.ts +++ b/app/src/pages/store-inspector.ts @@ -31,7 +31,9 @@ import { pretty, sameNgrxLog, short, + traceFrame, type LiveStore, + type NgrxActionStat, type NgrxActionOrigin, type NgrxLogEntry, type NgrxLogKey, @@ -40,6 +42,7 @@ import { type NgrxStoreEntry, } from './store-types'; import { SourceLink } from '../ui/source-link'; +import { StoreStateTree } from './store-state-tree'; import { StoreGlobal } from '../ui/store-global'; import { reduxLiveStores, reduxLog, reduxPagesOf, type ReduxStoresPage } from './redux-stores'; @@ -114,6 +117,7 @@ const CLASSIC_KINDS = new Set([ StoreGlobal, EntryTabs, StoreSession, + StoreStateTree, ], template: `

@@ -256,7 +260,17 @@ const CLASSIC_KINDS = new Set([ current.classic.devtools ? 'Store DevTools on' : 'Store DevTools off' }} } + @if (current.signal?.watchOnly) { + withDevtools: watched only + } + @if (current.signal?.watchOnly) { +

+ This store uses withDevtools(), so the inspector does not wrap its + methods or signals. Changes are logged as patchState entries, and + method calls are not counted. +

+ } @if (current.signal?.references?.length) {

Referenced by @@ -313,9 +327,12 @@ const CLASSIC_KINDS = new Set([ -

{{
-                    stateText()
-                  }}
+ @if (current.signal; as info) {
@@ -404,6 +421,96 @@ const CLASSIC_KINDS = new Set([ } + @if (current.classic?.devtools) { +
+

Store DevTools history

+

+ {{ + current.classic!.recordingPaused + ? 'Recording is paused: new actions change the state but are not recorded.' + : 'Recording new actions.' + }} + @if (current.classic!.skipped?.length; as skippedCount) { + {{ skippedCount }} skipped + {{ skippedCount === 1 ? 'action is' : 'actions are' }} left out of the state. + } +

+ @if (confirmReset()) { +
+

+ Reset puts the store back on its initial state and empties the Store + DevTools history. Entries logged so far can no longer be restored. +

+
+ + +
+
+ } @else { +
+ + + + +
+ } + @if (!canRestore()) { +

{{ restoreOff }}

+ } +
+ } +

{{ current.classic || current.redux ? 'Action log' : 'Change log' }} @@ -456,6 +563,9 @@ const CLASSIC_KINDS = new Set([ } + @if (isSkipped(entry.seq)) { + skipped + } @if (entry.origin) { {{ entry.origin }} } @@ -497,6 +607,61 @@ const CLASSIC_KINDS = new Set([

+ @if (storeStats().length) { +
+

Action frequency

+

+ How often each {{ current.classic ? 'action' : 'change' }} ran since the page + loaded, including entries the log no longer keeps. +

+
+ + + + + + + + + + + + @for (stat of storeStats(); track stat.type) { + + + + + + + + } + +
{{ current.classic ? 'Action' : 'Method or write' }}CountAvgLongestPeak per second
+ {{ stat.type }} + @if (stat.loop) { + Possible effect loop + } + {{ stat.count }} + {{ stat.avgMs !== undefined ? formatDuration(stat.avgMs) : 'n/a' }} + + {{ stat.maxMs !== undefined ? formatDuration(stat.maxMs) : 'n/a' }} + {{ stat.burst }}
+
+ @if (hasLoop()) { +

+ A possible effect loop is an action an NgRx effect dispatched + {{ loopBurst }} or more times within one second. Check the effect that + dispatches it for a missing filter or a dispatch of its own trigger. +

+ } +
+ } + @if (!current.redux) { Duration
{{ formatDuration(selected.durationMs) }}
} + @if (selected.trace?.length) { +
Called from
+
+
    + @for (frame of traceFrames(selected.trace); track $index) { +
  1. + @if (frame.file) { + {{ frame.name ? frame.name + ' ' : '' }}({{ frame.file }}:{{ + frame.line + }}) + } @else { + {{ frame.name }} + } +
  2. + } +
+
+ } @if (selected.source === 'event') { } - @if (confirmSeq() !== selected.seq && (selected.restorable || canAgain(selected))) { + @if ( + confirmSeq() !== selected.seq && + (selected.restorable || canAgain(selected) || canToggle(selected)) + ) {
+ @if (canToggle(selected)) { + + } @if (selected.restorable) { + } @else { + + {{ row.key }}: + {{ row.text }} + + } + @if (row.changed) { + changed + } @else if (row.holdsChange && !row.open) { + holds a change + } + + + } + + @if (view().rows.length > shown().length) { +

+ {{ view().rows.length - shown().length }} more rows not shown. Search to narrow the tree. +

+ } +
+ `, + styles: ` + @use 'mixins' as m; + + :host { + display: grid; + gap: 8px; + min-width: 0; + } + .tree-tools { + display: flex; + align-items: center; + gap: 8px; + } + .tree-search { + flex: 1 1 auto; + min-width: 0; + height: var(--control-h); + padding: 0 10px; + border: 1px solid var(--control-border); + border-radius: var(--radius-sm); + background: var(--bg); + color: var(--text); + font: inherit; + font-size: 12px; + } + .tree-search:focus-visible { + @include m.field-focus; + } + .count { + flex: none; + color: var(--text-2); + font-size: 12px; + } + .tree { + max-height: 360px; + overflow: auto; + padding: 6px 8px; + background: var(--surface-2); + border: 1px solid var(--border); + border-radius: var(--radius-sm); + font-family: var(--font-mono); + font-size: 12px; + line-height: 1.55; + } + .tree:focus-visible { + @include m.focus-ring(-2px); + } + .rows { + margin: 0; + padding: 0; + list-style: none; + } + .row { + display: flex; + align-items: center; + gap: 6px; + min-width: 0; + border-radius: 4px; + } + .row.changed { + background: var(--accent-soft); + } + .toggle { + display: inline-flex; + align-items: baseline; + gap: 4px; + min-width: 0; + padding: 1px 2px; + border: 0; + background: none; + color: var(--text); + font: inherit; + cursor: pointer; + } + .toggle:focus-visible, + .copy-path:focus-visible { + @include m.focus-ring(-2px); + } + .caret { + width: 10px; + color: var(--text-2); + } + .leaf { + display: inline-flex; + gap: 4px; + min-width: 0; + padding: 1px 2px 1px 16px; + } + .key { + color: var(--text-strong); + } + .colon, + .summary { + color: var(--text-2); + } + .value { + @include m.truncate; + min-width: 0; + font-family: inherit; + color: var(--text); + } + .mark { + flex: none; + padding: 0 5px; + border-radius: 4px; + font-family: var(--font-sans, inherit); + font-size: 10.5px; + @include m.tint(accent); + } + .mark.soft { + background: none; + color: var(--text-2); + } + .copy-path { + flex: none; + margin-left: auto; + padding: 0 6px; + border: 1px solid transparent; + border-radius: 4px; + background: none; + color: var(--text-2); + font-family: var(--font-sans, inherit); + font-size: 11px; + cursor: pointer; + opacity: 0; + } + .row:hover .copy-path, + .copy-path:focus-visible { + opacity: 1; + border-color: var(--control-border); + } + @media (hover: none) { + .copy-path { + opacity: 1; + } + } + .muted { + margin: 4px 2px; + color: var(--text-2); + font-family: var(--font-sans, inherit); + } + `, +}) +export class StoreStateTree { + /** The serialized state. */ + readonly value = input(undefined); + /** Paths the newest change of this store wrote. */ + readonly changed = input([]); + readonly label = input('State'); + /** Emits a path the user asked to copy; the page copies it and says so. */ + readonly copied = output(); + + readonly query = signal(''); + // A new store starts with its own open and closed nodes. + private readonly opened = linkedSignal>({ + source: () => this.label(), + computation: () => new Set(), + }); + private readonly closed = linkedSignal>({ + source: () => this.label(), + computation: () => new Set(), + }); + private readonly box = viewChild>('box'); + + readonly view = computed(() => + stateRows(this.value(), { + query: this.query(), + changed: this.changed(), + opened: this.opened(), + closed: this.closed(), + }), + ); + readonly shown = computed(() => this.view().rows.slice(0, MAX_TREE_ROWS)); + readonly matches = computed(() => this.view().matches); + + toggle(row: StateRow) { + const opened = new Set(this.opened()); + const closed = new Set(this.closed()); + if (row.open) { + opened.delete(row.path); + closed.add(row.path); + } else { + closed.delete(row.path); + opened.add(row.path); + } + this.opened.set(opened); + this.closed.set(closed); + } + + /** Moves focus to the tree, as the state pre did after a restore. */ + focus() { + this.box()?.nativeElement.focus(); + } +} diff --git a/app/src/pages/store-types.ts b/app/src/pages/store-types.ts index a557a4e0..acc24b09 100644 --- a/app/src/pages/store-types.ts +++ b/app/src/pages/store-types.ts @@ -62,6 +62,8 @@ export interface NgrxSignalStoreInfo { }[]; references: string[]; writable: boolean; + /** The store uses `withDevtools()`, so the page only watches it: method calls are not counted. */ + watchOnly?: true; } export interface NgrxClassicStoreInfo { @@ -69,6 +71,25 @@ export interface NgrxClassicStoreInfo { devtools: boolean; scope: string; paused?: boolean; + /** Store DevTools recording is paused. */ + recordingPaused?: true; + /** Log entries whose actions Store DevTools skips. */ + skipped?: number[]; +} + +/** Per-type counts since the page loaded (`NgrxActionStat` in the package). */ +export interface NgrxActionStat { + source: NgrxLogEntry['source']; + storeId: string; + type: string; + count: number; + timed?: number; + avgMs?: number; + maxMs?: number; + effects?: number; + lastAt: number; + burst: number; + loop?: true; } export interface NgrxDiffEntry { @@ -109,6 +130,16 @@ export interface NgrxLogEntry { * The page counts up to {@link DIFF_MORE_CAP}, so at the cap it is a lower bound. */ diffTruncated?: number; + /** With `ngrx.trace` on: the app frames of the call, as `name (file:line:column)`. */ + trace?: string[]; +} + +/** A trace frame split into its function, file and line, for a source link. */ +export function traceFrame(frame: string): { name: string; file?: string; line?: number } { + const match = + /^(.*?)\s*\((.+?):(\d+)(?::\d+)?\)$/.exec(frame) ?? /^()(.+?):(\d+)(?::\d+)?$/.exec(frame); + if (!match) return { name: frame }; + return { name: match[1], file: match[2], line: Number(match[3]) }; } /** The most changes the page counts past a full diff (`NGRX_DIFF_MORE_CAP` in the package). */ @@ -137,6 +168,7 @@ export interface NgrxPage { classic: NgrxClassicStoreInfo | null; log: NgrxLogEntry[]; dropped?: number; + stats?: NgrxActionStat[]; reportedAt: number; } From e19a50195efe99d44e070dd843ee19ecb0f3d2af Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 16:47:28 +0000 Subject: [PATCH 03/14] docs(store): document the Store DevTools history, ngrx.trace and explain-change Describe the state tree, the Store DevTools history controls, call sites, action frequency and withDevtools() stores on the NgRx Store page, the ngrx-store-devtools and ngrx-explain-change tools, the ngrx.trace option, and list them in the 1.0.0 changelog and the shipped agent skill. Refs #368 --- apps/docs/src/content/agents/mcp-server.md | 51 ++++++++++--------- apps/docs/src/content/agents/tools.md | 41 ++++++++++++--- .../content/getting-started/configuration.md | 29 ++++++++--- .../docs/src/content/inspectors/ngrx-store.md | 43 +++++++++++++++- packages/devtools/CHANGELOG.md | 6 ++- .../skills/pangular-inspector/SKILL.md | 1 + 6 files changed, 129 insertions(+), 42 deletions(-) diff --git a/apps/docs/src/content/agents/mcp-server.md b/apps/docs/src/content/agents/mcp-server.md index 38ca19af..b9ba036a 100644 --- a/apps/docs/src/content/agents/mcp-server.md +++ b/apps/docs/src/content/agents/mcp-server.md @@ -275,31 +275,32 @@ Every tool answers with one plain text block, the answer as written: markdown fo ### Read and action tools -Each tool has a safety tier: `read`, `action` or `destructive`. The server marks `read` tools as read-only for your client, and `destructive` tools as destructive. Twenty-one tools act on the app, so the server does not mark them read-only: - -| Tool | Tier | Reference | -| ------------------------- | ------------- | ----------------------------------------------------------------------------- | -| `navigate` | `action` | [Act on the router](./tools.md#act-on-the-router) | -| `probe-route` | `action` | [Act on the router](./tools.md#act-on-the-router) | -| `record-guards` | `action` | [Act on the router](./tools.md#act-on-the-router) | -| `ngrx-dispatch` | `action` | [Dispatch an action](./tools.md#dispatch-an-action) | -| `ngrx-restore` | `action` | [Restore a state](./tools.md#restore-a-state) | -| `tanstack-run-query` | `action` | [Invalidate or refetch a query](./tools.md#invalidate-or-refetch-a-query) | -| `run-form-action` | `action` | [Act on a form](./tools.md#act-on-a-form) | -| `fill-form` | `action` | [Act on a form](./tools.md#act-on-a-form) | -| `set-http-rule` | `action` | [Fault rules](./tools.md#fault-rules) | -| `remove-http-rule` | `action` | [Fault rules](./tools.md#fault-rules) | -| `set-ssr-override` | `action` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | -| `remove-ssr-override` | `action` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | -| `set-component-property` | `action` | [Edit a component](./tools.md#edit-a-component) | -| `set-signal` | `action` | [Edit a component](./tools.md#edit-a-component) | -| `watch-signal` | `action` | [watch-signal](./tools.md#watch-signal) | -| `record-pipes` | `action` | [Record pipe calls](./tools.md#record-pipe-calls) | -| `track-subscriptions` | `action` | [Track subscriptions](./tools.md#track-subscriptions) | -| `record-change-detection` | `action` | [record-change-detection](./tools.md#record-change-detection) | -| `audit` | `action` | [audit](./tools.md#audit) | -| `clear-recordings` | `destructive` | [Clear recordings](./tools.md#clear-recordings) | -| `analog-run-api` | `destructive` | [Call a server route](./tools.md#call-a-server-route) | +Each tool has a safety tier: `read`, `action` or `destructive`. The server marks `read` tools as read-only for your client, and `destructive` tools as destructive. Twenty-two tools act on the app, so the server does not mark them read-only: + +| Tool | Tier | Reference | +| ------------------------- | ------------- | --------------------------------------------------------------------------------- | +| `navigate` | `action` | [Act on the router](./tools.md#act-on-the-router) | +| `probe-route` | `action` | [Act on the router](./tools.md#act-on-the-router) | +| `record-guards` | `action` | [Act on the router](./tools.md#act-on-the-router) | +| `ngrx-dispatch` | `action` | [Dispatch an action](./tools.md#dispatch-an-action) | +| `ngrx-restore` | `action` | [Restore a state](./tools.md#restore-a-state) | +| `ngrx-store-devtools` | `action` | [Change the Store DevTools history](./tools.md#change-the-store-devtools-history) | +| `tanstack-run-query` | `action` | [Invalidate or refetch a query](./tools.md#invalidate-or-refetch-a-query) | +| `run-form-action` | `action` | [Act on a form](./tools.md#act-on-a-form) | +| `fill-form` | `action` | [Act on a form](./tools.md#act-on-a-form) | +| `set-http-rule` | `action` | [Fault rules](./tools.md#fault-rules) | +| `remove-http-rule` | `action` | [Fault rules](./tools.md#fault-rules) | +| `set-ssr-override` | `action` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | +| `remove-ssr-override` | `action` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | +| `set-component-property` | `action` | [Edit a component](./tools.md#edit-a-component) | +| `set-signal` | `action` | [Edit a component](./tools.md#edit-a-component) | +| `watch-signal` | `action` | [watch-signal](./tools.md#watch-signal) | +| `record-pipes` | `action` | [Record pipe calls](./tools.md#record-pipe-calls) | +| `track-subscriptions` | `action` | [Track subscriptions](./tools.md#track-subscriptions) | +| `record-change-detection` | `action` | [record-change-detection](./tools.md#record-change-detection) | +| `audit` | `action` | [audit](./tools.md#audit) | +| `clear-recordings` | `destructive` | [Clear recordings](./tools.md#clear-recordings) | +| `analog-run-api` | `destructive` | [Call a server route](./tools.md#call-a-server-route) | Your client can ask you before it runs them. To drop them from the server, set `agent.readOnly`, which keeps only the `read` tools. `audit` stays without its `axe` argument, as a `read` tool. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools). diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md index c4d2fb14..6cad9398 100644 --- a/apps/docs/src/content/agents/tools.md +++ b/apps/docs/src/content/agents/tools.md @@ -59,7 +59,7 @@ Some calls name their page another way: | `highlight`, `inspect-component` given `component` | Every tab is searched for the instance, default page first | | `defer-blocks`, `for-blocks`, `hydration` | Every tab is listed | -Tools that change app state never pick one of several tabs on their own: `navigate`, `probe-route`, `record-guards`, `ngrx-dispatch`, `ngrx-restore`, `tanstack-run-query`, `set-signal` and `set-component-property` refuse and list the tabs when more than one could take the call. The tables below leave `page` out. +Tools that change app state never pick one of several tabs on their own: `navigate`, `probe-route`, `record-guards`, `ngrx-dispatch`, `ngrx-restore`, `ngrx-store-devtools`, `tanstack-run-query`, `set-signal` and `set-component-property` refuse and list the tabs when more than one could take the call. The tables below leave `page` out. If `page` names a tab that doesn't report that data, the tool answers `No page is reporting ...` and lists the tabs that do. It never falls back to another tab. A `page` that is not a string, such as a number, is refused the same way, and an empty string counts as left out. `page` is the only page argument: a call that sends `pageId` is refused. @@ -170,14 +170,14 @@ Without `url`, `navigation` holds as soon as no navigation is in progress, which Every tool has one of three safety tiers. The server sends the tier to your client as the tool's read-only and destructive hints. -| Tier | What the tool can do | Tools | -| ------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `read` | Reads your source, the page or the server. `highlight` only shows and selects a component. | Every other tool, and every resource | -| `action` | Changes the running page, the server's fault rules and SSR overrides, or what the page records. A reload or the next call undoes it. | `navigate`, `probe-route`, `record-guards`, `ngrx-dispatch`, `ngrx-restore`, `tanstack-run-query`, `run-form-action`, `fill-form`, `set-http-rule`, `remove-http-rule`, `set-ssr-override`, `remove-ssr-override`, `set-component-property`, `set-signal`, `watch-signal`, `record-pipes`, `track-subscriptions`, `record-change-detection` and `audit` | -| `destructive` | Can lose data: it erases recordings, or sends writes to your own API routes. | `clear-recordings` and `analog-run-api` | +| Tier | What the tool can do | Tools | +| ------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `read` | Reads your source, the page or the server. `highlight` only shows and selects a component. | Every other tool, and every resource | +| `action` | Changes the running page, the server's fault rules and SSR overrides, or what the page records. A reload or the next call undoes it. | `navigate`, `probe-route`, `record-guards`, `ngrx-dispatch`, `ngrx-restore`, `ngrx-store-devtools`, `tanstack-run-query`, `run-form-action`, `fill-form`, `set-http-rule`, `remove-http-rule`, `set-ssr-override`, `remove-ssr-override`, `set-component-property`, `set-signal`, `watch-signal`, `record-pipes`, `track-subscriptions`, `record-change-detection` and `audit` | +| `destructive` | Can lose data: it erases recordings, or sends writes to your own API routes. | `clear-recordings` and `analog-run-api` | - The twenty-one action and destructive tools act on the app. Your client can ask you before it runs them. + The twenty-two action and destructive tools act on the app. Your client can ask you before it runs them. When the hub is mounted, each finished call of an `action` or `destructive` tool posts an `Agent ran ` message to the hub, so you can see what the agent changed. `record-change-detection` posts only when it starts, stops or clears a recording, or turns a live view on or off, and `audit` only when it runs axe. See [Messages and badges](../getting-started/popup-and-hub.md#messages-and-badges). @@ -567,7 +567,7 @@ With `store`, the full state of one store: state, computed values, `withEntities ### ngrx-history -The change log for a page's stores, oldest first: `@ngrx/signals` state diffs (method calls and `patchState` writes, each with a per-key diff), classic `@ngrx/store` actions, and `@ngrx/signals/events` dispatched events. A method-call entry carries a duration in milliseconds. With `watchState` registered, it is the time from the start of the method to that patch; without it, the time the whole call took. A signal-store entry carries the event that caused it when the change happened while that event was being dispatched. Each entry lists up to 50 changes; when there were more, it ends with how many were left out, such as `12 more changes not shown`. +The change log for a page's stores, oldest first: `@ngrx/signals` state diffs (method calls and `patchState` writes, each with a per-key diff), classic `@ngrx/store` actions, and `@ngrx/signals/events` dispatched events. A method-call entry carries a duration in milliseconds. With `watchState` registered, it is the time from the start of the method to that patch; without it, the time the whole call took. A signal-store entry carries the event that caused it when the change happened while that event was being dispatched. Each entry lists up to 50 changes; when there were more, it ends with how many were left out, such as `12 more changes not shown`. With [`ngrx.trace`](../getting-started/configuration.md#ngrx) on, an entry names the closest app frame it came from. | Argument | Required | Value | | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -616,6 +616,17 @@ A Vitest spec that replays a range of entries: the state before the range, the r | `page` | no | The tab to read. | | `session` | no | An imported session id, to generate from it instead. | +### ngrx-explain-change + +Why a state value changed. With `path`, the newest entries in the kept log (up to 5) whose diff wrote that path, a path inside it or one around it, newest first. Each lists what ran (the action, the method, a `patchState` outside a method, or an event), its arguments or action, its origin, the event that caused it, its duration, the changes to that path, and, with [`ngrx.trace`](../getting-started/configuration.md#ngrx) on, the app frames it was called from. With `seq`, that one entry with its whole diff. Without call sites, the answer says how to turn `ngrx.trace` on. It reads the newest page that matches; a change older than the kept log ([`limits.changeLog`](../getting-started/configuration.md#limits)) is not found. + +| Argument | Required | Value | +| -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `path` | without seq | A state path as the diff writes it, from the state root (`cart.items`, `items[0].done`) or a signal store field (`filter`). **Copy path** in the state tree copies one. | +| `seq` | without path | An entry number, to explain that entry instead. | +| `store` | no | Only entries of that store, by id or name. `store` is the `@ngrx/store` Store. | +| `page` | no | The tab to read. Defaults to the newest page that reports NgRx. | + ### redux-inspect-stores Stores that report through the Redux DevTools extension API, such as NGXS, Elf and MiniRx (see [Other stores](../inspectors/ngrx-store.md#other-stores)). Without `store`, a table of the page's stores with their id, library and action count. With `store`, or when the page has one store, its last state and its latest actions, newest first, each with the action and a state diff of up to 50 changes. It never restores a state. @@ -708,6 +719,20 @@ Without `page`, the tool uses the one page that has an `@ngrx/store` Store. If m Without `page`, the tool uses the one page that reports NgRx state. With several, it restores nothing and lists them. Set [`actions.ngrx`](../getting-started/configuration.md#actions) to `false` to drop the tool. +### Change the Store DevTools history Action + +`ngrx-store-devtools` runs an operation on the `@ngrx/store` Store DevTools history of the running app, in development only, like the **Store DevTools history** controls on the [NgRx Store](../inspectors/ngrx-store.md#store-devtools-history) page. It needs `provideStoreDevtools()`. Every operation but `pause` adds a `Store DevTools: …` entry to the log. Reads: page. + +| `op` | What it does | Other arguments | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | +| `toggle` | Skips the action of an entry, so the state is computed without it, or includes a skipped one again. | `seq`: the entry of an `@ngrx/store` action. | +| `jump` | Shows the state after an entry, like `ngrx-restore`, or a Store DevTools state by its index. The store stays on it until you go back. | `seq`, or `index`: 0 is the committed state. | +| `commit` | Makes the current state the new starting point. Earlier entries can no longer be restored. | none | +| `reset` | Puts the store back on its initial state and empties the history. Earlier entries can no longer be restored. | none | +| `pause` | Stops recording new actions, which still change the state but cannot be restored, or starts recording again. | `paused`: `true` stops, `false` starts. Without it, it toggles. | + +Without `page`, the tool uses the one page that has an `@ngrx/store` Store. With several, it changes nothing and lists them. Set [`actions.ngrx`](../getting-started/configuration.md#actions) to `false` to drop the tool. + ## TanStack Query These tools read the `QueryClient` the app provides, through the page. See [TanStack Query](../inspectors/tanstack-query.md). Reads: page. diff --git a/apps/docs/src/content/getting-started/configuration.md b/apps/docs/src/content/getting-started/configuration.md index b9ce5f84..7867919a 100644 --- a/apps/docs/src/content/getting-started/configuration.md +++ b/apps/docs/src/content/getting-started/configuration.md @@ -132,17 +132,18 @@ interface PangularConfig { popup?: {hotkey?: string | false}; plugins?: Record; lint?: {rules?: Record}; + ngrx?: {trace?: boolean}; } ``` ### Inspectors and agent tools -| Option | Default | What it does | -| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `inspectors.` | `true` | `false` removes the inspector: no tab or dock, no page collector, no RPC functions, and no agent tools or resources. Its actions are blocked too. | -| `agent.readOnly` | `false` | `true` keeps only the agent tools in the `read` [safety tier](../agents/tools.md#action-tools). It drops every `action` and `destructive` tool in the [tier table](../agents/tools.md#action-tools): `run-form-action`, `fill-form`, `navigate`, `ngrx-dispatch`, `ngrx-restore`, `tanstack-run-query`, `set-http-rule`, `remove-http-rule`, `set-ssr-override`, `remove-ssr-override`, `set-component-property`, `set-signal`, `watch-signal`, `record-pipes`, `track-subscriptions`, `record-change-detection`, `probe-route`, `record-guards`, `analog-run-api` and `clear-recordings`. `audit` stays without its `axe` argument. | -| `agent.tools.` | `true` | `false` hides one inspector's agent tools and resources, and its [shared-state keys](../agents/resources.md#shared-state) over HTTP MCP. The tab stays. | -| `agent.browserTools` | `false` | `true` registers the `read` agent tools on the page for [browser agents](../agents/browser-agents.md) (WebMCP and Chrome DevTools for agents). Off by default, because any script on the development page could then call them. This is where the **Browser agent tools** switch in [Settings](./settings.md#browser-agents) starts. The switch changes it for every page until the dev server restarts. | +| Option | Default | What it does | +| -------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `inspectors.` | `true` | `false` removes the inspector: no tab or dock, no page collector, no RPC functions, and no agent tools or resources. Its actions are blocked too. | +| `agent.readOnly` | `false` | `true` keeps only the agent tools in the `read` [safety tier](../agents/tools.md#action-tools). It drops every `action` and `destructive` tool in the [tier table](../agents/tools.md#action-tools): `run-form-action`, `fill-form`, `navigate`, `ngrx-dispatch`, `ngrx-restore`, `ngrx-store-devtools`, `tanstack-run-query`, `set-http-rule`, `remove-http-rule`, `set-ssr-override`, `remove-ssr-override`, `set-component-property`, `set-signal`, `watch-signal`, `record-pipes`, `track-subscriptions`, `record-change-detection`, `probe-route`, `record-guards`, `analog-run-api` and `clear-recordings`. `audit` stays without its `axe` argument. | +| `agent.tools.` | `true` | `false` hides one inspector's agent tools and resources, and its [shared-state keys](../agents/resources.md#shared-state) over HTTP MCP. The tab stays. | +| `agent.browserTools` | `false` | `true` registers the `read` agent tools on the page for [browser agents](../agents/browser-agents.md) (WebMCP and Chrome DevTools for agents). Off by default, because any script on the development page could then call them. This is where the **Browser agent tools** switch in [Settings](./settings.md#browser-agents) starts. The switch changes it for every page until the dev server restarts. | `agent.tools` has the same keys as `inspectors`. An inspector that is off has no agent tools, whatever `agent.tools` says. @@ -156,7 +157,7 @@ Actions are the writes that the panel and agents make to your app or the server. | ----------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `actions.forms` | `true` | Form writes: set value, fill, mark touched, untouched, dirty or pristine, touch all, revalidate, reset, enable, disable, submit and restore. Drops `run-form-action` and `fill-form`. | | `actions.router` | `true` | Navigate, abort, replay and probe, and clearing the navigations list. Drops the `navigate` and `probe-route` agent tools and router clearing in `clear-recordings`. `record-guards` and `list-routes` with `resolveLazy` stay. | -| `actions.ngrx` | `true` | Restoring NgRx state from the change log and dispatching `@ngrx/store` actions. Drops the `ngrx-dispatch` and `ngrx-restore` agent tools. | +| `actions.ngrx` | `true` | Restoring NgRx state from the change log, dispatching `@ngrx/store` actions and changing the Store DevTools history. Drops the `ngrx-dispatch`, `ngrx-restore` and `ngrx-store-devtools` agent tools. | | `actions.http` | `true` | Editing fault injection rules and SSR overrides, and clearing the HTTP timeline. Drops the `set-http-rule`, `remove-http-rule`, `set-ssr-override` and `remove-ssr-override` agent tools and HTTP clearing in `clear-recordings`. | | `actions.analog` | `true` | The Analog request playground and clearing server calls. Drops the `analog-run-api` agent tool and Analog clearing in `clear-recordings`. | | `actions.components` | `true` | Editing component inputs, properties and writable signals from the **Components** tab, and **Restore** in the **Signals** value history. Drops the `set-component-property` and `set-signal` agent tools. | @@ -284,6 +285,20 @@ It is off by default because it starts processes on your machine. A value other A rule set to `false` is left out of the panel, the **Audit** tab, the agent tools (`scan-templates`, `scan-pipe-usage`, `explain-pipe`, `lint-routes`, `lint-forms`, `analog-lint` and `audit`) and the CI export (`pangular lint`). Use the rule name a finding shows. The template rules are listed under [scan-templates](../agents/tools.md#scan-templates). +### NgRx + +| Option | Default | What it does | +| ------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ngrx.trace` | `false` | `true` records where each [NgRx](../inspectors/ngrx-store.md#change-log) change log entry came from: up to 8 app frames of the dispatch, method call, `patchState` or event, without Angular, NgRx, RxJS, zone.js or devtools frames. Origins and query strings are removed, and secrets are masked like other values. | + +```json +{ + "ngrx": {"trace": true} +} +``` + +Taking a stack on every write costs time, so `ngrx.trace` is off by default. The frames show in the entry detail on the **NgRx Store** tab, in `ngrx-history` and in [`ngrx-explain-change`](../agents/tools.md#ngrx-explain-change). In a bundled build without source maps, they point into the bundle. + ## Check the active configuration The server checks the options when it starts. An unknown key, a value of the wrong type or a limit outside its bounds prints one `[pangular]` warning in the terminal that lists each problem and the value used instead. An unknown key names the closest known key: diff --git a/apps/docs/src/content/inspectors/ngrx-store.md b/apps/docs/src/content/inspectors/ngrx-store.md index 4c5546fa..0ae5d968 100644 --- a/apps/docs/src/content/inspectors/ngrx-store.md +++ b/apps/docs/src/content/inspectors/ngrx-store.md @@ -35,8 +35,15 @@ Select a store to see: - **Store DevTools on** or **Store DevTools off**, for the classic Store. - **Referenced by**: the component fields that hold it. - **State**, **Computed** and **Methods**, with a call count per method. **Copy** next to **State** copies the state as shown in the panel, with secrets already redacted. The copy is the panel's formatted text, not strict JSON. The tab tags `signalMethod` and `rxMethod` members. Once a method has been called, its chip also shows the average and last call duration, in milliseconds. +- **withDevtools: watched only**, for a signal store that uses `withDevtools()`. See [Stores that use `withDevtools()`](#stores-that-use-withdevtools). - **Entities**, for a `signalStore` that calls `withEntities()`. One group per collection, with the entity count and the ids as chips. A group past 30 ids shows the first 30 and a count of the rest. +### State tree + +**State** shows the state as a tree. Objects at the top level start open. Select an object or array to open or close it. Type in the search box above the tree to keep only the rows whose key or value matches, with their parents, all open, and a match count. Escape clears the search. Past 400 rows, the tree says how many more it holds; search to narrow it. + +**Copy path** on a row copies its path in the form the diff uses, such as `cart.items[0].name`. Pass that path to the [`ngrx-explain-change`](../agents/tools.md#ngrx-explain-change) agent tool to ask why it changed. The paths the newest change of the store wrote are marked **changed**, and the objects that hold them open on their own. A closed object that holds one says **holds a change**. + ### Store the state as a global **Store as global** next to **State** stores a copy of the selected store's state in the page console as `temp1`, then the first free `tempN`, and shows the name it used. For the classic Store, the copy is the whole state. For a signal store, it holds the state fields. Secret-looking keys, JWTs and `Bearer` values are replaced by `[redacted]` in the copy, and the button then says **Stored a copy as temp1, with secret fields masked.** Changing the copy doesn't change the store. Only the tab you are looking at gets the global. See [Console handles](./components.md#console-handles). @@ -53,8 +60,36 @@ Signal stores get a **Change log**. The classic Store gets an **Action log**. Ea Open an entry to see its time, **Origin** and **Duration**, and three tabs. **Action** shows the action, or the method's arguments and the event that caused it. **Diff** shows the **State diff** with the value before and after each change. **State** reads the whole state of the store right after the entry, or right before it, from the page; see [Read any past state](#read-any-past-state). The diff lists up to 50 changes. When there were more, a line under it says how many are not shown, for example **12 more changes not shown**, and the entry's change count includes them. The overlay counts up to 1000 more, so a larger change reads **1000+ more changes not shown**. A method-call entry also shows its **Duration**, in milliseconds. An entry caused by a dispatched event shows the event under **Caused by event**. An action entry also has **Dispatch again**. **Copy** next to **State diff** copies that entry's diff in the same format as **State**, one object per change with its `path`, `op`, `before` and `after`. An entry that changed nothing has no diff to copy. +With [`ngrx.trace`](../getting-started/configuration.md#ngrx) on, an entry also lists **Called from**: the app frames of the dispatch, method call or `patchState` that made it, the closest call first. With the server connected, each frame opens its file in your editor. + Entry numbers start at 1 again when the app reloads. So when the app reloads, or the selected page closes and the tab shows another one, the open entry closes and a pending **Restore** confirmation is cancelled. +### Action frequency + +**Action frequency** under the log counts how often each action, method call or write of the selected store ran since the page loaded, including entries the log no longer keeps. + +| Column | What it shows | +| -------------------- | ------------------------------------------------------------------------------- | +| **Count** | Entries of that type since load. | +| **Avg**, **Longest** | The duration of signal store method calls. `n/a` for actions, which carry none. | +| **Peak per second** | The most entries of that type within any one second. | + +An action an NgRx effect dispatched 20 or more times within one second is flagged **Possible effect loop**. Check that effect for a missing filter, or for a dispatch of the action that triggers it. The page counts up to 100 types, keeping the most recent. + +### Store DevTools history + +With `provideStoreDevtools()`, the classic Store gets a **Store DevTools history** section. + +| Control | What it does | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Pause recording** | Store DevTools stops recording new actions. They still change the state, but cannot be restored. **Resume recording** starts recording again. | +| **Jump to committed state** | Shows the state Store DevTools starts from. The store is then paused on it, like a restore; **Back to latest** resumes. | +| **Commit** | Makes the current state the new starting point. Earlier entries can no longer be restored. | +| **Reset…** | After **Reset history** to confirm, puts the store back on its initial state and empties the history. Earlier entries can no longer be restored. | +| **Skip this action** | On an open action entry: Store DevTools computes the state again without it, and the entry gets a `skipped` tag. **Include this action** undoes it. | + +Each operation adds a `Store DevTools: …` entry to the log, so the diff shows where the state moved. + ### Read any past state The **State** tab of an entry asks the page for the state of the store around that entry and shows it with **After #N** and **Before #N**, with **Copy**. The page keeps the states of every entry still in the log. NgRx state is immutable, so consecutive states share everything an entry did not change, and keeping them costs what changed. Values are redacted like the rest of the tab. When the log entry lists only 50 changes, **Show all changes** on the **Diff** tab reads up to 500 of them. @@ -122,6 +157,10 @@ For the classic Store, the overlay listens to the dispatched actions. It also wr The overlay diffs a copy of the state that keeps the first 100 items of each array or object. When a change is past that limit, it compares the live state instead, so the entry still lists the change. +### Stores that use `withDevtools()` + +A signal store that uses `withDevtools()` from `@angular-architects/ngrx-toolkit` already reports its changes through `watchState`, so the overlay leaves it as it is: it does not wrap the store's methods or state signals. With `watchState` registered, each `patchState` gets its own entry. Without it, the overlay compares the state each time it collects and logs the writes since the last time as one `patchState` entry. Either way, entries are not labeled with a method, and **Methods** lists the methods without call counts. + For `@ngrx/signals/events`, the overlay finds the platform `Dispatcher` and every component-scoped one from `provideDispatcher()`, and records each event once, from the dispatcher that handles it. When a store's state changes while an event is being dispatched, that change's log entry is tagged with the event. ### Development builds @@ -266,6 +305,8 @@ The stand-in is part of the NgRx inspector. With [`inspectors.ngrx`](../getting- | `pangular:ngrx-import-session` | tool | Reads an exported session back, for the two tools above and below. | | `pangular:ngrx-generate-test` | tool | A Vitest spec from a range of entries, live or imported. | | `pangular:ngrx-restore` | tool | Restores the state after an entry, or sends Store DevTools back to the latest state. An action tool. | +| `pangular:ngrx-store-devtools` | tool | Skips or includes an action, jumps, commits, resets, or pauses recording in the Store DevTools history. An action tool. | +| `pangular:ngrx-explain-change` | tool | Which log entries wrote a state path, with the action or method, its arguments, origin, causing event and call site. | | `pangular:redux-inspect-stores` | tool | The NGXS, Elf, MiniRx and other Redux DevTools stores of a page, or one of them with its state and latest actions. | See [NgRx tools](../agents/tools.md#ngrx-inspect-entry), [Restore a state](../agents/tools.md#restore-a-state) and [Resources](../agents/resources.md). @@ -306,7 +347,7 @@ The copy buttons use the browser clipboard. If the panel cannot write to it, for ### Write actions -Restore, **Back to latest**, **Dispatch** and **Dispatch again** need [`actions.ngrx`](../getting-started/configuration.md#actions). With it off, the panel disables them, the server refuses them, and the `ngrx-dispatch` and `ngrx-restore` tools are dropped. The **State** tab, **Session** and their tools only read, so they keep working. +Restore, **Back to latest**, **Dispatch**, **Dispatch again** and the **Store DevTools history** controls need [`actions.ngrx`](../getting-started/configuration.md#actions). With it off, the panel disables them, the server refuses them, and the `ngrx-dispatch`, `ngrx-restore` and `ngrx-store-devtools` tools are dropped. The **State** tab, **Session** and their tools only read, so they keep working. ### Log size diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index 034683a0..0cffcd70 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -146,6 +146,10 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN - **Signals:** the live signal graph drawn, watched signals, and links from components to injectors. - **Injectors:** a page picker, a created provider's value, startup timing and the slowest providers. - **NgRx Store:** full state for every entry still in the log, session export and import, generated tests, and NGXS, Elf and MiniRx through their Redux DevTools integration. +- **NgRx Store:** the state is a tree with search, **Copy path** and the paths of the newest change marked. Store DevTools gets **Pause recording**, **Jump to committed state**, **Commit**, **Reset…** and **Skip this action** (#368). +- **NgRx Store:** an **Action frequency** table counts each action, method and write since load, with durations and the peak per second, and flags an effect that dispatches the same action 20 times within a second (#368). +- **NgRx Store:** the opt-in `ngrx.trace` option records the redacted app frames each change log entry came from, shown as source links in the entry (#368). +- **NgRx Store:** a signal store that uses `withDevtools()` is watched through `watchState` only, without wrapping its methods or signals (#368). - **TanStack Query:** a tab for queries and mutations, with invalidate and refetch. - **SSR & HTTP:** a network waterfall, search and filters on the timeline, response preview format, copy and mock, TransferState keys and edits in SSR overrides, and SSR tracing for fetch handlers such as Hono, h3 and Nitro. - **Errors:** a tab for `ErrorHandler` errors, uncaught errors, unhandled rejections and the console, with NG0xxx codes and explainers for NG0100, hydration mismatches and missing providers. @@ -159,7 +163,7 @@ What remains: `/config` exports `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PAN #### Agents and MCP -- 98 agent tools. New tools include `audit`, `snapshot`, `wait-for`, `scan-templates` (#415), `list-errors`, `explain-error`, `list-console`, `find-leaks`, `diagnose-change-detection` (#395), `set-component-property`, `set-signal`, `track-subscriptions`, `watch-signal`, `hydration`, `screenshot-component`, `open-in-panel`, `startup-timing`, `read-provider-value`, `record-change-detection`, `probe-route`, `record-guards`, the TanStack Query, Capacitor, plugin and NgRx session tools, and tools for HTTP fault rules and SSR overrides. +- 100 agent tools. New tools include `audit`, `snapshot`, `wait-for`, `scan-templates` (#415), `list-errors`, `explain-error`, `list-console`, `find-leaks`, `diagnose-change-detection` (#395), `set-component-property`, `set-signal`, `track-subscriptions`, `watch-signal`, `hydration`, `screenshot-component`, `open-in-panel`, `startup-timing`, `read-provider-value`, `record-change-detection`, `probe-route`, `record-guards`, `ngrx-store-devtools`, `ngrx-explain-change` (#368), the TanStack Query, Capacitor, plugin and NgRx session tools, and tools for HTTP fault rules and SSR overrides. - One naming scheme for tools and arguments, and plain markdown answers. See **Agent tools renamed**. - Tool titles, inspector tags and safety tiers (`action` and `destructive`). - Every answer names the page it read, and one rule picks the default page for every tool. diff --git a/packages/devtools/skills/pangular-inspector/SKILL.md b/packages/devtools/skills/pangular-inspector/SKILL.md index 5941b70b..9406dc2d 100644 --- a/packages/devtools/skills/pangular-inspector/SKILL.md +++ b/packages/devtools/skills/pangular-inspector/SKILL.md @@ -39,6 +39,7 @@ Pangular Inspector reads a running Angular app through Angular's debug APIs and | Which HTTP calls ran, and what did SSR do? | `list-http-calls`, `list-ssr-requests`, `explain-ssr-request` | | Why is it slow, or why does it re-render? | `change-detection`, `diagnose-change-detection` (see `pangular-performance`) | | What does the NgRx store or a Signal Store hold? | `ngrx-store` resource, `ngrx-inspect-store`, `ngrx-history` | +| Why did an NgRx state value change? | `ngrx-explain-change`, with the `path` from the diff | | What is declared in the source? | `scan-routes`, `scan-components`, `scan-signals`, `scan-providers`, `scan-pipes` | Live state is also available as MCP resources, such as `pangular:component-tree`. Read a resource when you need the whole structure, and a tool when you have a question. From 13002ea91330e2c37835ea54051fa0e210bea769 Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 17:13:37 +0000 Subject: [PATCH 04/14] fix(store): drop the collector's own frames from bundled call sites A development build bundles the overlay into the app's chunks, so the file filter kept captureStack, traceNow and the method proxy at the top of each ngrx.trace stack. Cut the collector's frames by count at each capture point, and drop the @ngrx/signals frames between patchState and a watcher by name. Also shorten the two new tool descriptions to the 300 character limit agents get. --- .../src/__tests__/ngrx-trace-stats.test.ts | 4 +- packages/devtools/src/ngrx-collector.ts | 47 ++++++++++++++----- .../devtools/src/rpc/ngrx-devtools-tools.ts | 4 +- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/packages/devtools/src/__tests__/ngrx-trace-stats.test.ts b/packages/devtools/src/__tests__/ngrx-trace-stats.test.ts index 2170864a..df6b6ce4 100644 --- a/packages/devtools/src/__tests__/ngrx-trace-stats.test.ts +++ b/packages/devtools/src/__tests__/ngrx-trace-stats.test.ts @@ -130,6 +130,8 @@ describe('ngrx.trace', () => { const [entry] = collector.logSince(0); expect(entry.trace?.length).toBeGreaterThan(0); expect(entry.trace!.join('\n')).toContain('ngrx-trace-stats.test.ts'); + // The collector's own frames are cut by count, never the caller's. + expect(entry.trace![0]).toMatch(/^fromTheTest /); expect(entry.trace!.join('\n')).not.toMatch(/ngrx-collector\.ts|https?:\/\//); const classic = fakeClassic({ trace: true }); @@ -138,7 +140,7 @@ describe('ngrx.trace', () => { } dispatchFromTest(); const [action] = classic.collector.logSince(0); - expect(action.trace!.join('\n')).toContain('dispatchFromTest'); + expect(action.trace![0]).toMatch(/^dispatchFromTest /); }); it('masks a token in a frame', () => { diff --git a/packages/devtools/src/ngrx-collector.ts b/packages/devtools/src/ngrx-collector.ts index 4e5130f5..9e237ea8 100644 --- a/packages/devtools/src/ngrx-collector.ts +++ b/packages/devtools/src/ngrx-collector.ts @@ -333,6 +333,13 @@ export function usesWithDevtools(value: object): boolean { /** Entries the collector writes itself (restores, Store DevTools operations), left out of the stats. */ const INTERNAL_TYPE = /^(Restore #\d+|Back to latest$|Store DevTools: )/; +/** + * `@ngrx/signals` frames between a `patchState` call and a watcher, by name, + * for a build that bundles NgRx into a chunk without a package path. + */ +const NGRX_INTERNAL_FRAME = + /^(Object\.)?(patchState|notifyWatchers|executeWatcher|getWatchers|watchState|updateState)\b/; + /** Timestamps kept per stat to measure bursts. */ const BURST_SAMPLES = NGRX_LOOP_BURST; @@ -375,11 +382,22 @@ export function createNgrxCollector( maxLog = MAX_LOG, options: NgrxCollectorOptions = {}, ): NgrxCollector { - /** The app frames of the code running now, when `ngrx.trace` is on. */ - const traceNow = (): string[] | undefined => { + /** + * The app frames of the code running now, when `ngrx.trace` is on. `own` is + * how many frames of this collector sit between `traceNow` and the code it + * reports: a bundled build puts the overlay in the app's own chunks, where + * the file filter of `appFrames` cannot tell them apart. + */ + const traceNow = (own: number): string[] | undefined => { if (!options.trace) return undefined; - const frames = appFrames(captureStack(), NGRX_TRACE_FRAMES); - return frames.length ? frames : undefined; + const lines = (captureStack() ?? '').split('\n'); + // V8 starts with an `Error` line; Firefox and Safari list frames only. + const header = lines[0] && !/^\s*at\s|@/.test(lines[0]) ? 1 : 0; + const stack = lines.slice(header + 2 + own).join('\n'); + const frames = appFrames(stack, NGRX_TRACE_FRAMES + 4).filter( + (frame) => !NGRX_INTERNAL_FRAME.test(frame), + ); + return frames.length ? frames.slice(0, NGRX_TRACE_FRAMES) : undefined; }; const withTrace = (trace: string[] | undefined) => (trace ? { trace } : {}); const statsByKey = new Map(); @@ -596,7 +614,8 @@ export function createNgrxCollector( if (t.watched) return; if (t.depth > 0 || t.pendingBefore) return; t.pendingBefore = snapshot(t); - t.pendingTrace = traceNow(); + // Under onWrite: the wrapped set or update. + t.pendingTrace = traceNow(2); queueMicrotaskOutside(() => { const before = t.pendingBefore; const trace = t.pendingTrace; @@ -629,6 +648,7 @@ export function createNgrxCollector( t: Tracked, before: Snapshot, call: Tracked['methodStack'][number] | undefined, + callTrace?: string[], ) => { const after = snapshot(t); const changes = snapshotDiff(before, after, t.stateKeys); @@ -648,8 +668,7 @@ export function createNgrxCollector( maskLogged(call.logged); } if (!call) maskAsyncCallers(t, before, after); - // Inside the watchState callback, so the stack still holds the patchState caller. - const trace = isRestore ? undefined : (call?.trace ?? traceNow()); + const trace = isRestore ? undefined : callTrace; const logged = append( { source: 'signal-store', @@ -706,7 +725,10 @@ export function createNgrxCollector( // into one entry. if (!before) return; const call = t.methodStack[t.methodStack.length - 1]; - appendChange(t, before, call); + // The outermost method call's site, or, for a patchState outside a + // method, this callback's own stack, which still holds its caller. + const trace = call ? t.methodStack.find((frame) => frame.trace)?.trace : traceNow(1); + appendChange(t, before, call, trace); }, { injector: t.injector, manualCleanup: true }, ); @@ -759,7 +781,8 @@ export function createNgrxCollector( startedAt: now(), fired: 0, method: original, - ...(outer ? withTrace(traceNow()) : {}), + // Under the proxy's apply. + ...(outer ? withTrace(traceNow(1)) : {}), }; t.methodStack.push(frame); t.depth++; @@ -1023,7 +1046,8 @@ export function createNgrxCollector( const previous = currentDispatchedEvent; const previousTrace = currentEventTrace; currentDispatchedEvent = info; - currentEventTrace = traceNow(); + // Under the wrapped dispatch. + currentEventTrace = traceNow(1); let result: unknown; try { result = original.apply(this, args); @@ -1176,7 +1200,8 @@ export function createNgrxCollector( const tag = (action: unknown, origin: NgrxActionOrigin) => { if (!active || !action || typeof action !== 'object') return; origins.set(action, origin); - const trace = traceNow(); + // Under tag and the wrapped dispatch or next. + const trace = traceNow(2); if (trace) traces.set(action, trace); }; const undo: (() => void)[] = []; diff --git a/packages/devtools/src/rpc/ngrx-devtools-tools.ts b/packages/devtools/src/rpc/ngrx-devtools-tools.ts index dc185471..22ed2753 100644 --- a/packages/devtools/src/rpc/ngrx-devtools-tools.ts +++ b/packages/devtools/src/rpc/ngrx-devtools-tools.ts @@ -32,10 +32,10 @@ interface Deps { } export const NGRX_STORE_DEVTOOLS_DESCRIPTION = - 'Change the @ngrx/store Store DevTools history (dev only, needs provideStoreDevtools()): `op` toggle skips or includes the action of log entry `seq`; jump shows the state after `seq`, or Store DevTools state `index` (0 is the committed state); commit makes the current state the new start; reset goes back to the initial state; pause stops (`paused: true`) or starts recording. Commit and reset drop the history. Needs `page` when several tabs have a Store, and actions.ngrx.'; + 'Change the @ngrx/store Store DevTools history (dev only): `op` toggle skips or includes action `seq`, jump goes to `seq` or state `index` (0 is committed), commit, reset, or pause recording (`paused`). Commit and reset drop the history. Needs actions.ngrx.'; export const NGRX_EXPLAIN_CHANGE_DESCRIPTION = - 'Why an NgRx state value changed: the newest change log entries that wrote a state `path` (such as `cart.items` or `user.name`), with the action or method and its arguments, its origin, the event that caused it and, with ngrx.trace on, the call site. Or `seq` for one entry. Reads the log the page already reported.'; + 'Why an NgRx state value changed: the newest log entries that wrote a state `path` (like `cart.items`), or entry `seq`, with the action or method, arguments, origin, causing event and, with ngrx.trace on, the call site.'; const PAGE = { type: 'string', From 1e3603b7f088b6a8a5414410febfda183f541f2f Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 17:13:39 +0000 Subject: [PATCH 05/14] fix(store): keep the colon on the key and name the frequency table once The state tree put a gap between a key and its colon, and the Action frequency section and its scrollable table were two regions with the same name, which axe reports as landmark-unique. --- app/src/__tests__/store-devtools-history.test.ts | 2 +- app/src/pages/store-inspector.ts | 4 ++-- app/src/pages/store-state-tree.ts | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/__tests__/store-devtools-history.test.ts b/app/src/__tests__/store-devtools-history.test.ts index fbaa4f25..21730644 100644 --- a/app/src/__tests__/store-devtools-history.test.ts +++ b/app/src/__tests__/store-devtools-history.test.ts @@ -200,7 +200,7 @@ describe('call sites and action frequency', () => { const changed = Array.from(root(fixture).querySelectorAll('app-state-tree .row.changed')).map( (row) => row.querySelector('.key')?.textContent, ); - expect(changed).toEqual(['0']); + expect(changed).toEqual(['0:']); expect(root(fixture).querySelector('app-state-tree .row .mark')?.textContent).toBe('changed'); }); }); diff --git a/app/src/pages/store-inspector.ts b/app/src/pages/store-inspector.ts index b0ee978b..6b11ad8a 100644 --- a/app/src/pages/store-inspector.ts +++ b/app/src/pages/store-inspector.ts @@ -608,7 +608,7 @@ const CLASSIC_KINDS = new Set([
@if (storeStats().length) { -
+

Action frequency

How often each {{ current.classic ? 'action' : 'change' }} ran since the page @@ -659,7 +659,7 @@ const CLASSIC_KINDS = new Set([ dispatches it for a missing filter or a dispatch of its own trigger.

} -
+ } @if (!current.redux) { diff --git a/app/src/pages/store-state-tree.ts b/app/src/pages/store-state-tree.ts index ab155bd5..e3971850 100644 --- a/app/src/pages/store-state-tree.ts +++ b/app/src/pages/store-state-tree.ts @@ -147,8 +147,7 @@ export function stateRows( } @else { - {{ row.key }}: + {{ row.key }}: {{ row.text }} } From 2e964dff99bd44d3f50bc7a16eee9f314d5d93b1 Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 17:13:41 +0000 Subject: [PATCH 06/14] docs(mcp): count one hundred agent tools on the tools page The tools page said ninety-eight tools and its count test only knew words up to ninety-nine. Say one hundred and let the test read counts past it. --- apps/docs/src/content/agents/tools.md | 2 +- .../devtools/src/__tests__/docs-tool-count.test.ts | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md index 6cad9398..4450368b 100644 --- a/apps/docs/src/content/agents/tools.md +++ b/apps/docs/src/content/agents/tools.md @@ -4,7 +4,7 @@ description: Every agent tool the devtools expose, grouped by inspector, with wh --- - Ninety-eight tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel. + One hundred tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel. # Tools diff --git a/packages/devtools/src/__tests__/docs-tool-count.test.ts b/packages/devtools/src/__tests__/docs-tool-count.test.ts index bce5d562..e9ed211a 100644 --- a/packages/devtools/src/__tests__/docs-tool-count.test.ts +++ b/packages/devtools/src/__tests__/docs-tool-count.test.ts @@ -57,6 +57,17 @@ const WORDS = [ 'Ninety-seven', 'Ninety-eight', 'Ninety-nine', + 'One hundred', + 'One hundred and one', + 'One hundred and two', + 'One hundred and three', + 'One hundred and four', + 'One hundred and five', + 'One hundred and six', + 'One hundred and seven', + 'One hundred and eight', + 'One hundred and nine', + 'One hundred and ten', ]; it('states on the tools page how many tools the server registers', async () => { @@ -77,7 +88,7 @@ it('states on the tools page how many tools the server registers', async () => { join(__dirname, '../../../../apps/docs/src/content/agents/tools.md'), 'utf-8', ); - const stated = /^\s*([A-Z][a-z]+(?:-[a-z]+)?) tools, grouped by inspector/m.exec(page)?.[1]; + const stated = /^\s*([A-Z][a-z]+(?:[- ][a-z]+)*) tools, grouped by inspector/m.exec(page)?.[1]; expect(stated).toBeDefined(); const index = WORDS.indexOf(stated!); expect(index).toBeGreaterThanOrEqual(0); From c5d01ae03f0a69997ab9a8305754cd64d1f10bfa Mon Sep 17 00:00:00 2001 From: erKam Date: Sat, 7 Nov 2026 17:14:03 +0000 Subject: [PATCH 07/14] build(extension): rebuild the panel bundle Rebuild extension/ui from app for the NgRx Store state tree, Store DevTools controls, call sites and action frequency. --- ...=> browser-agent-rpc-KH4HHvHf-DpSc4Vik.js} | 2 +- .../{index-B4D7r6Ti.js => index-BZMIGeNx.js} | 406 ++++++++++++++---- extension/ui/index.html | 2 +- 3 files changed, 332 insertions(+), 78 deletions(-) rename extension/ui/assets/{browser-agent-rpc-KH4HHvHf-DtH28z9R.js => browser-agent-rpc-KH4HHvHf-DpSc4Vik.js} (95%) rename extension/ui/assets/{index-B4D7r6Ti.js => index-BZMIGeNx.js} (75%) diff --git a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-DtH28z9R.js b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-DpSc4Vik.js similarity index 95% rename from extension/ui/assets/browser-agent-rpc-KH4HHvHf-DtH28z9R.js rename to extension/ui/assets/browser-agent-rpc-KH4HHvHf-DpSc4Vik.js index 16cfdd41..daacab8d 100644 --- a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-DtH28z9R.js +++ b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-DpSc4Vik.js @@ -1 +1 @@ -import{t as e}from"./index-B4D7r6Ti.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(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(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,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-BZMIGeNx.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(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(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,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-B4D7r6Ti.js b/extension/ui/assets/index-BZMIGeNx.js similarity index 75% rename from extension/ui/assets/index-B4D7r6Ti.js rename to extension/ui/assets/index-BZMIGeNx.js index 835b0689..71a3384a 100644 --- a/extension/ui/assets/index-B4D7r6Ti.js +++ b/extension/ui/assets/index-BZMIGeNx.js @@ -3,12 +3,12 @@ \r \v ᠎ - \u2028\u2029   `;`${Kt}`,`${Kt}`;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||{}),Jt=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(Jt||{});qt.Character,x.StyleMap,x.ClassMap,x.StyleProp,x.ClassProp,x.Attribute,x.Property,x.Attribute,x.Control,x.DomProperty,x.DomProperty,x.Attribute,x.StyleMap,x.ClassMap,x.StyleProp,x.ClassProp,x.Listener,x.TwoWayListener,x.AnimationListener,x.StyleMap,x.ClassMap,x.StyleProp,x.ClassProp,x.Property,x.TwoWayProperty,x.DomProperty,x.Attribute,x.Animation,x.Control,Vt.Idle,b.deferOnIdle,b.deferPrefetchOnIdle,b.deferHydrateOnIdle,Vt.Immediate,b.deferOnImmediate,b.deferPrefetchOnImmediate,b.deferHydrateOnImmediate,Vt.Timer,b.deferOnTimer,b.deferPrefetchOnTimer,b.deferHydrateOnTimer,Vt.Hover,b.deferOnHover,b.deferPrefetchOnHover,b.deferHydrateOnHover,Vt.Interaction,b.deferOnInteraction,b.deferPrefetchOnInteraction,b.deferHydrateOnInteraction,Vt.Viewport,b.deferOnViewport,b.deferPrefetchOnViewport,b.deferHydrateOnViewport,Vt.Never,b.deferHydrateNever,b.deferHydrateNever,b.deferHydrateNever,b.pipeBind1,b.pipeBind2,b.pipeBind3,b.pipeBind4,b.textInterpolate,b.textInterpolate1,b.textInterpolate2,b.textInterpolate3,b.textInterpolate4,b.textInterpolate5,b.textInterpolate6,b.textInterpolate7,b.textInterpolate8,b.textInterpolateV,b.interpolate,b.interpolate1,b.interpolate2,b.interpolate3,b.interpolate4,b.interpolate5,b.interpolate6,b.interpolate7,b.interpolate8,b.interpolateV,b.pureFunction0,b.pureFunction1,b.pureFunction2,b.pureFunction3,b.pureFunction4,b.pureFunction5,b.pureFunction6,b.pureFunction7,b.pureFunction8,b.pureFunctionV,b.resolveWindow,b.resolveDocument,b.resolveBody,nt.HTML,b.sanitizeHtml,nt.RESOURCE_URL,b.sanitizeResourceUrl,nt.SCRIPT,b.sanitizeScript,nt.STYLE,b.sanitizeStyle,nt.URL,b.sanitizeUrl,nt.ATTRIBUTE_NO_BINDING,b.validateAttribute,nt.HTML,b.trustConstantHtml,nt.RESOURCE_URL,b.trustConstantResourceUrl;var Yt=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(Yt||{});S.Tmpl,S.Tmpl,S.Both,S.Host,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Both,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Both,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Tmpl,S.Both,S.Both,S.Both,S.Both,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Tmpl,S.Both,S.Tmpl,S.Both,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Tmpl,S.Both,S.Both,S.Both,Tt.Property,It.Property,Tt.TwoWay,It.TwoWayProperty,Tt.Attribute,It.Attribute,Tt.Class,It.ClassName,Tt.Style,It.StyleProperty,Tt.LegacyAnimation,It.LegacyAnimation,Tt.Animation,It.Animation;var Xt=`%COMP%`;`${Xt}`,`${Xt}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof wt?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 Zt=null,Qt=!1,$t=1,en=null,tn=Symbol(`SIGNAL`);function nn(e){let t=Zt;return Zt=e,t}function rn(){return Zt}var an={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 on(e){if(Qt)throw Error(``);if(Zt===null)return;Zt.consumerOnSignalRead(e);let t=Zt.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Zt.recomputing;if(r&&(n=t===void 0?Zt.producers:t.nextProducer,n!==void 0&&n.producer===e)){Zt.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=$t;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===Zt&&(!r||i.knownValidAtEpoch===$t))return;let a=xn(Zt),o={producer:e,consumer:Zt,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:$t,lastReadVersion:e.version,nextConsumer:void 0};Zt.producersTail=o,t===void 0?Zt.producers=o:t.nextProducer=o,a&&yn(e,o)}function sn(){$t++}function cn(e){if((!xn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==$t)){if(!e.producerMustRecompute(e)&&!_n(e)){fn(e);return}e.producerRecomputeValue(e),fn(e)}}function ln(e){if(e.consumers===void 0)return;let t=Qt;Qt=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||dn(e)}}finally{Qt=t}}function un(){return Zt?.consumerAllowSignalWrites!==!1}function dn(e){e.dirty=!0,ln(e),e.consumerMarkedDirty?.(e)}function fn(e){e.dirty=!1,e.lastCleanEpoch=$t}function pn(e){return e&&mn(e),nn(e)}function mn(e){if(e.producersTail?.knownValidAtEpoch===$t){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function hn(e,t){nn(t),e&&gn(e)}function gn(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(xn(e))do n=bn(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function _n(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(cn(e),n!==e.version))return!0}return!1}function vn(e){if(xn(e)){let t=e.producers;for(;t!==void 0;)t=bn(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function yn(e,t){let n=e.consumersTail,r=xn(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)yn(t.producer,t)}function bn(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,!xn(t)){let e=t.producers;for(;e!==void 0;)e=bn(e)}return n}function xn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Sn(e){en?.(e)}function Cn(e,t){return Object.is(e,t)}function wn(e,t){let n=Object.create(On);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(cn(n),on(n),n.value===Dn)throw n.error;return n.value};return r[tn]=n,Sn(n),r}var Tn=Symbol(`UNSET`),En=Symbol(`COMPUTING`),Dn=Symbol(`ERRORED`),On={...an,value:Tn,dirty:!0,error:null,equal:Cn,kind:`computed`,producerMustRecompute(e){return e.value===Tn||e.value===En},producerRecomputeValue(e){if(e.value===En)throw Error(``);let t=e.value;e.value=En;let n=pn(e),r,i=!1;try{r=e.computation(),nn(null),i=t!==Tn&&t!==Dn&&r!==Dn&&e.equal(t,r)}catch(t){r=Dn,e.error=t}finally{hn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function kn(){throw Error()}var An=kn;function jn(e){An(e)}function Mn(e){An=e}var Nn=null;function Pn(e,t){let n=Object.create(Rn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Fn(n);return r[tn]=n,Sn(n),[r,e=>In(n,e),e=>Ln(n,e)]}function Fn(e){return on(e),e.value}function In(e,t){un()||jn(e),e.equal(e.value,t)||(e.value=t,zn(e))}function Ln(e,t){un()||jn(e),In(e,t(e.value))}var Rn={...an,equal:Cn,value:void 0,kind:`signal`};function zn(e){e.version++,sn(),ln(e),Nn?.(e)}var Bn={...an,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Vn(e){if(e.dirty=!1,e.version>0&&!_n(e))return;e.version++;let t=pn(e);try{e.cleanup(),e.fn()}finally{hn(e,t)}}var Hn=void 0;function Un(){return Hn}function Wn(e){let t=Hn;return Hn=e,t}var Gn=Symbol(`NotFound`);function Kn(e){return e===Gn||e?.name===`ɵNotFound`}function qn(e,t,n){let r=Object.create(Xn);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(cn(r),on(r),r.value===Dn)throw r.error;return r.value};return i[tn]=r,Sn(r),i}function Jn(e,t){cn(e),In(e,t),fn(e)}function Yn(e,t){if(cn(e),e.value===Dn)throw e.error;Ln(e,t),fn(e)}var Xn={...an,value:Tn,dirty:!0,error:null,equal:Cn,kind:`linkedSignal`,producerMustRecompute(e){return e.value===Tn||e.value===En},producerRecomputeValue(e){if(e.value===En)throw Error(``);let t=e.value;e.value=En;let n=pn(e),r,i=!1;try{let n=e.source(),a=t!==Tn&&t!==Dn,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,nn(null),i=a&&r!==Dn&&e.equal(t,r)}catch(t){r=Dn,e.error=t}finally{hn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function Zn(e){let t=nn(null);try{return e()}finally{nn(t)}}var Qn=function(e,t){return Qn=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])},Qn(e,t)};function $n(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Qn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function er(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function tr(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function rr(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 ir(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof ar?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function sr(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof nr==`function`?nr(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function cr(e){return typeof e==`function`}function lr(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var ur=lr(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: `+t.map(function(e,t){return t+1+`) `+e.toString()}).join(` `):``,this.name=`UnsubscriptionError`,this.errors=t}});function dr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var fr=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=nr(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(cr(c))try{c()}catch(e){i=e instanceof ur?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=nr(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{hr(f)}catch(e){i??=[],e instanceof ur?i=ir(ir([],rr(i)),rr(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new ur(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)hr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&dr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&dr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),pr=fr.EMPTY;function mr(e){return e instanceof fr||e&&`closed`in e&&cr(e.remove)&&cr(e.add)&&cr(e.unsubscribe)}function hr(e){cr(e)?e():e.unsubscribe()}var gr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},_r={setTimeout:function(e,t){var n=[...arguments].slice(2),r=_r.delegate;return r?.setTimeout?r.setTimeout.apply(r,ir([e,t],rr(n))):setTimeout.apply(void 0,ir([e,t],rr(n)))},clearTimeout:function(e){return(_r.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function vr(e){_r.setTimeout(function(){var t=gr.onUnhandledError;if(t)t(e);else throw e})}function yr(){}var br=(function(){return Cr(`C`,void 0,void 0)})();function xr(e){return Cr(`E`,void 0,e)}function Sr(e){return Cr(`N`,e,void 0)}function Cr(e,t,n){return{kind:e,value:t,error:n}}var wr=null;function Tr(e){if(gr.useDeprecatedSynchronousErrorHandling){var t=!wr;if(t&&(wr={errorThrown:!1,error:null}),e(),t){var n=wr,r=n.errorThrown,i=n.error;if(wr=null,r)throw i}}else e()}function Er(e){gr.useDeprecatedSynchronousErrorHandling&&wr&&(wr.errorThrown=!0,wr.error=e)}var Dr=function(e){$n(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,mr(t)&&t.add(n)):n.destination=Fr,n}return t.create=function(e,t,n){return new jr(e,t,n)},t.prototype.next=function(e){this.isStopped?Pr(Sr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Pr(xr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Pr(br,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(fr),Or=Function.prototype.bind;function kr(e,t){return Or.call(e,t)}var Ar=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Mr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Mr(e)}else Mr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Mr(e)}},e}(),jr=function(e){$n(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(cr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&gr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&kr(t.next,o),error:t.error&&kr(t.error,o),complete:t.complete&&kr(t.complete,o)}):a=t}return i.destination=new Ar(a),i}return t}(Dr);function Mr(e){gr.useDeprecatedSynchronousErrorHandling?Er(e):vr(e)}function Nr(e){throw e}function Pr(e,t){var n=gr.onStoppedNotification;n&&_r.setTimeout(function(){return n(e,t)})}var Fr={closed:!0,next:yr,error:Nr,complete:yr},Ir=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Lr(e){return e}function Rr(e){return e.length===0?Lr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var zr=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Hr(e)?e:new jr(e,t,n);return Tr(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Br(t),new t(function(t,r){var i=new jr({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[Ir]=function(){return this},e.prototype.pipe=function(){return Rr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Br(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Br(e){return e??gr.Promise??Promise}function Vr(e){return e&&cr(e.next)&&cr(e.error)&&cr(e.complete)}function Hr(e){return e&&e instanceof Dr||Vr(e)&&mr(e)}function Ur(e){return cr(e?.lift)}function Wr(e){return function(t){if(Ur(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Gr(e,t,n,r,i){return new Kr(e,t,n,r,i)}var Kr=function(e){$n(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Dr),qr=lr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Jr=function(e){$n(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Yr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new qr},t.prototype.next=function(e){var t=this;Tr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=nr(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;Tr(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;Tr(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},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?pr:(this.currentObservers=null,a.push(e),new fr(function(){t.currentObservers=null,dr(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 zr;return e.source=this,e},t.create=function(e,t){return new Yr(e,t)},t}(zr),Yr=function(e){$n(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)??pr},t}(Jr),Xr=function(e){$n(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}(Jr);function Zr(e){return e[e.length-1]}function Qr(e){return cr(Zr(e))?e.pop():void 0}var $r=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function ei(e){return cr(e?.then)}function ti(e){return cr(e[Ir])}function ni(e){return Symbol.asyncIterator&&cr(e?.[Symbol.asyncIterator])}function ri(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function ii(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var ai=ii();function oi(e){return cr(e?.[ai])}function si(e){return or(this,arguments,function(){var t,n,r,i;return tr(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ar(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,ar(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ar(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ci(e){return cr(e?.getReader)}function li(e){if(e instanceof zr)return e;if(e!=null){if(ti(e))return uee(e);if($r(e))return dee(e);if(ei(e))return fee(e);if(ni(e))return ui(e);if(oi(e))return pee(e);if(ci(e))return mee(e)}throw ri(e)}function uee(e){return new zr(function(t){var n=e[Ir]();if(cr(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function dee(e){return new zr(function(t){for(var n=0;n=0?n.slice(0,r):n}function Ci(e,t){return e?t?`${e} ${t}`:e:t||``}var wi=bi({__forward_ref__:bi});function Ti(e){return e.__forward_ref__=Ti,e}function Ei(e){return Di(e)?e():e}function Di(e){return typeof e==`function`&&Object.hasOwn(e,wi)&&e.__forward_ref__===Ti}function Oi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function ki(e){return Ai(e,Ni)}function Ai(e,t){return Object.hasOwn(e,t)&&e[t]||null}function ji(e){return(e?.[Ni]??null)||null}function Mi(e){return e&&Object.hasOwn(e,Pi)?e[Pi]:null}var Ni=bi({ɵprov:bi}),Pi=bi({ɵinj:bi}),Fi=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=Oi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ii(e){return e&&!!e.ɵproviders}var Li=bi({ɵcmp:bi}),Ri=bi({ɵdir:bi}),zi=bi({ɵpipe:bi}),Bi=bi({ɵfac:bi}),Vi=bi({__NG_ELEMENT_ID__:bi}),Hi=bi({__NG_ENV_ID__:bi});function Ui(e){return Ki(e,`@Component`),e[Li]||null}function Wi(e){return Ki(e,`@Directive`),e[Ri]||null}function Gi(e){return Ki(e,`@Pipe`),e[zi]||null}function Ki(e,t){if(e==null)throw new _i(-919,!1)}function qi(e){return typeof e==`string`?e:e==null?``:String(e)}var Ji=bi({ngErrorCode:bi}),Yi=bi({ngErrorMessage:bi}),Xi=bi({ngTokenPath:bi});function Zi(e,t){return $i(``,-200,t)}function Qi(e,t){throw new _i(-201,!1)}function $i(e,t,n){let r=new _i(t,e);return r[Ji]=t,r[Yi]=e,n&&(r[Xi]=n),r}function ea(e){return e[Ji]}var ta;function na(){return ta}function ra(e){let t=ta;return ta=e,t}function ia(e,t,n){let r=ki(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;Qi(e,``)}var aa=globalThis,oa={},sa=`__NG_DI_FLAG__`,ca=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=da(t)||0;try{return this.injector.get(e,n&8?null:oa,n)}catch(e){if(Kn(e))return e;throw e}}};function la(e,t=0){let n=Un();if(n===void 0)throw new _i(-203,!1);if(n===null)return ia(e,void 0,t);{let r=fa(t),i=n.retrieve(e,r);if(Kn(i)){if(r.optional)return null;throw i}return i}}function ua(e,t=0){return(na()||la)(Ei(e),t)}function C(e,t){return ua(e,da(t))}function da(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function fa(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function pa(e){let t=[];for(let n=0;nArray.isArray(e)?va(e,t):t(e))}function ya(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ba(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function xa(e,t){let n=[];for(let r=0;rt;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function Ca(e,t,n){let r=Ta(e,t);return r>=0?e[r|1]=n:(r=~r,Sa(e,r,t,n)),r}function wa(e,t){let n=Ta(e,t);if(n>=0)return e[n|1]}function Ta(e,t){return Ea(e,t,1)}function Ea(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 va(t,e=>{let t=e;Ia(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Fa(i,a),n}function Fa(e,t){for(let n=0;n{t(e,r)})}}function Ia(e,t,n,r){if(e=Ei(e),!e)return!1;let i=null,a=Mi(e),o=!a&&Ui(e);if(!a&&!o){let t=e.ngModule;if(a=Mi(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)Ia(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{va(a.imports,i=>{Ia(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Fa(e,t)}if(!s){let e=ha(i)||(()=>new i);t({provide:i,useFactory:e,deps:Oa},i),t({provide:ja,useValue:i,multi:!0},i),t({provide:ka,useValue:()=>ua(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;La(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function La(e,t){for(let n of e)Ii(n)&&(n=n.ɵproviders),Array.isArray(n)?La(n,t):t(n)}var Ra=bi({provide:String,useValue:bi});function za(e){return typeof e==`object`&&!!e&&Ra in e}function Ba(e){return!!(e&&e.useExisting)}function Va(e){return!!(e&&e.useFactory)}function Ha(e){return typeof e==`function`}function Ua(e){return!!e.useClass}var Wa=new Fi(``),Ga={},Ka={},qa=void 0;function Ja(){return qa===void 0&&(qa=new Ma),qa}var Ya=class{},Xa=class extends Ya{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,oo(e,e=>this.processProvider(e)),this.records.set(Aa,no(void 0,this)),r.has(`environment`)&&this.records.set(Ya,no(void 0,this));let i=this.records.get(Wa);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(ja,Oa,{self:!0}))}retrieve(e,t){let n=da(t)||0;try{return this.get(e,oa,n)}catch(e){if(Kn(e))return e;throw e}}destroy(){to(this),this._destroyed=!0;let e=nn(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(),nn(e)}}onDestroy(e){return to(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){to(this);let t=Wn(this),n=ra(void 0);try{return e()}finally{Wn(t),ra(n)}}get(e,t=oa,n){if(to(this),Object.hasOwn(e,Hi))return e[Hi](this);let r=da(n),i=Wn(this),a=ra(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=ao(e)&&ki(e);t=n&&this.injectableDefInScope(n)?no(Za(e),Ga):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ja():this.parent;return t=r&8&&t===oa?null:t,n.get(e,t)}catch(e){let t=ea(e);throw t===-200||t===-201?new _i(t,null):e}finally{ra(a),Wn(i)}}resolveInjectorInitializers(){let e=nn(null),t=Wn(this),n=ra(void 0);try{let e=this.get(ka,Oa,{self:!0});for(let t of e)t()}finally{Wn(t),ra(n),nn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=Ei(e);let t=Ha(e)?e:Ei(e&&e.provide),n=$a(e);if(!Ha(e)&&e.multi===!0){let n=this.records.get(t);n||(n=no(void 0,Ga,!0),n.factory=()=>pa(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=nn(null);try{if(t.value===Ka)throw Zi(``);return t.value===Ga&&(t.value=Ka,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&io(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{nn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Ei(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 Za(e){let t=ki(e),n=t===null?ha(e):t.factory;if(n!==null)return n;if(e instanceof Fi)throw new _i(-204,!1);if(e instanceof Function)return Qa(e);throw new _i(-204,!1)}function Qa(e){if(e.length>0)throw new _i(-204,!1);let t=ji(e);return t===null?()=>new e:()=>t.factory(e)}function $a(e){return za(e)?no(void 0,e.useValue):no(eo(e),Ga)}function eo(e,t,n){let r;if(Ha(e)){let t=Ei(e);return ha(t)||Za(t)}if(za(e))r=()=>Ei(e.useValue);else if(Va(e))r=()=>e.useFactory(...pa(e.deps||[]));else if(Ba(e))r=(t,n)=>ua(Ei(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=Ei(e&&(e.useClass||e.provide));if(ro(e))r=()=>new t(...pa(e.deps));else return ha(t)||Za(t)}return r}function to(e){if(e.destroyed)throw new _i(-205,!1)}function no(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function ro(e){return!!e.deps}function io(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function ao(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function oo(e,t){for(let n of e)Array.isArray(n)?oo(n,t):n&&Ii(n)?oo(n.ɵproviders,t):t(n)}function so(e,t){let n;e instanceof Xa?(to(e),n=e):n=new ca(e);let r=Wn(n),i=ra(void 0);try{return t()}finally{Wn(r),ra(i)}}function co(){return na()!==void 0||Un()!=null}var lo=1;function uo(e){return Array.isArray(e)&&typeof e[lo]==`object`}function fo(e){return Array.isArray(e)&&e[lo]===!0}function po(e){return!!(e.flags&4)}function mo(e){return e.componentOffset>-1}function ho(e){return(e.flags&1)==1}function go(e){return!!e.template}function _o(e){return!!(e[2]&512)}function vo(e){return(e[2]&256)==256}var yo=(function(e){return e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`,e[e.ATTRIBUTE_NO_BINDING=6]=`ATTRIBUTE_NO_BINDING`,e})(yo||{}),bo=`math`;function xo(e){for(;Array.isArray(e);)e=e[0];return e}function So(e,t){return xo(t[e])}function Co(e,t){return xo(t[e.index])}function wo(e,t){return e.data[t]}function To(e,t){return e[t]}function Eo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Do(e,t){let n=t[e];return uo(n)?n:n[0]}function Oo(e){return(e[2]&128)==128}function Pee(e){return fo(e[3])}function ko(e,t){return t==null?null:e[t]}function Ao(e){e[17]=0}function jo(e){e[2]&1024||(e[2]|=1024,Oo(e)&&Po(e))}function Fee(e,t){for(;e>0;)t=t[14],e--;return t}function Mo(e){return!!(e[2]&9216||e[24]?.dirty)}function No(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),Mo(e)&&Po(e)}function Po(e){e[10].changeDetectionScheduler?.notify(0);let t=Io(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!Oo(t)));)t=Io(t)}function Fo(e,t){if(vo(e))throw new _i(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Iee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Io(e){let t=e[3];return fo(t)?t[3]:t}function Lo(e){return e[7]??=[]}function Ro(e){return e.cleanup??=[]}function Lee(e,t,n,r){let i=Lo(t);i.push(n),e.firstCreatePass&&Ro(e).push(r,i.length-1)}var zo={lFrame:fs(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Bo=!1;function Ree(){return zo.lFrame.elementDepthCount}function zee(){zo.lFrame.elementDepthCount++}function Vo(){zo.lFrame.elementDepthCount--}function Ho(){return zo.bindingsEnabled}function Uo(){return zo.skipHydrationRootTNode!==null}function Wo(e){return zo.skipHydrationRootTNode===e}function Go(){zo.skipHydrationRootTNode=null}function Ko(){return zo.lFrame.lView}function qo(){return zo.lFrame.tView}function w(e){return zo.lFrame.contextLView=e,e[8]}function T(e){return zo.lFrame.contextLView=null,e}function Jo(){let e=Yo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Yo(){return zo.lFrame.currentTNode}function Bee(){let e=zo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Xo(e,t){let n=zo.lFrame;n.currentTNode=e,n.isParent=t}function Zo(){return zo.lFrame.isParent}function Qo(){zo.lFrame.isParent=!1}function $o(){return zo.lFrame.contextLView}function es(){return Bo}function ts(e){let t=Bo;return Bo=e,t}function ns(){let e=zo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function rs(){return zo.lFrame.bindingIndex}function Vee(e){return zo.lFrame.bindingIndex=e}function is(){return zo.lFrame.bindingIndex++}function as(e){let t=zo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Hee(){return zo.lFrame.inI18n}function Uee(e,t){let n=zo.lFrame;n.bindingIndex=n.bindingRootIndex=e,os(t)}function Wee(){return zo.lFrame.currentDirectiveIndex}function os(e){zo.lFrame.currentDirectiveIndex=e}function Gee(e){let t=zo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Kee(){return zo.lFrame.currentQueryIndex}function ss(e){zo.lFrame.currentQueryIndex=e}function cs(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ls(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=cs(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=zo.lFrame=ds();return r.currentTNode=t,r.lView=e,!0}function us(e){let t=ds(),n=e[1];zo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ds(){let e=zo.lFrame,t=e===null?null:e.child;return t===null?fs(e):t}function fs(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 ps(){let e=zo.lFrame;return zo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ms=ps;function hs(){let e=ps();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 gs(e){return(zo.lFrame.contextLView=Fee(e,zo.lFrame.contextLView))[8]}function _s(){return zo.lFrame.selectedIndex}function vs(e){zo.lFrame.selectedIndex=e}function ys(){let e=zo.lFrame;return wo(e.tView,e.selectedIndex)}function E(){zo.lFrame.currentNamespace=`svg`}function bs(){xs()}function xs(){zo.lFrame.currentNamespace=null}function Ss(){return zo.lFrame.currentNamespace}var Cs=!0;function ws(){return Cs}function Ts(e){Cs=e}function Es(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 Xa([n||Oa,Na(e)],t||Ja(),null,i)}var Os=class e{static THROW_IF_NOT_FOUND=oa;static NULL=new Ma;static create(e,t){if(Array.isArray(e))return Es({name:``},t,e,``);{let t=e.name??``;return Es({name:t},e.parent,e.providers,t)}}static ɵprov=Oi({token:e,providedIn:`any`,factory:()=>ua(Aa)});static __NG_ELEMENT_ID__=-1},ks=new Fi(``),As=class{static __NG_ELEMENT_ID__=Ms;static __NG_ENV_ID__=e=>e},js=class extends As{_lView;constructor(e){super(),this._lView=e}get destroyed(){return vo(this._lView)}onDestroy(e){let t=this._lView;return Fo(t,e),()=>Iee(t,e)}};function Ms(){return new js(Ko())}var Ns=new Fi(``),Ps=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Xr(!1);debugTaskTracker=C(Ns,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new zr(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=Oi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Fs=class extends Jr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,co()&&(this.destroyRef=C(As,{optional:!0})??void 0,this.pendingTasks=C(Ps,{optional:!0})??void 0)}emit(e){let t=nn(null);try{super.next(e)}finally{nn(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 fr&&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 Is(...e){}function Ls(e){let t,n;function r(){e=Is;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 Rs(e){return queueMicrotask(()=>e()),()=>{e=Is}}var zs=`isAngularZone`,Bs=`isAngularZone_ID`,Vs=0,Hs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Fs(!1);onMicrotaskEmpty=new Fs(!1);onStable=new Fs(!1);onError=new Fs(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new _i(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,Ks(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(zs)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new _i(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new _i(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,Us,Is,Is);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)}},Us={};function Ws(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 Gs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ls(()=>{e.callbackScheduled=!1,qs(e),e.isCheckStableRunning=!0,Ws(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),qs(e)}function Ks(e){let t=()=>{Gs(e)},n=Vs++;e._inner=e._inner.fork({name:`angular`,properties:{[zs]:!0,[Bs]:n,[Bs+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Zs(s))return n.invokeTask(i,a,o,s);try{return Js(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ys(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Js(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Qs(s)&&t(),Ys(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,qs(e),Ws(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 qs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Js(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ys(e){e._nesting--,Ws(e)}var Xs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Fs;onMicrotaskEmpty=new Fs;onStable=new Fs;onError=new Fs;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 Zs(e){return $s(e,`__ignore_ng_zone__`)}function Qs(e){return $s(e,`__scheduler_tick__`)}function $s(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var ec=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},tc=new Fi(``,{factory:()=>{let e=C(Hs),t=C(Ya),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(ec),n.handleError(r))})}}}),nc={provide:ka,useValue:()=>{C(ec,{optional:!0})},multi:!0};function D(e,t){let[n,r,i]=Pn(e,t?.equal),a=n;return a[tn],a.set=r,a.update=i,a.asReadonly=rc.bind(a),a}function rc(){let e=this[tn];if(e.readonlyFn===void 0){let t=()=>this();t[tn]=e,e.readonlyFn=t}return e.readonlyFn}var ic=new Fi(``,{factory:()=>ac}),ac=`ng`,oc=new Fi(``),sc=new Fi(``,{providedIn:`platform`,factory:()=>`unknown`}),cc=new Fi(``,{factory:()=>C(ks).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),lc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=uc}return e})();function uc(){return new lc(Ko(),Jo())}var dc=class{},fc=new Fi(``,{factory:()=>!0}),pc=new Fi(``),mc=(()=>{class e{static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>new hc})}return e})(),hc=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}},gc=class{[tn];constructor(e){this[tn]=e}destroy(){this[tn].destroy()}};function _c(e,t){let n=t?.injector??C(Os),r=t?.manualCleanup===!0?null:n.get(As),i,a=n.get(lc,null,{optional:!0}),o=n.get(dc);return a===null?i=Sc(e,n.get(mc),o):(i=xc(a.view,o,e),r instanceof js&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new gc(i)}var vc={...Bn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=ts(!1);try{Vn(this)}finally{ts(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=nn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],nn(e)}}},yc={...vc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(vn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},bc={...vc,consumerMarkedDirty(){this.view[2]|=8192,Po(this.view),this.notifier.notify(13)},destroy(){if(vn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function xc(e,t,n){let r=Object.create(bc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=Cc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function Sc(e,t,n){let r=Object.create(yc);return r.fn=Cc(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 Cc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function wc(e){return typeof e==`function`&&e[tn]!==void 0}function Tc(e){return wc(e)&&typeof e.set==`function`}var Ec=Symbol(`InputSignalNode#UNSET`),Dc={...Rn,transformFn:void 0,applyValueToInputSignal(e,t){In(e,t)}};function Oc(e){return{toString:e}.toString()}var kc=(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})(kc||{}),Ac=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function jc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Mc=null,Nc=(()=>{Mc=Fc;let e=()=>Fc;return e.ngInherit=!0,e})();function Pc(){return Mc}function Fc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Lc),Ic}function Ic(){let e=zc(this),t=e?.current;if(t){let n=e.previous;if(n===Da)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Lc(e,t,n,r,i){let a=this.declaredInputs[r],o=zc(e)||Bc(e,{previous:Da,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Ac(l&&l.currentValue,n,c===Da),jc(e,t,i,n)}var Rc=`__ngSimpleChanges__`;function zc(e){return Object.hasOwn(e,Rc)&&e[Rc]||null}function Bc(e,t){return e[Rc]=t}var Vc=[],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,Yc(o,a)):Yc(o,a)}var Zc=-1,Qc=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 $c(e){return!!(e.flags&8)}function el(e){return!!(e.flags&16)}function tl(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function ll(e,t){let n=cl(e),r=t;for(;n>0;)r=r[14],n--;return r}var ul=!0;function dl(e){let t=ul;return ul=e,t}var fl=255,pl=5,ml=0,hl={};function gl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Vi)&&(r=n[Vi]),r??=n[Vi]=ml++;let i=r&fl,a=1<>pl)]|=a}function _l(e,t){let n=yl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,vl(r.data,e),vl(t,null),vl(r.blueprint,null));let i=bl(e,t),a=e.injectorIndex;if(ol(i)){let e=sl(i),n=ll(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 vl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function yl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function bl(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=Ll(i),r===null)return Zc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Zc}function xl(e,t,n){gl(e,t,n)}function Sl(e,t,n){if(n&8||e!==void 0)return e;Qi(t,`NodeInjector`)}function Cl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=ra(void 0);try{return i?i.get(t,r,n&8):ia(t,r,n&8)}finally{ra(a)}}return Sl(r,t,n)}function wl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Il(e,t,n,r,hl);if(i!==hl)return i}let i=Tl(e,t,n,r,hl);if(i!==hl)return i}return Cl(t,n,r,i)}function Tl(e,t,n,r,i){let a=kl(n);if(typeof a==`function`){if(!ls(t,e,r))return r&1?Sl(i,n,r):Cl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Qi(n);else return e}finally{ms()}}else if(typeof a==`number`){let i=null,o=yl(e,t),s=Zc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?bl(e,t):t[o+8],s===Zc||!jl(r,!1)?o=-1:(i=t[1],o=sl(s),t=ll(s,t)));o!==-1;){let e=t[1];if(Al(a,o,e.data)){let e=El(o,t,n,i,r,c);if(e!==hl)return e}s=t[o+8],s!==Zc&&jl(r,t[1].data[o+8]===c)&&Al(a,o,t)?(i=e,o=sl(s),t=ll(s,t)):o=-1}}return i}function El(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=Dl(s,o,n,r==null?mo(s)&&ul:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?hl:Ol(t,o,c,s,i)}function Dl(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&&go(e)&&e.type===n)return c}return null}function Ol(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Qc){let s=a;if(s.resolving)throw Zi(``);let c=dl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?ra(s.injectImpl):null;ls(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Uc(n,o[n],t)}finally{l!==null&&ra(l),dl(c),s.resolving=!1,ms()}}return a}function kl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Vi)?e[Vi]:void 0;return typeof t==`number`?t>=0?t&fl:Nl:t}function Al(e,t,n){let r=1<>pl)]&r)}function jl(e,t){return!(e&2)&&!(e&1&&t)}var Ml=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return wl(this._tNode,this._lView,e,da(n),t)}};function Nl(){return new Ml(Jo(),Ko())}function Pl(e){return Oc(()=>{let t=e.prototype.constructor,n=t[Bi]||Fl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[Bi]||Fl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Fl(e){return Di(e)?()=>{let t=Fl(Ei(e));return t&&t()}:ha(e)}function Il(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!_o(o);){let e=Tl(a,o,n,r|2,hl);if(e!==hl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,hl,r);if(t!==hl)return t}t=Ll(o),o=o[14]}a=t}return i}function Ll(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Rl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function zl(){return Bl(Jo(),Ko())}function Bl(e,t){return new Vl(Co(e,t))}var Vl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=zl}return e})();function Hl(e){return e instanceof Vl?e.nativeElement:e}function Ul(){return this._results[Symbol.iterator]()}var Wl=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Jr}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=_a(e);(this._changesDetected=!ga(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Ul};function Gl(e){return(e.flags&128)==128}var Kl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Kl||{}),ql=new Map,Jl=0;function Yl(){return Jl++}function Xl(e){ql.set(e[19],e)}function Zl(e){ql.delete(e[19])}var Ql=`__ngContext__`;function $l(e,t){uo(t)?(e[Ql]=t[19],Xl(t)):e[Ql]=t}function eu(e){return nu(e[12])}function tu(e){return nu(e[4])}function nu(e){for(;e!==null&&!fo(e);)e=e[4];return e}var ru=void 0;function iu(e){ru=e}function au(){if(ru!==void 0)return ru;if(typeof document<`u`)return document;throw new _i(210,!1)}var ou=!1,su=new Fi(``,{factory:()=>ou}),cu=new WeakMap;function lu(e,t){if(typeof e!=`object`||!e)return;let n=cu.get(e);n||(n=new WeakSet,cu.set(e,n)),n.add(t)}function uu(e){return(e.flags&32)==32}var du=()=>null;function fu(e,t,n=!1){return du(e,t,n)}function pu(e,t){let n=e.contentQueries;if(n!==null){let r=nn(null);try{for(let r=0;r|^->||--!>|)/g,Yee=`​$1​`;function Xee(e){return e.replace(qee,e=>e.replace(Jee,Yee))}function Zee(e,t){return e.createText(t)}function Qee(e,t,n){e.setValue(t,n)}function $ee(e,t){return e.createComment(Xee(t))}function Cu(e,t,n){return e.createElement(t,n)}function wu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Tu(e,t,n){e.appendChild(t,n)}function Eu(e,t,n,r,i){r===null?Tu(e,t,n):wu(e,t,n,r,i)}function Du(e,t,n,r){e.removeChild(null,t,n,r)}function ete(e,t,n){e.setAttribute(t,`style`,n)}function tte(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Ou(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&tl(e,t,r),i!==null&&tte(e,t,i),a!==null&&ete(e,t,a)}function ku(e){let t=nte();return t?t.sanitize(yo.URL,e)||``:yu(e,`URL`)?vu(e):Su(qi(e))}function nte(){let e=Ko();return e&&e[10].sanitizer}function Au(e){return e.ownerDocument.defaultView}function ju(e){return e.ownerDocument}function rte(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 Mu=`ng-template`;function ite(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(Pu(r))return!1;o=!0}}}}}return Pu(r)||o}function Pu(e){return!(e&1)}function ste(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!==``&&!Pu(o)&&(t+=Iu(a,i),i=``),r=o,a||=!Pu(r);n++}return i!==``&&(t+=Iu(a,i)),t}function pte(e){return e.map(fte).join(`,`)}function mte(e){let t=[],n=[],r=1,i=2;for(;r!1});function Bu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Vu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function _te(e){let t=Vu(e,`transition-property`),n=Vu(e,`transition-duration`),r=Vu(e,`transition-delay`),i={propertyName:``,duration:0,animationName:void 0};for(let e=0;ei.duration&&(i.propertyName=t[e],i.duration=a)}return i}function vte(e){let t=Vu(e,`animation-name`),n=Vu(e,`animation-delay`),r=Vu(e,`animation-duration`),i=Vu(e,`animation-iteration-count`),a={animationName:``,propertyName:void 0,duration:0};for(let e=0;ea.duration&&s!==`infinite`&&(a.animationName=t[e],a.duration=o)}return a}function Hu(e,t){return e!==void 0&&e.duration>t.duration}function Uu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Wu(e){let t=e.effect?.getTiming();if(t===void 0)return;let n=typeof t.duration==`number`?t.duration:0,r=(t.delay??0)+n,i=e.playbackRate;return i!==void 0&&i!==0&&i!==1&&(r/=Math.abs(i)),r}function yte(e,t){let n=getComputedStyle(e),r=vte(n),i=_te(n),a=r.duration>i.duration?r:i;Hu(t.get(e),a)||Uu(a)&&t.set(e,a)}function bte(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?yte(e,t):xte(e,t,r)}function xte(e,t,n){let r={animationName:void 0,propertyName:void 0,duration:0};for(let e of n){if(e.effect?.getTiming()?.iterations===1/0)continue;let t=Wu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Hu(t.get(e),r)||Uu(r)&&t.set(e,r)}var Gu=new Set,Ste=!1,Cte=1,Ku=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function wte(e){return e[9].get(gte,Ste)}function Tte(e,t,n){let r=Ju.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Ju.set(e,{classList:t,cleanupFns:n})}function qu(e){let t=Ju.get(e);if(t){for(let e of t.cleanupFns)e();Ju.delete(e)}Yu.delete(e)}var Ju=new WeakMap,Yu=new WeakMap,Xu=new WeakMap;function Zu(e){return e?e[14]??e:null}var Qu=new WeakSet;function Ete(e,t,n){let r=Xu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Zu(n);for(let e=r.length-1;e>=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),Qu.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 Dte(e,t,n){let r=Zu(n),i=Xu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Xu.set(e,[{el:t,declarationView:r}])}function $u(e){let t=e[26]??={};return t.enter??=new Map}function Ote(e){let t=typeof e==`function`?e():e,n=Array.isArray(t)?t:null;return typeof t==`string`&&(n=t.trim().split(/\s+/).filter(e=>e)),n}function ed(e){return e.composedPath?e.composedPath()[0]:e.target}function td(e,t){let n=Yu.get(t);if(n===void 0)return!0;if(t!==ed(e))return!1;let r=e.animation;if(r){let e=Wu(r);if(e!==void 0&&e+Cte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),sd=[0,1,2,3],cd=(()=>{class e{ngZone=C(Hs);scheduler=C(dc);errorHandler=C(ec,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){C(rd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Hc(kc.AfterRenderHooksStart),this.executing=!0;for(let e of sd)for(let t of this.sequences)if(!t.erroredOrDestroyed&&t.hooks[e])try{t.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let n=t.hooks[e];return n(t.pipelinedValue)},t.snapshot))}catch(e){t.erroredOrDestroyed=!0,this.errorHandler?.handleError(e)}this.executing=!1;for(let e of this.sequences)e.afterRun(),e.once&&(this.sequences.delete(e),e.destroy());for(let e of this.deferredRegistrations)this.sequences.add(e);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Hc(kc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),Po(t),t[2]|=8192)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,t){return t?t.run(nd.AFTER_NEXT_RENDER,e):e()}static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ld=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,a=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[25];e&&(this.view[25]=e.filter(e=>e!==this))}};function ud(e,t){let n=t?.injector??C(Os);return ad(`NgAfterNextRender`),jte(e,n,t,!0)}function Ate(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function jte(e,t,n,r){let i=t.get(od);i.impl??=t.get(cd);let a=t.get(rd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(As),s=t.get(lc,null,{optional:!0}),c=new ld(i.impl,Ate(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var dd=new Fi(``,{factory:()=>{let e=C(Ya),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function fd(e,t,n){let r=e.get(dd);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 Mte(e,t){let n=e.get(dd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Nte(e,t){let n=e.get(dd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Pte(e){let t=e.get(dd);t.isScheduled||=(ud(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Fte(e){let t=e.get(dd);t.scheduler=Pte,t.scheduler(e)}function pd(e,t){for(let[n,r]of t)fd(e,r.animateFns)}function md(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&pd(r,i)}function hd(e,t,n,r){try{n.get(Aa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Mte(n,i.enter.get(t.index).animateFns);let a=gd(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];vd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Gu.add(e[19]),fd(n,()=>_d(e,t,i||void 0,a,r),i||void 0)}function gd(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 _d(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&&vd(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),bd(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Gu.delete(e[19]),i(!0)})}else e&&Gu.delete(e[19]),i(!1)}function vd(e,t,n){if(t.type&12){let r=e[t.index];if(fo(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Gu.delete(e[19])),n(!0)})}function xd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;fo(i)?c=i:uo(i)&&(l=!0,i=i[0]);let u=xo(i);e===0&&r!==null?(md(s,r,a,n),o==null?Tu(t,r,u):wu(t,r,u,o||null,!0)):e===1&&r!==null?(md(s,r,a,n),wu(t,r,u,o||null,!0),Ete(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Dte(a,u,s),Qu.delete(u),hd(s,a,n,e=>{if(Qu.has(u)){Qu.delete(u);return}Du(t,u,l,e)})):e===3&&(Qu.delete(u),hd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Gd(t,e,n,c,a,r,o)}}function Sd(e,t){wd(e,t),t[0]=null,t[5]=null}function Cd(e,t,n,r,i,a){r[0]=i,r[5]=t,Vd(e,r,n,1,i,a)}function wd(e,t){t[10].changeDetectionScheduler?.notify(9),Vd(e,t,t[11],2,null,null)}function Td(e){let t=e[12];if(!t)return Od(e[1],e);for(;t;){let n=null;if(uo(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)uo(t)&&Od(t[1],t),t=t[3];t===null&&(t=e),uo(t)&&Od(t[1],t),n=t&&t[4]}t=n}}function Ed(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Dd(e,t){if(vo(t))return;let n=t[11];n.destroyNode&&Vd(e,t,n,3,null,null),Td(t)}function Od(e,t){if(vo(t))return;let n=nn(null);try{t[2]&=-129,t[2]|=256,t[24]&&vn(t[24]),Ad(e,t),kd(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&fo(t[3])){n!==t[3]&&Ed(n,t);let r=t[18];r!==null&&r.detachView(e)}Zl(t)}finally{nn(n)}}function kd(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&&tf(e,t,27,!1),Hc(o?kc.TemplateUpdateStart:kc.TemplateCreateStart,i,n),n(r,i)}finally{vs(a),Hc(o?kc.TemplateUpdateEnd:kc.TemplateCreateEnd,i,n)}}function of(e,t,n){pf(e,t,n),(n.flags&64)==64&&mf(e,t,n)}function sf(e,t,n=Co){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a=s&&i<=c){let o=t.data[i],s=r[e+1];rf(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(rf(r,n[o],i,a),l=!0),l}function Tf(e,t){let n=Do(t,e),r=n[1];Ef(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=fu(i,n[9])),Hc(kc.ComponentStart);try{Df(r,n,n[8])}finally{Hc(kc.ComponentEnd,n[8])}}function Ef(e,t){for(let n=t.length;n{Po(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function zf(e){let t=e[24]??Object.create(Bf);return t.lView=e,t}var Bf={...an,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Io(e.lView);for(;t&&!Vf(t[1]);)t=Io(t);t&&jo(t)},consumerOnSignalRead(){this.lView[24]=this}};function Vf(e){return e.type!==2}function Hf(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 Uf=100;function Wf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Gf(e,t)}finally{n.end?.()}}function Gf(e,t){let n=es();try{ts(!0),Zf(e,t);let n=0;for(;Mo(e);){if(n===Uf)throw new _i(103,!1);n++,Zf(e,1)}}finally{ts(n)}}function Kf(e,t,n,r){if(vo(t))return;let i=t[2];us(t);let a=!0,o=null,s=null;Vf(e)?(s=Ff(t),o=pn(s)):rn()===null?(a=!1,s=zf(t),o=pn(s)):t[24]&&=(vn(t[24]),null);try{Ao(t),Vee(e.bindingStartIndex),n!==null&&af(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Gc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Kc(t,n,0,null),qc(t,0)}if(Jf(t),Hf(t),qf(t,0),e.contentQueries!==null&&pu(e,t),a){let n=e.contentCheckHooks;n!==null&&Gc(t,n)}else{let n=e.contentHooks;n!==null&&Kc(t,n,1),qc(t,1)}$f(e,t);let o=e.components;o!==null&&Qf(t,o,0);let s=e.viewQuery;if(s!==null&&mu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Gc(t,n)}else{let n=e.viewHooks;n!==null&&Kc(t,n,2),qc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Nf(t),t[2]&=-73}catch(e){throw Po(t),e}finally{s!==null&&(hn(s,o),a&&Lf(s)),hs()}}function qf(e,t){for(let n=eu(e);n!==null;n=tu(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ba(e,10+t);Sd(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 op(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(ap(e,n),ba(t,n))}this._attachedToViewContainer=!1}Dd(this._lView[1],this._lView)}onDestroy(e){Fo(this._lView,e)}markForCheck(){ep(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){No(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Wf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new _i(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=_o(this._lView),t=this._lView[16];t!==null&&!e&&Ed(t,this._lView),wd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new _i(902,!1);this._appRef=e;let t=_o(this._lView),n=this._lView[16];n!==null&&!t&&sp(n,this._lView),No(this._lView)}},lp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=up;constructor(e,t,n){this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){return new cp(kf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function up(){return dp(Jo(),Ko())}function dp(e,t){return e.type&4?new lp(t,e,Bl(e,t)):null}function fp(e,t,n,r,i){let a=e.data[t];if(a===null)a=pp(e,t,n,r,i),Hee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Bee();a.injectorIndex=e===null?-1:e.injectorIndex}return Xo(a,!0),a}function pp(e,t,n,r,i){let a=Yo(),o=Zo(),s=o?a:a&&a.parent,c=e.data[t]=hp(e,s,n,t,r,i);return mp(e,c,a,o),c}function mp(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 hp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Uo()&&(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:Ss(),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 gp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?_p(e,n):r.push(e);e[6]=r}function _p(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,yp=()=>null;function bp(e,t){return vp(e,t)}function xp(e,t,n){return yp(e,t,n)}var Sp=class{},Cp=class{},wp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>Tp()};function Tp(){let e=Ko(),t=Do(Jo().index,e);return(uo(t)?t:e)[11]}var Ep=(()=>{class e{static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>null})}return e})();function Dp(e){return e.debugInfo?.className||e.type.name||null}var Op={},kp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Op,n);return r!==Op||t===Op?r:this.parentInjector.get(e,t,n)}};function Ap(e,t,n){return e[t]=n}function jp(e,t){return e[t]}function Mp(e,t,n){if(n===Lu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Np(e,t,n,r){let i=Mp(e,t,n);return Mp(e,t+1,r)||i}function Pp(e,t,n,r,i){let a=Np(e,t,n,r);return Mp(e,t+2,i)||a}function Fp(e,t,n,r,i,a){let o=Np(e,t,n,r);return Np(e,t+2,i,a)||o}function Ip(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&lu(i,a),ep(mo(e)?Do(e.index,t):t,5);let o=t[8],s=Lp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=Lp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function Lp(e,t,n,r){let i=nn(null);try{return Hc(kc.OutputStart,t,n),n(r)!==!1}catch(t){return Sf(e,t),!1}finally{Hc(kc.OutputEnd,t,n),nn(i)}}function Rp(e,t,n,r,i,a,o,s){let c=ho(e),l=!1,u=null;if(!r&&c&&(u=Bp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=Co(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);zp(a)||Vp(r?t=>r(xo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function zp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Bp(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 Vp(e,t,n,r,i,a,o){let s=t.firstCreatePass?Ro(t):null,c=Lo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Hp(e,t,n,r,i){let a=null,o=null,s=null,c=!1,l=e.directiveToIndex.get(n.type);if(typeof l==`number`?a=l:[a,o,s]=l,o!==null&&s!==null&&e.hostDirectiveOutputs&&Object.hasOwn(e.hostDirectiveOutputs,r)){let n=e.hostDirectiveOutputs[r];for(let a=0;a=o&&l<=s)c=!0,Up(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Up(e,t,a,r,r,i)),c}function Up(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Vp(e.index,s,t,i,a,c,!0)}function Wp(){Gp()}function Gp(){let e=Ko(),t=qo(),n=Jo();if(t.firstCreatePass&&Zp(t,n),n.controlDirectiveIndex===-1)return;ad(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Jp(e,t,n))}function Kp(){qp()}function qp(){let e=Ko(),t=qo(),n=ys();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Jp(e,t,n))}var Jp=class{lView;tView;tNode;hasPassThrough;constructor(e,t,n){this.lView=e,this.tView=t,this.tNode=n,this.hasPassThrough=!!(n.flags&4096)}get customControl(){return this.tNode.customControlIndex===-1?void 0:this.lView[this.tNode.customControlIndex]}get nativeElement(){return Co(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];Hp(this.tNode,this.lView,n,e,Ip(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];Hp(this.tNode,this.lView,n,t,Ip(this.tNode,this.lView,e))}listenToDom(e,t){Rp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,Ip(this.tNode,this.lView,t))}setInputOnDirectives(e,t,n){let r=this.tNode.inputs?.[e],i=this.tNode.hostDirectiveInputs?.[e];if(!r&&!i)return!1;let a=!1;if(r)for(let i of r){if(i===this.tNode.controlDirectiveIndex)continue;let r=this.lView[i],o=this.tView.data[i];(!n||n(Xp(r,o,e)))&&(rf(o,r,e,t),a=!0)}if(i)for(let r=0;r0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=Yp(e.directive);r!==null&&n.push(...r);continue}for(let r of e()){if(typeof r==`function`)continue;if(r.inputs)for(let e=0;e1){t.flags|=4096;return}Qp(e,t)}function Qp(e,t){for(let n=t.directiveStart;n{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function $p(e,t){return em(e,t)&&tm(e,t+`Change`)}function em(e,t){return t in e.inputs}function tm(e,t){return t in e.outputs}var nm=Symbol(`BINDING`),rm=new Fi(``);function im(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 vm(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&nf.SignalBased)!==0};return i&&(a.transform=i),a})}function Em(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Dm(e,t,n){let r=t instanceof Ya?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new kp(n,r):n}function Om(e){let t=e.get(Cp,null);if(t===null)throw new _i(407,!1);return{rendererFactory:t,sanitizer:e.get(Ep,null),changeDetectionScheduler:e.get(dc,null),ngReflect:!1,tracingService:e.get(rd,null,{optional:!0})}}function km(e,t,n){let r=jm(e);return Cu(t,r,r===`svg`?`svg`:r===`math`?bo:n)}function Am(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new _i(905,!1)}function jm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Mm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Tm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Em(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=pte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Hc(kc.DynamicComponentStart);let s=nn(null);try{let s=this.componentDef,c=Dm(s,r||this.ngModule,e),l=Om(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Dp(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{nn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Nm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?cf(l,r,s.encapsulation,t):km(s,l,o??null);Am(u);let d=t.get(rm,null),f=Pm(u,()=>t.get(ks,null)??au());d&&d.addHost(f);let p=a?.some(Im)||i?.some(e=>typeof e!=`function`&&e.bindings.some(Im)),m=Xd(null,c,null,512|Qd(s),null,null,e,l,t,null,fu(u,t,!0));d&&Cm&&f instanceof ShadowRoot&&Fo(m,()=>{d.removeHost(f)}),m[27]=u,us(m);let h=null;try{let e=bm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Ou(l,u,e),$l(u,m),of(c,m,e),hu(c,e,m),xm(c,e),n!==void 0&&Rm(e,this.ngContentSelectors,n),h=Do(e.index,m),m[8]=h[8],Df(c,m,null)}catch(e){throw h!==null&&Zl(h),Zl(m),e}finally{Hc(kc.DynamicComponentEnd),hs()}return new Lm(this.componentType,m,!!p)}};function Nm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:mte(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[nm].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 Im(e){let t=e[nm].kind;return t===`input`||t===`twoWay`}var Lm=class extends Sp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=wo(t[1],27),this.location=Bl(this._tNode,t),this.instance=Do(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new cp(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),ep(Do(n.index,r),1)}get injector(){return new Ml(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__=Bm}return e})();function Bm(){return Wm(Jo(),Ko())}var Vm=class e extends zm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Bl(this._hostTNode,this._hostLView)}get injector(){return new Ml(this._hostTNode,this._hostLView)}get parentInjector(){let e=bl(this._hostTNode,this._hostLView);if(ol(e)){let t=ll(e,this._hostLView),n=sl(e),r=t[1].data[n+8];return new Ml(r,t)}return new Ml(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Hm(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=bp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,Af(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 Mm(Ui(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ya,null);e&&(i=e)}let d=Ui(l.componentType??{}),f=bp(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,Af(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(Pee(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 rp(o,i,a,r),t.attachToViewContainerRef(),ya(Um(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Hm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=ap(this._lContainer,t);n&&(ba(Um(this._lContainer),t),Dd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=ap(this._lContainer,t);return n&&ba(Um(this._lContainer),t)!=null?new cp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Hm(e){return e[8]}function Um(e){return e[8]||=[]}function Wm(e,t){let n,r=t[e.index];return fo(r)?n=r:(n=tp(r,t,null,e),t[e.index]=n,ef(t,n)),Km(n,t,e,r),new Vm(n,e,t)}function Gm(e,t){let n=e[11],r=n.createComment(``),i=Co(t,e);return wu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Km=Ym,qm=()=>!1;function Jm(e,t,n){return qm(e,t,n)}function Ym(e,t,n,r){if(e[7])return;let i;i=n.type&8?xo(r):Gm(t,n),e[7]=i}var Xm=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Zm=class e{queries;constructor(e=[]){this.queries=e}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries===null?n.length:t.contentQueries[0],i=[];for(let e=0;e0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;ee.trim())}function dh(e,t,n){e.queries===null&&(e.queries=new $m),e.queries.track(new eh(t,n))}function fh(e,t){return e.queries.getByIndex(t)}function ph(e,t){let n=e[1],r=fh(n,t);return r.crossesNgTemplate?oh(n,e,t,[]):ah(n,e,r,t)}function mh(e,t,n){let r,i=wn(()=>{r._dirtyCounter();let n=vh(r,e);if(t&&n===void 0)throw new _i(-951,!1);return n});return r=i[tn],r._dirtyCounter=D(0),r._flatValue=void 0,i}function hh(e){return mh(!0,!1,e)}function gh(e){return mh(!0,!0,e)}function _h(e,t){let n=e[tn];n._lView=Ko(),n._queryIndex=t,n._queryList=sh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function vh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:Oa;let i=sh(n,r),a=ph(n,r);return i.reset(a,Hl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function yh(e){return!!e&&typeof e.then==`function`}function bh(e){return!!e&&typeof e.subscribe==`function`}var xh=class{},Sh=class extends xh{injector;instance=null;constructor(e){super();let t=new Xa([...e.providers,{provide:xh,useValue:this}],e.parent||Ja(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Ch(e,t,n=null){return new Sh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var wh=(()=>{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=Pa(!1,e.type),n=t.length>0?Ch([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=Oi({token:e,providedIn:`environment`,factory:()=>new e(ua(Ya))})}return e})();function k(e){return Oc(()=>{let t=Ah(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Kl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(wh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||gu.Emulated,styles:e.styles||Oa,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&ad(`NgStandalone`),jh(n);let r=e.dependencies;return n.directiveDefs=Mh(r,Th),n.pipeDefs=Mh(r,Gi),n.id=Nh(n),n})}function Th(e){return Ui(e)||Wi(e)}function Eh(e,t){if(e==null)return Da;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=nf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Dh(e){if(e==null)return Da;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Oh(e){return Oc(()=>{let t=Ah(e);return jh(t),t})}function kh(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 Ah(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||Da,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Oa,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Eh(e.inputs,t),outputs:Dh(e.outputs),debugInfo:null}}function jh(e){e.features?.forEach(t=>t(e))}function Mh(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 Nh(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 Ph=new Fi(``),Fh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=C(Ph,{optional:!0})??[];injector=C(Os);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=so(this.injector,t);if(yh(n))e.push(n);else if(bh(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=Rl({token:e,factory:e.ɵfac})}return e})();function Ih(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function Lh(e){return Object.getPrototypeOf(e.prototype).constructor}function Rh(e){let t=Lh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Li)?t[Li]:void 0,o=Object.hasOwn(t,Ri)?t[Ri]:void 0;if(go(e))i=a??o;else{if(a)throw new _i(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Vh(e.inputs),t.declaredInputs=Vh(e.declaredInputs),t.outputs=Vh(e.outputs);let n=i.hostBindings;n&&Wh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&Hh(e,a),o&&Uh(e,o),zh(e,i),xi(e.outputs,i.outputs),go(i)&&i.data.animation){let t=e.data;t.animation=(t.animation||[]).concat(i.data.animation)}}let t=i.features;if(t)for(let r=0;r=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=il(i.hostAttrs,n=il(n,i.hostAttrs))}}function Vh(e){return e===Da?{}:e===Oa?[]:e}function Hh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Uh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Wh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function Gh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=il(e.mergedAttrs,e.attrs);let t=e.tView=qd(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),Xo(e,!1);let c=Yh(n,t,e,r);ws()&&Id(n,t,c,e),$l(c,t);let l=tp(c,t,c,e);t[r+27]=l,ef(t,l),Jm(l,e,t)}function Kh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=fp(t,d,4,o||null,s||null),Ho()&&om(t,e,f,ko(t.consts,l),gf),Wc(t,f)):f=t.data[d],Gh(f,e,t,n,r,i,a,c),ho(f)&&of(t,e,f),l!=null&&sf(e,f,u),f}function qh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=fp(t,d,4,o||null,s||null),l!=null){let e=ko(t.consts,l);f.localNames=[];for(let t=0;t{throw new _i(600,``)})}var eg=10,tg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=C(tc);afterRenderManager=C(od);zonelessEnabled=C(fc);rootEffectScheduler=C(mc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Jr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=C(Ps);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(hi(e=>!e))}constructor(){C(rd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=C(Ya);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Os.NULL){return this._injector.get(Hs).run(()=>{if(Hc(kc.BootstrapComponentStart),!this._injector.get(Fh).done)throw new _i(405,``);let r=Ui(e),i=this._injector.get(xh),a=new Mm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=ng(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Zh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),rg(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Hc(kc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Hc(kc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(nd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Hc(kc.ChangeDetectionEnd),new _i(101,!1);let e=nn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,nn(e),this.afterTick.next(),Hc(kc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Cp,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Mo(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;rg(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(Qh,[]).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),()=>rg(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new _i(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=Rl({token:e,factory:e.ɵfac})}return e})();function ng(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function rg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function A(e,t,n,r){let i=Ko();return Mp(i,is(),t)&&(qo(),_f(ys(),i,e,t,n,r)),A}function ig(e){if(ad(`NgAnimateEnter`),!Ku)return ig;let t=Ko();if(wte(t))return ig;let n=Jo(),r=t[9].get(Hs);return kte($u(t),n,()=>ag(t,n,e,r)),Fte(t[9]),pd(t[9],$u(t)),ig}function ag(e,t,n,r){let i=Co(t,e),a=e[11],o=Ote(n),s=[],c=!1,l=e=>{if(ed(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{ed(e)===i&&(td(e,i)&&(c=!0),og(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),Tte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(bte(i,Yu,Ku),!Yu.has(i))){for(let e of o)a.removeClass(i,e);qu(i)}})})}}function og(e,t,n){let r=Ju.get(t);if(ed(e)===t&&r&&td(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);qu(t)}}var sg=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 cg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function lg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){nn(r);let c=t.length-1;for(nn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=cg(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=cg(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 pg,a??=fg(e,o,s,n),ug(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;)dg(e,i,n,o,t[o]),o++}else if(t!=null){nn(r);let c=t[Symbol.iterator]();nn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=cg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new pg,a??=fg(e,o,s,n);let u=n(o,r);if(ug(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;)dg(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 ug(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function dg(e,t,n,r,i){if(ug(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function fg(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 pg=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 j(e,t,n,r,i,a,o,s){ad(`NgControlFlow`);let c=Ko(),l=qo();return qh(c,l,e,t,n,r,i,ko(l.consts,a),256,o,s),mg}function mg(e,t,n,r,i,a,o,s){ad(`NgControlFlow`);let c=Ko(),l=qo();return qh(c,l,e,t,n,r,i,ko(l.consts,a),512,o,s),mg}function M(e,t){ad(`NgControlFlow`);let n=Ko(),r=is(),i=n[r]===Lu?-1:n[r],a=i===-1?void 0:bg(n,27+i);if(Mp(n,r,e)){let r=nn(null);try{if(a!==void 0&&ip(a,0),e!==-1){let r=27+e,i=bg(n,r),a=Tg(n[1],r),o=xp(i,a,n);rp(i,kf(n,a,t,{dehydratedView:o}),0,Af(a,o))}}finally{nn(r)}}else if(a!==void 0){let e=np(a,0);e!==void 0&&(e[8]=t)}}var hg=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 gg(e){return e}function _g(e,t){return t}var vg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function N(e,t,n,r,i,a,o,s,c,l,u,d,f){ad(`NgControlFlow`);let p=Ko(),m=qo(),h=c!==void 0,g=Ko(),_=new vg(h,s?o.bind(g[15][8]):o);g[27+e]=_,qh(p,m,e+1,t,n,r,i,ko(m.consts,a),256),h&&qh(p,m,e+2,c,l,u,d,ko(m.consts,f),512)}var yg=class extends sg{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,rp(this.lContainer,t,e,Af(this.templateTNode,n)),xg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Sg(this.lContainer,e),Cg(this.lContainer,e)}create(e,t){let n=bp(this.lContainer,this.templateTNode.tView.ssrId);return kf(this.hostLView,this.templateTNode,new hg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Dd(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];Nte(e,r),Gu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Sg(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 Cg(e,t){return ap(e,t)}function wg(e,t){return np(e,t)}function Tg(e,t){return wo(e,t)}function F(e,t,n){let r=Ko();return Mp(r,is(),t)&&(qo(),uf(ys(),r,e,t,r[11],n)),F}function Eg(e,t,n,r,i){Cf(t,e,n,i?`class`:`style`,r)}function I(e,t,n,r){let i=Ko(),a=i[1],o=e+27,s=a.firstCreatePass?bm(o,i,2,t,gf,Ho(),n,r):a.data[o];if(mo(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Dp(o),()=>(Dg(e,t,i,s,r),I))}}return Dg(e,t,i,s,r),I}function Dg(e,t,n,r,i){if(bf(r,n,e,t,kg),ho(r)){let e=n[1];of(e,n,r),hu(e,r,n)}i!=null&&sf(n,r)}function L(){let e=qo(),t=xf(Jo());return e.firstCreatePass&&xm(e,t),Wo(t)&&Go(),Vo(),t.classesWithoutHost!=null&&$c(t)&&Eg(e,t,Ko(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&el(t)&&Eg(e,t,Ko(),t.stylesWithoutHost,!1),L}function R(e,t,n,r){return I(e,t,n,r),L(),R}function z(e,t,n,r){let i=Ko(),a=i[1],o=e+27,s=a.firstCreatePass?Sm(o,a,2,t,n,r):a.data[o];return bf(s,i,e,t,kg),r!=null&&sf(i,s),z}function B(){return Wo(xf(Jo()))&&Go(),Vo(),B}function Og(e,t,n,r){return z(e,t,n,r),B(),Og}var kg=(e,t,n,r,i)=>(Ts(!0),Cu(t[11],r,Ss()));function Ag(e,t,n){let r=Ko(),i=r[1],a=e+27,o=i.firstCreatePass?bm(a,r,8,`ng-container`,gf,Ho(),t,n):i.data[a];if(bf(o,r,e,`ng-container`,Ng),ho(o)){let e=r[1];of(e,r,o),hu(e,o,r)}return n!=null&&sf(r,o),Ag}function jg(){let e=qo(),t=xf(Jo());return e.firstCreatePass&&xm(e,t),jg}function Mg(e,t,n){return Ag(e,t,n),jg(),Mg}var Ng=(e,t,n,r,i)=>(Ts(!0),$ee(t[11],``));function V(){return Ko()}function Pg(e,t,n){let r=Ko();return Mp(r,is(),t)&&(qo(),df(ys(),r,e,t,r[11],n)),Pg}var Fg=void 0;function Ig(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Lg=[`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`]],Fg,[[`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`]],Fg,[[`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}`,Fg,Fg,Fg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Ig],Rg=Object.create(null);function zg(e){let t=Hg(e),n=Bg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Bg(r),n)return n;if(r===`en`)return Lg;throw new _i(701,!1)}function Bg(e){if(!(e in Rg)){let t=aa.ng&&aa.ng.common&&aa.ng.common.locales&&aa.ng.common.locales[e];return t!==void 0&&(Rg[e]=t),t}return Rg[e]}var Vg={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 Hg(e){return e.toLowerCase().replace(/_/g,`-`)}var Ug=`en-US`;function Wg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Ko(),i=qo(),a=Jo();return Gg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Ko(),i=qo(),a=Jo();return(a.type&3||n)&&Rp(a,i,r,n,r[11],e,t,Ip(a,r,t)),U}function Gg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Ip(r,t,a),Rp(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 t_(e){return(e&2)==2}function n_(e,t){return e&131071|t<<17}function r_(e){return e|2}function i_(e){return(e&131068)>>2}function a_(e,t){return e&-131069|t<<2}function o_(e){return(e&1)==1}function s_(e){return e|1}function c_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=e_(o),c=i_(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=e_(e[s+1]);e[r+1]=$g(t,s),t!==0&&(e[t+1]=a_(e[t+1],r)),e[s+1]=n_(e[s+1],r)}else e[r+1]=$g(s,0),s!==0&&(e[s+1]=a_(e[s+1],r)),s=r}else e[r+1]=$g(c,0),s===0?s=r:e[c+1]=a_(e[c+1],r),c=r;l&&(e[r+1]=r_(e[r+1])),u_(e,u,r,!0),u_(e,u,r,!1),l_(t,u,e,r,a),o=$g(s,c),a?t.classBindings=o:t.styleBindings=o}function l_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&Ta(a,t)>=0&&(n[r+1]=s_(n[r+1]))}function u_(e,t,n,r){let i=e[n+1],a=t===null,o=r?e_(i):i_(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];d_(n,t)&&(s=!0,e[o+1]=r?s_(i):r_(i)),o=r?e_(i):i_(i)}s&&(e[n+1]=r?r_(i):s_(i))}function d_(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 f_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function p_(e){return e.substring(f_.key,f_.keyEnd)}function m_(e){return g_(e),h_(e,__(e,0,f_.textEnd))}function h_(e,t){let n=f_.textEnd;return n===t?-1:(t=f_.keyEnd=v_(e,f_.key=t,n),__(e,t,n))}function g_(e){f_.key=0,f_.keyEnd=0,f_.value=0,f_.valueEnd=0,f_.textEnd=e.length}function __(e,t,n){for(;t32;)t++;return t}function y_(e,t,n){return S_(e,t,n,!1),y_}function G(e,t){return S_(e,t,null,!0),G}function b_(e){C_(N_,x_,e,!0)}function x_(e,t){for(let n=m_(t);n>=0;n=h_(t,n))Ca(e,p_(t),!0)}function S_(e,t,n,r){let i=Ko(),a=qo(),o=as(2);if(a.firstUpdatePass&&T_(a,e,o,r),t!==Lu&&Mp(i,o,t)){let s=a.data[_s()];P_(a,s,i,i[11],e,i[o+1]=Lte(t,n),r,o)}}function C_(e,t,n,r){let i=qo(),a=as(2);i.firstUpdatePass&&T_(i,null,a,r);let o=Ko();if(n!==Lu&&Mp(o,a,n)){let s=i.data[_s()];if(L_(s,r)&&!w_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=Ci(e,n||``)),Eg(i,s,o,n,r)}else Ite(i,s,o,o[11],o[a+1],o[a+1]=M_(e,t,n),r,a)}}function w_(e,t){return t>=e.expandoStartIndex}function T_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[_s()],o=w_(e,n);L_(a,r)&&t===null&&!o&&(t=!1),t=E_(i,a,t,r),c_(i,a,t,n,o,r)}}function E_(e,t,n,r){let i=Gee(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=A_(null,e,t,n,r),n=j_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=A_(i,e,t,n,r),a===null){let n=D_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=A_(null,e,t,n[1],r),n=j_(n,t.attrs,r),O_(e,t,r,n))}else a=k_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function D_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(i_(r)!==0)return e[e_(r)]}function O_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[e_(i)]=r}function k_(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===Lu&&(u=l?Oa:void 0);let d=l?wa(u,r):c===r?u:void 0;if(a&&!I_(d)&&(d=wa(t,r)),I_(d)&&(s=d,o))return s;let f=e[i+1];i=o?e_(f):i_(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=wa(e,r))}return s}function I_(e){return e!==void 0}function Lte(e,t){return e==null||e===``||(typeof t==`string`?e=vu(e)+t:typeof e==`object`&&(e=Si(vu(e)))),e}function L_(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Ko(),r=qo(),i=e+27,a=r.firstCreatePass?fp(r,i,1,t,null):r.data[i],o=Rte(r,n,a,t);n[i]=o,ws()&&Id(r,n,o,a),Xo(a,!1)}var Rte=(e,t,n,r)=>(Ts(!0),Zee(t[11],r));function R_(e,t,n,r=``){return Mp(e,is(),n)?t+qi(n)+r:Lu}function zte(e,t,n,r,i,a=``){let o=Np(e,rs(),n,i);return as(2),o?t+qi(n)+r+qi(i)+a:Lu}function Bte(e,t,n,r,i,a,o,s=``){let c=Pp(e,rs(),n,i,o);return as(3),c?t+qi(n)+r+qi(i)+a+qi(o)+s:Lu}function Vte(e,t,n,r,i,a,o,s,c,l=``){let u=Fp(e,rs(),n,i,o,c);return as(4),u?t+qi(n)+r+qi(i)+a+qi(o)+s+qi(c)+l:Lu}function q(e){return J(``,e),q}function J(e,t,n){let r=Ko(),i=R_(r,e,t,n);return i!==Lu&&V_(r,_s(),i),J}function Y(e,t,n,r,i){let a=Ko(),o=zte(a,e,t,n,r,i);return o!==Lu&&V_(a,_s(),o),Y}function z_(e,t,n,r,i,a,o){let s=Ko(),c=Bte(s,e,t,n,r,i,a,o);return c!==Lu&&V_(s,_s(),c),z_}function B_(e,t,n,r,i,a,o,s,c){let l=Ko(),u=Vte(l,e,t,n,r,i,a,o,s,c);return u!==Lu&&V_(l,_s(),u),B_}function V_(e,t,n){let r=So(t,e);Qee(e[11],r,n)}function H_(e,t,n){Tc(t)&&(t=t());let r=Ko();return Mp(r,is(),t)&&(qo(),uf(ys(),r,e,t,r[11],n)),H_}function U_(e,t){let n=Tc(e);return n&&e.set(t),n}function W_(e,t){let n=Ko(),r=qo(),i=Jo();return Gg(r,n,n[11],i,e,t),W_}var G_={};function K_(e){ad(`NgLet`);let t=qo(),n=Ko(),r=e+27;return Xo(fp(t,r,128,null,null),!1),Eo(t,n,r,G_),K_}function q_(e){return Eo(qo(),Ko(),_s(),e),e}function J_(e){let t=To($o(),27+e);if(t===G_)throw new _i(314,!1);return t}function Y_(e,t,n=``){return R_(Ko(),e,t,n)}function X_(e,t,n){let r=qo();r.firstCreatePass&&Z_(t,r.data,r.blueprint,go(e),n)}function Z_(e,t,n,r,i){if(e=Ei(e),Array.isArray(e))for(let a=0;a>20;if(Ha(e)||!e.multi){let r=new Qc(l,i,am,null),p=ev(c,t,i?u:u+f,d);p===-1?(xl(_l(s,o),a,c),Q_(a,e,t.length),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{let p=ev(c,t,u+f,d),m=ev(c,t,u,u+f),h=p>=0&&n[p],g=m>=0&&n[m];if(i&&!g||!i&&!h){xl(_l(s,o),a,c);let u=Wte(i?Ute:Hte,n.length,i,r,l,e);!i&&g&&(n[m].providerFactory=u),Q_(a,e,t.length,0),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(u),o.push(u)}else{let t=$_(n[i?m:p],l,!i&&r);Q_(a,e,p>-1?p:m,t)}!i&&r&&g&&n[m].componentProviders++}}}function Q_(e,t,n,r){let i=Ha(t),a=Ua(t);if(i||a){let o=(a?Ei(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||=[];if(!i&&t.multi){let e=a.indexOf(n);e===-1?a.push(n,[r,o]):a[e+1].push(r,o)}else a.push(n,o)}}}function $_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function ev(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>X_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>X_(e,n?n(t):t,!0))}}function rv(e,t){let n=ns()+e,r=Ko();return r[n]===Lu?Ap(r,n,t()):jp(r,n)}function iv(e,t,n){return sv(Ko(),ns(),e,t,n)}function av(e,t,n,r){return cv(Ko(),ns(),e,t,n,r)}function Gte(e,t,n,r,i,a,o){return Kte(Ko(),ns(),e,t,n,r,i,a)}function ov(e,t){let n=e[t];return n===Lu?void 0:n}function sv(e,t,n,r,i,a){let o=t+n;return Mp(e,o,i)?Ap(e,o+1,a?r.call(a,i):r(i)):ov(e,o+1)}function cv(e,t,n,r,i,a,o){let s=t+n;return Np(e,s,i,a)?Ap(e,s+2,o?r.call(o,i,a):r(i,a)):ov(e,s+2)}function Kte(e,t,n,r,i,a,o,s,c){let l=t+n;return Fp(e,l,i,a,o,s)?Ap(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):ov(e,l+4)}function lv(e,t){let n=qo(),r,i=e+27;n.firstCreatePass?(r=qte(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=ha(r.type,!0)),o=ra(am);try{let e=dl(!1),t=a();return dl(e),Eo(n,Ko(),i,t),t}finally{ra(o)}}function qte(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function uv(e,t,n){let r=e+27,i=Ko(),a=To(i,r);return fv(i,r)?sv(i,ns(),t,a.transform,n,a):a.transform(n)}function dv(e,t,n,r){let i=e+27,a=Ko(),o=To(a,i);return fv(a,i)?cv(a,ns(),t,o.transform,n,r,o):o.transform(n,r)}function fv(e,t){return e[1].data[t].pure}function pv(e,t){return dp(e,t)}var Jte=(()=>{class e{applicationErrorHandler=C(tc);appRef=C(tg);taskService=C(Ps);ngZone=C(Hs);zonelessEnabled=C(fc);tracing=C(rd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new fr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Bs):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(C(pc,{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?Rs:Ls;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=Rl({token:e,factory:e.ɵfac})}return e})();function Yte(){return[{provide:dc,useExisting:Jte},{provide:Hs,useClass:Xs},{provide:fc,useValue:!0}]}function Xte(){return typeof $localize<`u`&&$localize.locale||`en-US`}var mv=new Fi(``,{factory:()=>C(mv,{optional:!0,skipSelf:!0})||Xte()}),hv=class{destroyed=!1;listeners=null;errorHandler=C(ec,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=C(As);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new _i(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(yi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=nn(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&&Zte(this.listeners)),nn(t),this.isEmitting=!1}}};function Zte(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return wn(e,t?.equal)}function Z(e){return Zn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Qte=e=>e;function Q(e,t){return typeof e==`function`?gv(qn(e,Qte,t?.equal),t?.debugName,t?.set):gv(qn(e.source,e.computation,e.equal),e.debugName,e.set)}function gv(e,t,n){let r=e[tn],i=e;if(n!==void 0){let t=e=>Jn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Jn(r,e),i.update=e=>Yn(r,e);return i.asReadonly=rc.bind(e),i}var _v=!1;function $te(){return _v}function vv(e){_v=e}function yv(e,t){let n=Object.create(Dc);n.value=e,n.transformFn=t?.transform;function r(){if(on(n),n.value===Ec)throw new _i(-950,null);return n.value}return r[tn]=n,r}function bv(e){return new hv}function xv(e,t){return yv(e,t)}function ene(e){return yv(Ec,e)}var $=(xv.required=ene,xv);function Sv(e,t){let n=Object.create(Dc),r=new hv;n.value=e;function i(){return on(n),Cv(n.value),n.value}return i[tn]=n,i.asReadonly=rc.bind(i),i.set=e=>{n.equal(n.value,e)||(In(n,e),r.emit(e))},i.update=e=>{Cv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Cv(e){if(e===Ec)throw new _i(952,!1)}function wv(e,t){return Sv(e,t)}function tne(e){return Sv(Ec,e)}var Tv=(wv.required=tne,wv);function Ev(e,t){return hh(t)}function nne(e,t){return gh(t)}var Dv=(Ev.required=nne,Ev),rne=(()=>{class e{static __NG_ELEMENT_ID__=ine}return e})();function ine(e){return ane(Jo(),Ko(),(e&16)==16)}function ane(e,t,n){if(mo(e)&&!n){let n=Do(e.index,t);return new cp(n,n)}if(e.type&175){let e=t[15];return new cp(e,t)}return null}var Ov=new Fi(``),one=new Fi(``);function kv(e){return!e.moduleRef}function sne(e){let t=kv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Hs);return n.run(()=>{kv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(tc),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),kv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Ov);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Ov);n.add(t),e.moduleRef.onDestroy(()=>{rg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return lne(r,n,()=>{let n=t.get(Ps),r=n.add(),i=t.get(Fh);return i.runInitializers(),i.donePromise.then(()=>{if(Wg(t.get(mv,Ug)||`en-US`),!t.get(one,!0))return kv(e)?t.get(tg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(kv(e)){let n=t.get(tg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return cne?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var cne;function lne(e,t,n){try{let r=n();return yh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var Av=null;function une(e=[],t){return Os.create({name:t,providers:[{provide:Wa,useValue:`platform`},{provide:Ov,useValue:new Set([()=>Av=null])},...e]})}function dne(e=[]){if(Av)return Av;let t=une(e);return Av=t,$h(),fne(t),t}function fne(e){let t=e.get(oc,null);so(e,()=>{t?.forEach(e=>e())})}function pne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Hc(kc.BootstrapApplicationStart);try{let e=i?.injector??dne(r);return sne({r3Injector:new Sh({providers:[Yte(),nc,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Hc(kc.BootstrapApplicationEnd)}}function jv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var Mv=Symbol(`NOT_SET`),Nv=new Set,mne={...Rn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Mv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(on(r),r.value),r.signal[tn]=r,r.registerCleanupFn=e=>(r.cleanup??=new Set).add(e),this.nodes[e]=r,this.hooks[e]=e=>r.phaseFn(e)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??Nv)t()}finally{vn(e)}}};function Pv(e,t){let n=t?.injector??C(Os),r=n.get(dc),i=n.get(od),a=n.get(rd,null,{optional:!0});i.impl??=n.get(cd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(lc,null,{optional:!0}),c=new hne(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var Fv=null;function Iv(){return Fv}function gne(e){Fv??=e}var _ne=class{},Lv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Lv||{}),Rv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(Rv||{}),zv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(zv||{}),Bv={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 vne(e){return zg(e)[Vg.LocaleId]}function yne(e,t,n){let r=zg(e);return Kv(Kv([r[Vg.DayPeriodsFormat],r[Vg.DayPeriodsStandalone]],t),n)}function bne(e,t,n){let r=zg(e);return Kv(Kv([r[Vg.DaysFormat],r[Vg.DaysStandalone]],t),n)}function xne(e,t,n){let r=zg(e);return Kv(Kv([r[Vg.MonthsFormat],r[Vg.MonthsStandalone]],t),n)}function Sne(e,t){let n=zg(e)[Vg.Eras];return Kv(n,t)}function Vv(e,t){return Kv(zg(e)[Vg.DateFormat],t)}function Hv(e,t){return Kv(zg(e)[Vg.TimeFormat],t)}function Uv(e,t){let n=zg(e)[Vg.DateTimeFormat];return Kv(n,t)}function Wv(e,t){let n=zg(e),r=n[Vg.NumberSymbols][t];if(r===void 0){if(t===Bv.CurrencyDecimal)return n[Vg.NumberSymbols][Bv.Decimal];if(t===Bv.CurrencyGroup)return n[Vg.NumberSymbols][Bv.Group]}return r}function Gv(e){if(!e[Vg.ExtraData])throw new _i(2303,!1)}function Cne(e){let t=zg(e);return Gv(t),(t[Vg.ExtraData][2]||[]).map(e=>typeof e==`string`?qv(e):[qv(e[0]),qv(e[1])])}function wne(e,t,n){let r=zg(e);return Gv(r),Kv(Kv([r[Vg.ExtraData][0],r[Vg.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 _i(2304,!1)}function qv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Tne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Jv=Object.create(null),Ene=/((?:[^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]*)/,Dne=256;function One(e,t,n,r){let i=uy(e);kne(t),t=Xv(n,t)||t;let a=[],o;for(;t;)if(o=Ene.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=sy(r,s),i=ly(i,r));let c=``;return a.forEach(e=>{let t=Fne(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function kne(e){if(e.length>Dne)throw new _i(2300,!1)}function Yv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Xv(e,t){let n=vne(e);if(Jv[n]??=Object.create(null),Jv[n][t])return Jv[n][t];let r=``;switch(t){case`shortDate`:r=Vv(e,zv.Short);break;case`mediumDate`:r=Vv(e,zv.Medium);break;case`longDate`:r=Vv(e,zv.Long);break;case`fullDate`:r=Vv(e,zv.Full);break;case`shortTime`:r=Hv(e,zv.Short);break;case`mediumTime`:r=Hv(e,zv.Medium);break;case`longTime`:r=Hv(e,zv.Long);break;case`fullTime`:r=Hv(e,zv.Full);break;case`short`:let t=Xv(e,`shortTime`),n=Xv(e,`shortDate`);r=Zv(Uv(e,zv.Short),[t,n]);break;case`medium`:let i=Xv(e,`mediumTime`),a=Xv(e,`mediumDate`);r=Zv(Uv(e,zv.Medium),[i,a]);break;case`long`:let o=Xv(e,`longTime`),s=Xv(e,`longDate`);r=Zv(Uv(e,zv.Long),[o,s]);break;case`full`:let c=Xv(e,`fullTime`),l=Xv(e,`fullDate`);r=Zv(Uv(e,zv.Full),[c,l])}return r&&(Jv[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 Qv(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 Ane(s,t);let c=Wv(o,Bv.MinusSign);return Qv(s,t,c,r,i)}}function jne(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 _i(2301,!1)}}function ey(e,t,n=Lv.Format,r=!1){return function(i,a){return Mne(i,a,e,t,n,r)}}function Mne(e,t,n,r,i,a){switch(n){case 2:return xne(t,i,r)[e.getMonth()];case 1:return bne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Cne(t),a=wne(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?`+`:``)+Qv(o,2,a)+Qv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Qv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Qv(o,2,a)+`:`+Qv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Qv(o,2,a)+`:`+Qv(Math.abs(i%60),2,a);default:throw new _i(2310,!1)}}}var Nne=0,ny=4;function Pne(e){let t=Yv(e,Nne,1).getDay();return Yv(e,0,1+(t<=ny?ny:11)-t)}function ry(e){let t=e.getDay(),n=t===0?-3:ny-t;return Yv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function iy(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=ry(n),t=Pne(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Qv(i,e,Wv(r,Bv.MinusSign))}}function ay(e,t=!1){return function(n,r){return Qv(ry(n).getFullYear(),e,Wv(r,Bv.MinusSign),t)}}var oy=Object.create(null);function Fne(e){if(oy[e])return oy[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=ey(3,Rv.Abbreviated);break;case`GGGG`:t=ey(3,Rv.Wide);break;case`GGGGG`:t=ey(3,Rv.Narrow);break;case`y`:t=$v(0,1,0,!1,!0);break;case`yy`:t=$v(0,2,0,!0,!0);break;case`yyy`:t=$v(0,3,0,!1,!0);break;case`yyyy`:t=$v(0,4,0,!1,!0);break;case`Y`:t=ay(1);break;case`YY`:t=ay(2,!0);break;case`YYY`:t=ay(3);break;case`YYYY`:t=ay(4);break;case`M`:case`L`:t=$v(1,1,1);break;case`MM`:case`LL`:t=$v(1,2,1);break;case`MMM`:t=ey(2,Rv.Abbreviated);break;case`MMMM`:t=ey(2,Rv.Wide);break;case`MMMMM`:t=ey(2,Rv.Narrow);break;case`LLL`:t=ey(2,Rv.Abbreviated,Lv.Standalone);break;case`LLLL`:t=ey(2,Rv.Wide,Lv.Standalone);break;case`LLLLL`:t=ey(2,Rv.Narrow,Lv.Standalone);break;case`w`:t=iy(1);break;case`ww`:t=iy(2);break;case`W`:t=iy(1,!0);break;case`d`:t=$v(2,1);break;case`dd`:t=$v(2,2);break;case`c`:case`cc`:t=$v(7,1);break;case`ccc`:t=ey(1,Rv.Abbreviated,Lv.Standalone);break;case`cccc`:t=ey(1,Rv.Wide,Lv.Standalone);break;case`ccccc`:t=ey(1,Rv.Narrow,Lv.Standalone);break;case`cccccc`:t=ey(1,Rv.Short,Lv.Standalone);break;case`E`:case`EE`:case`EEE`:t=ey(1,Rv.Abbreviated);break;case`EEEE`:t=ey(1,Rv.Wide);break;case`EEEEE`:t=ey(1,Rv.Narrow);break;case`EEEEEE`:t=ey(1,Rv.Short);break;case`a`:case`aa`:case`aaa`:t=ey(0,Rv.Abbreviated);break;case`aaaa`:t=ey(0,Rv.Wide);break;case`aaaaa`:t=ey(0,Rv.Narrow);break;case`b`:case`bb`:case`bbb`:t=ey(0,Rv.Abbreviated,Lv.Standalone,!0);break;case`bbbb`:t=ey(0,Rv.Wide,Lv.Standalone,!0);break;case`bbbbb`:t=ey(0,Rv.Narrow,Lv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=ey(0,Rv.Abbreviated,Lv.Format,!0);break;case`BBBB`:t=ey(0,Rv.Wide,Lv.Format,!0);break;case`BBBBB`:t=ey(0,Rv.Narrow,Lv.Format,!0);break;case`h`:t=$v(3,1,-12);break;case`hh`:t=$v(3,2,-12);break;case`H`:t=$v(3,1);break;case`HH`:t=$v(3,2);break;case`m`:t=$v(4,1);break;case`mm`:t=$v(4,2);break;case`s`:t=$v(5,1);break;case`ss`:t=$v(5,2);break;case`S`:t=$v(6,1);break;case`SS`:t=$v(6,2);break;case`SSS`:t=$v(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=ty(0);break;case`ZZZZZ`:t=ty(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=ty(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=ty(2);break;default:return null}return oy[e]=t,t}function sy(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function cy(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function ly(e,t,n){let r=e.getTimezoneOffset();return cy(e,-1*(sy(t,r)-r))}function uy(e){if(fy(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 Yv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Tne))return dy(n)}let t=new Date(e);if(!fy(t))throw new _i(2311,!1);return t}function dy(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 fy(e){return e instanceof Date&&!isNaN(e.valueOf())}var py=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C(Os);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)(am(zm))};static ɵdir=Oh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Nc]})}return e})();function my(e,t){return new _i(2100,!1)}var hy=`mediumDate`,gy=new Fi(``),_y=new Fi(``),vy=(()=>{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??hy,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return One(t,e,i||this.locale,a)}catch(t){throw my(e,t.message)}}static ɵfac=function(t){return new(t||e)(am(mv,16),am(gy,24),am(_y,24))};static ɵpipe=kh({name:`date`,type:e,pure:!0})}return e})(),yy=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=kh({name:`json`,type:e,pure:!1})}return e})();function by(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 xy=`browser`,Sy=class{_doc;constructor(e){this._doc=e}manager},Cy=(()=>{class e extends Sy{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)(ua(ks))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),wy=new Fi(``),Ty=(()=>{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 Cy));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof Cy);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 _i(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ua(wy),ua(Hs))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),Ey=`ng-app-id`;function Dy(e){for(let t of e)t.remove()}function Oy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function ky(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Ey}="${t}"],link[${Ey}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Ey),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 Ay(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var jy=(()=>{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,ky(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Oy);t?.forEach(e=>this.addUsage(e,this.external,Ay))}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&&(Dy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Dy(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,Oy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Ay(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)(ua(ks),ua(ic),ua(cc,8),ua(sc))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),My={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`},Ny=/%COMP%/g,Py=`%COMP%`,Fy=`_nghost-${Py}`,Iy=`_ngcontent-${Py}`,Ly=!0,Ry=new Fi(``,{factory:()=>Ly}),zy=new Fi(``);function By(e){return Iy.replace(Ny,e)}function Vy(e){return Fy.replace(Ny,e)}function Hy(e,t){return t.map(t=>t.replace(Ny,e))}var Uy=(()=>{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 Wy(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 Jy?n.applyToHost(e):n instanceof qy&&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 gu.Emulated:r=new Jy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case gu.ShadowDom:return new Ky(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case gu.ExperimentalIsolatedShadowDom:return new Ky(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new qy(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)(ua(Ty),ua(rm),ua(ic),ua(Ry),ua(ks),ua(Hs),ua(cc),ua(rd,8),ua(zy,8))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),Wy=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(My[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 _i(-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 _i(-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=My[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=My[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&(Ru.DashCase|Ru.Important)?e.style.setProperty(t,n,r&Ru.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Ru.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=Iv().getGlobalEventTarget(this.doc,e),!e))throw new _i(-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 Ky=class extends Wy{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=Hy(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=Ay(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)}},qy=class extends Wy{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?Hy(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&&Gu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Jy=class extends qy{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=By(l),this.hostAttr=Vy(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}},Yy=class e extends _ne{supportsDOMEvents=!0;static makeCurrent(){gne(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=Zy();return t==null?null:Qy(t)}resetBaseElement(){Xy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return by(document.cookie,e)}},Xy=null;function Zy(){return Xy||=document.head.querySelector(`base`),Xy?Xy.getAttribute(`href`):null}function Qy(e){return new URL(e,document.baseURI).pathname}var $y=[`alt`,`control`,`meta`,`shift`],eb={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},tb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},nb=(()=>{class e extends Sy{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(()=>Iv().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.`),$y.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=eb[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`),$y.forEach(t=>{if(t!==n){let n=tb[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)(ua(ks))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})();async function rb(e,t,n){return pne({rootComponent:e,...ib(t,n)})}function ib(e,t){return{platformRef:t?.platformRef,appProviders:[...lb,...e?.providers??[]],platformProviders:cb}}function ab(){Yy.makeCurrent()}function ob(){return new ec}function sb(){return iu(document),document}var cb=[{provide:sc,useValue:xy},{provide:oc,useValue:ab,multi:!0},{provide:ks,useFactory:sb}],lb=[{provide:Wa,useValue:`root`},{provide:ec,useFactory:ob},{provide:wy,useClass:Cy,multi:!0},{provide:wy,useClass:nb,multi:!0},Uy,{provide:rm,useClass:jy},{provide:jy,useExisting:rm},Ty,{provide:Cp,useExisting:Uy},[]];function ub(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 mb({code:i,why:fb(a.why,e),fix:fb(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:fb(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function _b(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 Cb=Math.random.bind(Math),wb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Tb(e=21){let t=``,n=e;for(;n--;)t+=wb[Cb()*64|0];return t}var Eb=6e4,Db=e=>e,Ob=Db,{clearTimeout:kb,setTimeout:Ab}=globalThis;function jb(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Db,deserialize:s=Ob,resolver:c,bind:l=`rpc`,timeout:u=Eb,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}=Sb(),_=Tb();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Ab(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof ee==`object`&&(ee=ee.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:ee,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,te,d):await te()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{kb(ee),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:te,get $closed(){return f},get $meta(){return t.meta},$close:ee,$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 ee(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(ne)}function te(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 ne(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&&(kb(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(ne),h}function Mb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Nb=Object.freeze({type:`object`,additionalProperties:!0});function Pb(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Nb}return Nb}function Fb(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 Lb(e,t){return Ib(e,t)??[e]}function Rb(e){return typeof e==`string`?`'${e}'`:new Hb().serialize(e)}var zb=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Bb=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[zb.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Vb(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})(),Ub=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Wb=[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-_`,Kb=[],qb=class{_data=new Jb;_hash=new Jb([...Ub]);_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)Kb[n]=e[t+n]|0;else{let e=Kb[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Kb[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Kb[n]=t+Kb[n-7]+i+Kb[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+Wb[n]+Kb[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=Jb.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 Yb(e){return new qb().finalize(e).toBase64()}function Xb(e){return Yb(Rb(e))}function Zb(e){return Xb(e)}function Qb(){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 $b=/^[\w+.-]{2,}:\/\//;function ex(e){return e.endsWith(`/`)?e:`${e}/`}function tx(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function nx(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?ex(n)+e.replace(/^\.?\//,``):e);return n}function rx(e,t){if(!t||t===`/`||$b.test(e))return e;let n=tx(t);return e.startsWith(n)?e:nx(n,e)}function ix(e,t){let n=e.match($b);return t+(n?e.slice(n[0].length):e)}var ax=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function ox(e=21){let t=``,n=e;for(;n--;)t+=ax[Math.random()*64|0];return t}var sx=Symbol.for(`immer-nothing`),cx=Symbol.for(`immer-draftable`),lx=Symbol.for(`immer-state`),ux=[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 dx(e,...t){{let n=ux[e],r=Fx(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var fx=Object,px=fx.getPrototypeOf,mx=`constructor`,hx=`prototype`,gx=`configurable`,_x=`enumerable`,vx=`writable`,yx=`value`,bx=e=>!!e&&!!e[lx];function xx(e){return e?wx(e)||jx(e)||!!e[cx]||!!e[mx]?.[cx]||Mx(e)||Nx(e):!1}var Sx=fx[hx][mx].toString(),Cx=new WeakMap;function wx(e){if(!e||!Px(e))return!1;let t=px(e);if(t===null||t===fx[hx])return!0;let n=fx.hasOwnProperty.call(t,mx)&&t[mx];if(n===Object)return!0;if(!Fx(n))return!1;let r=Cx.get(n);return r===void 0&&(r=Function.toString.call(n),Cx.set(n,r)),r===Sx}function Tx(e,t,n=!0){Ex(e)===0?(n?Reflect.ownKeys(e):fx.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ex(e){let t=e[lx];return t?t.type_:jx(e)?1:Mx(e)?2:Nx(e)?3:0}var Dx=(e,t,n=Ex(e))=>n===2?e.has(t):fx[hx].hasOwnProperty.call(e,t),Ox=(e,t,n=Ex(e))=>n===2?e.get(t):e[t],kx=(e,t,n,r=Ex(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Ax(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var jx=Array.isArray,Mx=e=>e instanceof Map,Nx=e=>e instanceof Set,Px=e=>typeof e==`object`,Fx=e=>typeof e==`function`,Ix=e=>typeof e==`boolean`;function Lx(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Rx=e=>Px(e)?e?.[lx]:null,zx=e=>e.copy_||e.base_,Bx=e=>e.modified_?e.copy_:e.base_;function Vx(e,t){if(Mx(e))return new Map(e);if(Nx(e))return new Set(e);if(jx(e))return Array[hx].slice.call(e);let n=wx(e);if(t===!0||t===`class_only`&&!n){let t=fx.getOwnPropertyDescriptors(e);delete t[lx];let n=Reflect.ownKeys(t);for(let r=0;r1&&fx.defineProperties(e,{set:Wx,add:Wx,clear:Wx,delete:Wx}),fx.freeze(e),t&&Tx(e,(e,t)=>{Hx(t,!0)},!1),e)}function Ux(){dx(2)}var Wx={[yx]:Ux};function Gx(e){return e===null||!Px(e)||fx.isFrozen(e)}var Kx=`MapSet`,qx=`Patches`,Jx=`ArrayMethods`,Yx={};function Xx(e){let t=Yx[e];return t||dx(0,e),t}var Zx=e=>!!Yx[e];function Qx(e,t){Yx[e]||(Yx[e]=t)}var $x,eS=()=>$x,tS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Zx(Kx)?Xx(Kx):void 0,arrayMethodsPlugin_:Zx(Jx)?Xx(Jx):void 0});function nS(e,t){t&&(e.patchPlugin_=Xx(qx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rS(e){iS(e),e.drafts_.forEach(oS),e.drafts_=null}function iS(e){e===$x&&($x=e.parent_)}var aS=e=>$x=tS($x,e);function oS(e){let t=e[lx];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function sS(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[lx].modified_&&(rS(t),dx(4)),xx(e)&&(e=cS(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[lx].base_,e,t)}else e=cS(t,n);return lS(t,e,!0),rS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===sx?void 0:e}function cS(e,t){if(Gx(t))return t;let n=t[lx];if(!n)return _S(t,e.handledSet_,e);if(!dS(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);hS(n,e)}return n.copy_}function lS(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hx(t,n)}function uS(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var dS=(e,t)=>e.scope_===t,fS=[];function pS(e,t,n,r){let i=zx(e),a=e.type_;if(r!==void 0&&Ox(i,r,a)===t){kx(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Tx(i,(e,n)=>{if(bx(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??fS;for(let e of o)kx(i,e,n,a)}function mS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!dS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Bx(i);pS(e,i.draft_??i,a,n),hS(i,r)})}function hS(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)}uS(e)}}function gS(e,t,n){let{scope_:r}=e;if(bx(n)){let i=n[lx];dS(i,r)&&i.callbacks_.push(function(){ES(e),pS(e,n,Bx(i),t)})}else xx(n)&&e.callbacks_.push(function(){let i=zx(e);e.type_===3?i.has(n)&&_S(n,r.handledSet_,r):Ox(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&_S(Ox(e.copy_,t,e.type_),r.handledSet_,r)})}function _S(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||bx(e)||t.has(e)||!xx(e)||Gx(e)?e:(t.add(e),Tx(e,(r,i)=>{if(bx(i)){let t=i[lx];dS(t,n)&&(kx(e,r,Bx(t),e.type_),uS(t))}else xx(i)&&_S(i,t,n)}),e)}function vS(e,t){let n=jx(e),r={type_:+!!n,scope_:t?t.scope_:eS(),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=yS;n&&(i=[r],a=bS);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var yS={get(e,t){if(t===lx)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=zx(e);if(!Dx(i,t,e.type_))return CS(e,i,t);let a=i[t];if(e.finalized_||!xx(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Lx(t))return a;if(a===xS(e.base_,t)||SS(e,t,a)){ES(e);let n=e.type_===1?+t:t,r=OS(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in zx(e)},ownKeys(e){return Reflect.ownKeys(zx(e))},set(e,t,n){let r=wS(zx(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=xS(zx(e),t),i=r?.[lx];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Ax(n,r)&&(n!==void 0||Dx(e.base_,t,e.type_)))return!0;ES(e),TS(e)}return e.copy_[t]===n&&(n!==void 0||Dx(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),gS(e,t,n),!0)},deleteProperty(e,t){return ES(e),xS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),TS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=zx(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[vx]:!0,[gx]:e.type_!==1||t!==`length`,[_x]:r[_x],[yx]:n[t]}},defineProperty(){dx(11)},getPrototypeOf(e){return px(e.base_)},setPrototypeOf(){dx(12)}},bS={};for(let e in yS){let t=yS[e];bS[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}bS.deleteProperty=function(e,t){return isNaN(parseInt(t))&&dx(13),bS.set.call(this,e,t,void 0)},bS.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&dx(14),yS.set.call(this,e[0],t,n,e[0])};function xS(e,t){let n=e[lx];return(n?zx(n):e)[t]}function SS(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!xx(n)||n[lx]?!1:e.baseRefs_.has(n)}function CS(e,t,n){let r=wS(t,n);return r?yx in r?r[yx]:r.get?.call(e.draft_):void 0}function wS(e,t){if(!(t in e))return;let n=px(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=px(n)}}function TS(e){e.modified_||(e.modified_=!0,e.parent_&&TS(e.parent_))}function ES(e){e.copy_||=(e.assigned_=new Map,Vx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var DS=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Fx(e)&&!Fx(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Fx(t)||dx(6),n!==void 0&&!Fx(n)&&dx(7);let r;if(xx(e)){let i=aS(this),a=OS(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?rS(i):iS(i)}return nS(i,n),sS(r,i)}if(!e||!Px(e)){if(r=t(e),r===void 0&&(r=e),r===sx&&(r=void 0),this.autoFreeze_&&Hx(r,!0),n){let t=[],i=[];Xx(qx).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}dx(1,e)},this.produceWithPatches=(e,t)=>{if(Fx(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]},Ix(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ix(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ix(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){xx(e)||dx(8),bx(e)&&(e=kS(e));let t=aS(this),n=OS(t,e,void 0);return n[lx].isManual_=!0,iS(t),n}finishDraft(e,t){let n=e&&e[lx];(!n||!n.isManual_)&&dx(9);let{scope_:r}=n;return nS(r,t),sS(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(qx).applyPatches_;return bx(e)?r(e,t):this.produce(e,e=>r(e,t))}};function OS(e,t,n,r){let[i,a]=Mx(t)?Xx(Kx).proxyMap_(t,n):Nx(t)?Xx(Kx).proxySet_(t,n):vS(t,n);return(n?.scope_??eS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?mS(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 kS(e){return bx(e)||dx(10,e),AS(e)}function AS(e){if(!xx(e)||Gx(e))return e;let t=e[lx],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vx(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Vx(e,!0);let i=n;return Nx(n)&&(n=new Set),Tx(i,(e,t)=>{kx(n,e,AS(t))},r),t&&(t.finalized_=!1),n}function jS(){ux.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=Rx(Ox(e,n.key_)),i=Ox(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||Dx(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)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=Ox(o,e,c),f=Ox(s,e,c),p=l?Dx(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===sx?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(Nx(e))return new Set(Array.from(e).map(u));let t=Object.create(px(e));for(let n in e)t[n]=u(e[n]);return Dx(e,cx)&&(t[cx]=e[cx]),t}function d(e){return bx(e)?u(e):e}Qx(qx,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var MS=new DS,NS=MS.produce,PS=MS.produceWithPatches.bind(MS),FS=MS.applyPatches.bind(MS),IS=1e3;function LS(e,t){if(e.add(t),e.size>IS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function RS(e){let{enablePatches:t=!1}=e;t&&jS();let n=Qb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=ox())=>{i.has(t)||(jS(),r=FS(r,e),LS(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=ox())=>{if(!i.has(a)){if(LS(i,a),t){let[t,i]=PS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=NS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var zS=typeof self==`object`?self:globalThis,BS=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),VS=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function HS(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=BS.has(e)?zS[e]:void 0;return n(new(r??zS.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`&&VS.has(a))return n(new zS[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function US(e){return HS(new Map,e)(0)}var WS=``,{toString:GS}={},{keys:KS}=Object;function qS(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,WS];case`Object`:return[2,WS];case`Date`:return[3,WS];case`RegExp`:return[4,WS];case`Map`:return[5,WS];case`Set`:return[6,WS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function JS([e,t]){return e===0&&(t===`function`||t===`symbol`)}function YS(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]=qS(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 KS(r))(e||!JS(qS(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||!(JS(qS(n))||JS(qS(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!JS(qS(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 YS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:ZS,stringify:QS}=JSON,$S={json:!0,lossy:!0};function eC(e){return US(ZS(e))}function tC(e){return QS(XS(e,$S))}function nC(e){return US(e)}function rC(e){return tC(e)}function iC(e){return eC(e)}var aC=256,oC=class extends Error{name=`StreamClosedError`};function sC(e={}){let t=e.id??ox(),n=Math.max(0,e.replayWindow??0),r=Qb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new oC(`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=lC(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 cC(e={}){let t=e.id??ox(),n=Math.max(1,e.highWaterMark??aC),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 lC(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 uC=128;function dC(e){return e.replace(/[^\w-]+/g,`_`).slice(0,uC)}var fC=`modulepreload`,pC=function(e,t){return new URL(e,t).href},mC={},hC=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=pC(t,n),t=s(t),t in mC)return;mC[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`:fC,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)})},gC=`__connection.json`,_C=`__DEVFRAME_CONNECTION__`,vC=`x-birpc-session`,yC=`__rpc-dump/index.json`,bC=`devframe:services`,xC=`devframe_otp`,SC=`devframe_auth_token`;vb.postMessage.remoteAssetsError;var CC=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Zb(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()}},wC=xb({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 TC(e){if(e.agent&&e.jsonSerializable===!1)throw wC.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function EC(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function DC(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 OC(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 jC(e,t){let n=e.handler;if(!n){let r=await AC(e,t);if(!r.handler)throw wC.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 OC(e.name,r,t),o=await a(...n);return await kC(e.name,i,o)}}var MC=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 jC(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 wC.DF0021({name:e.name});TC(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 wC.DF0022({name:e.name});TC(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 jC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw wC.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 NC(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 FC(t,`undefined`,r,e);return n}return i!==null&&PC(i,r,e,t),n})}function PC(e,t,n,r){if(typeof e==`bigint`)throw FC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw FC(r,`Map`,t,n);if(e instanceof Set)throw FC(r,`Set`,t,n);if(e instanceof Date)throw FC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw FC(r,e.constructor?.name??`class instance`,t,n)}function FC(e,t,n,r){let i=IC(n,r);return wC.DF0020({name:e||``,type:t,path:i})}function IC(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var LC=`__DEVFRAME_CONNECTION_META__`,RC=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function zC(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 BC(){return zC(_C)}function VC(){return zC(LC)}function HC(e){if(e)return e;try{let e=localStorage.getItem(RC);if(e)return e}catch{}return zC(RC)}function UC(e){globalThis[_C]=e,globalThis[LC]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&WC(e.authToken)}function WC(e){try{localStorage.setItem(RC,e)}catch{}globalThis[RC]=e;let t=BC();t&&(globalThis[_C]={...t,authToken:e})}function GC(e){let t=rx(gC,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function KC(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function qC(){let e=BC();if(e)return KC(e,HC()??e.authToken??e.connectionMeta.authToken);let t=VC();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??GC(`./`),authToken:HC(t.authToken)}}async function JC(e={}){if(e.connection){let t=KC(e.connection,HC(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return UC(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:HC(e.authToken??e.connectionMeta.authToken)};return UC(n),n}let n=qC();if(n){let t=KC(n,HC(e.authToken??n.authToken??n.connectionMeta.authToken));return UC(t),t}let r=[];for(let n of t){let t=rx(gC,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:HC(e.authToken??r.authToken)};return UC(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var YC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function XC(e=xC){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function ZC(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 QC(e=xC){let t=XC(e);return t&&ZC(e),t}async function $C(e,t={}){let n=QC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function ew(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(bC,{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 tw(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:vb.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:vb.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=RS({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,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(vb.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var nw=new Map;function rw(e=nw){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?NC(n,r??``):`s:${rC(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?iC(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function iw(){}function aw(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 ow(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 sw(e){let{onConnected:t=iw,onError:n=iw,onDisconnected:r=iw,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${SC}=${encodeURIComponent(e.authToken)}`);let s=rw(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 ee(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=aw(r);if(!e)break;r=e.rest;let{event:t,data:n}=ow(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 ee(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`,[vC]: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 cw(e,t){let{channel:n,rpcOptions:r={}}=t;return jb(e,{...n,timeout:-1,...r,proxify:!1})}function lw(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(vb.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 YC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new YC(`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(vb.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 YC(`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(vb.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(vb.client.connectionError,e),m(new YC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new YC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=cw(a.functions,{channel:ee,rpcOptions:o});a.register({name:vb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new YC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(vb.client.connectionError,e),m(e),i.emit(vb.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$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 YC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(vb.client.connectionError,e)}return i.emit(vb.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(vb.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(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:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(vb.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(vb.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(vb.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function uw(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 dw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=uw(n.sse,r??`./`,location);return lw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>sw({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 fw(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:pw(r)?fw(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function pw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function mw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function hw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function gw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function _w(e){if(e.error)throw fw(e.error);return e.output}function vw(e){return e.some(e=>e!=null)}function yw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function bw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?nC(e):e}function a(e,t){return i(yw(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 gw(r)?_w(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(mw(r)){if(vw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(hw(r)){let e=Zb(n),i=r.records[e];if(i)return _w(await s(i,r.serialization));if(r.fallback)return _w(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!vw(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 xw(e){let t=bw(await e.fetchJsonFromBases(yC),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 Sw=``;function Cw(e,t){return`${e}${Sw}${t}`}function ww(e){let t=new Map,n=new Map;e.client.register({name:vb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Cw(e,n))?._push(r,i)}}),e.client.register({name:vb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Cw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:vb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=Cw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(vb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Sw);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=Cw(n,r),o=t.get(a);if(o)return o;let s=cC({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(vb.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=Cw(t,r),a=n.get(i);if(a)return a;let o=sC({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 Tw(){}var Ew=new Map;function Dw(e){let t=e.url;e.authToken&&(t=`${t}?${SC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Tw,onError:i=Tw,onDisconnected:a=Tw,definitions:o=Ew}=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=rw(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 Ow(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 ix(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function kw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ow(n.websocket,r??`./`,location);return lw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Dw({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 Aw(e){return e.includes(`:`)}function jw(e,t){return Aw(t)?t:`${e}:${t}`}function Mw(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function Nw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return Mw(a)}function Pw(e,t){return{global:Nw(e,t,`global`),project:Nw(e,t,`project`)}}function Fw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Aw(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(jw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(jw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(jw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(jw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(jw(t,n),r,i),upload:(n,r)=>e.streaming.upload(jw(t,n),r)}},settings:Pw(e,t),scope:e.scope}}function Iw(){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 Lw(e,t={}){let n=t.modelContext??Iw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=dC(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=Mb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Fb(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Rw(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 Rw(e,t,n){try{let r=Lb(n,e.args?.length);return{content:[{type:`text`,text:zw(await(await jC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Bw(e)}]}}}function zw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Bw(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 Vw(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 Hw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Qb(),a=Array.isArray(t)?t:[t],o=await JC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new CC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new MC(f),m=e.webmcp===!1?void 0:Lw(p),h,g=!1,_=0,ee;function te(){_++,ee=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:vb.broadcast.cacheInvalidate,type:`event`,handler:te}),i.on(vb.client.connectionStatus,te),i.on(vb.client.isTrustedUpdated,te));async function ne(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(rx(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 re=e.callTimeout??0,ie=re>0?re:1/0,ae,oe={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ie;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&ae.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new YC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${re}ms`)}for(;!ee&&(t(),!(g||ae.status!==`connected`));){let e=_;ee=ae.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(ee=void 0),t}),await ee}await ee,t()}let o=_;if(r&&e.i&&!g&&ae.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},se=Vw(e.transport??`auto`,s);ae=se===`static`?await xw({fetchJsonFromBases:ne}):se===`sse`?dw({...oe,sseOptions:e.sseOptions}):kw({...oe,wsOptions:e.wsOptions});let ce;try{ce=new BroadcastChannel(`devframe-auth`)}catch{}let le,ue=!1;function de(e){return((...t)=>ue||!le?e(...t):le.then(()=>e(...t)))}function fe(){g=!0,te();try{h?.(),m?.()}finally{try{ce?.close()}finally{ae.close?.()}}}let pe={events:i,get isTrusted(){return ae.isTrusted},get status(){return ae.status},get connectionError(){return ae.connectionError},get transport(){return ae.transport??se},get connection(){return o},connectionMeta:s,ensureTrusted:ae.ensureTrusted,requestTrust:ae.requestTrust,requestTrustWithToken:async e=>(WC(e),o={...o,authToken:e},ae.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ae.requestTrustWithCode(e);if(!t)return!1;WC(t),o={...o,authToken:t};try{ce?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ae.requestAuthCode(e),call:de(ae.call),callEvent:de(ae.callEvent),callOptional:de(ae.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:fe};pe.sharedState=tw(pe),pe.streaming=ww(pe),pe.services=ew(pe);let me=new Map;pe.scope=(e=>{if(!e)return pe;let t=me.get(e);return t||(t=Fw(pe,e),me.set(e,t)),t}),f.rpc=pe;function he(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ge(){if(e.simpleAuth!==!1&&he()&&typeof globalThis.prompt==`function`)for(await pe.requestAuthCode().catch(()=>{});!pe.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 pe.requestTrustWithCode(t))return}}async function _e(){let t=await ae.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await $C(pe,{param:n}):!1;t||r||pe.isTrusted||await ge()}return le=_e().then(()=>{ue=!0},()=>{ue=!0}),s.mcp&&hC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-DtH28z9R.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(pe))}).catch(()=>{}),ce&&(ce.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&pe.requestTrustWithToken(e.data.authToken)}),pe}var Uw=Hw,Ww=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],Gw=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function Kw(e){return`pangular:${e}`}var qw=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],Jw={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},Yw={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},Xw=[[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function Zw(e){return Xw.some(([t])=>t===e)}var Qw=/^[a-z][a-z0-9-]{0,39}$/;function $w(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&Qw.test(e)&&(n?.enabled??!0);return{enabled:r,tools:r&&t.agent.tools.plugins&&(n?.tools??!0),actions:r&&t.actions.plugins&&(n?.actions??!0)}}var eT=`pangular`,tT={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},nT=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function rT(e){if(typeof e!=`string`||e.length>40)return;let t=e.split(`+`).map(e=>e.trim());if(t.some(e=>!e))return;let n=new Set,r;for(let e of t){let t=tT[e.toLowerCase()];if(t){if(n.has(t))return;n.add(t);continue}if(r!==void 0)return;if(/^[a-z0-9]$/i.test(e))r=e.toUpperCase();else if(/^f([1-9]|1[0-2])$/i.test(e))r=e.toUpperCase();else return}if(r&&[...n].some(e=>e!==`Shift`)&&!(n.has(`Mod`)&&(n.has(`Ctrl`)||n.has(`Meta`))))return[...nT.filter(e=>n.has(e)),r].join(`+`)}function iT(e,t,n){let r=t.split(`+`),i=r.pop(),a=new Set(r),o=a.has(`Ctrl`)||a.has(`Mod`)&&!n,s=a.has(`Meta`)||a.has(`Mod`)&&n;if(e.ctrlKey!==o||e.metaKey!==s||e.altKey!==a.has(`Alt`)||e.shiftKey!==a.has(`Shift`))return!1;if(/^F\d+$/.test(i))return e.key.toUpperCase()===i;let c=/^\d$/.test(i)?`Digit${i}`:`Key${i}`;return e.code?e.code===c:e.key.toUpperCase()===i}function aT(e,t){if(!t)return e.replace(/^Mod\b/,`Ctrl`);let n={Mod:`⌘`,Meta:`⌘`,Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`};return e.split(`+`).map(e=>n[e]??e).join(``)}var oT=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`audit`,label:`Audit`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`queries`,label:`Queries`,inspector:`tanstackQuery`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],sT=1e4;function cT(e){return oT.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var lT={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},uT=200;function dT(e){let t=new URLSearchParams({tab:e.tab});return e.id&&t.set(`id`,e.id),e.page&&t.set(`page`,e.page),`#${t.toString()}`}function fT(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=uT?n:void 0},r=n(`tab`);if(!r)return null;let i=n(`id`),a=n(`page`);return{tab:r,...i?{id:i}:{},...a?{page:a}:{}}}var pT=[{id:`settings`,title:`Open settings`,group:`Go to`,keywords:`preferences tabs`},{id:`pick-component`,title:`Pick component on page`,group:`Actions`,keywords:`select inspect element`,inspector:`components`},{id:`cd-record-start`,title:`Start recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-record-stop`,title:`Stop recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-clear`,title:`Clear change detection recording`,group:`Actions`,keywords:`reset recordings cycles`,inspector:`components`},{id:`theme:system`,title:`Theme: follow the system`,group:`Theme`,keywords:`auto`},{id:`theme:light`,title:`Theme: light`,group:`Theme`},{id:`theme:dark`,title:`Theme: dark`,group:`Theme`},{id:`dock:float`,title:`Popup: float`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:bottom`,title:`Popup: dock to the bottom`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:right`,title:`Popup: dock to the right`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:reset-size`,title:`Popup: reset the docked size`,group:`Popup`,keywords:`splitter resize height width`,popupOnly:!0},{id:`popout`,title:`Popup: open in its own window`,group:`Popup`,keywords:`pop out detach new window`,popupOnly:!0},{id:`popout:return`,title:`Popup: back into the page`,group:`Popup`,keywords:`pop in attach dock window`,popupOnly:!0}];function mT(e){let t=cT(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=pT.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function hT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function gT(e,t){return typeof e==`boolean`?e:t}var _T=100,vT=100;function yT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=vT);return[...new Set(t)].slice(0,_T)}function bT(e,t){let{default:n,min:r,max:i}=Jw[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function xT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function ST(e){let t=hT(e),n=hT(t.agent),r=hT(t.inspectors),i=hT(n.tools),a=hT(t.actions),o=gT(t.actions,!0),s=hT(t.redaction),c=hT(t.limits),l=xT(Ww,e=>gT(r[e],!0));return{inspectors:l,agent:{readOnly:gT(n.readOnly,!1),tools:xT(Ww,e=>l[e]&&gT(i[e],!0)),browserTools:gT(n.browserTools,!1)},actions:xT(qw,e=>l[e]&&gT(a[e],o)),redaction:{secretNames:yT(s.secretNames),unmask:yT(s.unmask)},limits:Object.fromEntries(Object.keys(Jw).map(e=>[e,bT(c[e],e)])),popup:{hotkey:DT(hT(t.popup).hotkey)},plugins:ET(t.plugins),lint:{rules:wT(t.lint)}}}var CT=200;function wT(e){let t=hT(hT(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,CT))typeof r==`boolean`&&(n[e]=r);return n}var TT=100;function ET(e){let t={};for(let[n,r]of Object.entries(hT(e)).slice(0,TT)){if(!Qw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=hT(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:gT(e.enabled,!0),tools:gT(e.tools,!0),actions:gT(e.actions,!0)})}return t}function DT(e){return e===!1?!1:rT(e)??`Alt+Shift+P`}function OT(e){let t=e?.configs;return ST(t?.[eT])}function kT(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var AT=[`pangular:build-meta`],jT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`},MT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},NT={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function PT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=Ww.filter(t=>e.inspectors[t]);n(`Inspectors off`,Ww.filter(t=>!e.inspectors[t]).map(e=>jT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>jT[e])),n(`Blocked actions`,qw.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>MT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(Jw).filter(t=>e.limits[t]!==Jw[t].default).map(t=>NT[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function FT(e){let t={tags:[],directives:[],text:``},n=e.toLowerCase();return n=n.replace(/<\s*([^<>\s]+)\s*>/g,(e,n)=>(t.tags.push({value:n,exact:!0}),` `)),n=n.replace(/\[\s*([^[\]\s]+)\s*\]/g,(e,n)=>(t.directives.push({value:n,exact:!0}),` `)),n=n.replace(/(^|\s)([<[])([^<>[\]\s]*)$/,(e,n,r,i)=>(i&&(r===`<`?t.tags:t.directives).push({value:i,exact:!1}),n)),t.text=n.replace(/\s+/g,` `).trim(),t}function IT(e){return!e.tags.length&&!e.directives.length&&!e.text}function LT(e,t){let n=e.tag.toLowerCase(),r=(e.directives??[]).map(e=>e.toLowerCase()),i=(e.attributes??[]).map(e=>e.toLowerCase()),a=[...r,...r.map(e=>e.replace(/directive$/,``)),...i];for(let{value:e,exact:r}of t.tags)if(r?n!==e:!n.startsWith(e))return!1;for(let{value:e,exact:n}of t.directives)if(!a.some(t=>n?t===e:t.includes(e)))return!1;if(t.text){let a=t.text;if(!(e.name.toLowerCase().includes(a)||n.includes(a)||r.some(e=>e.includes(a))||i.some(e=>e.includes(a))))return!1}return!0}var RT={debugApi:{subject:`Live data`,since:`12.0`},injectorProviders:{subject:`Reading providers and environment injectors`,since:`16.2`},injectorMetadata:{subject:`The full injector tree`,since:`17.0`},isSignal:{subject:`Telling signals apart in component values`,since:`17.1`},signalGraph:{subject:`The live signal graph`,since:`20.1`},deferBlocks:{subject:`Listing @defer blocks`,since:`19.1`},forBlocks:{subject:`Listing @for blocks`,since:`22.0`},profiler:{subject:`Recording change detection`,since:`20.0`},angularProfiling:{subject:`Angular profiling`,since:`20.0`},routerInstance:{subject:`The router debug util`,since:`20.3`}};function zT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function BT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function VT(e,t){let n=BT(e),r=BT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function HT(e,t){return e?.capabilities?.[t]===!1}function UT(e,t){let n=RT[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=zT(t);return VT(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var WT=/^on (viewport|interaction|hover)\b/;function GT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>WT.test(e))}function KT(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(GT(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var qT=`pangular-page-id`,JT=null;function YT(e){JT=e}function XT(){if(JT)return JT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(qT)||null)}catch{return null}}function ZT(e,t){if(t.chosen&&e[t.chosen])return t.chosen;if(t.host)return t.host;if(t.previous&&e[t.previous])return t.previous;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n?.pageId??null}function QT(e,t){return e?t?e.pages?.[t]??null:e:null}function $T(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function eE(){return{functions:[...AT]}}function tE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function nE(e,t,n){return tE(e,t,n).then(e=>e,()=>null)}function rE(e){return e?.connectionMeta.backend===`static`}function iE(e){let t=()=>{let t=e()?.scope(`pangular`).rpc;t&&(t.callEvent(`request-page-highlight`,null),t.callEvent(`request-form-highlight`,null))};return addEventListener(`pagehide`,t),()=>{removeEventListener(`pagehide`,t),t()}}function aE(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function oE(e){return e.split(`@`)[1]??``}var sE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},cE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},lE=nE,uE={key:`name looks secret`,"input-type":`password input`,autocomplete:`autocomplete is a secret kind`,marker:`marked as mask`,parent:`inside a secret group`,config:`listed in mask`};function dE(e){return uE[e]??e}var fE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function pE(e,t){return await lE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function mE(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}.`:``}`}var hE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function gE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(hE,(e,t)=>t??(e===`**`?``:e))}function _E(e){return OT(e?.connectionMeta)}function vE(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function yE(e,t){if(!t||typeof t!=`object`)return e;let n=vE(t.secretNames),r=vE(t.unmask);return!n||!r?e:{...e,redaction:{secretNames:n,unmask:r}}}function bE(e,t){return _E(e).actions[t]}var xE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`};function SE(e){return xE[e]}var CE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function wE(e,t){let n=xE[e];return!n||t.inspectors[n]}function TE(e,t){e&1&&(E(),Og(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function EE(e,t){e&1&&(E(),Og(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function DE(e,t){e&1&&(E(),Og(0,`path`,13)(1,`path`,14))}function OE(e,t){e&1&&(E(),Og(0,`path`,15)(1,`path`,16)(2,`path`,17))}function kE(e,t){e&1&&(E(),Og(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function AE(e,t){e&1&&(E(),Og(0,`path`,1))}function jE(e,t){e&1&&(E(),Og(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function ME(e,t){e&1&&(E(),Og(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function NE(e,t){e&1&&(E(),Og(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function PE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function FE(e,t){e&1&&(E(),Og(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function IE(e,t){e&1&&(E(),Og(0,`circle`,39)(1,`path`,40))}function LE(e,t){e&1&&(E(),Og(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function RE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function zE(e,t){e&1&&(E(),Og(0,`path`,2))}function BE(e,t){e&1&&(E(),Og(0,`path`,3))}function VE(e,t){e&1&&(E(),Og(0,`path`,4))}var HE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:18,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`d`,`M9 11l2 2 4-4`],[`d`,`M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(E(),z(0,`svg`,0),j(1,TE,4,0)(2,EE,4,0)(3,DE,2,0)(4,OE,3,0)(5,kE,3,0)(6,AE,1,0,`:svg:path`,1)(7,jE,4,0)(8,ME,3,0)(9,NE,4,0)(10,PE,3,0)(11,FE,5,0)(12,IE,2,0)(13,LE,5,0)(14,RE,3,0)(15,zE,1,0,`:svg:path`,2)(16,BE,1,0,`:svg:path`,3)(17,VE,1,0,`:svg:path`,4),B()),e&2){let e;O(),M((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`audit`?3:e===`components`?4:e===`routes`?5:e===`signals`?6:e===`injectors`?7:e===`store`?8:e===`forms`?9:e===`network`?10:e===`pipes`?11:e===`settings`?12:e===`queries`?13:e===`errors`?14:e===`plugins`?15:e===`analog`?16:e===`capacitor`?17:-1)}},styles:[`[_nghost-%COMP%] { +`);return r>=0?n.slice(0,r):n}function Ci(e,t){return e?t?`${e} ${t}`:e:t||``}var wi=bi({__forward_ref__:bi});function Ti(e){return e.__forward_ref__=Ti,e}function Ei(e){return Di(e)?e():e}function Di(e){return typeof e==`function`&&Object.hasOwn(e,wi)&&e.__forward_ref__===Ti}function Oi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function ki(e){return Ai(e,Ni)}function Ai(e,t){return Object.hasOwn(e,t)&&e[t]||null}function ji(e){return(e?.[Ni]??null)||null}function Mi(e){return e&&Object.hasOwn(e,Pi)?e[Pi]:null}var Ni=bi({ɵprov:bi}),Pi=bi({ɵinj:bi}),Fi=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=Oi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ii(e){return e&&!!e.ɵproviders}var Li=bi({ɵcmp:bi}),Ri=bi({ɵdir:bi}),zi=bi({ɵpipe:bi}),Bi=bi({ɵfac:bi}),Vi=bi({__NG_ELEMENT_ID__:bi}),Hi=bi({__NG_ENV_ID__:bi});function Ui(e){return Ki(e,`@Component`),e[Li]||null}function Wi(e){return Ki(e,`@Directive`),e[Ri]||null}function Gi(e){return Ki(e,`@Pipe`),e[zi]||null}function Ki(e,t){if(e==null)throw new _i(-919,!1)}function qi(e){return typeof e==`string`?e:e==null?``:String(e)}var Ji=bi({ngErrorCode:bi}),Yi=bi({ngErrorMessage:bi}),Xi=bi({ngTokenPath:bi});function Zi(e,t){return $i(``,-200,t)}function Qi(e,t){throw new _i(-201,!1)}function $i(e,t,n){let r=new _i(t,e);return r[Ji]=t,r[Yi]=e,n&&(r[Xi]=n),r}function ea(e){return e[Ji]}var ta;function na(){return ta}function ra(e){let t=ta;return ta=e,t}function ia(e,t,n){let r=ki(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;Qi(e,``)}var aa=globalThis,oa={},sa=`__NG_DI_FLAG__`,ca=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=da(t)||0;try{return this.injector.get(e,n&8?null:oa,n)}catch(e){if(Kn(e))return e;throw e}}};function la(e,t=0){let n=Un();if(n===void 0)throw new _i(-203,!1);if(n===null)return ia(e,void 0,t);{let r=fa(t),i=n.retrieve(e,r);if(Kn(i)){if(r.optional)return null;throw i}return i}}function ua(e,t=0){return(na()||la)(Ei(e),t)}function C(e,t){return ua(e,da(t))}function da(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function fa(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function pa(e){let t=[];for(let n=0;nArray.isArray(e)?va(e,t):t(e))}function ya(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ba(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function xa(e,t){let n=[];for(let r=0;rt;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function Ca(e,t,n){let r=Ta(e,t);return r>=0?e[r|1]=n:(r=~r,Sa(e,r,t,n)),r}function wa(e,t){let n=Ta(e,t);if(n>=0)return e[n|1]}function Ta(e,t){return Ea(e,t,1)}function Ea(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 va(t,e=>{let t=e;Ia(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Fa(i,a),n}function Fa(e,t){for(let n=0;n{t(e,r)})}}function Ia(e,t,n,r){if(e=Ei(e),!e)return!1;let i=null,a=Mi(e),o=!a&&Ui(e);if(!a&&!o){let t=e.ngModule;if(a=Mi(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)Ia(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{va(a.imports,i=>{Ia(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Fa(e,t)}if(!s){let e=ha(i)||(()=>new i);t({provide:i,useFactory:e,deps:Oa},i),t({provide:ja,useValue:i,multi:!0},i),t({provide:ka,useValue:()=>ua(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;La(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function La(e,t){for(let n of e)Ii(n)&&(n=n.ɵproviders),Array.isArray(n)?La(n,t):t(n)}var Ra=bi({provide:String,useValue:bi});function za(e){return typeof e==`object`&&!!e&&Ra in e}function Ba(e){return!!(e&&e.useExisting)}function Va(e){return!!(e&&e.useFactory)}function Ha(e){return typeof e==`function`}function Ua(e){return!!e.useClass}var Wa=new Fi(``),Ga={},Ka={},qa=void 0;function Ja(){return qa===void 0&&(qa=new Ma),qa}var Ya=class{},Xa=class extends Ya{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,oo(e,e=>this.processProvider(e)),this.records.set(Aa,no(void 0,this)),r.has(`environment`)&&this.records.set(Ya,no(void 0,this));let i=this.records.get(Wa);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(ja,Oa,{self:!0}))}retrieve(e,t){let n=da(t)||0;try{return this.get(e,oa,n)}catch(e){if(Kn(e))return e;throw e}}destroy(){to(this),this._destroyed=!0;let e=nn(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(),nn(e)}}onDestroy(e){return to(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){to(this);let t=Wn(this),n=ra(void 0);try{return e()}finally{Wn(t),ra(n)}}get(e,t=oa,n){if(to(this),Object.hasOwn(e,Hi))return e[Hi](this);let r=da(n),i=Wn(this),a=ra(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=ao(e)&&ki(e);t=n&&this.injectableDefInScope(n)?no(Za(e),Ga):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Ja():this.parent;return t=r&8&&t===oa?null:t,n.get(e,t)}catch(e){let t=ea(e);throw t===-200||t===-201?new _i(t,null):e}finally{ra(a),Wn(i)}}resolveInjectorInitializers(){let e=nn(null),t=Wn(this),n=ra(void 0);try{let e=this.get(ka,Oa,{self:!0});for(let t of e)t()}finally{Wn(t),ra(n),nn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=Ei(e);let t=Ha(e)?e:Ei(e&&e.provide),n=$a(e);if(!Ha(e)&&e.multi===!0){let n=this.records.get(t);n||(n=no(void 0,Ga,!0),n.factory=()=>pa(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=nn(null);try{if(t.value===Ka)throw Zi(``);return t.value===Ga&&(t.value=Ka,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&io(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{nn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Ei(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 Za(e){let t=ki(e),n=t===null?ha(e):t.factory;if(n!==null)return n;if(e instanceof Fi)throw new _i(-204,!1);if(e instanceof Function)return Qa(e);throw new _i(-204,!1)}function Qa(e){if(e.length>0)throw new _i(-204,!1);let t=ji(e);return t===null?()=>new e:()=>t.factory(e)}function $a(e){return za(e)?no(void 0,e.useValue):no(eo(e),Ga)}function eo(e,t,n){let r;if(Ha(e)){let t=Ei(e);return ha(t)||Za(t)}if(za(e))r=()=>Ei(e.useValue);else if(Va(e))r=()=>e.useFactory(...pa(e.deps||[]));else if(Ba(e))r=(t,n)=>ua(Ei(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=Ei(e&&(e.useClass||e.provide));if(ro(e))r=()=>new t(...pa(e.deps));else return ha(t)||Za(t)}return r}function to(e){if(e.destroyed)throw new _i(-205,!1)}function no(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function ro(e){return!!e.deps}function io(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function ao(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function oo(e,t){for(let n of e)Array.isArray(n)?oo(n,t):n&&Ii(n)?oo(n.ɵproviders,t):t(n)}function so(e,t){let n;e instanceof Xa?(to(e),n=e):n=new ca(e);let r=Wn(n),i=ra(void 0);try{return t()}finally{Wn(r),ra(i)}}function co(){return na()!==void 0||Un()!=null}var lo=1;function uo(e){return Array.isArray(e)&&typeof e[lo]==`object`}function fo(e){return Array.isArray(e)&&e[lo]===!0}function po(e){return!!(e.flags&4)}function mo(e){return e.componentOffset>-1}function ho(e){return(e.flags&1)==1}function go(e){return!!e.template}function _o(e){return!!(e[2]&512)}function vo(e){return(e[2]&256)==256}var yo=(function(e){return e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`,e[e.ATTRIBUTE_NO_BINDING=6]=`ATTRIBUTE_NO_BINDING`,e})(yo||{}),bo=`math`;function xo(e){for(;Array.isArray(e);)e=e[0];return e}function So(e,t){return xo(t[e])}function Co(e,t){return xo(t[e.index])}function wo(e,t){return e.data[t]}function To(e,t){return e[t]}function Eo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Do(e,t){let n=t[e];return uo(n)?n:n[0]}function Oo(e){return(e[2]&128)==128}function Pee(e){return fo(e[3])}function ko(e,t){return t==null?null:e[t]}function Ao(e){e[17]=0}function jo(e){e[2]&1024||(e[2]|=1024,Oo(e)&&Po(e))}function Fee(e,t){for(;e>0;)t=t[14],e--;return t}function Mo(e){return!!(e[2]&9216||e[24]?.dirty)}function No(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),Mo(e)&&Po(e)}function Po(e){e[10].changeDetectionScheduler?.notify(0);let t=Io(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!Oo(t)));)t=Io(t)}function Fo(e,t){if(vo(e))throw new _i(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Iee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Io(e){let t=e[3];return fo(t)?t[3]:t}function Lo(e){return e[7]??=[]}function Ro(e){return e.cleanup??=[]}function Lee(e,t,n,r){let i=Lo(t);i.push(n),e.firstCreatePass&&Ro(e).push(r,i.length-1)}var zo={lFrame:fs(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Bo=!1;function Ree(){return zo.lFrame.elementDepthCount}function zee(){zo.lFrame.elementDepthCount++}function Vo(){zo.lFrame.elementDepthCount--}function Ho(){return zo.bindingsEnabled}function Uo(){return zo.skipHydrationRootTNode!==null}function Wo(e){return zo.skipHydrationRootTNode===e}function Go(){zo.skipHydrationRootTNode=null}function Ko(){return zo.lFrame.lView}function qo(){return zo.lFrame.tView}function w(e){return zo.lFrame.contextLView=e,e[8]}function T(e){return zo.lFrame.contextLView=null,e}function Jo(){let e=Yo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Yo(){return zo.lFrame.currentTNode}function Bee(){let e=zo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Xo(e,t){let n=zo.lFrame;n.currentTNode=e,n.isParent=t}function Zo(){return zo.lFrame.isParent}function Qo(){zo.lFrame.isParent=!1}function $o(){return zo.lFrame.contextLView}function es(){return Bo}function ts(e){let t=Bo;return Bo=e,t}function ns(){let e=zo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function rs(){return zo.lFrame.bindingIndex}function Vee(e){return zo.lFrame.bindingIndex=e}function is(){return zo.lFrame.bindingIndex++}function as(e){let t=zo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Hee(){return zo.lFrame.inI18n}function Uee(e,t){let n=zo.lFrame;n.bindingIndex=n.bindingRootIndex=e,os(t)}function Wee(){return zo.lFrame.currentDirectiveIndex}function os(e){zo.lFrame.currentDirectiveIndex=e}function Gee(e){let t=zo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Kee(){return zo.lFrame.currentQueryIndex}function ss(e){zo.lFrame.currentQueryIndex=e}function cs(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ls(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=cs(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=zo.lFrame=ds();return r.currentTNode=t,r.lView=e,!0}function us(e){let t=ds(),n=e[1];zo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ds(){let e=zo.lFrame,t=e===null?null:e.child;return t===null?fs(e):t}function fs(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 ps(){let e=zo.lFrame;return zo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ms=ps;function hs(){let e=ps();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 gs(e){return(zo.lFrame.contextLView=Fee(e,zo.lFrame.contextLView))[8]}function _s(){return zo.lFrame.selectedIndex}function vs(e){zo.lFrame.selectedIndex=e}function ys(){let e=zo.lFrame;return wo(e.tView,e.selectedIndex)}function E(){zo.lFrame.currentNamespace=`svg`}function bs(){xs()}function xs(){zo.lFrame.currentNamespace=null}function Ss(){return zo.lFrame.currentNamespace}var Cs=!0;function ws(){return Cs}function Ts(e){Cs=e}function Es(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 Xa([n||Oa,Na(e)],t||Ja(),null,i)}var Os=class e{static THROW_IF_NOT_FOUND=oa;static NULL=new Ma;static create(e,t){if(Array.isArray(e))return Es({name:``},t,e,``);{let t=e.name??``;return Es({name:t},e.parent,e.providers,t)}}static ɵprov=Oi({token:e,providedIn:`any`,factory:()=>ua(Aa)});static __NG_ELEMENT_ID__=-1},ks=new Fi(``),As=class{static __NG_ELEMENT_ID__=Ms;static __NG_ENV_ID__=e=>e},js=class extends As{_lView;constructor(e){super(),this._lView=e}get destroyed(){return vo(this._lView)}onDestroy(e){let t=this._lView;return Fo(t,e),()=>Iee(t,e)}};function Ms(){return new js(Ko())}var Ns=new Fi(``),Ps=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Xr(!1);debugTaskTracker=C(Ns,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new zr(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=Oi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Fs=class extends Jr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,co()&&(this.destroyRef=C(As,{optional:!0})??void 0,this.pendingTasks=C(Ps,{optional:!0})??void 0)}emit(e){let t=nn(null);try{super.next(e)}finally{nn(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 fr&&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 Is(...e){}function Ls(e){let t,n;function r(){e=Is;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 Rs(e){return queueMicrotask(()=>e()),()=>{e=Is}}var zs=`isAngularZone`,Bs=`isAngularZone_ID`,Vs=0,Hs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Fs(!1);onMicrotaskEmpty=new Fs(!1);onStable=new Fs(!1);onError=new Fs(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new _i(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,Ks(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(zs)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new _i(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new _i(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,Us,Is,Is);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)}},Us={};function Ws(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 Gs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ls(()=>{e.callbackScheduled=!1,qs(e),e.isCheckStableRunning=!0,Ws(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),qs(e)}function Ks(e){let t=()=>{Gs(e)},n=Vs++;e._inner=e._inner.fork({name:`angular`,properties:{[zs]:!0,[Bs]:n,[Bs+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Zs(s))return n.invokeTask(i,a,o,s);try{return Js(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ys(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Js(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Qs(s)&&t(),Ys(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,qs(e),Ws(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 qs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Js(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ys(e){e._nesting--,Ws(e)}var Xs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Fs;onMicrotaskEmpty=new Fs;onStable=new Fs;onError=new Fs;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 Zs(e){return $s(e,`__ignore_ng_zone__`)}function Qs(e){return $s(e,`__scheduler_tick__`)}function $s(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var ec=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},tc=new Fi(``,{factory:()=>{let e=C(Hs),t=C(Ya),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(ec),n.handleError(r))})}}}),nc={provide:ka,useValue:()=>{C(ec,{optional:!0})},multi:!0};function D(e,t){let[n,r,i]=Pn(e,t?.equal),a=n;return a[tn],a.set=r,a.update=i,a.asReadonly=rc.bind(a),a}function rc(){let e=this[tn];if(e.readonlyFn===void 0){let t=()=>this();t[tn]=e,e.readonlyFn=t}return e.readonlyFn}var ic=new Fi(``,{factory:()=>ac}),ac=`ng`,oc=new Fi(``),sc=new Fi(``,{providedIn:`platform`,factory:()=>`unknown`}),cc=new Fi(``,{factory:()=>C(ks).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),lc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=uc}return e})();function uc(){return new lc(Ko(),Jo())}var dc=class{},fc=new Fi(``,{factory:()=>!0}),pc=new Fi(``),mc=(()=>{class e{static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>new hc})}return e})(),hc=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}},gc=class{[tn];constructor(e){this[tn]=e}destroy(){this[tn].destroy()}};function _c(e,t){let n=t?.injector??C(Os),r=t?.manualCleanup===!0?null:n.get(As),i,a=n.get(lc,null,{optional:!0}),o=n.get(dc);return a===null?i=Sc(e,n.get(mc),o):(i=xc(a.view,o,e),r instanceof js&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new gc(i)}var vc={...Bn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=ts(!1);try{Vn(this)}finally{ts(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=nn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],nn(e)}}},yc={...vc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(vn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},bc={...vc,consumerMarkedDirty(){this.view[2]|=8192,Po(this.view),this.notifier.notify(13)},destroy(){if(vn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function xc(e,t,n){let r=Object.create(bc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=Cc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function Sc(e,t,n){let r=Object.create(yc);return r.fn=Cc(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 Cc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function wc(e){return typeof e==`function`&&e[tn]!==void 0}function Tc(e){return wc(e)&&typeof e.set==`function`}var Ec=Symbol(`InputSignalNode#UNSET`),Dc={...Rn,transformFn:void 0,applyValueToInputSignal(e,t){In(e,t)}};function Oc(e){return{toString:e}.toString()}var kc=(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})(kc||{}),Ac=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function jc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Mc=null,Nc=(()=>{Mc=Fc;let e=()=>Fc;return e.ngInherit=!0,e})();function Pc(){return Mc}function Fc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Lc),Ic}function Ic(){let e=zc(this),t=e?.current;if(t){let n=e.previous;if(n===Da)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Lc(e,t,n,r,i){let a=this.declaredInputs[r],o=zc(e)||Bc(e,{previous:Da,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Ac(l&&l.currentValue,n,c===Da),jc(e,t,i,n)}var Rc=`__ngSimpleChanges__`;function zc(e){return Object.hasOwn(e,Rc)&&e[Rc]||null}function Bc(e,t){return e[Rc]=t}var Vc=[],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,Yc(o,a)):Yc(o,a)}var Zc=-1,Qc=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 $c(e){return!!(e.flags&8)}function el(e){return!!(e.flags&16)}function tl(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function ll(e,t){let n=cl(e),r=t;for(;n>0;)r=r[14],n--;return r}var ul=!0;function dl(e){let t=ul;return ul=e,t}var fl=255,pl=5,ml=0,hl={};function gl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Vi)&&(r=n[Vi]),r??=n[Vi]=ml++;let i=r&fl,a=1<>pl)]|=a}function _l(e,t){let n=yl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,vl(r.data,e),vl(t,null),vl(r.blueprint,null));let i=bl(e,t),a=e.injectorIndex;if(ol(i)){let e=sl(i),n=ll(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 vl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function yl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function bl(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=Ll(i),r===null)return Zc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Zc}function xl(e,t,n){gl(e,t,n)}function Sl(e,t,n){if(n&8||e!==void 0)return e;Qi(t,`NodeInjector`)}function Cl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=ra(void 0);try{return i?i.get(t,r,n&8):ia(t,r,n&8)}finally{ra(a)}}return Sl(r,t,n)}function wl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Il(e,t,n,r,hl);if(i!==hl)return i}let i=Tl(e,t,n,r,hl);if(i!==hl)return i}return Cl(t,n,r,i)}function Tl(e,t,n,r,i){let a=kl(n);if(typeof a==`function`){if(!ls(t,e,r))return r&1?Sl(i,n,r):Cl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Qi(n);else return e}finally{ms()}}else if(typeof a==`number`){let i=null,o=yl(e,t),s=Zc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?bl(e,t):t[o+8],s===Zc||!jl(r,!1)?o=-1:(i=t[1],o=sl(s),t=ll(s,t)));o!==-1;){let e=t[1];if(Al(a,o,e.data)){let e=El(o,t,n,i,r,c);if(e!==hl)return e}s=t[o+8],s!==Zc&&jl(r,t[1].data[o+8]===c)&&Al(a,o,t)?(i=e,o=sl(s),t=ll(s,t)):o=-1}}return i}function El(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=Dl(s,o,n,r==null?mo(s)&&ul:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?hl:Ol(t,o,c,s,i)}function Dl(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&&go(e)&&e.type===n)return c}return null}function Ol(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Qc){let s=a;if(s.resolving)throw Zi(``);let c=dl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?ra(s.injectImpl):null;ls(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Uc(n,o[n],t)}finally{l!==null&&ra(l),dl(c),s.resolving=!1,ms()}}return a}function kl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Vi)?e[Vi]:void 0;return typeof t==`number`?t>=0?t&fl:Nl:t}function Al(e,t,n){let r=1<>pl)]&r)}function jl(e,t){return!(e&2)&&!(e&1&&t)}var Ml=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return wl(this._tNode,this._lView,e,da(n),t)}};function Nl(){return new Ml(Jo(),Ko())}function Pl(e){return Oc(()=>{let t=e.prototype.constructor,n=t[Bi]||Fl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[Bi]||Fl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Fl(e){return Di(e)?()=>{let t=Fl(Ei(e));return t&&t()}:ha(e)}function Il(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!_o(o);){let e=Tl(a,o,n,r|2,hl);if(e!==hl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,hl,r);if(t!==hl)return t}t=Ll(o),o=o[14]}a=t}return i}function Ll(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Rl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function zl(){return Bl(Jo(),Ko())}function Bl(e,t){return new Vl(Co(e,t))}var Vl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=zl}return e})();function Hl(e){return e instanceof Vl?e.nativeElement:e}function Ul(){return this._results[Symbol.iterator]()}var Wl=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Jr}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=_a(e);(this._changesDetected=!ga(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Ul};function Gl(e){return(e.flags&128)==128}var Kl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Kl||{}),ql=new Map,Jl=0;function Yl(){return Jl++}function Xl(e){ql.set(e[19],e)}function Zl(e){ql.delete(e[19])}var Ql=`__ngContext__`;function $l(e,t){uo(t)?(e[Ql]=t[19],Xl(t)):e[Ql]=t}function eu(e){return nu(e[12])}function tu(e){return nu(e[4])}function nu(e){for(;e!==null&&!fo(e);)e=e[4];return e}var ru=void 0;function iu(e){ru=e}function au(){if(ru!==void 0)return ru;if(typeof document<`u`)return document;throw new _i(210,!1)}var ou=!1,su=new Fi(``,{factory:()=>ou}),cu=new WeakMap;function lu(e,t){if(typeof e!=`object`||!e)return;let n=cu.get(e);n||(n=new WeakSet,cu.set(e,n)),n.add(t)}function uu(e){return(e.flags&32)==32}var du=()=>null;function fu(e,t,n=!1){return du(e,t,n)}function pu(e,t){let n=e.contentQueries;if(n!==null){let r=nn(null);try{for(let r=0;r|^->||--!>|)/g,Jee=`​$1​`;function Yee(e){return e.replace(Cu,e=>e.replace(qee,Jee))}function Xee(e,t){return e.createText(t)}function Zee(e,t,n){e.setValue(t,n)}function Qee(e,t){return e.createComment(Yee(t))}function wu(e,t,n){return e.createElement(t,n)}function Tu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Eu(e,t,n){e.appendChild(t,n)}function Du(e,t,n,r,i){r===null?Eu(e,t,n):Tu(e,t,n,r,i)}function Ou(e,t,n,r){e.removeChild(null,t,n,r)}function $ee(e,t,n){e.setAttribute(t,`style`,n)}function ete(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function ku(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&tl(e,t,r),i!==null&&ete(e,t,i),a!==null&&$ee(e,t,a)}function Au(e){let t=tte();return t?t.sanitize(yo.URL,e)||``:yu(e,`URL`)?vu(e):Su(qi(e))}function tte(){let e=Ko();return e&&e[10].sanitizer}function ju(e){return e.ownerDocument.defaultView}function Mu(e){return e.ownerDocument}function nte(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 Nu=`ng-template`;function rte(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(Fu(r))return!1;o=!0}}}}}return Fu(r)||o}function Fu(e){return!(e&1)}function ote(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!==``&&!Fu(o)&&(t+=Lu(a,i),i=``),r=o,a||=!Fu(r);n++}return i!==``&&(t+=Lu(a,i)),t}function fte(e){return e.map(dte).join(`,`)}function pte(e){let t=[],n=[],r=1,i=2;for(;r!1});function Vu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Hu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function gte(e){let t=Hu(e,`transition-property`),n=Hu(e,`transition-duration`),r=Hu(e,`transition-delay`),i={propertyName:``,duration:0,animationName:void 0};for(let e=0;ei.duration&&(i.propertyName=t[e],i.duration=a)}return i}function _te(e){let t=Hu(e,`animation-name`),n=Hu(e,`animation-delay`),r=Hu(e,`animation-duration`),i=Hu(e,`animation-iteration-count`),a={animationName:``,propertyName:void 0,duration:0};for(let e=0;ea.duration&&s!==`infinite`&&(a.animationName=t[e],a.duration=o)}return a}function Uu(e,t){return e!==void 0&&e.duration>t.duration}function Wu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Gu(e){let t=e.effect?.getTiming();if(t===void 0)return;let n=typeof t.duration==`number`?t.duration:0,r=(t.delay??0)+n,i=e.playbackRate;return i!==void 0&&i!==0&&i!==1&&(r/=Math.abs(i)),r}function vte(e,t){let n=getComputedStyle(e),r=_te(n),i=gte(n),a=r.duration>i.duration?r:i;Uu(t.get(e),a)||Wu(a)&&t.set(e,a)}function yte(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?vte(e,t):bte(e,t,r)}function bte(e,t,n){let r={animationName:void 0,propertyName:void 0,duration:0};for(let e of n){if(e.effect?.getTiming()?.iterations===1/0)continue;let t=Gu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Uu(t.get(e),r)||Wu(r)&&t.set(e,r)}var Ku=new Set,xte=!1,Ste=1,qu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function Cte(e){return e[9].get(hte,xte)}function wte(e,t,n){let r=Yu.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Yu.set(e,{classList:t,cleanupFns:n})}function Ju(e){let t=Yu.get(e);if(t){for(let e of t.cleanupFns)e();Yu.delete(e)}Xu.delete(e)}var Yu=new WeakMap,Xu=new WeakMap,Zu=new WeakMap;function Qu(e){return e?e[14]??e:null}var $u=new WeakSet;function Tte(e,t,n){let r=Zu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Qu(n);for(let e=r.length-1;e>=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),$u.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 Ete(e,t,n){let r=Qu(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}])}function ed(e){let t=e[26]??={};return t.enter??=new Map}function Dte(e){let t=typeof e==`function`?e():e,n=Array.isArray(t)?t:null;return typeof t==`string`&&(n=t.trim().split(/\s+/).filter(e=>e)),n}function td(e){return e.composedPath?e.composedPath()[0]:e.target}function nd(e,t){let n=Xu.get(t);if(n===void 0)return!0;if(t!==td(e))return!1;let r=e.animation;if(r){let e=Gu(r);if(e!==void 0&&e+Ste{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),cd=[0,1,2,3],ld=(()=>{class e{ngZone=C(Hs);scheduler=C(dc);errorHandler=C(ec,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){C(id,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Hc(kc.AfterRenderHooksStart),this.executing=!0;for(let e of cd)for(let t of this.sequences)if(!t.erroredOrDestroyed&&t.hooks[e])try{t.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let n=t.hooks[e];return n(t.pipelinedValue)},t.snapshot))}catch(e){t.erroredOrDestroyed=!0,this.errorHandler?.handleError(e)}this.executing=!1;for(let e of this.sequences)e.afterRun(),e.once&&(this.sequences.delete(e),e.destroy());for(let e of this.deferredRegistrations)this.sequences.add(e);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Hc(kc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),Po(t),t[2]|=8192)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,t){return t?t.run(rd.AFTER_NEXT_RENDER,e):e()}static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ud=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,a=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[25];e&&(this.view[25]=e.filter(e=>e!==this))}};function dd(e,t){let n=t?.injector??C(Os);return od(`NgAfterNextRender`),Ate(e,n,t,!0)}function kte(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Ate(e,t,n,r){let i=t.get(sd);i.impl??=t.get(ld);let a=t.get(id,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(As),s=t.get(lc,null,{optional:!0}),c=new ud(i.impl,kte(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var fd=new Fi(``,{factory:()=>{let e=C(Ya),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function pd(e,t,n){let r=e.get(fd);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 jte(e,t){let n=e.get(fd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Mte(e,t){let n=e.get(fd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Nte(e){let t=e.get(fd);t.isScheduled||=(dd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Pte(e){let t=e.get(fd);t.scheduler=Nte,t.scheduler(e)}function md(e,t){for(let[n,r]of t)pd(e,r.animateFns)}function hd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&md(r,i)}function gd(e,t,n,r){try{n.get(Aa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&jte(n,i.enter.get(t.index).animateFns);let a=Fte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];vd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Ku.add(e[19]),pd(n,()=>_d(e,t,i||void 0,a,r),i||void 0)}function Fte(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 _d(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&&vd(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),bd(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Ku.delete(e[19]),i(!0)})}else e&&Ku.delete(e[19]),i(!1)}function vd(e,t,n){if(t.type&12){let r=e[t.index];if(fo(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Ku.delete(e[19])),n(!0)})}function xd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;fo(i)?c=i:uo(i)&&(l=!0,i=i[0]);let u=xo(i);e===0&&r!==null?(hd(s,r,a,n),o==null?Eu(t,r,u):Tu(t,r,u,o||null,!0)):e===1&&r!==null?(hd(s,r,a,n),Tu(t,r,u,o||null,!0),Tte(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Ete(a,u,s),$u.delete(u),gd(s,a,n,e=>{if($u.has(u)){$u.delete(u);return}Ou(t,u,l,e)})):e===3&&($u.delete(u),gd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Gd(t,e,n,c,a,r,o)}}function Sd(e,t){wd(e,t),t[0]=null,t[5]=null}function Cd(e,t,n,r,i,a){r[0]=i,r[5]=t,Vd(e,r,n,1,i,a)}function wd(e,t){t[10].changeDetectionScheduler?.notify(9),Vd(e,t,t[11],2,null,null)}function Td(e){let t=e[12];if(!t)return Od(e[1],e);for(;t;){let n=null;if(uo(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)uo(t)&&Od(t[1],t),t=t[3];t===null&&(t=e),uo(t)&&Od(t[1],t),n=t&&t[4]}t=n}}function Ed(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Dd(e,t){if(vo(t))return;let n=t[11];n.destroyNode&&Vd(e,t,n,3,null,null),Td(t)}function Od(e,t){if(vo(t))return;let n=nn(null);try{t[2]&=-129,t[2]|=256,t[24]&&vn(t[24]),Ad(e,t),kd(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&fo(t[3])){n!==t[3]&&Ed(n,t);let r=t[18];r!==null&&r.detachView(e)}Zl(t)}finally{nn(n)}}function kd(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&&tf(e,t,27,!1),Hc(o?kc.TemplateUpdateStart:kc.TemplateCreateStart,i,n),n(r,i)}finally{vs(a),Hc(o?kc.TemplateUpdateEnd:kc.TemplateCreateEnd,i,n)}}function of(e,t,n){pf(e,t,n),(n.flags&64)==64&&mf(e,t,n)}function sf(e,t,n=Co){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a=s&&i<=c){let o=t.data[i],s=r[e+1];rf(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(rf(r,n[o],i,a),l=!0),l}function Tf(e,t){let n=Do(t,e),r=n[1];Ef(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=fu(i,n[9])),Hc(kc.ComponentStart);try{Df(r,n,n[8])}finally{Hc(kc.ComponentEnd,n[8])}}function Ef(e,t){for(let n=t.length;n{Po(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function zf(e){let t=e[24]??Object.create(Bf);return t.lView=e,t}var Bf={...an,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Io(e.lView);for(;t&&!Vf(t[1]);)t=Io(t);t&&jo(t)},consumerOnSignalRead(){this.lView[24]=this}};function Vf(e){return e.type!==2}function Hf(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 Uf=100;function Wf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Gf(e,t)}finally{n.end?.()}}function Gf(e,t){let n=es();try{ts(!0),Zf(e,t);let n=0;for(;Mo(e);){if(n===Uf)throw new _i(103,!1);n++,Zf(e,1)}}finally{ts(n)}}function Kf(e,t,n,r){if(vo(t))return;let i=t[2];us(t);let a=!0,o=null,s=null;Vf(e)?(s=Ff(t),o=pn(s)):rn()===null?(a=!1,s=zf(t),o=pn(s)):t[24]&&=(vn(t[24]),null);try{Ao(t),Vee(e.bindingStartIndex),n!==null&&af(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Gc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Kc(t,n,0,null),qc(t,0)}if(Jf(t),Hf(t),qf(t,0),e.contentQueries!==null&&pu(e,t),a){let n=e.contentCheckHooks;n!==null&&Gc(t,n)}else{let n=e.contentHooks;n!==null&&Kc(t,n,1),qc(t,1)}$f(e,t);let o=e.components;o!==null&&Qf(t,o,0);let s=e.viewQuery;if(s!==null&&mu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Gc(t,n)}else{let n=e.viewHooks;n!==null&&Kc(t,n,2),qc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Nf(t),t[2]&=-73}catch(e){throw Po(t),e}finally{s!==null&&(hn(s,o),a&&Lf(s)),hs()}}function qf(e,t){for(let n=eu(e);n!==null;n=tu(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ba(e,10+t);Sd(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 op(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(ap(e,n),ba(t,n))}this._attachedToViewContainer=!1}Dd(this._lView[1],this._lView)}onDestroy(e){Fo(this._lView,e)}markForCheck(){ep(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){No(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Wf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new _i(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=_o(this._lView),t=this._lView[16];t!==null&&!e&&Ed(t,this._lView),wd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new _i(902,!1);this._appRef=e;let t=_o(this._lView),n=this._lView[16];n!==null&&!t&&sp(n,this._lView),No(this._lView)}},lp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=up;constructor(e,t,n){this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){return new cp(kf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function up(){return dp(Jo(),Ko())}function dp(e,t){return e.type&4?new lp(t,e,Bl(e,t)):null}function fp(e,t,n,r,i){let a=e.data[t];if(a===null)a=pp(e,t,n,r,i),Hee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Bee();a.injectorIndex=e===null?-1:e.injectorIndex}return Xo(a,!0),a}function pp(e,t,n,r,i){let a=Yo(),o=Zo(),s=o?a:a&&a.parent,c=e.data[t]=hp(e,s,n,t,r,i);return mp(e,c,a,o),c}function mp(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 hp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Uo()&&(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:Ss(),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 gp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?_p(e,n):r.push(e);e[6]=r}function _p(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,yp=()=>null;function bp(e,t){return vp(e,t)}function xp(e,t,n){return yp(e,t,n)}var Sp=class{},Cp=class{},wp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>Tp()};function Tp(){let e=Ko(),t=Do(Jo().index,e);return(uo(t)?t:e)[11]}var Ep=(()=>{class e{static ɵprov=Oi({token:e,providedIn:`root`,factory:()=>null})}return e})();function Dp(e){return e.debugInfo?.className||e.type.name||null}var Op={},kp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Op,n);return r!==Op||t===Op?r:this.parentInjector.get(e,t,n)}};function Ap(e,t,n){return e[t]=n}function jp(e,t){return e[t]}function Mp(e,t,n){if(n===Ru)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Np(e,t,n,r){let i=Mp(e,t,n);return Mp(e,t+1,r)||i}function Pp(e,t,n,r,i){let a=Np(e,t,n,r);return Mp(e,t+2,i)||a}function Fp(e,t,n,r,i,a){let o=Np(e,t,n,r);return Np(e,t+2,i,a)||o}function Ip(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&lu(i,a),ep(mo(e)?Do(e.index,t):t,5);let o=t[8],s=Lp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=Lp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function Lp(e,t,n,r){let i=nn(null);try{return Hc(kc.OutputStart,t,n),n(r)!==!1}catch(t){return Sf(e,t),!1}finally{Hc(kc.OutputEnd,t,n),nn(i)}}function Rp(e,t,n,r,i,a,o,s){let c=ho(e),l=!1,u=null;if(!r&&c&&(u=Bp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=Co(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);zp(a)||Vp(r?t=>r(xo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function zp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Bp(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 Vp(e,t,n,r,i,a,o){let s=t.firstCreatePass?Ro(t):null,c=Lo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Hp(e,t,n,r,i){let a=null,o=null,s=null,c=!1,l=e.directiveToIndex.get(n.type);if(typeof l==`number`?a=l:[a,o,s]=l,o!==null&&s!==null&&e.hostDirectiveOutputs&&Object.hasOwn(e.hostDirectiveOutputs,r)){let n=e.hostDirectiveOutputs[r];for(let a=0;a=o&&l<=s)c=!0,Up(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Up(e,t,a,r,r,i)),c}function Up(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Vp(e.index,s,t,i,a,c,!0)}function Wp(){Gp()}function Gp(){let e=Ko(),t=qo(),n=Jo();if(t.firstCreatePass&&Zp(t,n),n.controlDirectiveIndex===-1)return;od(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Jp(e,t,n))}function Kp(){qp()}function qp(){let e=Ko(),t=qo(),n=ys();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Jp(e,t,n))}var Jp=class{lView;tView;tNode;hasPassThrough;constructor(e,t,n){this.lView=e,this.tView=t,this.tNode=n,this.hasPassThrough=!!(n.flags&4096)}get customControl(){return this.tNode.customControlIndex===-1?void 0:this.lView[this.tNode.customControlIndex]}get nativeElement(){return Co(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];Hp(this.tNode,this.lView,n,e,Ip(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];Hp(this.tNode,this.lView,n,t,Ip(this.tNode,this.lView,e))}listenToDom(e,t){Rp(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,Ip(this.tNode,this.lView,t))}setInputOnDirectives(e,t,n){let r=this.tNode.inputs?.[e],i=this.tNode.hostDirectiveInputs?.[e];if(!r&&!i)return!1;let a=!1;if(r)for(let i of r){if(i===this.tNode.controlDirectiveIndex)continue;let r=this.lView[i],o=this.tView.data[i];(!n||n(Xp(r,o,e)))&&(rf(o,r,e,t),a=!0)}if(i)for(let r=0;r0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=Yp(e.directive);r!==null&&n.push(...r);continue}for(let r of e()){if(typeof r==`function`)continue;if(r.inputs)for(let e=0;e1){t.flags|=4096;return}Qp(e,t)}function Qp(e,t){for(let n=t.directiveStart;n{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function $p(e,t){return em(e,t)&&tm(e,t+`Change`)}function em(e,t){return t in e.inputs}function tm(e,t){return t in e.outputs}var nm=Symbol(`BINDING`),rm=new Fi(``);function im(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 vm(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&nf.SignalBased)!==0};return i&&(a.transform=i),a})}function Em(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Dm(e,t,n){let r=t instanceof Ya?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new kp(n,r):n}function Om(e){let t=e.get(Cp,null);if(t===null)throw new _i(407,!1);return{rendererFactory:t,sanitizer:e.get(Ep,null),changeDetectionScheduler:e.get(dc,null),ngReflect:!1,tracingService:e.get(id,null,{optional:!0})}}function km(e,t,n){let r=jm(e);return wu(t,r,r===`svg`?`svg`:r===`math`?bo:n)}function Am(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new _i(905,!1)}function jm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Mm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Tm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Em(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=fte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Hc(kc.DynamicComponentStart);let s=nn(null);try{let s=this.componentDef,c=Dm(s,r||this.ngModule,e),l=Om(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Dp(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{nn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Nm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?cf(l,r,s.encapsulation,t):km(s,l,o??null);Am(u);let d=t.get(rm,null),f=Pm(u,()=>t.get(ks,null)??au());d&&d.addHost(f);let p=a?.some(Im)||i?.some(e=>typeof e!=`function`&&e.bindings.some(Im)),m=Xd(null,c,null,512|Qd(s),null,null,e,l,t,null,fu(u,t,!0));d&&Cm&&f instanceof ShadowRoot&&Fo(m,()=>{d.removeHost(f)}),m[27]=u,us(m);let h=null;try{let e=bm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);ku(l,u,e),$l(u,m),of(c,m,e),hu(c,e,m),xm(c,e),n!==void 0&&Rm(e,this.ngContentSelectors,n),h=Do(e.index,m),m[8]=h[8],Df(c,m,null)}catch(e){throw h!==null&&Zl(h),Zl(m),e}finally{Hc(kc.DynamicComponentEnd),hs()}return new Lm(this.componentType,m,!!p)}};function Nm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:pte(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[nm].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 Im(e){let t=e[nm].kind;return t===`input`||t===`twoWay`}var Lm=class extends Sp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=wo(t[1],27),this.location=Bl(this._tNode,t),this.instance=Do(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new cp(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),ep(Do(n.index,r),1)}get injector(){return new Ml(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__=Bm}return e})();function Bm(){return Wm(Jo(),Ko())}var Vm=class e extends zm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Bl(this._hostTNode,this._hostLView)}get injector(){return new Ml(this._hostTNode,this._hostLView)}get parentInjector(){let e=bl(this._hostTNode,this._hostLView);if(ol(e)){let t=ll(e,this._hostLView),n=sl(e),r=t[1].data[n+8];return new Ml(r,t)}return new Ml(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Hm(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=bp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,Af(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 Mm(Ui(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ya,null);e&&(i=e)}let d=Ui(l.componentType??{}),f=bp(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,Af(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(Pee(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 rp(o,i,a,r),t.attachToViewContainerRef(),ya(Um(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Hm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=ap(this._lContainer,t);n&&(ba(Um(this._lContainer),t),Dd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=ap(this._lContainer,t);return n&&ba(Um(this._lContainer),t)!=null?new cp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Hm(e){return e[8]}function Um(e){return e[8]||=[]}function Wm(e,t){let n,r=t[e.index];return fo(r)?n=r:(n=tp(r,t,null,e),t[e.index]=n,ef(t,n)),Km(n,t,e,r),new Vm(n,e,t)}function Gm(e,t){let n=e[11],r=n.createComment(``),i=Co(t,e);return Tu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Km=Ym,qm=()=>!1;function Jm(e,t,n){return qm(e,t,n)}function Ym(e,t,n,r){if(e[7])return;let i;i=n.type&8?xo(r):Gm(t,n),e[7]=i}var Xm=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Zm=class e{queries;constructor(e=[]){this.queries=e}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries===null?n.length:t.contentQueries[0],i=[];for(let e=0;e0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;ee.trim())}function dh(e,t,n){e.queries===null&&(e.queries=new $m),e.queries.track(new eh(t,n))}function fh(e,t){return e.queries.getByIndex(t)}function ph(e,t){let n=e[1],r=fh(n,t);return r.crossesNgTemplate?oh(n,e,t,[]):ah(n,e,r,t)}function mh(e,t,n){let r,i=wn(()=>{r._dirtyCounter();let n=vh(r,e);if(t&&n===void 0)throw new _i(-951,!1);return n});return r=i[tn],r._dirtyCounter=D(0),r._flatValue=void 0,i}function hh(e){return mh(!0,!1,e)}function gh(e){return mh(!0,!0,e)}function _h(e,t){let n=e[tn];n._lView=Ko(),n._queryIndex=t,n._queryList=sh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function vh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:Oa;let i=sh(n,r),a=ph(n,r);return i.reset(a,Hl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function yh(e){return!!e&&typeof e.then==`function`}function bh(e){return!!e&&typeof e.subscribe==`function`}var xh=class{},Sh=class extends xh{injector;instance=null;constructor(e){super();let t=new Xa([...e.providers,{provide:xh,useValue:this}],e.parent||Ja(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Ch(e,t,n=null){return new Sh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var wh=(()=>{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=Pa(!1,e.type),n=t.length>0?Ch([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=Oi({token:e,providedIn:`environment`,factory:()=>new e(ua(Ya))})}return e})();function k(e){return Oc(()=>{let t=Ah(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Kl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(wh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||gu.Emulated,styles:e.styles||Oa,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&od(`NgStandalone`),jh(n);let r=e.dependencies;return n.directiveDefs=Mh(r,Th),n.pipeDefs=Mh(r,Gi),n.id=Nh(n),n})}function Th(e){return Ui(e)||Wi(e)}function Eh(e,t){if(e==null)return Da;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=nf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Dh(e){if(e==null)return Da;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Oh(e){return Oc(()=>{let t=Ah(e);return jh(t),t})}function kh(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 Ah(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||Da,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Oa,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Eh(e.inputs,t),outputs:Dh(e.outputs),debugInfo:null}}function jh(e){e.features?.forEach(t=>t(e))}function Mh(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 Nh(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 Ph=new Fi(``),Fh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=C(Ph,{optional:!0})??[];injector=C(Os);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=so(this.injector,t);if(yh(n))e.push(n);else if(bh(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=Rl({token:e,factory:e.ɵfac})}return e})();function Ih(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function Lh(e){return Object.getPrototypeOf(e.prototype).constructor}function Rh(e){let t=Lh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Li)?t[Li]:void 0,o=Object.hasOwn(t,Ri)?t[Ri]:void 0;if(go(e))i=a??o;else{if(a)throw new _i(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=Vh(e.inputs),t.declaredInputs=Vh(e.declaredInputs),t.outputs=Vh(e.outputs);let n=i.hostBindings;n&&Wh(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&Hh(e,a),o&&Uh(e,o),zh(e,i),xi(e.outputs,i.outputs),go(i)&&i.data.animation){let t=e.data;t.animation=(t.animation||[]).concat(i.data.animation)}}let t=i.features;if(t)for(let r=0;r=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=il(i.hostAttrs,n=il(n,i.hostAttrs))}}function Vh(e){return e===Da?{}:e===Oa?[]:e}function Hh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Uh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Wh(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function Gh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=il(e.mergedAttrs,e.attrs);let t=e.tView=qd(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),Xo(e,!1);let c=Yh(n,t,e,r);ws()&&Id(n,t,c,e),$l(c,t);let l=tp(c,t,c,e);t[r+27]=l,ef(t,l),Jm(l,e,t)}function Kh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=fp(t,d,4,o||null,s||null),Ho()&&om(t,e,f,ko(t.consts,l),gf),Wc(t,f)):f=t.data[d],Gh(f,e,t,n,r,i,a,c),ho(f)&&of(t,e,f),l!=null&&sf(e,f,u),f}function qh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=fp(t,d,4,o||null,s||null),l!=null){let e=ko(t.consts,l);f.localNames=[];for(let t=0;t{throw new _i(600,``)})}var eg=10,tg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=C(tc);afterRenderManager=C(sd);zonelessEnabled=C(fc);rootEffectScheduler=C(mc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Jr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=C(Ps);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(hi(e=>!e))}constructor(){C(id,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=C(Ya);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Os.NULL){return this._injector.get(Hs).run(()=>{if(Hc(kc.BootstrapComponentStart),!this._injector.get(Fh).done)throw new _i(405,``);let r=Ui(e),i=this._injector.get(xh),a=new Mm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=ng(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Zh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),rg(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Hc(kc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Hc(kc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(rd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Hc(kc.ChangeDetectionEnd),new _i(101,!1);let e=nn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,nn(e),this.afterTick.next(),Hc(kc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Cp,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Mo(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;rg(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(Qh,[]).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),()=>rg(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new _i(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=Rl({token:e,factory:e.ɵfac})}return e})();function ng(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function rg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function A(e,t,n,r){let i=Ko();return Mp(i,is(),t)&&(qo(),_f(ys(),i,e,t,n,r)),A}function ig(e){if(od(`NgAnimateEnter`),!qu)return ig;let t=Ko();if(Cte(t))return ig;let n=Jo(),r=t[9].get(Hs);return Ote(ed(t),n,()=>ag(t,n,e,r)),Pte(t[9]),md(t[9],ed(t)),ig}function ag(e,t,n,r){let i=Co(t,e),a=e[11],o=Dte(n),s=[],c=!1,l=e=>{if(td(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{td(e)===i&&(nd(e,i)&&(c=!0),og(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),wte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(yte(i,Xu,qu),!Xu.has(i))){for(let e of o)a.removeClass(i,e);Ju(i)}})})}}function og(e,t,n){let r=Yu.get(t);if(td(e)===t&&r&&nd(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Ju(t)}}var sg=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 cg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function lg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){nn(r);let c=t.length-1;for(nn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=cg(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=cg(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 pg,a??=fg(e,o,s,n),ug(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;)dg(e,i,n,o,t[o]),o++}else if(t!=null){nn(r);let c=t[Symbol.iterator]();nn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=cg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new pg,a??=fg(e,o,s,n);let u=n(o,r);if(ug(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;)dg(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 ug(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function dg(e,t,n,r,i){if(ug(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function fg(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 pg=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 j(e,t,n,r,i,a,o,s){od(`NgControlFlow`);let c=Ko(),l=qo();return qh(c,l,e,t,n,r,i,ko(l.consts,a),256,o,s),mg}function mg(e,t,n,r,i,a,o,s){od(`NgControlFlow`);let c=Ko(),l=qo();return qh(c,l,e,t,n,r,i,ko(l.consts,a),512,o,s),mg}function M(e,t){od(`NgControlFlow`);let n=Ko(),r=is(),i=n[r]===Ru?-1:n[r],a=i===-1?void 0:bg(n,27+i);if(Mp(n,r,e)){let r=nn(null);try{if(a!==void 0&&ip(a,0),e!==-1){let r=27+e,i=bg(n,r),a=Tg(n[1],r),o=xp(i,a,n);rp(i,kf(n,a,t,{dehydratedView:o}),0,Af(a,o))}}finally{nn(r)}}else if(a!==void 0){let e=np(a,0);e!==void 0&&(e[8]=t)}}var hg=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 gg(e){return e}function _g(e,t){return t}var vg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function N(e,t,n,r,i,a,o,s,c,l,u,d,f){od(`NgControlFlow`);let p=Ko(),m=qo(),h=c!==void 0,g=Ko(),_=new vg(h,s?o.bind(g[15][8]):o);g[27+e]=_,qh(p,m,e+1,t,n,r,i,ko(m.consts,a),256),h&&qh(p,m,e+2,c,l,u,d,ko(m.consts,f),512)}var yg=class extends sg{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,rp(this.lContainer,t,e,Af(this.templateTNode,n)),xg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Sg(this.lContainer,e),Cg(this.lContainer,e)}create(e,t){let n=bp(this.lContainer,this.templateTNode.tView.ssrId);return kf(this.hostLView,this.templateTNode,new hg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Dd(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];Mte(e,r),Ku.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Sg(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 Cg(e,t){return ap(e,t)}function wg(e,t){return np(e,t)}function Tg(e,t){return wo(e,t)}function F(e,t,n){let r=Ko();return Mp(r,is(),t)&&(qo(),uf(ys(),r,e,t,r[11],n)),F}function Eg(e,t,n,r,i){Cf(t,e,n,i?`class`:`style`,r)}function I(e,t,n,r){let i=Ko(),a=i[1],o=e+27,s=a.firstCreatePass?bm(o,i,2,t,gf,Ho(),n,r):a.data[o];if(mo(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Dp(o),()=>(Dg(e,t,i,s,r),I))}}return Dg(e,t,i,s,r),I}function Dg(e,t,n,r,i){if(bf(r,n,e,t,kg),ho(r)){let e=n[1];of(e,n,r),hu(e,r,n)}i!=null&&sf(n,r)}function L(){let e=qo(),t=xf(Jo());return e.firstCreatePass&&xm(e,t),Wo(t)&&Go(),Vo(),t.classesWithoutHost!=null&&$c(t)&&Eg(e,t,Ko(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&el(t)&&Eg(e,t,Ko(),t.stylesWithoutHost,!1),L}function R(e,t,n,r){return I(e,t,n,r),L(),R}function z(e,t,n,r){let i=Ko(),a=i[1],o=e+27,s=a.firstCreatePass?Sm(o,a,2,t,n,r):a.data[o];return bf(s,i,e,t,kg),r!=null&&sf(i,s),z}function B(){return Wo(xf(Jo()))&&Go(),Vo(),B}function Og(e,t,n,r){return z(e,t,n,r),B(),Og}var kg=(e,t,n,r,i)=>(Ts(!0),wu(t[11],r,Ss()));function Ag(e,t,n){let r=Ko(),i=r[1],a=e+27,o=i.firstCreatePass?bm(a,r,8,`ng-container`,gf,Ho(),t,n):i.data[a];if(bf(o,r,e,`ng-container`,Ng),ho(o)){let e=r[1];of(e,r,o),hu(e,o,r)}return n!=null&&sf(r,o),Ag}function jg(){let e=qo(),t=xf(Jo());return e.firstCreatePass&&xm(e,t),jg}function Mg(e,t,n){return Ag(e,t,n),jg(),Mg}var Ng=(e,t,n,r,i)=>(Ts(!0),Qee(t[11],``));function V(){return Ko()}function Pg(e,t,n){let r=Ko();return Mp(r,is(),t)&&(qo(),df(ys(),r,e,t,r[11],n)),Pg}var Fg=void 0;function Ig(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Lg=[`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`]],Fg,[[`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`]],Fg,[[`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}`,Fg,Fg,Fg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Ig],Rg=Object.create(null);function zg(e){let t=Hg(e),n=Bg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Bg(r),n)return n;if(r===`en`)return Lg;throw new _i(701,!1)}function Bg(e){if(!(e in Rg)){let t=aa.ng&&aa.ng.common&&aa.ng.common.locales&&aa.ng.common.locales[e];return t!==void 0&&(Rg[e]=t),t}return Rg[e]}var Vg={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 Hg(e){return e.toLowerCase().replace(/_/g,`-`)}var Ug=`en-US`;function Wg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Ko(),i=qo(),a=Jo();return Gg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Ko(),i=qo(),a=Jo();return(a.type&3||n)&&Rp(a,i,r,n,r[11],e,t,Ip(a,r,t)),U}function Gg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Ip(r,t,a),Rp(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 t_(e){return(e&2)==2}function n_(e,t){return e&131071|t<<17}function r_(e){return e|2}function i_(e){return(e&131068)>>2}function a_(e,t){return e&-131069|t<<2}function o_(e){return(e&1)==1}function s_(e){return e|1}function c_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=e_(o),c=i_(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=e_(e[s+1]);e[r+1]=$g(t,s),t!==0&&(e[t+1]=a_(e[t+1],r)),e[s+1]=n_(e[s+1],r)}else e[r+1]=$g(s,0),s!==0&&(e[s+1]=a_(e[s+1],r)),s=r}else e[r+1]=$g(c,0),s===0?s=r:e[c+1]=a_(e[c+1],r),c=r;l&&(e[r+1]=r_(e[r+1])),u_(e,u,r,!0),u_(e,u,r,!1),l_(t,u,e,r,a),o=$g(s,c),a?t.classBindings=o:t.styleBindings=o}function l_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&Ta(a,t)>=0&&(n[r+1]=s_(n[r+1]))}function u_(e,t,n,r){let i=e[n+1],a=t===null,o=r?e_(i):i_(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];d_(n,t)&&(s=!0,e[o+1]=r?s_(i):r_(i)),o=r?e_(i):i_(i)}s&&(e[n+1]=r?r_(i):s_(i))}function d_(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 f_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function p_(e){return e.substring(f_.key,f_.keyEnd)}function m_(e){return g_(e),h_(e,__(e,0,f_.textEnd))}function h_(e,t){let n=f_.textEnd;return n===t?-1:(t=f_.keyEnd=v_(e,f_.key=t,n),__(e,t,n))}function g_(e){f_.key=0,f_.keyEnd=0,f_.value=0,f_.valueEnd=0,f_.textEnd=e.length}function __(e,t,n){for(;t32;)t++;return t}function y_(e,t,n){return S_(e,t,n,!1),y_}function G(e,t){return S_(e,t,null,!0),G}function b_(e){C_(N_,x_,e,!0)}function x_(e,t){for(let n=m_(t);n>=0;n=h_(t,n))Ca(e,p_(t),!0)}function S_(e,t,n,r){let i=Ko(),a=qo(),o=as(2);if(a.firstUpdatePass&&T_(a,e,o,r),t!==Ru&&Mp(i,o,t)){let s=a.data[_s()];F_(a,s,i,i[11],e,i[o+1]=Ite(t,n),r,o)}}function C_(e,t,n,r){let i=qo(),a=as(2);i.firstUpdatePass&&T_(i,null,a,r);let o=Ko();if(n!==Ru&&Mp(o,a,n)){let s=i.data[_s()];if(R_(s,r)&&!w_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=Ci(e,n||``)),Eg(i,s,o,n,r)}else P_(i,s,o,o[11],o[a+1],o[a+1]=M_(e,t,n),r,a)}}function w_(e,t){return t>=e.expandoStartIndex}function T_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[_s()],o=w_(e,n);R_(a,r)&&t===null&&!o&&(t=!1),t=E_(i,a,t,r),c_(i,a,t,n,o,r)}}function E_(e,t,n,r){let i=Gee(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=A_(null,e,t,n,r),n=j_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=A_(i,e,t,n,r),a===null){let n=D_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=A_(null,e,t,n[1],r),n=j_(n,t.attrs,r),O_(e,t,r,n))}else a=k_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function D_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(i_(r)!==0)return e[e_(r)]}function O_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[e_(i)]=r}function k_(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===Ru&&(u=l?Oa:void 0);let d=l?wa(u,r):c===r?u:void 0;if(a&&!L_(d)&&(d=wa(t,r)),L_(d)&&(s=d,o))return s;let f=e[i+1];i=o?e_(f):i_(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=wa(e,r))}return s}function L_(e){return e!==void 0}function Ite(e,t){return e==null||e===``||(typeof t==`string`?e=vu(e)+t:typeof e==`object`&&(e=Si(vu(e)))),e}function R_(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Ko(),r=qo(),i=e+27,a=r.firstCreatePass?fp(r,i,1,t,null):r.data[i],o=Lte(r,n,a,t);n[i]=o,ws()&&Id(r,n,o,a),Xo(a,!1)}var Lte=(e,t,n,r)=>(Ts(!0),Xee(t[11],r));function z_(e,t,n,r=``){return Mp(e,is(),n)?t+qi(n)+r:Ru}function Rte(e,t,n,r,i,a=``){let o=Np(e,rs(),n,i);return as(2),o?t+qi(n)+r+qi(i)+a:Ru}function zte(e,t,n,r,i,a,o,s=``){let c=Pp(e,rs(),n,i,o);return as(3),c?t+qi(n)+r+qi(i)+a+qi(o)+s:Ru}function Bte(e,t,n,r,i,a,o,s,c,l=``){let u=Fp(e,rs(),n,i,o,c);return as(4),u?t+qi(n)+r+qi(i)+a+qi(o)+s+qi(c)+l:Ru}function q(e){return J(``,e),q}function J(e,t,n){let r=Ko(),i=z_(r,e,t,n);return i!==Ru&&H_(r,_s(),i),J}function Y(e,t,n,r,i){let a=Ko(),o=Rte(a,e,t,n,r,i);return o!==Ru&&H_(a,_s(),o),Y}function B_(e,t,n,r,i,a,o){let s=Ko(),c=zte(s,e,t,n,r,i,a,o);return c!==Ru&&H_(s,_s(),c),B_}function V_(e,t,n,r,i,a,o,s,c){let l=Ko(),u=Bte(l,e,t,n,r,i,a,o,s,c);return u!==Ru&&H_(l,_s(),u),V_}function H_(e,t,n){let r=So(t,e);Zee(e[11],r,n)}function U_(e,t,n){Tc(t)&&(t=t());let r=Ko();return Mp(r,is(),t)&&(qo(),uf(ys(),r,e,t,r[11],n)),U_}function W_(e,t){let n=Tc(e);return n&&e.set(t),n}function G_(e,t){let n=Ko(),r=qo(),i=Jo();return Gg(r,n,n[11],i,e,t),G_}var K_={};function q_(e){od(`NgLet`);let t=qo(),n=Ko(),r=e+27;return Xo(fp(t,r,128,null,null),!1),Eo(t,n,r,K_),q_}function J_(e){return Eo(qo(),Ko(),_s(),e),e}function Y_(e){let t=To($o(),27+e);if(t===K_)throw new _i(314,!1);return t}function X_(e,t,n=``){return z_(Ko(),e,t,n)}function Z_(e,t,n){let r=qo();r.firstCreatePass&&Q_(t,r.data,r.blueprint,go(e),n)}function Q_(e,t,n,r,i){if(e=Ei(e),Array.isArray(e))for(let a=0;a>20;if(Ha(e)||!e.multi){let r=new Qc(l,i,am,null),p=tv(c,t,i?u:u+f,d);p===-1?(xl(_l(s,o),a,c),$_(a,e,t.length),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{let p=tv(c,t,u+f,d),m=tv(c,t,u,u+f),h=p>=0&&n[p],g=m>=0&&n[m];if(i&&!g||!i&&!h){xl(_l(s,o),a,c);let u=Ute(i?Hte:Vte,n.length,i,r,l,e);!i&&g&&(n[m].providerFactory=u),$_(a,e,t.length,0),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(u),o.push(u)}else{let t=ev(n[i?m:p],l,!i&&r);$_(a,e,p>-1?p:m,t)}!i&&r&&g&&n[m].componentProviders++}}}function $_(e,t,n,r){let i=Ha(t),a=Ua(t);if(i||a){let o=(a?Ei(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||=[];if(!i&&t.multi){let e=a.indexOf(n);e===-1?a.push(n,[r,o]):a[e+1].push(r,o)}else a.push(n,o)}}}function ev(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function tv(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>Z_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>Z_(e,n?n(t):t,!0))}}function iv(e,t){let n=ns()+e,r=Ko();return r[n]===Ru?Ap(r,n,t()):jp(r,n)}function av(e,t,n){return cv(Ko(),ns(),e,t,n)}function ov(e,t,n,r){return lv(Ko(),ns(),e,t,n,r)}function Wte(e,t,n,r,i,a,o){return Gte(Ko(),ns(),e,t,n,r,i,a)}function sv(e,t){let n=e[t];return n===Ru?void 0:n}function cv(e,t,n,r,i,a){let o=t+n;return Mp(e,o,i)?Ap(e,o+1,a?r.call(a,i):r(i)):sv(e,o+1)}function lv(e,t,n,r,i,a,o){let s=t+n;return Np(e,s,i,a)?Ap(e,s+2,o?r.call(o,i,a):r(i,a)):sv(e,s+2)}function Gte(e,t,n,r,i,a,o,s,c){let l=t+n;return Fp(e,l,i,a,o,s)?Ap(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):sv(e,l+4)}function uv(e,t){let n=qo(),r,i=e+27;n.firstCreatePass?(r=Kte(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=ha(r.type,!0)),o=ra(am);try{let e=dl(!1),t=a();return dl(e),Eo(n,Ko(),i,t),t}finally{ra(o)}}function Kte(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function dv(e,t,n){let r=e+27,i=Ko(),a=To(i,r);return pv(i,r)?cv(i,ns(),t,a.transform,n,a):a.transform(n)}function fv(e,t,n,r){let i=e+27,a=Ko(),o=To(a,i);return pv(a,i)?lv(a,ns(),t,o.transform,n,r,o):o.transform(n,r)}function pv(e,t){return e[1].data[t].pure}function mv(e,t){return dp(e,t)}var qte=(()=>{class e{applicationErrorHandler=C(tc);appRef=C(tg);taskService=C(Ps);ngZone=C(Hs);zonelessEnabled=C(fc);tracing=C(id,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new fr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Bs):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(C(pc,{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?Rs:Ls;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=Rl({token:e,factory:e.ɵfac})}return e})();function Jte(){return[{provide:dc,useExisting:qte},{provide:Hs,useClass:Xs},{provide:fc,useValue:!0}]}function Yte(){return typeof $localize<`u`&&$localize.locale||`en-US`}var hv=new Fi(``,{factory:()=>C(hv,{optional:!0,skipSelf:!0})||Yte()}),gv=class{destroyed=!1;listeners=null;errorHandler=C(ec,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=C(As);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new _i(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(yi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=nn(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&&Xte(this.listeners)),nn(t),this.isEmitting=!1}}};function Xte(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return wn(e,t?.equal)}function Z(e){return Zn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Zte=e=>e;function Q(e,t){return typeof e==`function`?_v(qn(e,Zte,t?.equal),t?.debugName,t?.set):_v(qn(e.source,e.computation,e.equal),e.debugName,e.set)}function _v(e,t,n){let r=e[tn],i=e;if(n!==void 0){let t=e=>Jn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Jn(r,e),i.update=e=>Yn(r,e);return i.asReadonly=rc.bind(e),i}var vv=!1;function Qte(){return vv}function yv(e){vv=e}function bv(e,t){let n=Object.create(Dc);n.value=e,n.transformFn=t?.transform;function r(){if(on(n),n.value===Ec)throw new _i(-950,null);return n.value}return r[tn]=n,r}function xv(e){return new gv}function Sv(e,t){return bv(e,t)}function $te(e){return bv(Ec,e)}var $=(Sv.required=$te,Sv);function Cv(e,t){let n=Object.create(Dc),r=new gv;n.value=e;function i(){return on(n),wv(n.value),n.value}return i[tn]=n,i.asReadonly=rc.bind(i),i.set=e=>{n.equal(n.value,e)||(In(n,e),r.emit(e))},i.update=e=>{wv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function wv(e){if(e===Ec)throw new _i(952,!1)}function Tv(e,t){return Cv(e,t)}function ene(e){return Cv(Ec,e)}var Ev=(Tv.required=ene,Tv);function Dv(e,t){return hh(t)}function tne(e,t){return gh(t)}var Ov=(Dv.required=tne,Dv),nne=(()=>{class e{static __NG_ELEMENT_ID__=rne}return e})();function rne(e){return ine(Jo(),Ko(),(e&16)==16)}function ine(e,t,n){if(mo(e)&&!n){let n=Do(e.index,t);return new cp(n,n)}if(e.type&175){let e=t[15];return new cp(e,t)}return null}var kv=new Fi(``),ane=new Fi(``);function Av(e){return!e.moduleRef}function one(e){let t=Av(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Hs);return n.run(()=>{Av(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(tc),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Av(e)){let n=()=>t.destroy(),r=e.platformInjector.get(kv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(kv);n.add(t),e.moduleRef.onDestroy(()=>{rg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return cne(r,n,()=>{let n=t.get(Ps),r=n.add(),i=t.get(Fh);return i.runInitializers(),i.donePromise.then(()=>{if(Wg(t.get(hv,Ug)||`en-US`),!t.get(ane,!0))return Av(e)?t.get(tg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Av(e)){let n=t.get(tg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return sne?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var sne;function cne(e,t,n){try{let r=n();return yh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var jv=null;function lne(e=[],t){return Os.create({name:t,providers:[{provide:Wa,useValue:`platform`},{provide:kv,useValue:new Set([()=>jv=null])},...e]})}function une(e=[]){if(jv)return jv;let t=lne(e);return jv=t,$h(),dne(t),t}function dne(e){let t=e.get(oc,null);so(e,()=>{t?.forEach(e=>e())})}function fne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Hc(kc.BootstrapApplicationStart);try{let e=i?.injector??une(r);return one({r3Injector:new Sh({providers:[Jte(),nc,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Hc(kc.BootstrapApplicationEnd)}}function Mv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var Nv=Symbol(`NOT_SET`),Pv=new Set,pne={...Rn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Nv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(on(r),r.value),r.signal[tn]=r,r.registerCleanupFn=e=>(r.cleanup??=new Set).add(e),this.nodes[e]=r,this.hooks[e]=e=>r.phaseFn(e)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??Pv)t()}finally{vn(e)}}};function Fv(e,t){let n=t?.injector??C(Os),r=n.get(dc),i=n.get(sd),a=n.get(id,null,{optional:!0});i.impl??=n.get(ld);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(lc,null,{optional:!0}),c=new mne(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var Iv=null;function Lv(){return Iv}function hne(e){Iv??=e}var gne=class{},Rv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Rv||{}),zv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(zv||{}),Bv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Bv||{}),Vv={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 _ne(e){return zg(e)[Vg.LocaleId]}function vne(e,t,n){let r=zg(e);return qv(qv([r[Vg.DayPeriodsFormat],r[Vg.DayPeriodsStandalone]],t),n)}function yne(e,t,n){let r=zg(e);return qv(qv([r[Vg.DaysFormat],r[Vg.DaysStandalone]],t),n)}function bne(e,t,n){let r=zg(e);return qv(qv([r[Vg.MonthsFormat],r[Vg.MonthsStandalone]],t),n)}function xne(e,t){let n=zg(e)[Vg.Eras];return qv(n,t)}function Hv(e,t){return qv(zg(e)[Vg.DateFormat],t)}function Uv(e,t){return qv(zg(e)[Vg.TimeFormat],t)}function Wv(e,t){let n=zg(e)[Vg.DateTimeFormat];return qv(n,t)}function Gv(e,t){let n=zg(e),r=n[Vg.NumberSymbols][t];if(r===void 0){if(t===Vv.CurrencyDecimal)return n[Vg.NumberSymbols][Vv.Decimal];if(t===Vv.CurrencyGroup)return n[Vg.NumberSymbols][Vv.Group]}return r}function Kv(e){if(!e[Vg.ExtraData])throw new _i(2303,!1)}function Sne(e){let t=zg(e);return Kv(t),(t[Vg.ExtraData][2]||[]).map(e=>typeof e==`string`?Jv(e):[Jv(e[0]),Jv(e[1])])}function Cne(e,t,n){let r=zg(e);return Kv(r),qv(qv([r[Vg.ExtraData][0],r[Vg.ExtraData][1]],t)||[],n)||[]}function qv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new _i(2304,!1)}function Jv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var wne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Yv=Object.create(null),Tne=/((?:[^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]*)/,Ene=256;function Dne(e,t,n,r){let i=Lne(e);One(t),t=Zv(n,t)||t;let a=[],o;for(;t;)if(o=Tne.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=cy(r,s),i=Ine(i,r));let c=``;return a.forEach(e=>{let t=Pne(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function One(e){if(e.length>Ene)throw new _i(2300,!1)}function Xv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Zv(e,t){let n=_ne(e);if(Yv[n]??=Object.create(null),Yv[n][t])return Yv[n][t];let r=``;switch(t){case`shortDate`:r=Hv(e,Bv.Short);break;case`mediumDate`:r=Hv(e,Bv.Medium);break;case`longDate`:r=Hv(e,Bv.Long);break;case`fullDate`:r=Hv(e,Bv.Full);break;case`shortTime`:r=Uv(e,Bv.Short);break;case`mediumTime`:r=Uv(e,Bv.Medium);break;case`longTime`:r=Uv(e,Bv.Long);break;case`fullTime`:r=Uv(e,Bv.Full);break;case`short`:let t=Zv(e,`shortTime`),n=Zv(e,`shortDate`);r=Qv(Wv(e,Bv.Short),[t,n]);break;case`medium`:let i=Zv(e,`mediumTime`),a=Zv(e,`mediumDate`);r=Qv(Wv(e,Bv.Medium),[i,a]);break;case`long`:let o=Zv(e,`longTime`),s=Zv(e,`longDate`);r=Qv(Wv(e,Bv.Long),[o,s]);break;case`full`:let c=Zv(e,`fullTime`),l=Zv(e,`fullDate`);r=Qv(Wv(e,Bv.Full),[c,l])}return r&&(Yv[n][t]=r),r}function Qv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function $v(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 kne(s,t);let c=Gv(o,Vv.MinusSign);return $v(s,t,c,r,i)}}function Ane(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 _i(2301,!1)}}function ty(e,t,n=Rv.Format,r=!1){return function(i,a){return jne(i,a,e,t,n,r)}}function jne(e,t,n,r,i,a){switch(n){case 2:return bne(t,i,r)[e.getMonth()];case 1:return yne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Sne(t),a=Cne(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?`+`:``)+$v(o,2,a)+$v(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+$v(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+$v(o,2,a)+`:`+$v(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+$v(o,2,a)+`:`+$v(Math.abs(i%60),2,a);default:throw new _i(2310,!1)}}}var Mne=0,ry=4;function Nne(e){let t=Xv(e,Mne,1).getDay();return Xv(e,0,1+(t<=ry?ry:11)-t)}function iy(e){let t=e.getDay(),n=t===0?-3:ry-t;return Xv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function ay(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=iy(n),t=Nne(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return $v(i,e,Gv(r,Vv.MinusSign))}}function oy(e,t=!1){return function(n,r){return $v(iy(n).getFullYear(),e,Gv(r,Vv.MinusSign),t)}}var sy=Object.create(null);function Pne(e){if(sy[e])return sy[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=ty(3,zv.Abbreviated);break;case`GGGG`:t=ty(3,zv.Wide);break;case`GGGGG`:t=ty(3,zv.Narrow);break;case`y`:t=ey(0,1,0,!1,!0);break;case`yy`:t=ey(0,2,0,!0,!0);break;case`yyy`:t=ey(0,3,0,!1,!0);break;case`yyyy`:t=ey(0,4,0,!1,!0);break;case`Y`:t=oy(1);break;case`YY`:t=oy(2,!0);break;case`YYY`:t=oy(3);break;case`YYYY`:t=oy(4);break;case`M`:case`L`:t=ey(1,1,1);break;case`MM`:case`LL`:t=ey(1,2,1);break;case`MMM`:t=ty(2,zv.Abbreviated);break;case`MMMM`:t=ty(2,zv.Wide);break;case`MMMMM`:t=ty(2,zv.Narrow);break;case`LLL`:t=ty(2,zv.Abbreviated,Rv.Standalone);break;case`LLLL`:t=ty(2,zv.Wide,Rv.Standalone);break;case`LLLLL`:t=ty(2,zv.Narrow,Rv.Standalone);break;case`w`:t=ay(1);break;case`ww`:t=ay(2);break;case`W`:t=ay(1,!0);break;case`d`:t=ey(2,1);break;case`dd`:t=ey(2,2);break;case`c`:case`cc`:t=ey(7,1);break;case`ccc`:t=ty(1,zv.Abbreviated,Rv.Standalone);break;case`cccc`:t=ty(1,zv.Wide,Rv.Standalone);break;case`ccccc`:t=ty(1,zv.Narrow,Rv.Standalone);break;case`cccccc`:t=ty(1,zv.Short,Rv.Standalone);break;case`E`:case`EE`:case`EEE`:t=ty(1,zv.Abbreviated);break;case`EEEE`:t=ty(1,zv.Wide);break;case`EEEEE`:t=ty(1,zv.Narrow);break;case`EEEEEE`:t=ty(1,zv.Short);break;case`a`:case`aa`:case`aaa`:t=ty(0,zv.Abbreviated);break;case`aaaa`:t=ty(0,zv.Wide);break;case`aaaaa`:t=ty(0,zv.Narrow);break;case`b`:case`bb`:case`bbb`:t=ty(0,zv.Abbreviated,Rv.Standalone,!0);break;case`bbbb`:t=ty(0,zv.Wide,Rv.Standalone,!0);break;case`bbbbb`:t=ty(0,zv.Narrow,Rv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=ty(0,zv.Abbreviated,Rv.Format,!0);break;case`BBBB`:t=ty(0,zv.Wide,Rv.Format,!0);break;case`BBBBB`:t=ty(0,zv.Narrow,Rv.Format,!0);break;case`h`:t=ey(3,1,-12);break;case`hh`:t=ey(3,2,-12);break;case`H`:t=ey(3,1);break;case`HH`:t=ey(3,2);break;case`m`:t=ey(4,1);break;case`mm`:t=ey(4,2);break;case`s`:t=ey(5,1);break;case`ss`:t=ey(5,2);break;case`S`:t=ey(6,1);break;case`SS`:t=ey(6,2);break;case`SSS`:t=ey(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=ny(0);break;case`ZZZZZ`:t=ny(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=ny(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=ny(2);break;default:return null}return sy[e]=t,t}function cy(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function Fne(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Ine(e,t,n){let r=e.getTimezoneOffset();return Fne(e,-1*(cy(t,r)-r))}function Lne(e){if(ly(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 Xv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(wne))return Rne(n)}let t=new Date(e);if(!ly(t))throw new _i(2311,!1);return t}function Rne(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 ly(e){return e instanceof Date&&!isNaN(e.valueOf())}var uy=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C(Os);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)(am(zm))};static ɵdir=Oh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Nc]})}return e})();function dy(e,t){return new _i(2100,!1)}var fy=`mediumDate`,py=new Fi(``),my=new Fi(``),hy=(()=>{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??fy,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Dne(t,e,i||this.locale,a)}catch(t){throw dy(e,t.message)}}static ɵfac=function(t){return new(t||e)(am(hv,16),am(py,24),am(my,24))};static ɵpipe=kh({name:`date`,type:e,pure:!0})}return e})(),gy=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=kh({name:`json`,type:e,pure:!1})}return e})();function _y(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 vy=`browser`,yy=class{_doc;constructor(e){this._doc=e}manager},by=(()=>{class e extends yy{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)(ua(ks))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),xy=new Fi(``),Sy=(()=>{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 by));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof by);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 _i(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ua(xy),ua(Hs))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),Cy=`ng-app-id`;function wy(e){for(let t of e)t.remove()}function Ty(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Ey(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Cy}="${t}"],link[${Cy}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Cy),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 Dy(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Oy=(()=>{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,Ty);t?.forEach(e=>this.addUsage(e,this.external,Dy))}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&&(wy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])wy(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,Ty(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Dy(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)(ua(ks),ua(ic),ua(cc,8),ua(sc))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),ky={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`},Ay=/%COMP%/g,jy=`%COMP%`,My=`_nghost-${jy}`,Ny=`_ngcontent-${jy}`,Py=!0,Fy=new Fi(``,{factory:()=>Py}),Iy=new Fi(``);function Ly(e){return Ny.replace(Ay,e)}function Ry(e){return My.replace(Ay,e)}function zy(e,t){return t.map(t=>t.replace(Ay,e))}var By=(()=>{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 Vy(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 Gy?n.applyToHost(e):n instanceof Wy&&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 gu.Emulated:r=new Gy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case gu.ShadowDom:return new Uy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case gu.ExperimentalIsolatedShadowDom:return new Uy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Wy(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)(ua(Sy),ua(rm),ua(ic),ua(Fy),ua(ks),ua(Hs),ua(cc),ua(id,8),ua(Iy,8))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})(),Vy=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(ky[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Hy(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Hy(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new _i(-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 _i(-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=ky[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=ky[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&(zu.DashCase|zu.Important)?e.style.setProperty(t,n,r&zu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&zu.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=Lv().getGlobalEventTarget(this.doc,e),!e))throw new _i(-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 Hy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Uy=class extends Vy{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=zy(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=Dy(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)}},Wy=class extends Vy{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?zy(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&&Ku.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Gy=class extends Wy{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=Ly(l),this.hostAttr=Ry(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}},Ky=class e extends gne{supportsDOMEvents=!0;static makeCurrent(){hne(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=Jy();return t==null?null:Yy(t)}resetBaseElement(){qy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return _y(document.cookie,e)}},qy=null;function Jy(){return qy||=document.head.querySelector(`base`),qy?qy.getAttribute(`href`):null}function Yy(e){return new URL(e,document.baseURI).pathname}var Xy=[`alt`,`control`,`meta`,`shift`],Zy={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Qy={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},$y=(()=>{class e extends yy{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(()=>Lv().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.`),Xy.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=Zy[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`),Xy.forEach(t=>{if(t!==n){let n=Qy[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)(ua(ks))};static ɵprov=Oi({token:e,factory:e.ɵfac})}return e})();async function eb(e,t,n){return fne({rootComponent:e,...tb(t,n)})}function tb(e,t){return{platformRef:t?.platformRef,appProviders:[...ob,...e?.providers??[]],platformProviders:ab}}function nb(){Ky.makeCurrent()}function rb(){return new ec}function ib(){return iu(document),document}var ab=[{provide:sc,useValue:vy},{provide:oc,useValue:nb,multi:!0},{provide:ks,useFactory:ib}],ob=[{provide:Wa,useValue:`root`},{provide:ec,useFactory:rb},{provide:xy,useClass:by,multi:!0},{provide:xy,useClass:$y,multi:!0},By,{provide:rm,useClass:Oy},{provide:Oy,useExisting:rm},Sy,{provide:Cp,useExisting:By},[]];function sb(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 db({code:i,why:lb(a.why,e),fix:lb(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:lb(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function mb(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 bb=Math.random.bind(Math),xb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Sb(e=21){let t=``,n=e;for(;n--;)t+=xb[bb()*64|0];return t}var Cb=6e4,wb=e=>e,Tb=wb,{clearTimeout:Eb,setTimeout:Db}=globalThis;function Ob(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=wb,deserialize:s=Tb,resolver:c,bind:l=`rpc`,timeout:u=Cb,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}=yb(),_=Sb();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Db(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof ee==`object`&&(ee=ee.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:ee,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,te,d):await te()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Eb(ee),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:te,get $closed(){return f},get $meta(){return t.meta},$close:ee,$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 ee(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(ne)}function te(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 ne(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(ne),h}function kb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Ab=Object.freeze({type:`object`,additionalProperties:!0});function jb(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Ab}return Ab}function Mb(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 Pb(e,t){return Nb(e,t)??[e]}function Fb(e){return typeof e==`string`?`'${e}'`:new zb().serialize(e)}var Ib=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Lb=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Ib.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Rb(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})(),Bb=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Vb=[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],Hb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Ub=[],Wb=class{_data=new Gb;_hash=new Gb([...Bb]);_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)Ub[n]=e[t+n]|0;else{let e=Ub[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Ub[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Ub[n]=t+Ub[n-7]+i+Ub[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+Vb[n]+Ub[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=Gb.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 Kb(e){return new Wb().finalize(e).toBase64()}function qb(e){return Kb(Fb(e))}function Jb(e){return qb(e)}function Yb(){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 Xb=/^[\w+.-]{2,}:\/\//;function Zb(e){return e.endsWith(`/`)?e:`${e}/`}function Qb(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function $b(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Zb(n)+e.replace(/^\.?\//,``):e);return n}function ex(e,t){if(!t||t===`/`||Xb.test(e))return e;let n=Qb(t);return e.startsWith(n)?e:$b(n,e)}function tx(e,t){let n=e.match(Xb);return t+(n?e.slice(n[0].length):e)}var nx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rx(e=21){let t=``,n=e;for(;n--;)t+=nx[Math.random()*64|0];return t}var ix=Symbol.for(`immer-nothing`),ax=Symbol.for(`immer-draftable`),ox=Symbol.for(`immer-state`),sx=[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 cx(e,...t){{let n=sx[e],r=Mx(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var lx=Object,ux=lx.getPrototypeOf,dx=`constructor`,fx=`prototype`,px=`configurable`,mx=`enumerable`,hx=`writable`,gx=`value`,_x=e=>!!e&&!!e[ox];function vx(e){return e?xx(e)||Ox(e)||!!e[ax]||!!e[dx]?.[ax]||kx(e)||Ax(e):!1}var yx=lx[fx][dx].toString(),bx=new WeakMap;function xx(e){if(!e||!jx(e))return!1;let t=ux(e);if(t===null||t===lx[fx])return!0;let n=lx.hasOwnProperty.call(t,dx)&&t[dx];if(n===Object)return!0;if(!Mx(n))return!1;let r=bx.get(n);return r===void 0&&(r=Function.toString.call(n),bx.set(n,r)),r===yx}function Sx(e,t,n=!0){Cx(e)===0?(n?Reflect.ownKeys(e):lx.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Cx(e){let t=e[ox];return t?t.type_:Ox(e)?1:kx(e)?2:Ax(e)?3:0}var wx=(e,t,n=Cx(e))=>n===2?e.has(t):lx[fx].hasOwnProperty.call(e,t),Tx=(e,t,n=Cx(e))=>n===2?e.get(t):e[t],Ex=(e,t,n,r=Cx(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Dx(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Ox=Array.isArray,kx=e=>e instanceof Map,Ax=e=>e instanceof Set,jx=e=>typeof e==`object`,Mx=e=>typeof e==`function`,Nx=e=>typeof e==`boolean`;function Px(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Fx=e=>jx(e)?e?.[ox]:null,Ix=e=>e.copy_||e.base_,Lx=e=>e.modified_?e.copy_:e.base_;function Rx(e,t){if(kx(e))return new Map(e);if(Ax(e))return new Set(e);if(Ox(e))return Array[fx].slice.call(e);let n=xx(e);if(t===!0||t===`class_only`&&!n){let t=lx.getOwnPropertyDescriptors(e);delete t[ox];let n=Reflect.ownKeys(t);for(let r=0;r1&&lx.defineProperties(e,{set:Vx,add:Vx,clear:Vx,delete:Vx}),lx.freeze(e),t&&Sx(e,(e,t)=>{zx(t,!0)},!1),e)}function Bx(){cx(2)}var Vx={[gx]:Bx};function Hx(e){return e===null||!jx(e)||lx.isFrozen(e)}var Ux=`MapSet`,Wx=`Patches`,Gx=`ArrayMethods`,Kx={};function qx(e){let t=Kx[e];return t||cx(0,e),t}var Jx=e=>!!Kx[e];function Yx(e,t){Kx[e]||(Kx[e]=t)}var Xx,Zx=()=>Xx,Qx=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Jx(Ux)?qx(Ux):void 0,arrayMethodsPlugin_:Jx(Gx)?qx(Gx):void 0});function $x(e,t){t&&(e.patchPlugin_=qx(Wx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eS(e){tS(e),e.drafts_.forEach(rS),e.drafts_=null}function tS(e){e===Xx&&(Xx=e.parent_)}var nS=e=>Xx=Qx(Xx,e);function rS(e){let t=e[ox];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function iS(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[ox].modified_&&(eS(t),cx(4)),vx(e)&&(e=aS(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[ox].base_,e,t)}else e=aS(t,n);return oS(t,e,!0),eS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===ix?void 0:e}function aS(e,t){if(Hx(t))return t;let n=t[ox];if(!n)return mS(t,e.handledSet_,e);if(!cS(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);fS(n,e)}return n.copy_}function oS(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zx(t,n)}function sS(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var cS=(e,t)=>e.scope_===t,lS=[];function uS(e,t,n,r){let i=Ix(e),a=e.type_;if(r!==void 0&&Tx(i,r,a)===t){Ex(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Sx(i,(e,n)=>{if(_x(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??lS;for(let e of o)Ex(i,e,n,a)}function dS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!cS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Lx(i);uS(e,i.draft_??i,a,n),fS(i,r)})}function fS(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)}sS(e)}}function pS(e,t,n){let{scope_:r}=e;if(_x(n)){let i=n[ox];cS(i,r)&&i.callbacks_.push(function(){CS(e),uS(e,n,Lx(i),t)})}else vx(n)&&e.callbacks_.push(function(){let i=Ix(e);e.type_===3?i.has(n)&&mS(n,r.handledSet_,r):Tx(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mS(Tx(e.copy_,t,e.type_),r.handledSet_,r)})}function mS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||_x(e)||t.has(e)||!vx(e)||Hx(e)?e:(t.add(e),Sx(e,(r,i)=>{if(_x(i)){let t=i[ox];cS(t,n)&&(Ex(e,r,Lx(t),e.type_),sS(t))}else vx(i)&&mS(i,t,n)}),e)}function hS(e,t){let n=Ox(e),r={type_:+!!n,scope_:t?t.scope_:Zx(),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=gS;n&&(i=[r],a=_S);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var gS={get(e,t){if(t===ox)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=Ix(e);if(!wx(i,t,e.type_))return bS(e,i,t);let a=i[t];if(e.finalized_||!vx(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Px(t))return a;if(a===vS(e.base_,t)||yS(e,t,a)){CS(e);let n=e.type_===1?+t:t,r=TS(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ix(e)},ownKeys(e){return Reflect.ownKeys(Ix(e))},set(e,t,n){let r=xS(Ix(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=vS(Ix(e),t),i=r?.[ox];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Dx(n,r)&&(n!==void 0||wx(e.base_,t,e.type_)))return!0;CS(e),SS(e)}return e.copy_[t]===n&&(n!==void 0||wx(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),pS(e,t,n),!0)},deleteProperty(e,t){return CS(e),vS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),SS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ix(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[hx]:!0,[px]:e.type_!==1||t!==`length`,[mx]:r[mx],[gx]:n[t]}},defineProperty(){cx(11)},getPrototypeOf(e){return ux(e.base_)},setPrototypeOf(){cx(12)}},_S={};for(let e in gS){let t=gS[e];_S[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}_S.deleteProperty=function(e,t){return isNaN(parseInt(t))&&cx(13),_S.set.call(this,e,t,void 0)},_S.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&cx(14),gS.set.call(this,e[0],t,n,e[0])};function vS(e,t){let n=e[ox];return(n?Ix(n):e)[t]}function yS(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!vx(n)||n[ox]?!1:e.baseRefs_.has(n)}function bS(e,t,n){let r=xS(t,n);return r?gx in r?r[gx]:r.get?.call(e.draft_):void 0}function xS(e,t){if(!(t in e))return;let n=ux(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=ux(n)}}function SS(e){e.modified_||(e.modified_=!0,e.parent_&&SS(e.parent_))}function CS(e){e.copy_||=(e.assigned_=new Map,Rx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var wS=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Mx(e)&&!Mx(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Mx(t)||cx(6),n!==void 0&&!Mx(n)&&cx(7);let r;if(vx(e)){let i=nS(this),a=TS(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?eS(i):tS(i)}return $x(i,n),iS(r,i)}if(!e||!jx(e)){if(r=t(e),r===void 0&&(r=e),r===ix&&(r=void 0),this.autoFreeze_&&zx(r,!0),n){let t=[],i=[];qx(Wx).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}cx(1,e)},this.produceWithPatches=(e,t)=>{if(Mx(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]},Nx(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Nx(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Nx(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){vx(e)||cx(8),_x(e)&&(e=ES(e));let t=nS(this),n=TS(t,e,void 0);return n[ox].isManual_=!0,tS(t),n}finishDraft(e,t){let n=e&&e[ox];(!n||!n.isManual_)&&cx(9);let{scope_:r}=n;return $x(r,t),iS(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=qx(Wx).applyPatches_;return _x(e)?r(e,t):this.produce(e,e=>r(e,t))}};function TS(e,t,n,r){let[i,a]=kx(t)?qx(Ux).proxyMap_(t,n):Ax(t)?qx(Ux).proxySet_(t,n):hS(t,n);return(n?.scope_??Zx()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?dS(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 _x(e)||cx(10,e),DS(e)}function DS(e){if(!vx(e)||Hx(e))return e;let t=e[ox],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Rx(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Rx(e,!0);let i=n;return Ax(n)&&(n=new Set),Sx(i,(e,t)=>{Ex(n,e,DS(t))},r),t&&(t.finalized_=!1),n}function OS(){sx.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=Fx(Tx(e,n.key_)),i=Tx(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||wx(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)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=Tx(o,e,c),f=Tx(s,e,c),p=l?wx(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===ix?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(Ax(e))return new Set(Array.from(e).map(u));let t=Object.create(ux(e));for(let n in e)t[n]=u(e[n]);return wx(e,ax)&&(t[ax]=e[ax]),t}function d(e){return _x(e)?u(e):e}Yx(Wx,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var kS=new wS,AS=kS.produce,jS=kS.produceWithPatches.bind(kS),MS=kS.applyPatches.bind(kS),NS=1e3;function PS(e,t){if(e.add(t),e.size>NS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function FS(e){let{enablePatches:t=!1}=e;t&&OS();let n=Yb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=rx())=>{i.has(t)||(OS(),r=MS(r,e),PS(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=rx())=>{if(!i.has(a)){if(PS(i,a),t){let[t,i]=jS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=AS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var IS=typeof self==`object`?self:globalThis,LS=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),RS=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function zS(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=LS.has(e)?IS[e]:void 0;return n(new(r??IS.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`&&RS.has(a))return n(new IS[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function BS(e){return zS(new Map,e)(0)}var VS=``,{toString:HS}={},{keys:US}=Object;function WS(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=HS.call(e).slice(8,-1);switch(n){case`Array`:return[1,VS];case`Object`:return[2,VS];case`Date`:return[3,VS];case`RegExp`:return[4,VS];case`Map`:return[5,VS];case`Set`:return[6,VS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function GS([e,t]){return e===0&&(t===`function`||t===`symbol`)}function KS(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]=WS(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 US(r))(e||!GS(WS(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||!(GS(WS(n))||GS(WS(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!GS(WS(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function qS(e,t={}){let n=[];return KS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:JS,stringify:YS}=JSON,XS={json:!0,lossy:!0};function ZS(e){return BS(JS(e))}function QS(e){return YS(qS(e,XS))}function $S(e){return BS(e)}function eC(e){return QS(e)}function tC(e){return ZS(e)}var nC=256,rC=class extends Error{name=`StreamClosedError`};function iC(e={}){let t=e.id??rx(),n=Math.max(0,e.replayWindow??0),r=Yb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new rC(`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=oC(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 aC(e={}){let t=e.id??rx(),n=Math.max(1,e.highWaterMark??nC),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 oC(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 sC=128;function cC(e){return e.replace(/[^\w-]+/g,`_`).slice(0,sC)}var lC=`modulepreload`,uC=function(e,t){return new URL(e,t).href},dC={},fC=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=uC(t,n),t=s(t),t in dC)return;dC[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`:lC,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)})},pC=`__connection.json`,mC=`__DEVFRAME_CONNECTION__`,hC=`x-birpc-session`,gC=`__rpc-dump/index.json`,_C=`devframe:services`,vC=`devframe_otp`,yC=`devframe_auth_token`;hb.postMessage.remoteAssetsError;var bC=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Jb(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()}},xC=vb({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 SC(e){if(e.agent&&e.jsonSerializable===!1)throw xC.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function CC(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function wC(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 TC(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 OC(e,t){let n=e.handler;if(!n){let r=await DC(e,t);if(!r.handler)throw xC.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 TC(e.name,r,t),o=await a(...n);return await EC(e.name,i,o)}}var kC=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 OC(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 xC.DF0021({name:e.name});SC(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 xC.DF0022({name:e.name});SC(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 OC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw xC.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 AC(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 MC(t,`undefined`,r,e);return n}return i!==null&&jC(i,r,e,t),n})}function jC(e,t,n,r){if(typeof e==`bigint`)throw MC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw MC(r,`Map`,t,n);if(e instanceof Set)throw MC(r,`Set`,t,n);if(e instanceof Date)throw MC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw MC(r,e.constructor?.name??`class instance`,t,n)}function MC(e,t,n,r){let i=NC(n,r);return xC.DF0020({name:e||``,type:t,path:i})}function NC(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var PC=`__DEVFRAME_CONNECTION_META__`,FC=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function IC(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 LC(){return IC(mC)}function RC(){return IC(PC)}function zC(e){if(e)return e;try{let e=localStorage.getItem(FC);if(e)return e}catch{}return IC(FC)}function BC(e){globalThis[mC]=e,globalThis[PC]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&VC(e.authToken)}function VC(e){try{localStorage.setItem(FC,e)}catch{}globalThis[FC]=e;let t=LC();t&&(globalThis[mC]={...t,authToken:e})}function HC(e){let t=ex(pC,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function UC(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function WC(){let e=LC();if(e)return UC(e,zC()??e.authToken??e.connectionMeta.authToken);let t=RC();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??HC(`./`),authToken:zC(t.authToken)}}async function GC(e={}){if(e.connection){let t=UC(e.connection,zC(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return BC(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:HC(t[0]??`./`),authToken:zC(e.authToken??e.connectionMeta.authToken)};return BC(n),n}let n=WC();if(n){let t=UC(n,zC(e.authToken??n.authToken??n.connectionMeta.authToken));return BC(t),t}let r=[];for(let n of t){let t=ex(pC,n),i=HC(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:zC(e.authToken??r.authToken)};return BC(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var KC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function qC(e=vC){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function JC(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 YC(e=vC){let t=qC(e);return t&&JC(e),t}async function XC(e,t={}){let n=YC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function ZC(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(_C,{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 QC(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:hb.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:hb.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=FS({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,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(hb.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var $C=new Map;function ew(e=$C){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?AC(n,r??``):`s:${eC(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?tC(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function tw(){}function nw(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 rw(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 iw(e){let{onConnected:t=tw,onError:n=tw,onDisconnected:r=tw,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${yC}=${encodeURIComponent(e.authToken)}`);let s=ew(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 ee(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=nw(r);if(!e)break;r=e.rest;let{event:t,data:n}=rw(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 ee(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`,[hC]: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 aw(e,t){let{channel:n,rpcOptions:r={}}=t;return Ob(e,{...n,timeout:-1,...r,proxify:!1})}function ow(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(hb.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 KC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new KC(`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(hb.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 KC(`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(hb.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(hb.client.connectionError,e),m(new KC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new KC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=aw(a.functions,{channel:ee,rpcOptions:o});a.register({name:hb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new KC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(hb.client.connectionError,e),m(e),i.emit(hb.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$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 KC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(hb.client.connectionError,e)}return i.emit(hb.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(hb.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(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:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hb.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(hb.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hb.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function sw(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 cw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=sw(n.sse,r??`./`,location);return ow({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>iw({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 lw(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:uw(r)?lw(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function uw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function dw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function fw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function pw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function mw(e){if(e.error)throw lw(e.error);return e.output}function hw(e){return e.some(e=>e!=null)}function gw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function _w(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?$S(e):e}function a(e,t){return i(gw(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 pw(r)?mw(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(dw(r)){if(hw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(fw(r)){let e=Jb(n),i=r.records[e];if(i)return mw(await s(i,r.serialization));if(r.fallback)return mw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!hw(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 vw(e){let t=_w(await e.fetchJsonFromBases(gC),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 yw=``;function bw(e,t){return`${e}${yw}${t}`}function xw(e){let t=new Map,n=new Map;e.client.register({name:hb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(bw(e,n))?._push(r,i)}}),e.client.register({name:hb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=bw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:hb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=bw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(hb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(yw);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=bw(n,r),o=t.get(a);if(o)return o;let s=aC({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(hb.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=bw(t,r),a=n.get(i);if(a)return a;let o=iC({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 Sw(){}var Cw=new Map;function ww(e){let t=e.url;e.authToken&&(t=`${t}?${yC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Sw,onError:i=Sw,onDisconnected:a=Sw,definitions:o=Cw}=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=ew(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 Tw(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 tx(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=Tw(n.websocket,r??`./`,location);return ow({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>ww({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 Dw(e){return e.includes(`:`)}function Ow(e,t){return Dw(t)?t:`${e}:${t}`}function kw(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function Aw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return kw(a)}function jw(e,t){return{global:Aw(e,t,`global`),project:Aw(e,t,`project`)}}function Mw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Dw(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(Ow(t,n),...r)),callEvent:((n,...r)=>e.callEvent(Ow(t,n),...r)),callOptional:((n,...r)=>e.callOptional(Ow(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(Ow(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(Ow(t,n),r,i),upload:(n,r)=>e.streaming.upload(Ow(t,n),r)}},settings:jw(e,t),scope:e.scope}}function Nw(){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 Pw(e,t={}){let n=t.modelContext??Nw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=cC(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=kb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Mb(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Fw(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 Fw(e,t,n){try{let r=Pb(n,e.args?.length);return{content:[{type:`text`,text:Iw(await(await OC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Lw(e)}]}}}function Iw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Lw(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 Rw(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 zw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Yb(),a=Array.isArray(t)?t:[t],o=await GC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new bC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new kC(f),m=e.webmcp===!1?void 0:Pw(p),h,g=!1,_=0,ee;function te(){_++,ee=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:hb.broadcast.cacheInvalidate,type:`event`,handler:te}),i.on(hb.client.connectionStatus,te),i.on(hb.client.isTrustedUpdated,te));async function ne(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(ex(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 re=e.callTimeout??0,ie=re>0?re:1/0,ae,oe={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ie;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&ae.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new KC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${re}ms`)}for(;!ee&&(t(),!(g||ae.status!==`connected`));){let e=_;ee=ae.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(ee=void 0),t}),await ee}await ee,t()}let o=_;if(r&&e.i&&!g&&ae.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},se=Rw(e.transport??`auto`,s);ae=se===`static`?await vw({fetchJsonFromBases:ne}):se===`sse`?cw({...oe,sseOptions:e.sseOptions}):Ew({...oe,wsOptions:e.wsOptions});let ce;try{ce=new BroadcastChannel(`devframe-auth`)}catch{}let le,ue=!1;function de(e){return((...t)=>ue||!le?e(...t):le.then(()=>e(...t)))}function fe(){g=!0,te();try{h?.(),m?.()}finally{try{ce?.close()}finally{ae.close?.()}}}let pe={events:i,get isTrusted(){return ae.isTrusted},get status(){return ae.status},get connectionError(){return ae.connectionError},get transport(){return ae.transport??se},get connection(){return o},connectionMeta:s,ensureTrusted:ae.ensureTrusted,requestTrust:ae.requestTrust,requestTrustWithToken:async e=>(VC(e),o={...o,authToken:e},ae.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ae.requestTrustWithCode(e);if(!t)return!1;VC(t),o={...o,authToken:t};try{ce?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ae.requestAuthCode(e),call:de(ae.call),callEvent:de(ae.callEvent),callOptional:de(ae.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:fe};pe.sharedState=QC(pe),pe.streaming=xw(pe),pe.services=ZC(pe);let me=new Map;pe.scope=(e=>{if(!e)return pe;let t=me.get(e);return t||(t=Mw(pe,e),me.set(e,t)),t}),f.rpc=pe;function he(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ge(){if(e.simpleAuth!==!1&&he()&&typeof globalThis.prompt==`function`)for(await pe.requestAuthCode().catch(()=>{});!pe.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 pe.requestTrustWithCode(t))return}}async function _e(){let t=await ae.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await XC(pe,{param:n}):!1;t||r||pe.isTrusted||await ge()}return le=_e().then(()=>{ue=!0},()=>{ue=!0}),s.mcp&&fC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-DpSc4Vik.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(pe))}).catch(()=>{}),ce&&(ce.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&pe.requestTrustWithToken(e.data.authToken)}),pe}var Bw=zw,Vw=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],Hw=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function Uw(e){return`pangular:${e}`}var Ww=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],Gw={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},Kw={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},qw=[[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function Jw(e){return qw.some(([t])=>t===e)}var Yw=/^[a-z][a-z0-9-]{0,39}$/;function Xw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&Yw.test(e)&&(n?.enabled??!0);return{enabled:r,tools:r&&t.agent.tools.plugins&&(n?.tools??!0),actions:r&&t.actions.plugins&&(n?.actions??!0)}}var Zw=`pangular`,Qw={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},$w=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function eT(e){if(typeof e!=`string`||e.length>40)return;let t=e.split(`+`).map(e=>e.trim());if(t.some(e=>!e))return;let n=new Set,r;for(let e of t){let t=Qw[e.toLowerCase()];if(t){if(n.has(t))return;n.add(t);continue}if(r!==void 0)return;if(/^[a-z0-9]$/i.test(e))r=e.toUpperCase();else if(/^f([1-9]|1[0-2])$/i.test(e))r=e.toUpperCase();else return}if(r&&[...n].some(e=>e!==`Shift`)&&!(n.has(`Mod`)&&(n.has(`Ctrl`)||n.has(`Meta`))))return[...$w.filter(e=>n.has(e)),r].join(`+`)}function tT(e,t,n){let r=t.split(`+`),i=r.pop(),a=new Set(r),o=a.has(`Ctrl`)||a.has(`Mod`)&&!n,s=a.has(`Meta`)||a.has(`Mod`)&&n;if(e.ctrlKey!==o||e.metaKey!==s||e.altKey!==a.has(`Alt`)||e.shiftKey!==a.has(`Shift`))return!1;if(/^F\d+$/.test(i))return e.key.toUpperCase()===i;let c=/^\d$/.test(i)?`Digit${i}`:`Key${i}`;return e.code?e.code===c:e.key.toUpperCase()===i}function nT(e,t){if(!t)return e.replace(/^Mod\b/,`Ctrl`);let n={Mod:`⌘`,Meta:`⌘`,Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`};return e.split(`+`).map(e=>n[e]??e).join(``)}var rT=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`audit`,label:`Audit`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`queries`,label:`Queries`,inspector:`tanstackQuery`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],iT=1e4;function aT(e){return rT.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var oT={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},sT=200;function cT(e){let t=new URLSearchParams({tab:e.tab});return e.id&&t.set(`id`,e.id),e.page&&t.set(`page`,e.page),`#${t.toString()}`}function lT(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=sT?n:void 0},r=n(`tab`);if(!r)return null;let i=n(`id`),a=n(`page`);return{tab:r,...i?{id:i}:{},...a?{page:a}:{}}}var uT=[{id:`settings`,title:`Open settings`,group:`Go to`,keywords:`preferences tabs`},{id:`pick-component`,title:`Pick component on page`,group:`Actions`,keywords:`select inspect element`,inspector:`components`},{id:`cd-record-start`,title:`Start recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-record-stop`,title:`Stop recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-clear`,title:`Clear change detection recording`,group:`Actions`,keywords:`reset recordings cycles`,inspector:`components`},{id:`theme:system`,title:`Theme: follow the system`,group:`Theme`,keywords:`auto`},{id:`theme:light`,title:`Theme: light`,group:`Theme`},{id:`theme:dark`,title:`Theme: dark`,group:`Theme`},{id:`dock:float`,title:`Popup: float`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:bottom`,title:`Popup: dock to the bottom`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:right`,title:`Popup: dock to the right`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:reset-size`,title:`Popup: reset the docked size`,group:`Popup`,keywords:`splitter resize height width`,popupOnly:!0},{id:`popout`,title:`Popup: open in its own window`,group:`Popup`,keywords:`pop out detach new window`,popupOnly:!0},{id:`popout:return`,title:`Popup: back into the page`,group:`Popup`,keywords:`pop in attach dock window`,popupOnly:!0}];function dT(e){let t=aT(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=uT.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function fT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function pT(e,t){return typeof e==`boolean`?e:t}var mT=100,hT=100;function gT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=hT);return[...new Set(t)].slice(0,mT)}function _T(e,t){let{default:n,min:r,max:i}=Gw[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function vT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function yT(e){let t=fT(e),n=fT(t.agent),r=fT(t.inspectors),i=fT(n.tools),a=fT(t.actions),o=pT(t.actions,!0),s=fT(t.redaction),c=fT(t.limits),l=vT(Vw,e=>pT(r[e],!0));return{inspectors:l,agent:{readOnly:pT(n.readOnly,!1),tools:vT(Vw,e=>l[e]&&pT(i[e],!0)),browserTools:pT(n.browserTools,!1)},actions:vT(Ww,e=>l[e]&&pT(a[e],o)),redaction:{secretNames:gT(s.secretNames),unmask:gT(s.unmask)},limits:Object.fromEntries(Object.keys(Gw).map(e=>[e,_T(c[e],e)])),popup:{hotkey:wT(fT(t.popup).hotkey)},plugins:CT(t.plugins),lint:{rules:xT(t.lint)},ngrx:{trace:pT(fT(t.ngrx).trace,!1)}}}var bT=200;function xT(e){let t=fT(fT(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,bT))typeof r==`boolean`&&(n[e]=r);return n}var ST=100;function CT(e){let t={};for(let[n,r]of Object.entries(fT(e)).slice(0,ST)){if(!Yw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=fT(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:pT(e.enabled,!0),tools:pT(e.tools,!0),actions:pT(e.actions,!0)})}return t}function wT(e){return e===!1?!1:eT(e)??`Alt+Shift+P`}function TT(e){let t=e?.configs;return yT(t?.[Zw])}function ET(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state, dispatching actions and changing the Store DevTools history`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var DT=[`pangular:build-meta`],OT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`},kT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore, dispatch and Store DevTools`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},AT={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function jT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=Vw.filter(t=>e.inspectors[t]);n(`Inspectors off`,Vw.filter(t=>!e.inspectors[t]).map(e=>OT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>OT[e])),n(`Blocked actions`,Ww.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>kT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(Gw).filter(t=>e.limits[t]!==Gw[t].default).map(t=>AT[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function MT(e){let t={tags:[],directives:[],text:``},n=e.toLowerCase();return n=n.replace(/<\s*([^<>\s]+)\s*>/g,(e,n)=>(t.tags.push({value:n,exact:!0}),` `)),n=n.replace(/\[\s*([^[\]\s]+)\s*\]/g,(e,n)=>(t.directives.push({value:n,exact:!0}),` `)),n=n.replace(/(^|\s)([<[])([^<>[\]\s]*)$/,(e,n,r,i)=>(i&&(r===`<`?t.tags:t.directives).push({value:i,exact:!1}),n)),t.text=n.replace(/\s+/g,` `).trim(),t}function NT(e){return!e.tags.length&&!e.directives.length&&!e.text}function PT(e,t){let n=e.tag.toLowerCase(),r=(e.directives??[]).map(e=>e.toLowerCase()),i=(e.attributes??[]).map(e=>e.toLowerCase()),a=[...r,...r.map(e=>e.replace(/directive$/,``)),...i];for(let{value:e,exact:r}of t.tags)if(r?n!==e:!n.startsWith(e))return!1;for(let{value:e,exact:n}of t.directives)if(!a.some(t=>n?t===e:t.includes(e)))return!1;if(t.text){let a=t.text;if(!(e.name.toLowerCase().includes(a)||n.includes(a)||r.some(e=>e.includes(a))||i.some(e=>e.includes(a))))return!1}return!0}var FT={debugApi:{subject:`Live data`,since:`12.0`},injectorProviders:{subject:`Reading providers and environment injectors`,since:`16.2`},injectorMetadata:{subject:`The full injector tree`,since:`17.0`},isSignal:{subject:`Telling signals apart in component values`,since:`17.1`},signalGraph:{subject:`The live signal graph`,since:`20.1`},deferBlocks:{subject:`Listing @defer blocks`,since:`19.1`},forBlocks:{subject:`Listing @for blocks`,since:`22.0`},profiler:{subject:`Recording change detection`,since:`20.0`},angularProfiling:{subject:`Angular profiling`,since:`20.0`},routerInstance:{subject:`The router debug util`,since:`20.3`}};function IT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function LT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function RT(e,t){let n=LT(e),r=LT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function zT(e,t){return e?.capabilities?.[t]===!1}function BT(e,t){let n=FT[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=IT(t);return RT(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var VT=/^on (viewport|interaction|hover)\b/;function HT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>VT.test(e))}function UT(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(HT(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var WT=`pangular-page-id`,GT=null;function KT(e){GT=e}function qT(){if(GT)return GT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(WT)||null)}catch{return null}}function JT(e,t){if(t.chosen&&e[t.chosen])return t.chosen;if(t.host)return t.host;if(t.previous&&e[t.previous])return t.previous;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n?.pageId??null}function YT(e,t){return e?t?e.pages?.[t]??null:e:null}function XT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function ZT(){return{functions:[...DT]}}function QT(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function $T(e,t,n){return QT(e,t,n).then(e=>e,()=>null)}function eE(e){return e?.connectionMeta.backend===`static`}function tE(e){let t=()=>{let t=e()?.scope(`pangular`).rpc;t&&(t.callEvent(`request-page-highlight`,null),t.callEvent(`request-form-highlight`,null))};return addEventListener(`pagehide`,t),()=>{removeEventListener(`pagehide`,t),t()}}function nE(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function rE(e){return e.split(`@`)[1]??``}var iE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},aE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},oE=$T,sE={key:`name looks secret`,"input-type":`password input`,autocomplete:`autocomplete is a secret kind`,marker:`marked as mask`,parent:`inside a secret group`,config:`listed in mask`};function cE(e){return sE[e]??e}var lE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function uE(e,t){return await oE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function dE(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}.`:``}`}var fE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function pE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(fE,(e,t)=>t??(e===`**`?``:e))}function mE(e){return TT(e?.connectionMeta)}function hE(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function gE(e,t){if(!t||typeof t!=`object`)return e;let n=hE(t.secretNames),r=hE(t.unmask);return!n||!r?e:{...e,redaction:{secretNames:n,unmask:r}}}function _E(e,t){return mE(e).actions[t]}var vE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`};function yE(e){return vE[e]}var bE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function xE(e,t){let n=vE[e];return!n||t.inspectors[n]}function SE(e,t){e&1&&(E(),Og(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function CE(e,t){e&1&&(E(),Og(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function wE(e,t){e&1&&(E(),Og(0,`path`,13)(1,`path`,14))}function TE(e,t){e&1&&(E(),Og(0,`path`,15)(1,`path`,16)(2,`path`,17))}function EE(e,t){e&1&&(E(),Og(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function DE(e,t){e&1&&(E(),Og(0,`path`,1))}function OE(e,t){e&1&&(E(),Og(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function kE(e,t){e&1&&(E(),Og(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function AE(e,t){e&1&&(E(),Og(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function jE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function ME(e,t){e&1&&(E(),Og(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function NE(e,t){e&1&&(E(),Og(0,`circle`,39)(1,`path`,40))}function PE(e,t){e&1&&(E(),Og(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function FE(e,t){e&1&&(E(),Og(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function IE(e,t){e&1&&(E(),Og(0,`path`,2))}function LE(e,t){e&1&&(E(),Og(0,`path`,3))}function RE(e,t){e&1&&(E(),Og(0,`path`,4))}var zE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:18,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`d`,`M9 11l2 2 4-4`],[`d`,`M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(E(),z(0,`svg`,0),j(1,SE,4,0)(2,CE,4,0)(3,wE,2,0)(4,TE,3,0)(5,EE,3,0)(6,DE,1,0,`:svg:path`,1)(7,OE,4,0)(8,kE,3,0)(9,AE,4,0)(10,jE,3,0)(11,ME,5,0)(12,NE,2,0)(13,PE,5,0)(14,FE,3,0)(15,IE,1,0,`:svg:path`,2)(16,LE,1,0,`:svg:path`,3)(17,RE,1,0,`:svg:path`,4),B()),e&2){let e;O(),M((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`audit`?3:e===`components`?4:e===`routes`?5:e===`signals`?6:e===`injectors`?7:e===`store`?8:e===`forms`?9:e===`network`?10:e===`pipes`?11:e===`settings`?12:e===`queries`?13:e===`errors`?14:e===`plugins`?15:e===`analog`?16:e===`capacitor`?17:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; -}`]})},UE=(e,t)=>t.tab,WE=(e,t)=>t.label;function GE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function KE(e,t){e&1&&K(0,` Project details unavailable `)}function qE(e,t){e&1&&K(0,` Loading… `)}function JE(e,t){e&1&&(K(0,` Run `),I(1,`code`),K(2,`pangular build`),L(),K(3,` again to rebuild the report. `))}function YE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function XE(e,t){if(e&1){let e=V();I(0,`button`,12),H(`click`,function(){return w(e),T(W(2).loadMeta())}),K(1,`Try again`),L()}}function ZE(e,t){if(e&1&&(I(0,`p`,10),j(1,JE,4,0)(2,YE,1,0),L(),j(3,XE,2,0,`button`,11)),e&2){let e=W();O(),M(e.staticReport()?1:2),O(2),M(e.staticReport()?-1:3)}}function QE(e,t){e&1&&(I(0,`li`,5)(1,`span`),K(2,`Analog`),L(),K(3),L()),e&2&&(O(3),q(t))}function $E(e,t){e&1&&(I(0,`li`)(1,`span`),K(2,`Change detection`),L(),K(3),L()),e&2&&(O(3),q(t))}function eD(e,t){if(e&1&&(I(0,`span`,19),K(1),L(),I(2,`span`,20),K(3),L()),e&2){let e=W().$implicit,t=W();O(),q(t.cards()[e.tab]?.value),O(2),q(t.cards()[e.tab]?.sub)}}function tD(e,t){e&1&&(I(0,`span`,21),K(1,`–`),L(),I(2,`span`,20),K(3,`Count unavailable`),L())}function nD(e,t){e&1&&(R(0,`span`,22),I(1,`span`,20),K(2,`Counting…`),L())}function rD(e,t){if(e&1){let e=V();I(0,`button`,13),H(`click`,function(){let t=w(e).$implicit;return T(W().navigate.emit(t.tab))}),I(1,`span`,14)(2,`span`,15),R(3,`app-tab-icon`,16),L(),I(4,`span`,17),K(5,`→`),L()(),I(6,`span`,18),K(7),L(),j(8,eD,4,2)(9,tD,4,0)(10,nD,3,0),L()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);y_(`animation-delay`,60*r,`ms`),A(`aria-busy`,i===`loading`),O(3),F(`name`,n.tab),O(4),q(n.label),O(),M((e=i)===`ready`?8:e===`error`?9:10)}}function iD(e,t){e&1&&(I(0,`p`),K(1,`Loading…`),L())}function aD(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2),L(),I(3,`dd`),K(4),L()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.value)}}function oD(e,t){if(e&1&&(I(0,`dl`),N(1,aD,5,2,`div`,null,WE),L()),e&2){let e=W();O(),P(e.configItems())}}function sD(e,t){e&1&&(I(0,`p`),K(1,`Defaults`),L())}var cD=[{tab:`components`,label:`Components`},{tab:`routes`,label:`Routes`},{tab:`signals`,label:`Signals`},{tab:`injectors`,label:`Injectors`},{tab:`store`,label:`NgRx declarations`},{tab:`pipes`,label:`Pipes`},{tab:`forms`,label:`Forms`},{tab:`network`,label:`SSR & HTTP`}];function lD(e){return cD.filter(t=>wE(t.tab,e))}var uD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function dD(e){return e&&Object.hasOwn(uD,e)?uD[e]:null}var fD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),pD={action:[`action`,`actions`],reducer:[`reducer`,`reducers`],effect:[`effect`,`effects`],selector:[`selector`,`selectors`],feature:[`feature`,`features`],"store-setup":[`setup call`,`setup calls`],"signal-store":[`signal store`,`signal stores`],"signal-state":[`signal state`,`signal states`],"signal-method":[`signal method`,`signal methods`]};function mD(e,t,n){return`${e} ${e===1?t:n}`}function hD(e,t){for(let n of e??[])t(n),hD(n.children,t)}function gD(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`discovered in source`};let t=e.filter(e=>e.kind===`directive`).length;return{value:e.length-t,sub:`components · ${mD(t,`directive`,`directives`)}`}}function _D(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`route entries in source`};let t=e.filter(e=>e.kind===`redirect`).length;return{value:new Set(e.filter(e=>e.kind===`page`).map(e=>e.fullPath??e.path??``)).size,sub:`navigable paths · ${mD(t,`redirect`,`redirects`)}`}}function vD(e){let t=new Map;for(let n of e)n.kind&&t.set(n.kind,(t.get(n.kind)??0)+1);if(!t.size)return{value:e.length,sub:`declarations in source`};let n=[...t].sort((e,t)=>t[1]-e[1]).map(([e,t])=>{let[n,r]=pD[e]??[e,e];return mD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function yD(e,t){let n=e?.forms??[],r=t?n.filter(e=>oE(e.id)===t):n;if(!r.length)return{value:0,sub:`no forms on the page yet`};let i=r.filter(e=>e.root?.status===`INVALID`).length;return{value:r.length,sub:`${r.length===1?`form`:`forms`} · ${i} invalid`}}function bD(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function xD(e,t){let n=e?.pages??[],r=t?n.find(e=>e.pageId===t)??null:n.reduce((e,t)=>!e||t.reportedAt>e.reportedAt?t:e,null),i=t&&!r?[]:e?.serverCalls??[],a=r?.initialUrl,o=[...a?i.filter(e=>!e.pageUrl||e.pageUrl===a):i,...r?.calls??[]];if(!o.length)return{value:0,sub:`no calls recorded yet`};let s=o.filter(bD).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var SD=class e{rpc=$(null);navigate=bv();staticReport=X(()=>rE(this.rpc()));meta=D(null);redaction=D(null);config=X(()=>yE(_E(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?lD(this.config()):[]);configItems=X(()=>PT(this.config()));metaState=D(`loading`);states=D({});rows=D({});injectorTree=D(null);signalGraph=D(null);formsState=D(null);httpState=D(null);pageId=XT();destroyRef=C(As);stopLive=[];zone=X(()=>dD(QT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=QT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return hD(e.roots,r),hD(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=$T(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>fD.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=gD(e.components)),e.routes&&(t.routes=_D(e.routes)),e.store&&(t.store=vD(e.store)),e.pipes){let n=e.pipes.filter(e=>e.builtin).length;t.pipes={value:e.pipes.length-n,sub:n?`custom pipes · ${n} built-in in use`:`custom pipes in source`}}let n=this.liveSignals();n===null?e.signals&&(t.signals={value:e.signals.length,sub:`signal declarations in source`}):t.signals={value:n,sub:e.signals?`live on the page · ${e.signals.length} declared in source`:`live on the page`};let r=this.liveInjectors();r?t.injectors={value:r.injectors,sub:`live injectors · ${mD(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`});let i=this.formsState();i&&(t.forms=yD(i,this.pageId));let a=this.httpState();return a&&(t.network=xD(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}loadRedaction(e){this.redaction.set(null),!rE(e)&&tE(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}constructor(){_c(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e),this.loadRedaction(e);let n=_E(e),r=e=>wE(e,n);r(`components`)&&this.load(t.rpc.call(`get-components`),`components`),r(`routes`)&&this.load(t.rpc.call(`get-routes`),`routes`),r(`signals`)&&this.load(t.rpc.call(`get-signals`),`signals`),r(`injectors`)&&this.load(t.rpc.call(`get-providers`),`injectors`),r(`store`)&&this.load(t.rpc.call(`get-ngrx-store`),`store`),r(`pipes`)&&this.load(t.rpc.call(`get-pipes`),`pipes`),this.watchLive(e,n)}),this.destroyRef.onDestroy(()=>this.unwatch())}stateOf(e){return(e===`signals`?this.liveSignals():e===`injectors`?this.liveInjectors():null)===null?this.states()[e]??`loading`:`ready`}load(e,t){let n=e=>this.states.update(n=>({...n,[t]:e}));e.then(e=>{this.rows.update(n=>({...n,[t]:Array.isArray(e)?e:[]})),n(`ready`)}).catch(()=>n(`error`))}async watchLive(e,t){this.unwatch();let n=e.scope(`pangular`).rpc,r=async(t,r,i)=>{let a=e=>i&&this.states.update(t=>({...t,[i]:e}));try{let i=await n.sharedState(t);if(this.destroyRef.destroyed||this.rpc()!==e)return;r(i.value()),a(`ready`),this.stopLive.push(i.on(`updated`,e=>r(e)))}catch{if(this.destroyRef.destroyed||this.rpc()!==e)return;r(null),a(`error`)}};await Promise.all([t.inspectors.injectors&&r(`injector-tree`,e=>this.injectorTree.set(e)),t.inspectors.signals&&r(`signal-graph`,e=>this.signalGraph.set(e)),wE(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),wE(`network`,t)&&r(`http`,e=>this.httpState.set(e??{}),`network`)])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),L(),I(4,`h2`,3),j(5,GE,1,1)(6,KE,1,0)(7,qE,1,0),L(),j(8,ZE,4,2),L(),I(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),L(),K(13),L(),I(14,`li`)(15,`span`),K(16,`TypeScript`),L(),K(17),L(),I(18,`li`)(19,`span`),K(20,`SSR`),L(),K(21),L(),j(22,QE,4,1,`li`,5),j(23,$E,4,1,`li`),L()(),I(24,`div`,6),N(25,rD,11,6,`button`,7,UE),L(),I(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),L(),j(30,iD,2,0,`p`)(31,oD,3,0,`dl`)(32,sD,2,0,`p`),L()),e&2){let e,n,r;A(`aria-busy`,t.metaState()===`loading`),O(4),G(`muted`,t.metaState()!==`ready`),O(),M((e=t.metaState())===`ready`?5:e===`error`?6:7),O(3),M(t.metaState()===`error`?8:-1),O(),G(`pending`,t.metaState()===`loading`),O(4),q(t.meta()?.angularVersion??`…`),O(4),q(t.meta()?.typescript??`…`),O(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),O(),M((n=t.meta()?.analog)?22:-1,n),O(),M((r=t.zone())?23:-1,r),O(2),P(t.stats()),O(2),A(`aria-busy`,!t.rpc()),O(3),M(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[HE],styles:[`[_nghost-%COMP%] { +}`]})},BE=(e,t)=>t.tab,VE=(e,t)=>t.label;function HE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function UE(e,t){e&1&&K(0,` Project details unavailable `)}function WE(e,t){e&1&&K(0,` Loading… `)}function GE(e,t){e&1&&(K(0,` Run `),I(1,`code`),K(2,`pangular build`),L(),K(3,` again to rebuild the report. `))}function KE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function qE(e,t){if(e&1){let e=V();I(0,`button`,12),H(`click`,function(){return w(e),T(W(2).loadMeta())}),K(1,`Try again`),L()}}function JE(e,t){if(e&1&&(I(0,`p`,10),j(1,GE,4,0)(2,KE,1,0),L(),j(3,qE,2,0,`button`,11)),e&2){let e=W();O(),M(e.staticReport()?1:2),O(2),M(e.staticReport()?-1:3)}}function YE(e,t){e&1&&(I(0,`li`,5)(1,`span`),K(2,`Analog`),L(),K(3),L()),e&2&&(O(3),q(t))}function XE(e,t){e&1&&(I(0,`li`)(1,`span`),K(2,`Change detection`),L(),K(3),L()),e&2&&(O(3),q(t))}function ZE(e,t){if(e&1&&(I(0,`span`,19),K(1),L(),I(2,`span`,20),K(3),L()),e&2){let e=W().$implicit,t=W();O(),q(t.cards()[e.tab]?.value),O(2),q(t.cards()[e.tab]?.sub)}}function QE(e,t){e&1&&(I(0,`span`,21),K(1,`–`),L(),I(2,`span`,20),K(3,`Count unavailable`),L())}function $E(e,t){e&1&&(R(0,`span`,22),I(1,`span`,20),K(2,`Counting…`),L())}function eD(e,t){if(e&1){let e=V();I(0,`button`,13),H(`click`,function(){let t=w(e).$implicit;return T(W().navigate.emit(t.tab))}),I(1,`span`,14)(2,`span`,15),R(3,`app-tab-icon`,16),L(),I(4,`span`,17),K(5,`→`),L()(),I(6,`span`,18),K(7),L(),j(8,ZE,4,2)(9,QE,4,0)(10,$E,3,0),L()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);y_(`animation-delay`,60*r,`ms`),A(`aria-busy`,i===`loading`),O(3),F(`name`,n.tab),O(4),q(n.label),O(),M((e=i)===`ready`?8:e===`error`?9:10)}}function tD(e,t){e&1&&(I(0,`p`),K(1,`Loading…`),L())}function nD(e,t){if(e&1&&(I(0,`div`)(1,`dt`),K(2),L(),I(3,`dd`),K(4),L()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.value)}}function rD(e,t){if(e&1&&(I(0,`dl`),N(1,nD,5,2,`div`,null,VE),L()),e&2){let e=W();O(),P(e.configItems())}}function iD(e,t){e&1&&(I(0,`p`),K(1,`Defaults`),L())}var aD=[{tab:`components`,label:`Components`},{tab:`routes`,label:`Routes`},{tab:`signals`,label:`Signals`},{tab:`injectors`,label:`Injectors`},{tab:`store`,label:`NgRx declarations`},{tab:`pipes`,label:`Pipes`},{tab:`forms`,label:`Forms`},{tab:`network`,label:`SSR & HTTP`}];function oD(e){return aD.filter(t=>xE(t.tab,e))}var sD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function cD(e){return e&&Object.hasOwn(sD,e)?sD[e]:null}var lD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),uD={action:[`action`,`actions`],reducer:[`reducer`,`reducers`],effect:[`effect`,`effects`],selector:[`selector`,`selectors`],feature:[`feature`,`features`],"store-setup":[`setup call`,`setup calls`],"signal-store":[`signal store`,`signal stores`],"signal-state":[`signal state`,`signal states`],"signal-method":[`signal method`,`signal methods`]};function dD(e,t,n){return`${e} ${e===1?t:n}`}function fD(e,t){for(let n of e??[])t(n),fD(n.children,t)}function pD(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`discovered in source`};let t=e.filter(e=>e.kind===`directive`).length;return{value:e.length-t,sub:`components · ${dD(t,`directive`,`directives`)}`}}function mD(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`route entries in source`};let t=e.filter(e=>e.kind===`redirect`).length;return{value:new Set(e.filter(e=>e.kind===`page`).map(e=>e.fullPath??e.path??``)).size,sub:`navigable paths · ${dD(t,`redirect`,`redirects`)}`}}function hD(e){let t=new Map;for(let n of e)n.kind&&t.set(n.kind,(t.get(n.kind)??0)+1);if(!t.size)return{value:e.length,sub:`declarations in source`};let n=[...t].sort((e,t)=>t[1]-e[1]).map(([e,t])=>{let[n,r]=uD[e]??[e,e];return dD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function gD(e,t){let n=e?.forms??[],r=t?n.filter(e=>rE(e.id)===t):n;if(!r.length)return{value:0,sub:`no forms on the page yet`};let i=r.filter(e=>e.root?.status===`INVALID`).length;return{value:r.length,sub:`${r.length===1?`form`:`forms`} · ${i} invalid`}}function _D(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function vD(e,t){let n=e?.pages??[],r=t?n.find(e=>e.pageId===t)??null:n.reduce((e,t)=>!e||t.reportedAt>e.reportedAt?t:e,null),i=t&&!r?[]:e?.serverCalls??[],a=r?.initialUrl,o=[...a?i.filter(e=>!e.pageUrl||e.pageUrl===a):i,...r?.calls??[]];if(!o.length)return{value:0,sub:`no calls recorded yet`};let s=o.filter(_D).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var yD=class e{rpc=$(null);navigate=xv();staticReport=X(()=>eE(this.rpc()));meta=D(null);redaction=D(null);config=X(()=>gE(mE(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?oD(this.config()):[]);configItems=X(()=>jT(this.config()));metaState=D(`loading`);states=D({});rows=D({});injectorTree=D(null);signalGraph=D(null);formsState=D(null);httpState=D(null);pageId=qT();destroyRef=C(As);stopLive=[];zone=X(()=>cD(YT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=YT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return fD(e.roots,r),fD(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=XT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>lD.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=pD(e.components)),e.routes&&(t.routes=mD(e.routes)),e.store&&(t.store=hD(e.store)),e.pipes){let n=e.pipes.filter(e=>e.builtin).length;t.pipes={value:e.pipes.length-n,sub:n?`custom pipes · ${n} built-in in use`:`custom pipes in source`}}let n=this.liveSignals();n===null?e.signals&&(t.signals={value:e.signals.length,sub:`signal declarations in source`}):t.signals={value:n,sub:e.signals?`live on the page · ${e.signals.length} declared in source`:`live on the page`};let r=this.liveInjectors();r?t.injectors={value:r.injectors,sub:`live injectors · ${dD(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`});let i=this.formsState();i&&(t.forms=gD(i,this.pageId));let a=this.httpState();return a&&(t.network=vD(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}loadRedaction(e){this.redaction.set(null),!eE(e)&&QT(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}constructor(){_c(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e),this.loadRedaction(e);let n=mE(e),r=e=>xE(e,n);r(`components`)&&this.load(t.rpc.call(`get-components`),`components`),r(`routes`)&&this.load(t.rpc.call(`get-routes`),`routes`),r(`signals`)&&this.load(t.rpc.call(`get-signals`),`signals`),r(`injectors`)&&this.load(t.rpc.call(`get-providers`),`injectors`),r(`store`)&&this.load(t.rpc.call(`get-ngrx-store`),`store`),r(`pipes`)&&this.load(t.rpc.call(`get-pipes`),`pipes`),this.watchLive(e,n)}),this.destroyRef.onDestroy(()=>this.unwatch())}stateOf(e){return(e===`signals`?this.liveSignals():e===`injectors`?this.liveInjectors():null)===null?this.states()[e]??`loading`:`ready`}load(e,t){let n=e=>this.states.update(n=>({...n,[t]:e}));e.then(e=>{this.rows.update(n=>({...n,[t]:Array.isArray(e)?e:[]})),n(`ready`)}).catch(()=>n(`error`))}async watchLive(e,t){this.unwatch();let n=e.scope(`pangular`).rpc,r=async(t,r,i)=>{let a=e=>i&&this.states.update(t=>({...t,[i]:e}));try{let i=await n.sharedState(t);if(this.destroyRef.destroyed||this.rpc()!==e)return;r(i.value()),a(`ready`),this.stopLive.push(i.on(`updated`,e=>r(e)))}catch{if(this.destroyRef.destroyed||this.rpc()!==e)return;r(null),a(`error`)}};await Promise.all([t.inspectors.injectors&&r(`injector-tree`,e=>this.injectorTree.set(e)),t.inspectors.signals&&r(`signal-graph`,e=>this.signalGraph.set(e)),xE(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),xE(`network`,t)&&r(`http`,e=>this.httpState.set(e??{}),`network`)])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),L(),I(4,`h2`,3),j(5,HE,1,1)(6,UE,1,0)(7,WE,1,0),L(),j(8,JE,4,2),L(),I(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),L(),K(13),L(),I(14,`li`)(15,`span`),K(16,`TypeScript`),L(),K(17),L(),I(18,`li`)(19,`span`),K(20,`SSR`),L(),K(21),L(),j(22,YE,4,1,`li`,5),j(23,XE,4,1,`li`),L()(),I(24,`div`,6),N(25,eD,11,6,`button`,7,BE),L(),I(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),L(),j(30,tD,2,0,`p`)(31,rD,3,0,`dl`)(32,iD,2,0,`p`),L()),e&2){let e,n,r;A(`aria-busy`,t.metaState()===`loading`),O(4),G(`muted`,t.metaState()!==`ready`),O(),M((e=t.metaState())===`ready`?5:e===`error`?6:7),O(3),M(t.metaState()===`error`?8:-1),O(),G(`pending`,t.metaState()===`loading`),O(4),q(t.meta()?.angularVersion??`…`),O(4),q(t.meta()?.typescript??`…`),O(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),O(),M((n=t.meta()?.analog)?22:-1,n),O(),M((r=t.zone())?23:-1,r),O(2),P(t.stats()),O(2),A(`aria-busy`,!t.rpc()),O(3),M(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[zE],styles:[`[_nghost-%COMP%] { display: block; max-width: 1200px; } @@ -325,7 +325,7 @@ h2.muted[_ngcontent-%COMP%] { .skeleton[_ngcontent-%COMP%] { animation: none; } -}`]})},CD=`pangular:panel-action-result`,wD=6e3,TD=0;function ED(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function DD(e,t=window){let n=`pa-${Date.now().toString(36)}-${++TD}`;return new Promise(r=>{let i=e=>{t.clearTimeout(o),t.removeEventListener(`message`,a),r(e)},a=({source:e,origin:r,data:a})=>{if(e!==t.parent||r!==t.location.origin)return;let o=a;if(o?.type!==CD||o.requestId!==n)return;let{opened:s,error:c}=a;i({ok:o.ok===!0,...s===`file`||s===`class`?{opened:s}:{},...typeof c==`string`?{error:c}:{}})},o=t.setTimeout(()=>i({ok:!1,error:`timeout`}),wD);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var OD=class e{available=ED();reveal(e,t){return DD({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return DD({type:`pangular:open-source`,pageId:e,id:t,...n?{file:n.file,line:n.line}:{}})}static ɵfac=function(t){return new(t||e)};static ɵprov=Rl({token:e,factory:e.ɵfac})};function kD(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function AD(e){let t=C(As),n=D({}),r=null,i=null,a=async e=>{i?.(),i=null,r=e;try{let a=await e.scope(`pangular`).rpc.sharedState(`page-angular`);if(t.destroyed||r!==e)return;let o=e=>n.set(kD(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return _c(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function jD(e,t){if(t)return e[t]??null;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n}var MD=[`*`];function ND(e,t){if(e&1&&(z(0,`div`,1)(1,`p`,2),K(2),B(),z(3,`p`,3),K(4),Jg(5),z(6,`a`,4),K(7,`Supported versions`),B()()()),e&2){let e=W();G(`compact`,e.compact()),O(2),q(e.title()),O(2),J(` `,t,` `),O(2),Pg(`href`,e.docsUrl,ku)}}var PD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,FD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:jv});compact=$(!1,{transform:jv});docsUrl=PD;text=X(()=>{let e=this.page();return!this.missing()&&!HT(e,this.capability())?null:UT(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${zT(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:MD,decls:1,vars:1,consts:[[`role`,`status`,1,`unavailable`,3,`compact`],[`role`,`status`,1,`unavailable`],[1,`title`],[1,`hint`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){if(e&1&&(qg(),j(0,ND,8,5,`div`,0)),e&2){let e;M((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},bD=`pangular:panel-action-result`,xD=6e3,SD=0;function CD(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function wD(e,t=window){let n=`pa-${Date.now().toString(36)}-${++SD}`;return new Promise(r=>{let i=e=>{t.clearTimeout(o),t.removeEventListener(`message`,a),r(e)},a=({source:e,origin:r,data:a})=>{if(e!==t.parent||r!==t.location.origin)return;let o=a;if(o?.type!==bD||o.requestId!==n)return;let{opened:s,error:c}=a;i({ok:o.ok===!0,...s===`file`||s===`class`?{opened:s}:{},...typeof c==`string`?{error:c}:{}})},o=t.setTimeout(()=>i({ok:!1,error:`timeout`}),xD);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var TD=class e{available=CD();reveal(e,t){return wD({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return wD({type:`pangular:open-source`,pageId:e,id:t,...n?{file:n.file,line:n.line}:{}})}static ɵfac=function(t){return new(t||e)};static ɵprov=Rl({token:e,factory:e.ɵfac})};function ED(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function DD(e){let t=C(As),n=D({}),r=null,i=null,a=async e=>{i?.(),i=null,r=e;try{let a=await e.scope(`pangular`).rpc.sharedState(`page-angular`);if(t.destroyed||r!==e)return;let o=e=>n.set(ED(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return _c(()=>{let t=e();t&&t!==r&&Z(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function OD(e,t){if(t)return e[t]??null;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n}var kD=[`*`];function AD(e,t){if(e&1&&(z(0,`div`,1)(1,`p`,2),K(2),B(),z(3,`p`,3),K(4),Jg(5),z(6,`a`,4),K(7,`Supported versions`),B()()()),e&2){let e=W();G(`compact`,e.compact()),O(2),q(e.title()),O(2),J(` `,t,` `),O(2),Pg(`href`,e.docsUrl,Au)}}var jD=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,MD=class e{page=$(null);capability=$.required();missing=$(!1,{transform:Mv});compact=$(!1,{transform:Mv});docsUrl=jD;text=X(()=>{let e=this.page();return!this.missing()&&!zT(e,this.capability())?null:BT(this.capability(),e?.version)});title=X(()=>{let e=this.page()?.version;return e?`Not available on Angular ${IT(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:kD,decls:1,vars:1,consts:[[`role`,`status`,1,`unavailable`,3,`compact`],[`role`,`status`,1,`unavailable`],[1,`title`],[1,`hint`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){if(e&1&&(qg(),j(0,AD,8,5,`div`,0)),e&2){let e;M((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -372,7 +372,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})};function ID(e){return e?.platform===`angular-native`}function LD(e){return ID(e)||e?.platform===`nativescript`}function RD(e,t){let n=Object.values(e??{}).filter(ID);if(t&&n.some(e=>e.pageId===t))return t;let r=null;for(let e of n)(!r||e.reportedAt>r.reportedAt)&&(r=e);return r?.pageId??null}var zD=[`trigger`],BD=[`list`],VD=(e,t)=>t.value;function HD(e,t){if(e&1&&(z(0,`span`,4),K(1),B()),e&2){let e=W();O(),q(e.current().hint)}}function UD(e,t){if(e&1&&(z(0,`span`,15),K(1),B()),e&2){let e=W().$implicit;O(),q(e.hint)}}function WD(e,t){if(e&1){let e=V();z(0,`li`,11),U(`pointerenter`,function(){let t=w(e).$index;return T(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=w(e).$index;return T(W(2).choose(t))}),E(),z(1,`svg`,12),Og(2,`path`,13),B(),bs(),z(3,`span`,14),K(4),B(),j(5,UD,2,1,`span`,15),B()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),A(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),O(4),q(e.label),O(),M(e.hint?5:-1)}}function GD(e,t){if(e&1&&(z(0,`li`,10),K(1),B()),e&2){let e=W(2);O(),q(e.emptyText())}}function KD(e,t){if(e&1&&(z(0,`ul`,8,1),ig(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),N(2,WD,6,9,`li`,9,VD,!1,GD,2,1,`li`,10),B()),e&2){let e=W();G(`up`,e.dropUp()),A(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),O(2),P(e.options())}}var qD=0,JD=class e{options=$.required();value=Tv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++qD}`;open=D(!1);active=D(-1);dropUp=D(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=C(Vl);injector=C(Os);trigger=Dv.required(`trigger`);list=Dv(`list`);typed=``;typedAt=0;toggle(){this.open()?this.close():this.show()}choose(e){let t=this.options()[e];t&&!t.disabled&&(this.value.set(t.value),this.close(),this.trigger().nativeElement.focus())}onKey(e){let t=this.options(),n=this.open();switch(e.key){case`ArrowDown`:case`ArrowUp`:if(e.preventDefault(),!n){this.show();return}this.move(e.key===`ArrowDown`?1:-1);return;case`Home`:case`End`:if(!n)return;e.preventDefault(),this.setActive(e.key===`Home`?this.firstEnabled(0,1):this.firstEnabled(t.length-1,-1));return;case`Enter`:case` `:e.preventDefault(),n&&this.active()>=0?this.choose(this.active()):this.show();return;case`Escape`:if(!n)return;e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:n&&this.close();return;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeAhead(e.key)}}onBlur(e){let t=e.relatedTarget;t&&this.host.nativeElement.contains(t)||this.close()}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.close()}show(){if(this.disabled())return;let e=this.host.nativeElement.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.dropUp.set(t<220&&e.top>t);let n=this.options().findIndex(e=>e.value===this.value());this.open.set(!0),this.setActive(n>=0?n:this.firstEnabled(0,1))}close(){this.open.set(!1),this.active.set(-1)}move(e){let t=this.firstEnabled(this.active()+e,e);t>=0&&this.setActive(t)}firstEnabled(e,t){let n=this.options();for(let r=e;r>=0&&r{(this.list()?.nativeElement.querySelector(`#${this.uid}-opt-${e}`))?.scrollIntoView({block:`nearest`})},{injector:this.injector})}typeAhead(e){let t=performance.now();this.typed=t-this.typedAt>600?e.toLowerCase():this.typed+e.toLowerCase(),this.typedAt=t;let n=this.options().findIndex(e=>!e.disabled&&e.label.toLowerCase().startsWith(this.typed));n<0||(this.open()?this.setActive(n):this.value.set(this.options()[n].value))}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Xg(t.trigger,zD,5)(t.list,BD,5),e&2&&Zg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},ju),e&2&&G(`open`,t.open())},inputs:{options:[1,`options`],value:[1,`value`],placeholder:[1,`placeholder`],ariaLabel:[1,`ariaLabel`],labelledBy:[1,`labelledBy`],describedBy:[1,`describedBy`],disabled:[1,`disabled`],emptyText:[1,`emptyText`]},outputs:{value:`valueChange`},decls:8,vars:13,consts:[[`trigger`,``],[`list`,``],[`type`,`button`,`role`,`combobox`,`aria-haspopup`,`listbox`,1,`trigger`,3,`click`,`keydown`,`blur`,`disabled`],[1,`value`],[1,`value-hint`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m6 9 6 6 6-6`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`up`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`pointerdown`],[`role`,`option`,3,`active`,`selected`],[`role`,`option`,`aria-disabled`,`true`,1,`empty`],[`role`,`option`,3,`pointerenter`,`pointerdown`,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`check`],[`d`,`m5 12 5 5 9-10`],[1,`label`],[1,`hint`]],template:function(e,t){e&1&&(z(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),z(2,`span`,3),K(3),B(),j(4,HD,2,1,`span`,4),E(),z(5,`svg`,5),Og(6,`path`,6),B()(),j(7,KD,5,5,`ul`,7)),e&2&&(Pg(`disabled`,t.disabled()),A(`id`,t.uid+`-trigger`)(`aria-controls`,t.uid+`-list`)(`aria-expanded`,t.open())(`aria-label`,t.ariaLabel()||null)(`aria-labelledby`,t.labelledBy()||null)(`aria-describedby`,t.describedBy()||null)(`aria-activedescendant`,t.open()&&t.active()>=0?t.uid+`-opt-`+t.active():null),O(2),G(`placeholder`,!t.current()),O(),J(` `,t.current()?.label??t.placeholder(),` `),O(),M(t.current()?.hint?4:-1),O(3),M(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function ND(e){return e?.platform===`angular-native`}function PD(e){return ND(e)||e?.platform===`nativescript`}function FD(e,t){let n=Object.values(e??{}).filter(ND);if(t&&n.some(e=>e.pageId===t))return t;let r=null;for(let e of n)(!r||e.reportedAt>r.reportedAt)&&(r=e);return r?.pageId??null}var ID=[`trigger`],LD=[`list`],RD=(e,t)=>t.value;function zD(e,t){if(e&1&&(z(0,`span`,4),K(1),B()),e&2){let e=W();O(),q(e.current().hint)}}function BD(e,t){if(e&1&&(z(0,`span`,15),K(1),B()),e&2){let e=W().$implicit;O(),q(e.hint)}}function VD(e,t){if(e&1){let e=V();z(0,`li`,11),U(`pointerenter`,function(){let t=w(e).$index;return T(W(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=w(e).$index;return T(W(2).choose(t))}),E(),z(1,`svg`,12),Og(2,`path`,13),B(),bs(),z(3,`span`,14),K(4),B(),j(5,BD,2,1,`span`,15),B()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active())(`selected`,e.value===r.value()),A(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),O(4),q(e.label),O(),M(e.hint?5:-1)}}function HD(e,t){if(e&1&&(z(0,`li`,10),K(1),B()),e&2){let e=W(2);O(),q(e.emptyText())}}function UD(e,t){if(e&1&&(z(0,`ul`,8,1),ig(`list-in`),U(`pointerdown`,function(e){return e.preventDefault()}),N(2,VD,6,9,`li`,9,RD,!1,HD,2,1,`li`,10),B()),e&2){let e=W();G(`up`,e.dropUp()),A(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),O(2),P(e.options())}}var WD=0,GD=class e{options=$.required();value=Ev(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++WD}`;open=D(!1);active=D(-1);dropUp=D(!1);current=X(()=>this.options().find(e=>e.value===this.value())??null);host=C(Vl);injector=C(Os);trigger=Ov.required(`trigger`);list=Ov(`list`);typed=``;typedAt=0;toggle(){this.open()?this.close():this.show()}choose(e){let t=this.options()[e];t&&!t.disabled&&(this.value.set(t.value),this.close(),this.trigger().nativeElement.focus())}onKey(e){let t=this.options(),n=this.open();switch(e.key){case`ArrowDown`:case`ArrowUp`:if(e.preventDefault(),!n){this.show();return}this.move(e.key===`ArrowDown`?1:-1);return;case`Home`:case`End`:if(!n)return;e.preventDefault(),this.setActive(e.key===`Home`?this.firstEnabled(0,1):this.firstEnabled(t.length-1,-1));return;case`Enter`:case` `:e.preventDefault(),n&&this.active()>=0?this.choose(this.active()):this.show();return;case`Escape`:if(!n)return;e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:n&&this.close();return;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeAhead(e.key)}}onBlur(e){let t=e.relatedTarget;t&&this.host.nativeElement.contains(t)||this.close()}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.close()}show(){if(this.disabled())return;let e=this.host.nativeElement.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.dropUp.set(t<220&&e.top>t);let n=this.options().findIndex(e=>e.value===this.value());this.open.set(!0),this.setActive(n>=0?n:this.firstEnabled(0,1))}close(){this.open.set(!1),this.active.set(-1)}move(e){let t=this.firstEnabled(this.active()+e,e);t>=0&&this.setActive(t)}firstEnabled(e,t){let n=this.options();for(let r=e;r>=0&&r{(this.list()?.nativeElement.querySelector(`#${this.uid}-opt-${e}`))?.scrollIntoView({block:`nearest`})},{injector:this.injector})}typeAhead(e){let t=performance.now();this.typed=t-this.typedAt>600?e.toLowerCase():this.typed+e.toLowerCase(),this.typedAt=t;let n=this.options().findIndex(e=>!e.disabled&&e.label.toLowerCase().startsWith(this.typed));n<0||(this.open()?this.setActive(n):this.value.set(this.options()[n].value))}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&Xg(t.trigger,ID,5)(t.list,LD,5),e&2&&Zg(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&H(`pointerdown`,function(e){return t.onOutside(e)},Mu),e&2&&G(`open`,t.open())},inputs:{options:[1,`options`],value:[1,`value`],placeholder:[1,`placeholder`],ariaLabel:[1,`ariaLabel`],labelledBy:[1,`labelledBy`],describedBy:[1,`describedBy`],disabled:[1,`disabled`],emptyText:[1,`emptyText`]},outputs:{value:`valueChange`},decls:8,vars:13,consts:[[`trigger`,``],[`list`,``],[`type`,`button`,`role`,`combobox`,`aria-haspopup`,`listbox`,1,`trigger`,3,`click`,`keydown`,`blur`,`disabled`],[1,`value`],[1,`value-hint`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m6 9 6 6 6-6`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`up`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`pointerdown`],[`role`,`option`,3,`active`,`selected`],[`role`,`option`,`aria-disabled`,`true`,1,`empty`],[`role`,`option`,3,`pointerenter`,`pointerdown`,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`check`],[`d`,`m5 12 5 5 9-10`],[1,`label`],[1,`hint`]],template:function(e,t){e&1&&(z(0,`button`,2,0),U(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),z(2,`span`,3),K(3),B(),j(4,zD,2,1,`span`,4),E(),z(5,`svg`,5),Og(6,`path`,6),B()(),j(7,UD,5,5,`ul`,7)),e&2&&(Pg(`disabled`,t.disabled()),A(`id`,t.uid+`-trigger`)(`aria-controls`,t.uid+`-list`)(`aria-expanded`,t.open())(`aria-label`,t.ariaLabel()||null)(`aria-labelledby`,t.labelledBy()||null)(`aria-describedby`,t.describedBy()||null)(`aria-activedescendant`,t.open()&&t.active()>=0?t.uid+`-opt-`+t.active():null),O(2),G(`placeholder`,!t.current()),O(),J(` `,t.current()?.label??t.placeholder(),` `),O(),M(t.current()?.hint?4:-1),O(3),M(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { position: relative; display: inline-flex; min-width: 0; @@ -567,7 +567,7 @@ li.selected[_ngcontent-%COMP%] .check[_ngcontent-%COMP%] { .chevron[_ngcontent-%COMP%] { transition: none; } -}`]})};function YD(e,t){let n=FT(t);if(IT(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=LT(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function XD(e){return e.flatMap(e=>e.kind===`directive`?XD(e.children):[{...e,children:XD(e.children)}])}function ZD(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var QD={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function $D(e){return QD[e]}function eO(e,t,n,r=!1,i=0){let a=r?`${e}+`:`${e}`;if(n)return`${t} of ${r?`${e+i}+`:e+i}`;let o=i?` · ${i} directive ${i===1?`host`:`hosts`}`:``;return`${a} ${e===1&&!r?`instance`:`instances`}${o}`}function tO(e,t,n,r=!1,i=0){if(!n.trim())return``;if(!t)return`No components match.`;let a=e+i,o=r?`${a}+`:`${a}`,s=!r&&a===1;return`${t} of ${o} ${i?s?`row`:`rows`:s?`instance`:`instances`} match.`}function nO(e){let t=e?.components,n=e?.depth;return t&&n?`Showing the first ${t} component instances, and none nested more than ${n} elements deep. Others are not listed or searchable.`:t?`Showing the first ${t} component instances. Others are not listed or searchable.`:n?`Components nested more than ${n} elements deep are not listed or searchable.`:`The page has more components than the tree shows.`}function rO(e,t){let n=t?.detail?.id??null,r=t?.pageId??null;if(r!==e.pageId)return{pageId:r,selectedId:n,detailId:n,destroyed:null};let i=e.selectedId;return n&&n!==e.detailId&&n!==i&&(i=n),i&&t&&!t.truncated&&!iO(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function iO(e,t){return e.some(e=>e.id===t||iO(e.children,t))}function aO(e,t,n){let r=e.indexOf(n);if(r<0)return null;for(let n=r+1;n=0;n--)if(t.has(e[n]))return e[n];return null}var oO=(e,t)=>t.key,sO=(e,t)=>t.id;function cO(e,t){e&1&&(z(0,`p`,2),K(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),z(2,`code`),K(3,`provideClientHydration()`),B(),K(4,` and use a development build to see each component's status. `),B())}function lO(e,t){if(e&1&&(z(0,`li`)(1,`span`,9),K(2),B(),K(3),B()),e&2){let e=t.$implicit;b_(`count count-`+e.key),O(2),q(e.value),O(),J(` `,e.label,` `)}}function uO(e,t){if(e&1&&(z(0,`span`,15),K(1,`Expected `),z(2,`code`),K(3),B()()),e&2){let e=W().$implicit;O(3),q(e.expected)}}function dO(e,t){if(e&1&&(z(0,`span`,15),K(1,`Found `),z(2,`code`),K(3),B()()),e&2){let e=W().$implicit;O(3),q(e.actual)}}function fO(e,t){if(e&1){let e=V();z(0,`li`)(1,`button`,12),U(`click`,function(){let t=w(e).$implicit;return T(W(4).showNode.emit(t.id))})(`focus`,function(){let t=w(e).$implicit;return T(W(4).highlight.emit(t.id))})(`blur`,function(){return w(e),T(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return w(e),T(W(4).highlight.emit(null))}),z(2,`span`,13),K(3),B(),z(4,`span`,14),K(5),B(),j(6,uO,4,1,`span`,15),j(7,dO,4,1,`span`,15),B()()}if(e&2){let e=t.$implicit;O(3),q(e.name),O(2),J(`<`,e.tag,`>`),O(),M(e.expected?6:-1),O(),M(e.actual?7:-1)}}function pO(e,t){if(e&1&&(z(0,`h3`,10),K(1,`Mismatches`),B(),z(2,`ul`,11),N(3,fO,8,4,`li`,null,sO),B()),e&2){let e=W(2);O(3),P(e.mismatches)}}function mO(e,t){if(e&1){let e=V();z(0,`div`,3)(1,`ul`,4),N(2,lO,4,4,`li`,5,oO),B(),z(4,`button`,6),U(`click`,function(){return w(e),T(W(2).toggleOverlay())}),E(),z(5,`svg`,7),Og(6,`rect`,8),B(),K(7,` Outline on page `),B()(),j(8,pO,5,0)}if(e&2){let e=W(),t=W();O(2),P(t.counts()),O(2),A(`aria-pressed`,t.overlayOn()),O(4),M(e.mismatches.length?8:-1)}}function hO(e,t){e&1&&j(0,cO,5,0,`p`,2)(1,mO,9,2),e&2&&M(+!!t.hydrated)}function gO(e,t){e&1&&(z(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),z(2,`code`),K(3,`provideClientHydration()`),B(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),B())}var _O=class e{report=$(void 0);overlay=bv();showNode=bv();highlight=bv();overlayOn=Q(()=>this.report()?.overlay===!0);counts=X(()=>{let e=this.report()?.counts;return e?[{key:`hydrated`,label:`hydrated`,value:e.hydrated},{key:`skipped`,label:`skipped`,value:e.skipped},{key:`mismatched`,label:`mismatched`,value:e.mismatched},{key:`client`,label:`created on the client`,value:e.client},{key:`dehydratedBlocks`,label:e.dehydratedBlocks===1?`dehydrated @defer block`:`dehydrated @defer blocks`,value:e.dehydratedBlocks}]:[]});toggleOverlay(){let e=!this.overlayOn();this.overlayOn.set(e),this.overlay.emit(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-hydration-section`]],inputs:{report:[1,`report`]},outputs:{overlay:`overlay`,showNode:`showNode`,highlight:`highlight`},decls:5,vars:1,consts:[[`aria-labelledby`,`ct-hydration-title`,1,`hydration`],[`id`,`ct-hydration-title`,1,`title`],[1,`empty`],[1,`summary`],[`aria-label`,`Hydration summary`,1,`counts`],[3,`class`],[`type`,`button`,1,`outline`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`18`,`height`,`18`,`rx`,`2`,`stroke-dasharray`,`4 3`],[1,`num`],[1,`label`],[1,`mismatches`],[`type`,`button`,1,`mismatch`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`mono`,`muted`],[1,`detail-line`]],template:function(e,t){if(e&1&&(z(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),B(),j(3,hO,2,1)(4,gO,5,0,`p`,2),B()),e&2){let e;O(3),M((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { +}`]})};function KD(e,t){let n=MT(t);if(NT(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=PT(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function qD(e){return e.flatMap(e=>e.kind===`directive`?qD(e.children):[{...e,children:qD(e.children)}])}function JD(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var YD={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function XD(e){return YD[e]}function ZD(e,t,n,r=!1,i=0){let a=r?`${e}+`:`${e}`;if(n)return`${t} of ${r?`${e+i}+`:e+i}`;let o=i?` · ${i} directive ${i===1?`host`:`hosts`}`:``;return`${a} ${e===1&&!r?`instance`:`instances`}${o}`}function QD(e,t,n,r=!1,i=0){if(!n.trim())return``;if(!t)return`No components match.`;let a=e+i,o=r?`${a}+`:`${a}`,s=!r&&a===1;return`${t} of ${o} ${i?s?`row`:`rows`:s?`instance`:`instances`} match.`}function $D(e){let t=e?.components,n=e?.depth;return t&&n?`Showing the first ${t} component instances, and none nested more than ${n} elements deep. Others are not listed or searchable.`:t?`Showing the first ${t} component instances. Others are not listed or searchable.`:n?`Components nested more than ${n} elements deep are not listed or searchable.`:`The page has more components than the tree shows.`}function eO(e,t){let n=t?.detail?.id??null,r=t?.pageId??null;if(r!==e.pageId)return{pageId:r,selectedId:n,detailId:n,destroyed:null};let i=e.selectedId;return n&&n!==e.detailId&&n!==i&&(i=n),i&&t&&!t.truncated&&!tO(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function tO(e,t){return e.some(e=>e.id===t||tO(e.children,t))}function nO(e,t,n){let r=e.indexOf(n);if(r<0)return null;for(let n=r+1;n=0;n--)if(t.has(e[n]))return e[n];return null}var rO=(e,t)=>t.key,iO=(e,t)=>t.id;function aO(e,t){e&1&&(z(0,`p`,2),K(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),z(2,`code`),K(3,`provideClientHydration()`),B(),K(4,` and use a development build to see each component's status. `),B())}function oO(e,t){if(e&1&&(z(0,`li`)(1,`span`,9),K(2),B(),K(3),B()),e&2){let e=t.$implicit;b_(`count count-`+e.key),O(2),q(e.value),O(),J(` `,e.label,` `)}}function sO(e,t){if(e&1&&(z(0,`span`,15),K(1,`Expected `),z(2,`code`),K(3),B()()),e&2){let e=W().$implicit;O(3),q(e.expected)}}function cO(e,t){if(e&1&&(z(0,`span`,15),K(1,`Found `),z(2,`code`),K(3),B()()),e&2){let e=W().$implicit;O(3),q(e.actual)}}function lO(e,t){if(e&1){let e=V();z(0,`li`)(1,`button`,12),U(`click`,function(){let t=w(e).$implicit;return T(W(4).showNode.emit(t.id))})(`focus`,function(){let t=w(e).$implicit;return T(W(4).highlight.emit(t.id))})(`blur`,function(){return w(e),T(W(4).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(4).highlight.emit(t.id))})(`mouseleave`,function(){return w(e),T(W(4).highlight.emit(null))}),z(2,`span`,13),K(3),B(),z(4,`span`,14),K(5),B(),j(6,sO,4,1,`span`,15),j(7,cO,4,1,`span`,15),B()()}if(e&2){let e=t.$implicit;O(3),q(e.name),O(2),J(`<`,e.tag,`>`),O(),M(e.expected?6:-1),O(),M(e.actual?7:-1)}}function uO(e,t){if(e&1&&(z(0,`h3`,10),K(1,`Mismatches`),B(),z(2,`ul`,11),N(3,lO,8,4,`li`,null,iO),B()),e&2){let e=W(2);O(3),P(e.mismatches)}}function dO(e,t){if(e&1){let e=V();z(0,`div`,3)(1,`ul`,4),N(2,oO,4,4,`li`,5,rO),B(),z(4,`button`,6),U(`click`,function(){return w(e),T(W(2).toggleOverlay())}),E(),z(5,`svg`,7),Og(6,`rect`,8),B(),K(7,` Outline on page `),B()(),j(8,uO,5,0)}if(e&2){let e=W(),t=W();O(2),P(t.counts()),O(2),A(`aria-pressed`,t.overlayOn()),O(4),M(e.mismatches.length?8:-1)}}function fO(e,t){e&1&&j(0,aO,5,0,`p`,2)(1,dO,9,2),e&2&&M(+!!t.hydrated)}function pO(e,t){e&1&&(z(0,`p`,2),K(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),z(2,`code`),K(3,`provideClientHydration()`),B(),K(4,`, each component shows whether it was hydrated, skipped or mismatched. `),B())}var mO=class e{report=$(void 0);overlay=xv();showNode=xv();highlight=xv();overlayOn=Q(()=>this.report()?.overlay===!0);counts=X(()=>{let e=this.report()?.counts;return e?[{key:`hydrated`,label:`hydrated`,value:e.hydrated},{key:`skipped`,label:`skipped`,value:e.skipped},{key:`mismatched`,label:`mismatched`,value:e.mismatched},{key:`client`,label:`created on the client`,value:e.client},{key:`dehydratedBlocks`,label:e.dehydratedBlocks===1?`dehydrated @defer block`:`dehydrated @defer blocks`,value:e.dehydratedBlocks}]:[]});toggleOverlay(){let e=!this.overlayOn();this.overlayOn.set(e),this.overlay.emit(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-hydration-section`]],inputs:{report:[1,`report`]},outputs:{overlay:`overlay`,showNode:`showNode`,highlight:`highlight`},decls:5,vars:1,consts:[[`aria-labelledby`,`ct-hydration-title`,1,`hydration`],[`id`,`ct-hydration-title`,1,`title`],[1,`empty`],[1,`summary`],[`aria-label`,`Hydration summary`,1,`counts`],[3,`class`],[`type`,`button`,1,`outline`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`18`,`height`,`18`,`rx`,`2`,`stroke-dasharray`,`4 3`],[1,`num`],[1,`label`],[1,`mismatches`],[`type`,`button`,1,`mismatch`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`mono`,`muted`],[1,`detail-line`]],template:function(e,t){if(e&1&&(z(0,`section`,0)(1,`h2`,1),K(2,`Hydration`),B(),j(3,fO,2,1)(4,pO,5,0,`p`,2),B()),e&2){let e;O(3),M((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { margin-top: 16px; } @@ -738,7 +738,7 @@ svg[_ngcontent-%COMP%] { button[_ngcontent-%COMP%] { transition: none; } -}`]})};function vO(e){return new Date(e).toLocaleTimeString()}var yO=/[ \t\n\r]/;function bO(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${` `.repeat(i)}`;for(let e=0;e0?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function hO(e){return new Date(e).toLocaleTimeString()}var gO=/[ \t\n\r]/;function _O(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${` `.repeat(i)}`;for(let e=0;e0?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -765,7 +765,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},TO=864e13,EO=200,DO=300,OO=100,kO=10,AO=100,jO=2e3,MO=2e3,NO=4e3,PO=1e3,FO=100,IO=3,LO=50,RO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},zO=Object.values(RO),BO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),VO=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,HO=(e,t)=>typeof e==`string`?e.slice(0,t):``,UO=e=>VO(e)>0?VO(e):void 0,WO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function GO(e){if(!BO(e))return null;let t=HO(e.name,EO);return t?{name:t,checks:VO(e.checks),ms:VO(e.ms)}:null}function KO(e,t){if(!Array.isArray(e)||e.length!==5)return null;let[n,r,i,a,o]=e;return typeof n!=`number`||!Number.isInteger(n)||n<0||n>=t||typeof r!=`number`||!Number.isFinite(r)||Math.abs(r)>1e7||typeof a!=`number`||!Number.isInteger(a)||a<0||a>PO||typeof o!=`string`||!zO.includes(o)?null:[n,r,VO(i),a,o]}function qO(e,t){if(!BO(e)||typeof e.id!=`number`)return null;let n=WO(e.components,kO).map(GO).filter(e=>!!e),r=HO(e.trigger,DO),i=WO(e.spans,40).map(e=>KO(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(VO(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?VO(e.t):void 0,hookMs:UO(e.hookMs),afterRenderMs:UO(e.afterRenderMs),outputMs:UO(e.outputMs)},c=ZO(e.cause),l=UO(e.refreshed),u=UO(e.unchanged);return{id:VO(e.id),at:VO(e.at),ms:VO(e.ms),passes:VO(e.passes),...r?{trigger:r}:{},checks:VO(e.checks),components:n,...Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0)),...i.length?{spans:i}:{},...o?{droppedSpans:o}:{},...c?{cause:c}:{},...l?{refreshed:l}:{},...u?{unchanged:u}:{}}}var JO=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],YO={event:`Event`,http:`HTTP response`,timer:`Timer`,signal:`Signal write`,effect:`Effect`,markForCheck:`markForCheck`,input:`setInput`,view:`View change`,tick:`ApplicationRef.tick`,zone:`zone.js only`,unknown:`Unknown`},XO=e=>typeof e==`string`&&JO.includes(e);function ZO(e){if(!BO(e)||!XO(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};XO(e.via)&&(n.via=e.via);for(let r of t){let t=HO(e[r],EO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=WO(e.stack,IO).map(e=>HO(e,DO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(VO(e.more));return i&&(n.more=i),n}function QO(e){if(!BO(e))return null;let t=HO(e.name,EO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(VO(e.refreshed)),unchanged:Math.floor(VO(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function $O(e){if(!BO(e))return null;let t=HO(e.name,EO),n=HO(e.input,EO);if(!t||!n)return null;let r=HO(e.parent,EO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(VO(e.inPlace)),sameContents:Math.floor(VO(e.sameContents))}}function ek(e){if(!BO(e))return null;let t=HO(e.name,EO);if(!t)return null;let n=WO(e.tasks,3).map(e=>HO(e,EO)).filter(Boolean);return{name:t,ticks:Math.floor(VO(e.ticks)),...n.length?{tasks:n}:{}}}function tk(e){if(!BO(e))return;let t={};if(BO(e.causes))for(let n of JO){let r=Math.floor(VO(e.causes[n]));r&&(t[n]=r)}let n=WO(e.components,AO).map(QO).filter(e=>!!e),r=WO(e.inputs,LO).map($O).filter(e=>!!e),i=WO(e.zone,LO).map(ek).filter(e=>!!e),a=Math.floor(VO(e.major));return{triggers:e.triggers===!0,waste:e.waste===!0,...a&&a<1e3?{major:a}:{},causes:t,components:n,...r.length?{inputs:r}:{},...i.length?{zone:i}:{},...typeof e.zoneJs==`boolean`?{zoneJs:e.zoneJs}:{}}}function nk(e){let t=[],n=e.component?` in ${e.component}${e.listener?` (${e.listener})`:``}`:``;switch(e.kind){case`event`:t.push(`${e.event??`Template listener`}${e.target?` on ${e.target}`:``}${n}`);break;case`http`:t.push(`HTTP response${n}`);break;case`timer`:t.push(`${e.task??`Timer`}${n}`);break;case`zone`:t.push(`zone.js tick with no Angular notification${e.task?` after ${e.task}`:``}`);break;case`tick`:t.push(`ApplicationRef.tick()${n}`);break;default:t.push(`${YO[e.kind]}${n}`)}return e.signal?t.push(e.signal===`?`?`wrote an unnamed signal`:`wrote signal ${e.signal}`):e.via&&e.via!==e.kind&&t.push(`via ${YO[e.via]}`),e.zone&&e.kind!==`zone`&&t.push(`run by zone.js`),e.more&&t.push(`${e.more} more notification${e.more===1?``:`s`}`),t.join(`, `)}function rk(e){if(!e)return[];let t=[],n=(e.major??0)>=22;for(let r of e.components){if(r.refreshed<10)continue;let e=r.refreshed-r.unchanged;if(e/r.refreshed>.2)continue;let i=`refreshed ${r.refreshed} times and changed something in ${e}`;r.strategy===`Eager`?t.push({name:r.name,kind:`on-push`,text:n?`${r.name} was ${i}. It opts out of OnPush, which is the default from Angular 22: remove \`changeDetection: ChangeDetectionStrategy.Eager\` (or \`Default\`) so Angular skips it until an input, event, signal or markForCheck marks it.`:`${r.name} was ${i}. Add \`changeDetection: ChangeDetectionStrategy.OnPush\` so Angular skips it until an input, event, signal or markForCheck marks it.`}):r.strategy===`OnPush`&&t.push({name:r.name,kind:`already-on-push`,text:`${r.name} was ${i}, and it is already OnPush${n?` (the default from Angular 22)`:``}. Something keeps marking it: an input that gets a new reference each time, an event or output in it, markForCheck, or a signal it reads that is set to an equal value.`})}for(let n of e.inputs??[]){let e=n.parent?` set by ${n.parent}`:``;n.inPlace&&t.push({name:n.name,kind:`in-place`,text:`Input ${n.input} of ${n.name}${e} changed in place ${n.inPlace} time${n.inPlace===1?``:`s`}: same reference, different contents. OnPush components, computed and signal equality don't see that. Pass a new object or array instead of mutating it.`}),n.sameContents&&t.push({name:n.name,kind:`same-contents`,text:`Input ${n.input} of ${n.name}${e} got a new reference with the same contents ${n.sameContents} time${n.sameContents===1?``:`s`}, so Angular refreshed ${n.name} for nothing. Keep the reference when nothing changed, for example with a computed instead of a method call in the template.`})}for(let n of e.zone??[]){let e=n.tasks?.length?` (after ${n.tasks.join(`, `)})`:``;t.push({name:n.name,kind:`zone`,text:`${n.name} changed in ${n.ticks} tick${n.ticks===1?``:`s`} that only zone.js started${e}. Without zone.js it would not update: keep that state in a signal, or call markForCheck after changing it.`})}return t}function ik(e){let t=GO(e);return!t||!BO(e)?null:{...t,maxMs:VO(e.maxMs),cycles:VO(e.cycles)}}function ak(e){if(!BO(e))return null;let t=HO(e.name,EO),n=HO(e.hook,OO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:VO(r),ms:VO(i),maxMs:VO(a)}}function ok(e){if(!BO(e))return null;let t=HO(e.name,EO);if(!t)return null;let n=HO(e.listener,EO);return{name:t,...n?{listener:n}:{},calls:VO(e.calls),ms:VO(e.ms),maxMs:VO(e.maxMs)}}function sk(e){if(BO(e)&&VO(e.runs))return{runs:VO(e.runs),ms:VO(e.ms),maxMs:VO(e.maxMs)}}function ck(e,t){if(!BO(e))return null;let n=WO(e.spanNames,NO).map(e=>HO(e,DO)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,MO)).map(e=>qO(e,n.length)).filter(e=>!!e):[],i={},a=0;if(BO(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-jO);for(let[e,n]of t.slice(0,jO))e.length<50&&VO(n)&&(i[e]=VO(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(VO(e.droppedClasses))+Math.max(0,o.length-AO),c=Math.floor(VO(e.droppedHosts))+a,l=WO(e.hooks,FO).map(ak).filter(e=>!!e),u=WO(e.outputs,FO).map(ok).filter(e=>!!e),d=Math.max(0,WO(e.hooks,1/0).length-FO)+Math.max(0,WO(e.outputs,1/0).length-FO),f=Math.floor(VO(e.droppedTimings))+d,p=sk(e.afterRender),m=r.some(e=>e.spans?.length),h=tk(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=TO?VO(e.startedAt):null,dropped:VO(e.dropped),cycles:r,components:o.slice(0,AO).map(ik).filter(e=>!!e),...s?{droppedClasses:s}:{},hosts:i,...c?{droppedHosts:c}:{},...l.length?{hooks:l}:{},...u.length?{outputs:u}:{},...f?{droppedTimings:f}:{},...p?{afterRender:p}:{},...m?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var lk=`pangular-inspector/change-detection`;function uk(e,t,n=Date.now()){return{format:lk,version:1,exportedAt:n,pageId:t,recording:{...ck(e,MO)??e,recording:!1,hosts:{}}}}function dk(e,t){if(e.length>2e7||e.length*3>2e7&&new TextEncoder().encode(e).byteLength>2e7)return{ok:!1,error:`The file is larger than 20 MB.`};let n;try{n=JSON.parse(e)}catch{return{ok:!1,error:`The file is not valid JSON.`}}if(!BO(n))return{ok:!1,error:`The file is not a recording.`};if(n.format!==void 0&&n.format!==`pangular-inspector/change-detection`)return{ok:!1,error:`The file is not a change detection recording.`};let r=BO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=ck(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=HO(n.pageId??r.pageId,49)||`imported`,o=UO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var fk=1,pk=1,mk=2,hk={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},gk=e=>Math.round(e*1e6)/1e3;function _k(e,t){let n=e.spanNames??[],r=e.cycles[0]?.at??0,i=e.startedAt??r,a=[],o=0,s=0;for(let t of e.cycles){let e=t.t??Math.max(0,t.at-i),r=e+t.ms;a.push({name:`Change detection #${t.id}`,cat:`change-detection`,ph:`X`,pid:fk,tid:pk,ts:gk(e),dur:gk(t.ms),args:{checks:t.checks,passes:t.passes,...t.trigger?{trigger:t.trigger}:{},...t.hookMs?{hookMs:t.hookMs}:{},...t.afterRenderMs?{afterRenderMs:t.afterRenderMs}:{},...t.outputMs?{outputMs:t.outputMs}:{},...t.cause?{cause:nk(t.cause)}:{},...t.unchanged?{unchanged:t.unchanged}:{},slowest:t.components.map(e=>`${e.name} ${e.checks}x ${e.ms}ms`)}}),s+=t.droppedSpans??0;let c=[{end:r}],l=[...t.spans??[]].sort((e,t)=>e[1]-t[1]||t[2]-e[2]);for(let[r,i,s,u,d]of l){o++;let l=n[r]??`?`;if(d===RO.output){let n=e+i;a.push({name:l,cat:hk[d],ph:`X`,pid:fk,tid:mk,ts:gk(n),dur:gk(i<0?Math.max(0,Math.min(s,-i)):s),args:{cycle:t.id}});continue}let f=Math.max(e,e+i);for(;c.length>1&&c.at(-1).end<=f;)c.pop();let p=c.at(-1).end,m=Math.min(f+s,p);me.ts??0));if(c<0)for(let e of a)e.ts=gk((e.ts-c)/1e3);a.sort((e,t)=>e.ts-t.ts||t.dur-e.dur);let l=(e,t,n)=>({name:t,ph:`M`,pid:fk,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(pk,`thread_name`,`Change detection`),l(mk,`thread_name`,`Outputs`),...a],displayTimeUnit:`ms`,otherData:{source:`Pangular Inspector change detection recording`,pageId:t,cycles:e.cycles.length,droppedCycles:e.dropped,spans:o,droppedSpans:s,...e.startedAt&&e.startedAt<=TO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var vk=16.6;function yk(e){return e.ms>vk}function bk(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function xk(e,t){if(!t)return[...e];let n=Math.min(t.from,t.to),r=Math.max(t.from,t.to),i=e.filter(e=>e.id>=n&&e.id<=r);return i.length?i:[...e]}function Sk(e){let t=new Map;for(let n of e)for(let e of n.components){let n=t.get(e.name);n?(n.checks+=e.checks,n.ms+=e.ms,n.maxMs=Math.max(n.maxMs,e.ms),n.cycles+=1):t.set(e.name,{name:e.name,checks:e.checks,ms:e.ms,maxMs:e.ms,cycles:1})}return[...t.values()].sort((e,t)=>t.ms-e.ms||e.name.localeCompare(t.name))}function Ck(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,vk*1.25)}function wk(e,t,n=3){let r=e.map(e=>({item:e,value:t(e)})).filter(e=>e.value>0).sort((e,t)=>t.value-e.value),i=r.reduce((e,t)=>e+t.value,0);if(!i)return[];let a=n/i,o=[],s=0,c=0,l=n,u=1,d=[],f=(e,t)=>{let n=e.reduce((e,t)=>e+t,0),r=Math.max(...e),i=Math.min(...e);return Math.max(t*t*r/(n*n),n*n/(t*t*i))},p=()=>{let e=d.reduce((e,t)=>e+t.area,0);if(l>=u){let t=e/u,n=c;for(let e of d){let r=e.area/t;o.push({item:e.item,x:s,y:n,w:t,h:r}),n+=r}s+=t,l-=t}else{let t=e/l,n=s;for(let e of d){let r=e.area/t;o.push({item:e.item,x:n,y:c,w:r,h:t}),n+=r}c+=t,u-=t}d=[]};for(let e of r){let t=e.value*a,n=Math.min(l,u),r=d.map(e=>e.area);d.length&&f([...r,t],n)>f(r,n)&&p(),d.push({item:e.item,area:t})}return d.length&&p(),o.map(e=>({item:e.item,x:e.x/n*100,y:e.y*100,w:e.w/n*100,h:e.h*100}))}var Tk={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function Ek(e,t){if(t===`c`)return e||null;if(t===`h`){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}if(t===`o`){let t=e.indexOf(` (`),n=t>0?e.slice(0,t):e;return n&&n!==`?`?n:null}return null}function Dk(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],h=f>0&&m!==void 0&&ot.kind,kk=(e,t)=>t.name,Ak=(e,t)=>t.name+`.`+t.input;function jk(e,t){e&1&&(z(0,`p`,3),K(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),B())}function Mk(e,t){if(e&1&&(z(0,`tr`)(1,`td`),K(2),B(),z(3,`td`,6),K(4),B()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.count)}}function Nk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),B(),z(5,`th`,5),K(6,`Cycles`),B()()(),z(7,`tbody`),N(8,Mk,5,2,`tr`,null,Ok),B()()),e&2){let e=W(2);O(8),P(e.causes())}}function Pk(e,t){e&1&&(z(0,`p`,3),K(1,`No cycle has a cause yet.`),B())}function Fk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,7),K(6),B()()),e&2){let e=t.$implicit;O(2),q(e.name),O(2),q(e.ticks),O(2),q(e.tasks?.join(`, `))}}function Ik(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),B(),z(5,`th`,5),K(6,`Zone-only ticks`),B(),z(7,`th`,4),K(8,`After`),B()()(),z(9,`tbody`),N(10,Fk,7,3,`tr`,null,kk),B()()),e&2){let e=W(3);O(10),P(e.zone())}}function Lk(e,t){if(e&1&&(z(0,`p`,3),K(1),B()),e&2){let e=W(3);O(),q(e.zoneNote())}}function Rk(e,t){if(e&1&&(z(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),B(),j(3,Ik,12,0,`table`)(4,Lk,2,1,`p`,3),B()),e&2){let e=W(),t=W();O(3),M(t.zone().length?3:e.triggers?4:-1)}}function zk(e,t){e&1&&(z(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),B())}function Bk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`),K(8),B()()),e&2){let e=t.$implicit,n=W(3);O(2),q(e.name),O(2),q(e.refreshed),O(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),O(2),q(e.strategy??`Unknown`)}}function Vk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),B(),z(5,`th`,5),K(6,`Refreshed`),B(),z(7,`th`,5),K(8,`Changed nothing`),B(),z(9,`th`,4),K(10,`Strategy`),B()()(),z(11,`tbody`),N(12,Bk,9,5,`tr`,null,kk),B()()),e&2){let e=W(2);O(12),P(e.wasted())}}function Hk(e,t){e&1&&(z(0,`p`,3),K(1,`Every refreshed check changed something.`),B())}function Uk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,7),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`,6),K(8),B()()),e&2){let e=t.$implicit;O(2),Y(``,e.name,`.`,e.input),O(2),q(e.parent??`Unknown`),O(2),q(e.inPlace),O(2),q(e.sameContents)}}function Wk(e,t){if(e&1&&(z(0,`h4`),K(1,`Inputs that break OnPush`),B(),z(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),B(),z(7,`th`,4),K(8,`Set by`),B(),z(9,`th`,5),K(10,`Changed in place`),B(),z(11,`th`,5),K(12,`Same contents, new reference`),B()()(),z(13,`tbody`),N(14,Uk,9,5,`tr`,null,Ak),B()()),e&2){let e=W(2);O(14),P(e.inputs())}}function Gk(e,t){if(e&1&&(z(0,`li`),K(1),B()),e&2){let e=t.$implicit;O(),q(e.text)}}function Kk(e,t){if(e&1&&(z(0,`h4`),K(1,`Hints`),B(),z(2,`ul`,8),N(3,Gk,2,1,`li`,null,gg),B()),e&2){let e=W(2);O(3),P(e.hints())}}function qk(e,t){if(e&1&&(z(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),B(),z(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),B(),j(7,jk,2,0,`p`,3)(8,Nk,10,0,`table`)(9,Pk,2,0,`p`,3),B(),j(10,Rk,5,1,`div`),B(),z(11,`h4`),K(12,`Wasted checks`),B(),j(13,zk,2,0,`p`,3)(14,Vk,14,0,`table`)(15,Hk,2,0,`p`,3),j(16,Wk,16,0),j(17,Kk,5,0),B()),e&2){let e=t,n=W();O(7),M(e.triggers?n.causes().length?8:9:7),O(3),M(n.hasZone()?10:-1),O(3),M(e.waste?n.wasted().length?14:15:13),O(3),M(n.inputs().length?16:-1),O(),M(n.hints().length?17:-1)}}var Jk=10,Yk=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return JO.filter(t=>e[t]).map(t=>({kind:t,label:YO[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,Jk));zoneTicks=X(()=>this.diagnosis()?.causes.zone??0);hasZone=X(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=X(()=>{let e=this.zoneTicks();return e?`${e} ${e===1?`tick`:`ticks`} came from zone.js alone, and no component changed in them.`:`No component changed in a tick only zone.js started.`});wasted=X(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,Jk));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,Jk));hints=X(()=>rk(this.diagnosis()??void 0).slice(0,Jk));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-diagnosis`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[`aria-labelledby`,`cd-diagnosis-heading`,1,`diagnosis`],[`id`,`cd-diagnosis-heading`],[1,`grid`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`num`],[1,`mono`],[1,`hints`]],template:function(e,t){if(e&1&&j(0,qk,18,5,`section`,0),e&2){let e;M((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},SO=864e13,CO=200,wO=300,TO=100,EO=10,DO=100,OO=2e3,kO=2e3,AO=4e3,jO=1e3,MO=100,NO=3,PO=50,FO={component:`c`,hook:`h`,afterRender:`r`,output:`o`},IO=Object.values(FO),LO=e=>!!e&&typeof e==`object`&&!Array.isArray(e),RO=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,zO=(e,t)=>typeof e==`string`?e.slice(0,t):``,BO=e=>RO(e)>0?RO(e):void 0,VO=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function HO(e){if(!LO(e))return null;let t=zO(e.name,CO);return t?{name:t,checks:RO(e.checks),ms:RO(e.ms)}:null}function UO(e,t){if(!Array.isArray(e)||e.length!==5)return null;let[n,r,i,a,o]=e;return typeof n!=`number`||!Number.isInteger(n)||n<0||n>=t||typeof r!=`number`||!Number.isFinite(r)||Math.abs(r)>1e7||typeof a!=`number`||!Number.isInteger(a)||a<0||a>jO||typeof o!=`string`||!IO.includes(o)?null:[n,r,RO(i),a,o]}function WO(e,t){if(!LO(e)||typeof e.id!=`number`)return null;let n=VO(e.components,EO).map(HO).filter(e=>!!e),r=zO(e.trigger,wO),i=VO(e.spans,40).map(e=>UO(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(RO(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?RO(e.t):void 0,hookMs:BO(e.hookMs),afterRenderMs:BO(e.afterRenderMs),outputMs:BO(e.outputMs)},c=JO(e.cause),l=BO(e.refreshed),u=BO(e.unchanged);return{id:RO(e.id),at:RO(e.at),ms:RO(e.ms),passes:RO(e.passes),...r?{trigger:r}:{},checks:RO(e.checks),components:n,...Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0)),...i.length?{spans:i}:{},...o?{droppedSpans:o}:{},...c?{cause:c}:{},...l?{refreshed:l}:{},...u?{unchanged:u}:{}}}var GO=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],KO={event:`Event`,http:`HTTP response`,timer:`Timer`,signal:`Signal write`,effect:`Effect`,markForCheck:`markForCheck`,input:`setInput`,view:`View change`,tick:`ApplicationRef.tick`,zone:`zone.js only`,unknown:`Unknown`},qO=e=>typeof e==`string`&&GO.includes(e);function JO(e){if(!LO(e)||!qO(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};qO(e.via)&&(n.via=e.via);for(let r of t){let t=zO(e[r],CO);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=VO(e.stack,NO).map(e=>zO(e,wO)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(RO(e.more));return i&&(n.more=i),n}function YO(e){if(!LO(e))return null;let t=zO(e.name,CO);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(RO(e.refreshed)),unchanged:Math.floor(RO(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function XO(e){if(!LO(e))return null;let t=zO(e.name,CO),n=zO(e.input,CO);if(!t||!n)return null;let r=zO(e.parent,CO);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(RO(e.inPlace)),sameContents:Math.floor(RO(e.sameContents))}}function ZO(e){if(!LO(e))return null;let t=zO(e.name,CO);if(!t)return null;let n=VO(e.tasks,3).map(e=>zO(e,CO)).filter(Boolean);return{name:t,ticks:Math.floor(RO(e.ticks)),...n.length?{tasks:n}:{}}}function QO(e){if(!LO(e))return;let t={};if(LO(e.causes))for(let n of GO){let r=Math.floor(RO(e.causes[n]));r&&(t[n]=r)}let n=VO(e.components,DO).map(YO).filter(e=>!!e),r=VO(e.inputs,PO).map(XO).filter(e=>!!e),i=VO(e.zone,PO).map(ZO).filter(e=>!!e),a=Math.floor(RO(e.major));return{triggers:e.triggers===!0,waste:e.waste===!0,...a&&a<1e3?{major:a}:{},causes:t,components:n,...r.length?{inputs:r}:{},...i.length?{zone:i}:{},...typeof e.zoneJs==`boolean`?{zoneJs:e.zoneJs}:{}}}function $O(e){let t=[],n=e.component?` in ${e.component}${e.listener?` (${e.listener})`:``}`:``;switch(e.kind){case`event`:t.push(`${e.event??`Template listener`}${e.target?` on ${e.target}`:``}${n}`);break;case`http`:t.push(`HTTP response${n}`);break;case`timer`:t.push(`${e.task??`Timer`}${n}`);break;case`zone`:t.push(`zone.js tick with no Angular notification${e.task?` after ${e.task}`:``}`);break;case`tick`:t.push(`ApplicationRef.tick()${n}`);break;default:t.push(`${KO[e.kind]}${n}`)}return e.signal?t.push(e.signal===`?`?`wrote an unnamed signal`:`wrote signal ${e.signal}`):e.via&&e.via!==e.kind&&t.push(`via ${KO[e.via]}`),e.zone&&e.kind!==`zone`&&t.push(`run by zone.js`),e.more&&t.push(`${e.more} more notification${e.more===1?``:`s`}`),t.join(`, `)}function ek(e){if(!e)return[];let t=[],n=(e.major??0)>=22;for(let r of e.components){if(r.refreshed<10)continue;let e=r.refreshed-r.unchanged;if(e/r.refreshed>.2)continue;let i=`refreshed ${r.refreshed} times and changed something in ${e}`;r.strategy===`Eager`?t.push({name:r.name,kind:`on-push`,text:n?`${r.name} was ${i}. It opts out of OnPush, which is the default from Angular 22: remove \`changeDetection: ChangeDetectionStrategy.Eager\` (or \`Default\`) so Angular skips it until an input, event, signal or markForCheck marks it.`:`${r.name} was ${i}. Add \`changeDetection: ChangeDetectionStrategy.OnPush\` so Angular skips it until an input, event, signal or markForCheck marks it.`}):r.strategy===`OnPush`&&t.push({name:r.name,kind:`already-on-push`,text:`${r.name} was ${i}, and it is already OnPush${n?` (the default from Angular 22)`:``}. Something keeps marking it: an input that gets a new reference each time, an event or output in it, markForCheck, or a signal it reads that is set to an equal value.`})}for(let n of e.inputs??[]){let e=n.parent?` set by ${n.parent}`:``;n.inPlace&&t.push({name:n.name,kind:`in-place`,text:`Input ${n.input} of ${n.name}${e} changed in place ${n.inPlace} time${n.inPlace===1?``:`s`}: same reference, different contents. OnPush components, computed and signal equality don't see that. Pass a new object or array instead of mutating it.`}),n.sameContents&&t.push({name:n.name,kind:`same-contents`,text:`Input ${n.input} of ${n.name}${e} got a new reference with the same contents ${n.sameContents} time${n.sameContents===1?``:`s`}, so Angular refreshed ${n.name} for nothing. Keep the reference when nothing changed, for example with a computed instead of a method call in the template.`})}for(let n of e.zone??[]){let e=n.tasks?.length?` (after ${n.tasks.join(`, `)})`:``;t.push({name:n.name,kind:`zone`,text:`${n.name} changed in ${n.ticks} tick${n.ticks===1?``:`s`} that only zone.js started${e}. Without zone.js it would not update: keep that state in a signal, or call markForCheck after changing it.`})}return t}function tk(e){let t=HO(e);return!t||!LO(e)?null:{...t,maxMs:RO(e.maxMs),cycles:RO(e.cycles)}}function nk(e){if(!LO(e))return null;let t=zO(e.name,CO),n=zO(e.hook,TO);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:RO(r),ms:RO(i),maxMs:RO(a)}}function rk(e){if(!LO(e))return null;let t=zO(e.name,CO);if(!t)return null;let n=zO(e.listener,CO);return{name:t,...n?{listener:n}:{},calls:RO(e.calls),ms:RO(e.ms),maxMs:RO(e.maxMs)}}function ik(e){if(LO(e)&&RO(e.runs))return{runs:RO(e.runs),ms:RO(e.ms),maxMs:RO(e.maxMs)}}function ak(e,t){if(!LO(e))return null;let n=VO(e.spanNames,AO).map(e=>zO(e,wO)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,kO)).map(e=>WO(e,n.length)).filter(e=>!!e):[],i={},a=0;if(LO(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-OO);for(let[e,n]of t.slice(0,OO))e.length<50&&RO(n)&&(i[e]=RO(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(RO(e.droppedClasses))+Math.max(0,o.length-DO),c=Math.floor(RO(e.droppedHosts))+a,l=VO(e.hooks,MO).map(nk).filter(e=>!!e),u=VO(e.outputs,MO).map(rk).filter(e=>!!e),d=Math.max(0,VO(e.hooks,1/0).length-MO)+Math.max(0,VO(e.outputs,1/0).length-MO),f=Math.floor(RO(e.droppedTimings))+d,p=ik(e.afterRender),m=r.some(e=>e.spans?.length),h=QO(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=SO?RO(e.startedAt):null,dropped:RO(e.dropped),cycles:r,components:o.slice(0,DO).map(tk).filter(e=>!!e),...s?{droppedClasses:s}:{},hosts:i,...c?{droppedHosts:c}:{},...l.length?{hooks:l}:{},...u.length?{outputs:u}:{},...f?{droppedTimings:f}:{},...p?{afterRender:p}:{},...m?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var ok=`pangular-inspector/change-detection`;function sk(e,t,n=Date.now()){return{format:ok,version:1,exportedAt:n,pageId:t,recording:{...ak(e,kO)??e,recording:!1,hosts:{}}}}function ck(e,t){if(e.length>2e7||e.length*3>2e7&&new TextEncoder().encode(e).byteLength>2e7)return{ok:!1,error:`The file is larger than 20 MB.`};let n;try{n=JSON.parse(e)}catch{return{ok:!1,error:`The file is not valid JSON.`}}if(!LO(n))return{ok:!1,error:`The file is not a recording.`};if(n.format!==void 0&&n.format!==`pangular-inspector/change-detection`)return{ok:!1,error:`The file is not a change detection recording.`};let r=LO(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=ak(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=zO(n.pageId??r.pageId,49)||`imported`,o=BO(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var lk=1,uk=1,dk=2,fk={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},pk=e=>Math.round(e*1e6)/1e3;function mk(e,t){let n=e.spanNames??[],r=e.cycles[0]?.at??0,i=e.startedAt??r,a=[],o=0,s=0;for(let t of e.cycles){let e=t.t??Math.max(0,t.at-i),r=e+t.ms;a.push({name:`Change detection #${t.id}`,cat:`change-detection`,ph:`X`,pid:lk,tid:uk,ts:pk(e),dur:pk(t.ms),args:{checks:t.checks,passes:t.passes,...t.trigger?{trigger:t.trigger}:{},...t.hookMs?{hookMs:t.hookMs}:{},...t.afterRenderMs?{afterRenderMs:t.afterRenderMs}:{},...t.outputMs?{outputMs:t.outputMs}:{},...t.cause?{cause:$O(t.cause)}:{},...t.unchanged?{unchanged:t.unchanged}:{},slowest:t.components.map(e=>`${e.name} ${e.checks}x ${e.ms}ms`)}}),s+=t.droppedSpans??0;let c=[{end:r}],l=[...t.spans??[]].sort((e,t)=>e[1]-t[1]||t[2]-e[2]);for(let[r,i,s,u,d]of l){o++;let l=n[r]??`?`;if(d===FO.output){let n=e+i;a.push({name:l,cat:fk[d],ph:`X`,pid:lk,tid:dk,ts:pk(n),dur:pk(i<0?Math.max(0,Math.min(s,-i)):s),args:{cycle:t.id}});continue}let f=Math.max(e,e+i);for(;c.length>1&&c.at(-1).end<=f;)c.pop();let p=c.at(-1).end,m=Math.min(f+s,p);me.ts??0));if(c<0)for(let e of a)e.ts=pk((e.ts-c)/1e3);a.sort((e,t)=>e.ts-t.ts||t.dur-e.dur);let l=(e,t,n)=>({name:t,ph:`M`,pid:lk,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(uk,`thread_name`,`Change detection`),l(dk,`thread_name`,`Outputs`),...a],displayTimeUnit:`ms`,otherData:{source:`Pangular Inspector change detection recording`,pageId:t,cycles:e.cycles.length,droppedCycles:e.dropped,spans:o,droppedSpans:s,...e.startedAt&&e.startedAt<=SO?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var hk=16.6;function gk(e){return e.ms>hk}function _k(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function vk(e,t){if(!t)return[...e];let n=Math.min(t.from,t.to),r=Math.max(t.from,t.to),i=e.filter(e=>e.id>=n&&e.id<=r);return i.length?i:[...e]}function yk(e){let t=new Map;for(let n of e)for(let e of n.components){let n=t.get(e.name);n?(n.checks+=e.checks,n.ms+=e.ms,n.maxMs=Math.max(n.maxMs,e.ms),n.cycles+=1):t.set(e.name,{name:e.name,checks:e.checks,ms:e.ms,maxMs:e.ms,cycles:1})}return[...t.values()].sort((e,t)=>t.ms-e.ms||e.name.localeCompare(t.name))}function bk(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,hk*1.25)}function xk(e,t,n=3){let r=e.map(e=>({item:e,value:t(e)})).filter(e=>e.value>0).sort((e,t)=>t.value-e.value),i=r.reduce((e,t)=>e+t.value,0);if(!i)return[];let a=n/i,o=[],s=0,c=0,l=n,u=1,d=[],f=(e,t)=>{let n=e.reduce((e,t)=>e+t,0),r=Math.max(...e),i=Math.min(...e);return Math.max(t*t*r/(n*n),n*n/(t*t*i))},p=()=>{let e=d.reduce((e,t)=>e+t.area,0);if(l>=u){let t=e/u,n=c;for(let e of d){let r=e.area/t;o.push({item:e.item,x:s,y:n,w:t,h:r}),n+=r}s+=t,l-=t}else{let t=e/l,n=s;for(let e of d){let r=e.area/t;o.push({item:e.item,x:n,y:c,w:r,h:t}),n+=r}c+=t,u-=t}d=[]};for(let e of r){let t=e.value*a,n=Math.min(l,u),r=d.map(e=>e.area);d.length&&f([...r,t],n)>f(r,n)&&p(),d.push({item:e.item,area:t})}return d.length&&p(),o.map(e=>({item:e.item,x:e.x/n*100,y:e.y*100,w:e.w/n*100,h:e.h*100}))}var Sk={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function Ck(e,t){if(t===`c`)return e||null;if(t===`h`){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}if(t===`o`){let t=e.indexOf(` (`),n=t>0?e.slice(0,t):e;return n&&n!==`?`?n:null}return null}function wk(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],h=f>0&&m!==void 0&&ot.kind,Ek=(e,t)=>t.name,Dk=(e,t)=>t.name+`.`+t.input;function Ok(e,t){e&1&&(z(0,`p`,3),K(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),B())}function kk(e,t){if(e&1&&(z(0,`tr`)(1,`td`),K(2),B(),z(3,`td`,6),K(4),B()()),e&2){let e=t.$implicit;O(2),q(e.label),O(2),q(e.count)}}function Ak(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Trigger`),B(),z(5,`th`,5),K(6,`Cycles`),B()()(),z(7,`tbody`),N(8,kk,5,2,`tr`,null,Tk),B()()),e&2){let e=W(2);O(8),P(e.causes())}}function jk(e,t){e&1&&(z(0,`p`,3),K(1,`No cycle has a cause yet.`),B())}function Mk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,7),K(6),B()()),e&2){let e=t.$implicit;O(2),q(e.name),O(2),q(e.ticks),O(2),q(e.tasks?.join(`, `))}}function Nk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),B(),z(5,`th`,5),K(6,`Zone-only ticks`),B(),z(7,`th`,4),K(8,`After`),B()()(),z(9,`tbody`),N(10,Mk,7,3,`tr`,null,Ek),B()()),e&2){let e=W(3);O(10),P(e.zone())}}function Pk(e,t){if(e&1&&(z(0,`p`,3),K(1),B()),e&2){let e=W(3);O(),q(e.zoneNote())}}function Fk(e,t){if(e&1&&(z(0,`div`)(1,`h4`),K(2,`Depends on zone.js`),B(),j(3,Nk,12,0,`table`)(4,Pk,2,1,`p`,3),B()),e&2){let e=W(),t=W();O(3),M(t.zone().length?3:e.triggers?4:-1)}}function Ik(e,t){e&1&&(z(0,`p`,3),K(1,`The page can't watch DOM updates, so wasted checks are not counted.`),B())}function Lk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`),K(8),B()()),e&2){let e=t.$implicit,n=W(3);O(2),q(e.name),O(2),q(e.refreshed),O(2),Y(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),O(2),q(e.strategy??`Unknown`)}}function Rk(e,t){if(e&1&&(z(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),K(4,`Component`),B(),z(5,`th`,5),K(6,`Refreshed`),B(),z(7,`th`,5),K(8,`Changed nothing`),B(),z(9,`th`,4),K(10,`Strategy`),B()()(),z(11,`tbody`),N(12,Lk,9,5,`tr`,null,Ek),B()()),e&2){let e=W(2);O(12),P(e.wasted())}}function zk(e,t){e&1&&(z(0,`p`,3),K(1,`Every refreshed check changed something.`),B())}function Bk(e,t){if(e&1&&(z(0,`tr`)(1,`td`,7),K(2),B(),z(3,`td`,7),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`,6),K(8),B()()),e&2){let e=t.$implicit;O(2),Y(``,e.name,`.`,e.input),O(2),q(e.parent??`Unknown`),O(2),q(e.inPlace),O(2),q(e.sameContents)}}function Vk(e,t){if(e&1&&(z(0,`h4`),K(1,`Inputs that break OnPush`),B(),z(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),K(6,`Input`),B(),z(7,`th`,4),K(8,`Set by`),B(),z(9,`th`,5),K(10,`Changed in place`),B(),z(11,`th`,5),K(12,`Same contents, new reference`),B()()(),z(13,`tbody`),N(14,Bk,9,5,`tr`,null,Dk),B()()),e&2){let e=W(2);O(14),P(e.inputs())}}function Hk(e,t){if(e&1&&(z(0,`li`),K(1),B()),e&2){let e=t.$implicit;O(),q(e.text)}}function Uk(e,t){if(e&1&&(z(0,`h4`),K(1,`Hints`),B(),z(2,`ul`,8),N(3,Hk,2,1,`li`,null,gg),B()),e&2){let e=W(2);O(3),P(e.hints())}}function Wk(e,t){if(e&1&&(z(0,`section`,0)(1,`h3`,1),K(2,`Why it ran and what it wasted`),B(),z(3,`div`,2)(4,`div`)(5,`h4`),K(6,`What started the cycles`),B(),j(7,Ok,2,0,`p`,3)(8,Ak,10,0,`table`)(9,jk,2,0,`p`,3),B(),j(10,Fk,5,1,`div`),B(),z(11,`h4`),K(12,`Wasted checks`),B(),j(13,Ik,2,0,`p`,3)(14,Rk,14,0,`table`)(15,zk,2,0,`p`,3),j(16,Vk,16,0),j(17,Uk,5,0),B()),e&2){let e=t,n=W();O(7),M(e.triggers?n.causes().length?8:9:7),O(3),M(n.hasZone()?10:-1),O(3),M(e.waste?n.wasted().length?14:15:13),O(3),M(n.inputs().length?16:-1),O(),M(n.hints().length?17:-1)}}var Gk=10,Kk=class e{page=$(null);diagnosis=X(()=>this.page()?.diagnosis??null);causes=X(()=>{let e=this.diagnosis()?.causes??{};return GO.filter(t=>e[t]).map(t=>({kind:t,label:KO[t],count:e[t]}))});zone=X(()=>(this.diagnosis()?.zone??[]).slice(0,Gk));zoneTicks=X(()=>this.diagnosis()?.causes.zone??0);hasZone=X(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=X(()=>{let e=this.zoneTicks();return e?`${e} ${e===1?`tick`:`ticks`} came from zone.js alone, and no component changed in them.`:`No component changed in a tick only zone.js started.`});wasted=X(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,Gk));inputs=X(()=>(this.diagnosis()?.inputs??[]).slice(0,Gk));hints=X(()=>ek(this.diagnosis()??void 0).slice(0,Gk));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-diagnosis`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[`aria-labelledby`,`cd-diagnosis-heading`,1,`diagnosis`],[`id`,`cd-diagnosis-heading`],[1,`grid`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`num`],[1,`mono`],[1,`hints`]],template:function(e,t){if(e&1&&j(0,Wk,18,5,`section`,0),e&2){let e;M((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -844,7 +844,7 @@ td.mono[_ngcontent-%COMP%] { .hints[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%] { margin-top: 4px; -}`]})},Xk=(e,t)=>t.cycle.id,Zk=(e,t)=>t.id;function Qk(e,t){if(e&1){let e=V();z(0,`button`,27),U(`click`,function(){return w(e),T(W().showAll())}),K(1,`Show all cycles`),B()}}function $k(e,t){if(e&1&&Og(0,`div`,28),e&2){let e=t;y_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function eA(e,t){if(e&1&&(z(0,`div`,29),Og(1,`span`,30),B()),e&2){let e=t.$implicit,n=W();G(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),Pg(`id`,n.optionId(e.index)),A(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),O(),y_(`height`,e.height,`%`)}}function tA(e,t){e&1&&(z(0,`span`,33),K(1,`over budget`),B())}function nA(e,t){if(e&1&&(z(0,`p`),K(1,` after `),z(2,`span`,35),K(3),B()()),e&2){let e=W();O(3),q(e.cycle.trigger)}}function rA(e,t){if(e&1&&(z(0,`p`,34)(1,`span`,36),K(2),B(),z(3,`span`),K(4),B()()),e&2){let e=t.$implicit,n=W(2);O(2),q(e.name),O(2),q(n.fmt(e.ms))}}function iA(e,t){if(e&1&&(z(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),B(),z(4,`span`),K(5),B(),j(6,tA,2,0,`span`,33),B(),j(7,nA,4,1,`p`),z(8,`p`),K(9),B(),N(10,rA,5,2,`p`,34,gg),B()),e&2){let e=t,n=W();y_(`left`,e.left)(`right`,e.right),O(3),q(n.fmt(e.cycle.ms)),O(2),J(`cycle `,e.cycle.id),O(),M(e.over?6:-1),O(),M(e.cycle.trigger?7:-1),O(2),B_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),O(),P(e.top)}}function aA(e,t){if(e&1&&Og(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function oA(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function sA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,37),K(2),B(),z(3,`td`,37),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`,37),K(8),B(),z(9,`td`,37),K(10),B(),z(11,`td`,35),K(12),B(),z(13,`td`,35),j(14,oA,1,2),B()()),e&2){let e,n=t.$implicit,r=W();O(2),q(n.id),O(2),q(r.fmt(n.ms)),O(2),q(r.isOver(n)?`Over`:`Within`),O(2),q(n.checks),O(2),q(n.passes),O(2),q(n.trigger??``),O(2),M((e=n.components[0])?14:-1,e)}}var cA=0,lA=80,uA=10,dA=class e{cycles=$([]);range=Tv(null);gapUntil=lA;budgetLabel=`${vk} ms budget`;uid=`cd-chart-${cA++}`;hintId=`${this.uid}-hint`;active=D(null);anchor=null;dragging=!1;hover=D(null);focused=D(!1);max=X(()=>Ck(this.cycles()));budgetAt=X(()=>vk/this.max()*100);bars=X(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:yk(t),label:this.describe(t)}))});firstId=X(()=>this.cycles()[0]?.id??0);lastId=X(()=>this.cycles().at(-1)?.id??0);span=X(()=>{let e=this.range();if(!e)return null;let t=this.cycles(),n=Math.min(e.from,e.to),r=Math.max(e.from,e.to),i=t.findIndex(e=>e.id>=n),a=-1;for(let e=t.length-1;e>=0;e--)if(t[e].id<=r){a=e;break}return i<0||axk(this.cycles(),this.range()));startId=X(()=>this.selected()[0]?.id??``);endId=X(()=>this.selected().at(-1)?.id??``);band=X(()=>{let e=this.span(),t=this.cycles().length;return!e||!t?null:{left:e.start/t*100,width:(e.end-e.start+1)/t*100}});summary=X(()=>{let e=this.selected(),t=e.filter(yk).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${t} over the ${vk} ms budget.`});tableLabel=X(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=X(()=>{let e=this.active();return this.focused()&&e!==null&&e{let e=this.hover()??(this.focused()?this.active():null),t=e===null?void 0:this.cycles()[e];return!t||e===null?null:{cycle:t,over:yk(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,bk(e.ms)];yk(e)&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${bk(n.ms)}`),t.join(`, `)}select(e,t){let n=this.cycles(),r=n[Math.min(e,t)],i=n[Math.max(e,t)];r&&i&&this.range.set({from:r.id,to:i.id})}showAll(){this.range.set(null),this.anchor=null}setEnd(e,t){if(!this.cycles().length)return;let n=t.target,r=Number.parseInt(n.value,10);if(Number.isNaN(r)){n.value=String(e===`from`?this.startId():this.endId());return}let i=Math.min(Math.max(r,this.firstId()),this.lastId()),a=this.selected(),o=e===`from`?i:a[0]?.id??this.firstId(),s=e===`to`?i:a.at(-1)?.id??this.lastId();this.range.set({from:Math.min(o,s),to:Math.max(o,s)}),n.value=String(e===`from`?Math.min(o,s):Math.max(o,s))}onFocus(){this.focused.set(!0),(this.active()===null||this.active()>=this.cycles().length)&&this.active.set(this.span()?.start??Math.max(this.cycles().length-1,0)),this.anchor??=this.active()}onKey(e){let t=this.cycles().length;if(!t)return;let n=Math.min(this.active()??t-1,t-1),r=null;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=n+1;break;case`ArrowLeft`:case`ArrowUp`:r=n-1;break;case`PageDown`:r=n+uA;break;case`PageUp`:r=n-uA;break;case`Home`:r=0;break;case`End`:r=t-1;break;case`Enter`:case` `:e.preventDefault(),this.anchor=n,this.select(n,n);return;case`Escape`:this.range()&&(e.preventDefault(),this.showAll());return;default:return}e.preventDefault(),r=Math.min(Math.max(r,0),t-1),this.active.set(r),this.hover.set(null),e.shiftKey?(this.anchor??=n,this.select(this.anchor,r)):this.anchor=r}indexAt(e){let t=e.target?.closest?.(`[data-index]`);if(t)return Number(t.getAttribute(`data-index`));let n=e.currentTarget?.getBoundingClientRect(),r=this.cycles().length;if(!n?.width||!r)return null;let i=(e.clientX-n.left)/n.width;return Math.min(Math.max(Math.floor(i*r),0),r-1)}startDrag(e){if(e.button!==0)return;let t=this.indexAt(e);t!==null&&(this.dragging=!0,this.anchor=t,this.active.set(t),this.select(t,t))}onPointerMove(e){let t=this.indexAt(e);this.hover.set(t),this.dragging&&t!==null&&this.anchor!==null&&(this.active.set(t),this.select(this.anchor,t))}endDrag(){this.dragging=!1}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},Au)(`pointercancel`,function(){return t.endDrag()},Au)},inputs:{cycles:[1,`cycles`],range:[1,`range`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(z(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),B(),z(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),B()(),z(5,`label`)(6,`span`),K(7,`End`),B(),z(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),B()(),j(9,Qk,2,0,`button`,2),z(10,`p`,3),K(11),B()(),z(12,`p`,4),K(13,` Drag across the bars to pick a range of cycles. With the chart focused, the arrow keys move between cycles, Shift with an arrow key extends the range, Enter picks one cycle and Escape shows all cycles again. `),B(),z(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),B(),z(18,`span`,8),K(19,`0 ms`),B()(),z(20,`div`,9),j(21,$k,1,4,`div`,10),z(22,`div`,11)(23,`span`),K(24),B()(),z(25,`div`,12),U(`keydown`,function(e){return t.onKey(e)})(`focus`,function(){return t.onFocus()})(`blur`,function(){return t.focused.set(!1)})(`pointerdown`,function(e){return t.startDrag(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerleave`,function(){return t.hover.set(null)}),N(26,eA,2,12,`div`,13,Xk),B(),j(28,iA,12,12,`div`,14),B()(),z(29,`div`,15),N(30,aA,1,2,`span`,16,Xk),B(),z(32,`ul`,17)(33,`li`),Og(34,`span`,18),K(35,`Within budget`),B(),z(36,`li`),Og(37,`span`,19)(38,`span`,20),K(39,`Over budget `),B(),z(40,`li`),Og(41,`span`,21),K(42),B()(),z(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),B(),z(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),B(),z(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),B(),z(54,`th`,25),K(55,`Duration`),B(),z(56,`th`,26),K(57,`Budget`),B(),z(58,`th`,25),K(59,`Checks`),B(),z(60,`th`,25),K(61,`Passes`),B(),z(62,`th`,26),K(63,`After`),B(),z(64,`th`,26),K(65,`Slowest component`),B()()(),z(66,`tbody`),N(67,sA,15,7,`tr`,null,Zk),B()()()()),e&2){let e,n;O(4),Pg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),O(4),Pg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),O(),M(t.range()?9:-1),O(2),q(t.summary()),O(),Pg(`id`,t.hintId),O(2),G(`flush`,t.bars().length>t.gapUntil),O(3),q(t.fmt(t.max())),O(4),M((e=t.band())?21:-1,e),O(),y_(`bottom`,t.budgetAt(),`%`),O(2),q(t.budgetLabel),O(),A(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),O(),P(t.bars()),O(2),M((n=t.tip())?28:-1,n),O(),G(`flush`,t.bars().length>t.gapUntil),O(),P(t.bars()),O(12),q(t.budgetLabel),O(4),A(`aria-label`,t.tableLabel()),O(3),J(` `,t.tableLabel(),` `),O(18),P(t.selected())}},styles:[`[_nghost-%COMP%] { +}`]})},qk=(e,t)=>t.cycle.id,Jk=(e,t)=>t.id;function Yk(e,t){if(e&1){let e=V();z(0,`button`,27),U(`click`,function(){return w(e),T(W().showAll())}),K(1,`Show all cycles`),B()}}function Xk(e,t){if(e&1&&Og(0,`div`,28),e&2){let e=t;y_(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Zk(e,t){if(e&1&&(z(0,`div`,29),Og(1,`span`,30),B()),e&2){let e=t.$implicit,n=W();G(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),Pg(`id`,n.optionId(e.index)),A(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),O(),y_(`height`,e.height,`%`)}}function Qk(e,t){e&1&&(z(0,`span`,33),K(1,`over budget`),B())}function $k(e,t){if(e&1&&(z(0,`p`),K(1,` after `),z(2,`span`,35),K(3),B()()),e&2){let e=W();O(3),q(e.cycle.trigger)}}function eA(e,t){if(e&1&&(z(0,`p`,34)(1,`span`,36),K(2),B(),z(3,`span`),K(4),B()()),e&2){let e=t.$implicit,n=W(2);O(2),q(e.name),O(2),q(n.fmt(e.ms))}}function tA(e,t){if(e&1&&(z(0,`div`,31)(1,`p`,32)(2,`strong`),K(3),B(),z(4,`span`),K(5),B(),j(6,Qk,2,0,`span`,33),B(),j(7,$k,4,1,`p`),z(8,`p`),K(9),B(),N(10,eA,5,2,`p`,34,gg),B()),e&2){let e=t,n=W();y_(`left`,e.left)(`right`,e.right),O(3),q(n.fmt(e.cycle.ms)),O(2),J(`cycle `,e.cycle.id),O(),M(e.over?6:-1),O(),M(e.cycle.trigger?7:-1),O(2),V_(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),O(),P(e.top)}}function nA(e,t){if(e&1&&Og(0,`span`),e&2){let e=t.$implicit;G(`over`,e.over)}}function rA(e,t){if(e&1&&K(0),e&2){let e=t,n=W(2);Y(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function iA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,37),K(2),B(),z(3,`td`,37),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`,37),K(8),B(),z(9,`td`,37),K(10),B(),z(11,`td`,35),K(12),B(),z(13,`td`,35),j(14,rA,1,2),B()()),e&2){let e,n=t.$implicit,r=W();O(2),q(n.id),O(2),q(r.fmt(n.ms)),O(2),q(r.isOver(n)?`Over`:`Within`),O(2),q(n.checks),O(2),q(n.passes),O(2),q(n.trigger??``),O(2),M((e=n.components[0])?14:-1,e)}}var aA=0,oA=80,sA=10,cA=class e{cycles=$([]);range=Ev(null);gapUntil=oA;budgetLabel=`${hk} ms budget`;uid=`cd-chart-${aA++}`;hintId=`${this.uid}-hint`;active=D(null);anchor=null;dragging=!1;hover=D(null);focused=D(!1);max=X(()=>bk(this.cycles()));budgetAt=X(()=>hk/this.max()*100);bars=X(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:gk(t),label:this.describe(t)}))});firstId=X(()=>this.cycles()[0]?.id??0);lastId=X(()=>this.cycles().at(-1)?.id??0);span=X(()=>{let e=this.range();if(!e)return null;let t=this.cycles(),n=Math.min(e.from,e.to),r=Math.max(e.from,e.to),i=t.findIndex(e=>e.id>=n),a=-1;for(let e=t.length-1;e>=0;e--)if(t[e].id<=r){a=e;break}return i<0||avk(this.cycles(),this.range()));startId=X(()=>this.selected()[0]?.id??``);endId=X(()=>this.selected().at(-1)?.id??``);band=X(()=>{let e=this.span(),t=this.cycles().length;return!e||!t?null:{left:e.start/t*100,width:(e.end-e.start+1)/t*100}});summary=X(()=>{let e=this.selected(),t=e.filter(gk).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${t} over the ${hk} ms budget.`});tableLabel=X(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=X(()=>{let e=this.active();return this.focused()&&e!==null&&e{let e=this.hover()??(this.focused()?this.active():null),t=e===null?void 0:this.cycles()[e];return!t||e===null?null:{cycle:t,over:gk(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,_k(e.ms)];gk(e)&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${_k(n.ms)}`),t.join(`, `)}select(e,t){let n=this.cycles(),r=n[Math.min(e,t)],i=n[Math.max(e,t)];r&&i&&this.range.set({from:r.id,to:i.id})}showAll(){this.range.set(null),this.anchor=null}setEnd(e,t){if(!this.cycles().length)return;let n=t.target,r=Number.parseInt(n.value,10);if(Number.isNaN(r)){n.value=String(e===`from`?this.startId():this.endId());return}let i=Math.min(Math.max(r,this.firstId()),this.lastId()),a=this.selected(),o=e===`from`?i:a[0]?.id??this.firstId(),s=e===`to`?i:a.at(-1)?.id??this.lastId();this.range.set({from:Math.min(o,s),to:Math.max(o,s)}),n.value=String(e===`from`?Math.min(o,s):Math.max(o,s))}onFocus(){this.focused.set(!0),(this.active()===null||this.active()>=this.cycles().length)&&this.active.set(this.span()?.start??Math.max(this.cycles().length-1,0)),this.anchor??=this.active()}onKey(e){let t=this.cycles().length;if(!t)return;let n=Math.min(this.active()??t-1,t-1),r=null;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=n+1;break;case`ArrowLeft`:case`ArrowUp`:r=n-1;break;case`PageDown`:r=n+sA;break;case`PageUp`:r=n-sA;break;case`Home`:r=0;break;case`End`:r=t-1;break;case`Enter`:case` `:e.preventDefault(),this.anchor=n,this.select(n,n);return;case`Escape`:this.range()&&(e.preventDefault(),this.showAll());return;default:return}e.preventDefault(),r=Math.min(Math.max(r,0),t-1),this.active.set(r),this.hover.set(null),e.shiftKey?(this.anchor??=n,this.select(this.anchor,r)):this.anchor=r}indexAt(e){let t=e.target?.closest?.(`[data-index]`);if(t)return Number(t.getAttribute(`data-index`));let n=e.currentTarget?.getBoundingClientRect(),r=this.cycles().length;if(!n?.width||!r)return null;let i=(e.clientX-n.left)/n.width;return Math.min(Math.max(Math.floor(i*r),0),r-1)}startDrag(e){if(e.button!==0)return;let t=this.indexAt(e);t!==null&&(this.dragging=!0,this.anchor=t,this.active.set(t),this.select(t,t))}onPointerMove(e){let t=this.indexAt(e);this.hover.set(t),this.dragging&&t!==null&&this.anchor!==null&&(this.active.set(t),this.select(this.anchor,t))}endDrag(){this.dragging=!1}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&H(`pointerup`,function(){return t.endDrag()},ju)(`pointercancel`,function(){return t.endDrag()},ju)},inputs:{cycles:[1,`cycles`],range:[1,`range`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(z(0,`div`,0)(1,`label`)(2,`span`),K(3,`Start`),B(),z(4,`input`,1),U(`change`,function(e){return t.setEnd(`from`,e)}),B()(),z(5,`label`)(6,`span`),K(7,`End`),B(),z(8,`input`,1),U(`change`,function(e){return t.setEnd(`to`,e)}),B()(),j(9,Yk,2,0,`button`,2),z(10,`p`,3),K(11),B()(),z(12,`p`,4),K(13,` Drag across the bars to pick a range of cycles. With the chart focused, the arrow keys move between cycles, Shift with an arrow key extends the range, Enter picks one cycle and Escape shows all cycles again. `),B(),z(14,`div`,5)(15,`div`,6)(16,`span`,7),K(17),B(),z(18,`span`,8),K(19,`0 ms`),B()(),z(20,`div`,9),j(21,Xk,1,4,`div`,10),z(22,`div`,11)(23,`span`),K(24),B()(),z(25,`div`,12),U(`keydown`,function(e){return t.onKey(e)})(`focus`,function(){return t.onFocus()})(`blur`,function(){return t.focused.set(!1)})(`pointerdown`,function(e){return t.startDrag(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerleave`,function(){return t.hover.set(null)}),N(26,Zk,2,12,`div`,13,qk),B(),j(28,tA,12,12,`div`,14),B()(),z(29,`div`,15),N(30,nA,1,2,`span`,16,qk),B(),z(32,`ul`,17)(33,`li`),Og(34,`span`,18),K(35,`Within budget`),B(),z(36,`li`),Og(37,`span`,19)(38,`span`,20),K(39,`Over budget `),B(),z(40,`li`),Og(41,`span`,21),K(42),B()(),z(43,`details`,22)(44,`summary`),K(45,`Show the cycles as a table`),B(),z(46,`div`,23)(47,`table`)(48,`caption`,24),K(49),B(),z(50,`thead`)(51,`tr`)(52,`th`,25),K(53,`Cycle`),B(),z(54,`th`,25),K(55,`Duration`),B(),z(56,`th`,26),K(57,`Budget`),B(),z(58,`th`,25),K(59,`Checks`),B(),z(60,`th`,25),K(61,`Passes`),B(),z(62,`th`,26),K(63,`After`),B(),z(64,`th`,26),K(65,`Slowest component`),B()()(),z(66,`tbody`),N(67,iA,15,7,`tr`,null,Jk),B()()()()),e&2){let e,n;O(4),Pg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),O(4),Pg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),O(),M(t.range()?9:-1),O(2),q(t.summary()),O(),Pg(`id`,t.hintId),O(2),G(`flush`,t.bars().length>t.gapUntil),O(3),q(t.fmt(t.max())),O(4),M((e=t.band())?21:-1,e),O(),y_(`bottom`,t.budgetAt(),`%`),O(2),q(t.budgetLabel),O(),A(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),O(),P(t.bars()),O(2),M((n=t.tip())?28:-1,n),O(),G(`flush`,t.bars().length>t.gapUntil),O(),P(t.bars()),O(12),q(t.budgetLabel),O(4),A(`aria-label`,t.tableLabel()),O(3),J(` `,t.tableLabel(),` `),O(18),P(t.selected())}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1224,7 +1224,7 @@ td.mono[_ngcontent-%COMP%] { .bar[_ngcontent-%COMP%] { transition: none; } -}`]})},fA=(e,t)=>t.id,pA=(e,t)=>t.index,mA=(e,t)=>t.kind;function hA(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=W(2);O(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function gA(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=t.$implicit;y_(`left`,e.x,`%`)(`width`,e.w,`%`),O(),J(`cycle `,e.id)}}function _A(e,t){if(e&1){let e=V();z(0,`button`,11),U(`focus`,function(){let t=w(e).$implicit;return T(W(3).current.set(t.index))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).hover.set(t.index))})(`mouseleave`,function(){return w(e),T(W(3).hover.set(null))})(`click`,function(){let t=w(e).$implicit;return T(W(3).choose(t))}),z(1,`span`,12),K(2),B()()}if(e&2){let e=t.$implicit,n=W(3);b_(Y_(`block kind-`,e.kind)),y_(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),A(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),O(2),q(e.name)}}function vA(e,t){if(e&1&&(z(0,`li`),Og(1,`span`,13),K(2),B()),e&2){let e=t.$implicit;O(),b_(Y_(`key kind-`,e.kind)),O(),q(e.label)}}function yA(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=W(3);O(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function bA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,17),K(2),B(),z(3,`td`,18),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`,17),K(8),B(),z(9,`td`,17),K(10),B(),z(11,`td`,17),K(12),B(),z(13,`td`,17),K(14),B()()),e&2){let e=t.$implicit,n=W(4);O(2),q(e.cycleId),O(),y_(`padding-left`,6+e.depth*8,`px`),O(),q(e.name),O(2),q(n.kindLabel(e)),O(2),q(e.depth),O(2),q(n.fmt(e.start)),O(2),q(n.fmt(e.ms)),O(2),q(n.fmt(e.selfMs))}}function xA(e,t){if(e&1&&(z(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),B(),z(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),B(),z(8,`th`,16),K(9,`Span`),B(),z(10,`th`,16),K(11,`Kind`),B(),z(12,`th`,15),K(13,`Depth`),B(),z(14,`th`,15),K(15,`Start`),B(),z(16,`th`,15),K(17,`Total`),B(),z(18,`th`,15),K(19,`Self`),B()()(),z(20,`tbody`),N(21,bA,15,9,`tr`,null,pA),B()()()),e&2){let e=W(),t=W(2);A(`aria-label`,t.tableLabel()),O(3),J(` `,t.tableLabel(),` `),O(18),P(e.blocks)}}function SA(e,t){if(e&1){let e=V();z(0,`div`,1),U(`keydown`,function(t){return w(e),T(W(2).onKey(t))}),z(1,`div`,2),N(2,gA,2,5,`span`,3,fA),B(),z(4,`div`,4),N(5,_A,3,16,`button`,5,pA),B()(),z(7,`p`,6),K(8),B(),z(9,`ul`,7),N(10,vA,3,4,`li`,null,mA),B(),z(12,`p`,8),K(13,` Arrow keys move along a row, Up goes to the enclosing span and Down to the first nested one. Enter on a component shows it in the tree. `),B(),j(14,yA,2,2,`p`,0),z(15,`details`,9),U(`toggle`,function(t){return w(e),T(W(2).onToggle(t))}),z(16,`summary`),K(17,`Show the spans as a table`),B(),j(18,xA,23,2,`div`,10),B()}if(e&2){let e=t,n=W(2);A(`aria-label`,n.label()),O(2),P(e.cycles),O(2),y_(`height`,e.depth*n.row,`px`),O(),P(e.blocks),O(3),q(n.readout()),O(2),P(n.kinds),O(4),M(n.dropped()?14:-1),O(4),M(n.tableOpen()?18:-1)}}function CA(e,t){if(e&1&&(z(0,`h3`),K(1,`Spans in the picked cycles`),B(),j(2,hA,2,2,`p`,0)(3,SA,19,6)),e&2){let e,t=W();O(2),M(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var wA=22;function TA(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var EA=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=bv();row=wA;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:Tk[e]}));current=D(0);tableOpen=D(!1);hover=D(null);hasSpans=X(()=>this.cycles().some(e=>e.spans?.length));count=X(()=>this.cycles().length);tooMany=X(()=>this.count()>30);graph=X(()=>this.tooMany()?null:Dk(this.cycles(),this.names()));tabStop=X(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=X(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=X(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=X(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=X(()=>`Timed spans in ${this.scope()}`);fmt(e){return bk(e)}kindLabel(e){return Tk[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,Tk[e.kind],`${bk(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${bk(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${bk(-e.start)} before it started`:`cycle ${e.cycleId} at ${bk(e.start)}`),t.join(`, `)}choose(e){this.current.set(e.index),e.component&&this.pick.emit(e.component)}onKey(e){let t=this.graph()?.blocks??[];if(!t.length)return;let n=t[this.tabStop()],r;switch(e.key){case`ArrowRight`:r=t.find(e=>e.index>n.index&&e.depth===n.depth);break;case`ArrowLeft`:r=TA(t,e=>e.indexe.indexe.parent===n.index)??t.find(e=>e.index>n.index&&e.depth===n.depth+1);break;case`Home`:r=t[0];break;case`End`:r=t.at(-1);break;default:return}e.preventDefault(),this.hover.set(null),r&&(this.current.set(r.index),e.currentTarget.querySelector(`button[data-index="${r.index}"]`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-flame-graph`]],inputs:{cycles:[1,`cycles`],names:[1,`names`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:1,vars:1,consts:[[1,`note`],[`role`,`group`,1,`flame`,3,`keydown`],[`aria-hidden`,`true`,1,`cycles`],[3,`left`,`width`],[1,`rows`],[`type`,`button`,3,`class`,`narrow`,`left`,`width`,`top`],[`aria-hidden`,`true`,1,`readout`],[`aria-label`,`Span kinds`,1,`legend`],[1,`hint`],[1,`table`,3,`toggle`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`type`,`button`,3,`focus`,`mouseenter`,`mouseleave`,`click`],[1,`text`],[`aria-hidden`,`true`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[1,`num`],[1,`mono`]],template:function(e,t){e&1&&j(0,CA,4,1),e&2&&M(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},lA=(e,t)=>t.id,uA=(e,t)=>t.index,dA=(e,t)=>t.kind;function fA(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=W(2);O(),Y(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function pA(e,t){if(e&1&&(z(0,`span`),K(1),B()),e&2){let e=t.$implicit;y_(`left`,e.x,`%`)(`width`,e.w,`%`),O(),J(`cycle `,e.id)}}function mA(e,t){if(e&1){let e=V();z(0,`button`,11),U(`focus`,function(){let t=w(e).$implicit;return T(W(3).current.set(t.index))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).hover.set(t.index))})(`mouseleave`,function(){return w(e),T(W(3).hover.set(null))})(`click`,function(){let t=w(e).$implicit;return T(W(3).choose(t))}),z(1,`span`,12),K(2),B()()}if(e&2){let e=t.$implicit,n=W(3);b_(X_(`block kind-`,e.kind)),y_(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),G(`narrow`,e.w<4),A(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),O(2),q(e.name)}}function hA(e,t){if(e&1&&(z(0,`li`),Og(1,`span`,13),K(2),B()),e&2){let e=t.$implicit;O(),b_(X_(`key kind-`,e.kind)),O(),q(e.label)}}function gA(e,t){if(e&1&&(z(0,`p`,0),K(1),B()),e&2){let e=W(3);O(),Y(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function _A(e,t){if(e&1&&(z(0,`tr`)(1,`td`,17),K(2),B(),z(3,`td`,18),K(4),B(),z(5,`td`),K(6),B(),z(7,`td`,17),K(8),B(),z(9,`td`,17),K(10),B(),z(11,`td`,17),K(12),B(),z(13,`td`,17),K(14),B()()),e&2){let e=t.$implicit,n=W(4);O(2),q(e.cycleId),O(),y_(`padding-left`,6+e.depth*8,`px`),O(),q(e.name),O(2),q(n.kindLabel(e)),O(2),q(e.depth),O(2),q(n.fmt(e.start)),O(2),q(n.fmt(e.ms)),O(2),q(n.fmt(e.selfMs))}}function vA(e,t){if(e&1&&(z(0,`div`,10)(1,`table`)(2,`caption`,14),K(3),B(),z(4,`thead`)(5,`tr`)(6,`th`,15),K(7,`Cycle`),B(),z(8,`th`,16),K(9,`Span`),B(),z(10,`th`,16),K(11,`Kind`),B(),z(12,`th`,15),K(13,`Depth`),B(),z(14,`th`,15),K(15,`Start`),B(),z(16,`th`,15),K(17,`Total`),B(),z(18,`th`,15),K(19,`Self`),B()()(),z(20,`tbody`),N(21,_A,15,9,`tr`,null,uA),B()()()),e&2){let e=W(),t=W(2);A(`aria-label`,t.tableLabel()),O(3),J(` `,t.tableLabel(),` `),O(18),P(e.blocks)}}function yA(e,t){if(e&1){let e=V();z(0,`div`,1),U(`keydown`,function(t){return w(e),T(W(2).onKey(t))}),z(1,`div`,2),N(2,pA,2,5,`span`,3,lA),B(),z(4,`div`,4),N(5,mA,3,16,`button`,5,uA),B()(),z(7,`p`,6),K(8),B(),z(9,`ul`,7),N(10,hA,3,4,`li`,null,dA),B(),z(12,`p`,8),K(13,` Arrow keys move along a row, Up goes to the enclosing span and Down to the first nested one. Enter on a component shows it in the tree. `),B(),j(14,gA,2,2,`p`,0),z(15,`details`,9),U(`toggle`,function(t){return w(e),T(W(2).onToggle(t))}),z(16,`summary`),K(17,`Show the spans as a table`),B(),j(18,vA,23,2,`div`,10),B()}if(e&2){let e=t,n=W(2);A(`aria-label`,n.label()),O(2),P(e.cycles),O(2),y_(`height`,e.depth*n.row,`px`),O(),P(e.blocks),O(3),q(n.readout()),O(2),P(n.kinds),O(4),M(n.dropped()?14:-1),O(4),M(n.tableOpen()?18:-1)}}function bA(e,t){if(e&1&&(z(0,`h3`),K(1,`Spans in the picked cycles`),B(),j(2,fA,2,2,`p`,0)(3,yA,19,6)),e&2){let e,t=W();O(2),M(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var xA=22;function SA(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var CA=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=xv();row=xA;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:Sk[e]}));current=D(0);tableOpen=D(!1);hover=D(null);hasSpans=X(()=>this.cycles().some(e=>e.spans?.length));count=X(()=>this.cycles().length);tooMany=X(()=>this.count()>30);graph=X(()=>this.tooMany()?null:wk(this.cycles(),this.names()));tabStop=X(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=X(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=X(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=X(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=X(()=>`Timed spans in ${this.scope()}`);fmt(e){return _k(e)}kindLabel(e){return Sk[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,Sk[e.kind],`${_k(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${_k(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${_k(-e.start)} before it started`:`cycle ${e.cycleId} at ${_k(e.start)}`),t.join(`, `)}choose(e){this.current.set(e.index),e.component&&this.pick.emit(e.component)}onKey(e){let t=this.graph()?.blocks??[];if(!t.length)return;let n=t[this.tabStop()],r;switch(e.key){case`ArrowRight`:r=t.find(e=>e.index>n.index&&e.depth===n.depth);break;case`ArrowLeft`:r=SA(t,e=>e.indexe.indexe.parent===n.index)??t.find(e=>e.index>n.index&&e.depth===n.depth+1);break;case`Home`:r=t[0];break;case`End`:r=t.at(-1);break;default:return}e.preventDefault(),this.hover.set(null),r&&(this.current.set(r.index),e.currentTarget.querySelector(`button[data-index="${r.index}"]`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-flame-graph`]],inputs:{cycles:[1,`cycles`],names:[1,`names`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:1,vars:1,consts:[[1,`note`],[`role`,`group`,1,`flame`,3,`keydown`],[`aria-hidden`,`true`,1,`cycles`],[3,`left`,`width`],[1,`rows`],[`type`,`button`,3,`class`,`narrow`,`left`,`width`,`top`],[`aria-hidden`,`true`,1,`readout`],[`aria-label`,`Span kinds`,1,`legend`],[1,`hint`],[1,`table`,3,`toggle`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`type`,`button`,3,`focus`,`mouseenter`,`mouseleave`,`click`],[1,`text`],[`aria-hidden`,`true`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[1,`num`],[1,`mono`]],template:function(e,t){e&1&&j(0,bA,4,1),e&2&&M(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1431,7 +1431,7 @@ td.mono[_ngcontent-%COMP%] { .num[_ngcontent-%COMP%] { text-align: right; font-variant-numeric: tabular-nums; -}`]})};function DA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,5),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`,6),K(8),B()()),e&2){let e=t.$implicit,n=W(3);O(2),Y(``,e.name,`.`,e.hook),O(2),q(e.calls),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function OA(e,t){if(e&1&&(z(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),B(),z(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),B(),z(8,`th`,4),K(9,`Calls`),B(),z(10,`th`,4),K(11,`Time`),B(),z(12,`th`,4),K(13,`Slowest`),B()()(),z(14,`tbody`),N(15,DA,9,5,`tr`,null,gg),B()()()),e&2){let e=W(2);O(15),P(e.hooks())}}function kA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function AA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,5),K(2),j(3,kA,1,1),B(),z(4,`td`,6),K(5),B(),z(6,`td`,6),K(7),B(),z(8,`td`,6),K(9),B()()),e&2){let e=t.$implicit,n=W(3);O(2),J(` `,e.name,` `),O(),M(e.listener?3:-1),O(2),q(e.calls),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function jA(e,t){if(e&1&&(z(0,`div`)(1,`h3`),K(2,`Output listeners`),B(),z(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),B(),z(8,`th`,4),K(9,`Calls`),B(),z(10,`th`,4),K(11,`Time`),B(),z(12,`th`,4),K(13,`Slowest`),B()()(),z(14,`tbody`),N(15,AA,10,5,`tr`,null,gg),B()()()),e&2){let e=W(2);O(15),P(e.outputs())}}function MA(e,t){if(e&1&&(z(0,`p`,1),K(1),B()),e&2){let e=t,n=W(2);O(),B_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function NA(e,t){if(e&1&&(z(0,`p`,2),K(1),B()),e&2){let e=W(2);O(),Y(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function PA(e,t){if(e&1&&(z(0,`div`,0),j(1,OA,17,0,`div`),j(2,jA,17,0,`div`),B(),j(3,MA,2,4,`p`,1),j(4,NA,2,2,`p`,2)),e&2){let e,t=W();O(),M(t.hooks().length?1:-1),O(),M(t.outputs().length?2:-1),O(),M((e=t.afterRender())?3:-1,e),O(),M(t.dropped()?4:-1)}}var FA=10;function IA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var LA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,FA));outputs=X(()=>(this.page()?.outputs??[]).slice(0,FA));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return IA(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-timing`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[1,`timing`],[1,`after-render`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`mono`],[1,`num`]],template:function(e,t){e&1&&j(0,PA,5,4),e&2&&M(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function wA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,5),K(2),B(),z(3,`td`,6),K(4),B(),z(5,`td`,6),K(6),B(),z(7,`td`,6),K(8),B()()),e&2){let e=t.$implicit,n=W(3);O(2),Y(``,e.name,`.`,e.hook),O(2),q(e.calls),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function TA(e,t){if(e&1&&(z(0,`div`)(1,`h3`),K(2,`Lifecycle hooks`),B(),z(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Hook`),B(),z(8,`th`,4),K(9,`Calls`),B(),z(10,`th`,4),K(11,`Time`),B(),z(12,`th`,4),K(13,`Slowest`),B()()(),z(14,`tbody`),N(15,wA,9,5,`tr`,null,gg),B()()()),e&2){let e=W(2);O(15),P(e.hooks())}}function EA(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` (`,e.listener,`) `)}}function DA(e,t){if(e&1&&(z(0,`tr`)(1,`td`,5),K(2),j(3,EA,1,1),B(),z(4,`td`,6),K(5),B(),z(6,`td`,6),K(7),B(),z(8,`td`,6),K(9),B()()),e&2){let e=t.$implicit,n=W(3);O(2),J(` `,e.name,` `),O(),M(e.listener?3:-1),O(2),q(e.calls),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function OA(e,t){if(e&1&&(z(0,`div`)(1,`h3`),K(2,`Output listeners`),B(),z(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),K(7,`Listener`),B(),z(8,`th`,4),K(9,`Calls`),B(),z(10,`th`,4),K(11,`Time`),B(),z(12,`th`,4),K(13,`Slowest`),B()()(),z(14,`tbody`),N(15,DA,10,5,`tr`,null,gg),B()()()),e&2){let e=W(2);O(15),P(e.outputs())}}function kA(e,t){if(e&1&&(z(0,`p`,1),K(1),B()),e&2){let e=t,n=W(2);O(),V_(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function AA(e,t){if(e&1&&(z(0,`p`,2),K(1),B()),e&2){let e=W(2);O(),Y(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function jA(e,t){if(e&1&&(z(0,`div`,0),j(1,TA,17,0,`div`),j(2,OA,17,0,`div`),B(),j(3,kA,2,4,`p`,1),j(4,AA,2,2,`p`,2)),e&2){let e,t=W();O(),M(t.hooks().length?1:-1),O(),M(t.outputs().length?2:-1),O(),M((e=t.afterRender())?3:-1,e),O(),M(t.dropped()?4:-1)}}var MA=10;function NA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var PA=class e{page=$(null);hooks=X(()=>(this.page()?.hooks??[]).slice(0,MA));outputs=X(()=>(this.page()?.outputs??[]).slice(0,MA));afterRender=X(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=X(()=>this.page()?.droppedTimings??0);ms(e){return NA(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-timing`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[1,`timing`],[1,`after-render`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`mono`],[1,`num`]],template:function(e,t){e&1&&j(0,jA,5,4),e&2&&M(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -1491,7 +1491,7 @@ td.mono[_ngcontent-%COMP%] { margin: 8px 0 0; color: var(--%NS%text-2); font-size: 12px; -}`]})};function RA(e,t){if(e&1&&(z(0,`p`,5),K(1),B()),e&2){let e=W();O(),q(e.error())}}function zA(e,t){let n=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}var BA=class e{page=$(null);maxCycles=$(200);imported=bv();error=D(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&zA(uk(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&zA(_k(e,e.pageId),`change-detection-${e.pageId}.trace.json`)}async read(e){let t=e.files?.[0];if(e.value=``,!t)return;if(t.size>2e7){this.error.set(`${t.name}: The file is larger than 20 MB.`);return}let n;try{n=await t.text()}catch{this.error.set(`Could not read the file.`);return}let r=dk(n,this.maxCycles());if(!r.ok){this.error.set(`${t.name}: ${r.error}`);return}this.error.set(``),this.imported.emit({fileName:t.name,page:{...r.recording,pageId:r.pageId,supported:!0}})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-transfer`]],inputs:{page:[1,`page`],maxCycles:[1,`maxCycles`]},outputs:{imported:`imported`},decls:10,vars:3,consts:[[`file`,``],[`role`,`group`,`aria-label`,`Export and import the recording`,1,`transfer`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[`type`,`file`,`accept`,`.json,application/json`,`hidden`,``,3,`change`],[`role`,`alert`,1,`error`]],template:function(e,t){if(e&1){let e=V();z(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),B(),z(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),B(),z(5,`button`,3),U(`click`,function(){return w(e),T(Qg(8).click())}),K(6,`Import`),B(),z(7,`input`,4,0),U(`change`,function(){w(e);let n=Qg(8);return T(t.read(n))}),B()(),j(9,RA,2,1,`p`,5)}e&2&&(O(),Pg(`disabled`,!t.hasCycles()),O(2),Pg(`disabled`,!t.hasCycles()),O(6),M(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function FA(e,t){if(e&1&&(z(0,`p`,5),K(1),B()),e&2){let e=W();O(),q(e.error())}}function IA(e,t){let n=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}var LA=class e{page=$(null);maxCycles=$(200);imported=xv();error=D(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&IA(sk(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&IA(mk(e,e.pageId),`change-detection-${e.pageId}.trace.json`)}async read(e){let t=e.files?.[0];if(e.value=``,!t)return;if(t.size>2e7){this.error.set(`${t.name}: The file is larger than 20 MB.`);return}let n;try{n=await t.text()}catch{this.error.set(`Could not read the file.`);return}let r=ck(n,this.maxCycles());if(!r.ok){this.error.set(`${t.name}: ${r.error}`);return}this.error.set(``),this.imported.emit({fileName:t.name,page:{...r.recording,pageId:r.pageId,supported:!0}})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-transfer`]],inputs:{page:[1,`page`],maxCycles:[1,`maxCycles`]},outputs:{imported:`imported`},decls:10,vars:3,consts:[[`file`,``],[`role`,`group`,`aria-label`,`Export and import the recording`,1,`transfer`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[`type`,`file`,`accept`,`.json,application/json`,`hidden`,``,3,`change`],[`role`,`alert`,1,`error`]],template:function(e,t){if(e&1){let e=V();z(0,`div`,1)(1,`button`,2),U(`click`,function(){return t.exportJson()}),K(2,`Export JSON`),B(),z(3,`button`,2),U(`click`,function(){return t.exportTrace()}),K(4,` Export trace (Perfetto) `),B(),z(5,`button`,3),U(`click`,function(){return w(e),T(Qg(8).click())}),K(6,`Import`),B(),z(7,`input`,4,0),U(`change`,function(){w(e);let n=Qg(8);return T(t.read(n))}),B()(),j(9,FA,2,1,`p`,5)}e&2&&(O(),Pg(`disabled`,!t.hasCycles()),O(2),Pg(`disabled`,!t.hasCycles()),O(6),M(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { display: contents; } @@ -1533,7 +1533,7 @@ button[_ngcontent-%COMP%]:disabled { margin: 0; color: var(--%NS%danger-text); font-size: 12px; -}`]})},VA=(e,t)=>t.stat.name;function HA(e,t){if(e&1&&(z(0,`span`,8),K(1),B()),e&2){let e=W(2).$implicit;O(),J(``,e.other,` more`)}}function UA(e,t){if(e&1&&(z(0,`div`,6)(1,`span`,7),K(2),B(),j(3,HA,2,1,`span`,8),B()),e&2){let e=W().$implicit;y_(`--%NS%tone`,e.tone+`%`),O(2),q(e.label),O(),M(e.roomy?3:-1)}}function WA(e,t){if(e&1&&(z(0,`span`,10),K(1),B(),z(2,`span`,11),K(3),B()),e&2){let e=W(2).$implicit,t=W(2);O(),q(e.stat.name),O(2),q(t.fmt(e.stat.ms))}}function GA(e,t){if(e&1){let e=V();z(0,`button`,9),U(`focus`,function(){w(e);let t=W().$index;return T(W(2).current.set(t))})(`click`,function(){w(e);let t=W().$implicit;return T(W(2).pick.emit(t.stat.name))}),j(1,WA,4,2),B()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);y_(`--%NS%tone`,t.tone+`%`),A(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),O(),M(t.roomy?1:-1)}}function KA(e,t){if(e&1&&(z(0,`li`),j(1,UA,4,4,`div`,4)(2,GA,2,6,`button`,5),B()),e&2){let e=t.$implicit;y_(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),O(),M(e.other?1:2)}}function qA(e,t){if(e&1){let e=V();z(0,`ul`,2),U(`keydown`,function(t){return w(e),T(W().onKey(t))}),N(1,KA,3,9,`li`,3,VA),B()}if(e&2){let e=W();A(`aria-label`,e.label()),O(),P(e.cells())}}function JA(e,t){e&1&&(z(0,`p`,1),K(1,`No component time in these cycles.`),B())}var YA=24,XA=3,ZA=class e{stats=$([]);scope=$(`the recording`);pick=bv();current=D(0);label=X(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=X(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,YA),n=e.slice(YA),r=n.reduce((e,t)=>e+t.ms,0),i=t.map(e=>({stat:e,other:0}));n.length&&i.push({stat:{name:`Other components`,checks:0,ms:r,maxMs:0,cycles:0},other:n.length});let a=e.reduce((e,t)=>e+t.ms,0),o=t[0]?.ms??1,s=wk(i,e=>e.stat.ms,XA);return s.sort((e,t)=>Number(e.item.other>0)-Number(t.item.other>0)),s.map(e=>{let{stat:t,other:n}=e.item,r=a?Math.round(t.ms/a*100):0;return{stat:t,other:n,x:e.x,y:e.y,w:e.w,h:e.h,tone:n?0:14+Math.round(26*Math.min(t.ms/o,1)),roomy:e.w>=10&&e.h>=22,label:n?`${n} more components, ${bk(t.ms)}, ${r}% of self time`:`${t.name}, ${bk(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=X(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return bk(e)}onKey(e){let t=this.cells().filter(e=>!e.other).length;if(!t)return;let n=this.tabStop(),r;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=Math.min(n+1,t-1);break;case`ArrowLeft`:case`ArrowUp`:r=Math.max(n-1,0);break;case`Home`:r=0;break;case`End`:r=t-1;break;default:return}e.preventDefault(),this.current.set(r),e.currentTarget.querySelector(`button[data-index="${r}"]`)?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-treemap`]],inputs:{stats:[1,`stats`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:2,vars:1,consts:[[1,`map`],[1,`empty`],[1,`map`,3,`keydown`],[3,`left`,`top`,`width`,`height`],[1,`cell`,`other`,3,`--%NS%tone`],[`type`,`button`,1,`cell`,3,`--%NS%tone`],[1,`cell`,`other`],[1,`sr-only`],[`aria-hidden`,`true`,1,`name`],[`type`,`button`,1,`cell`,3,`focus`,`click`],[1,`name`,`mono`],[1,`ms`]],template:function(e,t){e&1&&j(0,qA,3,1,`ul`,0)(1,JA,2,0,`p`,1),e&2&&M(+!t.cells().length)},styles:[`[_nghost-%COMP%] { +}`]})},RA=(e,t)=>t.stat.name;function zA(e,t){if(e&1&&(z(0,`span`,8),K(1),B()),e&2){let e=W(2).$implicit;O(),J(``,e.other,` more`)}}function BA(e,t){if(e&1&&(z(0,`div`,6)(1,`span`,7),K(2),B(),j(3,zA,2,1,`span`,8),B()),e&2){let e=W().$implicit;y_(`--%NS%tone`,e.tone+`%`),O(2),q(e.label),O(),M(e.roomy?3:-1)}}function VA(e,t){if(e&1&&(z(0,`span`,10),K(1),B(),z(2,`span`,11),K(3),B()),e&2){let e=W(2).$implicit,t=W(2);O(),q(e.stat.name),O(2),q(t.fmt(e.stat.ms))}}function HA(e,t){if(e&1){let e=V();z(0,`button`,9),U(`focus`,function(){w(e);let t=W().$index;return T(W(2).current.set(t))})(`click`,function(){w(e);let t=W().$implicit;return T(W(2).pick.emit(t.stat.name))}),j(1,VA,4,2),B()}if(e&2){let e=W(),t=e.$implicit,n=e.$index,r=W(2);y_(`--%NS%tone`,t.tone+`%`),A(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),O(),M(t.roomy?1:-1)}}function UA(e,t){if(e&1&&(z(0,`li`),j(1,BA,4,4,`div`,4)(2,HA,2,6,`button`,5),B()),e&2){let e=t.$implicit;y_(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),O(),M(e.other?1:2)}}function WA(e,t){if(e&1){let e=V();z(0,`ul`,2),U(`keydown`,function(t){return w(e),T(W().onKey(t))}),N(1,UA,3,9,`li`,3,RA),B()}if(e&2){let e=W();A(`aria-label`,e.label()),O(),P(e.cells())}}function GA(e,t){e&1&&(z(0,`p`,1),K(1,`No component time in these cycles.`),B())}var KA=24,qA=3,JA=class e{stats=$([]);scope=$(`the recording`);pick=xv();current=D(0);label=X(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=X(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,KA),n=e.slice(KA),r=n.reduce((e,t)=>e+t.ms,0),i=t.map(e=>({stat:e,other:0}));n.length&&i.push({stat:{name:`Other components`,checks:0,ms:r,maxMs:0,cycles:0},other:n.length});let a=e.reduce((e,t)=>e+t.ms,0),o=t[0]?.ms??1,s=xk(i,e=>e.stat.ms,qA);return s.sort((e,t)=>Number(e.item.other>0)-Number(t.item.other>0)),s.map(e=>{let{stat:t,other:n}=e.item,r=a?Math.round(t.ms/a*100):0;return{stat:t,other:n,x:e.x,y:e.y,w:e.w,h:e.h,tone:n?0:14+Math.round(26*Math.min(t.ms/o,1)),roomy:e.w>=10&&e.h>=22,label:n?`${n} more components, ${_k(t.ms)}, ${r}% of self time`:`${t.name}, ${_k(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=X(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return _k(e)}onKey(e){let t=this.cells().filter(e=>!e.other).length;if(!t)return;let n=this.tabStop(),r;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=Math.min(n+1,t-1);break;case`ArrowLeft`:case`ArrowUp`:r=Math.max(n-1,0);break;case`Home`:r=0;break;case`End`:r=t-1;break;default:return}e.preventDefault(),this.current.set(r),e.currentTarget.querySelector(`button[data-index="${r}"]`)?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-treemap`]],inputs:{stats:[1,`stats`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:2,vars:1,consts:[[1,`map`],[1,`empty`],[1,`map`,3,`keydown`],[3,`left`,`top`,`width`,`height`],[1,`cell`,`other`,3,`--%NS%tone`],[`type`,`button`,1,`cell`,3,`--%NS%tone`],[1,`cell`,`other`],[1,`sr-only`],[`aria-hidden`,`true`,1,`name`],[`type`,`button`,1,`cell`,3,`focus`,`click`],[1,`name`,`mono`],[1,`ms`]],template:function(e,t){e&1&&j(0,WA,3,1,`ul`,0)(1,GA,2,0,`p`,1),e&2&&M(+!t.cells().length)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1609,7 +1609,7 @@ button.cell[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] { margin: 8px 0; color: var(--%NS%text-2); -}`]})},QA=(e,t)=>t.id;function $A(e,t){if(e&1){let e=V();I(0,`button`,14),H(`click`,function(){return w(e),T(W(2).clear())}),K(1,`Clear`),L()}}function ej(e,t){if(e&1){let e=V();I(0,`button`,11),H(`click`,function(){return w(e),T(W().toggle())}),R(1,`span`,12),K(2),L(),j(3,$A,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),F(`disabled`,!e.pageId()),O(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),O(),M(e.cycles().length?3:-1)}}function tj(e,t){if(e&1){let e=V();I(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),L(),I(3,`span`,16),K(4),L(),I(5,`button`,14),H(`click`,function(){return w(e),T(W().closeImport())}),K(6,`Back to live recording`),L()()}e&2&&(O(4),q(t.fileName))}function nj(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function rj(e,t){e&1&&(I(0,`p`,9),K(1,` The page has Angular's profiler hook, but the recording could not attach to it yet. The page tries again on its next update while recording is on. If this stays, stop and start the recording, or reload the page. `),L())}function ij(e,t){e&1&&R(0,`app-angular-unavailable`,17),e&2&&F(`page`,W(2).angularPage())}function aj(e,t){e&1&&j(0,rj,2,0,`p`,9)(1,ij,1,1,`app-angular-unavailable`,17),e&2&&M(+!W().attachPending())}function oj(e,t){e&1&&(I(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),L())}function sj(e,t){e&1&&R(0,`app-angular-unavailable`,21),e&2&&F(`page`,W(2).angularPage())}function cj(e,t){if(e&1){let e=V();I(0,`div`,18)(1,`span`,19),K(2,`Live views`),L(),I(3,`button`,20),H(`click`,function(){w(e);let t=W();return T(t.setView(`flash`,!t.views().flash))}),R(4,`span`,12),K(5,` Flash checks `),L(),I(6,`button`,20),H(`click`,function(){w(e);let t=W();return T(t.setView(`track`,!t.views().track))}),R(7,`span`,12),K(8,` Performance track `),L(),I(9,`button`,20),H(`click`,function(){return w(e),T(W().setView(`angularProfiling`,!0))}),R(10,`span`,12),K(11,` Angular profiling `),L()(),I(12,`p`,7),K(13,` Flash checks draws a box over each component on the page as Angular checks it, with its name and how often it was checked, fading over a second. Performance track adds a Pangular track to the Chrome Performance panel with every component check, hook and output. Angular profiling turns on Angular's own track there. `),L(),j(14,oj,2,0,`p`,9)(15,sj,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();O(3),F(`disabled`,!e.canShowViews()),A(`aria-pressed`,e.views().flash),O(3),F(`disabled`,!e.canShowViews()),A(`aria-pressed`,e.views().track),O(3),F(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),A(`aria-pressed`,e.views().angularProfiling),O(5),M(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function lj(e,t){if(e&1&&(I(0,`p`,9),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function uj(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(2);O(),J(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function dj(e,t){e&1&&(I(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),L())}function fj(e,t){if(e&1){let e=V();I(0,`h3`),K(1,`Cycles`),L(),I(2,`app-cd-cycle-chart`,22),W_(`rangeChange`,function(t){w(e);let n=W();return U_(n.range,t)||(n.range=t),T(t)}),L(),I(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return w(e),T(W().showComponent.emit(t))}),L(),j(4,uj,2,1,`p`,24),I(5,`h3`),K(6,`Self time by component`),L(),j(7,dj,2,0,`p`,9),I(8,`app-cd-treemap`,25),H(`pick`,function(t){return w(e),T(W().showComponent.emit(t))}),L()}if(e&2){let e=W();O(2),F(`cycles`,e.cycles()),H_(`range`,e.range),O(),F(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),O(),M(e.hasSpans()?-1:4),O(3),M(e.range()?7:-1),O(),F(`stats`,e.stats())(`scope`,e.scope())}}function pj(e,t){if(e&1&&(I(0,`tr`)(1,`td`,16),K(2),L(),I(3,`td`,31),K(4),L(),I(5,`td`,31),K(6),L(),I(7,`td`,31),K(8),L()()),e&2){let e=t.$implicit,n=W(2);O(2),q(e.name),O(2),q(e.checks),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function mj(e,t){e&1&&(I(0,`tr`)(1,`td`,32),K(2,`No component time in the picked cycles.`),L()())}function hj(e,t){if(e&1&&(I(0,`span`,34),K(1,`from `),I(2,`span`,16),K(3),L()()),e&2){let e=W(3);O(3),q(e.causeText(t))}}function gj(e,t){if(e&1&&(I(0,`span`,34),K(1,`after `),I(2,`span`,16),K(3),L()()),e&2){let e=W().$implicit;O(3),q(e.trigger)}}function _j(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit;O(),J(``,e.unchanged,` changed nothing`)}}function vj(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit,t=W(2);O(),J(`hooks `,t.ms(e.hookMs))}}function yj(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit,t=W(2);O(),J(`afterRender `,t.ms(e.afterRenderMs))}}function bj(e,t){if(e&1&&(I(0,`span`,36),K(1,` slowest `),I(2,`span`,16),K(3),L(),K(4),L()),e&2){let e=t,n=W(3);O(3),q(e.name),O(),J(` `,n.ms(e.ms),` `)}}function xj(e,t){if(e&1&&(I(0,`li`)(1,`span`,33),K(2),L(),I(3,`span`,16),K(4),L(),I(5,`span`),K(6),L(),j(7,hj,4,1,`span`,34)(8,gj,4,1,`span`,34),j(9,_j,2,1,`span`,35),j(10,vj,2,1,`span`,35),j(11,yj,2,1,`span`,35),j(12,bj,5,2,`span`,36),L()),e&2){let e,n,r=t.$implicit,i=W(2);O(2),q(i.clock(r.at)),O(2),q(i.ms(r.ms)),O(2),B_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),O(),M((e=r.cause)?7:r.trigger?8:-1,e),O(2),M(r.unchanged?9:-1),O(),M(r.hookMs?10:-1),O(),M(r.afterRenderMs?11:-1),O(),M((n=r.components[0])?12:-1,n)}}function Sj(e,t){if(e&1&&(I(0,`div`,26)(1,`div`)(2,`h3`),K(3),L(),I(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),L(),I(9,`th`,28),K(10,`Checks`),L(),I(11,`th`,28),K(12,`Self time`),L(),I(13,`th`,28),K(14,`Slowest`),L()()(),I(15,`tbody`),N(16,pj,9,4,`tr`,null,gg,!1,mj,3,0,`tr`),L()()(),I(19,`div`)(20,`h3`),K(21,`Latest cycles`),L(),I(22,`ol`,29),N(23,xj,13,11,`li`,null,QA),L()()(),R(25,`app-cd-timing`,30)(26,`app-cd-diagnosis`,30)),e&2){let e=W();O(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),O(13),P(e.slowest()),O(7),P(e.latest()),O(2),F(`page`,e.page()),O(),F(`page`,e.page())}}function Cj(e,t){e&1&&(I(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),L())}var wj=3e3,Tj=10,Ej=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=AD(()=>this.rpc());angularPage=X(()=>jD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=bv();range=D(null);imported=D(null);page=X(()=>this.imported()?.page??this.livePage());views=Q(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=X(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=D(``);announcement=D(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);maxCycles=X(()=>_E(this.rpc()).limits.cdCycles);picked=X(()=>xk(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?Sk(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=X(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=X(()=>this.stats().slice(0,Tj));latest=X(()=>this.cycles().slice(-30).reverse());capNotes=X(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=X(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`:this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return vO(e)}causeText(e){return nk(e)}confirming=D(null);confirmTimer;constructor(){_c(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),C(As).onDestroy(()=>clearTimeout(this.confirmTimer))}confirmed(e){clearTimeout(this.confirmTimer),this.confirming.set(null),this.message.set(``);let t=this.livePage()?.cycles.length??0;this.announce(e?`Recording started.`:`Recording stopped. ${t} ${t===1?`cycle`:`cycles`} recorded.`)}unconfirmed(e){let t=`The page did not confirm that the recording ${e?`started`:`stopped`}. The tab may be in the background, closed or reloading.`;this.message.set(t),this.announce(t)}async toggle(){let e=!this.recording();clearTimeout(this.confirmTimer),this.confirming.set(null),await this.send({on:e},e?`Starting…`:`Stopping…`,()=>``,`request-change-detection-record`,{quiet:!0,keepPending:!0})&&(this.confirming.set(e),this.confirmTimer=setTimeout(()=>{this.confirming()===e&&this.unconfirmed(e)},wj))}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async setView(e,t){let n=this.views();this.views.set({...n,[e]:t});let r={flash:t?`Flash checks on.`:`Flash checks off.`,track:t?`Performance track on. Record in the Chrome Performance panel to see it.`:`Performance track off.`,angularProfiling:`Angular profiling on. It stays on until the page reloads.`}[e];await this.send({[e]:t},``,()=>r,`request-change-detection-options`)||this.views.set(n)}async send(e,t,n,r=`request-change-detection-record`,{quiet:i=!1,keepPending:a=!1}={}){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await tE(this.rpc(),r,{pageId:this.pageId(),...e}),a||this.message.set(``),i||this.announce(n()),!0}catch{let e=`Could not reach the page.`;return this.message.set(e),this.announce(e),!1}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:22,vars:13,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`note`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),L(),j(4,ej,4,5),I(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),L(),I(6,`p`,4),K(7),L(),I(8,`p`,5),K(9),L()(),j(10,tj,7,1,`p`,6),I(11,`p`,7),K(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked, what started it and which checks changed nothing. Tree rows show how often each instance was checked. Times come from a development build. While it records, the page also wraps Angular's scheduler, adds a signal write hook and watches DOM updates; all of it stops with the recording. `),j(13,nj,1,0),L(),j(14,aj,2,1),j(15,cj,16,7),R(16,`app-limit-note`,8),N(17,lj,2,1,`p`,9,_g),j(19,fj,9,9),j(20,Sj,27,4)(21,Cj,2,0,`p`,10),L()),e&2){let e;O(4),M(t.imported()?-1:4),O(),F(`page`,t.page())(`maxCycles`,t.maxCycles()),O(2),q(t.status()),O(2),q(t.announcement()),O(),M((e=t.imported())?10:-1,e),O(3),M(t.native()?13:-1),O(),M(t.page()?.supported===!1?14:-1),O(),M(!t.imported()&&!t.native()?15:-1),O(),F(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),O(),P(t.capNotes()),O(2),M(t.cycles().length?19:-1),O(),M(t.page()?.components?.length?20:t.recording()?21:-1)}},dependencies:[FD,wO,LA,Yk,BA,dA,EA,ZA],styles:[`[_nghost-%COMP%] { +}`]})},YA=(e,t)=>t.id;function XA(e,t){if(e&1){let e=V();I(0,`button`,14),H(`click`,function(){return w(e),T(W(2).clear())}),K(1,`Clear`),L()}}function ZA(e,t){if(e&1){let e=V();I(0,`button`,11),H(`click`,function(){return w(e),T(W().toggle())}),R(1,`span`,12),K(2),L(),j(3,XA,2,0,`button`,13)}if(e&2){let e=W();G(`on`,e.recording()),F(`disabled`,!e.pageId()),O(2),J(` `,e.recording()?`Stop recording`:`Record`,` `),O(),M(e.cycles().length?3:-1)}}function QA(e,t){if(e&1){let e=V();I(0,`p`,6)(1,`span`,15),K(2,`Imported recording`),L(),I(3,`span`,16),K(4),L(),I(5,`button`,14),H(`click`,function(){return w(e),T(W().closeImport())}),K(6,`Back to live recording`),L()()}e&2&&(O(4),q(t.fileName))}function $A(e,t){e&1&&K(0,` An app on a device has no DOM, so checks that changed nothing are not counted there. `)}function ej(e,t){e&1&&(I(0,`p`,9),K(1,` The page has Angular's profiler hook, but the recording could not attach to it yet. The page tries again on its next update while recording is on. If this stays, stop and start the recording, or reload the page. `),L())}function tj(e,t){e&1&&R(0,`app-angular-unavailable`,17),e&2&&F(`page`,W(2).angularPage())}function nj(e,t){e&1&&j(0,ej,2,0,`p`,9)(1,tj,1,1,`app-angular-unavailable`,17),e&2&&M(+!W().attachPending())}function rj(e,t){e&1&&(I(0,`p`,9),K(1,`Angular profiling stays on until the page reloads.`),L())}function ij(e,t){e&1&&R(0,`app-angular-unavailable`,21),e&2&&F(`page`,W(2).angularPage())}function aj(e,t){if(e&1){let e=V();I(0,`div`,18)(1,`span`,19),K(2,`Live views`),L(),I(3,`button`,20),H(`click`,function(){w(e);let t=W();return T(t.setView(`flash`,!t.views().flash))}),R(4,`span`,12),K(5,` Flash checks `),L(),I(6,`button`,20),H(`click`,function(){w(e);let t=W();return T(t.setView(`track`,!t.views().track))}),R(7,`span`,12),K(8,` Performance track `),L(),I(9,`button`,20),H(`click`,function(){return w(e),T(W().setView(`angularProfiling`,!0))}),R(10,`span`,12),K(11,` Angular profiling `),L()(),I(12,`p`,7),K(13,` Flash checks draws a box over each component on the page as Angular checks it, with its name and how often it was checked, fading over a second. Performance track adds a Pangular track to the Chrome Performance panel with every component check, hook and output. Angular profiling turns on Angular's own track there. `),L(),j(14,rj,2,0,`p`,9)(15,ij,1,1,`app-angular-unavailable`,21)}if(e&2){let e=W();O(3),F(`disabled`,!e.canShowViews()),A(`aria-pressed`,e.views().flash),O(3),F(`disabled`,!e.canShowViews()),A(`aria-pressed`,e.views().track),O(3),F(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),A(`aria-pressed`,e.views().angularProfiling),O(5),M(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function oj(e,t){if(e&1&&(I(0,`p`,9),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function sj(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(2);O(),J(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function cj(e,t){e&1&&(I(0,`p`,9),K(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),L())}function lj(e,t){if(e&1){let e=V();I(0,`h3`),K(1,`Cycles`),L(),I(2,`app-cd-cycle-chart`,22),G_(`rangeChange`,function(t){w(e);let n=W();return W_(n.range,t)||(n.range=t),T(t)}),L(),I(3,`app-cd-flame-graph`,23),H(`pick`,function(t){return w(e),T(W().showComponent.emit(t))}),L(),j(4,sj,2,1,`p`,24),I(5,`h3`),K(6,`Self time by component`),L(),j(7,cj,2,0,`p`,9),I(8,`app-cd-treemap`,25),H(`pick`,function(t){return w(e),T(W().showComponent.emit(t))}),L()}if(e&2){let e=W();O(2),F(`cycles`,e.cycles()),U_(`range`,e.range),O(),F(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),O(),M(e.hasSpans()?-1:4),O(3),M(e.range()?7:-1),O(),F(`stats`,e.stats())(`scope`,e.scope())}}function uj(e,t){if(e&1&&(I(0,`tr`)(1,`td`,16),K(2),L(),I(3,`td`,31),K(4),L(),I(5,`td`,31),K(6),L(),I(7,`td`,31),K(8),L()()),e&2){let e=t.$implicit,n=W(2);O(2),q(e.name),O(2),q(e.checks),O(2),q(n.ms(e.ms)),O(2),q(n.ms(e.maxMs))}}function dj(e,t){e&1&&(I(0,`tr`)(1,`td`,32),K(2,`No component time in the picked cycles.`),L()())}function fj(e,t){if(e&1&&(I(0,`span`,34),K(1,`from `),I(2,`span`,16),K(3),L()()),e&2){let e=W(3);O(3),q(e.causeText(t))}}function pj(e,t){if(e&1&&(I(0,`span`,34),K(1,`after `),I(2,`span`,16),K(3),L()()),e&2){let e=W().$implicit;O(3),q(e.trigger)}}function mj(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit;O(),J(``,e.unchanged,` changed nothing`)}}function hj(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit,t=W(2);O(),J(`hooks `,t.ms(e.hookMs))}}function gj(e,t){if(e&1&&(I(0,`span`,35),K(1),L()),e&2){let e=W().$implicit,t=W(2);O(),J(`afterRender `,t.ms(e.afterRenderMs))}}function _j(e,t){if(e&1&&(I(0,`span`,36),K(1,` slowest `),I(2,`span`,16),K(3),L(),K(4),L()),e&2){let e=t,n=W(3);O(3),q(e.name),O(),J(` `,n.ms(e.ms),` `)}}function vj(e,t){if(e&1&&(I(0,`li`)(1,`span`,33),K(2),L(),I(3,`span`,16),K(4),L(),I(5,`span`),K(6),L(),j(7,fj,4,1,`span`,34)(8,pj,4,1,`span`,34),j(9,mj,2,1,`span`,35),j(10,hj,2,1,`span`,35),j(11,gj,2,1,`span`,35),j(12,_j,5,2,`span`,36),L()),e&2){let e,n,r=t.$implicit,i=W(2);O(2),q(i.clock(r.at)),O(2),q(i.ms(r.ms)),O(2),V_(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),O(),M((e=r.cause)?7:r.trigger?8:-1,e),O(2),M(r.unchanged?9:-1),O(),M(r.hookMs?10:-1),O(),M(r.afterRenderMs?11:-1),O(),M((n=r.components[0])?12:-1,n)}}function yj(e,t){if(e&1&&(I(0,`div`,26)(1,`div`)(2,`h3`),K(3),L(),I(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),K(8,`Component`),L(),I(9,`th`,28),K(10,`Checks`),L(),I(11,`th`,28),K(12,`Self time`),L(),I(13,`th`,28),K(14,`Slowest`),L()()(),I(15,`tbody`),N(16,uj,9,4,`tr`,null,gg,!1,dj,3,0,`tr`),L()()(),I(19,`div`)(20,`h3`),K(21,`Latest cycles`),L(),I(22,`ol`,29),N(23,vj,13,11,`li`,null,YA),L()()(),R(25,`app-cd-timing`,30)(26,`app-cd-diagnosis`,30)),e&2){let e=W();O(3),J(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),O(13),P(e.slowest()),O(7),P(e.latest()),O(2),F(`page`,e.page()),O(),F(`page`,e.page())}}function bj(e,t){e&1&&(I(0,`p`,10),K(1,`Use the app. Cycles show up here as Angular runs change detection.`),L())}var xj=3e3,Sj=10,Cj=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);native=$(!1);angularPages=DD(()=>this.rpc());angularPage=X(()=>OD(this.angularPages(),this.pageId()));attachPending=X(()=>this.angularPage()?.capabilities.profiler===!0);showComponent=xv();range=D(null);imported=D(null);page=X(()=>this.imported()?.page??this.livePage());views=Q(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=X(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=D(``);announcement=D(``);recording=X(()=>this.page()?.recording===!0);cycles=X(()=>this.page()?.cycles??[]);maxCycles=X(()=>mE(this.rpc()).limits.cdCycles);picked=X(()=>vk(this.cycles(),this.range()));hasSpans=X(()=>this.picked().some(e=>e.spans?.length));spanNames=X(()=>this.page()?.spanNames??[]);stats=X(()=>this.range()?yk(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=X(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=X(()=>this.stats().slice(0,Sj));latest=X(()=>this.cycles().slice(-30).reverse());capNotes=X(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=X(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`:this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return hO(e)}causeText(e){return $O(e)}confirming=D(null);confirmTimer;constructor(){_c(()=>{let e=this.confirming();e!==null&&this.livePage()?.recording===!0===e&&Z(()=>this.confirmed(e))}),C(As).onDestroy(()=>clearTimeout(this.confirmTimer))}confirmed(e){clearTimeout(this.confirmTimer),this.confirming.set(null),this.message.set(``);let t=this.livePage()?.cycles.length??0;this.announce(e?`Recording started.`:`Recording stopped. ${t} ${t===1?`cycle`:`cycles`} recorded.`)}unconfirmed(e){let t=`The page did not confirm that the recording ${e?`started`:`stopped`}. The tab may be in the background, closed or reloading.`;this.message.set(t),this.announce(t)}async toggle(){let e=!this.recording();clearTimeout(this.confirmTimer),this.confirming.set(null),await this.send({on:e},e?`Starting…`:`Stopping…`,()=>``,`request-change-detection-record`,{quiet:!0,keepPending:!0})&&(this.confirming.set(e),this.confirmTimer=setTimeout(()=>{this.confirming()===e&&this.unconfirmed(e)},xj))}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async setView(e,t){let n=this.views();this.views.set({...n,[e]:t});let r={flash:t?`Flash checks on.`:`Flash checks off.`,track:t?`Performance track on. Record in the Chrome Performance panel to see it.`:`Performance track off.`,angularProfiling:`Angular profiling on. It stays on until the page reloads.`}[e];await this.send({[e]:t},``,()=>r,`request-change-detection-options`)||this.views.set(n)}async send(e,t,n,r=`request-change-detection-record`,{quiet:i=!1,keepPending:a=!1}={}){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await QT(this.rpc(),r,{pageId:this.pageId(),...e}),a||this.message.set(``),i||this.announce(n()),!0}catch{let e=`Could not reach the page.`;return this.message.set(e),this.announce(e),!1}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`],native:[1,`native`]},outputs:{showComponent:`showComponent`},decls:22,vars:13,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`note`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Change detection`),L(),j(4,ZA,4,5),I(5,`app-cd-transfer`,3),H(`imported`,function(e){return t.showImport(e)}),L(),I(6,`p`,4),K(7),L(),I(8,`p`,5),K(9),L()(),j(10,QA,7,1,`p`,6),I(11,`p`,7),K(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked, what started it and which checks changed nothing. Tree rows show how often each instance was checked. Times come from a development build. While it records, the page also wraps Angular's scheduler, adds a signal write hook and watches DOM updates; all of it stops with the recording. `),j(13,$A,1,0),L(),j(14,nj,2,1),j(15,aj,16,7),R(16,`app-limit-note`,8),N(17,oj,2,1,`p`,9,_g),j(19,lj,9,9),j(20,yj,27,4)(21,bj,2,0,`p`,10),L()),e&2){let e;O(4),M(t.imported()?-1:4),O(),F(`page`,t.page())(`maxCycles`,t.maxCycles()),O(2),q(t.status()),O(2),q(t.announcement()),O(),M((e=t.imported())?10:-1,e),O(3),M(t.native()?13:-1),O(),M(t.page()?.supported===!1?14:-1),O(),M(!t.imported()&&!t.native()?15:-1),O(),F(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),O(),P(t.capNotes()),O(2),M(t.cycles().length?19:-1),O(),M(t.page()?.components?.length?20:t.recording()?21:-1)}},dependencies:[MD,xO,PA,Kk,LA,cA,CA,JA],styles:[`[_nghost-%COMP%] { display: block; margin-top: 16px; } @@ -1811,7 +1811,7 @@ td.mono[_ngcontent-%COMP%] { .trigger[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%], .top[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%] { overflow-wrap: anywhere; -}`]})},Dj=[`*`];function Oj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function kj(e,t){e&1&&Jg(0,0,null,Oj,1,1)}function Aj(e,t){if(e&1&&(I(0,`span`,4),K(1),L()),e&2){let e=W(2);O(),q(e.message())}}function jj(e,t){if(e&1){let e=V();I(0,`button`,2),H(`click`,function(){return w(e),T(W().open())}),Mg(1,3),L(),j(2,Aj,2,1,`span`,4)}if(e&2){let e=W(),t=Qg(1);F(`title`,`Open `+e.label()+` in your editor`),A(`aria-label`,`Open `+e.label()+` in your editor`),O(),F(`ngTemplateOutlet`,t),O(),M(e.message()?2:-1)}}function Mj(e,t){if(e&1&&(I(0,`span`,1),Mg(1,3),L()),e&2){let e=W(),t=Qg(1);F(`title`,e.label()),O(),F(`ngTemplateOutlet`,t)}}var Nj=class e{source=D(D(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!rE(e)});use(e){this.source.set(e)}async open(e,t){if(!this.available())return{ok:!1,error:`No server is connected.`};try{let n=await tE(this.client(),`open-in-editor`,{file:e,...t?{line:t}:{}});return n?.ok?{ok:!0}:{ok:!1,error:n?.error??`The server did not open it.`}}catch{return{ok:!1,error:`The server did not open it.`}}}static ɵfac=function(t){return new(t||e)};static ɵprov=Rl({token:e,factory:e.ɵfac})};function Pj(e,t){return t?`${e}:${t}`:e}var Fj=class e{editor=C(Nj);file=$.required();line=$(void 0);label=X(()=>Pj(this.file(),this.line()));message=D(``);async open(){this.message.set(``);let e=await this.editor.open(this.file(),this.line()??void 0);e.ok||this.message.set(`Not opened: ${e.error}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:Dj,decls:4,vars:1,consts:[[`text`,``],[1,`source-text`,3,`title`],[`type`,`button`,1,`source-link`,3,`click`,`title`],[3,`ngTemplateOutlet`],[`role`,`alert`,1,`message`]],template:function(e,t){e&1&&(qg(),Jh(0,kj,2,0,`ng-template`,null,0,pv),j(2,jj,3,4)(3,Mj,2,2,`span`,1)),e&2&&(O(2),M(t.editor.available()?2:3))},dependencies:[py],styles:[`[_nghost-%COMP%] { +}`]})},wj=[`*`];function Tj(e,t){e&1&&K(0),e&2&&q(W(2).label())}function Ej(e,t){e&1&&Jg(0,0,null,Tj,1,1)}function Dj(e,t){if(e&1&&(I(0,`span`,4),K(1),L()),e&2){let e=W(2);O(),q(e.message())}}function Oj(e,t){if(e&1){let e=V();I(0,`button`,2),H(`click`,function(){return w(e),T(W().open())}),Mg(1,3),L(),j(2,Dj,2,1,`span`,4)}if(e&2){let e=W(),t=Qg(1);F(`title`,`Open `+e.label()+` in your editor`),A(`aria-label`,`Open `+e.label()+` in your editor`),O(),F(`ngTemplateOutlet`,t),O(),M(e.message()?2:-1)}}function kj(e,t){if(e&1&&(I(0,`span`,1),Mg(1,3),L()),e&2){let e=W(),t=Qg(1);F(`title`,e.label()),O(),F(`ngTemplateOutlet`,t)}}var Aj=class e{source=D(D(null));client=X(()=>this.source()());available=X(()=>{let e=this.client();return!!e&&!eE(e)});use(e){this.source.set(e)}async open(e,t){if(!this.available())return{ok:!1,error:`No server is connected.`};try{let n=await QT(this.client(),`open-in-editor`,{file:e,...t?{line:t}:{}});return n?.ok?{ok:!0}:{ok:!1,error:n?.error??`The server did not open it.`}}catch{return{ok:!1,error:`The server did not open it.`}}}static ɵfac=function(t){return new(t||e)};static ɵprov=Rl({token:e,factory:e.ɵfac})};function jj(e,t){return t?`${e}:${t}`:e}var Mj=class e{editor=C(Aj);file=$.required();line=$(void 0);label=X(()=>jj(this.file(),this.line()));message=D(``);async open(){this.message.set(``);let e=await this.editor.open(this.file(),this.line()??void 0);e.ok||this.message.set(`Not opened: ${e.error}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:wj,decls:4,vars:1,consts:[[`text`,``],[1,`source-text`,3,`title`],[`type`,`button`,1,`source-link`,3,`click`,`title`],[3,`ngTemplateOutlet`],[`role`,`alert`,1,`message`]],template:function(e,t){e&1&&(qg(),Jh(0,Ej,2,0,`ng-template`,null,0,mv),j(2,Oj,3,4)(3,kj,2,2,`span`,1)),e&2&&(O(2),M(t.editor.available()?2:3))},dependencies:[uy],styles:[`[_nghost-%COMP%] { display: inline; min-width: 0; } @@ -1846,7 +1846,7 @@ td.mono[_ngcontent-%COMP%] { color: var(--%NS%danger-text); font-family: var(--%NS%font-sans); font-size: 0.92em; -}`]})},Ij=[`field`],Lj=[`editButton`],Rj=[`valueBox`];function zj(e,t){if(e&1){let e=V();z(0,`div`,5)(1,`label`,6),K(2),B(),z(3,`input`,7,0),U(`input`,function(t){return w(e),T(W().draft.set(t.target.value))})(`keydown.enter`,function(t){w(e);let n=W();return t.preventDefault(),T(n.apply())})(`keydown.escape`,function(t){w(e);let n=W();return t.preventDefault(),t.stopPropagation(),T(n.cancel())}),B(),z(5,`button`,8),U(`click`,function(){return w(e),T(W().apply())}),K(6,`Apply`),B(),z(7,`button`,9),U(`click`,function(){return w(e),T(W().cancel())}),K(8,`Cancel`),B()(),z(9,`p`,10),K(10),B()}if(e&2){let e=W();O(),Pg(`htmlFor`,e.fieldId),O(),J(`New value of `,e.prop().name,`, as JSON`),O(),Pg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),A(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),O(2),Pg(`disabled`,e.busy()),O(4),Pg(`id`,e.hintId),O(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function Bj(e,t){if(e&1&&(z(0,`pre`,null,1),K(2),lv(3,`json`),B()),e&2){let e=W(2);A(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),O(2),q(uv(3,4,e.prop().value))}}function Vj(e,t){if(e&1){let e=V();z(0,`button`,14,2),U(`click`,function(){return w(e),T(W(2).start())}),K(2,` Edit `),B()}if(e&2){let e=W(2);Pg(`disabled`,e.busy()),A(`aria-label`,`Edit `+e.prop().name)}}function Hj(e,t){if(e&1&&(z(0,`p`,13),K(1),B()),e&2){let e=W(2);O(),q(e.prop().locked)}}function Uj(e,t){if(e&1&&(z(0,`div`,11),j(1,Bj,4,6,`pre`),j(2,Vj,3,2,`button`,12),B(),j(3,Hj,2,1,`p`,13)),e&2){let e=W();O(),M(e.bare()?-1:1),O(),M(e.editable()?2:-1),O(),M(e.writes()&&e.prop().locked?3:-1)}}function Wj(e,t){if(e&1&&(z(0,`p`,3),K(1),B()),e&2){let e=W();Pg(`id`,e.errorId),O(),q(e.error())}}var Gj=0;function Kj(e){let t=e.trim();if(!t)return{error:`Type a JSON value, such as "text", 42, true, null or [1, 2].`};try{return{value:JSON.parse(t)}}catch{return{error:`Not valid JSON. Put text in double quotes, such as "Paris".`}}}var qj=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++Gj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=D(!1);draft=D(``);busy=D(!1);error=D(``);done=D(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Dv(`field`);editButton=Dv(`editButton`);valueBox=Dv(`valueBox`);injector=C(Os);scrollable=D(!1);constructor(){Pv(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}async start(){let e=this.prop().value;this.error.set(``),this.done.set(``);let t=this.readDraft();if(t){this.busy.set(!0);let n=await t();if(this.busy.set(!1),n.error!==void 0){this.error.set(n.error);return}e=n.value}this.draft.set(e===void 0?``:JSON.stringify(e)),this.editing.set(!0),ud(()=>{let e=this.field()?.nativeElement;e?.focus(),e?.select()},{injector:this.injector})}cancel(){this.editing()&&(this.editing.set(!1),this.busy.set(!1),this.error.set(``),this.focusEdit())}async apply(){if(this.busy())return;let e=Kj(this.draft());if(`error`in e){this.error.set(e.error);return}let t=this.prop(),n=this.rpc(),r=this.pageId();if(!n||!r||!t.edit)return;this.busy.set(!0),this.error.set(``);let i;try{i=await n.scope(`pangular`).rpc.call(`request-component-edit`,{pageId:r,request:{id:this.componentId(),path:t.prop,value:e.value,kind:t.edit}})??{}}catch{i={error:`The devtools server did not answer. Try again.`}}this.busy.set(!1),this.editing()&&(i.ok?(this.editing.set(!1),this.done.set(`Set ${t.name}.`),this.focusEdit()):(this.error.set(i.error??`The page did not write it.`),this.field()?.nativeElement.focus()))}focusEdit(){ud(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Xg(t.field,Ij,5)(t.editButton,Lj,5)(t.valueBox,Rj,5),e&2&&Zg(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],bare:[1,`bare`],readDraft:[1,`readDraft`]},decls:5,vars:3,consts:[[`field`,``],[`valueBox`,``],[`editButton`,``],[`role`,`alert`,1,`error`,3,`id`],[`role`,`status`,1,`sr-only`],[1,`editor`],[1,`sr-only`,3,`for`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,`mono`,3,`input`,`keydown.enter`,`keydown.escape`,`id`,`value`,`readOnly`],[`type`,`button`,1,`primary`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[1,`hint`,3,`id`],[1,`view`],[`type`,`button`,1,`edit`,3,`disabled`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`,`disabled`]],template:function(e,t){e&1&&(j(0,zj,11,11)(1,Uj,4,3),j(2,Wj,2,2,`p`,3),z(3,`p`,4),K(4),B()),e&2&&(M(+!t.editing()),O(2),M(t.error()?2:-1),O(2),q(t.done()))},dependencies:[yy],styles:[`[_nghost-%COMP%] { +}`]})},Nj=[`field`],Pj=[`editButton`],Fj=[`valueBox`];function Ij(e,t){if(e&1){let e=V();z(0,`div`,5)(1,`label`,6),K(2),B(),z(3,`input`,7,0),U(`input`,function(t){return w(e),T(W().draft.set(t.target.value))})(`keydown.enter`,function(t){w(e);let n=W();return t.preventDefault(),T(n.apply())})(`keydown.escape`,function(t){w(e);let n=W();return t.preventDefault(),t.stopPropagation(),T(n.cancel())}),B(),z(5,`button`,8),U(`click`,function(){return w(e),T(W().apply())}),K(6,`Apply`),B(),z(7,`button`,9),U(`click`,function(){return w(e),T(W().cancel())}),K(8,`Cancel`),B()(),z(9,`p`,10),K(10),B()}if(e&2){let e=W();O(),Pg(`htmlFor`,e.fieldId),O(),J(`New value of `,e.prop().name,`, as JSON`),O(),Pg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),A(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),O(2),Pg(`disabled`,e.busy()),O(4),Pg(`id`,e.hintId),O(),J(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function Lj(e,t){if(e&1&&(z(0,`pre`,null,1),K(2),uv(3,`json`),B()),e&2){let e=W(2);A(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),O(2),q(dv(3,4,e.prop().value))}}function Rj(e,t){if(e&1){let e=V();z(0,`button`,14,2),U(`click`,function(){return w(e),T(W(2).start())}),K(2,` Edit `),B()}if(e&2){let e=W(2);Pg(`disabled`,e.busy()),A(`aria-label`,`Edit `+e.prop().name)}}function zj(e,t){if(e&1&&(z(0,`p`,13),K(1),B()),e&2){let e=W(2);O(),q(e.prop().locked)}}function Bj(e,t){if(e&1&&(z(0,`div`,11),j(1,Lj,4,6,`pre`),j(2,Rj,3,2,`button`,12),B(),j(3,zj,2,1,`p`,13)),e&2){let e=W();O(),M(e.bare()?-1:1),O(),M(e.editable()?2:-1),O(),M(e.writes()&&e.prop().locked?3:-1)}}function Vj(e,t){if(e&1&&(z(0,`p`,3),K(1),B()),e&2){let e=W();Pg(`id`,e.errorId),O(),q(e.error())}}var Hj=0;function Uj(e){let t=e.trim();if(!t)return{error:`Type a JSON value, such as "text", 42, true, null or [1, 2].`};try{return{value:JSON.parse(t)}}catch{return{error:`Not valid JSON. Put text in double quotes, such as "Paris".`}}}var Wj=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++Hj}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=D(!1);draft=D(``);busy=D(!1);error=D(``);done=D(``);editable=X(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Ov(`field`);editButton=Ov(`editButton`);valueBox=Ov(`valueBox`);injector=C(Os);scrollable=D(!1);constructor(){Fv(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}async start(){let e=this.prop().value;this.error.set(``),this.done.set(``);let t=this.readDraft();if(t){this.busy.set(!0);let n=await t();if(this.busy.set(!1),n.error!==void 0){this.error.set(n.error);return}e=n.value}this.draft.set(e===void 0?``:JSON.stringify(e)),this.editing.set(!0),dd(()=>{let e=this.field()?.nativeElement;e?.focus(),e?.select()},{injector:this.injector})}cancel(){this.editing()&&(this.editing.set(!1),this.busy.set(!1),this.error.set(``),this.focusEdit())}async apply(){if(this.busy())return;let e=Uj(this.draft());if(`error`in e){this.error.set(e.error);return}let t=this.prop(),n=this.rpc(),r=this.pageId();if(!n||!r||!t.edit)return;this.busy.set(!0),this.error.set(``);let i;try{i=await n.scope(`pangular`).rpc.call(`request-component-edit`,{pageId:r,request:{id:this.componentId(),path:t.prop,value:e.value,kind:t.edit}})??{}}catch{i={error:`The devtools server did not answer. Try again.`}}this.busy.set(!1),this.editing()&&(i.ok?(this.editing.set(!1),this.done.set(`Set ${t.name}.`),this.focusEdit()):(this.error.set(i.error??`The page did not write it.`),this.field()?.nativeElement.focus()))}focusEdit(){dd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&Xg(t.field,Nj,5)(t.editButton,Pj,5)(t.valueBox,Fj,5),e&2&&Zg(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],bare:[1,`bare`],readDraft:[1,`readDraft`]},decls:5,vars:3,consts:[[`field`,``],[`valueBox`,``],[`editButton`,``],[`role`,`alert`,1,`error`,3,`id`],[`role`,`status`,1,`sr-only`],[1,`editor`],[1,`sr-only`,3,`for`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,`mono`,3,`input`,`keydown.enter`,`keydown.escape`,`id`,`value`,`readOnly`],[`type`,`button`,1,`primary`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[1,`hint`,3,`id`],[1,`view`],[`type`,`button`,1,`edit`,3,`disabled`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`,`disabled`]],template:function(e,t){e&1&&(j(0,Ij,11,11)(1,Bj,4,3),j(2,Vj,2,2,`p`,3),z(3,`p`,4),K(4),B()),e&2&&(M(+!t.editing()),O(2),M(t.error()?2:-1),O(2),q(t.done()))},dependencies:[gy],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1969,7 +1969,7 @@ button.edit[_ngcontent-%COMP%] { .error[_ngcontent-%COMP%] { color: var(--%NS%danger-text); -}`]})},Jj=1e3,Yj={depth:5,limit:100},Xj=`[redacted]`;function Zj(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Qj(e){return Zj(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function $j(e){return Zj(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function eM(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function tM(e){return e.$type===`Map`&&Array.isArray(e.entries)}function nM(e){return e.$type===`Set`&&Array.isArray(e.values)}function rM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function iM(e){if(!e||typeof e!=`object`)return null;if($j(e))return e.size<=0?null:{kind:eM(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(Qj(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=Qj(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(tM(t)||nM(t)){let e=typeof t.size==`number`?t.size:0,n=tM(t)?`map`:`set`;return e?{kind:n,type:n===`map`?`Map`:`Set`,size:e,collapsed:!1}:null}let n=typeof t.$more==`number`?t.$more:0,r=rM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function aM(e){if(typeof e==`string`)return JSON.stringify(e);let t=iM(e);if(t)return cM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function oM(e){let t=iM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(Qj(e.at(-1))?e.slice(0,-1):e).map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:n,more:t.size-n.length}}let n=e;if(t.kind===`map`){let e=n.entries.map((e,t)=>{let[n,r]=Array.isArray(e)?e:[void 0,e];return{key:String(t),label:aM(n),value:r}});return{children:e,more:Math.max(0,t.size-e.length)}}if(t.kind===`set`){let e=n.values.map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:e,more:Math.max(0,t.size-e.length)}}return{children:rM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function sM(e,t,n){return`${e} ${e===1?t:n}`}function cM(e){let t={array:sM(e.size,`item`,`items`),object:sM(e.size,`key`,`keys`),map:sM(e.size,`entry`,`entries`),set:sM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function lM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function uM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function dM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var fM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function pM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==Xj&&!fM.test(e)&&!e.endsWith(`…`)}function mM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function hM(e,t,n,r,i=500){let a=[],o=r.trim().toLowerCase();if(!o)return a;let s=new Set,c=(e,t)=>{let r=lM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of oM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!iM(r.value))continue;let i=n(t)??(iM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var gM=(e,t)=>t.id;function _M(e,t){if(e&1){let e=V();I(0,`button`,2),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).toggle(t))}),E(),I(1,`svg`,3),R(2,`path`,4),L(),bs(),I(3,`span`,14),K(4),L(),I(5,`span`,5),K(6),L()()}if(e&2){let e=W().$implicit;A(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),O(4),J(``,e.label,`:`),O(2),q(e.text)}}function vM(e,t){if(e&1&&R(0,`app-prop-value`,15),e&2){let e=W(5);F(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function yM(e,t){if(e&1&&(I(0,`span`,16),K(1),L()),e&2){let e=W(2).$implicit;O(),q(e.text)}}function bM(e,t){if(e&1&&(I(0,`span`,14),K(1),L(),j(2,vM,1,5,`app-prop-value`,15)(3,yM,2,1,`span`,16)),e&2){let e,t=W().$implicit;O(),J(``,t.label,`:`),O(),M((e=t.edit)?2:3,e)}}function xM(e,t){if(e&1){let e=V();I(0,`button`,17),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).more(t))}),K(1),I(2,`span`,18),K(3),L()()}if(e&2){let e=W().$implicit,t=W(3);O(),J(` Show `,t.step(e),` more `),O(2),J(`(`,e.more,` not listed)`)}}function SM(e,t){e&1&&(I(0,`span`,12),K(1,`Reading from the page…`),L())}function CM(e,t){if(e&1&&(I(0,`span`,13),K(1),L()),e&2){let e=W().$implicit;O(),q(e.text)}}function wM(e,t){if(e&1&&(I(0,`li`,9),j(1,_M,7,4,`button`,10)(2,bM,4,2)(3,xM,4,2,`button`,11)(4,SM,2,0,`span`,12)(5,CM,2,1,`span`,13),L()),e&2){let e,n=t.$implicit;y_(`padding-left`,n.depth*14,`px`),O(),M((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function TM(e,t){if(e&1&&(I(0,`ul`,7),N(1,wM,6,3,`li`,8,gM),L()),e&2){let e=W(2);F(`id`,e.listId),A(`aria-label`,e.prop().name+` entries`),O(),P(e.rows())}}function EM(e,t){if(e&1){let e=V();I(0,`div`,1)(1,`button`,2),H(`click`,function(){return w(e),T(W().toggleRoot())}),E(),I(2,`svg`,3),R(3,`path`,4),L(),bs(),I(4,`span`,5),K(5),L()(),R(6,`app-prop-value`,6),L(),j(7,TM,3,2,`ul`,7)}if(e&2){let e=t,n=W();O(),A(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),O(4),q(n.summaryOf(e)),O(),F(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),O(),M(n.rootOpen()?7:-1)}}function DM(e,t){if(e&1&&R(0,`app-prop-value`,0),e&2){let e=W();F(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var OM=0;function kM(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function AM(e){if(Array.isArray(e))return e.every(AM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(AM)}return pM(e)}var jM=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++OM}`;host=C(Vl);pendingMore=null;constructor(){Pv(()=>{let e=this.rows(),t=this.pendingMore;if(!t)return;let n=e.findIndex(e=>(e.kind===`leaf`||e.kind===`node`)&&!t.has(e.id));if(n<0)return;this.pendingMore=null;let r=document.activeElement;r&&r!==document.body&&r.isConnected||this.focusNear(n)})}rootPath=X(()=>[this.prop().prop]);rootValue=X(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=X(()=>iM(this.rootValue()));needle=X(()=>this.query().trim().toLowerCase());matches=X(()=>{let e=this.needle(),t=this.prop();if(!e||[t.name,t.prop].some(t=>t.toLowerCase().includes(e)))return null;let n=this.store(),r=this.directive();return hM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=X(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=X(()=>{let e=this.root();if(!e)return[];let t=this.store(),n=this.directive(),r=this.matches(),i=new Set,a=new Set;for(let e of r??[]){a.add(lM(e));for(let t=2;t<=e.length;t++)i.add(lM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:h,more:g}=oM(e);for(let e of h){let h=[...o,e.key],g=lM(h);if(r&&!m&&!i.has(g))continue;let _=iM(e.value),ee=lM(h,n);if(!_){let t=p&&pM(e.value)?dM(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:kM(e.value),edit:s&&t&&p?{name:uM(h,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let te=!!r&&!m&&i.has(g)&&!a.has(g)||t.isOpen(h,n);if(c.push({id:ee,kind:`node`,depth:f,path:h,label:e.label,text:cM(_),container:_,open:te}),!te)continue;let ne=t.level(h,n)??(_.collapsed?void 0:e.value),re=[...d,_.kind];ne===void 0?t.errors().has(ee)?c.push({...u(h,f+1,`error`),text:t.errors().get(ee)}):c.push(u(h,f+1,`loading`)):l(ne,h,re,f+1,mM(p,_),m||a.has(g))}g>0&&(!r||m)&&c.push({...u(o,f,`more`),more:g,listed:h.length})},u=(e,t,r)=>({id:`${lM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?mM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),Yj.depth,Yj.limit);return e.ok?AM(e.value)?{value:e.value}:{error:`Too large to edit as a whole. Open it to edit the values inside.`}:{error:e.error??`The page did not read it.`}};summaryOf(e){return cM(e)}toggleRoot(){this.pendingMore=null,this.store().toggle(this.rootPath(),this.directive(),!1)}toggle(e){this.pendingMore=null,this.store().toggle(e.path,this.directive(),!!e.container?.collapsed)}more(e){this.pendingMore=new Set(this.rows().map(e=>e.id)),this.store().more(e.path,this.directive(),e.listed??0)}focusNear(e){let t=this.host.nativeElement,n=Array.from(t.querySelectorAll(`#${this.listId} > li`)),r=e=>e?.querySelector(`button:not([disabled]), input, textarea, [tabindex="0"]`);(n.slice(e).map(r).find(Boolean)??n.slice(0,e).reverse().map(r).find(Boolean)??t.querySelector(`.root > .toggle`))?.focus()}step(e){return Math.min(100,e.more??0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-value-tree`]],inputs:{prop:[1,`prop`],store:[1,`store`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],directive:[1,`directive`],query:[1,`query`]},decls:2,vars:1,consts:[[3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`root`],[`type`,`button`,1,`toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`summary`,`mono`],[1,`whole`,3,`bare`,`prop`,`componentId`,`pageId`,`rpc`,`writes`,`readDraft`],[1,`entries`,3,`id`],[1,`entry`,3,`padding-left`],[1,`entry`],[`type`,`button`,1,`toggle`],[`type`,`button`,1,`more`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error`],[1,`key`,`mono`],[1,`leaf-edit`,3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`leaf`,`mono`],[`type`,`button`,1,`more`,3,`click`],[1,`muted`]],template:function(e,t){if(e&1&&j(0,EM,8,12)(1,DM,1,5,`app-prop-value`,0),e&2){let e;M((e=t.root())?0:1,e)}},dependencies:[qj],styles:[`[_nghost-%COMP%] { +}`]})},Gj=1e3,Kj={depth:5,limit:100},qj=`[redacted]`;function Jj(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Yj(e){return Jj(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function Xj(e){return Jj(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function Zj(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function Qj(e){return e.$type===`Map`&&Array.isArray(e.entries)}function $j(e){return e.$type===`Set`&&Array.isArray(e.values)}function eM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function tM(e){if(!e||typeof e!=`object`)return null;if(Xj(e))return e.size<=0?null:{kind:Zj(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(Yj(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=Yj(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(Qj(t)||$j(t)){let e=typeof t.size==`number`?t.size:0,n=Qj(t)?`map`:`set`;return e?{kind:n,type:n===`map`?`Map`:`Set`,size:e,collapsed:!1}:null}let n=typeof t.$more==`number`?t.$more:0,r=eM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function nM(e){if(typeof e==`string`)return JSON.stringify(e);let t=tM(e);if(t)return aM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function rM(e){let t=tM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(Yj(e.at(-1))?e.slice(0,-1):e).map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:n,more:t.size-n.length}}let n=e;if(t.kind===`map`){let e=n.entries.map((e,t)=>{let[n,r]=Array.isArray(e)?e:[void 0,e];return{key:String(t),label:nM(n),value:r}});return{children:e,more:Math.max(0,t.size-e.length)}}if(t.kind===`set`){let e=n.values.map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:e,more:Math.max(0,t.size-e.length)}}return{children:eM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function iM(e,t,n){return`${e} ${e===1?t:n}`}function aM(e){let t={array:iM(e.size,`item`,`items`),object:iM(e.size,`key`,`keys`),map:iM(e.size,`entry`,`entries`),set:iM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function oM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function sM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function cM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var lM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function uM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==qj&&!lM.test(e)&&!e.endsWith(`…`)}function dM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function fM(e,t,n,r,i=500){let a=[],o=r.trim().toLowerCase();if(!o)return a;let s=new Set,c=(e,t)=>{let r=oM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of rM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!tM(r.value))continue;let i=n(t)??(tM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var pM=(e,t)=>t.id;function mM(e,t){if(e&1){let e=V();I(0,`button`,2),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).toggle(t))}),E(),I(1,`svg`,3),R(2,`path`,4),L(),bs(),I(3,`span`,14),K(4),L(),I(5,`span`,5),K(6),L()()}if(e&2){let e=W().$implicit;A(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),O(4),J(``,e.label,`:`),O(2),q(e.text)}}function hM(e,t){if(e&1&&R(0,`app-prop-value`,15),e&2){let e=W(5);F(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function gM(e,t){if(e&1&&(I(0,`span`,16),K(1),L()),e&2){let e=W(2).$implicit;O(),q(e.text)}}function _M(e,t){if(e&1&&(I(0,`span`,14),K(1),L(),j(2,hM,1,5,`app-prop-value`,15)(3,gM,2,1,`span`,16)),e&2){let e,t=W().$implicit;O(),J(``,t.label,`:`),O(),M((e=t.edit)?2:3,e)}}function vM(e,t){if(e&1){let e=V();I(0,`button`,17),H(`click`,function(){w(e);let t=W().$implicit;return T(W(3).more(t))}),K(1),I(2,`span`,18),K(3),L()()}if(e&2){let e=W().$implicit,t=W(3);O(),J(` Show `,t.step(e),` more `),O(2),J(`(`,e.more,` not listed)`)}}function yM(e,t){e&1&&(I(0,`span`,12),K(1,`Reading from the page…`),L())}function bM(e,t){if(e&1&&(I(0,`span`,13),K(1),L()),e&2){let e=W().$implicit;O(),q(e.text)}}function xM(e,t){if(e&1&&(I(0,`li`,9),j(1,mM,7,4,`button`,10)(2,_M,4,2)(3,vM,4,2,`button`,11)(4,yM,2,0,`span`,12)(5,bM,2,1,`span`,13),L()),e&2){let e,n=t.$implicit;y_(`padding-left`,n.depth*14,`px`),O(),M((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function SM(e,t){if(e&1&&(I(0,`ul`,7),N(1,xM,6,3,`li`,8,pM),L()),e&2){let e=W(2);F(`id`,e.listId),A(`aria-label`,e.prop().name+` entries`),O(),P(e.rows())}}function CM(e,t){if(e&1){let e=V();I(0,`div`,1)(1,`button`,2),H(`click`,function(){return w(e),T(W().toggleRoot())}),E(),I(2,`svg`,3),R(3,`path`,4),L(),bs(),I(4,`span`,5),K(5),L()(),R(6,`app-prop-value`,6),L(),j(7,SM,3,2,`ul`,7)}if(e&2){let e=t,n=W();O(),A(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),O(4),q(n.summaryOf(e)),O(),F(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),O(),M(n.rootOpen()?7:-1)}}function wM(e,t){if(e&1&&R(0,`app-prop-value`,0),e&2){let e=W();F(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var TM=0;function EM(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function DM(e){if(Array.isArray(e))return e.every(DM);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(DM)}return uM(e)}var OM=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++TM}`;host=C(Vl);pendingMore=null;constructor(){Fv(()=>{let e=this.rows(),t=this.pendingMore;if(!t)return;let n=e.findIndex(e=>(e.kind===`leaf`||e.kind===`node`)&&!t.has(e.id));if(n<0)return;this.pendingMore=null;let r=document.activeElement;r&&r!==document.body&&r.isConnected||this.focusNear(n)})}rootPath=X(()=>[this.prop().prop]);rootValue=X(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=X(()=>tM(this.rootValue()));needle=X(()=>this.query().trim().toLowerCase());matches=X(()=>{let e=this.needle(),t=this.prop();if(!e||[t.name,t.prop].some(t=>t.toLowerCase().includes(e)))return null;let n=this.store(),r=this.directive();return fM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=X(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=X(()=>{let e=this.root();if(!e)return[];let t=this.store(),n=this.directive(),r=this.matches(),i=new Set,a=new Set;for(let e of r??[]){a.add(oM(e));for(let t=2;t<=e.length;t++)i.add(oM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:h,more:g}=rM(e);for(let e of h){let h=[...o,e.key],g=oM(h);if(r&&!m&&!i.has(g))continue;let _=tM(e.value),ee=oM(h,n);if(!_){let t=p&&uM(e.value)?cM(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:EM(e.value),edit:s&&t&&p?{name:sM(h,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let te=!!r&&!m&&i.has(g)&&!a.has(g)||t.isOpen(h,n);if(c.push({id:ee,kind:`node`,depth:f,path:h,label:e.label,text:aM(_),container:_,open:te}),!te)continue;let ne=t.level(h,n)??(_.collapsed?void 0:e.value),re=[...d,_.kind];ne===void 0?t.errors().has(ee)?c.push({...u(h,f+1,`error`),text:t.errors().get(ee)}):c.push(u(h,f+1,`loading`)):l(ne,h,re,f+1,dM(p,_),m||a.has(g))}g>0&&(!r||m)&&c.push({...u(o,f,`more`),more:g,listed:h.length})},u=(e,t,r)=>({id:`${oM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?dM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),Kj.depth,Kj.limit);return e.ok?DM(e.value)?{value:e.value}:{error:`Too large to edit as a whole. Open it to edit the values inside.`}:{error:e.error??`The page did not read it.`}};summaryOf(e){return aM(e)}toggleRoot(){this.pendingMore=null,this.store().toggle(this.rootPath(),this.directive(),!1)}toggle(e){this.pendingMore=null,this.store().toggle(e.path,this.directive(),!!e.container?.collapsed)}more(e){this.pendingMore=new Set(this.rows().map(e=>e.id)),this.store().more(e.path,this.directive(),e.listed??0)}focusNear(e){let t=this.host.nativeElement,n=Array.from(t.querySelectorAll(`#${this.listId} > li`)),r=e=>e?.querySelector(`button:not([disabled]), input, textarea, [tabindex="0"]`);(n.slice(e).map(r).find(Boolean)??n.slice(0,e).reverse().map(r).find(Boolean)??t.querySelector(`.root > .toggle`))?.focus()}step(e){return Math.min(100,e.more??0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-value-tree`]],inputs:{prop:[1,`prop`],store:[1,`store`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],directive:[1,`directive`],query:[1,`query`]},decls:2,vars:1,consts:[[3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`root`],[`type`,`button`,1,`toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`summary`,`mono`],[1,`whole`,3,`bare`,`prop`,`componentId`,`pageId`,`rpc`,`writes`,`readDraft`],[1,`entries`,3,`id`],[1,`entry`,3,`padding-left`],[1,`entry`],[`type`,`button`,1,`toggle`],[`type`,`button`,1,`more`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error`],[1,`key`,`mono`],[1,`leaf-edit`,3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`leaf`,`mono`],[`type`,`button`,1,`more`,3,`click`],[1,`muted`]],template:function(e,t){if(e&1&&j(0,CM,8,12)(1,wM,1,5,`app-prop-value`,0),e&2){let e;M((e=t.root())?0:1,e)}},dependencies:[Wj],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2091,7 +2091,7 @@ button.edit[_ngcontent-%COMP%] { .more[_ngcontent-%COMP%] { transition: none; } -}`]})};function MM(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var NM=class{sender;target={rpc:null,pageId:null,componentId:null};fetched=D(new Map);pushed=D({});open=D(new Set);loading=D(new Set);errors=D(new Map);limits=new Map;generation=0;constructor(e){this.sender=e}follow(e,t){let n=e.componentId===this.target.componentId&&e.pageId===this.target.pageId;this.target=e,n||(this.generation++,this.fetched.set(new Map),this.open.set(new Set),this.loading.set(new Set),this.errors.set(new Map),this.limits.clear()),this.pushed.set(t??{})}level(e,t){let n=lM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(lM(e,t))}toggle(e,t,n){let r=lM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||MM(e,r))&&i.delete(e);this.open.set(i),this.send({path:e,directive:t,forget:!0});return}i.add(r),this.open.set(i),n&&this.load(e,t,this.limits.get(r)??30)}more(e,t,n){let r=lM(e,t),i=Math.min(Jj,Math.max(n,this.limits.get(r)??0)+100);this.limits.set(r,i),this.load(e,t,i)}async read(e,t,n){return this.send({path:e,depth:t,limit:n})}async load(e,t,n){let r=lM(e,t),i=this.generation;this.loading.update(e=>new Set(e).add(r));let a=await this.send({path:e,directive:t,limit:n,watch:!0});i===this.generation&&(this.loading.update(e=>{let t=new Set(e);return t.delete(r),t}),this.errors.update(e=>{let t=new Map(e);return a.ok?t.delete(r):t.set(r,a.error??`The page did not read it.`),t}),a.ok&&this.fetched.update(e=>new Map(e).set(r,a.value)))}async send(e){if(this.sender){if(e.forget)return{ok:!0};let{directive:t,watch:n,...r}=e;try{return await this.sender(r)}catch{return{error:`The devtools server did not answer. Try again.`}}}let{rpc:t,pageId:n,componentId:r}=this.target;if(!t||!n||!r)return{error:`No live page to read from.`};let{directive:i,...a}=e;try{return await t.scope(`pangular`).rpc.call(`request-component-value`,{pageId:n,request:{id:r,...a,...i===void 0?{}:{directive:i}}})??{}}catch{return{error:`The devtools server did not answer. Try again.`}}}};function PM(e,t){if(e&1&&(z(0,`span`,1),K(1),B()),e&2){let e=W(2);O(),J(`: `,e.label())}}function FM(e,t){if(e&1&&(z(0,`span`,1),K(1),B()),e&2){let e=W(3);O(),J(`: `,e.label())}}function IM(e,t){if(e&1){let e=V();z(0,`button`,4),U(`click`,function(){return w(e),T(W(2).store(`log`))}),K(1,` Log to console `),j(2,FM,2,1,`span`,1),B()}if(e&2){let e=W(2);Pg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),O(2),M(e.label()?2:-1)}}function LM(e,t){if(e&1){let e=V();z(0,`button`,0),U(`click`,function(){return w(e),T(W().store())}),K(1,` Store as global `),j(2,PM,2,1,`span`,1),B(),j(3,IM,3,2,`button`,2),z(4,`span`,3),K(5),B()}if(e&2){let e=W();Pg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),O(2),M(e.label()?2:-1),O(),M(e.canLog()?3:-1),O(2),q(e.message())}}var RM=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=X(()=>rE(this.rpc()));busy=D(!1);message=D(``);async store(e=`store`){let t=this.rpc(),n=this.pageId();if(t&&n){this.busy.set(!0),this.message.set(``);try{let r=await t.scope(`pangular`).rpc.call(`request-console-global`,{pageId:n,target:this.target(),...e===`log`?{mode:e}:{}}),i=e===`log`?r?.ok?`Logged in the page console.`:`Not logged.`:r?.ok&&r.name?`Stored as ${r.name}.`:`Not stored.`;this.message.set(r?.message||i)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-store-global`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],target:[1,`target`],label:[1,`label`],canLog:[1,`canLog`]},decls:1,vars:1,consts:[[`type`,`button`,1,`store`,3,`click`,`disabled`],[1,`sr-only`],[`type`,`button`,1,`store`,`log`,3,`disabled`],[`role`,`status`,1,`status`],[`type`,`button`,1,`store`,`log`,3,`click`,`disabled`]],template:function(e,t){e&1&&j(0,LM,6,4),e&2&&M(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { +}`]})};function kM(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var AM=class{sender;target={rpc:null,pageId:null,componentId:null};fetched=D(new Map);pushed=D({});open=D(new Set);loading=D(new Set);errors=D(new Map);limits=new Map;generation=0;constructor(e){this.sender=e}follow(e,t){let n=e.componentId===this.target.componentId&&e.pageId===this.target.pageId;this.target=e,n||(this.generation++,this.fetched.set(new Map),this.open.set(new Set),this.loading.set(new Set),this.errors.set(new Map),this.limits.clear()),this.pushed.set(t??{})}level(e,t){let n=oM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(oM(e,t))}toggle(e,t,n){let r=oM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||kM(e,r))&&i.delete(e);this.open.set(i),this.send({path:e,directive:t,forget:!0});return}i.add(r),this.open.set(i),n&&this.load(e,t,this.limits.get(r)??30)}more(e,t,n){let r=oM(e,t),i=Math.min(Gj,Math.max(n,this.limits.get(r)??0)+100);this.limits.set(r,i),this.load(e,t,i)}async read(e,t,n){return this.send({path:e,depth:t,limit:n})}async load(e,t,n){let r=oM(e,t),i=this.generation;this.loading.update(e=>new Set(e).add(r));let a=await this.send({path:e,directive:t,limit:n,watch:!0});i===this.generation&&(this.loading.update(e=>{let t=new Set(e);return t.delete(r),t}),this.errors.update(e=>{let t=new Map(e);return a.ok?t.delete(r):t.set(r,a.error??`The page did not read it.`),t}),a.ok&&this.fetched.update(e=>new Map(e).set(r,a.value)))}async send(e){if(this.sender){if(e.forget)return{ok:!0};let{directive:t,watch:n,...r}=e;try{return await this.sender(r)}catch{return{error:`The devtools server did not answer. Try again.`}}}let{rpc:t,pageId:n,componentId:r}=this.target;if(!t||!n||!r)return{error:`No live page to read from.`};let{directive:i,...a}=e;try{return await t.scope(`pangular`).rpc.call(`request-component-value`,{pageId:n,request:{id:r,...a,...i===void 0?{}:{directive:i}}})??{}}catch{return{error:`The devtools server did not answer. Try again.`}}}};function jM(e,t){if(e&1&&(z(0,`span`,1),K(1),B()),e&2){let e=W(2);O(),J(`: `,e.label())}}function MM(e,t){if(e&1&&(z(0,`span`,1),K(1),B()),e&2){let e=W(3);O(),J(`: `,e.label())}}function NM(e,t){if(e&1){let e=V();z(0,`button`,4),U(`click`,function(){return w(e),T(W(2).store(`log`))}),K(1,` Log to console `),j(2,MM,2,1,`span`,1),B()}if(e&2){let e=W(2);Pg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),O(2),M(e.label()?2:-1)}}function PM(e,t){if(e&1){let e=V();z(0,`button`,0),U(`click`,function(){return w(e),T(W().store())}),K(1,` Store as global `),j(2,jM,2,1,`span`,1),B(),j(3,NM,3,2,`button`,2),z(4,`span`,3),K(5),B()}if(e&2){let e=W();Pg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),O(2),M(e.label()?2:-1),O(),M(e.canLog()?3:-1),O(2),q(e.message())}}var FM=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=X(()=>eE(this.rpc()));busy=D(!1);message=D(``);async store(e=`store`){let t=this.rpc(),n=this.pageId();if(t&&n){this.busy.set(!0),this.message.set(``);try{let r=await t.scope(`pangular`).rpc.call(`request-console-global`,{pageId:n,target:this.target(),...e===`log`?{mode:e}:{}}),i=e===`log`?r?.ok?`Logged in the page console.`:`Not logged.`:r?.ok&&r.name?`Stored as ${r.name}.`:`Not stored.`;this.message.set(r?.message||i)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-store-global`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],target:[1,`target`],label:[1,`label`],canLog:[1,`canLog`]},decls:1,vars:1,consts:[[`type`,`button`,1,`store`,3,`click`,`disabled`],[1,`sr-only`],[`type`,`button`,1,`store`,`log`,3,`disabled`],[`role`,`status`,1,`status`],[`type`,`button`,1,`store`,`log`,3,`click`,`disabled`]],template:function(e,t){e&1&&j(0,PM,6,4),e&2&&M(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-wrap: wrap; align-items: center; @@ -2140,7 +2140,7 @@ button.edit[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},zM=(e,t)=>t.block.id,BM=(e,t)=>t.kind;function VM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function HM(e,t){if(e&1&&(K(0),z(1,`span`,11),K(2),B()),e&2){let e=W().$implicit;J(` `,e.kind,` `),O(2),J(``,e.seconds,`s`)}}function UM(e,t){if(e&1&&(z(0,`span`,8),j(1,VM,1,1)(2,HM,3,2),B()),e&2){let e=t.$implicit;b_(`note-`+e.kind),A(`title`,e.text),O(),M(e.seconds===void 0?1:2)}}function WM(e,t){e&1&&(z(0,`span`,8),K(1,`hydrated`),B())}function GM(e,t){e&1&&(z(0,`span`,8),K(1,`@error block`),B())}function KM(e,t){if(e&1&&(z(0,`span`,9),K(1),B()),e&2){let e=W().$implicit;O(),q(e.timings)}}function qM(e,t){if(e&1){let e=V();z(0,`li`)(1,`button`,4),U(`click`,function(){let t=w(e).$implicit;return T(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=w(e).$implicit;return T(W(2).highlight.emit(t.block))})(`blur`,function(){return w(e),T(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return w(e),T(W(2).highlight.emit(null))}),z(2,`span`,5),K(3),B(),z(4,`span`,6),K(5),B(),N(6,UM,3,4,`span`,7,BM),j(8,WM,2,0,`span`,8),j(9,GM,2,0,`span`,8),j(10,KM,2,1,`span`,9),z(11,`span`,10),K(12),B()()()}if(e&2){let e=t.$implicit;O(),A(`aria-disabled`,e.block.owner?null:`true`),O(2),q(e.block.owner?.name??`Unknown component`),O(),b_(`defer-state-`+e.block.state),O(),q(e.block.state),O(),P(e.notes),O(2),M(e.block.hydration===`hydrated`?8:-1),O(),M(e.block.hasErrorBlock?9:-1),O(),M(e.timings?10:-1),O(2),q(e.block.triggers.join(`, `)||`no triggers`)}}function JM(e,t){if(e&1&&(z(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),z(3,`span`,2),K(4),B()(),z(5,`ul`,3),N(6,qM,13,9,`li`,null,zM),B()()),e&2){let e=W();O(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),O(2),P(e.rows())}}function YM(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function XM(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${YM(n)}`);let r=[e.loading?.afterTime==null?``:`after ${YM(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${YM(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var ZM=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=bv();highlight=bv();now=D(Date.now());waiting=X(()=>this.blocks().some(e=>!!e.since&&(e.state===`placeholder`||e.state===`initial`)));rows=X(()=>{let e=this.now()-this.clockOffset();return this.blocks().map(t=>({block:t,notes:KT({...t,since:t.since||e},e),timings:XM(t)}))});constructor(){let e,t=()=>{clearInterval(e),e=void 0};_c(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),C(As).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:1,vars:1,consts:[[`aria-labelledby`,`ct-defer-title`,1,`defer`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`pill`],[1,`defer-list`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`defer-state`],[1,`flag`,3,`class`],[1,`flag`],[1,`timings`],[1,`triggers`,`mono`],[`aria-hidden`,`true`]],template:function(e,t){e&1&&j(0,JM,8,2,`section`,0),e&2&&M(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},IM=(e,t)=>t.block.id,LM=(e,t)=>t.kind;function RM(e,t){if(e&1&&K(0),e&2){let e=W().$implicit;J(` `,e.label,` `)}}function zM(e,t){if(e&1&&(K(0),z(1,`span`,11),K(2),B()),e&2){let e=W().$implicit;J(` `,e.kind,` `),O(2),J(``,e.seconds,`s`)}}function BM(e,t){if(e&1&&(z(0,`span`,8),j(1,RM,1,1)(2,zM,3,2),B()),e&2){let e=t.$implicit;b_(`note-`+e.kind),A(`title`,e.text),O(),M(e.seconds===void 0?1:2)}}function VM(e,t){e&1&&(z(0,`span`,8),K(1,`hydrated`),B())}function HM(e,t){e&1&&(z(0,`span`,8),K(1,`@error block`),B())}function UM(e,t){if(e&1&&(z(0,`span`,9),K(1),B()),e&2){let e=W().$implicit;O(),q(e.timings)}}function WM(e,t){if(e&1){let e=V();z(0,`li`)(1,`button`,4),U(`click`,function(){let t=w(e).$implicit;return T(W(2).showOwner.emit(t.block))})(`focus`,function(){let t=w(e).$implicit;return T(W(2).highlight.emit(t.block))})(`blur`,function(){return w(e),T(W(2).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(2).highlight.emit(t.block))})(`mouseleave`,function(){return w(e),T(W(2).highlight.emit(null))}),z(2,`span`,5),K(3),B(),z(4,`span`,6),K(5),B(),N(6,BM,3,4,`span`,7,LM),j(8,VM,2,0,`span`,8),j(9,HM,2,0,`span`,8),j(10,UM,2,1,`span`,9),z(11,`span`,10),K(12),B()()()}if(e&2){let e=t.$implicit;O(),A(`aria-disabled`,e.block.owner?null:`true`),O(2),q(e.block.owner?.name??`Unknown component`),O(),b_(`defer-state-`+e.block.state),O(),q(e.block.state),O(),P(e.notes),O(2),M(e.block.hydration===`hydrated`?8:-1),O(),M(e.block.hasErrorBlock?9:-1),O(),M(e.timings?10:-1),O(2),q(e.block.triggers.join(`, `)||`no triggers`)}}function GM(e,t){if(e&1&&(z(0,`section`,0)(1,`h2`,1),K(2,` Defer blocks `),z(3,`span`,2),K(4),B()(),z(5,`ul`,3),N(6,WM,13,9,`li`,null,IM),B()()),e&2){let e=W();O(4),Y(``,e.rows().length,``,e.truncated()?`+`:``),O(2),P(e.rows())}}function KM(e){return e<1e3?`${e}ms`:`${Number((e/1e3).toFixed(2))}s`}function qM(e){let t=[],n=e.placeholder?.minimumTime;n!=null&&t.push(`placeholder min ${KM(n)}`);let r=[e.loading?.afterTime==null?``:`after ${KM(e.loading.afterTime)}`,e.loading?.minimumTime==null?``:`min ${KM(e.loading.minimumTime)}`].filter(Boolean);return r.length&&t.push(`loading ${r.join(`, `)}`),t.join(` · `)}var JM=class e{blocks=$([]);truncated=$(!1);clockOffset=$(0);showOwner=xv();highlight=xv();now=D(Date.now());waiting=X(()=>this.blocks().some(e=>!!e.since&&(e.state===`placeholder`||e.state===`initial`)));rows=X(()=>{let e=this.now()-this.clockOffset();return this.blocks().map(t=>({block:t,notes:UT({...t,since:t.since||e},e),timings:qM(t)}))});constructor(){let e,t=()=>{clearInterval(e),e=void 0};_c(()=>{if(!this.waiting())return t();e===void 0&&(this.now.set(Date.now()),e=setInterval(()=>this.now.set(Date.now()),1e3))}),C(As).onDestroy(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-defer-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],clockOffset:[1,`clockOffset`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:1,vars:1,consts:[[`aria-labelledby`,`ct-defer-title`,1,`defer`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`pill`],[1,`defer-list`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`defer-state`],[1,`flag`,3,`class`],[1,`flag`],[1,`timings`],[1,`triggers`,`mono`],[`aria-hidden`,`true`]],template:function(e,t){e&1&&j(0,GM,8,2,`section`,0),e&2&&M(t.rows().length?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -2282,7 +2282,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},QM=(e,t)=>t.id;function $M(e,t){if(e&1&&(I(0,`p`,4),K(1),L()),e&2){let e=W(2);O(),J(`The page has more @for blocks than the `,e.length,` listed.`)}}function eN(e,t){e&1&&(I(0,`span`,9),K(1,`@empty showing`),L())}function tN(e,t){e&1&&(I(0,`span`,10),K(1,`@empty`),L())}function nN(e,t){e&1&&(I(0,`span`,10),K(1,`renders nothing`),L())}function rN(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,6),H(`click`,function(){let t=w(e).$implicit;return T(W(3).showOwner.emit(t))})(`focus`,function(){let t=w(e).$implicit,n=W(3);return T(n.highlight.emit(n.target(t)))})(`blur`,function(){return w(e),T(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit,n=W(3);return T(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return w(e),T(W(3).highlight.emit(null))}),I(2,`span`,7),K(3),L(),I(4,`span`,8),K(5),L(),j(6,eN,2,0,`span`,9)(7,tN,2,0,`span`,10)(8,nN,2,0,`span`,10),I(9,`span`,11),K(10),L()()()}if(e&2){let e=t.$implicit,n=W(3);O(),A(`aria-disabled`,e.owner?null:`true`),O(2),q(e.owner?.name??`Unknown component`),O(2),Y(` `,e.count,` `,e.count===1?`item`:`items`,` `),O(),M(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),O(4),q(n.trackLabel(e))}}function iN(e,t){if(e&1&&(I(0,`section`,1)(1,`h2`,2),K(2,` @for blocks `),I(3,`span`,3),K(4),L()(),j(5,$M,2,1,`p`,4),I(6,`ul`,5),N(7,rN,11,6,`li`,null,QM),L()()),e&2){let e=W(),t=W();O(4),q(t.truncated()?e.length+`+`:e.length),O(),M(t.truncated()?5:-1),O(2),P(e)}}function aN(e,t){e&1&&j(0,iN,9,2,`section`,1),e&2&&M(t.length?0:-1)}function oN(e,t){e&1&&R(0,`app-angular-unavailable`,0),e&2&&F(`page`,W().angular())}var sN={$index:`track $index`,item:`track item`,function:`track expression`},cN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=bv();highlight=bv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?sN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`],angular:[1,`angular`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[`capability`,`forBlocks`,`missing`,``,`compact`,``,1,`for`,3,`page`],[`aria-labelledby`,`ct-for-title`,1,`for`],[`id`,`ct-for-title`,1,`for-title`],[1,`pill`],[1,`note`],[1,`for-list`],[`type`,`button`,1,`for-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`count`],[1,`flag`,`empty`],[1,`flag`],[1,`track`,`mono`]],template:function(e,t){if(e&1&&j(0,aN,1,1)(1,oN,1,1,`app-angular-unavailable`,0),e&2){let e;M((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[FD],styles:[`[_nghost-%COMP%] { +}`]})},YM=(e,t)=>t.id;function XM(e,t){if(e&1&&(I(0,`p`,4),K(1),L()),e&2){let e=W(2);O(),J(`The page has more @for blocks than the `,e.length,` listed.`)}}function ZM(e,t){e&1&&(I(0,`span`,9),K(1,`@empty showing`),L())}function QM(e,t){e&1&&(I(0,`span`,10),K(1,`@empty`),L())}function $M(e,t){e&1&&(I(0,`span`,10),K(1,`renders nothing`),L())}function eN(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,6),H(`click`,function(){let t=w(e).$implicit;return T(W(3).showOwner.emit(t))})(`focus`,function(){let t=w(e).$implicit,n=W(3);return T(n.highlight.emit(n.target(t)))})(`blur`,function(){return w(e),T(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit,n=W(3);return T(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return w(e),T(W(3).highlight.emit(null))}),I(2,`span`,7),K(3),L(),I(4,`span`,8),K(5),L(),j(6,ZM,2,0,`span`,9)(7,QM,2,0,`span`,10)(8,$M,2,0,`span`,10),I(9,`span`,11),K(10),L()()()}if(e&2){let e=t.$implicit,n=W(3);O(),A(`aria-disabled`,e.owner?null:`true`),O(2),q(e.owner?.name??`Unknown component`),O(2),Y(` `,e.count,` `,e.count===1?`item`:`items`,` `),O(),M(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),O(4),q(n.trackLabel(e))}}function tN(e,t){if(e&1&&(I(0,`section`,1)(1,`h2`,2),K(2,` @for blocks `),I(3,`span`,3),K(4),L()(),j(5,XM,2,1,`p`,4),I(6,`ul`,5),N(7,eN,11,6,`li`,null,YM),L()()),e&2){let e=W(),t=W();O(4),q(t.truncated()?e.length+`+`:e.length),O(),M(t.truncated()?5:-1),O(2),P(e)}}function nN(e,t){e&1&&j(0,tN,9,2,`section`,1),e&2&&M(t.length?0:-1)}function rN(e,t){e&1&&R(0,`app-angular-unavailable`,0),e&2&&F(`page`,W().angular())}var iN={$index:`track $index`,item:`track item`,function:`track expression`},aN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=xv();highlight=xv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?iN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`],angular:[1,`angular`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[`capability`,`forBlocks`,`missing`,``,`compact`,``,1,`for`,3,`page`],[`aria-labelledby`,`ct-for-title`,1,`for`],[`id`,`ct-for-title`,1,`for-title`],[1,`pill`],[1,`note`],[1,`for-list`],[`type`,`button`,1,`for-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`count`],[1,`flag`,`empty`],[1,`flag`],[1,`track`,`mono`]],template:function(e,t){if(e&1&&j(0,nN,1,1)(1,rN,1,1,`app-angular-unavailable`,0),e&2){let e;M((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[MD],styles:[`[_nghost-%COMP%] { display: block; } @@ -2400,7 +2400,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},lN=(e,t)=>t.id;function uN(e,t){if(e&1&&(I(0,`p`,11),K(1),L(),I(2,`h3`,7),K(3,`Still retained`),L(),I(4,`p`,6),K(5,` In a development build, Angular's DI debug data keeps every destroyed component in memory, so Pangular can't tell a leak from that. Check retainers in the Chrome DevTools Memory panel: take a heap snapshot after a few navigations, search for the class and look for a retainer other than Angular's DI debug records. Open subscriptions after destroy are still tracked below. `),L()),e&2){let e=W(),t=W();O(),q(t.plural(e.navigations,`navigation`))}}function dN(e,t){e&1&&(I(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),L())}function fN(e,t){if(e&1&&(I(0,`span`,18),K(1),L()),e&2){let e=W().$implicit,t=W(4);O(),q(t.plural(e.subscriptions,`open subscription`))}}function pN(e,t){if(e&1&&(I(0,`li`,13)(1,`span`,14),K(2),L(),I(3,`span`,15),K(4),L(),I(5,`span`,16),K(6),L(),I(7,`span`,17),K(8),L(),j(9,fN,2,1,`span`,18),L()),e&2){let e=t.$implicit,n=W(4);O(2),q(e.name),O(2),q(e.route||`/`),O(2),J(``,n.plural(e.navigations,`navigation`),` ago`),O(2),q(n.ageOf(e)),O(),M(e.subscriptions?9:-1)}}function mN(e,t){if(e&1&&(I(0,`p`,6),K(1),L(),I(2,`ul`,12),N(3,pN,10,5,`li`,13,lN),L()),e&2){let e=W(3);O(),Y(` Destroyed, yet still in memory after at least `,e.minNavigations,` navigations and `,e.minSeconds,` seconds. Take a heap snapshot, search for the class and read its retainers. `),O(2),P(e.retained().slice(0,e.shown))}}function hN(e,t){e&1&&(I(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),L())}function gN(e,t){if(e&1&&(I(0,`p`,6),K(1),I(2,`span`,19),K(3),L(),K(4,`. Navigate a few times to see whether they stay. `),L()),e&2){let e=W(3);O(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),O(2),q(e.names(e.recent()))}}function _N(e,t){if(e&1&&(j(0,dN,2,0,`p`,6),I(1,`p`,11),K(2),L(),I(3,`h3`,7),K(4,` Still retained `),I(5,`span`,8),K(6),L()(),j(7,mN,5,2)(8,hN,2,0,`p`,6),j(9,gN,5,2,`p`,6)),e&2){let e=W(),t=W();M(e.support.retention?-1:0),O(2),z_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),O(4),q(t.retained().length),O(),M(t.retained().length?7:8),O(2),M(t.recent().length?9:-1)}}function vN(e,t){if(e&1&&(I(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),I(2,`span`,19),K(3),L(),K(4,`. `),L()),e&2){let e=W(2);O(3),q(e.names(e.detached()))}}function yN(e,t){if(e&1&&(I(0,`span`,8),K(1),L()),e&2){let e=W();O(),q(e.subscriptions.length)}}function bN(e,t){if(e&1&&(I(0,`span`,15),K(1),L()),e&2){let e=W().$implicit;O(),q(e.source)}}function xN(e,t){if(e&1&&(I(0,`li`,13)(1,`span`,14),K(2),L(),I(3,`span`,16),K(4),L(),I(5,`span`,18),K(6),L(),j(7,bN,2,1,`span`,15),L()),e&2){let e=t.$implicit;O(2),q(e.name),O(2),J(``,e.count,` open`),O(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),O(),M(e.source?7:-1)}}function SN(e,t){if(e&1&&(I(0,`p`,6),K(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),L(),I(2,`ul`,12),N(3,xN,8,4,`li`,13,gg),L()),e&2){let e=W(2),t=W();O(3),P(e.subscriptions.slice(0,t.shown))}}function CN(e,t){e&1&&(I(0,`p`,6),K(1,`No subscription is still open after its component went away.`),L())}function wN(e,t){e&1&&(I(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),L())}function TN(e,t){if(e&1&&(j(0,SN,5,0)(1,CN,2,0,`p`,6),j(2,wN,2,0,`p`,6)),e&2){let e=W();M(+!e.subscriptions.length),O(2),M(e.support.instances?-1:2)}}function EN(e,t){e&1&&(I(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),L())}function DN(e,t){e&1&&(I(0,`p`,6),K(1,` Off. Track subscriptions wraps Observable.prototype.subscribe on the page to record which component makes each subscription, until you stop it. Subscriptions made before you start are not seen, so reload or navigate again after starting. `),L())}function ON(e,t){e&1&&R(0,`app-angular-unavailable`,10),e&2&&F(`page`,W(2).angular())}function kN(e,t){if(e&1&&(I(0,`span`,16),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),q(t.plural(e.subscriptions,`subscription`))}}function AN(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,20),H(`click`,function(){let t=w(e).$implicit;return T(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=w(e).$implicit;return T(W(3).highlight.emit(t.id))})(`blur`,function(){return w(e),T(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return w(e),T(W(3).highlight.emit(null))}),I(2,`span`,14),K(3),L(),I(4,`span`,16),K(5),L(),j(6,kN,2,1,`span`,16),L()()}if(e&2){let e=t.$implicit,n=W(2),r=W();O(3),q(e.name),O(2),q(r.effectsText(e)),O(),M(n.support.subscriptions===`on`?6:-1)}}function jN(e,t){e&1&&(I(0,`p`,6),K(1,` Angular files a component's effects under the template its host sits in, so effects of components side by side in one template show as shared. `),L())}function MN(e,t){if(e&1&&(I(0,`ul`,12),N(1,AN,7,3,`li`,null,lN),L(),j(3,jN,2,0,`p`,6)),e&2){let e=W(),t=W();O(),P(e.components.slice(0,t.shown)),O(2),M(e.components.some(t.hasShared)?3:-1)}}function NN(e,t){e&1&&(I(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),L())}function PN(e,t){if(e&1&&(j(0,uN,6,1)(1,_N,10,7),j(2,vN,5,1,`p`,6),I(3,`h3`,7),K(4,` Open subscriptions after destroy `),j(5,yN,2,1,`span`,8),L(),j(6,TN,3,2)(7,EN,2,0,`p`,9)(8,DN,2,0,`p`,6),I(9,`h3`,7),K(10,` Live effects and subscriptions `),I(11,`span`,8),K(12),L()(),j(13,ON,1,1,`app-angular-unavailable`,10),j(14,MN,4,1)(15,NN,2,0,`p`,6)),e&2){let e,n=t,r=W();M(n.support.retention===`dev-di-debug`?0:1),O(2),M(r.detached().length?2:-1),O(3),M(n.support.subscriptions===`on`?5:-1),O(),M((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),O(6),q(n.components.length),O(),M(n.support.effects?-1:13),O(),M(n.components.length?14:15)}}function FN(e,t){e&1&&(I(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),L())}var IN=20;function LN(e){let t=Math.max(0,Math.round(e/1e3));if(t<120)return`${t} s`;let n=Math.round(t/60);return n<120?`${n} min`:`${Math.round(n/60)} h`}var RN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,zN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=bv();highlight=bv();shown=IN;minNavigations=2;minSeconds=sT/1e3;plural=RN;busy=D(!1);announcement=D(``);tracking=X(()=>this.report()?.support.subscriptions===`on`);split=X(()=>{let e=this.report(),t=[],n=[],r=[];if(!e)return{retained:t,recent:n,detached:r};let i=e.support.retention===`dev-di-debug`;for(let a of e.destroyed)if(a.detached)r.push(a);else if(i)continue;else this.isRetained(e,a)?t.push(a):n.push(a);return{retained:t,recent:n,detached:r}});retained=X(()=>this.split().retained);recent=X(()=>this.split().recent);detached=X(()=>this.split().detached);ageMs(e,t){return Math.max(0,this.now()()-e.reportedAt+(e.at-t.destroyedAt))}isRetained(e,t){return t.navigations>=2&&this.ageMs(e,t)>=1e4}ageOf(e){let t=this.report();return t?`${LN(this.ageMs(t,e))} old`:``}names(e){let t=[...new Set(e.map(e=>e.name))];return t.length>6?`${t.slice(0,6).join(`, `)} and more`:t.join(`, `)}hasShared(e){return!!e.sharedEffects}effectsText(e){let t=RN(e.effects,`effect`);return e.sharedEffects?`${t}, ${e.sharedEffects} shared`:t}async toggle(){let e=this.pageId();if(!e||this.busy())return;let t=!this.tracking();this.busy.set(!0);try{await tE(this.rpc(),`request-leak-tracking`,{pageId:e,on:t}),this.announcement.set(t?`Tracking subscriptions. Reload or navigate to see subscriptions made at start.`:`Stopped tracking subscriptions.`)}catch{this.announcement.set(`Could not reach the page. Try again.`)}finally{this.busy.set(!1)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-leaks-section`]],inputs:{report:[1,`report`],pageId:[1,`pageId`],rpc:[1,`rpc`],angular:[1,`angular`],now:[1,`now`]},outputs:{showComponent:`showComponent`,highlight:`highlight`},decls:12,vars:5,consts:[[`aria-labelledby`,`ct-leaks-title`,1,`leaks`],[1,`head`],[`id`,`ct-leaks-title`],[`type`,`button`,1,`track`,3,`click`,`disabled`],[`role`,`status`,1,`sr-only`],[1,`hint`],[1,`note`],[1,`sub`],[1,`pill`],[`role`,`status`,1,`note`],[`capability`,`signalGraph`,`missing`,``,`compact`,``,3,`page`],[1,`stats`],[1,`rows`],[1,`row`],[1,`name`,`mono`],[1,`meta`,`mono`],[1,`count`],[1,`meta`],[1,`flag`,`warn`],[1,`mono`],[`type`,`button`,1,`row`,`live`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),L(),I(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),L(),I(6,`p`,4),K(7),L()(),I(8,`p`,5),K(9,` Components that left the page but are still in memory, and the live effects and RxJS subscriptions of each component. The browser collects garbage when it decides, so a retained instance is a hint: check what holds it in the Chrome DevTools Memory panel. `),L(),j(10,PN,16,7)(11,FN,2,0,`p`,6),L()),e&2){let e;O(4),F(`disabled`,!t.pageId()||!t.report()),A(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),O(3),q(t.announcement()),O(3),M((e=t.report())?10:11,e)}},dependencies:[FD],styles:[`[_nghost-%COMP%] { +}`]})},oN=(e,t)=>t.id;function sN(e,t){if(e&1&&(I(0,`p`,11),K(1),L(),I(2,`h3`,7),K(3,`Still retained`),L(),I(4,`p`,6),K(5,` In a development build, Angular's DI debug data keeps every destroyed component in memory, so Pangular can't tell a leak from that. Check retainers in the Chrome DevTools Memory panel: take a heap snapshot after a few navigations, search for the class and look for a retainer other than Angular's DI debug records. Open subscriptions after destroy are still tracked below. `),L()),e&2){let e=W(),t=W();O(),q(t.plural(e.navigations,`navigation`))}}function cN(e,t){e&1&&(I(0,`p`,6),K(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),L())}function lN(e,t){if(e&1&&(I(0,`span`,18),K(1),L()),e&2){let e=W().$implicit,t=W(4);O(),q(t.plural(e.subscriptions,`open subscription`))}}function uN(e,t){if(e&1&&(I(0,`li`,13)(1,`span`,14),K(2),L(),I(3,`span`,15),K(4),L(),I(5,`span`,16),K(6),L(),I(7,`span`,17),K(8),L(),j(9,lN,2,1,`span`,18),L()),e&2){let e=t.$implicit,n=W(4);O(2),q(e.name),O(2),q(e.route||`/`),O(2),J(``,n.plural(e.navigations,`navigation`),` ago`),O(2),q(n.ageOf(e)),O(),M(e.subscriptions?9:-1)}}function dN(e,t){if(e&1&&(I(0,`p`,6),K(1),L(),I(2,`ul`,12),N(3,uN,10,5,`li`,13,oN),L()),e&2){let e=W(3);O(),Y(` Destroyed, yet still in memory after at least `,e.minNavigations,` navigations and `,e.minSeconds,` seconds. Take a heap snapshot, search for the class and read its retainers. `),O(2),P(e.retained().slice(0,e.shown))}}function fN(e,t){e&1&&(I(0,`p`,6),K(1,`No destroyed component is still in memory after a few navigations.`),L())}function pN(e,t){if(e&1&&(I(0,`p`,6),K(1),I(2,`span`,19),K(3),L(),K(4,`. Navigate a few times to see whether they stay. `),L()),e&2){let e=W(3);O(),J(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),O(2),q(e.names(e.recent()))}}function mN(e,t){if(e&1&&(j(0,cN,2,0,`p`,6),I(1,`p`,11),K(2),L(),I(3,`h3`,7),K(4,` Still retained `),I(5,`span`,8),K(6),L()(),j(7,dN,5,2)(8,fN,2,0,`p`,6),j(9,pN,5,2,`p`,6)),e&2){let e=W(),t=W();M(e.support.retention?-1:0),O(2),B_(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),O(4),q(t.retained().length),O(),M(t.retained().length?7:8),O(2),M(t.recent().length?9:-1)}}function hN(e,t){if(e&1&&(I(0,`p`,6),K(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),I(2,`span`,19),K(3),L(),K(4,`. `),L()),e&2){let e=W(2);O(3),q(e.names(e.detached()))}}function gN(e,t){if(e&1&&(I(0,`span`,8),K(1),L()),e&2){let e=W();O(),q(e.subscriptions.length)}}function _N(e,t){if(e&1&&(I(0,`span`,15),K(1),L()),e&2){let e=W().$implicit;O(),q(e.source)}}function vN(e,t){if(e&1&&(I(0,`li`,13)(1,`span`,14),K(2),L(),I(3,`span`,16),K(4),L(),I(5,`span`,18),K(6),L(),j(7,_N,2,1,`span`,15),L()),e&2){let e=t.$implicit;O(2),q(e.name),O(2),J(``,e.count,` open`),O(2),J(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),O(),M(e.source?7:-1)}}function yN(e,t){if(e&1&&(I(0,`p`,6),K(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),L(),I(2,`ul`,12),N(3,vN,8,4,`li`,13,gg),L()),e&2){let e=W(2),t=W();O(3),P(e.subscriptions.slice(0,t.shown))}}function bN(e,t){e&1&&(I(0,`p`,6),K(1,`No subscription is still open after its component went away.`),L())}function xN(e,t){e&1&&(I(0,`p`,6),K(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),L())}function SN(e,t){if(e&1&&(j(0,yN,5,0)(1,bN,2,0,`p`,6),j(2,xN,2,0,`p`,6)),e&2){let e=W();M(+!e.subscriptions.length),O(2),M(e.support.instances?-1:2)}}function CN(e,t){e&1&&(I(0,`p`,9),K(1,` Tracking could not start: the page has no RxJS the overlay can load. `),L())}function wN(e,t){e&1&&(I(0,`p`,6),K(1,` Off. Track subscriptions wraps Observable.prototype.subscribe on the page to record which component makes each subscription, until you stop it. Subscriptions made before you start are not seen, so reload or navigate again after starting. `),L())}function TN(e,t){e&1&&R(0,`app-angular-unavailable`,10),e&2&&F(`page`,W(2).angular())}function EN(e,t){if(e&1&&(I(0,`span`,16),K(1),L()),e&2){let e=W().$implicit,t=W(3);O(),q(t.plural(e.subscriptions,`subscription`))}}function DN(e,t){if(e&1){let e=V();I(0,`li`)(1,`button`,20),H(`click`,function(){let t=w(e).$implicit;return T(W(3).showComponent.emit(t.id))})(`focus`,function(){let t=w(e).$implicit;return T(W(3).highlight.emit(t.id))})(`blur`,function(){return w(e),T(W(3).highlight.emit(null))})(`mouseenter`,function(){let t=w(e).$implicit;return T(W(3).highlight.emit(t.id))})(`mouseleave`,function(){return w(e),T(W(3).highlight.emit(null))}),I(2,`span`,14),K(3),L(),I(4,`span`,16),K(5),L(),j(6,EN,2,1,`span`,16),L()()}if(e&2){let e=t.$implicit,n=W(2),r=W();O(3),q(e.name),O(2),q(r.effectsText(e)),O(),M(n.support.subscriptions===`on`?6:-1)}}function ON(e,t){e&1&&(I(0,`p`,6),K(1,` Angular files a component's effects under the template its host sits in, so effects of components side by side in one template show as shared. `),L())}function kN(e,t){if(e&1&&(I(0,`ul`,12),N(1,DN,7,3,`li`,null,oN),L(),j(3,ON,2,0,`p`,6)),e&2){let e=W(),t=W();O(),P(e.components.slice(0,t.shown)),O(2),M(e.components.some(t.hasShared)?3:-1)}}function AN(e,t){e&1&&(I(0,`p`,6),K(1,`No component on the page has a live effect or a tracked subscription.`),L())}function jN(e,t){if(e&1&&(j(0,sN,6,1)(1,mN,10,7),j(2,hN,5,1,`p`,6),I(3,`h3`,7),K(4,` Open subscriptions after destroy `),j(5,gN,2,1,`span`,8),L(),j(6,SN,3,2)(7,CN,2,0,`p`,9)(8,wN,2,0,`p`,6),I(9,`h3`,7),K(10,` Live effects and subscriptions `),I(11,`span`,8),K(12),L()(),j(13,TN,1,1,`app-angular-unavailable`,10),j(14,kN,4,1)(15,AN,2,0,`p`,6)),e&2){let e,n=t,r=W();M(n.support.retention===`dev-di-debug`?0:1),O(2),M(r.detached().length?2:-1),O(3),M(n.support.subscriptions===`on`?5:-1),O(),M((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),O(6),q(n.components.length),O(),M(n.support.effects?-1:13),O(),M(n.components.length?14:15)}}function MN(e,t){e&1&&(I(0,`p`,6),K(1,`No leak data from this page yet. It comes with the next report.`),L())}var NN=20;function PN(e){let t=Math.max(0,Math.round(e/1e3));if(t<120)return`${t} s`;let n=Math.round(t/60);return n<120?`${n} min`:`${Math.round(n/60)} h`}var FN=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,IN=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=xv();highlight=xv();shown=NN;minNavigations=2;minSeconds=iT/1e3;plural=FN;busy=D(!1);announcement=D(``);tracking=X(()=>this.report()?.support.subscriptions===`on`);split=X(()=>{let e=this.report(),t=[],n=[],r=[];if(!e)return{retained:t,recent:n,detached:r};let i=e.support.retention===`dev-di-debug`;for(let a of e.destroyed)if(a.detached)r.push(a);else if(i)continue;else this.isRetained(e,a)?t.push(a):n.push(a);return{retained:t,recent:n,detached:r}});retained=X(()=>this.split().retained);recent=X(()=>this.split().recent);detached=X(()=>this.split().detached);ageMs(e,t){return Math.max(0,this.now()()-e.reportedAt+(e.at-t.destroyedAt))}isRetained(e,t){return t.navigations>=2&&this.ageMs(e,t)>=1e4}ageOf(e){let t=this.report();return t?`${PN(this.ageMs(t,e))} old`:``}names(e){let t=[...new Set(e.map(e=>e.name))];return t.length>6?`${t.slice(0,6).join(`, `)} and more`:t.join(`, `)}hasShared(e){return!!e.sharedEffects}effectsText(e){let t=FN(e.effects,`effect`);return e.sharedEffects?`${t}, ${e.sharedEffects} shared`:t}async toggle(){let e=this.pageId();if(!e||this.busy())return;let t=!this.tracking();this.busy.set(!0);try{await QT(this.rpc(),`request-leak-tracking`,{pageId:e,on:t}),this.announcement.set(t?`Tracking subscriptions. Reload or navigate to see subscriptions made at start.`:`Stopped tracking subscriptions.`)}catch{this.announcement.set(`Could not reach the page. Try again.`)}finally{this.busy.set(!1)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=k({type:e,selectors:[[`app-leaks-section`]],inputs:{report:[1,`report`],pageId:[1,`pageId`],rpc:[1,`rpc`],angular:[1,`angular`],now:[1,`now`]},outputs:{showComponent:`showComponent`,highlight:`highlight`},decls:12,vars:5,consts:[[`aria-labelledby`,`ct-leaks-title`,1,`leaks`],[1,`head`],[`id`,`ct-leaks-title`],[`type`,`button`,1,`track`,3,`click`,`disabled`],[`role`,`status`,1,`sr-only`],[1,`hint`],[1,`note`],[1,`sub`],[1,`pill`],[`role`,`status`,1,`note`],[`capability`,`signalGraph`,`missing`,``,`compact`,``,3,`page`],[1,`stats`],[1,`rows`],[1,`row`],[1,`name`,`mono`],[1,`meta`,`mono`],[1,`count`],[1,`meta`],[1,`flag`,`warn`],[1,`mono`],[`type`,`button`,1,`row`,`live`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`]],template:function(e,t){if(e&1&&(I(0,`section`,0)(1,`div`,1)(2,`h2`,2),K(3,`Leaks`),L(),I(4,`button`,3),H(`click`,function(){return t.toggle()}),K(5,` Track subscriptions `),L(),I(6,`p`,4),K(7),L()(),I(8,`p`,5),K(9,` Components that left the page but are still in memory, and the live effects and RxJS subscriptions of each component. The browser collects garbage when it decides, so a retained instance is a hint: check what holds it in the Chrome DevTools Memory panel. `),L(),j(10,jN,16,7)(11,MN,2,0,`p`,6),L()),e&2){let e;O(4),F(`disabled`,!t.pageId()||!t.report()),A(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),O(3),q(t.announcement()),O(3),M((e=t.report())?10:11,e)}},dependencies:[MD],styles:[`[_nghost-%COMP%] { display: block; } @@ -2556,7 +2556,7 @@ h2[_ngcontent-%COMP%] { border-color: color-mix(in srgb, var(--%NS%warn) 30%, transparent); background: color-mix(in srgb, var(--%NS%warn) 12%, transparent); color: var(--%NS%warn-text); -}`]})},BN=12,VN=900;function HN(e){for(let t=e.parentElement;t;t=t.parentElement){let e=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e.overflowY))return t}return null}var UN=class{options;injector=C(Os);visibleTop=D(0);viewport=D(VN);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=D(e.estimate);let t=e.min??300;this.enabled=X(()=>e.count()>t),this.range=X(()=>{let t=e.count();if(!this.enabled())return{start:0,end:t};let n=this.rowHeight(),r=this.viewport(),i=Math.max(0,Math.min(this.visibleTop(),t*n-r)),a=Math.max(0,Math.min(t-1,Math.floor(i/n)-BN));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+BN))}}),this.padTop=X(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=X(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),_c(()=>{e.count(),ud(()=>this.update(),{injector:this.injector})}),C(As).onDestroy(()=>this.detach?.())}get count(){return this.options.count()}rendered(e){let{start:t,end:n}=this.range();return e>=t&&ethis.update();n.addEventListener(`scroll`,r,{passive:!0}),window.addEventListener(`resize`,r),this.detach=()=>{n.removeEventListener(`scroll`,r),window.removeEventListener(`resize`,r)},this.update()}update(){let e=this.host;if(e){if(this.scroller===e)this.place(e.scrollTop,e.clientHeight);else{let t=this.scroller?this.scroller.getBoundingClientRect().top:0,n=this.scroller?this.scroller.clientHeight:window.innerHeight;this.place(t-e.getBoundingClientRect().top,n)}this.options.fixed||this.measure()}}place(e,t){this.visibleTop.set(e),this.viewport.set(t>0?t:VN)}measure(){let e=this.host?.querySelectorAll(`[data-vindex]`);if(!e||e.length<2)return;let t=e[0].getBoundingClientRect(),n=(e[e.length-1].getBoundingClientRect().bottom-t.top)/e.length;n>4&&Math.abs(n-this.rowHeight())>1&&this.rowHeight.set(n)}reveal(e,t){if(this.enabled()&&!this.rendered(e)){let t=e*this.rowHeight(),n=this.viewport(),r=Math.max(0,t-n/2);if(this.place(r,n),this.host&&this.scroller===this.host)this.host.scrollTop=r;else if(this.host){let e=this.scroller?this.scroller.getBoundingClientRect().top:0,t=this.host.getBoundingClientRect().top-e+r;this.scroller?this.scroller.scrollTop+=t:window.scrollBy(0,t)}}t&&ud(t,{injector:this.injector})}};function WN(e){let t=e.ownerDocument.defaultView;if(!t)return null;for(let n=e.parentElement;n&&n!==e.ownerDocument.documentElement&&n!==e.ownerDocument.body;n=n.parentElement)if(/(auto|scroll|overlay)/.test(t.getComputedStyle(n).overflowY))return n;return null}var GN=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function KN(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=WN(e),i=r?n.getComputedStyle(r):null,a=i?GN(i.paddingTop):0,o=i?GN(i.scrollPaddingTop):0,s=GN(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function qN(e,t,n=8){let r=WN(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var JN=[`filterInput`],YN=[`treeEl`],XN=[`propFilterInput`],ZN=()=>[],QN=e=>({kind:`component`,id:e}),$N=(e,t)=>t.row.node.id,eP=(e,t)=>t.outlet+t.route,tP=(e,t)=>t+e;function nP(e,t){return this.sourceKey(t)}var rP=(e,t)=>t.formId,iP=(e,t)=>t.name+t.index,aP=(e,t)=>t.name,oP=(e,t)=>t.token+e;function sP(e,t){if(e&1){let e=V();I(0,`span`,40),K(1,`Page`),L(),I(2,`app-select`,41),H(`valueChange`,function(t){return w(e),T(W(2).selectPage(t))}),L()}if(e&2){let e=W(2);O(2),F(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function cP(e,t){if(e&1){let e=V();I(0,`button`,42),H(`click`,function(){return w(e),T(W(2).toggleDirectiveHosts())}),E(),I(1,`svg`,15),R(2,`path`,43)(3,`path`,44),L(),bs(),I(4,`span`,18),K(5,`Directive hosts`),L()()}e&2&&A(`aria-pressed`,W(2).showDirectiveHosts())}function lP(e,t){if(e&1){let e=V();I(0,`button`,45),H(`click`,function(){w(e);let t=W(2);return T(t.picking()?t.cancelPick():t.pick())}),E(),I(1,`svg`,15),R(2,`path`,46),L(),bs(),I(3,`span`,18),K(4),L()()}if(e&2){let e=W(2);G(`on`,e.picking()),A(`title`,e.pickLabel()),O(4),q(e.pickLabel())}}function uP(e,t){if(e&1&&(I(0,`p`,24),K(1),L()),e&2){let e=W(2);O(),q(e.pickMessage())}}function dP(e,t){if(e&1&&(I(0,`p`,25),K(1),L()),e&2){let e=W(2);O(),q(e.truncationText())}}function fP(e,t){e&1&&(I(0,`p`,48),K(1,`The filter only searches the components the tree lists.`),L())}function pP(e,t){e&1&&(I(0,`p`,48),K(1,`Directive hosts are hidden, so they are not searched.`),L())}function mP(e,t){if(e&1){let e=V();I(0,`div`,29)(1,`p`,47),K(2),L(),j(3,fP,2,0,`p`,48),j(4,pP,2,0,`p`,48),I(5,`button`,49),H(`click`,function(){return w(e),T(W(2).clearFilter())}),K(6,`Clear filters`),L()()}if(e&2){let e=W(2);O(2),J(`No components match “`,e.filter().trim(),`”`),O(),M(e.page().truncated?3:-1),O(),M(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function hP(e,t){if(e&1&&(I(0,`p`,30),K(1),L()),e&2){let e=W(2);O(),J(` `,e.rows().length,` rows. Rows render as you scroll, so the browser's find only sees the ones near view; the filter above searches them all. `)}}function gP(e,t){if(e&1){let e=V();I(0,`span`,57),H(`click`,function(t){w(e),W();let n=J_(0);return T(W(2).toggle(n.node.id,t))}),E(),I(1,`svg`,58),R(2,`path`,59),L()()}e&2&&(W(),G(`open`,J_(0).expanded))}function _P(e,t){e&1&&R(0,`span`,52)}function vP(e,t){if(e&1&&(I(0,`span`,60),K(1),L(),I(2,`span`,61),K(3),L(),I(4,`span`,28),K(5,`directive host`),L()),e&2){W();let e=J_(0),t=W(2);O(),J(`<`,e.node.tag,`>`),O(),A(`title`,e.node.directives?.join(`, `)),O(),q(t.hostLabel(e.node))}}function yP(e,t){if(e&1&&(I(0,`span`,62),K(1),L(),I(2,`span`,63),K(3),L()),e&2){W();let e=J_(0);A(`title`,e.node.name),O(),q(e.node.name),O(),A(`title`,`<`+e.node.tag+`>`),O(),J(`<`,e.node.tag,`>`)}}function bP(e,t){if(e&1&&(I(0,`span`)(1,`span`,28),K(2,`Hydration: `),L(),K(3),L()),e&2){let e=t,n=W(3);b_(`hyd hyd-`+e),O(3),q(n.hydrationText(e))}}function xP(e,t){if(e&1&&(I(0,`span`,54),K(1),L()),e&2){let e=t.$implicit;O(),q(e.route||`/`)}}function SP(e,t){if(e&1&&(I(0,`span`,55),K(1),I(2,`span`,28),K(3),L()()),e&2){let e=t;O(),J(` `,e),O(2),J(` `,e===1?`check`:`checks`,` while recording`)}}function CP(e,t){if(e&1&&(I(0,`span`,56),K(1),I(2,`span`,28),K(3),L()()),e&2){W();let e=J_(0);A(`title`,e.node.directives.join(`, `)),O(),J(` +`,e.node.directives.length,` `),O(2),J(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function wP(e,t){if(e&1){let e=V();K_(0),I(1,`div`,50),H(`click`,function(){w(e);let t=J_(0);return T(W(2).select(t.node.id))})(`focus`,function(t){w(e);let n=J_(0),r=W(2);return r.focusId.set(n.node.id),r.highlight(n.node.id),T(r.showNameTip(t))})(`blur`,function(){w(e);let t=W(2);return t.highlight(null),T(t.nameTip.set(null))})(`keydown.escape`,function(){return w(e),T(W(2).nameTip.set(null))})(`mouseenter`,function(){w(e);let t=J_(0);return T(W(2).highlight(t.node.id))})(`mouseleave`,function(){return w(e),T(W(2).highlight(null))}),j(2,gP,3,2,`span`,51)(3,_P,1,0,`span`,52),j(4,vP,6,3)(5,yP,4,4),j(6,bP,4,3,`span`,53),N(7,xP,2,1,`span`,54,eP),j(9,SP,4,2,`span`,55),j(10,CP,4,3,`span`,56),L()}if(e&2){let e,n,r=t.$implicit,i=W(2),a=q_(r.row);O(),y_(`--%NS%depth`,a.depth),G(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),A(`aria-level`,a.depth+1)(`aria-setsize`,a.setsize)(`aria-posinset`,a.posinset)(`aria-expanded`,a.hasChildren?a.expanded:null)(`aria-selected`,i.selectedId()===a.node.id)(`tabindex`,i.tabStop()===a.node.id?0:-1)(`data-vindex`,r.index)(`data-id`,a.node.id),O(),M(a.hasChildren?2:3),O(2),M(a.node.kind===`directive`?4:5),O(2),M((e=a.node.hydration)?6:-1,e),O(),P(i.routedById().get(a.node.id)??rv(20,ZN)),O(2),M((n=i.cdHosts()[a.node.id])?9:-1,n),O(),M(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function TP(e,t){if(e&1&&(I(0,`div`,64),K(1),L()),e&2){let e=t;y_(`top`,e.top,`px`),O(),J(` `,e.text,` `)}}function EP(e,t){if(e&1&&(I(0,`li`,72),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function DP(e,t){if(e&1){let e=V();I(0,`div`,74)(1,`button`,49),H(`click`,function(){let t=w(e);return T(W(3).reveal(t.id,!0))}),K(2),L()()}e&2&&(O(2),J(` Show `,t.name,` `))}function OP(e,t){if(e&1&&(I(0,`section`,34)(1,`header`,65)(2,`span`,66),K(3,`directive host`),L(),I(4,`h2`,67),K(5),L(),I(6,`span`,68),K(7),L()(),I(8,`div`,69)(9,`h3`),K(10,` Directives `),I(11,`span`,70),K(12),L()(),I(13,`ul`,71),N(14,EP,2,1,`li`,72,tP),L()(),I(16,`div`,69)(17,`p`,73),K(18,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),L(),j(19,DP,3,1,`div`,74),L()()),e&2){let e,n=t,r=W(2);O(5),J(`<`,n.tag,`>`),O(2),q(r.hostLabel(n)),O(5),q(n.directives?.length??0),O(2),P(n.directives??rv(4,ZN)),O(5),M((e=r.ownerOf(n.id))?19:-1,e)}}function kP(e,t){if(e&1&&(I(0,`p`,75),R(1,`app-source-link`,79),L()),e&2){let e=t;O(),F(`file`,e.file)(`line`,e.line)}}function AP(e,t){if(e&1&&(I(0,`p`,80)(1,`span`,82),K(2,`Likely`),L(),I(3,`span`,28),K(4,`, matched by class name: `),L(),R(5,`app-source-link`,79),L()),e&2){W();let e=J_(0);F(`title`,W(3).guessTitle),O(5),F(`file`,e[0].file)(`line`,e[0].line)}}function jP(e,t){if(e&1&&(I(0,`li`),R(1,`app-source-link`,79),L()),e&2){let e=t.$implicit;O(),F(`file`,e.file)(`line`,e.line)}}function MP(e,t){if(e&1&&(I(0,`div`,81)(1,`p`,83)(2,`span`,82),K(3,`Not certain`),L(),K(4),L(),I(5,`ul`,84),N(6,jP,2,2,`li`,null,nP,!0),L()()),e&2){W();let e=J_(0),t=W(),n=W(2);F(`title`,n.guessTitle),O(4),Y(` `,e.length,` source files define `,n.bareName(t.name),`: `),O(2),P(e)}}function NP(e,t){if(e&1&&(K_(0),j(1,AP,6,3,`p`,80)(2,MP,8,3,`div`,81)),e&2){let e=W(),t=q_(W(2).sourceCandidates(e));O(),M(t.length===1?1:t.length>1?2:-1)}}function PP(e,t){if(e&1){let e=V();I(0,`div`,85)(1,`button`,49),H(`click`,function(){w(e);let t=W();return T(W(2).revealInElements(t))}),K(2,`Reveal in Elements`),L(),I(3,`button`,49),H(`click`,function(){w(e);let t=W();return T(W(2).openSource(t))}),K(4,`Open source`),L()(),I(5,`p`,86),K(6),L()}if(e&2){let e=W(3);O(6),q(e.actionMessage())}}function FP(e,t){if(e&1){let e=V();I(0,`button`,88),H(`click`,function(){let t=w(e).$implicit;return T(W(5).showForm.emit(t.formId))}),K(1),L()}if(e&2){let e=t.$implicit;O(),J(` Show `,e.label,` in Forms `)}}function IP(e,t){if(e&1&&(I(0,`div`,76),N(1,FP,2,1,`button`,87,rP),L()),e&2){let e=W(),t=W(3);O(),P(t.formsIn(e.file))}}function LP(e,t){e&1&&j(0,IP,3,0,`div`,76),e&2&&M(W(3).formsIn(t.file).length?0:-1)}function RP(e,t){if(e&1){let e=V();I(0,`div`,76)(1,`button`,49),H(`click`,function(){w(e);let t=W();return T(W(2).openInjector(t))}),K(2,` Show in Injectors `),I(3,`span`,28),K(4),L()()()}if(e&2){let e=W();O(4),J(`: `,e.name)}}function zP(e,t){if(e&1&&R(0,`app-store-global`,77),e&2){let e=W(),t=W(2);F(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,iv(4,QN,e.id))(`label`,e.name)}}function BP(e,t){if(e&1&&(I(0,`dt`),K(1,`Routed`),L(),I(2,`dd`,90),K(3),L()),e&2){let e=t.$implicit;O(3),Y(``,e.route||`/`,` in outlet `,e.outlet)}}function VP(e,t){if(e&1&&(I(0,`span`,11),K(1),L()),e&2){let e=W(4);O(),Y(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function HP(e,t){if(e&1){let e=V();I(0,`div`,94)(1,`p`,47),K(2),L(),I(3,`p`,48),K(4,` The filter searches names, and the nested keys of values you opened. `),L(),I(5,`button`,49),H(`click`,function(){return w(e),T(W(5).clearPropFilter())}),K(6,`Clear filters`),L()()}if(e&2){let e=W(5);O(2),J(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function UP(e,t){if(e&1&&(I(0,`span`,98),K(1),L()),e&2){let e=W().$implicit;O(),J(`(`,e.prop,`)`)}}function WP(e,t){if(e&1&&(I(0,`li`,96)(1,`span`,97),K(2),j(3,UP,2,1,`span`,98),L(),R(4,`app-value-tree`,99),L()),e&2){let e=t.$implicit,n=W(4),r=W(3);O(2),J(` `,e.name,` `),O(),M(e.prop===e.name?-1:3),O(),F(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function GP(e,t){if(e&1&&(I(0,`ul`,95),N(1,WP,5,9,`li`,96,aP),L()),e&2){let e=W(2);O(),P(e.inputs)}}function KP(e,t){e&1&&(I(0,`p`,73),K(1,`No inputs.`),L())}function qP(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`),K(2,` Inputs `),I(3,`span`,70),K(4),L()(),j(5,GP,3,0,`ul`,95)(6,KP,2,0,`p`,73),L()),e&2){let e=W();O(4),q(e.inputs.length),O(),M(e.inputs.length?5:6)}}function JP(e,t){if(e&1&&(I(0,`li`,101)(1,`span`,90),K(2),L(),I(3,`span`,102),K(4),L()()),e&2){let e=t.$implicit;G(`on`,e.listened),O(2),q(e.name),O(2),q(e.listened?`listened`:`no listener`)}}function YP(e,t){if(e&1&&(I(0,`ul`,71),N(1,JP,5,4,`li`,100,aP),L()),e&2){let e=W(2);O(),P(e.outputs)}}function XP(e,t){e&1&&(I(0,`p`,73),K(1,`No outputs.`),L())}function ZP(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`),K(2,` Outputs `),I(3,`span`,70),K(4),L()(),j(5,YP,3,0,`ul`,71)(6,XP,2,0,`p`,73),L()),e&2){let e=W();O(4),q(e.outputs.length),O(),M(e.outputs.length?5:6)}}function QP(e,t){if(e&1&&(I(0,`span`,103),K(1),L()),e&2){let e=W().$implicit;O(),q(e.kind)}}function $P(e,t){if(e&1&&(I(0,`li`,96)(1,`span`,97),K(2),j(3,QP,2,1,`span`,103),L(),R(4,`app-value-tree`,99),L()),e&2){let e=t.$implicit,n=W(4),r=W(3);O(2),J(` `,e.name,` `),O(),M(e.kind?3:-1),O(),F(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function eF(e,t){if(e&1&&(I(0,`ul`,95),N(1,$P,5,9,`li`,96,aP),L()),e&2){let e=W(2);O(),P(e.properties)}}function tF(e,t){e&1&&(I(0,`p`,73),K(1,`No other properties.`),L())}function nF(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`),K(2,` Properties `),I(3,`span`,70),K(4),L()(),j(5,eF,3,0,`ul`,95)(6,tF,2,0,`p`,73),L()),e&2){let e=W();O(4),q(e.properties.length),O(),M(e.properties.length?5:6)}}function rF(e,t){if(e&1&&(I(0,`li`,72),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function iF(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`),K(2,` DOM listeners `),I(3,`span`,70),K(4),L()(),I(5,`ul`,71),N(6,rF,2,1,`li`,72,_g),L()()),e&2){let e=W(2);O(4),q(e.listeners.length),O(2),P(e.listeners)}}function aF(e,t){if(e&1&&(I(0,`li`,96)(1,`span`,97),K(2),L(),R(3,`app-value-tree`,104),L()),e&2){let e=t.$implicit,n=W(2).$implicit,r=W(2),i=W(3);O(2),q(e.name),O(),F(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function oF(e,t){if(e&1&&(I(0,`ul`,95),N(1,aF,4,8,`li`,96,aP),L()),e&2){let e=W().$implicit;O(),P(e.inputs)}}function sF(e,t){if(e&1&&(I(0,`li`,101)(1,`span`,90),K(2),L(),I(3,`span`,102),K(4),L()()),e&2){let e=t.$implicit;G(`on`,e.listened),O(2),q(e.name),O(2),q(e.listened?`listened`:`no listener`)}}function cF(e,t){if(e&1&&(I(0,`ul`,71),N(1,sF,5,4,`li`,100,aP),L()),e&2){let e=W().$implicit;O(),P(e.outputs)}}function lF(e,t){e&1&&(I(0,`p`,73),K(1,`No inputs or outputs.`),L())}function uF(e,t){if(e&1&&(I(0,`div`,69)(1,`h3`)(2,`span`,90),K(3),L(),I(4,`span`,103),K(5,`directive on host`),L()(),j(6,oF,3,0,`ul`,95),j(7,cF,3,0,`ul`,71),j(8,lF,2,0,`p`,73),L()),e&2){let e=t.$implicit;O(3),q(e.name),O(3),M(e.inputs.length?6:-1),O(),M(e.outputs.length?7:-1),O(),M(!e.inputs.length&&!e.outputs.length?8:-1)}}function dF(e,t){if(e&1&&(j(0,HP,7,1,`div`,94),j(1,qP,7,2,`div`,69),j(2,ZP,7,2,`div`,69),j(3,nF,7,2,`div`,69),j(4,iF,8,1,`div`,69),N(5,uF,9,4,`div`,69,iP)),e&2){let e=t,n=W(),r=W(3);M(r.propQuery()&&!e.count?0:-1),O(),M(!r.propQuery()||e.inputs.length?1:-1),O(),M(!r.propQuery()||e.outputs.length?2:-1),O(),M(!r.propQuery()||e.properties.length?3:-1),O(),M(!r.propQuery()&&n.listeners.length?4:-1),O(),P(e.directives)}}function fF(e,t){if(e&1&&(I(0,`span`,103),K(1),L()),e&2){let e=t.$implicit;O(),q(e)}}function pF(e,t){if(e&1&&(I(0,`span`,107),K(1,`from `),I(2,`span`,90),K(3),L()()),e&2){let e=W().$implicit;O(3),q(e.providedByName??`an injector`)}}function mF(e,t){e&1&&(I(0,`span`,108),K(1,`not provided`),L())}function hF(e,t){if(e&1&&(I(0,`li`,105)(1,`span`,106),K(2),L(),N(3,fF,2,1,`span`,103,_g),j(5,pF,4,1,`span`,107)(6,mF,2,0,`span`,108),L()),e&2){let e=t.$implicit;O(2),q(e.token),O(),P(e.flags),O(2),M(e.providedBy?5:6)}}function gF(e,t){if(e&1&&(I(0,`ul`,93),N(1,hF,7,2,`li`,105,oP),L()),e&2){let e=W();O(),P(e.dependencies)}}function _F(e,t){e&1&&(I(0,`p`,73),K(1,`Nothing is injected through the constructor or inject().`),L())}function vF(e,t){if(e&1){let e=V();I(0,`dl`,89)(1,`dt`),K(2,`Change detection`),L(),I(3,`dd`),K(4),L(),I(5,`dt`),K(6,`Encapsulation`),L(),I(7,`dd`),K(8),L(),I(9,`dt`),K(10,`Host path`),L(),I(11,`dd`,90),K(12),L(),N(13,BP,4,2,null,null,eP),L(),I(15,`div`,91)(16,`div`,5),E(),I(17,`svg`,6),R(18,`circle`,7)(19,`path`,8),L(),bs(),I(20,`input`,92,2),H(`input`,function(t){return w(e),T(W(3).propFilter.set(t.target.value))})(`keydown.escape`,function(t){return w(e),T(W(3).clearPropFilter(t))}),L()(),j(22,VP,2,2,`span`,11),I(23,`p`,23),K(24),L()(),j(25,dF,7,5),I(26,`div`,69)(27,`h3`),K(28,` Injected `),I(29,`span`,70),K(30),L()(),j(31,gF,3,0,`ul`,93)(32,_F,2,0,`p`,73),L()}if(e&2){let e,n=t,r=W(),i=W(2);O(4),q(n.changeDetection??`Unknown`),O(4),q(n.encapsulation??`Unknown`),O(4),q(n.path),O(),P(i.routedById().get(r.id)??rv(9,ZN)),O(7),F(`value`,i.propFilter()),O(2),M(i.propQuery()?22:-1),O(2),q(i.propFilterStatus()),O(),M((e=i.shownValues())?25:-1,e),O(5),q(n.dependencies.length),O(),M(n.dependencies.length?31:32)}}function yF(e,t){e&1&&(I(0,`div`,78),R(1,`span`,109),I(2,`p`,48),K(3,`Reading live values from the page…`),L()())}function bF(e,t){if(e&1&&(I(0,`section`,34)(1,`header`,65)(2,`span`,66),K(3,`component`),L(),I(4,`h2`,67),K(5),L(),I(6,`span`,68),K(7),L(),j(8,kP,2,2,`p`,75)(9,NP,3,2),j(10,PP,7,1),j(11,LP,1,1),j(12,RP,5,1,`div`,76),j(13,zP,1,6,`app-store-global`,77),L(),j(14,vF,33,10)(15,yF,4,0,`div`,78),L()),e&2){let e,n,r,i=t,a=W(2);O(5),q(i.name),O(2),J(`<`,i.tag,`>`),O(),M((e=a.detail()?.source)?8:9,e),O(2),M(a.devtoolsActions()?10:-1),O(),M((n=a.sourceFor(i))?11:-1,n),O(),M(a.canShowInjector()&&!a.staticReport()?12:-1),O(),M(!a.staticReport()&&!a.native()?13:-1),O(),M((r=a.detail())?14:15,r)}}function xF(e,t){e&1&&(I(0,`p`,47),K(1,`The selected component was destroyed`),L(),I(2,`p`,48)(3,`span`,90),K(4),L(),K(5,` is no longer on the page. Select another component to see its live values. `),L()),e&2&&(O(4),q(t))}function SF(e,t){e&1&&(I(0,`p`,48),K(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),L())}function CF(e,t){if(e&1&&(I(0,`div`,35),j(1,xF,6,1)(2,SF,2,0,`p`,48),L()),e&2){let e,t=W(2);O(),M((e=t.destroyed())?1:2,e)}}function wF(e,t){e&1&&R(0,`app-angular-unavailable`,37),e&2&&F(`page`,W(2).angularPage())}function TF(e,t){if(e&1){let e=V();I(0,`app-hydration-section`,110),H(`overlay`,function(t){return w(e),T(W(2).setHydrationOverlay(t))})(`showNode`,function(t){return w(e),T(W(2).revealNode(t))})(`highlight`,function(t){return w(e),T(W(2).highlight(t))}),L()}e&2&&F(`report`,W(2).page()?.hydration)}function EF(e,t){if(e&1){let e=V();I(0,`app-cd-recording`,111),H(`showComponent`,function(t){return w(e),T(W(2).showCdComponent(t))}),L(),I(1,`app-leaks-section`,112),H(`showComponent`,function(t){return w(e),T(W(2).showLeakComponent(t))})(`highlight`,function(t){return w(e),T(W(2).highlight(t))}),L()}if(e&2){let e=W(2);F(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`native`,e.native()),O(),F(`report`,e.leaksPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`angular`,e.angularPage())}}function DF(e,t){if(e&1){let e=V();I(0,`p`,3),K(1,` Every component instance on the page, in the order Angular rendered them. Hover a row to highlight its host in the page, and select it to read its live inputs, properties, outputs and injected services. `),L(),I(2,`div`,4)(3,`div`,5),E(),I(4,`svg`,6),R(5,`circle`,7)(6,`path`,8),L(),bs(),I(7,`input`,9,0),H(`input`,function(t){return w(e),T(W().setFilter(t.target.value))})(`keydown.escape`,function(){return w(e),T(W().setFilter(``))}),L(),I(9,`span`,10),K(10,` Type plain text, a tag such as